Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 286005
Collapse All | Expand All

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

Return to bug 286005