Browse Source

protobuf: Update and split out libprotobuf

android-5
Fredrik Fornwall 8 years ago
parent
commit
2ff9e76765
  1. 11
      packages/libprotobuf/build.sh
  2. 4
      packages/libprotobuf/protobuf.subpackage.sh
  3. 12
      packages/libprotobuf/remove-android-logging.patch
  4. 6
      packages/mosh/build.sh
  5. 13
      packages/protobuf/build.sh

11
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)"

4
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"

12
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) {

6
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

13
packages/protobuf/build.sh

@ -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
Loading…
Cancel
Save