subversion: hostbuild wasn't needed after all

This commit is contained in:
Lucy Phipps 2021-08-21 19:49:36 +01:00
parent 3740f1d29c
commit 47548b892b
No known key found for this signature in database
GPG Key ID: 8F688A3DB7869BFE
3 changed files with 9 additions and 32 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Centralized version control system characterized by its
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.14.1
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://www.apache.org/dist/subversion/subversion-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=2c5da93c255d2e5569fa91d92457fdb65396b0666fad4fd59b22e154d986e1a9
TERMUX_PKG_DEPENDS="apr, apr-util, serf, libexpat, libsqlite, liblz4, utf8proc, zlib"
@ -15,26 +15,7 @@ svn_cv_pycfmt_apr_int64_t=UNUSED_REMOVE_AFTER_NEXT_UPDATE
--without-libmagic
"
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}
./Configure -de -Dprefix="'$TERMUX_PKG_HOSTBUILD_DIR'"
make -j $TERMUX_MAKE_PROCESSES install
}
termux_step_pre_configure() {
export PERL5LIB="$TERMUX_PREFIX/lib/perl5/"
CFLAGS+=" -std=c11 -I$TERMUX_PREFIX/include/perl"
LDFLAGS+=" -lm -Wl,--as-needed -L$TERMUX_PREFIX/include/perl"
}
@ -58,10 +39,10 @@ termux_step_post_make_install() {
install-swig-pl
local perl_version=$(. $TERMUX_SCRIPTDIR/packages/perl/build.sh; echo $TERMUX_PKG_VERSION)
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,}
local host_perl_version=$(perl -e 'printf "%vd\n", $^V;')
cd "$TERMUX_PREFIX/lib"
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/,}
}

View File

@ -1,3 +1,3 @@
TERMUX_SUBPKG_DESCRIPTION="Static libraries for subversion-perl"
TERMUX_SUBPKG_DEPENDS="subversion-perl"
TERMUX_SUBPKG_INCLUDE="lib/lib/libsvn_swig_perl*.a lib/lib/libsvn_swig_perl*.la"
TERMUX_SUBPKG_INCLUDE="lib/libsvn_swig_perl*.a lib/libsvn_swig_perl*.la"

View File

@ -1,7 +1,3 @@
TERMUX_SUBPKG_DESCRIPTION="Perl interface to Subversion"
TERMUX_SUBPKG_DEPENDS="perl"
TERMUX_SUBPKG_INCLUDE="
lib/libsvn_swig_perl*
lib/perl5/
share/man/man3/
"
TERMUX_SUBPKG_INCLUDE="lib/libsvn_swig_perl* lib/perl5/ share/man/man3/"