protobuf: bump version.

SONAME change.
This commit is contained in:
Jerome Duval
2019-11-19 19:14:07 +01:00
parent cc6ff89799
commit 42315b5e57
7 changed files with 80 additions and 417 deletions

View File

@@ -1,40 +0,0 @@
From 09a61c1c5843c5513563767126a4a9d574758bf0 Mon Sep 17 00:00:00 2001
From: Humdinger <humdingerb@gmail.com>
Date: Wed, 22 Jul 2015 19:53:18 +0200
Subject: Add GTEST_OS_HAIKU.
diff --git a/gtest/include/gtest/internal/gtest-port.h b/gtest/include/gtest/internal/gtest-port.h
index ee97881..16c70ea 100644
--- a/gtest/include/gtest/internal/gtest-port.h
+++ b/gtest/include/gtest/internal/gtest-port.h
@@ -198,6 +198,8 @@
#define GTEST_OS_MAC 1
#elif defined __linux__
#define GTEST_OS_LINUX 1
+#elif defined __HAIKU__
+#define GTEST_OS_HAIKU 1
#elif defined __MVS__
#define GTEST_OS_ZOS 1
#elif defined(__sun) && defined(__SVR4)
@@ -205,7 +207,7 @@
#endif // __CYGWIN__
#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \
- GTEST_OS_SOLARIS
+ GTEST_OS_SOLARIS || GTEST_OS_HAIKU
// On some platforms, <regex.h> needs someone to define size_t, and
// won't compile otherwise. We can #include it here as we already
@@ -236,7 +238,7 @@
#define GTEST_USES_SIMPLE_RE 1
#endif // GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC ||
- // GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS
+ // GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS || GTEST_OS_HAIKU
// Defines GTEST_HAS_EXCEPTIONS to 1 if exceptions are enabled, or 0
// otherwise.
--
2.2.2

View File

@@ -0,0 +1,76 @@
From 5aeb203c8d4ae0b4e969b27637284b613aa920f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Tue, 6 Feb 2018 21:44:49 +0100
Subject: System lib support
diff --git a/src/Makefile.am b/src/Makefile.am
index 318180e..6f21e36 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -718,11 +718,7 @@ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
protobuf-lite-test test_plugin protobuf-lite-arena-test \
no-warning-test $(GZCHECKPROGRAMS)
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
- -I$(GOOGLEMOCK_SRC_DIR)/include
+ -lgtest -lgmock -lgmock_main
# Disable optimization for tests unless the user explicitly asked for it,
# since test_util.cc takes forever to compile with optimization (with GCC).
# See configure.ac for more info.
@@ -814,12 +810,7 @@ $(am_protobuf_test_OBJECTS): unittest_proto_middleman
# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
- -I$(GOOGLETEST_SRC_DIR)/include \
- -DPROTOBUF_TEST_NO_DESCRIPTORS
+ -lgtest -lgmock -lgmock_main
protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lazy_descriptor_test_SOURCES = \
google/protobuf/compiler/cpp/cpp_unittest.cc \
@@ -840,11 +831,7 @@ COMMON_LITE_TEST_SOURCES = \
# full runtime and we want to make sure this test builds without full
# runtime.
protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
- -I$(GOOGLETEST_SRC_DIR)/include
+ -lgtest -lgmock -lgmock_main
protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lite_test_SOURCES = \
google/protobuf/lite_unittest.cc \
@@ -856,11 +843,7 @@ $(am_protobuf_lite_test_OBJECTS): unittest_proto_middleman
# gtest when building the test internally our memory sanitizer doesn't detect
# memory leaks (don't know why).
protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
- -I$(GOOGLETEST_SRC_DIR)/include
+ -lgtest -lgmock -lgmock_main
protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lite_arena_test_SOURCES = \
google/protobuf/lite_arena_unittest.cc \
@@ -870,8 +853,7 @@ $(am_protobuf_lite_arena_test_OBJECTS): unittest_proto_middleman
# Test plugin binary.
test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
+ -lgtest
test_plugin_SOURCES = \
google/protobuf/compiler/mock_code_generator.cc \
google/protobuf/testing/file.cc \
--
2.24.0

