diff options
-rw-r--r-- | meta-oe/recipes-devtools/protobuf/protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch | 15 | ||||
-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 | ||
32 | diff --git a/examples/Makefile b/examples/Makefile | 32 | diff --git a/examples/Makefile b/examples/Makefile |
33 | index 1c7ec8d63..85f591231 100644 | 33 | index 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 | -- | ||
60 | 2.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" | |||
7 | LICENSE = "BSD-3-Clause" | 7 | LICENSE = "BSD-3-Clause" |
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" |
9 | 9 | ||
10 | DEPENDS = "zlib" | 10 | DEPENDS = "zlib abseil-cpp" |
11 | DEPENDS:append:class-target = " protobuf-native" | 11 | DEPENDS:append:class-target = " protobuf-native" |
12 | 12 | ||
13 | SRCREV = "f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c" | 13 | SRCREV = "81f89d509d6771dcccb619cbe26ac86cec472582" |
14 | 14 | ||
15 | SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=21.x;protocol=https \ | 15 | SRC_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 | ||
40 | TEST_SRC_DIR = "examples" | 41 | TEST_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}" |