summaryrefslogtreecommitdiff
path: root/user/subversion/APKBUILD
blob: 55187841c13034cdcc1462007b4a4347ea3e5c3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=subversion
pkgver=1.14.1
pkgrel=0
pkgdesc="Version control system from 2000"
url="https://subversion.apache.org/"
arch="all"
options="!check"  # Test suite no longer works with Python 3:
                  # https://issues.apache.org/jira/browse/SVN-4811
license="Apache-2.0"
depends=""
depends_dev="apr-dev apr-util-dev linux-headers"
makedepends="apr-dev apr-util-dev cyrus-sasl-dev db-dev dbus-dev file-dev
	kdelibs4support-dev kwallet-dev libsecret-dev lz4-dev openssl-dev
	serf-dev sqlite-dev utf8proc-dev zlib-dev autoconf automake python3
	perl-dev swig libtool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-gnome $pkgname-kwallet
	$pkgname-pl $pkgname-lang"
source="https://www-eu.apache.org/dist/subversion/subversion-$pkgver.tar.bz2
	python3-bang.patch
	"

# secfixes:
#   1.14.1-r0:
#     - CVE-2020-17525
#   1.12.2-r0:
#     - CVE-2018-11782
#     - CVE-2019-0203

build() {
	# this is only needed for autogen.sh
	_PATH=$PATH
	ln -s /usr/bin/python3 "$srcdir"/python
	export PATH=$srcdir:$PATH
	./autogen.sh
	rm "$srcdir"/python
	export PATH=$_PATH
	# this is needed to fix the apr issue as well as the patch
	# https://issues.apache.org/jira/browse/SVN-4813
	export CPPFLAGS="$CPPFLAGS -P"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-kwallet \
		--with-swig
	make

	make swig-pl-lib
	(cd subversion/bindings/swig/perl/native; perl Makefile.PL)
	# need override LD_RUN_PATH with something valid, otherwise we get
	# empty rpath which is not a good idea.
	make -j1 -C subversion/bindings/swig/perl/native \
		LD_RUN_PATH="/usr/lib" EXTRALIBS="-lapr-1"
}

check() {
	make check
	make check-swig-pl
}

package() {
	make DESTDIR="$pkgdir" -j1 install install-swig-pl-lib

	make pure_vendor_install -C subversion/bindings/swig/perl/native \
		PERL_INSTALL_ROOT="$pkgdir"
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

gnome() {
	pkgdesc="$pkgdesc (GNOME Keychain integration)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libsvn_auth_gnome* "$subpkgdir"/usr/lib/
}

kwallet() {
	pkgdesc="$pkgdesc (KDE Wallet integration)"
	install_if="$pkgname=$pkgver-r$pkgrel kwallet"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libsvn_auth_kwallet* "$subpkgdir"/usr/lib/
}

pl() {
	pkgdesc="$pkgdesc (Perl bindings)"
	install_if="$pkgname=$pkgver-r$pkgrel git"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*perl* "$subpkgdir"/usr/lib/
}

sha512sums="0a70c7152b77cdbcb810a029263e4b3240b6ef41d1c19714e793594088d3cca758d40dfbc05622a806b06463becb73207df249393924ce591026b749b875fcdd  subversion-1.14.1.tar.bz2
1b96b791f70c2f6e05da8dbc9d42ccadf4603f25392c6676c4e30ecdb142ce74dd9b8dc27dc68b1cb461f4409d79c4c2aeed1d39a5a442d9349079a819358f5a  python3-bang.patch"