Date: Thursday, March 2, 2017 @ 22:20:50 Author: jgc Revision: 289898
upgpkg: apr 1.5.2-2 Add patches from debian Fix CFLAGS/LDFLAGS bloat Ship additional build files so we can use buildconf in apr-util Fix overlinking in libtool Added: apr/trunk/apr_mcast_v6.patch apr/trunk/dont_override_external_buildflags apr/trunk/fix-apr.pc.patch apr/trunk/fix_apr-config.patch apr/trunk/omit_extra_libs.patch apr/trunk/ship_find_apr.m4.patch Modified: apr/trunk/PKGBUILD -----------------------------------+ PKGBUILD | 37 ++++++++++++++++++++++++++++++------ apr_mcast_v6.patch | 11 ++++++++++ dont_override_external_buildflags | 21 ++++++++++++++++++++ fix-apr.pc.patch | 20 +++++++++++++++++++ fix_apr-config.patch | 33 ++++++++++++++++++++++++++++++++ omit_extra_libs.patch | 20 +++++++++++++++++++ ship_find_apr.m4.patch | 25 ++++++++++++++++++++++++ 7 files changed, 161 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2017-03-02 20:56:43 UTC (rev 289897) +++ PKGBUILD 2017-03-02 22:20:50 UTC (rev 289898) @@ -5,17 +5,43 @@ pkgname=apr pkgver=1.5.2 -pkgrel=1 +pkgrel=2 pkgdesc='The Apache Portable Runtime' arch=('i686' 'x86_64') url='http://apr.apache.org/' depends=('util-linux') +makedepends=('python2') license=('APACHE') -source=(https://www.apache.org/dist/apr/apr-$pkgver.tar.bz2{,.asc}) -sha1ums=('5486180ec5a23efb5cae6d4292b300ab' - 'SKIP') +source=(https://www.apache.org/dist/apr/apr-$pkgver.tar.bz2{,.asc} + fix_apr-config.patch + ship_find_apr.m4.patch + fix-apr.pc.patch + omit_extra_libs.patch + dont_override_external_buildflags + apr_mcast_v6.patch) +sha256sums=('7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a' + 'SKIP' + '91490ffee726f851edad9fc733ac6632aaf434a87920e706eeb132a97ee5f402' + '315932ef6536fc0644c1efe770ceb3bb675c3c7103a7cbb2f02efd8be03eb752' + '12595d331b48be9e44bd843635eb4f0f500bd213e197a551a9d383a28a24641f' + '3d491d3af8fb5a75db4e085a17e5d8dcbe058bd256ef893ee779dc97fc9f8ad6' + '5ac0bdc532479f6082d29115ac9d3ca24524fd8b97a556568755b88e5a68e3df' + '3cb473d1f0e1e27f7f4308daf15237bb886870bf444a7f44cd45ff469ac99fd2') validpgpkeys=('5B5181C2C0AB13E59DA3F7A3EC582EB639FF092C') # Jeff Trawick +prepare() { + cd apr-$pkgver + patch -Np1 -i ../fix_apr-config.patch + patch -Np1 -i ../ship_find_apr.m4.patch + patch -Np1 -i ../fix-apr.pc.patch + patch -Np1 -i ../omit_extra_libs.patch + patch -Np1 -i ../dont_override_external_buildflags + patch -Np1 -i ../apr_mcast_v6.patch + sed -e 's/env python/env python2/' -i build/gen-build.py + sed -e 's/python/python2/g' -i build/buildcheck.sh + ./buildconf +} + build() { cd apr-$pkgver ./configure --prefix=/usr --includedir=/usr/include/apr-1 \ @@ -22,6 +48,7 @@ --with-installbuilddir=/usr/share/apr-1/build \ --enable-nonportable-atomics \ --with-devrandom=/dev/urandom --disable-static + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } @@ -34,5 +61,3 @@ cd apr-$pkgver make DESTDIR="$pkgdir" install } -md5sums=('4e9769f3349fe11fc0a5e1b224c236aa' - 'SKIP') Added: apr_mcast_v6.patch =================================================================== --- apr_mcast_v6.patch (rev 0) +++ apr_mcast_v6.patch 2017-03-02 22:20:50 UTC (rev 289898) @@ -0,0 +1,11 @@ +--- apr.orig/network_io/unix/multicast.c ++++ apr/network_io/unix/multicast.c +@@ -62,7 +62,7 @@ static unsigned int find_if_index(const + for (ifp = ifs; ifp; ifp = ifp->ifa_next) { + if (ifp->ifa_addr != NULL && ifp->ifa_addr->sa_family == AF_INET6) { + if (memcmp(&iface->sa.sin6.sin6_addr, +- &ifp->ifa_addr->sa_data[0], ++ &((struct sockaddr_in6*)ifp->ifa_addr)->sin6_addr, + sizeof(iface->sa.sin6.sin6_addr)) == 0) { + index = if_nametoindex(ifp->ifa_name); + break; Added: dont_override_external_buildflags =================================================================== --- dont_override_external_buildflags (rev 0) +++ dont_override_external_buildflags 2017-03-02 22:20:50 UTC (rev 289898) @@ -0,0 +1,21 @@ +# Don't force apr-using projects to use the compile flags used during +# apr's compilation. +Index: apr/build/apr_rules.mk.in +=================================================================== +--- apr.orig/build/apr_rules.mk.in 2010-04-21 17:20:26.000000000 +0200 ++++ apr/build/apr_rules.mk.in 2013-11-01 21:22:19.655108671 +0100 +@@ -41,10 +41,10 @@ + # compilation and linking flags that are supposed to be set only by the user. + # configure adds to them for tests, but we restore them at the end. + # +-CFLAGS=@CFLAGS@ +-CPPFLAGS=@CPPFLAGS@ +-LDFLAGS=@LDFLAGS@ +-LIBS=@LIBS@ ++CFLAGS?=@CFLAGS@ ++CPPFLAGS?=@CPPFLAGS@ ++LDFLAGS?=@LDFLAGS@ ++LIBS?=@LIBS@ + DEFS=@DEFS@ + + # anything added to the standard flags by configure is moved to EXTRA_* Added: fix-apr.pc.patch =================================================================== --- fix-apr.pc.patch (rev 0) +++ fix-apr.pc.patch 2017-03-02 22:20:50 UTC (rev 289898) @@ -0,0 +1,20 @@ +From: <tfh...@debian.org> +Subject: No description. + +--- + apr.pc.in | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +Index: apr/apr.pc.in +=================================================================== +--- apr.orig/apr.pc.in ++++ apr/apr.pc.in +@@ -7,5 +7,6 @@ + Name: APR + Description: The Apache Portable Runtime library + Version: @APR_DOTTED_VERSION@ +-Libs: -L${libdir} -l@APR_LIBNAME@ @EXTRA_LIBS@ +-Cflags: @EXTRA_CPPFLAGS@ @EXTRA_CFLAGS@ -I${includedir} ++Libs: -L${libdir} -l@APR_LIBNAME@ ++Libs.private: @EXTRA_LIBS@ ++Cflags: @EXTRA_CPPFLAGS@ -I${includedir} Added: fix_apr-config.patch =================================================================== --- fix_apr-config.patch (rev 0) +++ fix_apr-config.patch 2017-03-02 22:20:50 UTC (rev 289898) @@ -0,0 +1,33 @@ +From: <tfh...@debian.org> +Subject: No description. + +--- + apr-config.in | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +Index: apr/apr-config.in +=================================================================== +--- apr.orig/apr-config.in ++++ apr/apr-config.in +@@ -39,7 +39,7 @@ + LIBS="@EXTRA_LIBS@" + EXTRA_INCLUDES="@EXTRA_INCLUDES@" + SHLIBPATH_VAR="@shlibpath_var@" +-APR_SOURCE_DIR="@apr_srcdir@" ++APR_SOURCE_DIR="$(cd @installbuilddir@/.. ; pwd)" + APR_BUILD_DIR="@apr_builddir@" + APR_SO_EXT="@so_ext@" + APR_LIB_TARGET="@export_lib_target@" +@@ -223,11 +223,7 @@ + exit 0 + ;; + --apr-libtool) +- if test "$location" = "installed"; then +- echo "${installbuilddir}/libtool" +- else +- echo "$APR_BUILD_DIR/libtool" +- fi ++ echo "$installbuilddir/libtool" + exit 0 + ;; + --help) Added: omit_extra_libs.patch =================================================================== --- omit_extra_libs.patch (rev 0) +++ omit_extra_libs.patch 2017-03-02 22:20:50 UTC (rev 289898) @@ -0,0 +1,20 @@ +From: Stefan Fritsch <s...@debian.org> +Subject: #463399 + +--- + apr-config.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: apr/apr-config.in +=================================================================== +--- apr.orig/apr-config.in ++++ apr/apr-config.in +@@ -36,7 +36,7 @@ + CPPFLAGS="@EXTRA_CPPFLAGS@" + CFLAGS="@EXTRA_CFLAGS@" + LDFLAGS="@EXTRA_LDFLAGS@" +-LIBS="@EXTRA_LIBS@" ++LIBS="" + EXTRA_INCLUDES="@EXTRA_INCLUDES@" + SHLIBPATH_VAR="@shlibpath_var@" + APR_SOURCE_DIR="$(cd @installbuilddir@/.. ; pwd)" Added: ship_find_apr.m4.patch =================================================================== --- ship_find_apr.m4.patch (rev 0) +++ ship_find_apr.m4.patch 2017-03-02 22:20:50 UTC (rev 289898) @@ -0,0 +1,25 @@ +From: Tollef Fog Heen <tfh...@err.no> +Subject: Install a set of random build files too + +--- + Makefile.in | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- apr.orig/Makefile.in ++++ apr/Makefile.in +@@ -92,6 +92,15 @@ install: $(TARGETS) + done + $(INSTALL_DATA) build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk + $(INSTALL) -m 755 apr-config.out $(DESTDIR)$(bindir)/$(APR_CONFIG) ++ ++ if [ ! -d $(DESTDIR)$(installbuilddir) ]; then \ ++ $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir); \ ++ fi ++ for file in find_apr.m4 apr_common.m4 install.sh gen-build.py get-version.sh ; do \ ++ $(LIBTOOL) --mode=install cp $(top_srcdir)/build/$$file \ ++ $(DESTDIR)$(installbuilddir)/$$file ; \ ++ done ++ + @if [ $(INSTALL_SUBDIRS) != "none" ]; then \ + for i in $(INSTALL_SUBDIRS); do \ + ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \