Index: libopenraw-0.0.8.ebuild =================================================================== --- libopenraw-0.0.8.ebuild (revision 51311) +++ libopenraw-0.0.8.ebuild (working copy) @@ -4,6 +4,8 @@ EAPI=2 +inherit eutils + DESCRIPTION="Decoding library for RAW image formats" HOMEPAGE="http://libopenraw.freedesktop.org" SRC_URI="http://${PN}.freedesktop.org/download/${P}.tar.gz" @@ -21,6 +23,10 @@ dev-util/pkgconfig test? ( net-misc/curl )" +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.0.8-get_current_dir_name.patch +} + src_configure() { econf \ --with-boost=${EPREFIX}/usr \ Index: files/libopenraw-0.0.8-get_current_dir_name.patch =================================================================== --- files/libopenraw-0.0.8-get_current_dir_name.patch (revision 0) +++ files/libopenraw-0.0.8-get_current_dir_name.patch (revision 0) @@ -0,0 +1,34 @@ +From 6975c54a5cd4f1c6d91401a9cfc90d618f5516ee Mon Sep 17 00:00:00 2001 +From: Heiko Przybyl +Date: Tue, 22 Sep 2009 20:07:48 +0200 +Subject: [PATCH 1/1] Avoid usage of get_current_dir_name() on non-GNU targets. + +The testsuite uses get_current_dir_name() to determine the current +directory for the bootstrap download of the images. Unfortunately this +function is a GNU-extension and thus not available on platforms that +aren't GNU, e.g. MacOSX. So guard get_current_dir_name() with _GNU_SOURCE +and if not available fall back to POSIX getcwd(). +--- + testsuite/testsuite.cpp | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/testsuite/testsuite.cpp b/testsuite/testsuite.cpp +index 402f7ba..9e7d8da 100644 +--- a/testsuite/testsuite.cpp ++++ b/testsuite/testsuite.cpp +@@ -853,7 +853,12 @@ int main(int argc, char ** argv) + break; + case 'd': + if(optarg[0] != '/') { ++#ifdef _GNU_SOURCE + char * dir = get_current_dir_name(); ++#else ++ char * dir = (char *) malloc(PATH_MAX * sizeof(char)); ++ getcwd(dir, PATH_MAX); ++#endif + download_dir = dir; + download_dir += '/'; + download_dir += optarg; +-- +1.6.4.2 +