protobuf: fix bad CFLAGS in pkgconfig
authorRosen Penev <redacted>
Fri, 18 Dec 2020 05:02:51 +0000 (21:02 -0800)
committerRosen Penev <redacted>
Fri, 18 Dec 2020 06:02:30 +0000 (22:02 -0800)
Issue shows itself when using clang.

Refreshed other patch.

Signed-off-by: Rosen Penev <redacted>
libs/protobuf/Makefile
libs/protobuf/patches/010-rpath.patch
libs/protobuf/patches/020-threads.patch [new file with mode: 0644]

index abc94b145938543b1638709ef32c6f9bcc182e9d..cc314bbeaf9c765a3f3f5da49ce851aef1b51118 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=protobuf
 PKG_VERSION:=3.14.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
index c2fba6b34602eec0de039c61acf9089c4b87c615..b18864bf32fc158594c5b535fa49197ebba50d00 100644 (file)
@@ -1,7 +1,5 @@
-Index: protobuf-3.13.0/cmake/install.cmake
-===================================================================
---- protobuf-3.13.0.orig/cmake/install.cmake
-+++ protobuf-3.13.0/cmake/install.cmake
+--- a/cmake/install.cmake
++++ b/cmake/install.cmake
 @@ -16,8 +16,8 @@ foreach(_library ${_protobuf_libraries})
      $<BUILD_INTERFACE:${protobuf_source_dir}/src>
      $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
diff --git a/libs/protobuf/patches/020-threads.patch b/libs/protobuf/patches/020-threads.patch
new file mode 100644 (file)
index 0000000..4b8301c
--- /dev/null
@@ -0,0 +1,33 @@
+From db2c4f357432ee18975a69af71f50ed415584829 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 17 Dec 2020 20:54:48 -0800
+Subject: [PATCH] remove CMAKE_THREAD_LIBS_INIT from pkgconfig CFLAGS
+
+This is a linker flag and does not belong in CFLAGS.
+
+Fixes an issue with ola and protobuf.
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ cmake/protobuf-lite.pc.cmake | 2 +-
+ cmake/protobuf.pc.cmake      | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/cmake/protobuf-lite.pc.cmake
++++ b/cmake/protobuf-lite.pc.cmake
+@@ -7,5 +7,5 @@ Name: Protocol Buffers
+ Description: Google's Data Interchange Format
+ Version: @protobuf_VERSION@
+ Libs: -L${libdir} -lprotobuf-lite @CMAKE_THREAD_LIBS_INIT@
+-Cflags: -I${includedir} @CMAKE_THREAD_LIBS_INIT@
++Cflags: -I${includedir}
+ Conflicts: protobuf
+--- a/cmake/protobuf.pc.cmake
++++ b/cmake/protobuf.pc.cmake
+@@ -7,5 +7,5 @@ Name: Protocol Buffers
+ Description: Google's Data Interchange Format
+ Version: @protobuf_VERSION@
+ Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LIBS_INIT@
+-Cflags: -I${includedir} @CMAKE_THREAD_LIBS_INIT@
++Cflags: -I${includedir}
+ Conflicts: protobuf-lite
git clone https://git.99rst.org/PROJECT