Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/, sys-devel/m4/files/
Date: Sun, 12 Nov 2017 12:10:22
Message-Id: 1510488614.aaaa952fdeda1fa2f7c7a61f21063fd42c9d47c6.grobian@gentoo
1 commit: aaaa952fdeda1fa2f7c7a61f21063fd42c9d47c6
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 12 12:09:58 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 12 12:10:14 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaaa952f
7
8 sys-devel/m4: 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 .../m4/files/m4-1.4.18-darwin17-printf-n.patch | 30 ++++++++++++++++++++++
13 sys-devel/m4/m4-1.4.18.ebuild | 7 +++++
14 2 files changed, 37 insertions(+)
15
16 diff --git a/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch b/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch
17 new file mode 100644
18 index 00000000000..1c77ed773c2
19 --- /dev/null
20 +++ b/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch
21 @@ -0,0 +1,30 @@
22 +http://lists.gnu.org/archive/html/bug-gnulib/2017-07/txtmumXtpD69v.txt
23 +
24 +extract of only the relevant hunk to avoid irrelevant conflicts
25 +
26 +From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001
27 +From: Paul Eggert <address@hidden>
28 +Date: Fri, 7 Jul 2017 14:10:20 -0700
29 +Subject: [PATCH] vasnprintf: port to macOS 10.13
30 +
31 +Problem reported by comex in:
32 +http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html
33 +* lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
34 +
35 +diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
36 +index 9c2af0e..fecaf27 100644
37 +--- a/lib/vasnprintf.c
38 ++++ b/lib/vasnprintf.c
39 +@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
40 + #endif
41 + *fbp = dp->conversion;
42 + #if USE_SNPRINTF
43 +-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
44 ++# if ! (((__GLIBC__ > 2 \
45 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
46 ++ && !defined __UCLIBC__) \
47 ++ || (defined __APPLE__ && defined __MACH__) \
48 ++ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
49 + fbp[1] = '%';
50 + fbp[2] = 'n';
51 + fbp[3] = '\0';
52
53 diff --git a/sys-devel/m4/m4-1.4.18.ebuild b/sys-devel/m4/m4-1.4.18.ebuild
54 index 1bb440ec6f2..f249374d1d2 100644
55 --- a/sys-devel/m4/m4-1.4.18.ebuild
56 +++ b/sys-devel/m4/m4-1.4.18.ebuild
57 @@ -3,6 +3,8 @@
58
59 EAPI="5"
60
61 +inherit eutils
62 +
63 DESCRIPTION="GNU macro processor"
64 HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
65 SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
66 @@ -16,6 +18,11 @@ IUSE="examples"
67 DEPEND="app-arch/xz-utils"
68 RDEPEND=""
69
70 +src_prepare() {
71 + epatch "${FILESDIR}"/${P}-darwin17-printf-n.patch
72 + default
73 +}
74 +
75 src_configure() {
76 # Disable automagic dependency over libsigsegv; see bug #278026
77 export ac_cv_libsigsegv=no