diff options
author | fftmp | 2022-10-19 20:09:41 +0400 |
---|---|---|
committer | fftmp | 2022-10-19 23:37:11 +0400 |
commit | a656c708c389c045d0f073ccd2326d7803c9068d (patch) | |
tree | 8e76c5ed68627d1349b575c15ce723da76e13e9f | |
download | aur-a656c708c389c045d0f073ccd2326d7803c9068d.tar.gz |
based on PKGBUILD from stable 1.7 version
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 57 | ||||
-rw-r--r-- | dont_override_external_buildflags | 21 | ||||
-rw-r--r-- | fix-apr.pc.patch | 20 | ||||
-rw-r--r-- | omit_extra_libs.patch | 20 | ||||
-rw-r--r-- | ship_find_apr.m4.patch | 25 |
7 files changed, 169 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..72d366c36f06 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = apr-2-svn + pkgdesc = Apache Portable Runtime library. This is version 2 from SVN trunk, possibly unstable. + pkgver = r1904699 + pkgrel = 1 + url = https://apr.apache.org/ + arch = x86_64 + license = APACHE + makedepends = svn + optdepends = python + optdepends = sqlite + source = apr-2-svn::svn+https://svn.apache.org/repos/asf/apr/apr/trunk/ + source = ship_find_apr.m4.patch + source = fix-apr.pc.patch + source = omit_extra_libs.patch + source = dont_override_external_buildflags + sha256sums = SKIP + sha256sums = 315932ef6536fc0644c1efe770ceb3bb675c3c7103a7cbb2f02efd8be03eb752 + sha256sums = 12595d331b48be9e44bd843635eb4f0f500bd213e197a551a9d383a28a24641f + sha256sums = 3d491d3af8fb5a75db4e085a17e5d8dcbe058bd256ef893ee779dc97fc9f8ad6 + sha256sums = 5ac0bdc532479f6082d29115ac9d3ca24524fd8b97a556568755b88e5a68e3df + +pkgname = apr-2-svn diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f866f2f9ff10 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src +pkg +apr-2-svn/ +*.pkg.tar.zst diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f58efb16f272 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: fft + +pkgname=apr-2-svn +pkgver=r1904699 +pkgrel=1 +pkgdesc='Apache Portable Runtime library. This is version 2 from SVN trunk, possibly unstable.' +arch=('x86_64') +url='https://apr.apache.org/' +makedepends=('svn') +optdepends=('python' 'sqlite') +license=('APACHE') +source=("${pkgname}::svn+https://svn.apache.org/repos/asf/apr/apr/trunk/" + 'ship_find_apr.m4.patch' + 'fix-apr.pc.patch' + 'omit_extra_libs.patch' + 'dont_override_external_buildflags') +sha256sums=('SKIP' + '315932ef6536fc0644c1efe770ceb3bb675c3c7103a7cbb2f02efd8be03eb752' + '12595d331b48be9e44bd843635eb4f0f500bd213e197a551a9d383a28a24641f' + '3d491d3af8fb5a75db4e085a17e5d8dcbe058bd256ef893ee779dc97fc9f8ad6' + '5ac0bdc532479f6082d29115ac9d3ca24524fd8b97a556568755b88e5a68e3df') + +pkgver() { + cd "${pkgname}" + local ver="$(svnversion)" + printf "r%s" "${ver//[[:alpha:]]}" +} + +prepare() { + cd "${pkgname}" + 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 + ./buildconf +} + +build() { + cd "${pkgname}" + ./configure --prefix=/usr --includedir=/usr/include/apr-2 \ + --with-installbuilddir=/usr/share/apr-2/build \ + --enable-nonportable-atomics \ + --with-devrandom=/dev/urandom --disable-static + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make +} + +check() { + cd "${pkgname}" + make -j1 check +} + +package() { + cd "${pkgname}" + make DESTDIR="${pkgdir}" install + rm "${pkgdir}/usr/lib/apr.exp" # conflict with apr package and seems useless on linux +} diff --git a/dont_override_external_buildflags b/dont_override_external_buildflags new file mode 100644 index 000000000000..db30a810dc7e --- /dev/null +++ b/dont_override_external_buildflags @@ -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_* diff --git a/fix-apr.pc.patch b/fix-apr.pc.patch new file mode 100644 index 000000000000..890b51433192 --- /dev/null +++ b/fix-apr.pc.patch @@ -0,0 +1,20 @@ +From: <tfheen@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} diff --git a/omit_extra_libs.patch b/omit_extra_libs.patch new file mode 100644 index 000000000000..524602e8ca4d --- /dev/null +++ b/omit_extra_libs.patch @@ -0,0 +1,20 @@ +From: Stefan Fritsch <sf@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)" diff --git a/ship_find_apr.m4.patch b/ship_find_apr.m4.patch new file mode 100644 index 000000000000..03939706240d --- /dev/null +++ b/ship_find_apr.m4.patch @@ -0,0 +1,25 @@ +From: Tollef Fog Heen <tfheen@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 ); \ |