2016-12-01 14:18:28 +01:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://subversion.apache.org
|
2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Centralized version control system characterized by its simplicity"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2021-06-23 08:06:54 +02:00
|
|
|
TERMUX_PKG_VERSION=1.14.1
|
2021-08-21 20:13:49 +02:00
|
|
|
TERMUX_PKG_REVISION=3
|
2017-08-14 23:40:39 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://www.apache.org/dist/subversion/subversion-${TERMUX_PKG_VERSION}.tar.bz2
|
2021-06-23 08:06:54 +02:00
|
|
|
TERMUX_PKG_SHA256=2c5da93c255d2e5569fa91d92457fdb65396b0666fad4fd59b22e154d986e1a9
|
2019-04-14 14:51:46 +02:00
|
|
|
TERMUX_PKG_DEPENDS="apr, apr-util, serf, libexpat, libsqlite, liblz4, utf8proc, zlib"
|
2019-07-20 10:42:33 +02:00
|
|
|
TERMUX_PKG_BREAKS="subversion-dev"
|
|
|
|
TERMUX_PKG_REPLACES="subversion-dev"
|
2019-05-06 13:13:27 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
|
|
svn_cv_pycfmt_apr_int64_t=UNUSED_REMOVE_AFTER_NEXT_UPDATE
|
|
|
|
--without-sasl
|
|
|
|
--without-libmagic
|
|
|
|
"
|
2017-07-01 00:42:55 +02:00
|
|
|
|
2021-08-21 19:39:45 +02:00
|
|
|
termux_step_handle_hostbuild() {
|
|
|
|
# TODO: maybe split off into a termux_setup_perl
|
|
|
|
# to simplify cross-compiling other packages?
|
|
|
|
[ "$TERMUX_ON_DEVICE_BUILD" = "true" ] && return
|
|
|
|
local perl_version=$(. $TERMUX_SCRIPTDIR/packages/perl/build.sh; echo $TERMUX_PKG_VERSION)
|
|
|
|
PATH=$TERMUX_PKG_HOSTBUILD_DIR/bin:$PATH
|
|
|
|
[ "$(perl -e 'printf "%vd\n", $^V;')" = "$perl_version" ] && return
|
|
|
|
echo "Building perl v$perl_version for host build..."
|
|
|
|
mkdir ~/perl_build && cd ~/perl_build
|
|
|
|
termux_download http://www.cpan.org/src/5.0/perl-${perl_version}.tar.gz \
|
|
|
|
perl-${perl_version}.tar.gz \
|
|
|
|
$(. $TERMUX_SCRIPTDIR/packages/perl/build.sh; echo $TERMUX_PKG_SHA256)
|
|
|
|
tar -xf perl-${perl_version}.tar.gz
|
|
|
|
cd perl-${perl_version}
|
2021-08-21 20:13:49 +02:00
|
|
|
./Configure -de -Dprefix="'$TERMUX_PKG_HOSTBUILD_DIR'"
|
2021-08-21 19:39:45 +02:00
|
|
|
make -j $TERMUX_MAKE_PROCESSES install
|
|
|
|
}
|
|
|
|
|
2017-07-01 00:42:55 +02:00
|
|
|
termux_step_pre_configure() {
|
2021-08-21 19:39:45 +02:00
|
|
|
export PERL5LIB="$TERMUX_PREFIX/lib/perl5/"
|
2021-08-21 17:12:02 +02:00
|
|
|
CFLAGS+=" -std=c11 -I$TERMUX_PREFIX/include/perl"
|
2021-08-21 20:13:49 +02:00
|
|
|
LDFLAGS+=" -lm -Wl,--as-needed -L$TERMUX_PREFIX/include/perl"
|
2021-08-21 17:12:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
|
|
|
make -j $TERMUX_MAKE_PROCESSES install-swig-pl-lib
|
2021-08-21 19:39:45 +02:00
|
|
|
|
2021-08-21 17:12:02 +02:00
|
|
|
pushd subversion/bindings/swig/perl/native
|
|
|
|
# it's probably not needed to pass all flags to both perl and make
|
|
|
|
# but it works
|
2021-08-21 19:39:45 +02:00
|
|
|
PERL_MM_USE_DEFAULT=1 INSTALLDIRS=site CC="$CC" LD="$CC" \
|
2021-08-21 17:12:02 +02:00
|
|
|
OPTIMIZE="$CFLAGS" CFLAGS="$CFLAGS" CCFLAGS="$CFLAGS" \
|
2021-08-21 20:13:49 +02:00
|
|
|
LDFLAGS="$LDFLAGS -lperl" LDDLFLAGS="-shared $CFLAGS $LDFLAGS -lperl" \
|
2021-08-21 17:12:02 +02:00
|
|
|
perl Makefile.PL PREFIX="$TERMUX_PREFIX"
|
|
|
|
popd
|
|
|
|
|
2021-08-21 19:39:45 +02:00
|
|
|
make -j $TERMUX_MAKE_PROCESSES PREFIX="$TERMUX_PREFIX" \
|
|
|
|
PERL_MM_USE_DEFAULT=1 INSTALLDIRS=site CC="$CC" LD="$CC" \
|
|
|
|
OPTIMIZE="$CFLAGS" CFLAGS="$CFLAGS" CCFLAGS="$CFLAGS" \
|
2021-08-21 20:13:49 +02:00
|
|
|
LDFLAGS="$LDFLAGS -lperl" LDDLFLAGS="-shared $CFLAGS $LDFLAGS -lperl" \
|
2021-08-21 19:39:45 +02:00
|
|
|
install-swig-pl
|
2021-08-21 17:12:02 +02:00
|
|
|
|
|
|
|
local perl_version=$(. $TERMUX_SCRIPTDIR/packages/perl/build.sh; echo $TERMUX_PKG_VERSION)
|
2021-08-21 19:39:45 +02:00
|
|
|
cd "$TERMUX_PREFIX/lib/perl5/site_perl/$perl_version"
|
|
|
|
mkdir -p "${TERMUX_ARCH}-android/"{auto,SVN}
|
|
|
|
mv x86_64-linux/auto/* "${TERMUX_ARCH}-android/auto/"
|
|
|
|
mv x86_64-linux/SVN/* "${TERMUX_ARCH}-android/SVN/"
|
|
|
|
rm ../../$perl_version/x86_64-linux/perllocal.pod
|
|
|
|
rmdir ../../$perl_version/x86_64-linux x86_64-linux{/auto,/SVN,}
|
2017-07-01 00:42:55 +02:00
|
|
|
}
|