termux-packages/packages/subversion/build.sh

52 lines
2.1 KiB
Bash
Raw Normal View History

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"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.14.1
TERMUX_PKG_REVISION=10
2017-08-14 23:40:39 +02:00
TERMUX_PKG_SRCURL=https://www.apache.org/dist/subversion/subversion-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=2c5da93c255d2e5569fa91d92457fdb65396b0666fad4fd59b22e154d986e1a9
2019-04-14 14:51:46 +02:00
TERMUX_PKG_DEPENDS="apr, apr-util, serf, libexpat, libsqlite, liblz4, utf8proc, zlib"
TERMUX_PKG_BREAKS="subversion-dev"
TERMUX_PKG_REPLACES="subversion-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
svn_cv_pycfmt_apr_int64_t=UNUSED_REMOVE_AFTER_NEXT_UPDATE
--without-sasl
--without-libmagic
"
termux_step_pre_configure() {
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 21:52:50 +02:00
INSTALLSITEMAN3DIR="$TERMUX_PREFIX/share/man/man3" \
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 21:52:50 +02:00
INSTALLSITEMAN3DIR="$TERMUX_PREFIX/share/man/man3" \
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)
local host_perl_version=$(perl -e 'printf "%vd\n", $^V;')
cd "$TERMUX_PREFIX/lib"
2021-09-08 08:09:41 +02:00
rm "x86_64-linux-gnu/perl/$host_perl_version/perllocal.pod"
mkdir -p "perl5/site_perl/$perl_version"
mv "x86_64-linux-gnu/perl/$host_perl_version" \
"perl5/site_perl/$perl_version/${TERMUX_ARCH}-android"
rmdir x86_64-linux-gnu/{perl/,}
}