summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch15
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb)11
2 files changed, 17 insertions, 9 deletions
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
index 36c3c597ac..7c4bf260eb 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
+++ b/meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch
@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
30 1 file changed, 4 insertions(+), 2 deletions(-) 30 1 file changed, 4 insertions(+), 2 deletions(-)
31 31
32diff --git a/examples/Makefile b/examples/Makefile 32diff --git a/examples/Makefile b/examples/Makefile
33index 1c7ec8d63..85f591231 100644 33index ef7a4ef58..7206e14e1 100644
34--- a/examples/Makefile 34--- a/examples/Makefile
35+++ b/examples/Makefile 35+++ b/examples/Makefile
36@@ -2,6 +2,8 @@ 36@@ -2,6 +2,8 @@
@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644
42 all: cpp java python 42 all: cpp java python
43 43
44 cpp: add_person_cpp list_people_cpp 44 cpp: add_person_cpp list_people_cpp
45@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto 45@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto
46 46
47 add_person_cpp: add_person.cc protoc_middleman 47 add_person_cpp: add_person.cc protoc_middleman
48 pkg-config --cflags protobuf # fails if protobuf is not installed 48 pkg-config --cflags protobuf # fails if protobuf is not installed
49- c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` 49- c++ -std=c++14 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
50+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp 50+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp #$(CXX) -std=c++17 $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp
51 51
52 list_people_cpp: list_people.cc protoc_middleman 52 list_people_cpp: list_people.cc protoc_middleman
53 pkg-config --cflags protobuf # fails if protobuf is not installed 53 pkg-config --cflags protobuf # fails if protobuf is not installed
54- c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` 54- c++ -std=c++14 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
55+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp 55+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp #$(CXX) -std=c++17 $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp
56 56
57 add_person_dart: add_person.dart protoc_middleman_dart 57 add_person_dart: add_person.dart protoc_middleman_dart
58 58
59--
602.34.1
61
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb
index 06b21a0d6c..b5c3d87c98 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_3.21.12.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_4.22.2.bb
@@ -7,12 +7,12 @@ SECTION = "console/tools"
7LICENSE = "BSD-3-Clause" 7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
9 9
10DEPENDS = "zlib" 10DEPENDS = "zlib abseil-cpp"
11DEPENDS:append:class-target = " protobuf-native" 11DEPENDS:append:class-target = " protobuf-native"
12 12
13SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" 13SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582"
14 14
15SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ 15SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \
16 file://run-ptest \ 16 file://run-ptest \
17 file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ 17 file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
18 file://0001-Fix-linking-error-with-ld-gold.patch \ 18 file://0001-Fix-linking-error-with-ld-gold.patch \
@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\
35 -Dprotobuf_BUILD_LIBPROTOC=ON \ 35 -Dprotobuf_BUILD_LIBPROTOC=ON \
36 -Dprotobuf_BUILD_TESTS=OFF \ 36 -Dprotobuf_BUILD_TESTS=OFF \
37 -Dprotobuf_BUILD_EXAMPLES=OFF \ 37 -Dprotobuf_BUILD_EXAMPLES=OFF \
38 -Dprotobuf_ABSL_PROVIDER="package" \
38" 39"
39 40
40TEST_SRC_DIR = "examples" 41TEST_SRC_DIR = "examples"
@@ -52,7 +53,11 @@ do_compile_ptest() {
52 cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/" 53 cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/"
53 sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" 54 sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
54 sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" 55 sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
56 sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot{includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
55 sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc" 57 sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
58 sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
59 sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
60 sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
56 # Until out-of-tree build of examples is supported, we have to use this approach 61 # Until out-of-tree build of examples is supported, we have to use this approach
57 sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile" 62 sed -e 's|../src/google/protobuf/.libs/timestamp.pb.o|${B}/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o|' -i "${B}/${TEST_SRC_DIR}/Makefile"
58 export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}" 63 export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"