6c29aaa1c7
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.
35 lines
1.4 KiB
Bash
35 lines
1.4 KiB
Bash
TERMUX_PKG_VERSION=1.4.1
|
|
TERMUX_PKG_REVISION=1
|
|
TERMUX_PKG_DESCRIPTION="High performance, open source, general RPC framework that puts mobile and HTTP/2 first"
|
|
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
|
|
TERMUX_PKG_SRCURL=https://github.com/grpc/grpc/archive/v$TERMUX_PKG_VERSION.tar.gz
|
|
TERMUX_PKG_DEPENDS="openssl, protobuf, c-ares"
|
|
TERMUX_PKG_SHA256=60840ef0e9b71f47cb73d4e220089b3d1e78dbfa011ae128f7688622f287b543
|
|
TERMUX_PKG_FOLDERNAME=grpc-$TERMUX_PKG_VERSION
|
|
TERMUX_PKG_HOSTBUILD=true
|
|
TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
|
-DgRPC_CARES_PROVIDER=package
|
|
-DgRPC_PROTOBUF_PROVIDER=package
|
|
-DgRPC_SSL_PROVIDER=package
|
|
-DgRPC_ZLIB_PROVIDER=package
|
|
-D_gRPC_PROTOBUF_PROTOC=$TERMUX_TOPDIR/libprotobuf/host-build/src/protoc
|
|
"
|
|
|
|
termux_step_host_build () {
|
|
termux_setup_cmake
|
|
local protoinstall=$TERMUX_TOPDIR/libprotobuf/host-build/install
|
|
cmake $TERMUX_PKG_SRCDIR -G "Unix Makefiles" \
|
|
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS \
|
|
-DCMAKE_CXX_FLAGS="-I$protoinstall/include -L$protoinstall/lib" \
|
|
-D_gRPC_PROTOBUF_LIBRARIES="-lprotobuf -lprotoc"
|
|
make -j $TERMUX_MAKE_PROCESSES grpc_cpp_plugin
|
|
}
|
|
|
|
termux_step_pre_configure () {
|
|
sed "s|@PATH_TO_PLUGIN@|$TERMUX_PKG_HOSTBUILD_DIR/grpc_cpp_plugin|g" $TERMUX_PKG_BUILDER_DIR/CMakeLists.txt.diff | patch -p1
|
|
|
|
export GRPC_CROSS_COMPILE=true
|
|
LDFLAGS="$LDFLAGS -lprotobuf -lprotoc -lcares -llog -lz"
|
|
}
|