View File

@@ -1,25 +0,0 @@
From d2b4be799813318da7da076de1fe74461e08dad1 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 17 May 2017 22:52:04 +0200
Subject: use Atomic32 on 32-bit.
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h
index 75aee30..13e23f6 100644
--- a/src/google/protobuf/stubs/atomicops.h
+++ b/src/google/protobuf/stubs/atomicops.h
@@ -89,7 +89,11 @@ typedef intptr_t Atomic64;
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
// Atomic64 routines below, depending on your architecture.
+#if defined(__HAIKU__) && !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+typedef Atomic32 AtomicWord;
+#else
typedef intptr_t AtomicWord;
+#endif
// Atomically execute:
// result = *ptr;
--
2.12.2

View File

@@ -1,194 +0,0 @@
From a0a7e7af2961e4a71b0040b9af75d73515e9805d Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 17 May 2017 22:52:04 +0200
Subject: use Atomic32 on 32-bit.
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h
index cb4553b..f260496 100644
--- a/src/google/protobuf/stubs/atomicops.h
+++ b/src/google/protobuf/stubs/atomicops.h
@@ -83,7 +83,11 @@ namespace internal {
// Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or
// Atomic64 routines below, depending on your architecture.
+#if defined(__HAIKU__) && !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
+typedef Atomic32 AtomicWord;
+#else
typedef intptr_t AtomicWord;
+#endif
// Atomically execute:
// result = *ptr;
--
2.16.1
From e18d785fd64bf6d987632353e77d386923d857ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Tue, 6 Feb 2018 21:44:49 +0100
Subject: System lib support
diff --git a/Makefile.am b/Makefile.am
index 19a1607..1b3199e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,30 +9,12 @@ AUTOMAKE_OPTIONS = foreign
SUBDIRS = . src
# Always include gmock in distributions.
-DIST_SUBDIRS = $(subdirs) src conformance benchmarks
+DIST_SUBDIRS = src conformance benchmarks
-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
-# because then "make check" would also build and run all of gmock's own tests,
-# which takes a lot of time and is generally not useful to us. Also, we don't
-# want "make install" to recurse into gmock since we don't want to overwrite
-# the installed version of gmock if there is one.
check-local:
- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-# We would like to clean gmock when "make clean" is invoked. But we have to
-# be careful because clean-local is also invoked during "make distclean", but
-# "make distclean" already recurses into gmock because it's listed among the
-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
-# cd to the directory again and "make clean" it will fail. So, check that the
-# Makefile exists before recursing.
clean-local:
- @if test -e gmock/Makefile; then \
- echo "Making clean in gmock"; \
- cd gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
- if test -e conformance/Makefile; then \
+ @if test -e conformance/Makefile; then \
echo "Making clean in conformance"; \
cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
fi; \
diff --git a/configure.ac b/configure.ac
index 7ff20b1..837352d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -200,12 +200,5 @@ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
-# too.
-export CFLAGS
-export CXXFLAGS
-AC_CONFIG_SUBDIRS([gmock])
-
AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index cdc2298..bc0cafe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -761,11 +761,7 @@ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
protobuf-lite-test test_plugin protobuf-lite-arena-test \
no-warning-test $(GZCHECKPROGRAMS)
protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- ../gmock/gtest/lib/libgtest.la \
- ../gmock/lib/libgmock.la \
- ../gmock/lib/libgmock_main.la
-protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
- -I$(srcdir)/../gmock/include
+ -lgtest -lgmock -lgmock_main
# Disable optimization for tests unless the user explicitly asked for it,
# since test_util.cc takes forever to compile with optimization (with GCC).
# See configure.ac for more info.
@@ -854,12 +850,7 @@ nodist_protobuf_test_SOURCES = $(protoc_outputs)
# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
libprotoc.la \
- ../gmock/gtest/lib/libgtest.la \
- ../gmock/lib/libgmock.la \
- ../gmock/lib/libgmock_main.la
-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
- -I$(srcdir)/../gmock/gtest/include \
- -DPROTOBUF_TEST_NO_DESCRIPTORS
+ -lgtest -lgmock -lgmock_main
protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lazy_descriptor_test_SOURCES = \
google/protobuf/compiler/cpp/cpp_unittest.cc \
@@ -879,11 +870,7 @@ COMMON_LITE_TEST_SOURCES = \
# full runtime and we want to make sure this test builds without full
# runtime.
protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
- ../gmock/gtest/lib/libgtest.la \
- ../gmock/lib/libgmock.la \
- ../gmock/lib/libgmock_main.la
-protobuf_lite_test_CPPFLAGS= -I$(srcdir)/../gmock/include \
- -I$(srcdir)/../gmock/gtest/include
+ -lgtest -lgmock -lgmock_main
protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lite_test_SOURCES = \
google/protobuf/lite_unittest.cc \
@@ -894,11 +881,7 @@ nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs)
# gtest when building the test internally our memory sanitizer doesn't detect
# memory leaks (don't know why).
protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
- ../gmock/gtest/lib/libgtest.la \
- ../gmock/lib/libgmock.la \
- ../gmock/lib/libgmock_main.la
-protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
- -I$(srcdir)/../gmock/gtest/include
+ -lgtest -lgmock -lgmock_main
protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lite_arena_test_SOURCES = \
google/protobuf/lite_arena_unittest.cc \
@@ -907,8 +890,7 @@ nodist_protobuf_lite_arena_test_SOURCES = $(protoc_lite_outputs)
# Test plugin binary.
test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- ../gmock/gtest/lib/libgtest.la
-test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
+ -lgtest
test_plugin_SOURCES = \
google/protobuf/compiler/mock_code_generator.cc \
google/protobuf/testing/file.cc \
--
2.16.1
From 205ba4489a24858db2485aadea884bc3055155f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Tue, 6 Feb 2018 21:48:45 +0100
Subject: Do not fetch gtools/gmock
diff --git a/autogen.sh b/autogen.sh
index 9560aaf..07e47e5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -27,23 +27,6 @@ __EOF__
exit 1
fi
-# Check that gmock is present. Usually it is already there since the
-# directory is set up as an SVN external.
-if test ! -e gmock; then
- echo "Google Mock not present. Fetching gmock-1.7.0 from the web..."
- curl $curlopts -L -O https://github.com/google/googlemock/archive/release-1.7.0.zip
- unzip -q release-1.7.0.zip
- rm release-1.7.0.zip
- mv googlemock-release-1.7.0 gmock
-fi
-
-if test ! -e gmock/gtest; then
- curl $curlopts -L -O https://github.com/google/googletest/archive/release-1.7.0.zip
- unzip -q release-1.7.0.zip
- rm release-1.7.0.zip
- mv googletest-release-1.7.0 gmock/gtest
-fi
-
set -ex
# TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
--
2.16.1

