Browse Source
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.android-5
71 changed files with 165 additions and 132 deletions
@ -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); |
@ -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; |
||||
|
} |
@ -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,6 +1,7 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://xiph.org/flac/ |
TERMUX_PKG_HOMEPAGE=https://xiph.org/flac/ |
||||
TERMUX_PKG_DESCRIPTION="FLAC (Free Lossless Audio Codec) library" |
TERMUX_PKG_DESCRIPTION="FLAC (Free Lossless Audio Codec) library" |
||||
TERMUX_PKG_VERSION=1.3.2 |
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_SRCURL=http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz |
||||
TERMUX_PKG_SHA256=4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c |
TERMUX_PKG_SHA256=4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c |
||||
TERMUX_PKG_DEPENDS="libogg" |
TERMUX_PKG_DEPENDS="libogg" |
||||
|
@ -1,18 +1,21 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://gcc.gnu.org/onlinedocs/libstdc++/ |
TERMUX_PKG_HOMEPAGE=http://gcc.gnu.org/onlinedocs/libstdc++/ |
||||
TERMUX_PKG_DESCRIPTION="The GNU Standard C++ Library (a.k.a. libstdc++-v3), necessary on android since the system libstdc++.so is stripped down" |
TERMUX_PKG_DESCRIPTION="The GNU Standard C++ Library (a.k.a. libstdc++-v3), necessary on android since the system libstdc++.so is stripped down" |
||||
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION |
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION |
||||
# Since every C++ package links against this by default (due |
TERMUX_PKG_REVISION=1 |
||||
# to the libstdc++.so -> libgnustl_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 () { |
termux_step_extract_into_massagedir() { |
||||
# We take the library here after massage step to |
if [ "$TERMUX_ARCH" = arm ]; then |
||||
# avoid stripping the library after running termux-elf-cleaner, |
local _STL_LIBFILE=$NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so |
||||
# which causes a broken library (program compiled on the |
elif [ "$TERMUX_ARCH" = i686 ]; then |
||||
# device linking to the library will segfault, at least on aarch64). |
local _STL_LIBFILE=$NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_shared.so |
||||
mkdir lib |
elif [ "$TERMUX_ARCH" = aarch64 ]; then |
||||
cp $TERMUX_PREFIX/lib/libgnustl_shared.so lib/ |
local _STL_LIBFILE=$NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/arm64-v8a/libgnustl_shared.so |
||||
|
elif [ "$TERMUX_ARCH" = x86_64 ]; then |
||||
|
local _STL_LIBFILE=$NDK/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/libgnustl_shared.so |
||||
|
else |
||||
|
termux_error_exit "Unsupported arch" |
||||
|
fi |
||||
|
|
||||
|
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib" |
||||
|
cp "$_STL_LIBFILE" "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib" |
||||
} |
} |
||||
|
@ -1,11 +0,0 @@ |
|||||
--- ./include/grpc++/impl/codegen/config.h 2017-06-28 01:16:01.000000000 +0530
|
|
||||
+++ ../config.h 2017-07-08 22:48:38.993186926 +0530
|
|
||||
@@ -49,8 +49,6 @@
|
|
||||
|
|
||||
typedef GRPC_CUSTOM_STRING string; |
|
||||
|
|
||||
-using std::to_string;
|
|
||||
-
|
|
||||
} // namespace grpc |
|
||||
|
|
||||
#endif // GRPCXX_IMPL_CODEGEN_CONFIG_H |
|
@ -1,20 +0,0 @@ |
|||||
diff -u -r ../llvm-4.0.0.src/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp ./tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
|
|
||||
--- ../llvm-4.0.0.src/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp 2016-11-30 18:57:18.000000000 +0100
|
|
||||
+++ ./tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp 2017-03-14 18:11:26.984865292 +0100
|
|
||||
@@ -12,6 +12,7 @@
|
|
||||
#include "clang/StaticAnalyzer/Core/Checker.h" |
|
||||
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" |
|
||||
#include "clang/StaticAnalyzer/Checkers/SValExplainer.h" |
|
||||
+#include "llvm/ADT/StringExtras.h"
|
|
||||
#include "llvm/ADT/StringSwitch.h" |
|
||||
|
|
||||
using namespace clang; |
|
||||
@@ -269,7 +270,7 @@
|
|
||||
unsigned NumTimesReached = Item.second.NumTimesReached; |
|
||||
ExplodedNode *N = Item.second.ExampleNode; |
|
||||
|
|
||||
- reportBug(std::to_string(NumTimesReached), BR, N);
|
|
||||
+ reportBug(llvm::utostr(NumTimesReached), BR, N);
|
|
||||
} |
|
||||
} |
|
||||
|
|
@ -1,20 +0,0 @@ |
|||||
diff -u -r ../llvm-4.0.0.src/tools/llvm-xray/xray-converter.cc ./tools/llvm-xray/xray-converter.cc
|
|
||||
--- ../llvm-4.0.0.src/tools/llvm-xray/xray-converter.cc 2017-02-27 18:01:04.000000000 +0100
|
|
||||
+++ ./tools/llvm-xray/xray-converter.cc 2017-03-14 18:30:35.979011376 +0100
|
|
||||
@@ -14,6 +14,7 @@
|
|
||||
|
|
||||
#include "xray-extract.h" |
|
||||
#include "xray-registry.h" |
|
||||
+#include "llvm/ADT/StringExtras.h"
|
|
||||
#include "llvm/DebugInfo/Symbolize/Symbolize.h" |
|
||||
#include "llvm/Support/EndianStream.h" |
|
||||
#include "llvm/Support/FileSystem.h" |
|
||||
@@ -95,7 +96,7 @@
|
|
||||
for (const auto &R : Records) { |
|
||||
Trace.Records.push_back({R.RecordType, R.CPU, R.Type, R.FuncId, |
|
||||
Symbolize ? FuncIdHelper.SymbolOrNumber(R.FuncId) |
|
||||
- : std::to_string(R.FuncId),
|
|
||||
+ : llvm::utostr(R.FuncId),
|
|
||||
R.TSC, R.TId}); |
|
||||
} |
|
||||
Output Out(OS, nullptr, 0); |
|
@ -1,6 +1,7 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://www.simplesystems.org/libtiff/ # Note that http://libtiff.org/ is hijacked |
TERMUX_PKG_HOMEPAGE=http://www.simplesystems.org/libtiff/ # Note that http://libtiff.org/ is hijacked |
||||
TERMUX_PKG_DESCRIPTION="Support for the Tag Image File Format (TIFF) for storing image data" |
TERMUX_PKG_DESCRIPTION="Support for the Tag Image File Format (TIFF) for storing image data" |
||||
TERMUX_PKG_VERSION=4.0.8 |
TERMUX_PKG_VERSION=4.0.8 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=http://download.osgeo.org/libtiff/tiff-${TERMUX_PKG_VERSION}.tar.gz |
TERMUX_PKG_SRCURL=http://download.osgeo.org/libtiff/tiff-${TERMUX_PKG_VERSION}.tar.gz |
||||
TERMUX_PKG_SHA256=59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910 |
TERMUX_PKG_SHA256=59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910 |
||||
TERMUX_PKG_DEPENDS="libjpeg-turbo, liblzma" |
TERMUX_PKG_DEPENDS="libjpeg-turbo, liblzma" |
||||
|
@ -1,6 +1,8 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://xapian.org |
TERMUX_PKG_HOMEPAGE=https://xapian.org |
||||
TERMUX_PKG_DESCRIPTION="Xapian search engine library" |
TERMUX_PKG_DESCRIPTION="Xapian search engine library" |
||||
TERMUX_PKG_VERSION=1.4.4 |
TERMUX_PKG_VERSION=1.4.4 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=http://oligarchy.co.uk/xapian/${TERMUX_PKG_VERSION}/xapian-core-${TERMUX_PKG_VERSION}.tar.xz |
TERMUX_PKG_SRCURL=http://oligarchy.co.uk/xapian/${TERMUX_PKG_VERSION}/xapian-core-${TERMUX_PKG_VERSION}.tar.xz |
||||
TERMUX_PKG_SHA256=a6a985a9841a452d75cf2169196b7ca6ebeef27da7c607078cd401ad041732d9 |
TERMUX_PKG_SHA256=a6a985a9841a452d75cf2169196b7ca6ebeef27da7c607078cd401ad041732d9 |
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_c_bigendian=no" |
# ac_cv_c_bigendian=no: We can use /proc/sys/kernel/random/uuid and do not need libuuid. |
||||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_c_bigendian=no ac_cv_header_uuid_uuid_h=no" |
||||
|
@ -1,5 +1,6 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://www.nongnu.org/lzip/ |
TERMUX_PKG_HOMEPAGE=http://www.nongnu.org/lzip/ |
||||
TERMUX_PKG_DESCRIPTION="Lossless data compressor similar to gzip and bzip2" |
TERMUX_PKG_DESCRIPTION="Lossless data compressor similar to gzip and bzip2" |
||||
TERMUX_PKG_VERSION=1.19 |
TERMUX_PKG_VERSION=1.19 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=http://download.savannah.gnu.org/releases/lzip/lzip-${TERMUX_PKG_VERSION}.tar.lz |
TERMUX_PKG_SRCURL=http://download.savannah.gnu.org/releases/lzip/lzip-${TERMUX_PKG_VERSION}.tar.lz |
||||
TERMUX_PKG_SHA256=c8b7a098a42429d34ca1504afcdfd9aeeaf249469d52039df05d0b5a2ad7ac77 |
TERMUX_PKG_SHA256=c8b7a098a42429d34ca1504afcdfd9aeeaf249469d52039df05d0b5a2ad7ac77 |
||||
|
@ -1,5 +1,6 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/ocrad/ocrad.html |
TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/ocrad/ocrad.html |
||||
TERMUX_PKG_DESCRIPTION="Optical Character Recognition program based on a feature extraction method" |
TERMUX_PKG_DESCRIPTION="Optical Character Recognition program based on a feature extraction method" |
||||
TERMUX_PKG_VERSION=0.26 |
TERMUX_PKG_VERSION=0.26 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/ocrad/ocrad-${TERMUX_PKG_VERSION}.tar.lz |
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/ocrad/ocrad-${TERMUX_PKG_VERSION}.tar.lz |
||||
TERMUX_PKG_SHA256=c383d37869baa0990d38d38836d4d567e9e2862aa0cd704868b62dafeac18e3c |
TERMUX_PKG_SHA256=c383d37869baa0990d38d38836d4d567e9e2862aa0cd704868b62dafeac18e3c |
||||
|
@ -1,6 +1,7 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://nixos.org/patchelf.html |
TERMUX_PKG_HOMEPAGE=https://nixos.org/patchelf.html |
||||
TERMUX_PKG_DESCRIPTION="Utility to modify the dynamic linker and RPATH of ELF executables" |
TERMUX_PKG_DESCRIPTION="Utility to modify the dynamic linker and RPATH of ELF executables" |
||||
TERMUX_PKG_VERSION=0.9 |
TERMUX_PKG_VERSION=0.9 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SHA256=a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83 |
TERMUX_PKG_SHA256=a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83 |
||||
TERMUX_PKG_SRCURL=https://nixos.org/releases/patchelf/patchelf-${TERMUX_PKG_VERSION}/patchelf-${TERMUX_PKG_VERSION}.tar.bz2 |
TERMUX_PKG_SRCURL=https://nixos.org/releases/patchelf/patchelf-${TERMUX_PKG_VERSION}/patchelf-${TERMUX_PKG_VERSION}.tar.bz2 |
||||
TERMUX_PKG_BUILD_IN_SRC=yes |
TERMUX_PKG_BUILD_IN_SRC=yes |
||||
|
@ -1,5 +1,6 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://www.colm.net/open-source/ragel/ |
TERMUX_PKG_HOMEPAGE=http://www.colm.net/open-source/ragel/ |
||||
TERMUX_PKG_DESCRIPTION="Compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code" |
TERMUX_PKG_DESCRIPTION="Compiles finite state machines from regular languages into executable C, C++, Objective-C, or D code" |
||||
TERMUX_PKG_VERSION=6.10 |
TERMUX_PKG_VERSION=6.10 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=http://www.colm.net/files/ragel/ragel-${TERMUX_PKG_VERSION}.tar.gz |
TERMUX_PKG_SRCURL=http://www.colm.net/files/ragel/ragel-${TERMUX_PKG_VERSION}.tar.gz |
||||
TERMUX_PKG_SHA256=5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f |
TERMUX_PKG_SHA256=5f156edb65d20b856d638dd9ee2dfb43285914d9aa2b6ec779dac0270cd56c3f |
||||
|
@ -1,12 +0,0 @@ |
|||||
diff -u -r ../timew-1.0.0/src/libshared/src/Pig.cpp ./src/libshared/src/Pig.cpp
|
|
||||
--- ../timew-1.0.0/src/libshared/src/Pig.cpp 2016-08-17 17:22:34.000000000 -0400
|
|
||||
+++ ./src/libshared/src/Pig.cpp 2016-09-05 17:58:52.282716956 -0400
|
|
||||
@@ -251,7 +251,7 @@
|
|
||||
|
|
||||
if (_cursor > save) |
|
||||
{ |
|
||||
- result = std::strtoimax (_text.substr (save, _cursor - save).c_str (), NULL, 10);
|
|
||||
+ result = strtoimax (_text.substr (save, _cursor - save).c_str (), NULL, 10);
|
|
||||
return true; |
|
||||
} |
|
||||
|
|
@ -1,5 +1,6 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://github.com/fornwall/utfdecode |
TERMUX_PKG_HOMEPAGE=http://github.com/fornwall/utfdecode |
||||
TERMUX_PKG_DESCRIPTION="Tool for decoding, encoding and debugging unicode" |
TERMUX_PKG_DESCRIPTION="Tool for decoding, encoding and debugging unicode" |
||||
TERMUX_PKG_VERSION=0.3.4 |
TERMUX_PKG_VERSION=0.3.4 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=http://fornwall.net/releases/utfdecode/utfdecode-${TERMUX_PKG_VERSION}.tar.gz |
TERMUX_PKG_SRCURL=http://fornwall.net/releases/utfdecode/utfdecode-${TERMUX_PKG_VERSION}.tar.gz |
||||
TERMUX_PKG_SHA256=5fd1473f6cf6bdedeb33569c3b0f6823aceda366c714f6a475e2d28767f99b5a |
TERMUX_PKG_SHA256=5fd1473f6cf6bdedeb33569c3b0f6823aceda366c714f6a475e2d28767f99b5a |
||||
|
@ -1,5 +1,6 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://github.com/fornwall/vtutils |
TERMUX_PKG_HOMEPAGE=https://github.com/fornwall/vtutils |
||||
TERMUX_PKG_DESCRIPTION="Utilities for testing and working with virtual terminals" |
TERMUX_PKG_DESCRIPTION="Utilities for testing and working with virtual terminals" |
||||
TERMUX_PKG_VERSION=0.5 |
TERMUX_PKG_VERSION=0.5 |
||||
|
TERMUX_PKG_REVISION=1 |
||||
TERMUX_PKG_SRCURL=https://fornwall.net/releases/vtutils/vtutils-${TERMUX_PKG_VERSION}.tar.gz |
TERMUX_PKG_SRCURL=https://fornwall.net/releases/vtutils/vtutils-${TERMUX_PKG_VERSION}.tar.gz |
||||
TERMUX_PKG_SHA256=ef0b11f9570697f53bcda7a61093f8d472afee2c8551b5b35e9b5b7c1539c2c6 |
TERMUX_PKG_SHA256=ef0b11f9570697f53bcda7a61093f8d472afee2c8551b5b35e9b5b7c1539c2c6 |
||||
|
Loading…
Reference in new issue