libgrpc: Update from 1.4.7 to 1.12.0
This commit is contained in:
parent
102122027d
commit
3172075d3d
@ -9,12 +9,16 @@
|
||||
endif()
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
@@ -305,7 +305,7 @@
|
||||
return()
|
||||
endif()
|
||||
|
||||
- set(_protobuf_include_path -I . -I ${PROTOBUF_WELLKNOWN_IMPORT_DIR})
|
||||
+ set(_protobuf_include_path -I . -I @TERMUX_PREFIX@/include)
|
||||
foreach(FIL ${ARGN})
|
||||
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
|
||||
get_filename_component(FIL_WE ${FIL} NAME_WE)
|
||||
@@ -813,12 +813,6 @@
|
||||
target_link_libraries(gpr
|
||||
${_gRPC_ALLTARGETS_LIBRARIES}
|
||||
)
|
||||
-if (_gRPC_PLATFORM_ANDROID)
|
||||
- target_link_libraries(gpr
|
||||
- android
|
||||
- log
|
||||
- )
|
||||
-endif (_gRPC_PLATFORM_ANDROID)
|
||||
|
||||
foreach(_hdr
|
||||
include/grpc/support/alloc.h
|
||||
|
12
packages/libgrpc/Makefile.patch
Normal file
12
packages/libgrpc/Makefile.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../grpc-1.8.3/Makefile ./Makefile
|
||||
--- ../grpc-1.8.3/Makefile 2017-12-31 20:38:59.000000000 +0000
|
||||
+++ ./Makefile 2018-01-13 00:48:23.449627239 +0000
|
||||
@@ -369,7 +369,7 @@
|
||||
endif
|
||||
|
||||
ifeq ($(SYSTEM),Linux)
|
||||
-LIBS = dl rt m pthread
|
||||
+LIBS = dl m
|
||||
LDFLAGS += -pthread
|
||||
endif
|
||||
|
@ -1,33 +1,60 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://grpc.io/
|
||||
TERMUX_PKG_DESCRIPTION="High performance, open source, general RPC framework that puts mobile and HTTP/2 first"
|
||||
TERMUX_PKG_VERSION=1.4.7
|
||||
TERMUX_PKG_SHA256=9ce1ae3a05932eee41d7de28a59cff9d493b3423c571f51000bb350313e61b72
|
||||
TERMUX_PKG_VERSION=1.12.0
|
||||
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_HOSTBUILD=true
|
||||
TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-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
|
||||
-DProtobuf_PROTOC_EXECUTABLE=$TERMUX_TOPDIR/libprotobuf/host-build/src/protoc
|
||||
-DRUN_HAVE_POSIX_REGEX=0
|
||||
-DRUN_HAVE_STD_REGEX=0
|
||||
-DRUN_HAVE_STEADY_CLOCK=0
|
||||
"
|
||||
|
||||
termux_step_extract_package() {
|
||||
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION
|
||||
if [ ! -d $CHECKED_OUT_FOLDER ]; then
|
||||
local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout
|
||||
rm -Rf $TMP_CHECKOUT
|
||||
mkdir -p $TMP_CHECKOUT
|
||||
|
||||
git clone --depth 1 \
|
||||
--branch v$TERMUX_PKG_VERSION \
|
||||
https://github.com/grpc/grpc.git \
|
||||
$TMP_CHECKOUT
|
||||
cd $TMP_CHECKOUT
|
||||
git submodule update --init # --depth 1
|
||||
mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER
|
||||
fi
|
||||
|
||||
mkdir $TERMUX_PKG_SRCDIR
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
cp -Rf $CHECKED_OUT_FOLDER/* .
|
||||
}
|
||||
|
||||
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
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
export LD=gcc
|
||||
export LDXX=g++
|
||||
CFLAGS="-Wno-implicit-fallthrough" \
|
||||
make -j $TERMUX_MAKE_PROCESSES \
|
||||
HAS_SYSTEM_PROTOBUF=false \
|
||||
prefix=$TERMUX_PKG_HOSTBUILD_DIR \
|
||||
install
|
||||
make clean
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
termux_step_pre_configure() {
|
||||
sed "s|@PATH_TO_PLUGIN@|$TERMUX_PKG_HOSTBUILD_DIR/bin/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"
|
||||
}
|
||||
|
12
packages/libgrpc/log_android.cc.patch
Normal file
12
packages/libgrpc/log_android.cc.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../cache/checkout-1.9.1/src/core/lib/gpr/log_android.cc ./src/core/lib/gpr/log_android.cc
|
||||
--- ../cache/checkout-1.9.1/src/core/lib/gpr/log_android.cc 2018-02-12 23:15:11.039292462 +0000
|
||||
+++ ./src/core/lib/gpr/log_android.cc 2018-02-12 23:28:01.274274589 +0000
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
asprintf(&output, "%s:%d] %s", display_file, args->line, args->message);
|
||||
|
||||
- __android_log_write(severity_to_log_priority(args->severity), "GRPC", output);
|
||||
+ // __android_log_write(severity_to_log_priority(args->severity), "GRPC", output);
|
||||
|
||||
/* allocated by asprintf => use free, not gpr_free */
|
||||
free(output);
|
12
packages/libgrpc/src-core-lib-grpc-wrap_memcpy.cc.patch
Normal file
12
packages/libgrpc/src-core-lib-grpc-wrap_memcpy.cc.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../cache/checkout-1.12.0/src/core/lib/gpr/wrap_memcpy.cc ./src/core/lib/gpr/wrap_memcpy.cc
|
||||
--- ../cache/checkout-1.12.0/src/core/lib/gpr/wrap_memcpy.cc 2018-05-22 13:07:29.307092222 +0000
|
||||
+++ ./src/core/lib/gpr/wrap_memcpy.cc 2018-05-23 22:21:40.602239126 +0000
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
extern "C" {
|
||||
#ifdef __linux__
|
||||
-#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT)
|
||||
+#if defined(__x86_64__) && !defined(GPR_MUSL_LIBC_COMPAT) && !defined(__ANDROID__)
|
||||
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
|
||||
void* __wrap_memcpy(void* destination, const void* source, size_t num) {
|
||||
return memcpy(destination, source, num);
|
Loading…
Reference in New Issue
Block a user