View File

@@ -1,77 +0,0 @@
SUMMARY="An efficient method of encoding structured data"
DESCRIPTION="Protocol buffers are Google's language-neutral, platform-neutral, \
extensible mechanism for serializing structured data think XML, but smaller, \
faster, and simpler. You define how you want your data to be structured once, \
then you can use special generated source code to easily write and read your \
structured data to and from a variety of data streams and using a variety of \
languages Java, C++, or Python."
HOMEPAGE="https://github.com/google/protobuf"
COPYRIGHT="2008 Google"
LICENSE="Apache v2"
REVISION="7"
SOURCE_URI="$HOMEPAGE/releases/download/v$portVersion/protobuf-$portVersion.tar.bz2"
CHECKSUM_SHA256="cf8452347330834bbf9c65c2e68b5562ba10c95fa40d4f7ec0d2cb332674b0bf"
PATCHES="protobuf-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
protobuf$secondaryArchSuffix =$portVersion
cmd:protoc$secondaryArchSuffix
lib:libprotobuf$secondaryArchSuffix = 7.0.0 compat >= 7
lib:libprotobuf_lite$secondaryArchSuffix = 7.0.0 compat >= 7
lib:libprotoc$secondaryArchSuffix = 7.0.0 compat >= 7
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
protobuf${secondaryArchSuffix}_devel = $portVersion
devel:libprotobuf$secondaryArchSuffix = 7.0.0 compat >= 7
devel:libprotobuf_lite$secondaryArchSuffix = 7.0.0 compat >= 7
devel:libprotoc$secondaryArchSuffix = 7.0.0 compat >= 7
"
REQUIRES_devel="
protobuf$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage protobuf$secondaryArchSuffix \
$libDir/libprotobuf.so.7.0.0 \
$libDir/libprotoc.so.7.0.0 \
$libDir/libprotobuf-lite.so.7.0.0
BUILD()
{
libtoolize --force --copy --install
./autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/lib*.la
prepareInstalledDevelLibs libprotobuf_lite libprotobuf libprotoc
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
make check
}

