From 638a72c75b7c4c0cd3c524ccf138e00b30732055 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Oct 2015 23:18:49 -0400 Subject: [PATCH 1/3] dev-libs/glib: add various cross-compile settings The upstream configure script has many tests that fail when cross-compiling, so add proper settings until the upstream bugs are resolved. --- dev-libs/glib/glib-2.44.1-r1.ebuild | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dev-libs/glib/glib-2.44.1-r1.ebuild b/dev-libs/glib/glib-2.44.1-r1.ebuild index 9534f7adb4f54..d5302bc47c264 100644 --- a/dev-libs/glib/glib-2.44.1-r1.ebuild +++ b/dev-libs/glib/glib-2.44.1-r1.ebuild @@ -182,6 +182,19 @@ multilib_src_configure() { export LIBFFI_LIBS="-lffi" fi + # These configure tests don't work when cross-compiling. + if tc-is-cross-compiler ; then + # https://bugzilla.gnome.org/show_bug.cgi?id=756473 + case ${CHOST} in + hppa*|metag*) export glib_cv_stack_grows=yes ;; + *) export glib_cv_stack_grows=no ;; + esac + # https://bugzilla.gnome.org/show_bug.cgi?id=756474 + export glib_cv_uscore=no + # https://bugzilla.gnome.org/show_bug.cgi?id=756475 + export ac_cv_func_posix_get{pwuid,grgid}_r=yes + fi + local myconf case "${CHOST}" in From c9a77e1ab93d5af9968d3e449569832aff61c2df Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Oct 2015 23:23:40 -0400 Subject: [PATCH 2/3] dev-libs/glib: fix builds w/newer bionic versions --- .../glib/files/glib-2.44.1-bionic-nameser.patch | 15 +++++++++++++++ dev-libs/glib/glib-2.44.1-r1.ebuild | 2 ++ 2 files changed, 17 insertions(+) create mode 100644 dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch diff --git a/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch b/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch new file mode 100644 index 0000000000000..259b5720c1270 --- /dev/null +++ b/dev-libs/glib/files/glib-2.44.1-bionic-nameser.patch @@ -0,0 +1,15 @@ +https://bugzilla.gnome.org/756477 + +fix build w/newer releases of bionic (android) + +--- a/gio/gthreadedresolver.c ++++ b/gio/gthreadedresolver.c +@@ -263,7 +263,7 @@ lookup_by_address_finish (GResolver *resolver, + + #if defined(G_OS_UNIX) + +-#ifdef __BIONIC__ ++#if defined __BIONIC__ && !defined BIND_4_COMPAT + /* Copy from bionic/libc/private/arpa_nameser_compat.h + * and bionic/libc/private/arpa_nameser.h */ + typedef struct { diff --git a/dev-libs/glib/glib-2.44.1-r1.ebuild b/dev-libs/glib/glib-2.44.1-r1.ebuild index d5302bc47c264..25be8706448d2 100644 --- a/dev-libs/glib/glib-2.44.1-r1.ebuild +++ b/dev-libs/glib/glib-2.44.1-r1.ebuild @@ -151,6 +151,8 @@ src_prepare() { # gdbus-codegen is a separate package epatch "${FILESDIR}/${PN}-2.40.0-external-gdbus-codegen.patch" + epatch "${FILESDIR}/${PN}-2.44.1-bionic-nameser.patch" + # leave python shebang alone sed -e '/${PYTHON}/d' \ -i glib/Makefile.{am,in} || die From fbc240f551b32a009511d34ac5c3fd7c15ef82b9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Oct 2015 23:32:49 -0400 Subject: [PATCH 3/3] dev-libs/libintl: fix build in bionic systems --- .../files/libintl-0.19.5-langinfo.patch | 35 +++++++++++++++++++ dev-libs/libintl/libintl-0.19.6.ebuild | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 dev-libs/libintl/files/libintl-0.19.5-langinfo.patch diff --git a/dev-libs/libintl/files/libintl-0.19.5-langinfo.patch b/dev-libs/libintl/files/libintl-0.19.5-langinfo.patch new file mode 100644 index 0000000000000..bf96e69f924ca --- /dev/null +++ b/dev-libs/libintl/files/libintl-0.19.5-langinfo.patch @@ -0,0 +1,35 @@ +this has been sent upstream + +From eac944b0757963ac1ba035ea72617734510ede22 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 12 Oct 2015 17:58:51 -0400 +Subject: [PATCH] intl/localename: control langinfo.h inclusion + +This header is only used to work around buggy behavior in old versions +of glibc, so do not include it all the time. Otherwise we get build +failures on systems that do not provide langinfo.h. + +* gettext-runtime/intl/localename.c: Wrap langinfo.h include with same +ifdefs used in the source later on. +--- + gettext-runtime/intl/localename.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c +index f8cf3f2..c27be86 100644 +--- a/gettext-runtime/intl/localename.c ++++ b/gettext-runtime/intl/localename.c +@@ -38,7 +38,9 @@ + # if defined __APPLE__ && defined __MACH__ + # include + # endif +-# include ++# if __GLIBC__ >= 2 && !defined __UCLIBC__ ++# include ++# endif + # if !defined IN_LIBINTL + # include "glthread/lock.h" + # endif +-- +2.5.2 + diff --git a/dev-libs/libintl/libintl-0.19.6.ebuild b/dev-libs/libintl/libintl-0.19.6.ebuild index 5c788265faa7e..a8fbdaca3c5fe 100644 --- a/dev-libs/libintl/libintl-0.19.6.ebuild +++ b/dev-libs/libintl/libintl-0.19.6.ebuild @@ -28,6 +28,8 @@ RDEPEND="${DEPEND} S="${WORKDIR}/${MY_P}/gettext-runtime" src_prepare() { + epatch "${FILESDIR}"/${PN}-0.19.5-langinfo.patch + # The libtool files are stored higher up, so make sure we run in the # whole tree and not just the subdir we build. elibtoolize "${WORKDIR}"