1 |
commit: 723ffbdf98c2d72dd9a2747c9abe9aa23c46e3ec |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 20 18:17:49 2017 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 20 18:28:07 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=723ffbdf |
7 |
|
8 |
dev-libs/expat: Fix compilation (bug #622274) |
9 |
|
10 |
https://github.com/libexpat/libexpat/pull/49 |
11 |
https://github.com/libexpat/libexpat/issues/50 |
12 |
|
13 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
14 |
|
15 |
dev-libs/expat/expat-2.2.1.ebuild | 9 +++++++- |
16 |
.../files/expat-2.2.1-getrandom-detection.patch | 24 ++++++++++++++++++++ |
17 |
dev-libs/expat/files/expat-2.2.1-posix-shell.patch | 26 ++++++++++++++++++++++ |
18 |
3 files changed, 58 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/dev-libs/expat/expat-2.2.1.ebuild b/dev-libs/expat/expat-2.2.1.ebuild |
21 |
index c67a04109bc..123ec5b76b6 100644 |
22 |
--- a/dev-libs/expat/expat-2.2.1.ebuild |
23 |
+++ b/dev-libs/expat/expat-2.2.1.ebuild |
24 |
@@ -2,7 +2,7 @@ |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=6 |
28 |
-inherit eutils libtool multilib toolchain-funcs multilib-minimal |
29 |
+inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal |
30 |
|
31 |
DESCRIPTION="Stream-oriented XML parser library" |
32 |
HOMEPAGE="http://expat.sourceforge.net/" |
33 |
@@ -17,6 +17,13 @@ RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6 |
34 |
|
35 |
DOCS=( AUTHORS Changes README ) |
36 |
|
37 |
+src_prepare() { |
38 |
+ epatch "${FILESDIR}"/${P}-getrandom-detection.patch |
39 |
+ epatch "${FILESDIR}"/${P}-posix-shell.patch |
40 |
+ eapply_user |
41 |
+ eautoreconf |
42 |
+} |
43 |
+ |
44 |
multilib_src_configure() { |
45 |
local myconf="$(use_enable static-libs static)" |
46 |
|
47 |
|
48 |
diff --git a/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch b/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch |
49 |
new file mode 100644 |
50 |
index 00000000000..eba004843db |
51 |
--- /dev/null |
52 |
+++ b/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch |
53 |
@@ -0,0 +1,24 @@ |
54 |
+From 602e6c78ca750c082b72f8cdf4a38839b312959f Mon Sep 17 00:00:00 2001 |
55 |
+From: Sebastian Pipping <sebastian@×××××××.org> |
56 |
+Date: Sun, 18 Jun 2017 18:55:10 +0200 |
57 |
+Subject: [PATCH] configure.ac: Fix mis-detection of getrandom on Debian |
58 |
+ GNU/kFreeBSD (#50) |
59 |
+ |
60 |
+There is no such thing but we need to link (not just compile) to realize. |
61 |
+--- |
62 |
+ expat/configure.ac | 2 +- |
63 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
64 |
+ |
65 |
+diff --git a/expat/configure.ac b/expat/configure.ac |
66 |
+index 1357c9a..444c002 100644 |
67 |
+--- a/expat/configure.ac |
68 |
++++ b/expat/configure.ac |
69 |
+@@ -130,7 +130,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([ |
70 |
+ |
71 |
+ |
72 |
+ AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)]) |
73 |
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
74 |
++AC_LINK_IFELSE([AC_LANG_SOURCE([ |
75 |
+ #include <stdlib.h> /* for NULL */ |
76 |
+ #include <sys/random.h> |
77 |
+ int main() { |
78 |
|
79 |
diff --git a/dev-libs/expat/files/expat-2.2.1-posix-shell.patch b/dev-libs/expat/files/expat-2.2.1-posix-shell.patch |
80 |
new file mode 100644 |
81 |
index 00000000000..3f34d0d9853 |
82 |
--- /dev/null |
83 |
+++ b/dev-libs/expat/files/expat-2.2.1-posix-shell.patch |
84 |
@@ -0,0 +1,26 @@ |
85 |
+From e5e25fac1698d9ea8dbb2e51c18d1072254b5f4b Mon Sep 17 00:00:00 2001 |
86 |
+From: spzeidler <spz@××××××.org> |
87 |
+Date: Sun, 18 Jun 2017 14:30:22 +0200 |
88 |
+Subject: [PATCH] Fix sh syntax in configure.ac (#49) |
89 |
+ |
90 |
+The old '==' sh-is-not-C issue |
91 |
+It doesn't matter in bash, but some other sh don't like it, so it's a portability issue |
92 |
+--- |
93 |
+ expat/configure.ac | 4 ++-- |
94 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
95 |
+ |
96 |
+diff --git a/expat/configure.ac b/expat/configure.ac |
97 |
+index e48c32e..1357c9a 100644 |
98 |
+--- a/expat/configure.ac |
99 |
++++ b/expat/configure.ac |
100 |
+@@ -220,8 +220,8 @@ AS_HELP_STRING([--disable-xml-context], |
101 |
+ [Do not retain context around the current parse point]), |
102 |
+ [enable_xml_context=${enableval}]) |
103 |
+ AS_IF([test "x${enable_xml_context}" != "xno"], [ |
104 |
+- AS_IF([test "x${enable_xml_context}" == "xyes" \ |
105 |
+- -o "x${enable_xml_context}" == "x"], [ |
106 |
++ AS_IF([test "x${enable_xml_context}" = "xyes" \ |
107 |
++ -o "x${enable_xml_context}" = "x"], [ |
108 |
+ enable_xml_context=1024 |
109 |
+ ]) |
110 |
+ AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}], |