Browse Source

Allow TERMUX_PKG_SRCURL and TERMUX_PKG_SHA256 to be arrays (#2506)

* build-package.sh: allow for arrays in TERMUX_PKG_{SRCURL,SHA256}

Packages that require several source archives can then set these parameters to
arrays instead of downloading them "manually" in termux_step_post_extract.

Downloaded files are extracted into subfolders in TERMUX_PKG_SRCDIR.

Tested for backward compatibility in a couple of packages and the combinations
tar + tar, zip + tar, tar + zip, zip + zip.

* perl: download perl-cross through TERMUX_PKG_SRCURL

* perl: remove $PREFIX/{lib/libperl.so,include/perl} before build

Otherwise building perl twice doesn't give the same results, symlinks are
messed up.

Also remove old remnant from when there was a Kid.pm.patch.

* bash: fix tiny typo

* ecj: remove hardcoded SHA256 and pkg version

* elfutils: download argp-standalone through TERMUX_PKG_SRCURL

* ldc: download all src archives through TERMUX_PKG_SRCURL

* libgc: download libatomic_ops through TERMUX_PKG_SRCURL

* libllvm: download all src archives through TERMUX_PKG_SRCURL

* linux-man-pages: download src archives through TERMUX_PKG_SRCURL

* ncurses: download all src archives through TERMUX_PKG_SRCURL

* pngquant: download lib sources through TERMUX_PKG_SRCURL

Use .zip for lib since the downloaded archives are otherwise both named
$TERMUX_PKG_VERSION.tar.gz and replace each other. This causes caching to
not work.
android-5
Henrik Grimler 7 years ago
committed by Fredrik Fornwall
parent
commit
84b372babc
  1. 23
      build-package.sh
  2. 2
      packages/bash/build.sh
  3. 6
      packages/ecj/build.sh
  4. 23
      packages/elfutils/build.sh
  5. 58
      packages/ldc/build.sh
  6. 18
      packages/libgc/build.sh
  7. 37
      packages/libllvm/build.sh
  8. 20
      packages/linux-man-pages/build.sh
  9. 18
      packages/ncurses/build.sh
  10. 27
      packages/perl/build.sh
  11. 18
      packages/pngquant/build.sh

23
build-package.sh

@ -481,10 +481,22 @@ termux_step_extract_package() {
return return
fi fi
cd "$TERMUX_PKG_TMPDIR" cd "$TERMUX_PKG_TMPDIR"
local filename local PKG_SRCURL=(${TERMUX_PKG_SRCURL[@]})
filename=$(basename "$TERMUX_PKG_SRCURL") local PKG_SHA256=(${TERMUX_PKG_SHA256[@]})
if [ ! ${#PKG_SRCURL[@]} == ${#PKG_SHA256[@]} ] && [ ! ${#PKG_SHA256[@]} == 0 ]; then
termux_error_exit "Error: length of TERMUX_PKG_SRCURL isn't equal to length of TERMUX_PKG_SHA256."
fi
# STRIP=1 extracts archives straight into TERMUX_PKG_SRCDIR while STRIP=0 puts them in subfolders. zip has same behaviour per default
# If this isn't desired then this can be fixed in termux_step_post_extract.
local STRIP=1
for i in $(seq 0 $(( ${#PKG_SRCURL[@]}-1 ))); do
test $i -gt 0 && STRIP=0
local filename=$(basename "${PKG_SRCURL[$i]}")
local file="$TERMUX_PKG_CACHEDIR/$filename" local file="$TERMUX_PKG_CACHEDIR/$filename"
termux_download "$TERMUX_PKG_SRCURL" "$file" "$TERMUX_PKG_SHA256" # Allow TERMUX_PKG_SHA256 to be empty:
set +u
termux_download "${PKG_SRCURL[$i]}" "$file" "${PKG_SHA256[$i]}"
set -u
local folder local folder
set +o pipefail set +o pipefail
@ -494,10 +506,11 @@ termux_step_extract_package() {
unzip -q "$file" unzip -q "$file"
mv $folder "$TERMUX_PKG_SRCDIR" mv $folder "$TERMUX_PKG_SRCDIR"
else else
mkdir "$TERMUX_PKG_SRCDIR" mkdir -p "$TERMUX_PKG_SRCDIR"
tar xf "$file" -C "$TERMUX_PKG_SRCDIR" --strip-components=1 tar xf "$file" -C "$TERMUX_PKG_SRCDIR" --strip-components=$STRIP
fi fi
set -o pipefail set -o pipefail
done
} }
# Hook for packages to act just after the package has been extracted. # Hook for packages to act just after the package has been extracted.

2
packages/bash/build.sh

@ -16,7 +16,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_unusable_rtsigs=no"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_dev_fd=whacky" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_dev_fd=whacky"
# Bash assumes that getcwd is broken and provides a wrapper which # Bash assumes that getcwd is broken and provides a wrapper which
# does not work when not all parent directories up to root are # does not work when not all parent directories up to root are
# accessible, which they are no under Android (/data). See # accessible, which they are not under Android (/data). See
# - http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204 # - http://permalink.gmane.org/gmane.linux.embedded.yocto.general/25204
# - https://github.com/termux/termux-app/issues/200 # - https://github.com/termux/termux-app/issues/200
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_getcwd_malloc=yes" TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_getcwd_malloc=yes"

6
packages/ecj/build.sh

@ -1,8 +1,10 @@
TERMUX_PKG_HOMEPAGE=http://www.eclipse.org/jdt/core/ TERMUX_PKG_HOMEPAGE=http://www.eclipse.org/jdt/core/
TERMUX_PKG_DESCRIPTION="Eclipse Compiler for Java" TERMUX_PKG_DESCRIPTION="Eclipse Compiler for Java"
TERMUX_PKG_VERSION=4.6.2 TERMUX_PKG_VERSION=4.6.2
_date=201611241400
TERMUX_PKG_REVISION=3 TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=http://eclipse.mirror.wearetriple.com/eclipse/downloads/drops4/R-4.6.2-201611241400/ecj-4.6.2.jar TERMUX_PKG_SRCURL=http://eclipse.mirror.wearetriple.com/eclipse/downloads/drops${TERMUX_PKG_VERSION:0:1}/R-${TERMUX_PKG_VERSION}-${_date}/ecj-${TERMUX_PKG_VERSION}.jar
TERMUX_PKG_SHA256=9953dc2be829732e1b939106a71de018f660891220dbca559a5c7bff84883e51
TERMUX_PKG_PLATFORM_INDEPENDENT=true TERMUX_PKG_PLATFORM_INDEPENDENT=true
termux_step_extract_package () { termux_step_extract_package () {
@ -13,7 +15,7 @@ termux_step_make () {
RAW_JAR=$TERMUX_PKG_CACHEDIR/ecj-${TERMUX_PKG_VERSION}.jar RAW_JAR=$TERMUX_PKG_CACHEDIR/ecj-${TERMUX_PKG_VERSION}.jar
if [ ! -f $RAW_JAR ]; then if [ ! -f $RAW_JAR ]; then
termux_download $TERMUX_PKG_SRCURL $RAW_JAR \ termux_download $TERMUX_PKG_SRCURL $RAW_JAR \
9953dc2be829732e1b939106a71de018f660891220dbca559a5c7bff84883e51 $TERMUX_PKG_SHA256
fi fi
mkdir -p $TERMUX_PREFIX/share/{dex,java} mkdir -p $TERMUX_PREFIX/share/{dex,java}

23
packages/elfutils/build.sh

@ -1,8 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://sourceware.org/elfutils/ TERMUX_PKG_HOMEPAGE=https://sourceware.org/elfutils/
TERMUX_PKG_DESCRIPTION="ELF object file access library" TERMUX_PKG_DESCRIPTION="ELF object file access library"
TERMUX_PKG_VERSION=0.170 TERMUX_PKG_VERSION=(0.170
TERMUX_PKG_SHA256=1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066 1.3)
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SHA256=(1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066
dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be)
TERMUX_PKG_SRCURL=(ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
http://www.lysator.liu.se/~nisse/archive/argp-standalone-${TERMUX_PKG_VERSION[1]}.tar.gz)
# libandroid-support for langinfo. # libandroid-support for langinfo.
TERMUX_PKG_DEPENDS="libandroid-support, liblzma, libbz2" TERMUX_PKG_DEPENDS="libandroid-support, liblzma, libbz2"
TERMUX_PKG_CLANG=no TERMUX_PKG_CLANG=no
@ -21,15 +24,7 @@ termux_step_pre_configure() {
CFLAGS+=" -DFNM_EXTMATCH=0" CFLAGS+=" -DFNM_EXTMATCH=0"
# Install argp lib. cd argp-standalone-${TERMUX_PKG_VERSION[1]}
ARGP_FILE=$TERMUX_PKG_CACHEDIR/argp-standalone.1.3.tar.gz
termux_download http://www.lysator.liu.se/~nisse/archive/argp-standalone-1.3.tar.gz \
$ARGP_FILE \
dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be
cd $TERMUX_PKG_TMPDIR
tar xf $ARGP_FILE
cd argp-standalone-1.3
ORIG_CFLAGS="$CFLAGS" ORIG_CFLAGS="$CFLAGS"
CFLAGS+=" -std=gnu89" CFLAGS+=" -std=gnu89"
./configure --host=$TERMUX_HOST_PLATFORM ./configure --host=$TERMUX_HOST_PLATFORM
@ -41,6 +36,6 @@ termux_step_pre_configure() {
cp $TERMUX_PKG_BUILDER_DIR/obstack.h . cp $TERMUX_PKG_BUILDER_DIR/obstack.h .
cp $TERMUX_PKG_BUILDER_DIR/qsort_r.h . cp $TERMUX_PKG_BUILDER_DIR/qsort_r.h .
LDFLAGS+=" -L$TERMUX_PKG_TMPDIR/argp-standalone-1.3" LDFLAGS+=" -L$TERMUX_PKG_SRCDIR/argp-standalone-${TERMUX_PKG_VERSION[1]}"
CPPFLAGS+=" -isystem $TERMUX_PKG_TMPDIR/argp-standalone-1.3" CPPFLAGS+=" -isystem $TERMUX_PKG_SRCDIR/argp-standalone-${TERMUX_PKG_VERSION[1]}"
} }

58
packages/ldc/build.sh

@ -1,9 +1,20 @@
TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc TERMUX_PKG_HOMEPAGE=https://github.com/ldc-developers/ldc
TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM" TERMUX_PKG_DESCRIPTION="D programming language compiler, built with LLVM"
_PKG_MAJOR_VERSION=1.9 _PKG_MAJOR_VERSION=1.9
TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0 TERMUX_PKG_VERSION=()
TERMUX_PKG_SRCURL=https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz TERMUX_PKG_VERSION+=(${_PKG_MAJOR_VERSION}.0)
TERMUX_PKG_SHA256=e3f32a4dfcaae12f434e0e23638684faa83765827e7f2deb2df059dccc3169b9 TERMUX_PKG_VERSION+=(6.0.0) # LLVM version
TERMUX_PKG_VERSION+=(2.079.1) # TOOLS version
TERMUX_PKG_VERSION+=(1.8.1) # DUB version
TERMUX_PKG_SRCURL=(https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc-${TERMUX_PKG_VERSION}-src.tar.gz
https://github.com/ldc-developers/llvm/releases/download/ldc-v${TERMUX_PKG_VERSION[1]}/llvm-${TERMUX_PKG_VERSION[1]}.src.tar.xz
https://github.com/dlang/tools/archive/v${TERMUX_PKG_VERSION[2]}.tar.gz
https://github.com/dlang/dub/archive/v${TERMUX_PKG_VERSION[3]}.tar.gz)
TERMUX_PKG_SHA256=(e3f32a4dfcaae12f434e0e23638684faa83765827e7f2deb2df059dccc3169b9
5444d9da5929fd9062ac3d7793f484366de8b372411e0e5602ea23c2ff3fdb05
37e04b77a0ff5e13350662945327dccba4bcd4975d45b61db2524eadad3d56fe
79ad2dca0679f6d8b6a4d75e7ccea7930957134743bba290c949d5aa1aa53a14)
TERMUX_PKG_DEPENDS="clang" TERMUX_PKG_DEPENDS="clang"
TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_BLACKLISTED_ARCHES="aarch64,i686,x86_64" TERMUX_PKG_BLACKLISTED_ARCHES="aarch64,i686,x86_64"
@ -22,43 +33,15 @@ TERMUX_PKG_NO_DEVELSPLIT=yes
TERMUX_PKG_MAINTAINER="Joakim @joakim-noah" TERMUX_PKG_MAINTAINER="Joakim @joakim-noah"
termux_step_post_extract_package () { termux_step_post_extract_package () {
local LLVM_SRC_VERSION=6.0.0 mv llvm-${TERMUX_PKG_VERSION[1]}.src llvm
termux_download \ mv tools-${TERMUX_PKG_VERSION[2]} rdmd
https://github.com/ldc-developers/llvm/releases/download/ldc-v${LLVM_SRC_VERSION}/llvm-${LLVM_SRC_VERSION}.src.tar.xz \ mv dub-${TERMUX_PKG_VERSION[3]} dub
$TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz \
5444d9da5929fd9062ac3d7793f484366de8b372411e0e5602ea23c2ff3fdb05
tar xf $TERMUX_PKG_CACHEDIR/llvm-${LLVM_SRC_VERSION}.src.tar.xz
mv llvm-${LLVM_SRC_VERSION}.src llvm
termux_download \
https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \
$TERMUX_PKG_CACHEDIR/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \
e33e02456878776b9ba864a47ceb445aa6474a24167f26eab36fd9bb4276dcc5
local TOOLS_VERSION=2.079.1
termux_download \
https://github.com/dlang/tools/archive/v${TOOLS_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/tools-v${TOOLS_VERSION}.tar.gz \
37e04b77a0ff5e13350662945327dccba4bcd4975d45b61db2524eadad3d56fe
tar xf $TERMUX_PKG_CACHEDIR/tools-v${TOOLS_VERSION}.tar.gz
mv tools-${TOOLS_VERSION} rdmd
local DUB_VERSION=1.8.1
termux_download \
https://github.com/dlang/dub/archive/v${DUB_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz \
79ad2dca0679f6d8b6a4d75e7ccea7930957134743bba290c949d5aa1aa53a14
tar xf $TERMUX_PKG_CACHEDIR/dub-v${DUB_VERSION}.tar.gz
mv dub-${DUB_VERSION} dub
sed "s#\@TERMUX_PKG_HOSTBUILD\@#$TERMUX_PKG_HOSTBUILD_DIR#" $TERMUX_PKG_BUILDER_DIR/ldc-linker-flags.patch.in > \ sed "s#\@TERMUX_PKG_HOSTBUILD\@#$TERMUX_PKG_HOSTBUILD_DIR#" $TERMUX_PKG_BUILDER_DIR/ldc-linker-flags.patch.in > \
$TERMUX_PKG_BUILDER_DIR/ldc-linker-flags.patch $TERMUX_PKG_BUILDER_DIR/ldc-linker-flags.patch
sed $TERMUX_PKG_BUILDER_DIR/llvm-config.in \ sed $TERMUX_PKG_BUILDER_DIR/llvm-config.in \
-e "s|@LLVM_VERSION@|$LLVM_SRC_VERSION|g" \ -e "s|@LLVM_VERSION@|${TERMUX_PKG_VERSION[1]}|g" \
-e "s|@LLVM_BUILD_DIR@|$TERMUX_PKG_BUILDDIR/llvm|g" \ -e "s|@LLVM_BUILD_DIR@|$TERMUX_PKG_BUILDDIR/llvm|g" \
-e "s|@TERMUX_PKG_SRCDIR@|$TERMUX_PKG_SRCDIR|g" \ -e "s|@TERMUX_PKG_SRCDIR@|$TERMUX_PKG_SRCDIR|g" \
-e "s|@LLVM_TARGETS@|ARM AArch64 X86|g" \ -e "s|@LLVM_TARGETS@|ARM AArch64 X86|g" \
@ -68,6 +51,11 @@ termux_step_post_extract_package () {
} }
termux_step_host_build () { termux_step_host_build () {
termux_download \
https://github.com/ldc-developers/ldc/releases/download/v${TERMUX_PKG_VERSION}/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \
$TERMUX_PKG_CACHEDIR/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz \
e33e02456878776b9ba864a47ceb445aa6474a24167f26eab36fd9bb4276dcc5
tar xf $TERMUX_PKG_CACHEDIR/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz tar xf $TERMUX_PKG_CACHEDIR/ldc2-${TERMUX_PKG_VERSION}-linux-x86_64.tar.xz
mv ldc2-${TERMUX_PKG_VERSION}-linux-x86_64 ldc-bootstrap mv ldc2-${TERMUX_PKG_VERSION}-linux-x86_64 ldc-bootstrap

18
packages/libgc/build.sh

@ -1,18 +1,14 @@
TERMUX_PKG_HOMEPAGE=http://www.hboehm.info/gc/ TERMUX_PKG_HOMEPAGE=http://www.hboehm.info/gc/
TERMUX_PKG_DESCRIPTION="Library providing the Boehm-Demers-Weiser conservative garbage collector" TERMUX_PKG_DESCRIPTION="Library providing the Boehm-Demers-Weiser conservative garbage collector"
TERMUX_PKG_VERSION=7.6.4 TERMUX_PKG_VERSION=(7.6.4
TERMUX_PKG_SHA256=b94c1f2535f98354811ee644dccab6e84a0cf73e477ca03fb5a3758fb1fecd1c 7.6.4)
TERMUX_PKG_SRCURL=https://github.com/ivmai/bdwgc/releases/download/v$TERMUX_PKG_VERSION/gc-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=(b94c1f2535f98354811ee644dccab6e84a0cf73e477ca03fb5a3758fb1fecd1c
5b823d5a685dd70caeef8fc50da7d763ba7f6167fe746abca7762e2835b3dd4e)
TERMUX_PKG_SRCURL=(https://github.com/ivmai/bdwgc/releases/download/v$TERMUX_PKG_VERSION/gc-$TERMUX_PKG_VERSION.tar.gz
https://github.com/ivmai/libatomic_ops/releases/download/v${TERMUX_PKG_VERSION[1]}/libatomic_ops-${TERMUX_PKG_VERSION[1]}.tar.gz)
TERMUX_PKG_RM_AFTER_INSTALL="share/gc" TERMUX_PKG_RM_AFTER_INSTALL="share/gc"
termux_step_post_extract_package () { termux_step_post_extract_package () {
LIBATOMIC_VERSION=7.6.4 mv libatomic_ops-${TERMUX_PKG_VERSION[1]} libatomic_ops
LIBATOMIC_FILE=libatomic_ops-${LIBATOMIC_VERSION}.tar.gz
termux_download \
https://github.com/ivmai/libatomic_ops/releases/download/v${LIBATOMIC_VERSION}/libatomic_ops-${LIBATOMIC_VERSION}.tar.gz \
$TERMUX_PKG_CACHEDIR/$LIBATOMIC_FILE \
5b823d5a685dd70caeef8fc50da7d763ba7f6167fe746abca7762e2835b3dd4e
tar xf $TERMUX_PKG_CACHEDIR/$LIBATOMIC_FILE
mv libatomic_ops-${LIBATOMIC_VERSION} libatomic_ops
./autogen.sh ./autogen.sh
} }

37
packages/libllvm/build.sh

@ -3,8 +3,14 @@ TERMUX_PKG_DESCRIPTION="Modular compiler and toolchain technologies library"
_PKG_MAJOR_VERSION=6.0 _PKG_MAJOR_VERSION=6.0
TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0 TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.0
TERMUX_PKG_REVISION=2 TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=1ff53c915b4e761ef400b803f07261ade637b0c269d99569f18040f3dcee4408 TERMUX_PKG_SHA256=(1ff53c915b4e761ef400b803f07261ade637b0c269d99569f18040f3dcee4408
TERMUX_PKG_SRCURL=https://releases.llvm.org/${TERMUX_PKG_VERSION}/llvm-${TERMUX_PKG_VERSION}.src.tar.xz e07d6dd8d9ef196cfc8e8bb131cbd6a2ed0b1caf1715f9d05b0f0eeaddb6df32
6b8c4a833cf30230c0213d78dbac01af21387b298225de90ab56032ca79c0e0b
7c0e050d5f7da3b057579fb3ea79ed7dc657c765011b402eb5bbe5663a7c38fc)
TERMUX_PKG_SRCURL=(https://releases.llvm.org/${TERMUX_PKG_VERSION}/llvm-${TERMUX_PKG_VERSION}.src.tar.xz
https://releases.llvm.org/${TERMUX_PKG_VERSION}/cfe-${TERMUX_PKG_VERSION}.src.tar.xz
https://llvm.org/releases/${TERMUX_PKG_VERSION}/lld-${TERMUX_PKG_VERSION}.src.tar.xz
https://releases.llvm.org/${TERMUX_PKG_VERSION}/openmp-${TERMUX_PKG_VERSION}.src.tar.xz)
TERMUX_PKG_HOSTBUILD=true TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_RM_AFTER_INSTALL=" TERMUX_PKG_RM_AFTER_INSTALL="
bin/clang-check bin/clang-check
@ -48,30 +54,9 @@ TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
TERMUX_PKG_HAS_DEBUG=no TERMUX_PKG_HAS_DEBUG=no
termux_step_post_extract_package () { termux_step_post_extract_package () {
local CLANG_SRC_TAR=cfe-${TERMUX_PKG_VERSION}.src.tar.xz mv cfe-${TERMUX_PKG_VERSION}.src tools/clang
termux_download \ mv lld-${TERMUX_PKG_VERSION}.src tools/lld
https://releases.llvm.org/${TERMUX_PKG_VERSION}/$CLANG_SRC_TAR \ mv openmp-${TERMUX_PKG_VERSION}.src projects/openmp
$TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR \
e07d6dd8d9ef196cfc8e8bb131cbd6a2ed0b1caf1715f9d05b0f0eeaddb6df32
tar -xf $TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR -C tools
mv tools/cfe-${TERMUX_PKG_VERSION}.src tools/clang
local LLD_SRC_TAR=lld-${TERMUX_PKG_VERSION}.src.tar.xz
termux_download \
https://llvm.org/releases/${TERMUX_PKG_VERSION}/$LLD_SRC_TAR \
$TERMUX_PKG_CACHEDIR/$LLD_SRC_TAR \
6b8c4a833cf30230c0213d78dbac01af21387b298225de90ab56032ca79c0e0b
tar -xf $TERMUX_PKG_CACHEDIR/$LLD_SRC_TAR -C tools
mv tools/lld-${TERMUX_PKG_VERSION}.src tools/lld
local OPENMP_SRC_TAR=openmp-${TERMUX_PKG_VERSION}.src.tar.xz
termux_download \
http://releases.llvm.org/${TERMUX_PKG_VERSION}/$OPENMP_SRC_TAR \
$TERMUX_PKG_CACHEDIR/$OPENMP_SRC_TAR \
7c0e050d5f7da3b057579fb3ea79ed7dc657c765011b402eb5bbe5663a7c38fc
tar -xf $TERMUX_PKG_CACHEDIR/$OPENMP_SRC_TAR -C projects
mv projects/openmp-${TERMUX_PKG_VERSION}.src projects/openmp
} }
termux_step_host_build () { termux_step_host_build () {

20
packages/linux-man-pages/build.sh

@ -1,8 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://www.kernel.org/doc/man-pages/ TERMUX_PKG_HOMEPAGE=https://www.kernel.org/doc/man-pages/
TERMUX_PKG_DESCRIPTION="Man pages for linux kernel and C library interfaces" TERMUX_PKG_DESCRIPTION="Man pages for linux kernel and C library interfaces"
TERMUX_PKG_VERSION=4.16 TERMUX_PKG_VERSION=(4.16
TERMUX_PKG_SHA256=47ffcc0d27d50e497e290b27e8d76dbed4550db14c881f25b771bcaf28354db4 2013)
TERMUX_PKG_SRCURL=https://www.kernel.org/pub/linux/docs/man-pages/man-pages-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=(47ffcc0d27d50e497e290b27e8d76dbed4550db14c881f25b771bcaf28354db4
19633a5c75ff7deab35b1d2c3d5b7748e7bd4ef4ab598b647bb7e7f60b90a808)
TERMUX_PKG_SRCURL=(https://www.kernel.org/pub/linux/docs/man-pages/man-pages-${TERMUX_PKG_VERSION}.tar.xz
https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-${TERMUX_PKG_VERSION[1]}-a.tar.xz)
TERMUX_PKG_DEPENDS="man" TERMUX_PKG_DEPENDS="man"
TERMUX_PKG_EXTRA_MAKE_ARGS="prefix=$TERMUX_PREFIX" TERMUX_PKG_EXTRA_MAKE_ARGS="prefix=$TERMUX_PREFIX"
# man.7 and mdoc.7 is included with mandoc: # man.7 and mdoc.7 is included with mandoc:
@ -15,17 +18,6 @@ TERMUX_MAKE_PROCESSSES=1
termux_step_pre_configure() { termux_step_pre_configure() {
# Bundle posix man pages in same package: # Bundle posix man pages in same package:
local _POSIX_TARFILE=man-pages-posix-2013-a.tar.xz
if [ ! -f $TERMUX_PKG_CACHEDIR/$_POSIX_TARFILE ]; then
termux_download \
https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/$_POSIX_TARFILE \
$TERMUX_PKG_CACHEDIR/$_POSIX_TARFILE \
19633a5c75ff7deab35b1d2c3d5b7748e7bd4ef4ab598b647bb7e7f60b90a808
fi
mkdir -p $TERMUX_PKG_TMPDIR/man-pages-posix
cd $TERMUX_PKG_TMPDIR/man-pages-posix
tar xf $TERMUX_PKG_CACHEDIR/$_POSIX_TARFILE
cd man-pages-posix-2013-a cd man-pages-posix-2013-a
make install make install
} }

18
packages/ncurses/build.sh

@ -1,8 +1,11 @@
TERMUX_PKG_HOMEPAGE=http://invisible-island.net/ncurses/ TERMUX_PKG_HOMEPAGE=http://invisible-island.net/ncurses/
TERMUX_PKG_DESCRIPTION="Library for text-based user interfaces in a terminal-independent manner" TERMUX_PKG_DESCRIPTION="Library for text-based user interfaces in a terminal-independent manner"
TERMUX_PKG_VERSION=6.1.20180512 TERMUX_PKG_VERSION=(6.1.20180512
TERMUX_PKG_SHA256=a0c7b776702f504200f2beb78c6f798532a8c345506aa634a57e67094316610d 9.22)
TERMUX_PKG_SRCURL=https://dl.bintray.com/termux/upstream/ncurses-${TERMUX_PKG_VERSION:0:3}-${TERMUX_PKG_VERSION:4}.tgz TERMUX_PKG_SHA256=(a0c7b776702f504200f2beb78c6f798532a8c345506aa634a57e67094316610d
e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd)
TERMUX_PKG_SRCURL=(https://dl.bintray.com/termux/upstream/ncurses-${TERMUX_PKG_VERSION:0:3}-${TERMUX_PKG_VERSION:4}.tgz
https://fossies.org/linux/misc/rxvt-unicode-${TERMUX_PKG_VERSION[1]}.tar.bz2)
# --without-normal disables static libraries: # --without-normal disables static libraries:
# --disable-stripping to disable -s argument to install which does not work when cross compiling: # --disable-stripping to disable -s argument to install which does not work when cross compiling:
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
@ -81,12 +84,5 @@ termux_step_post_massage () {
cp $TERMUX_PKG_TMPDIR/full-terminfo/v/{vt52,vt100,vt102} $TI/v/ cp $TERMUX_PKG_TMPDIR/full-terminfo/v/{vt52,vt100,vt102} $TI/v/
cp $TERMUX_PKG_TMPDIR/full-terminfo/x/xterm{,-color,-new,-16color,-256color,+256color} $TI/x/ cp $TERMUX_PKG_TMPDIR/full-terminfo/x/xterm{,-color,-new,-16color,-256color,+256color} $TI/x/
local RXVT_TAR=$TERMUX_PKG_CACHEDIR/rxvt-unicode-9.22.tar.bz2 tic -x -o $TI $TERMUX_PKG_SRCDIR/rxvt-unicode-${TERMUX_PKG_VERSION[1]}/doc/etc/rxvt-unicode.terminfo
termux_download https://fossies.org/linux/misc/rxvt-unicode-9.22.tar.bz2 \
$RXVT_TAR \
e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd
cd $TERMUX_PKG_TMPDIR
local TI_FILE=rxvt-unicode-9.22/doc/etc/rxvt-unicode.terminfo
tar xf $RXVT_TAR $TI_FILE
tic -x -o $TI $TI_FILE
} }

27
packages/perl/build.sh

@ -1,8 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://www.perl.org/ TERMUX_PKG_HOMEPAGE=https://www.perl.org/
TERMUX_PKG_DESCRIPTION="Capable, feature-rich programming language" TERMUX_PKG_DESCRIPTION="Capable, feature-rich programming language"
TERMUX_PKG_VERSION=5.26.2 TERMUX_PKG_VERSION=(5.26.2
TERMUX_PKG_SHA256=572f9cea625d6062f8a63b5cee9d3ee840800a001d2bb201a41b9a177ab7f70d 1.1.9)
TERMUX_PKG_SRCURL=http://www.cpan.org/src/5.0/perl-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=(572f9cea625d6062f8a63b5cee9d3ee840800a001d2bb201a41b9a177ab7f70d
0bbb450e48d07e7fdf867d578b1780ac8f0e8dc284d52301dac4d763b42f6041)
TERMUX_PKG_SRCURL=(http://www.cpan.org/src/5.0/perl-${TERMUX_PKG_VERSION}.tar.gz
https://github.com/arsv/perl-cross/releases/download/${TERMUX_PKG_VERSION[1]}/perl-cross-${TERMUX_PKG_VERSION[1]}.tar.gz)
TERMUX_PKG_BUILD_IN_SRC="yes" TERMUX_PKG_BUILD_IN_SRC="yes"
TERMUX_MAKE_PROCESSES=1 TERMUX_MAKE_PROCESSES=1
TERMUX_PKG_RM_AFTER_INSTALL="bin/perl${TERMUX_PKG_VERSION}" TERMUX_PKG_RM_AFTER_INSTALL="bin/perl${TERMUX_PKG_VERSION}"
@ -10,24 +13,12 @@ TERMUX_PKG_NO_DEVELSPLIT=yes
termux_step_post_extract_package () { termux_step_post_extract_package () {
# This port uses perl-cross: http://arsv.github.io/perl-cross/ # This port uses perl-cross: http://arsv.github.io/perl-cross/
local PERLCROSS_VERSION=1.1.9 cp -rf perl-cross-${TERMUX_PKG_VERSION[1]}/* .
local PERLCROSS_SHA256=0bbb450e48d07e7fdf867d578b1780ac8f0e8dc284d52301dac4d763b42f6041
local PERLCROSS_FILE=perl-cross-${PERLCROSS_VERSION}.tar.gz
local PERLCROSS_TAR=$TERMUX_PKG_CACHEDIR/$PERLCROSS_FILE
if [ ! -f $PERLCROSS_TAR ]; then
termux_download https://github.com/arsv/perl-cross/releases/download/$PERLCROSS_VERSION/$PERLCROSS_FILE \
$PERLCROSS_TAR \
$PERLCROSS_SHA256
fi
tar xf $PERLCROSS_TAR
cd perl-cross-${PERLCROSS_VERSION}
cp -Rf * ../
# Remove old installation to force fresh: # Remove old installation to force fresh:
rm -rf $TERMUX_PREFIX/lib/perl5 rm -rf $TERMUX_PREFIX/lib/perl5
rm -f $TERMUX_PREFIX/lib/libperl.so
# Export variable used by Kid.pm.patch: rm -f $TERMUX_PREFIX/include/perl
export TERMUX_PKG_SRCDIR
} }
termux_step_configure () { termux_step_configure () {

18
packages/pngquant/build.sh

@ -1,21 +1,17 @@
TERMUX_PKG_HOMEPAGE=https://pngquant.org TERMUX_PKG_HOMEPAGE=https://pngquant.org
TERMUX_PKG_DESCRIPTION="PNG image optimising utility" TERMUX_PKG_DESCRIPTION="PNG image optimising utility"
TERMUX_PKG_VERSION=2.11.7 TERMUX_PKG_VERSION=2.11.7
TERMUX_PKG_SHA256=0ca09a1f253b264e5aab8477b7f0e3cde51d9f88ed668b38ae057ced24076bda TERMUX_PKG_SHA256=(0ca09a1f253b264e5aab8477b7f0e3cde51d9f88ed668b38ae057ced24076bda
TERMUX_PKG_SRCURL=https://github.com/pornel/pngquant/archive/$TERMUX_PKG_VERSION.tar.gz 6b912616cfb60c5ff49f316649e1279bd7a1d797d6ace0bdbb532ebdf778a8bd)
# If both archives are .tar.gz then they overwrite eachother since they are the same version and hence the same name.
# Work around this by using .zip for one of them...
TERMUX_PKG_SRCURL=(https://github.com/pornel/pngquant/archive/$TERMUX_PKG_VERSION.tar.gz
https://github.com/ImageOptim/libimagequant/archive/$TERMUX_PKG_VERSION.zip)
TERMUX_PKG_DEPENDS="libpng" TERMUX_PKG_DEPENDS="libpng"
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas" TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-sse" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-sse"
termux_step_post_extract_package () { termux_step_post_extract_package () {
local LIBIMAGEQUANT_SRC_FOLDER=libimagequant-$TERMUX_PKG_VERSION mv $TERMUX_PKG_SRCDIR/libimagequant-$TERMUX_PKG_VERSION/* $TERMUX_PKG_SRCDIR/lib/
termux_download \
https://github.com/ImageOptim/libimagequant/archive/$TERMUX_PKG_VERSION.tar.gz \
$TERMUX_PKG_CACHEDIR/$LIBIMAGEQUANT_SRC_FOLDER.tar.gz \
aa5c9ae93f245f6703ca3f15c0ffe1ba647f66aac87bbfea0b58ebae9a4e37b5
tar -xf $TERMUX_PKG_CACHEDIR/$LIBIMAGEQUANT_SRC_FOLDER.tar.gz -C $TERMUX_PKG_SRCDIR
rmdir $TERMUX_PKG_SRCDIR/lib
mv $TERMUX_PKG_SRCDIR/$LIBIMAGEQUANT_SRC_FOLDER $TERMUX_PKG_SRCDIR/lib
} }

Loading…
Cancel
Save