1 |
commit: 763c0d847edc3bb5b61ee77123cdfabbc3405b1d |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 12 12:20:31 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 12 12:20:31 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=763c0d84 |
7 |
|
8 |
sys-devel/bison: add patch to fix crash at runtime on Darwin 17, bug #632500 |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
sys-devel/bison/bison-3.0.4-r1.ebuild | 1 + |
13 |
.../files/bison-3.0.4-darwin17-printf-n.patch | 30 ++++++++++++++++++++++ |
14 |
2 files changed, 31 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/bison/bison-3.0.4-r1.ebuild b/sys-devel/bison/bison-3.0.4-r1.ebuild |
17 |
index c20e7436f01..ab8dcc62aa6 100644 |
18 |
--- a/sys-devel/bison/bison-3.0.4-r1.ebuild |
19 |
+++ b/sys-devel/bison/bison-3.0.4-r1.ebuild |
20 |
@@ -25,6 +25,7 @@ DOCS=( AUTHORS ChangeLog-2012 NEWS README THANKS TODO ) # ChangeLog-1998 PACKAGI |
21 |
|
22 |
src_prepare() { |
23 |
epatch "${FILESDIR}"/${P}-optional-perl.patch #538300 |
24 |
+ epatch "${FILESDIR}"/${P}-darwin17-printf-n.patch #632500 |
25 |
# The makefiles make the man page depend on the configure script |
26 |
# which we patched above. Touch it to prevent regeneration. |
27 |
touch doc/bison.1 #548778 #538300#9 |
28 |
|
29 |
diff --git a/sys-devel/bison/files/bison-3.0.4-darwin17-printf-n.patch b/sys-devel/bison/files/bison-3.0.4-darwin17-printf-n.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..1c77ed773c2 |
32 |
--- /dev/null |
33 |
+++ b/sys-devel/bison/files/bison-3.0.4-darwin17-printf-n.patch |
34 |
@@ -0,0 +1,30 @@ |
35 |
+http://lists.gnu.org/archive/html/bug-gnulib/2017-07/txtmumXtpD69v.txt |
36 |
+ |
37 |
+extract of only the relevant hunk to avoid irrelevant conflicts |
38 |
+ |
39 |
+From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001 |
40 |
+From: Paul Eggert <address@hidden> |
41 |
+Date: Fri, 7 Jul 2017 14:10:20 -0700 |
42 |
+Subject: [PATCH] vasnprintf: port to macOS 10.13 |
43 |
+ |
44 |
+Problem reported by comex in: |
45 |
+http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html |
46 |
+* lib/vasnprintf.c (VASNPRINTF): Donât use %n on macOS. |
47 |
+ |
48 |
+diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c |
49 |
+index 9c2af0e..fecaf27 100644 |
50 |
+--- a/lib/vasnprintf.c |
51 |
++++ b/lib/vasnprintf.c |
52 |
+@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, |
53 |
+ #endif |
54 |
+ *fbp = dp->conversion; |
55 |
+ #if USE_SNPRINTF |
56 |
+-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) |
57 |
++# if ! (((__GLIBC__ > 2 \ |
58 |
++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ |
59 |
++ && !defined __UCLIBC__) \ |
60 |
++ || (defined __APPLE__ && defined __MACH__) \ |
61 |
++ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) |
62 |
+ fbp[1] = '%'; |
63 |
+ fbp[2] = 'n'; |
64 |
+ fbp[3] = '\0'; |