fixes building cstddef include for g++
[termux-packages] / packages / libgrpc / build.sh
index 8909db1..199c128 100644 (file)
@@ -1,4 +1,5 @@
 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
@@ -16,9 +17,12 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
 "
 
 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="-Wl,-L$TERMUX_TOPDIR/libprotobuf/host-build/src/.libs -Wl,-lprotobuf -Wl,-lprotoc"
+               -DCMAKE_CXX_FLAGS="-I$protoinstall/include -L$protoinstall/lib" \
+               -D_gRPC_PROTOBUF_LIBRARIES="-lprotobuf -lprotoc"
        make -j $TERMUX_MAKE_PROCESSES grpc_cpp_plugin
 }