aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-12-30 10:28:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2020-01-02 11:23:28 +0000
commitdbb01008117805d5fe639a90b971f976e0ae5436 (patch)
tree27f9f85a2982357c3573a333756416bf711628f1
parent07ff6c1ac69c7738334063ca6c2192a06a29a644 (diff)
downloadaports-dbb01008117805d5fe639a90b971f976e0ae5436.tar.gz
aports-dbb01008117805d5fe639a90b971f976e0ae5436.tar.bz2
aports-dbb01008117805d5fe639a90b971f976e0ae5436.tar.xz
main/subversion: build with python3
-rw-r--r--main/subversion/APKBUILD35
-rw-r--r--main/subversion/subversion-1.12.0-linking.patch84
2 files changed, 107 insertions, 12 deletions
diff --git a/main/subversion/APKBUILD b/main/subversion/APKBUILD
index 54ce655c8a..207cf611c2 100644
--- a/main/subversion/APKBUILD
+++ b/main/subversion/APKBUILD
@@ -2,21 +2,22 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=subversion
pkgver=1.13.0
-pkgrel=1
+pkgrel=2
pkgdesc="Replacement for CVS, another versioning system (svn)"
url="https://subversion.apache.org/"
arch="all"
license="Apache-2.0 BSD"
makedepends="apache2-dev apr-util-dev autoconf automake e2fsprogs-dev libtool
- lz4-dev neon-dev perl-dev python2-dev serf-dev swig boost-dev"
+ lz4-dev neon-dev perl-dev python3-dev serf-dev swig boost-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc mod_dav_svn
$pkgname-bash-completion:bashcomp:noarch
- perl-$pkgname:pl py-$pkgname:py $pkgname-libs
+ perl-$pkgname:pl py3-$pkgname:py $pkgname-libs
$pkgname-openrc"
source="https://archive.apache.org/dist/subversion/$pkgname-$pkgver.tar.bz2
subversion-1.7.0-deplibs.patch
subversion-perl-deplibs.patch
+ subversion-1.12.0-linking.patch
svnserve.confd
svnserve.initd"
@@ -31,12 +32,17 @@ source="https://archive.apache.org/dist/subversion/$pkgname-$pkgver.tar.bz2
prepare() {
default_prepare
- LIBTOOL_CONFIG=/usr/share/libtool/build-aux ./autogen.sh
+ mv build-outputs.mk build-outputs.mk.old
+ PYTHON=python3 LIBTOOL_CONFIG=/usr/share/libtool/build-aux ./autogen.sh --release
+ # fix shebangs
+ sed -i -e 's|/usr/bin/env perl -w|/usr/bin/perl -w|' tools/hook-scripts/*.pl.in
+ sed -e 's|/usr/bin/env python.*|/usr/bin/python3|' subversion/tests/cmdline/svneditor.py
}
build() {
- cd "$builddir"
+ local _pydir=$(python3 -c "import sysconfig;print(sysconfig.get_path('stdlib'))")
unset CPPFLAGS
+ export PYTHON=python3
./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -63,17 +69,21 @@ build() {
subversion/bindings/swig/include/proxy.swg.tmp
mv subversion/bindings/swig/include/proxy.swg.tmp \
subversion/bindings/swig/include/proxy.swg
- make swig-py
+ make swig-py swig-py-lib \
+ swig_pydir="$_pydir/libsvn"\
+ swig_pydir_extra="$_pydir/svn"
}
check() {
- cd "$builddir"
make test
}
package() {
- cd "$builddir"
- make -j1 DESTDIR="$pkgdir" install install-swig-pl-lib install-swig-py
+ local _pydir=$(python3 -c "import sysconfig;print(sysconfig.get_path('stdlib'))")
+ make -j1 DESTDIR="$pkgdir" \
+ swig_pydir="$_pydir/libsvn"\
+ swig_pydir_extra="$_pydir/svn" \
+ install install-swig-pl-lib install-swig-py
make pure_vendor_install -C subversion/bindings/swig/perl/native \
PERL_INSTALL_ROOT="$pkgdir"
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
@@ -113,13 +123,14 @@ pl() {
py() {
pkgdesc="Python bindings to $pkgname"
mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/lib*swig*py* "$subpkgdir"/usr/lib/
- pypath=$(python2 -c 'import os; print os.path.dirname(os.__file__)')
- mv "$pkgdir"/usr/lib/*py* "${subpkgdir}${pypath}"
+ mv "$pkgdir"/usr/lib/lib*swig*py* \
+ "$pkgdir"/usr/lib/python* \
+ "$subpkgdir"/usr/lib/
}
sha512sums="36f390b412bf772bf894efc2aadc247f12ca30ac407e04f664c14411c3519e1bb242d1239f2f44cbcb86eafc7c413efc8eadbfe1d1e75118235a7b7adc6c85b2 subversion-1.13.0.tar.bz2
fb219c45b80602d919176cc191394df09f90d0f5c7d24e6a36b166bd92777ecae67eeac1e49c0ffbb0e724396b3d2094dbb0bef17d01dc87d418b1cd554bd7c4 subversion-1.7.0-deplibs.patch
fd6e5f45cff4d3cf0d885a34c822b32141b13b199d99ad8e1b04d641c9c1ee27e73f5c556a4ad54a900b6d39cc14afad17b6738d8af44c76758f1a27b4d49f9a subversion-perl-deplibs.patch
+7d46f2ee0bbba53b6dc9312b35000b1433a46edb09f61030da1ff66951bc204fc90598e5b07ce2554d46508d5a9e8193152131ae21050901c7b40cb034fb5cc3 subversion-1.12.0-linking.patch
7fe993443d4d3ef5e1e75f60e85036ee0b2bb2636c2c830210e64f525f95ae4c10ca1dc4504fc36915ec9391815becbe7cbf5f589c28609386d8d079ed02c630 svnserve.confd
f6392193cc65aaceee9b6e5e66f80af4b095ba4007e8536e8b1c4e8b2c75610d7f5596b83e5edd504672f021c074887fc6464cf4fc1dfe9446741105f11cd855 svnserve.initd"
diff --git a/main/subversion/subversion-1.12.0-linking.patch b/main/subversion/subversion-1.12.0-linking.patch
new file mode 100644
index 0000000000..f3dcacc419
--- /dev/null
+++ b/main/subversion/subversion-1.12.0-linking.patch
@@ -0,0 +1,84 @@
+
+Fix the way libtool is used to match standard practice:
+
+a) link ONLY libraries using -rpath $(libdir), not executables
+ .. this avoids adding an RPATH for $libdir to executables
+b) link non-installable test binaries using -no-install
+ .. only for convenience but should speed up builds slightly(?)
+
+--- subversion-1.12.0/build.conf.linking
++++ subversion-1.12.0/build.conf
+@@ -572,7 +572,7 @@
+ path = subversion/bindings/swig/python/libsvn_swig_py
+ libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
+ apriconv apr python swig
+-link-cmd = $(LINK)
++link-cmd = $(LINK_LIB)
+ install = swig-py-lib
+ # need special build rule to include -DSWIGPYTHON
+ compile-cmd = $(COMPILE_SWIG_PY)
+@@ -598,7 +598,7 @@
+ lang = ruby
+ path = subversion/bindings/swig/ruby/libsvn_swig_ruby
+ libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
+-link-cmd = $(LINK) $(SWIG_RB_LIBS)
++link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
+ install = swig-rb-lib
+ # need special build rule to include
+ compile-cmd = $(COMPILE_SWIG_RB)
+@@ -769,6 +769,7 @@
+ libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr aprutil apriconv apr
+ msvc-static = yes
+ undefined-lib-symbols = yes
++link-cmd = $(LINK_TEST_LIB)
+
+ # ----------------------------------------------------------------------------
+ # Tests for libsvn_fs_base
+--- subversion-1.12.0/build/generator/gen_base.py.linking
++++ subversion-1.12.0/build/generator/gen_base.py
+@@ -599,7 +599,7 @@
+ self.install = options.get('install')
+ self.compile_cmd = options.get('compile-cmd')
+ self.sources = options.get('sources', '*.c *.cpp')
+- self.link_cmd = options.get('link-cmd', '$(LINK)')
++ self.link_cmd = options.get('link-cmd', '$(LINK_LIB)')
+
+ self.external_lib = options.get('external-lib')
+ self.external_project = options.get('external-project')
+@@ -659,6 +659,14 @@
+
+ self.msvc_force_static = options.get('msvc-force-static') == 'yes'
+
++ if self.install in ['test', 'bdb-test', 'sub-test', ]:
++ self.link_cmd = '$(LINK_TEST)'
++ elif self.install in ['bin', 'tools']:
++ self.link_cmd = '$(LINK_EXE)'
++ elif self.link_cmd == '$(LINK_LIB)':
++ raise GenError('ERROR: Unknown executable link type for ' + self.name + \
++ ': ' + self.link_cmd + ' (' + self.install + ')')
++
+ def add_dependencies(self):
+ TargetLinked.add_dependencies(self)
+
+--- subversion-1.12.0/Makefile.in.linking
++++ subversion-1.12.0/Makefile.in
+@@ -268,11 +268,14 @@
+ COMPILE_SVNXX = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) -o $@ -c
+ COMPILE_SVNXX_TEST = $(LT_COMPILE_CXX) $(SVNXX_INCLUDES) $(BOOST_TEST_CPPFLAGS) -o $@ -c
+
+-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
+-LINK_LIB = $(LINK) $(LT_SO_VERSION)
+-LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
+-LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
+-LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS)
++LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
++LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
++LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS)
++LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION) -rpath $(libdir)
++LINK_SVNXX_TEST = $(LINK_CXX) $(BOOST_TEST_LDFLAGS) -no-install
++LINK_TEST = $(LINK) -no-install
++LINK_TEST_LIB = $(LINK_TEST) -avoid-version
++LINK_EXE = $(LINK)
+
+ # special link rule for mod_dav_svn
+ LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module $(APACHE_LDFLAGS) -shared