From f0c7ecc1fc12e6723bd73f0df5bf772ffc4ce703 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 26 Nov 2021 20:14:04 +0100 Subject: [PATCH] protobuf: bump version keep compat recipe for 3.13.0 --- .../protobuf/patches/protobuf-3.17.2.patchset | 76 +++++++++++++++++++ ...f-3.13.0.recipe => protobuf-3.17.2.recipe} | 6 +- dev-libs/protobuf/protobuf24-3.13.0.recipe | 60 +++++++++++++++ 3 files changed, 139 insertions(+), 3 deletions(-) create mode 100644 dev-libs/protobuf/patches/protobuf-3.17.2.patchset rename dev-libs/protobuf/{protobuf-3.13.0.recipe => protobuf-3.17.2.recipe} (94%) create mode 100644 dev-libs/protobuf/protobuf24-3.13.0.recipe diff --git a/dev-libs/protobuf/patches/protobuf-3.17.2.patchset b/dev-libs/protobuf/patches/protobuf-3.17.2.patchset new file mode 100644 index 000000000..94a6c4a5a --- /dev/null +++ b/dev-libs/protobuf/patches/protobuf-3.17.2.patchset @@ -0,0 +1,76 @@ +From 5aeb203c8d4ae0b4e969b27637284b613aa920f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +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 + diff --git a/dev-libs/protobuf/protobuf-3.13.0.recipe b/dev-libs/protobuf/protobuf-3.17.2.recipe similarity index 94% rename from dev-libs/protobuf/protobuf-3.13.0.recipe rename to dev-libs/protobuf/protobuf-3.17.2.recipe index 6d80b732d..98cfc1ff3 100644 --- a/dev-libs/protobuf/protobuf-3.13.0.recipe +++ b/dev-libs/protobuf/protobuf-3.17.2.recipe @@ -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="9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a" +CHECKSUM_SHA256="36f81e03a0702f8f935fffd5a486dac1c0fc6d4bae1cd02c7a32448ad6e63bcb" PATCHES="protobuf-$portVersion.patchset" ARCHITECTURES="all !x86_gcc2" SECONDARY_ARCHITECTURES="x86" -libVersion="24.0.0" +libVersion="28.0.2" libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" diff --git a/dev-libs/protobuf/protobuf24-3.13.0.recipe b/dev-libs/protobuf/protobuf24-3.13.0.recipe new file mode 100644 index 000000000..9fe7ea916 --- /dev/null +++ b/dev-libs/protobuf/protobuf24-3.13.0.recipe @@ -0,0 +1,60 @@ +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-2018 Google" +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a" +SOURCE_DIR="protobuf-$portVersion" +PATCHES="protobuf-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="24.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + protobuf24$secondaryArchSuffix = $portVersion + lib:libprotobuf$secondaryArchSuffix = $libVersionCompat + lib:libprotobuf_lite$secondaryArchSuffix = $libVersionCompat + lib:libprotoc$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libgmock$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:autoreconf + cmd:gcc$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + ./autogen.sh + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install-strip + + rm $libDir/lib*.la $libDir/lib*.a + + prepareInstalledDevelLibs libprotobuf-lite libprotobuf libprotoc + fixPkgconfig + rm -rf $developDir $binDir +}