diff --git a/packages/libprotobuf/build.sh b/packages/libprotobuf/build.sh new file mode 100755 index 000000000..7dac51236 --- /dev/null +++ b/packages/libprotobuf/build.sh @@ -0,0 +1,11 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/google/protobuf +TERMUX_PKG_DESCRIPTION="Protocol buffers C++ library" +TERMUX_PKG_VERSION=3.2.0 +TERMUX_PKG_SRCURL=https://github.com/google/protobuf/releases/download/v${TERMUX_PKG_VERSION}/protobuf-cpp-${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=51d773e4297238b282eaa4c1dd317099675b12eef2b414732b851c00459225c6 +TERMUX_PKG_FOLDERNAME=protobuf-$TERMUX_PKG_VERSION +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::w +TERMUX_PKG_CONFLICTS="protobuf (<= 3.0.0)" diff --git a/packages/libprotobuf/protobuf.subpackage.sh b/packages/libprotobuf/protobuf.subpackage.sh new file mode 100644 index 000000000..dd04ea8a6 --- /dev/null +++ b/packages/libprotobuf/protobuf.subpackage.sh @@ -0,0 +1,4 @@ +TERMUX_SUBPKG_INCLUDE="bin/ lib/libprotobuf-lite.so* lib/libprotoc.so*" +TERMUX_SUBPKG_DESCRIPTION="Compiler for protocol buffer definition files" +TERMUX_SUBPKG_DEPENDS="libprotobuf" + diff --git a/packages/libprotobuf/remove-android-logging.patch b/packages/libprotobuf/remove-android-logging.patch new file mode 100644 index 000000000..56f8e704c --- /dev/null +++ b/packages/libprotobuf/remove-android-logging.patch @@ -0,0 +1,12 @@ +diff -u -r ../protobuf-3.2.0/src/google/protobuf/stubs/common.cc ./src/google/protobuf/stubs/common.cc +--- ../protobuf-3.2.0/src/google/protobuf/stubs/common.cc 2017-01-28 00:49:29.000000000 +0100 ++++ ./src/google/protobuf/stubs/common.cc 2017-01-29 14:43:35.021889040 +0100 +@@ -116,7 +116,7 @@ + + namespace internal { + +-#if defined(__ANDROID__) ++#if defined(__ANDROID__) && 0 + inline void DefaultLogHandler(LogLevel level, const char* filename, int line, + const string& message) { + if (level < GOOGLE_PROTOBUF_MIN_LOG_LEVEL) { diff --git a/packages/mosh/build.sh b/packages/mosh/build.sh index ce75cf179..4aa48715b 100644 --- a/packages/mosh/build.sh +++ b/packages/mosh/build.sh @@ -1,13 +1,13 @@ TERMUX_PKG_HOMEPAGE=https://mosh.org TERMUX_PKG_DESCRIPTION="Mobile shell that supports roaming and intelligent local echo" TERMUX_PKG_VERSION=1.2.6 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://github.com/mobile-shell/mosh/archive/mosh-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_FOLDERNAME=mosh-mosh-$TERMUX_PKG_VERSION -TERMUX_PKG_DEPENDS="libandroid-support, protobuf, ncurses, openssl, openssh, libutil" +TERMUX_PKG_DEPENDS="libandroid-support, libprotobuf, ncurses, openssl, openssh, libutil" termux_step_pre_configure () { - export PROTOC=$TERMUX_TOPDIR/protobuf/host-build/src/protoc + export PROTOC=$TERMUX_TOPDIR/libprotobuf/host-build/src/protoc cd $TERMUX_PKG_SRCDIR ./autogen.sh diff --git a/packages/protobuf/build.sh b/packages/protobuf/build.sh deleted file mode 100755 index ba4a942be..000000000 --- a/packages/protobuf/build.sh +++ /dev/null @@ -1,13 +0,0 @@ -TERMUX_PKG_HOMEPAGE=https://code.google.com/p/protobuf/ -TERMUX_PKG_DESCRIPTION="Library for encoding structured data in an efficient yet extensible format" -TERMUX_PKG_VERSION=2.6.1 -TERMUX_PKG_REVISION=1 -TERMUX_PKG_SRCURL=https://github.com/google/protobuf/releases/download/v${TERMUX_PKG_VERSION}/protobuf-${TERMUX_PKG_VERSION}.tar.bz2 -# Build a host build first and use the host build protoc: -TERMUX_PKG_HOSTBUILD=yes -TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-protoc=$TERMUX_PKG_HOSTBUILD_DIR/src/protoc" - -# Version 3.1.0 currently fails to build: -# TERMUX_PKG_VERSION=3.1.0 -# TERMUX_PKG_SRCURL=https://github.com/google/protobuf/releases/download/v${TERMUX_PKG_VERSION}/protobuf-cpp-${TERMUX_PKG_VERSION}.tar.gz -# TERMUX_PKG_FOLDERNAME=protobuf-$TERMUX_PKG_VERSION