diff --git a/disabled-packages/texlive/termux-install-tl b/disabled-packages/texlive/termux-install-tl deleted file mode 100755 index f5b6a3168..000000000 --- a/disabled-packages/texlive/termux-install-tl +++ /dev/null @@ -1,60 +0,0 @@ -export TMPDIR=$PREFIX/tmp/ -cd $TMPDIR - -wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -tar xvzf install-tl-unx.tar.gz -cd install-tl-*/ - -#patch install-tl -sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" tlpkg/TeXLive/TLUtils.pm - -cat >> texlive_inst.profile << XX - -selected_scheme scheme-custom -TEXDIR $PREFIX/local/texlive/2016 -TEXMFCONFIG ~/.texlive2016/texmf-config -TEXMFHOME ~/texmf -TEXMFLOCAL $PREFIX/local/texlive/texmf-local -TEXMFSYSCONFIG $PREFIX/local/texlive/2016/texmf-config -TEXMFSYSVAR $PREFIX/local/texlive/2016/texmf-var -TEXMFVAR ~/.texlive2016/texmf-var -collection-basic 1 -collection-latex 1 -collection-luatex 1 -in_place 0 -option_adjustrepo 1 -option_autobackup 1 -option_backupdir tlpkg/backups -option_desktop_integration 0 -option_doc 0 -option_file_assocs 0 -option_fmt 1 -option_letter 0 -option_menu_integration 1 -option_path 0 -option_post_code 1 -option_src 0 -option_sys_bin $PREFIX/bin -option_sys_info $PREFIX/local/share/info -option_sys_man $PREFIX/local/share/man -option_w32_multi_user 0 -option_write18_restricted 1 -portable 0 - -XX - -#start installer with a profile and premade binaries -perl ./install-tl --custom-bin=$PREFIX/local/texlive/2016/bin/pkg --profile texlive_inst.profile - -mkdir -p $PREFIX/etc/profile.d/ - -cat > $PREFIX/etc/profile.d/texlive.sh << XX -export PATH=$PATH:$PREFIX/local/texlive/2016/bin/custom -export TMPDIR=$PREFIX/tmp/ - -XX - -#fix tlpkg -sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" $PREFIX/local/texlive/2016/tlpkg/TeXLive/TLUtils.pm - -texlinks diff --git a/packages/perl/Cwd.pm.patch b/packages/perl/Cwd.pm.patch index 7373efc71..333feeb1e 100644 --- a/packages/perl/Cwd.pm.patch +++ b/packages/perl/Cwd.pm.patch @@ -1,7 +1,7 @@ diff -u -r ../perl-5.22.0/dist/PathTools/Cwd.pm ./dist/PathTools/Cwd.pm ---- ../perl-5.22.0/dist/PathTools/Cwd.pm 2015-05-13 16:19:29.000000000 -0400 -+++ ./dist/PathTools/Cwd.pm 2015-08-30 13:34:33.445269291 -0400 -@@ -168,9 +168,8 @@ +--- ../perl-5.24.1/dist/PathTools/Cwd.pm 2016-07-25 09:12:20.000000000 +0000 ++++ ./dist/PathTools/Cwd.pm 2017-02-28 20:36:10.314765294 +0000 +@@ -179,9 +179,8 @@ # so everything works under taint mode. my $pwd_cmd; if($^O ne 'MSWin32') { @@ -13,3 +13,12 @@ diff -u -r ../perl-5.22.0/dist/PathTools/Cwd.pm ./dist/PathTools/Cwd.pm ) { if( -x $try ) { $pwd_cmd = $try; +@@ -198,7 +197,7 @@ + if ($^O =~ /android/) { + # If targetsh is executable, then we're either a full + # perl, or a miniperl for a native build. +- if (-x $Config::Config{targetsh}) { ++ if (defined($Config::Config{targetsh}) && -x $Config::Config{targetsh}) { + $pwd_cmd = "$Config::Config{targetsh} -c pwd" + } + else { diff --git a/disabled-packages/texlive/build.sh b/packages/texlive/build.sh similarity index 56% rename from disabled-packages/texlive/build.sh rename to packages/texlive/build.sh index d7355242e..b0fd601f1 100644 --- a/disabled-packages/texlive/build.sh +++ b/packages/texlive/build.sh @@ -1,16 +1,22 @@ TERMUX_PKG_HOMEPAGE=https://www.tug.org/texlive/ TERMUX_PKG_DESCRIPTION="TeX Live is a distribution of the TeX typesetting system." -TERMUX_PKG_VERSION=20160523 -TERMUX_PKG_SRCURL=ftp://tug.org/historic/systems/texlive/${TERMUX_PKG_VERSION:0:4}/texlive-${TERMUX_PKG_VERSION}b-source.tar.xz +_MAJOR_VERSION=20160523 +_MINOR_VERSION=b +TERMUX_PKG_VERSION=${_MAJOR_VERSION}${_MINOR_VERSION} +TERMUX_PKG_SRCURL=ftp://tug.org/historic/systems/texlive/${TERMUX_PKG_VERSION:0:4}/texlive-${TERMUX_PKG_VERSION}-source.tar.xz TERMUX_PKG_SHA256="a8b32ca47f0a403661a09e202f4567a995beb718c18d8f81ca6d76daa1da21ed" -TERMUX_PKG_DEPENDS="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler" -TERMUX_PKG_FOLDERNAME=texlive-${TERMUX_PKG_VERSION}-source +TERMUX_PKG_DEPENDS="freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua, poppler, libgraphite, harfbuzz-icu, perl, xz-utils" +TERMUX_PKG_FOLDERNAME=texlive-${_MAJOR_VERSION}-source + +# change the bin directory to "$TERMUX_PREFIX/opt/texlive/2016/bin/pkg" because the installer will symlink this to the actual bin dir.. TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" AR=ar \ RANLIB=ranlib \ BUILDAR=ar \ BUILDRANLIB=ranlib \ ---prefix=$TERMUX_PREFIX \ +--prefix=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4} \ +--bindir=$TERMUX_PREFIX/opt/texlive/${TERMUX_PKG_VERSION:0:4}/bin/pkg \ +--libdir=$TERMUX_PREFIX/lib \ --build=$TERMUX_BUILD_TUPLE \ --enable-ttfdump=no \ --enable-makeindexk=no \ @@ -27,11 +33,12 @@ BUILDRANLIB=ranlib \ --disable-psutils \ --disable-multiplatform \ --disable-t1utils \ ---disable-luatex \ +--enable-luatex \ --disable-luajittex \ --disable-mflua \ --disable-mfluajit \ --disable-xz \ +--disable-pmx \ --without-texinfo \ --without-xdvipdfmx \ --without-texi2html \ @@ -46,19 +53,23 @@ BUILDRANLIB=ranlib \ --with-system-poppler \ --with-system-zlib \ --with-system-xpdf \ +--with-system-lua \ --without-x \ --with-banner-add=/Termux" termux_step_post_extract_package () { - rm -r $TERMUX_PKG_SRCDIR/utils/pmx + rm -rdf $TERMUX_PKG_SRCDIR/libs/luajit } termux_step_post_make_install () { - cp $TERMUX_PKG_BUILDER_DIR/termux-install-tl $TERMUX_PREFIX/bin + cp $TERMUX_PKG_BUILDER_DIR/termux-install-tl.sh $TERMUX_PREFIX/bin/termux-install-tl } termux_step_create_debscripts () { - echo 'echo "retrieving texlive..."' > postinst + echo 'echo "========================================================"' > postinst + echo 'echo "retrieving texlive..."' >> postinst + echo 'echo "you can start this manually by calling termux-install-tl"' >> postinst + echo 'echo "========================================================"' >> postinst echo "termux-install-tl" >> postinst echo "exit 0" >> postinst chmod 0755 postinst diff --git a/disabled-packages/texlive/dvipdfm-x_fix_getpass.patch b/packages/texlive/dvipdfm-x_fix_getpass.patch similarity index 100% rename from disabled-packages/texlive/dvipdfm-x_fix_getpass.patch rename to packages/texlive/dvipdfm-x_fix_getpass.patch diff --git a/packages/texlive/termux-install-tl.sh b/packages/texlive/termux-install-tl.sh new file mode 100755 index 000000000..201eff9c5 --- /dev/null +++ b/packages/texlive/termux-install-tl.sh @@ -0,0 +1,72 @@ + +TL_VERSION=2016 +TL_ROOT=$PREFIX/opt/texlive + +export TMPDIR=$PREFIX/tmp/ +mkdir -p $TMPDIR/termux-tl-installer +cd $TMPDIR/termux-tl-installer + +wget -N http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz +tar xzfv install-tl-unx.tar.gz > flist + +cd $(head -1 flist) + +#patch install-tl +sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" tlpkg/TeXLive/TLUtils.pm +#This patch won't be needed after the next version of fmtutil.pl is released. +sed -i "s@fmtutil-sys \$common_fmtutil_args --no-strict --all@fmtutil-sys \$common_fmtutil_args --all@" install-tl +cat > texlive_inst.profile << XXHEREXX + +selected_scheme scheme-custom +TEXDIR ${TL_ROOT}/${TL_VERSION} +TEXMFCONFIG ~/.texlive${TL_VERSION}/texmf-config +TEXMFHOME ~/texmf +TEXMFLOCAL ${TL_ROOT}/texmf-local +TEXMFSYSCONFIG ${TL_ROOT}/${TL_VERSION}/texmf-config +TEXMFSYSVAR ${TL_ROOT}/${TL_VERSION}/texmf-var +TEXMFVAR ~/.texlive${TL_VERSION}/texmf-var +collection-basic 1 +collection-latex 1 +collection-luatex 1 +in_place 0 +option_adjustrepo 1 +option_autobackup 1 +option_backupdir tlpkg/backups +option_desktop_integration 0 +option_doc 0 +option_file_assocs 0 +option_fmt 1 +option_letter 0 +option_menu_integration 1 +option_path 0 +option_post_code 1 +option_src 0 +option_sys_bin $PREFIX/bin +option_sys_info $PREFIX/local/share/info +option_sys_man $PREFIX/local/share/man +option_w32_multi_user 0 +option_write18_restricted 1 +portable 0 + +XXHEREXX + +#start installer with a profile and premade binaries +perl ./install-tl --custom-bin=$TL_ROOT/${TL_VERSION}/bin/pkg --profile texlive_inst.profile + +mkdir -p $PREFIX/etc/profile.d/ + +cat > $PREFIX/etc/profile.d/texlive.sh << XXHEREXX +export PATH=\$PATH:$TL_ROOT/${TL_VERSION}/bin/custom +export TMPDIR=$PREFIX/tmp/ +XXHEREXX + +#fix tlpkg +sed -E -i "s@/bin/sh@$PREFIX/bin/sh@" ${TL_ROOT}/${TL_VERSION}/tlpkg/TeXLive/TLUtils.pm + +#source the environment +. $PREFIX/etc/profile.d/texlive.sh + +#setup links +texlinks + +rm -rdf $TMPDIR/termux-tl-installer diff --git a/disabled-packages/texlive/zziplib_disable_have_dirent.patch b/packages/texlive/zziplib_disable_have_dirent.patch similarity index 100% rename from disabled-packages/texlive/zziplib_disable_have_dirent.patch rename to packages/texlive/zziplib_disable_have_dirent.patch