protobuf: Fix rpath
authorRosen Penev <rosenp@gmail.com>
Thu, 26 Sep 2019 04:59:02 +0000 (21:59 -0700)
committerRosen Penev <rosenp@gmail.com>
Thu, 26 Sep 2019 04:59:02 +0000 (21:59 -0700)
protobuf was setting its own rpath, preventing the build system from
overriding it. Comment it out.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/protobuf/Makefile
libs/protobuf/patches/010-rpath.patch [new file with mode: 0644]

index 96d8750b6e8e0a09da8b8e45d3b20b72041a9879..251bdffa10794db67009eb0ec47a8af3f6b9b477 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=protobuf
 PKG_VERSION:=3.8.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION)
diff --git a/libs/protobuf/patches/010-rpath.patch b/libs/protobuf/patches/010-rpath.patch
new file mode 100644 (file)
index 0000000..70d2752
--- /dev/null
@@ -0,0 +1,24 @@
+--- 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}>)
+   if (UNIX AND NOT APPLE)
+-    set_property(TARGET ${_library}
+-      PROPERTY INSTALL_RPATH "$ORIGIN")
++#    set_property(TARGET ${_library}
++#      PROPERTY INSTALL_RPATH "$ORIGIN")
+   elseif (APPLE)
+     set_property(TARGET ${_library}
+       PROPERTY INSTALL_RPATH "@loader_path")
+@@ -32,8 +32,8 @@ if (protobuf_BUILD_PROTOC_BINARIES)
+   install(TARGETS protoc EXPORT protobuf-targets
+     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+   if (UNIX AND NOT APPLE)
+-    set_property(TARGET protoc
+-      PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
++#    set_property(TARGET protoc
++#      PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
+   elseif (APPLE)
+     set_property(TARGET protoc
+       PROPERTY INSTALL_RPATH "@loader_path/../lib")