summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2017-06-20 20:17:49 +0200
committerSebastian Pipping <sping@gentoo.org>2017-06-20 20:28:07 +0200
commit723ffbdf98c2d72dd9a2747c9abe9aa23c46e3ec (patch)
treeed27c65afad27ef9c5bb0dc22eaa9dea534f62c6 /dev-libs
parentx11-plugins/enigmail: stabilize 1.9.7 on amd (diff)
downloadgentoo-723ffbdf98c2d72dd9a2747c9abe9aa23c46e3ec.tar.gz
gentoo-723ffbdf98c2d72dd9a2747c9abe9aa23c46e3ec.tar.bz2
gentoo-723ffbdf98c2d72dd9a2747c9abe9aa23c46e3ec.zip
dev-libs/expat: Fix compilation (bug #622274)
https://github.com/libexpat/libexpat/pull/49 https://github.com/libexpat/libexpat/issues/50 Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/expat/expat-2.2.1.ebuild9
-rw-r--r--dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch24
-rw-r--r--dev-libs/expat/files/expat-2.2.1-posix-shell.patch26
3 files changed, 58 insertions, 1 deletions
diff --git a/dev-libs/expat/expat-2.2.1.ebuild b/dev-libs/expat/expat-2.2.1.ebuild
index c67a04109bcc..123ec5b76b69 100644
--- a/dev-libs/expat/expat-2.2.1.ebuild
+++ b/dev-libs/expat/expat-2.2.1.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
+inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal
DESCRIPTION="Stream-oriented XML parser library"
HOMEPAGE="http://expat.sourceforge.net/"
@@ -17,6 +17,13 @@ RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
DOCS=( AUTHORS Changes README )
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-getrandom-detection.patch
+ epatch "${FILESDIR}"/${P}-posix-shell.patch
+ eapply_user
+ eautoreconf
+}
+
multilib_src_configure() {
local myconf="$(use_enable static-libs static)"
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
new file mode 100644
index 000000000000..eba004843db6
--- /dev/null
+++ b/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch
@@ -0,0 +1,24 @@
+From 602e6c78ca750c082b72f8cdf4a38839b312959f Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 18 Jun 2017 18:55:10 +0200
+Subject: [PATCH] configure.ac: Fix mis-detection of getrandom on Debian
+ GNU/kFreeBSD (#50)
+
+There is no such thing but we need to link (not just compile) to realize.
+---
+ expat/configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/expat/configure.ac b/expat/configure.ac
+index 1357c9a..444c002 100644
+--- a/expat/configure.ac
++++ b/expat/configure.ac
+@@ -130,7 +130,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
+
+
+ AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
+-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
++AC_LINK_IFELSE([AC_LANG_SOURCE([
+ #include <stdlib.h> /* for NULL */
+ #include <sys/random.h>
+ int main() {
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
new file mode 100644
index 000000000000..3f34d0d9853b
--- /dev/null
+++ b/dev-libs/expat/files/expat-2.2.1-posix-shell.patch
@@ -0,0 +1,26 @@
+From e5e25fac1698d9ea8dbb2e51c18d1072254b5f4b Mon Sep 17 00:00:00 2001
+From: spzeidler <spz@netbsd.org>
+Date: Sun, 18 Jun 2017 14:30:22 +0200
+Subject: [PATCH] Fix sh syntax in configure.ac (#49)
+
+The old '==' sh-is-not-C issue
+It doesn't matter in bash, but some other sh don't like it, so it's a portability issue
+---
+ expat/configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/expat/configure.ac b/expat/configure.ac
+index e48c32e..1357c9a 100644
+--- a/expat/configure.ac
++++ b/expat/configure.ac
+@@ -220,8 +220,8 @@ AS_HELP_STRING([--disable-xml-context],
+ [Do not retain context around the current parse point]),
+ [enable_xml_context=${enableval}])
+ AS_IF([test "x${enable_xml_context}" != "xno"], [
+- AS_IF([test "x${enable_xml_context}" == "xyes" \
+- -o "x${enable_xml_context}" == "x"], [
++ AS_IF([test "x${enable_xml_context}" = "xyes" \
++ -o "x${enable_xml_context}" = "x"], [
+ enable_xml_context=1024
+ ])
+ AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}],