protobuf: Update from 3.6.1 to 3.7.1
This commit is contained in:
parent
09d0099e00
commit
503c204164
@ -38,6 +38,9 @@ source scripts/build/setup/termux_setup_meson.sh
|
||||
# Utility function to setup a current cmake build system
|
||||
source scripts/build/setup/termux_setup_cmake.sh
|
||||
|
||||
# Utility function to setup protobuf:
|
||||
source scripts/build/setup/termux_setup_protobuf.sh
|
||||
|
||||
# First step is to handle command-line arguments. Not to be overridden by packages.
|
||||
source scripts/build/termux_step_handle_arguments.sh
|
||||
|
||||
|
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="High performance, open source, general RPC framework tha
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Vishal Biswas @vishalbiswas"
|
||||
TERMUX_PKG_VERSION=1.20.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_DEPENDS="openssl, protobuf, c-ares, zlib"
|
||||
TERMUX_PKG_BUILD_DEPENDS="libprotobuf"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
@ -18,13 +19,9 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DRUN_HAVE_POSIX_REGEX=0
|
||||
-DRUN_HAVE_STD_REGEX=0
|
||||
-DRUN_HAVE_STEADY_CLOCK=0
|
||||
-DProtobuf_PROTOC_EXECUTABLE=$TERMUX_PKG_HOSTBUILD_DIR/protoc/bin/protoc
|
||||
-DProtobuf_PROTOC_LIBRARY=$TERMUX_PREFIX/lib/libprotoc.so
|
||||
"
|
||||
|
||||
_protoc_version=3.6.1
|
||||
_protoc_sha256=6003de742ea3fcf703cfec1cd4a3380fd143081a2eb0e559065563496af27807
|
||||
|
||||
termux_step_extract_package() {
|
||||
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION
|
||||
if [ ! -d $CHECKED_OUT_FOLDER ]; then
|
||||
@ -44,15 +41,12 @@ termux_step_extract_package() {
|
||||
mkdir $TERMUX_PKG_SRCDIR
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
cp -Rf $CHECKED_OUT_FOLDER/* .
|
||||
|
||||
termux_setup_protobuf
|
||||
}
|
||||
|
||||
termux_step_host_build() {
|
||||
termux_setup_cmake
|
||||
termux_download https://github.com/protocolbuffers/protobuf/releases/download/v${_protoc_version}/protoc-${_protoc_version}-linux-x86_64.zip \
|
||||
protoc-${_protoc_version}-linux-x86_64.zip \
|
||||
${_protoc_sha256}
|
||||
mkdir protoc && cd protoc
|
||||
unzip ../protoc-${_protoc_version}-linux-x86_64.zip
|
||||
|
||||
cd $TERMUX_PKG_SRCDIR
|
||||
export LD=gcc
|
||||
|
@ -1,23 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/google/protobuf
|
||||
TERMUX_PKG_DESCRIPTION="Protocol buffers C++ library"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_VERSION=3.6.1
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SHA256=3d4e589d81b2006ca603c1ab712c9715a76227293032d05b26fca603f90b3f5b
|
||||
TERMUX_PKG_VERSION=3.7.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=f1748989842b46fa208b2a6e4e2785133cfcc3e4d43c17fecb023733f0f5443f
|
||||
TERMUX_PKG_SRCURL=https://github.com/google/protobuf/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_DEPENDS="zlib"
|
||||
TERMUX_PKG_HOSTBUILD=yes
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-protoc=$TERMUX_PKG_HOSTBUILD_DIR/src/protoc"
|
||||
# We extracted libprotobuf from protobuf earlier:
|
||||
TERMUX_PKG_CONFLICTS="protobuf (<= 3.0.0)"
|
||||
TERMUX_PKG_FORCE_CMAKE=yes
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-Dprotobuf_BUILD_TESTS=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
"
|
||||
|
||||
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() {
|
||||
./autogen.sh
|
||||
termux_step_pre_configure() {
|
||||
TERMUX_PKG_SRCDIR+="/cmake/"
|
||||
}
|
||||
|
@ -2,14 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://mosh.org
|
||||
TERMUX_PKG_DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_VERSION=1.3.2
|
||||
TERMUX_PKG_REVISION=12
|
||||
TERMUX_PKG_REVISION=13
|
||||
TERMUX_PKG_SHA256=da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216
|
||||
TERMUX_PKG_SRCURL=https://github.com/mobile-shell/mosh/releases/download/mosh-${TERMUX_PKG_VERSION}/mosh-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_DEPENDS="libandroid-support, libprotobuf, ncurses, openssl, openssh"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export PROTOC=$TERMUX_TOPDIR/libprotobuf/host-build/src/protoc
|
||||
CXXFLAGS+=" -std=c++11" # Required by protobuf.
|
||||
termux_setup_protobuf
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
|
19
scripts/build/setup/termux_setup_protobuf.sh
Normal file
19
scripts/build/setup/termux_setup_protobuf.sh
Normal file
@ -0,0 +1,19 @@
|
||||
termux_setup_protobuf() {
|
||||
local _PROTOBUF_VERSION=$(bash -c ". $TERMUX_SCRIPTDIR/packages/libprotobuf/build.sh; echo \$TERMUX_PKG_VERSION")
|
||||
local _PROTOBUF_ZIP=protoc-$_PROTOBUF_VERSION-linux-x86_64.zip
|
||||
local _PROTOBUF_FOLDER=$TERMUX_COMMON_CACHEDIR/protobuf-$_PROTOBUF_VERSION
|
||||
|
||||
if [ ! -d "$_PROTOBUF_FOLDER" ]; then
|
||||
termux_download \
|
||||
https://github.com/protocolbuffers/protobuf/releases/download/v$_PROTOBUF_VERSION/$_PROTOBUF_ZIP \
|
||||
$TERMUX_PKG_TMPDIR/$_PROTOBUF_ZIP \
|
||||
24ea6924faaf94d4a0c5850fdb278290a326eff9a68f36ee5809654faccd0e10
|
||||
|
||||
rm -Rf "$TERMUX_PKG_TMPDIR/protoc-$_PROTOBUF_VERSION-linux-x86_64"
|
||||
unzip $TERMUX_PKG_TMPDIR/$_PROTOBUF_ZIP -d $TERMUX_PKG_TMPDIR/protobuf-$_PROTOBUF_VERSION
|
||||
mv "$TERMUX_PKG_TMPDIR/protobuf-$_PROTOBUF_VERSION" \
|
||||
$_PROTOBUF_FOLDER
|
||||
fi
|
||||
|
||||
export PATH=$_PROTOBUF_FOLDER/bin/:$PATH
|
||||
}
|
Loading…
Reference in New Issue
Block a user