diff mbox series

json-c: Embed RPATH on macOS to prevent error in ucert: dyld: Library not loaded: libjson-c.5.dylib

Message ID 9268FF20-9C63-42FA-8879-038D4069A25D@abv.bg
State Not Applicable
Headers show
Series json-c: Embed RPATH on macOS to prevent error in ucert: dyld: Library not loaded: libjson-c.5.dylib | expand

Commit Message

Georgi Valkov Sept. 27, 2020, 5:02 p.m. UTC
Hello Felix!
Can you please review and commit this patch? There is also a link to the pull-request below.

json-c: Embed RPATH on macOS to prevent error in ucert: dyld: Library not loaded: libjson-c.5.dylib
https://github.com/openwrt/openwrt/pull/3391
https://bugs.openwrt.org/index.php?do=details&task_id=3328

---
 .../patches/002-Embed-RPATH-on-macOS.patch    | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 package/libs/libjson-c/patches/002-Embed-RPATH-on-macOS.patch
diff mbox series

Patch

diff --git a/package/libs/libjson-c/patches/002-Embed-RPATH-on-macOS.patch b/package/libs/libjson-c/patches/002-Embed-RPATH-on-macOS.patch
new file mode 100644
index 0000000000..352f3407e1
--- /dev/null
+++ b/package/libs/libjson-c/patches/002-Embed-RPATH-on-macOS.patch
@@ -0,0 +1,20 @@ 
+Index: json-c-0.14/CMakeLists.txt
+===================================================================
+--- json-c-0.14.orig/CMakeLists.txt
++++ json-c-0.14/CMakeLists.txt
+@@ -2,6 +2,15 @@
+ # specially true in old embedded systems (OpenWRT and friends) where CMake isn't necessarily upgraded.
+ cmake_minimum_required(VERSION 2.8)
+ 
++# Embed RPATH on macOS
++if(POLICY CMP0042)
++	cmake_policy(SET CMP0042 NEW)
++endif()
++
++if(POLICY CMP0068)
++	cmake_policy(SET CMP0068 NEW)
++endif()
++
+ if(POLICY CMP0048)
+ 	cmake_policy(SET CMP0048 NEW)
+ endif()