View File

@@ -8,15 +8,15 @@ languages Java, C++, or Python."
HOMEPAGE="https://github.com/google/protobuf"
COPYRIGHT="2008-2018 Google"
LICENSE="Apache v2"
REVISION="2"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="56b5d9e1ab2bf4f5736c4cfba9f4981fbc6976246721e7ded5602fbaee6d6869"
CHECKSUM_SHA256="6adf73fd7f90409e479d6ac86529ade2d45f50494c5c10f539226693cb8fe4f7"
PATCHES="protobuf-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="15.0.1"
libVersion="21.0.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
@@ -68,7 +68,7 @@ INSTALL()
{
make install
rm $libDir/lib*.la
rm $libDir/lib*.la $libDir/lib*.a
prepareInstalledDevelLibs libprotobuf-lite libprotobuf libprotoc
fixPkgconfig

View File

@@ -1,77 +0,0 @@
SUMMARY="An efficient method of encoding structured data"
DESCRIPTION="Protocol buffers are Google's language-neutral, platform-neutral, \
extensible mechanism for serializing structured data think XML, but smaller, \
faster, and simpler. You define how you want your data to be structured once, \
then you can use special generated source code to easily write and read your \
structured data to and from a variety of data streams and using a variety of \
languages Java, C++, or Python."
HOMEPAGE="https://github.com/google/protobuf"
COPYRIGHT="2008-2017 Google"
LICENSE="Apache v2"
REVISION="5"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="e53fd5d514169dc80fb38673dc63f4048cebd3e524e49c1663428f89330bda56"
PATCHES="protobuf-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
protobuf$secondaryArchSuffix =$portVersion
cmd:protoc$secondaryArchSuffix
lib:libprotobuf$secondaryArchSuffix = 13.0.2 compat >= 13
lib:libprotobuf_lite$secondaryArchSuffix = 13.0.2 compat >= 13
lib:libprotoc$secondaryArchSuffix = 13.0.2 compat >= 13
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
protobuf${secondaryArchSuffix}_devel = $portVersion
devel:libprotobuf$secondaryArchSuffix = 13.0.2 compat >= 13
devel:libprotobuf_lite$secondaryArchSuffix = 13.0.2 compat >= 13
devel:libprotoc$secondaryArchSuffix = 13.0.2 compat >= 13
"
REQUIRES_devel="
protobuf$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage protobuf$secondaryArchSuffix \
$libDir/libprotobuf.so.13.0.2 \
$libDir/libprotoc.so.13.0.2 \
$libDir/libprotobuf-lite.so.13.0.2
BUILD()
{
libtoolize --force --copy --install
./autogen.sh
runConfigure ./configure
make $jobArgs
}
INSTALL()
{
make install
rm $libDir/lib*.la
prepareInstalledDevelLibs libprotobuf-lite libprotobuf libprotoc
fixPkgconfig
packageEntries devel $developDir
}
TEST()
{
make check
}