1 |
commit: 13a0978fd44908dcd1565318ecdf34b0814dcbdc |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 21 12:33:25 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 21 12:33:36 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13a0978f |
7 |
|
8 |
dev-scheme/guile: fix compilation on Darwin, thanks * in bug #612338 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
11 |
|
12 |
dev-scheme/guile/files/guile-2.0.14-darwin.patch | 38 ++++++++++++++++++++++++ |
13 |
dev-scheme/guile/guile-2.0.14.ebuild | 5 +++- |
14 |
2 files changed, 42 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-scheme/guile/files/guile-2.0.14-darwin.patch b/dev-scheme/guile/files/guile-2.0.14-darwin.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..17741ae352c |
19 |
--- /dev/null |
20 |
+++ b/dev-scheme/guile/files/guile-2.0.14-darwin.patch |
21 |
@@ -0,0 +1,38 @@ |
22 |
+fix compilation on Darwin |
23 |
+ |
24 |
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23 |
25 |
+https://bugs.gentoo.org/show_bug.cgi?id=612338 |
26 |
+ |
27 |
+--- guile-2.0.14/libguile/filesys.c |
28 |
++++ guile-2.0.14/libguile/filesys.c |
29 |
+@@ -1486,6 +1486,9 @@ |
30 |
+ mode_bits = scm_i_mode_bits (mode); |
31 |
+ } |
32 |
+ |
33 |
++#ifdef __APPLE__ |
34 |
++ open_flags &= O_APPEND|O_SHLOCK|O_EXLOCK|O_CLOEXEC; |
35 |
++#endif |
36 |
+ SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags)); |
37 |
+ if (rv == -1) |
38 |
+ SCM_SYSERROR; |
39 |
+--- guile-2.0.14/libguile/stime.c |
40 |
++++ guile-2.0.14/libguile/stime.c |
41 |
+@@ -830,6 +830,10 @@ |
42 |
+ |
43 |
+ #ifdef HAVE_POSIX_CPUTIME |
44 |
+ { |
45 |
++#ifdef __APPLE__ |
46 |
++ if (clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0) |
47 |
++ get_internal_run_time = get_internal_run_time_posix_timer; |
48 |
++#else |
49 |
+ clockid_t dummy; |
50 |
+ |
51 |
+ /* Only use the _POSIX_CPUTIME clock if it's going to work across |
52 |
+@@ -839,6 +843,7 @@ |
53 |
+ get_internal_run_time = get_internal_run_time_posix_timer; |
54 |
+ else |
55 |
+ errno = 0; |
56 |
++#endif |
57 |
+ } |
58 |
+ #endif /* HAVE_POSIX_CPUTIME */ |
59 |
+ #endif /* HAVE_CLOCKTIME */ |
60 |
|
61 |
diff --git a/dev-scheme/guile/guile-2.0.14.ebuild b/dev-scheme/guile/guile-2.0.14.ebuild |
62 |
index 78edbb0f216..6be23f4049e 100644 |
63 |
--- a/dev-scheme/guile/guile-2.0.14.ebuild |
64 |
+++ b/dev-scheme/guile/guile-2.0.14.ebuild |
65 |
@@ -32,7 +32,10 @@ MAJOR="2.0" |
66 |
|
67 |
DOCS=( GUILE-VERSION HACKING README ) |
68 |
|
69 |
-PATCHES=( "${FILESDIR}/${PN}-2-snarf.patch" ) |
70 |
+PATCHES=( |
71 |
+ "${FILESDIR}/${PN}-2-snarf.patch" |
72 |
+ "${FILESDIR}/${P}-darwin.patch" |
73 |
+) |
74 |
|
75 |
src_prepare() { |
76 |
default |