Browse Source

libgrpc: Try to fix building under docker image

android-5
Fredrik Fornwall 8 years ago
parent
commit
275715a87b
  1. 5
      packages/libgrpc/build.sh
  2. 10
      packages/libprotobuf/build.sh

5
packages/libgrpc/build.sh

@ -16,9 +16,12 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
" "
termux_step_host_build () { termux_step_host_build () {
termux_setup_cmake
local protoinstall=$TERMUX_TOPDIR/libprotobuf/host-build/install
cmake $TERMUX_PKG_SRCDIR -G "Unix Makefiles" \ cmake $TERMUX_PKG_SRCDIR -G "Unix Makefiles" \
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS \ $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 make -j $TERMUX_MAKE_PROCESSES grpc_cpp_plugin
} }

10
packages/libprotobuf/build.sh

@ -1,8 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://github.com/google/protobuf TERMUX_PKG_HOMEPAGE=https://github.com/google/protobuf
TERMUX_PKG_DESCRIPTION="Protocol buffers C++ library" TERMUX_PKG_DESCRIPTION="Protocol buffers C++ library"
TERMUX_PKG_VERSION=3.3.0 TERMUX_PKG_VERSION=3.3.2
TERMUX_PKG_SRCURL=https://github.com/google/protobuf/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SRCURL=https://github.com/google/protobuf/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=94c414775f275d876e5e0e4a276527d155ab2d0da45eed6b7734301c330be36e TERMUX_PKG_SHA256=8b8e442becbeff637f160c1ef4a3a56769c50ba7c9ff939ccc94086530ff00e4
TERMUX_PKG_FOLDERNAME=protobuf-$TERMUX_PKG_VERSION TERMUX_PKG_FOLDERNAME=protobuf-$TERMUX_PKG_VERSION
TERMUX_PKG_HOSTBUILD=yes TERMUX_PKG_HOSTBUILD=yes
TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_BUILD_IN_SRC=yes
@ -10,6 +10,12 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-protoc=$TERMUX_PKG_HOSTBUILD_DIR/src/pro
# We extracted libprotobuf from protobuf earlier: # We extracted libprotobuf from protobuf earlier:
TERMUX_PKG_CONFLICTS="protobuf (<= 3.0.0)" TERMUX_PKG_CONFLICTS="protobuf (<= 3.0.0)"
termux_step_host_build() {
"$TERMUX_PKG_SRCDIR/configure" --prefix=$TERMUX_PKG_HOSTBUILD_DIR/install
# We install protobuf so that libgrpc can use it in a hackish way:
make -j $TERMUX_MAKE_PROCESSES install
}
termux_step_post_extract_package () { termux_step_post_extract_package () {
./autogen.sh ./autogen.sh
} }

Loading…
Cancel
Save