diff -Nru apr-1.4.6/debian/changelog apr-1.4.6/debian/changelog --- apr-1.4.6/debian/changelog 2012-05-28 14:02:12.000000000 +0000 +++ apr-1.4.6/debian/changelog 2012-12-05 15:24:50.000000000 +0000 @@ -1,3 +1,13 @@ +apr (1.4.6-3ubuntu1) raring; urgency=low + + * Make APR more cross-build friendly by fixing/mangling a few things: + - Fix the confusion between HOST and BUILD variables in rules. + - Fix a thinko using shell-style subshells instead of make-style. + - Don't try to run native ino_t_test.c when cross-compiling. + - Add a set of autoconf preseeds that are only used when crossing. + + -- Adam Conrad Wed, 05 Dec 2012 06:49:57 -0700 + apr (1.4.6-3) unstable; urgency=low * Fix some issues with resolving loopback addresses of a protocol family diff -Nru apr-1.4.6/debian/control apr-1.4.6/debian/control --- apr-1.4.6/debian/control 2012-05-18 22:42:51.000000000 +0000 +++ apr-1.4.6/debian/control 2012-12-05 13:50:08.000000000 +0000 @@ -1,7 +1,8 @@ Source: apr Section: libs Priority: optional -Maintainer: Debian Apache Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Apache Maintainers Uploaders: Peter Samuelson , Stefan Fritsch Build-Depends: debhelper (>= 9), autoconf, autotools-dev, mawk, uuid-dev, doxygen, netbase, net-tools, libtool (>= 2), python Standards-Version: 3.9.3 diff -Nru apr-1.4.6/debian/rules apr-1.4.6/debian/rules --- apr-1.4.6/debian/rules 2012-05-19 14:06:37.000000000 +0000 +++ apr-1.4.6/debian/rules 2012-12-05 15:39:21.000000000 +0000 @@ -5,12 +5,13 @@ # These are used for cross-compiling and for saving the configure script # # from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) -DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) -DEB_BUILD_ARCH_OS ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS) -BUILDDIR := build-$(DEB_BUILD_ARCH) +BUILDDIR := build-$(DEB_HOST_ARCH) CFLAGS := $(CFLAGS) -pipe -Wall -g @@ -19,21 +20,34 @@ H_LDFLAGS := -Wl,-z,relro CONFFLAGS += ac_cv_prog_AWK=mawk apr_cv_sctp=no +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CONFFLAGS += ac_cv_file__dev_zero=yes \ + ac_cv_func_setpgrp_void=yes \ + apr_cv_epoll=yes \ + ac_cv_struct_rlimit=yes \ + apr_cv_tcp_nodelay_with_cork=yes \ + apr_cv_process_shared_works=yes + ifeq ($(DEB_HOST_ARCH_BITS),32) + CONFFLAGS += ac_cv_sizeof_struct_iovec=8 + else ifeq ($(DEB_HOST_ARCH_BITS),64) + CONFFLAGS += ac_cv_sizeof_struct_iovec=16 + endif +endif # apr_cv_mutex_robust_shared causes hangs in procmutex test on arm(el|hf) and alpha # let's just disable this for squeeze -ifneq (,$(findstring armel,$(DEB_BUILD_ARCH))) +ifneq (,$(findstring armel,$(DEB_HOST_ARCH))) CONFFLAGS += apr_cv_mutex_robust_shared=no endif -ifneq (,$(findstring armhf,$(DEB_BUILD_ARCH))) +ifneq (,$(findstring armhf,$(DEB_HOST_ARCH))) CONFFLAGS += apr_cv_mutex_robust_shared=no endif -ifneq (,$(findstring alpha,$(DEB_BUILD_ARCH))) +ifneq (,$(findstring alpha,$(DEB_HOST_ARCH))) CONFFLAGS += apr_cv_mutex_robust_shared=no endif # SH4 cannot use proc_pthread. -ifneq (,$(findstring sh4,$(DEB_BUILD_ARCH))) +ifneq (,$(findstring sh4,$(DEB_HOST_ARCH))) CONFFLAGS += apr_cv_hasprocpthreadser=no ac_cv_define_PTHREAD_PROCESS_SHARED=no endif @@ -69,20 +83,22 @@ # /bin/sh -> /bin/bash, the resulting libtool will not work on systems # where /bin/sh -> /bin/dash cd $(BUILDDIR) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(CONFFLAGS) CONFIG_SHELL=/bin/bash /bin/bash ../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --enable-layout=Debian --includedir=\$${prefix}/usr/include/apr-1.0 --with-installbuilddir=\$${prefix}/usr/share/apr-1.0/build --enable-nonportable-atomics --enable-allocator-uses-mmap - # Determine whether upstream's configure gives the same definition of apr_ino_t as we had until 1.2.11-1 + # Determine whether upstream's configure gives the same definition of apr_ino_t as we had until 1.2.11-1, but only try when building natively +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) rm -f debian/ino_t_test gcc -I$(CURDIR)/include -I$(BUILDDIR)/include `$(BUILDDIR)/apr-1-config --cppflags` -o debian/ino_t_test debian/ino_t_test.c debian/ino_t_test rm -f debian/ino_t_test -ifeq (hurd, $(DEB_BUILD_ARCH_OS)) +endif +ifeq (hurd, $(DEB_HOST_ARCH_OS)) # multicast not supported on Hurd sed -i '/HAVE_STRUCT_IPMREQ/ d' $(BUILDDIR)/include/arch/unix/apr_private.h endif -ifeq (linux, $(DEB_BUILD_ARCH_OS)) +ifeq (linux, $(DEB_HOST_ARCH_OS)) if grep -q APR_HAS_POSIXSEM_SERIALIZE.*0 $(BUILDDIR)/include/apr.h ;\ then \ echo "WARNING: This is Linux but configure did not detect POSIX semaphores." ;\ - if [ "$(stat -c '%d' /dev/shm)" = "$(stat -c '%d' /dev)" ] ;\ + if [ "$(shell stat -c '%d' /dev/shm/)" = "$(shell stat -c '%d' /dev/)" ] ;\ then \ echo "ERROR: POSIX semaphores not usable and /dev/shm not mounted." ;\ echo "ERROR: Aborting." ;\ @@ -154,7 +170,7 @@ dh_lintian dh_compress dh_fixperms - dh_makeshlibs -- -Idebian/symbols.$(DEB_BUILD_ARCH_OS) + dh_makeshlibs -- -Idebian/symbols.$(DEB_HOST_ARCH_OS) dh_installdeb dh_shlibdeps dh_gencontrol