summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-01-22 22:27:42 +0000
committerMike Frysinger <vapier@gentoo.org>2014-01-22 22:27:42 +0000
commit68edc6b11819c05c0418ad09d2b2fbd84d50258e (patch)
tree583dcc67bb4a89f2b5a8719598e39c9f298eb3cf /dev-libs/apr
parentlibquvi is available stable on ia64 (diff)
downloadgentoo-2-68edc6b11819c05c0418ad09d2b2fbd84d50258e.tar.gz
gentoo-2-68edc6b11819c05c0418ad09d2b2fbd84d50258e.tar.bz2
gentoo-2-68edc6b11819c05c0418ad09d2b2fbd84d50258e.zip
Fix cross-compiling.
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'dev-libs/apr')
-rw-r--r--dev-libs/apr/ChangeLog6
-rw-r--r--dev-libs/apr/apr-1.5.0-r1.ebuild11
-rw-r--r--dev-libs/apr/files/apr-1.5.0-cross-types.patch63
3 files changed, 78 insertions, 2 deletions
diff --git a/dev-libs/apr/ChangeLog b/dev-libs/apr/ChangeLog
index 76e3e5d0ddf3..ac318d5e48a6 100644
--- a/dev-libs/apr/ChangeLog
+++ b/dev-libs/apr/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/apr
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr/ChangeLog,v 1.205 2014/01/22 21:33:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr/ChangeLog,v 1.206 2014/01/22 22:27:42 vapier Exp $
+
+ 22 Jan 2014; Mike Frysinger <vapier@gentoo.org>
+ +files/apr-1.5.0-cross-types.patch, apr-1.5.0-r1.ebuild:
+ Fix cross-compiling.
22 Jan 2014; Mike Frysinger <vapier@gentoo.org> apr-1.5.0-r1.ebuild:
fix typo
diff --git a/dev-libs/apr/apr-1.5.0-r1.ebuild b/dev-libs/apr/apr-1.5.0-r1.ebuild
index 3d81f4345a7d..97f54060f4e8 100644
--- a/dev-libs/apr/apr-1.5.0-r1.ebuild
+++ b/dev-libs/apr/apr-1.5.0-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr/apr-1.5.0-r1.ebuild,v 1.2 2014/01/22 21:33:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr/apr-1.5.0-r1.ebuild,v 1.3 2014/01/22 22:27:42 vapier Exp $
EAPI="4"
@@ -25,6 +25,7 @@ DOCS=(CHANGES NOTICE README)
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.5.0-mint.patch
epatch "${FILESDIR}"/${PN}-1.5.0-libtool.patch
+ epatch "${FILESDIR}"/${PN}-1.5.0-cross-types.patch
# Apply user patches, bug #449048
epatch_user
@@ -87,6 +88,14 @@ src_configure() {
}
src_compile() {
+ if tc-is-cross-compiler; then
+ # This header is the same across targets, so use the build compiler.
+ emake tools/gen_test_char
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \
+ tools/gen_test_char.c -o tools/gen_test_char || die
+ fi
+
emake
if use doc; then
diff --git a/dev-libs/apr/files/apr-1.5.0-cross-types.patch b/dev-libs/apr/files/apr-1.5.0-cross-types.patch
new file mode 100644
index 000000000000..266e5676817f
--- /dev/null
+++ b/dev-libs/apr/files/apr-1.5.0-cross-types.patch
@@ -0,0 +1,63 @@
+use standard AC_CHECK_SIZEOF as it supports non-builtin types and
+supports cross-compiling sanely
+
+https://issues.apache.org/bugzilla/show_bug.cgi?id=56053
+
+--- a/configure.in
++++ b/configure.in
+@@ -1684,7 +1684,7 @@ else
+ socklen_t_value="int"
+ fi
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
++AC_CHECK_SIZEOF(pid_t)
+
+ if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
+ pid_t_fmt='#define APR_PID_T_FMT "hd"'
+@@ -1753,7 +1753,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
++AC_CHECK_SIZEOF(ssize_t)
+
+ AC_MSG_CHECKING([which format to use for apr_ssize_t])
+ if test -n "$ssize_t_fmt"; then
+@@ -1770,7 +1770,7 @@ fi
+
+ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
++AC_CHECK_SIZEOF(size_t)
+
+ AC_MSG_CHECKING([which format to use for apr_size_t])
+ if test -n "$size_t_fmt"; then
+@@ -1787,7 +1787,7 @@ fi
+
+ size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
++AC_CHECK_SIZEOF(off_t)
+
+ if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
+ # Enable LFS
+@@ -1866,7 +1866,7 @@ case $host in
+ ;;
+ *)
+ ino_t_value=ino_t
+- APR_CHECK_SIZEOF_EXTENDED(AC_INCLUDES_DEFAULT, ino_t, $ac_cv_sizeof_long)
++ AC_CHECK_SIZEOF(ino_t)
+ if test $ac_cv_sizeof_ino_t = 4; then
+ if test $ac_cv_sizeof_long = 4; then
+ ino_t_value="unsigned long"
+@@ -1886,8 +1886,8 @@ else
+ bigendian=0
+ fi
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
+-#include <sys/uio.h>],struct iovec,0)
++AC_CHECK_SIZEOF(struct iovec,,[AC_INCLUDES_DEFAULT
++#include <sys/uio.h>])
+ if test "$ac_cv_sizeof_struct_iovec" = "0"; then
+ have_iovec=0
+ else