Skip to content

Commit

Permalink
Transition from gnustl to libc++
Browse files Browse the repository at this point in the history
This will make things as std::to_string() and other C++ features
work with a modern and supported C++ library.

We package up libc++_shared.so and bump the revision of every C++
using package to make it rebuild against it.

Users who have built C++ using libraries or programs will probably
need to rebuild them if they are linked against Termux-supplied
libraries, as user code was previously linked against gnustl while
the system libraries are now using libc++, and it's not a good idea
to mix C++ standard libraries in a program.
  • Loading branch information
fornwall committed Jul 13, 2017
1 parent b4d3c3f commit d946e67
Show file tree
Hide file tree
Showing 71 changed files with 165 additions and 132 deletions.
38 changes: 22 additions & 16 deletions build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ termux_setup_golang() {

# Utility function for cmake-built packages to setup a current cmake.
termux_setup_cmake() {
local TERMUX_CMAKE_MAJORVESION=3.8
local TERMUX_CMAKE_MINORVERSION=2
local TERMUX_CMAKE_MAJORVESION=3.9
local TERMUX_CMAKE_MINORVERSION="0-rc6"
local TERMUX_CMAKE_VERSION=$TERMUX_CMAKE_MAJORVESION.$TERMUX_CMAKE_MINORVERSION
local TERMUX_CMAKE_TARNAME=cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64.tar.gz
local TERMUX_CMAKE_TARFILE=$TERMUX_PKG_TMPDIR/$TERMUX_CMAKE_TARNAME
local TERMUX_CMAKE_FOLDER=$TERMUX_COMMON_CACHEDIR/cmake-$TERMUX_CMAKE_VERSION
if [ ! -d "$TERMUX_CMAKE_FOLDER" ]; then
termux_download https://cmake.org/files/v$TERMUX_CMAKE_MAJORVESION/$TERMUX_CMAKE_TARNAME \
"$TERMUX_CMAKE_TARFILE" \
33e4851d3219b720f4b64fcf617151168f1bffdf5afad25eb4b7f5f58cee3a08
68456efed8207381c7724411558e7a3ed6503932f8f3127a3ba640e624026b1a
rm -Rf "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64"
tar xf "$TERMUX_CMAKE_TARFILE" -C "$TERMUX_PKG_TMPDIR"
mv "$TERMUX_PKG_TMPDIR/cmake-${TERMUX_CMAKE_VERSION}-Linux-x86_64" \
Expand Down Expand Up @@ -295,7 +295,7 @@ termux_step_start_build() {
TERMUX_STANDALONE_TOOLCHAIN="$TERMUX_TOPDIR/_lib/${TERMUX_NDK_VERSION}-${TERMUX_ARCH}-${TERMUX_PKG_API_LEVEL}"
# Bump the below version if a change is made in toolchain setup to ensure
# that everyone gets an updated toolchain:
TERMUX_STANDALONE_TOOLCHAIN+="-v8"
TERMUX_STANDALONE_TOOLCHAIN+="-v9"

if [ -n "${TERMUX_PKG_BLACKLISTED_ARCHES:=""}" ] && [ "$TERMUX_PKG_BLACKLISTED_ARCHES" != "${TERMUX_PKG_BLACKLISTED_ARCHES/$TERMUX_ARCH/}" ]; then
echo "Skipping building $TERMUX_PKG_NAME for arch $TERMUX_ARCH"
Expand Down Expand Up @@ -534,8 +534,12 @@ termux_step_setup_toolchain() {
"$NDK/build/tools/make_standalone_toolchain.py" \
--api "$TERMUX_PKG_API_LEVEL" \
--arch $_NDK_ARCHNAME \
--stl=libc++ \
--install-dir $_TERMUX_TOOLCHAIN_TMPDIR

# Remove android-support header wrapping not needed on android-21:
rm -Rf $_TERMUX_TOOLCHAIN_TMPDIR/sysroot/usr/local

local wrapped plusplus CLANG_TARGET=$TERMUX_HOST_PLATFORM
if [ $TERMUX_ARCH = arm ]; then CLANG_TARGET=${CLANG_TARGET/arm-/armv7a-}; fi
for wrapped in ${TERMUX_HOST_PLATFORM}-clang clang; do
Expand All @@ -550,11 +554,7 @@ termux_step_setup_toolchain() {
done
done

if [ "$TERMUX_ARCH" = "arm" ]; then
# Fix to allow e.g. <bits/c++config.h> to be included:
cp $_TERMUX_TOOLCHAIN_TMPDIR/include/c++/4.9.x/arm-linux-androideabi/armv7-a/bits/* \
$_TERMUX_TOOLCHAIN_TMPDIR/include/c++/4.9.x/bits
elif [ "$TERMUX_ARCH" = "aarch64" ]; then
if [ "$TERMUX_ARCH" = "aarch64" ]; then
# Use gold by default to work around https://github.com/android-ndk/ndk/issues/148
cp $_TERMUX_TOOLCHAIN_TMPDIR/bin/aarch64-linux-android-ld.gold \
$_TERMUX_TOOLCHAIN_TMPDIR/bin/aarch64-linux-android-ld
Expand Down Expand Up @@ -596,7 +596,8 @@ termux_step_setup_toolchain() {
mv $_TERMUX_TOOLCHAIN_TMPDIR $TERMUX_STANDALONE_TOOLCHAIN
fi

if [ ! -f $TERMUX_PREFIX/lib/libstdc++.so ]; then
local _STL_LIBFILE_NAME=libc++_shared.so
if [ ! -f $TERMUX_PREFIX/lib/libstdc++.so ] || [ `readlink $TERMUX_PREFIX/lib/libstdc++.so` != $_STL_LIBFILE_NAME ]; then
# Setup libgnustl_shared.so in $PREFIX/lib and libstdc++.so as a symlink to it,

This comment has been minimized.

Copy link
@vishalbiswas

vishalbiswas Jul 14, 2017

Contributor

Comment says gnustl_shared

# so that other C++ using packages links to it instead of the default android
# C++ library which does not support exceptions or STL:
Expand All @@ -607,16 +608,20 @@ termux_step_setup_toolchain() {
# which is part of the base Termux installation.
mkdir -p "$TERMUX_PREFIX/lib"
cd "$TERMUX_PREFIX/lib"
_STL_LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/libgnustl_shared.so

local _STL_LIBFILE=
if [ "$TERMUX_ARCH" = arm ]; then
_STL_LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/armv7-a/libgnustl_shared.so
local _STL_LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/armv7-a/$_STL_LIBFILE_NAME
elif [ "$TERMUX_ARCH" = x86_64 ]; then
_STL_LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib64/libgnustl_shared.so
local _STL_LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib64/$_STL_LIBFILE_NAME
else
local _STL_LIBFILE=$TERMUX_STANDALONE_TOOLCHAIN/${TERMUX_HOST_PLATFORM}/lib/$_STL_LIBFILE_NAME
fi

cp "$_STL_LIBFILE" .
$STRIP --strip-unneeded libgnustl_shared.so
$TERMUX_ELF_CLEANER libgnustl_shared.so
ln -f -s libgnustl_shared.so libstdc++.so
$STRIP --strip-unneeded $_STL_LIBFILE_NAME
$TERMUX_ELF_CLEANER $_STL_LIBFILE_NAME
ln -f -s $_STL_LIBFILE_NAME libstdc++.so
fi

export PKG_CONFIG_LIBDIR="$TERMUX_PKG_CONFIG_LIBDIR"
Expand Down Expand Up @@ -771,6 +776,7 @@ termux_step_configure_cmake () {
# pick up cross compiled binutils tool in $PREFIX/bin:
cmake -G 'Unix Makefiles' "$TERMUX_PKG_SRCDIR" \
-DCMAKE_AR="$(which $AR)" \
-DCMAKE_UNAME="$(which uname)" \
-DCMAKE_RANLIB="$(which $RANLIB)" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_CROSSCOMPILING=True \
Expand Down
8 changes: 6 additions & 2 deletions packages/aapt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TERMUX_PKG_DESCRIPTION="Android Asset Packaging Tool"
_TAG_VERSION=7.0.0
_TAG_REVISION=14
TERMUX_PKG_VERSION=${_TAG_VERSION}.${_TAG_REVISION}
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_DEPENDS="libexpat, libpng, libzopfli"

Expand Down Expand Up @@ -176,7 +176,9 @@ termux_step_make_install () {
libbase_linux_src_files="\
errors_unix.cpp"
# __USE_BSD for DEFFILEMODE to be defined by <sys/stat.h>.
$CXX $CXXFLAGS $CPPFLAGS -std=c++11 \
$CXX $CXXFLAGS $CPPFLAGS \
-std=c++11 \
-include memory \
-D__USE_BSD \
-isystem $AOSP_INCLUDE_DIR \
$libbase_src_files $libbase_linux_src_files \
Expand Down Expand Up @@ -234,6 +236,7 @@ termux_step_make_install () {
sed -i 's%#include <binder/TextOutput.h>%%' ResourceTypes.cpp
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS -isystem $AOSP_INCLUDE_DIR \
-std=c++11 \
-include memory \
$commonSources \
-landroid-cutils \
-landroid-utils \
Expand All @@ -254,6 +257,7 @@ termux_step_make_install () {
sed "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PKG_BUILDER_DIR/aapt-Main.cpp.patch.txt | patch -p1
$CXX $CXXFLAGS $CPPFLAGS $LDFLAGS \
-std=c++11 \
-include memory \
-DANDROID_SMP=1 \
-DNDEBUG=1 \
-DHAVE_ENDIAN_H=1 -DHAVE_POSIX_FILEMAP=1 -DHAVE_OFF64_T=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_PTHREADS=1 \
Expand Down
8 changes: 5 additions & 3 deletions packages/apt/build.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
TERMUX_PKG_DEPENDS="liblzma, dpkg, gpgv"
TERMUX_PKG_DEPENDS="liblzma, dpkg, gpgv, libc++"
# Wait with updating to later version until the NDK supports std::to_string() and other
# functions (hopefully in r15, https://github.com/android-ndk/ndk/issues/82).
# Updating to apt 1.4 will also get rid of the build hacks used as apt has transitioned
# to a clean cmake build system.
TERMUX_PKG_VERSION=1.2.12
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
# TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SRCURL=https://launchpad.net/ubuntu/+archive/primary/+files/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--no-create ac_cv_lib_bz2_BZ2_bzopen=no"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--no-create"
TERMUX_PKG_FOLDERNAME=apt-${TERMUX_PKG_VERSION}
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_ESSENTIAL=yes
Expand All @@ -25,6 +25,8 @@ termux_step_pre_configure () {
perl -p -i -e "s/TERMUX_ARCH/$TERMUX_ARCH/" $TERMUX_PKG_SRCDIR/configure

rm $TERMUX_PKG_SRCDIR/apt-pkg/{cdrom.cc,indexcopy.cc}

export ac_cv_lib_bz2_BZ2_bzopen=no
}

termux_step_make_install () {
Expand Down
1 change: 1 addition & 0 deletions packages/aria2/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://aria2.github.io
TERMUX_PKG_DESCRIPTION="Download utility supporting HTTP/HTTPS, FTP, BitTorrent and Metalink"
TERMUX_PKG_VERSION=1.32.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/aria2/aria2/releases/download/release-${TERMUX_PKG_VERSION}/aria2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=546e9194a9135d665fce572cb93c88f30fb5601d113bfa19951107ced682dc50
TERMUX_PKG_DEPENDS="c-ares, openssl, libxml2"
Expand Down
2 changes: 1 addition & 1 deletion packages/boost/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://boost.org
TERMUX_PKG_DESCRIPTION="Free peer-reviewed portable C++ source libraries"
TERMUX_PKG_VERSION=1.64.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://sourceforge.net/projects/boost/files/boost/${TERMUX_PKG_VERSION}/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2
TERMUX_PKG_SHA256=7bcc5caace97baa948931d712ea5f37038dbb1c5d89b43ad4def4ed7cb683332
TERMUX_PKG_FOLDERNAME="boost_${TERMUX_PKG_VERSION//./_}"
Expand Down
1 change: 1 addition & 0 deletions packages/cgdb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://cgdb.github.io/
TERMUX_PKG_DESCRIPTION="A lightweight curses (terminal-based) interface to the GNU Debugger (GDB)"
TERMUX_PKG_DEPENDS="ncurses,readline,gdb,libutil"
TERMUX_PKG_VERSION=0.7.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://cgdb.me/files/cgdb-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=bf7a9264668db3f9342591b08b2cc3bbb08e235ba2372877b4650b70c6fb5423
TERMUX_PKG_FOLDERNAME=cgdb-${TERMUX_PKG_VERSION}
Expand Down
1 change: 1 addition & 0 deletions packages/cmake/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://cmake.org/
TERMUX_PKG_DESCRIPTION="Family of tools designed to build, test and package software"
_MAJOR_VERSION=3.8
TERMUX_PKG_VERSION=${_MAJOR_VERSION}.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://www.cmake.org/files/v${_MAJOR_VERSION}/cmake-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d
TERMUX_PKG_DEPENDS="libarchive, libcurl, libexpat, jsoncpp, libuv, librhash"
Expand Down
1 change: 1 addition & 0 deletions packages/elfutils/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://sourceware.org/elfutils/
TERMUX_PKG_DESCRIPTION="ELF object file access library"
TERMUX_PKG_VERSION=0.168
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/elfutils/${TERMUX_PKG_VERSION}/elfutils-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276
# libandroid-support for langinfo.
Expand Down
1 change: 1 addition & 0 deletions packages/fish/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://fishshell.com/
TERMUX_PKG_DESCRIPTION="Shell geared towards interactive use"
TERMUX_PKG_VERSION=2.6.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/fish-shell/fish-shell/releases/download/$TERMUX_PKG_VERSION/fish-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7ee5bbd671c73e5323778982109241685d58a836e52013e18ee5d9f2e638fdfb
# fish calls 'tput' from ncurses-utils, at least when cancelling (Ctrl+C) a command line.
Expand Down
12 changes: 12 additions & 0 deletions packages/fish/src-wutil.cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -u -r ../fish-2.6.0/src/wutil.cpp ./src/wutil.cpp
--- ../fish-2.6.0/src/wutil.cpp 2017-06-03 14:45:13.000000000 +0200
+++ ./src/wutil.cpp 2017-07-13 22:31:47.791569324 +0200
@@ -290,7 +290,7 @@
// have to grub through sys_nerr and sys_errlist directly On GNU toolchain, this will produce a
// deprecation warning from the linker (!!), which appears impossible to suppress!
const char *safe_strerror(int err) {
-#if defined(__UCLIBC__)
+#if defined(__UCLIBC__) || defined(__ANDROID__)
// uClibc does not have sys_errlist, however, its strerror is believed to be async-safe.
// See issue #808.
return strerror(err);
1 change: 1 addition & 0 deletions packages/gdb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gdb/
TERMUX_PKG_DESCRIPTION="The standard GNU Debugger that runs on many Unix-like systems and works for many programming languages"
TERMUX_PKG_DEPENDS="liblzma, libexpat, readline"
TERMUX_PKG_VERSION=7.12.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gdb/gdb-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186
# gdb can not build with our normal --disable-static: https://sourceware.org/bugzilla/show_bug.cgi?id=15916
Expand Down
1 change: 1 addition & 0 deletions packages/gettext/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gettext/
TERMUX_PKG_DESCRIPTION="GNU Internationalization utilities"
TERMUX_PKG_VERSION=0.19.8
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gettext/gettext-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=9c1781328238caa1685d7bc7a2e1dcf1c6c134e86b42ed554066734b621bd12f
TERMUX_PKG_BUILD_IN_SRC=yes
Expand Down
1 change: 1 addition & 0 deletions packages/gnuchess/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/chess/
TERMUX_PKG_DESCRIPTION="Chess-playing program"
TERMUX_PKG_VERSION=6.2.4
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/chess/gnuchess-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=3c425c0264f253fc5cc2ba969abe667d77703c728770bd4b23c456cbe5e082ef
TERMUX_PKG_DEPENDS="ncurses, readline"
Expand Down
2 changes: 1 addition & 1 deletion packages/gnuplot/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://gnuplot.info/
TERMUX_PKG_DESCRIPTION="Command-line driven graphing utility"
TERMUX_PKG_VERSION=5.0.6
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/gnuplot/gnuplot/${TERMUX_PKG_VERSION}/gnuplot-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=5bbe4713e555c2e103b7d4ffd45fca69551fff09cf5c3f9cb17428aaacc9b460
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-x --with-lua=no --with-bitmap-terminals"
Expand Down
1 change: 1 addition & 0 deletions packages/googletest/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://github.com/google/googletest
TERMUX_PKG_DESCRIPTION="Google C++ testing framework"
TERMUX_PKG_VERSION=1.8.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/google/googletest/archive/release-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8
TERMUX_PKG_FOLDERNAME=googletest-release-$TERMUX_PKG_VERSION
Expand Down
2 changes: 1 addition & 1 deletion packages/graphviz/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://www.graphviz.org/
TERMUX_PKG_DESCRIPTION="Rich set of graph drawing tools"
TERMUX_PKG_MAINTAINER="Dustin DeWeese @HackerFoo"
TERMUX_PKG_VERSION=2.40.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421
TERMUX_PKG_DEPENDS="libandroid-glob,libcairo,pango,libexpat,libltdl,librsvg,libgd"
Expand Down
2 changes: 1 addition & 1 deletion packages/harfbuzz/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://www.freedesktop.org/wiki/Software/HarfBuzz/
TERMUX_PKG_DESCRIPTION="OpenType text shaping engine"
TERMUX_PKG_VERSION=1.4.6
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=21a78b81cd20cbffdb04b59ac7edfb410e42141869f637ae1d6778e74928d293
TERMUX_PKG_SRCURL=https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_DEPENDS="freetype,glib,libbz2,libpng,libgraphite"
Expand Down
3 changes: 2 additions & 1 deletion packages/ht/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
TERMUX_PKG_HOMEPAGE=http://hte.sourceforge.net/
TERMUX_PKG_DESCRIPTION="File editor/viewer/analyzer for executables"
TERMUX_PKG_VERSION=2.1.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/hte/ht-source/ht-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=31f5e8e2ca7f85d40bb18ef518bf1a105a6f602918a0755bc649f3f407b75d70
TERMUX_PKG_DEPENDS="ncurses"
TERMUX_PKG_DEPENDS="ncurses, liblzo"

termux_step_post_configure () {
mkdir -p $TERMUX_PKG_BUILDDIR/tools/
Expand Down
12 changes: 12 additions & 0 deletions packages/ht/htapp.cc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -u -r ../ht-2.1.0/htapp.cc ./htapp.cc
--- ../ht-2.1.0/htapp.cc 2014-09-14 17:55:26.000000000 +0200
+++ ./htapp.cc 2017-07-13 11:21:19.614513024 +0200
@@ -3023,7 +3023,7 @@
{
uint a = 2;
uint b = u/a;
- while (abs(a - b) > 1) {
+ while (abs(a - (long long) b) > 1) {
a = (a+b)/2;
b = u/a;
}
1 change: 1 addition & 0 deletions packages/hunspell/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://hunspell.github.io
TERMUX_PKG_DESCRIPTION="Spell checker"
TERMUX_PKG_VERSION=1.6.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/hunspell/hunspell/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=30f593733c50b794016bb03d31fd2a2071e4610c6fa4708e33edad2335102c49
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ui --with-readline"
Expand Down
1 change: 1 addition & 0 deletions packages/jsoncpp/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://github.com/open-source-parsers/jsoncpp
TERMUX_PKG_DESCRIPTION="C++ library for interacting with JSON"
TERMUX_PKG_VERSION=1.8.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/open-source-parsers/jsoncpp/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=5deb2462cbf0c0121c9d6c9823ec72fe71417e34242e3509bc7c003d526465bc
TERMUX_PKG_FOLDERNAME=jsoncpp-${TERMUX_PKG_VERSION}
Expand Down
1 change: 1 addition & 0 deletions packages/ledger/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://ledger-cli.org/
TERMUX_PKG_DESCRIPTION="Powerful, double-entry accounting system"
TERMUX_PKG_VERSION=3.1.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/ledger/ledger/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_FOLDERNAME="ledger-${TERMUX_PKG_VERSION}"
TERMUX_PKG_SHA256=90f06561ab692b192d46d67bc106158da9c6c6813cc3848b503243a9dfd8548a
Expand Down
1 change: 1 addition & 0 deletions packages/lftp/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://lftp.tech/
TERMUX_PKG_DESCRIPTION="FTP/HTTP client and file transfer program"
TERMUX_PKG_VERSION=4.8.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://lftp.tech/ftp/lftp-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=7a2880968088b4aeec43b6b6680fef0e065e1dddcce9b409390157e9766b690f
# (1) Android has dn_expand, but lftp assumes that dn_skipname then exists, which it does not on android.
Expand Down
14 changes: 14 additions & 0 deletions packages/libc++/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
TERMUX_PKG_HOMEPAGE=https://libcxx.llvm.org/
TERMUX_PKG_DESCRIPTION="C++ Standard Library"
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
# Since every C++ package links against this by default (due
# to the libstdc++.so -> libc++_shared.so setup in
# build-package.sh) this package is considered essential,
# and other packages does not need to declare explicit
# dependency on it.
TERMUX_PKG_ESSENTIAL=yes

termux_step_post_massage () {
mkdir lib
cp $TERMUX_PREFIX/lib/libc++_shared.so lib/
}
1 change: 1 addition & 0 deletions packages/libcaca/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://caca.zoy.org/wiki/libcaca
TERMUX_PKG_DESCRIPTION="Graphics library that outputs text instead of pixels"
TERMUX_PKG_VERSION=0.99.beta19
TERMUX_PKG_REVISION=1
# Switched to mirror on 2014-12-22 since master was down:
TERMUX_PKG_SRCURL=http://fossies.org/linux/privat/libcaca-${TERMUX_PKG_VERSION}.tar.gz
# http://caca.zoy.org/files/libcaca/libcaca-${TERMUX_PKG_VERSION}.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion packages/libcln/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://www.ginac.de/CLN/
TERMUX_PKG_DESCRIPTION="CLN is a library for efficient computations with all kinds of numbers in arbitrary precision"
TERMUX_PKG_VERSION=1.3.4
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://www.ginac.de/CLN/cln-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=2d99d7c433fb60db1e28299298a98354339bdc120d31bb9a862cafc5210ab748
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-gnu-ld=no"
Expand Down
1 change: 1 addition & 0 deletions packages/libflac/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://xiph.org/flac/
TERMUX_PKG_DESCRIPTION="FLAC (Free Lossless Audio Codec) library"
TERMUX_PKG_VERSION=1.3.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz
TERMUX_PKG_SHA256=4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c
TERMUX_PKG_DEPENDS="libogg"
Loading

1 comment on commit d946e67

@vishalbiswas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do all of these packages build successfully with libc++?

Please sign in to comment.