mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 02:31:27 +00:00
protobuf: upgrade 3.21.12 -> 4.22.2
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+9
-6
@@ -30,7 +30,7 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
|
|||||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/examples/Makefile b/examples/Makefile
|
diff --git a/examples/Makefile b/examples/Makefile
|
||||||
index 1c7ec8d63..85f591231 100644
|
index ef7a4ef58..7206e14e1 100644
|
||||||
--- a/examples/Makefile
|
--- a/examples/Makefile
|
||||||
+++ b/examples/Makefile
|
+++ b/examples/Makefile
|
||||||
@@ -2,6 +2,8 @@
|
@@ -2,6 +2,8 @@
|
||||||
@@ -42,17 +42,20 @@ index 1c7ec8d63..85f591231 100644
|
|||||||
all: cpp java python
|
all: cpp java python
|
||||||
|
|
||||||
cpp: add_person_cpp list_people_cpp
|
cpp: add_person_cpp list_people_cpp
|
||||||
@@ -40,11 +42,11 @@ protoc_middleman_dart: addressbook.proto
|
@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto
|
||||||
|
|
||||||
add_person_cpp: add_person.cc protoc_middleman
|
add_person_cpp: add_person.cc protoc_middleman
|
||||||
pkg-config --cflags protobuf # fails if protobuf is not installed
|
pkg-config --cflags protobuf # fails if protobuf is not installed
|
||||||
- c++ -std=c++11 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
|
- c++ -std=c++14 add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
|
||||||
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp
|
+ $(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
|
||||||
|
|
||||||
list_people_cpp: list_people.cc protoc_middleman
|
list_people_cpp: list_people.cc protoc_middleman
|
||||||
pkg-config --cflags protobuf # fails if protobuf is not installed
|
pkg-config --cflags protobuf # fails if protobuf is not installed
|
||||||
- c++ -std=c++11 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
|
- c++ -std=c++14 list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
|
||||||
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp
|
+ $(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
|
||||||
|
|
||||||
add_person_dart: add_person.dart protoc_middleman_dart
|
add_person_dart: add_person.dart protoc_middleman_dart
|
||||||
|
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -7,12 +7,12 @@ SECTION = "console/tools"
|
|||||||
LICENSE = "BSD-3-Clause"
|
LICENSE = "BSD-3-Clause"
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
|
LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
|
||||||
|
|
||||||
DEPENDS = "zlib"
|
DEPENDS = "zlib abseil-cpp"
|
||||||
DEPENDS:append:class-target = " protobuf-native"
|
DEPENDS:append:class-target = " protobuf-native"
|
||||||
|
|
||||||
SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c"
|
SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \
|
SRC_URI = "gitsm://github.com/protocolbuffers/protobuf.git;branch=22.x;protocol=https \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
|
file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
|
||||||
file://0001-Fix-linking-error-with-ld-gold.patch \
|
file://0001-Fix-linking-error-with-ld-gold.patch \
|
||||||
@@ -35,6 +35,7 @@ EXTRA_OECMAKE += "\
|
|||||||
-Dprotobuf_BUILD_LIBPROTOC=ON \
|
-Dprotobuf_BUILD_LIBPROTOC=ON \
|
||||||
-Dprotobuf_BUILD_TESTS=OFF \
|
-Dprotobuf_BUILD_TESTS=OFF \
|
||||||
-Dprotobuf_BUILD_EXAMPLES=OFF \
|
-Dprotobuf_BUILD_EXAMPLES=OFF \
|
||||||
|
-Dprotobuf_ABSL_PROVIDER="package" \
|
||||||
"
|
"
|
||||||
|
|
||||||
TEST_SRC_DIR = "examples"
|
TEST_SRC_DIR = "examples"
|
||||||
@@ -52,7 +53,11 @@ do_compile_ptest() {
|
|||||||
cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/"
|
cp ${S}/${TEST_SRC_DIR}/Makefile "${B}/${TEST_SRC_DIR}/"
|
||||||
sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
sed -e 's|libdir=|libdir=${PKG_CONFIG_SYSROOT_DIR}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
sed -e 's|Cflags:|Cflags: -I${S}/src|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
|
sed -e 's|Cflags:|Cflags: -I${WORKDIR}/recipe-sysroot{includedir} |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
sed -e 's|Libs:|Libs: -L${B}|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
|
sed -e 's|Libs:|Libs: -L${WORKDIR}/recipe-sysroot/usr/lib|' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
|
sed -e 's|Libs:|Libs: -labsl_log_internal_check_op |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
|
sed -e 's|Libs:|Libs: -labsl_log_internal_message |' -i "${B}/${TEST_SRC_DIR}/protobuf.pc"
|
||||||
# Until out-of-tree build of examples is supported, we have to use this approach
|
# Until out-of-tree build of examples is supported, we have to use this approach
|
||||||
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"
|
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"
|
||||||
export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"
|
export PKG_CONFIG_PATH="${B}/${TEST_SRC_DIR}"
|
||||||
Reference in New Issue
Block a user