aboutsummaryrefslogtreecommitdiff
path: root/libs/jsoncpp
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-09-22 18:24:07 -0700
committerRosen Penev <rosenp@gmail.com>2019-09-22 18:28:14 -0700
commitaf51dbed7b2ee2293abde244be4b5d23ba9c7443 (patch)
tree257532f8fda98997e7b02e6a5150bf9c3af4e179 /libs/jsoncpp
parent76b57b0e6cec6dc45a828aef2464ae4173efab11 (diff)
jsoncpp: Fix pkgconfig file
Backported upstream patch to make the pkgconfig file more cross compile friendly. I don't think anything uses this. Replaced Installev with CMAKE_INSTALL. Added PKG_BUILD_PARALLEL for faster compilation. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libs/jsoncpp')
-rw-r--r--libs/jsoncpp/Makefile21
-rw-r--r--libs/jsoncpp/patches/010-pkgconnfig.patch26
2 files changed, 34 insertions, 13 deletions
diff --git a/libs/jsoncpp/Makefile b/libs/jsoncpp/Makefile
index f129ad712..053a3d3c7 100644
--- a/libs/jsoncpp/Makefile
+++ b/libs/jsoncpp/Makefile
@@ -9,14 +9,18 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=jsoncpp
PKG_VERSION:=1.8.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
+PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
+
PKG_MAINTAINER:=
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
-PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_HASH:=c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6
+PKG_BUILD_PARALLEL:=1
+CMAKE_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -48,13 +52,4 @@ define Package/jsoncpp/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
endef
-define Build/InstallDev
- $(INSTALL_DIR) $(1)/usr/include
- $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include
- $(INSTALL_DIR) $(1)/usr/lib/
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
- $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
- $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/
-endef
-
$(eval $(call BuildPackage,jsoncpp))
diff --git a/libs/jsoncpp/patches/010-pkgconnfig.patch b/libs/jsoncpp/patches/010-pkgconnfig.patch
new file mode 100644
index 000000000..26a793149
--- /dev/null
+++ b/libs/jsoncpp/patches/010-pkgconnfig.patch
@@ -0,0 +1,26 @@
+From 63dc2f77e33e9ff559e051cd2964960b9d3e761e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Mon, 16 Sep 2019 18:38:24 -0700
+Subject: [PATCH] pkgconfig: Fix for cross compilation
+
+exec_ and prefix must be overridden in such a case.
+
+Makes the .pc file more consistent with other projects.
+---
+ pkg-config/jsoncpp.pc.in | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
+index dea51f51..d4fa9ef2 100644
+--- a/pkg-config/jsoncpp.pc.in
++++ b/pkg-config/jsoncpp.pc.in
+@@ -1,5 +1,7 @@
+-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
++prefix=@CMAKE_INSTALL_PREFIX@
++exec_prefix=@CMAKE_INSTALL_PREFIX@
++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
++includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+
+ Name: jsoncpp
+ Description: A C++ library for interacting with JSON