185 lines
5.7 KiB
Bash
185 lines
5.7 KiB
Bash
# Template file for 'subversion'
|
|
pkgname=subversion
|
|
version=1.13.0
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--disable-javahl --disable-static --config-cache
|
|
--with-kwallet=${XBPS_CROSS_BASE}/usr/include:${XBPS_CROSS_BASE}/usr/lib
|
|
--with-gnome-keyring --with-editor=vi --disable-mod-activation
|
|
--with-utf8proc=internal"
|
|
hostmakedepends="automake libtool pkg-config perl python apache-devel gettext"
|
|
makedepends="apache-devel gdbm-devel libgnome-keyring-devel serf-devel
|
|
libsecret-devel liblz4-devel python-devel sqlite-devel swig
|
|
kdelibs4support-devel file-devel perl"
|
|
depends="ca-certificates"
|
|
short_desc="Enterprise-class centralized version control for the masses"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="Apache-2.0, BSD-3-Clause"
|
|
homepage="http://subversion.apache.org/"
|
|
distfiles="http://apache.uvigo.es/subversion/subversion-${version}.tar.bz2"
|
|
checksum=bc50ce2c3faa7b1ae9103c432017df98dfd989c4239f9f8270bb3a314ed9e5bd
|
|
|
|
pre_configure() {
|
|
# Based on native build values
|
|
cat <<-EOF >config.cache
|
|
ac_cv_python_includes=-I${XBPS_CROSS_BASE}/usr/include/python${py2_ver}
|
|
ac_cv_python_compile="${CC} -fPIC"
|
|
ac_cv_python_link="${CC} -shared ${LDFLAGS}"
|
|
ac_cv_python_libs="${LDFLAGS}"
|
|
EOF
|
|
if [ "$CROSS_BUILD" ]; then
|
|
cp -a ${XBPS_CROSS_BASE}/usr/bin/apxs ${wrksrc}
|
|
cp -a ${XBPS_CROSS_BASE}/usr/share/apache/webroot/build/config_vars.mk ${wrksrc}
|
|
|
|
# Use the modified apxs
|
|
configure_args+=" --with-apxs=${wrksrc}/apxs"
|
|
|
|
# Use the ${wrksrc}/config_vars.mk
|
|
vsed -i apxs \
|
|
-e "s;[$]installbuilddir/config_vars.mk;${wrksrc}/config_vars.mk;g"
|
|
|
|
# Use apr-1-config and apu-1-config wrappers
|
|
vsed -i config_vars.mk \
|
|
-e "s;/usr/bin/\(ap.-1-config\);${XBPS_WRAPPERDIR}/\1;g" \
|
|
-e "s;-I/usr/include;-I${XBPS_CROSS_BASE}/usr/include;g"
|
|
|
|
export PERL5LIB=${XBPS_STATEDIR}/perlprefix/${XBPS_TARGET_MACHINE}-linux
|
|
mkdir -p $PERL5LIB
|
|
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Config"*.p? $PERL5LIB
|
|
cp "$XBPS_CROSS_BASE/usr/lib/perl5/core_perl/Errno.pm" $PERL5LIB
|
|
vsed -e "s;archlibexp => '\(.*\)';archlibexp => '${XBPS_CROSS_BASE}\1';" \
|
|
-i $PERL5LIB/Config.pm $PERL5LIB/Config_heavy.pl
|
|
else
|
|
configure_args+=" --with-apxs"
|
|
fi
|
|
NOCONFIGURE=1 autoreconf -fi
|
|
}
|
|
|
|
post_configure() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
cd subversion/bindings/swig/perl/native
|
|
PERL_MM_USE_DEFAULT=1 CC="$CC" LD="$CC" OPTIMIZE="$CFLAGS" \
|
|
CFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/usr/include" \
|
|
CCFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/usr/include" \
|
|
LDFLAGS="$LDFLAGS -L$XBPS_CROSS_BASE/usr/lib -lperl" \
|
|
LDDLFLAGS="-shared $CFLAGS -L$XBPS_CROSS_BASE/usr/lib" \
|
|
INSTALLDIRS=vendor \
|
|
perl Makefile.PL PREFIX=/usr
|
|
fi
|
|
}
|
|
|
|
do_build() {
|
|
make ${makejobs} LT_LDFLAGS="-L$Fdestdir/usr/lib"
|
|
make ${makejobs} \
|
|
swig_pydir=${XBPS_CROSS_BASE}/usr/lib/python$py2_ver/site-packages/libsvn \
|
|
swig_pydir_extra=${XBPS_CROSS_BASE}/usr/lib/python$py2_ver/site-packages/svn \
|
|
swig-py
|
|
make ${makejobs} INSTALLDIRS=vendor \
|
|
PERL_MM_USE_DEFAULT=1 CC="$CC" LD="$CC" OPTIMIZE="$CFLAGS" \
|
|
CFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/usr/include" \
|
|
CCFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/usr/include" \
|
|
LDFLAGS="$LDFLAGS -L$XBPS_CROSS_BASE/usr/lib -lperl" \
|
|
LDDLFLAGS="-shared $CFLAGS -L$XBPS_CROSS_BASE/usr/lib" \
|
|
swig-pl
|
|
}
|
|
|
|
do_install() {
|
|
export LD_LIBRARY_PATH=${DESTDIR}/usr/lib:$LD_LIBRARY_PATH
|
|
|
|
make DESTDIR=${DESTDIR} INSTALLDIRS=vendor install
|
|
make DESTDIR=${DESTDIR} INSTALLDIRS=vendor \
|
|
swig_pydir=${XBPS_CROSS_BASE}/usr/lib/python$py2_ver/site-packages/libsvn \
|
|
swig_pydir_extra=${XBPS_CROSS_BASE}/usr/lib/python$py2_ver/site-packages/svn \
|
|
install-swig-py
|
|
make DESTDIR=${DESTDIR} INSTALLDIRS=vendor \
|
|
PERL_MM_USE_DEFAULT=1 CC="$CC" LD="$CC" OPTIMIZE="$CFLAGS" \
|
|
CFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/usr/include" \
|
|
CCFLAGS="$CFLAGS -I$XBPS_CROSS_BASE/usr/include" \
|
|
LDFLAGS="$LDFLAGS -L$XBPS_CROSS_BASE/usr/lib -lperl" \
|
|
LDDLFLAGS="-shared $CFLAGS -L$XBPS_CROSS_BASE/usr/lib" \
|
|
install-swig-pl
|
|
|
|
rm -rf ${DESTDIR}/usr/lib/perl5/core_perl
|
|
vmkdir usr/share/subversion
|
|
install -d -m755 tools/hook-scripts ${DESTDIR}/usr/share/subversion/
|
|
rm -f ${DESTDIR}/usr/share/subversion/hook-scripts/*.in
|
|
|
|
install -Dm644 tools/client-side/bash_completion \
|
|
${DESTDIR}/usr/share/bash-completion/completions/subversion
|
|
|
|
for i in svn svnadmin svndumpfilter svnlook svnsync svnversion; do
|
|
ln -sf subversion ${DESTDIR}/usr/share/bash-completion/completions/${i}
|
|
done
|
|
|
|
vsv svnserve
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libsvn_package() {
|
|
short_desc+=" - shared libraries"
|
|
pkg_install() {
|
|
vmove "usr/lib/libsvn_ra*.so.*"
|
|
vmove "usr/lib/libsvn_fs*.so.*"
|
|
vmove "usr/lib/libsvn_subr*.so.*"
|
|
vmove "usr/lib/libsvn_wc*.so.*"
|
|
vmove "usr/lib/libsvn_delta*.so.*"
|
|
vmove "usr/lib/libsvn_diff*.so.*"
|
|
vmove "usr/lib/libsvn_repos*.so.*"
|
|
vmove "usr/lib/libsvn_client*.so.*"
|
|
}
|
|
}
|
|
|
|
subversion-apache_package() {
|
|
short_desc+=" - apache httpd modules"
|
|
pkg_install() {
|
|
vmove usr/libexec
|
|
}
|
|
}
|
|
|
|
subversion-devel_package() {
|
|
depends="libsvn>=${version}_${revision}"
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share/pkgconfig
|
|
}
|
|
}
|
|
|
|
subversion-gnome-keyring-auth_package() {
|
|
lib32disabled=yes
|
|
short_desc+=" - gnome-keyring authentication support"
|
|
pkg_install() {
|
|
vmove "usr/lib/libsvn_auth_gnome_keyring*"
|
|
}
|
|
}
|
|
|
|
subversion-kwallet-auth_package() {
|
|
lib32disabled=yes
|
|
short_desc+=" - KDE kwallet authentication support"
|
|
pkg_install() {
|
|
vmove "usr/lib/libsvn_auth_kwallet*"
|
|
}
|
|
}
|
|
|
|
subversion-python_package() {
|
|
lib32disabled=yes
|
|
depends="python"
|
|
short_desc+=" - python bindings"
|
|
pkg_install() {
|
|
vmove "usr/lib/libsvn_swig_py*"
|
|
vmove "usr/lib/python*"
|
|
}
|
|
}
|
|
|
|
subversion-perl_package() {
|
|
lib32disabled=yes
|
|
depends="perl"
|
|
short_desc+=" - perl bindings"
|
|
pkg_install() {
|
|
vmove "usr/lib/libsvn_swig_perl*"
|
|
vmove usr/lib/perl5
|
|
vmove usr/share/man/man3
|
|
}
|
|
}
|