guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: Add jsoncpp-with-pkg-version.


From: guix-commits
Subject: 01/02: gnu: Add jsoncpp-with-pkg-version.
Date: Wed, 6 Oct 2021 03:00:21 -0400 (EDT)

mothacehe pushed a commit to branch core-updates-frozen
in repository guix.

commit 03f99e14ed299c9e6fec54af6d1f4951ca3ff4f8
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Wed Oct 6 06:58:24 2021 +0000

    gnu: Add jsoncpp-with-pkg-version.
    
    * gnu/packages/patches/jsoncpp-pkg-config-version: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/serialization.scm (jsoncpp-with-pkg-version): New variable.
---
 gnu/local.mk                                       |  1 +
 .../patches/jsoncpp-pkg-config-version.patch       | 24 ++++++++++++++++++++++
 gnu/packages/serialization.scm                     | 19 +++++++++++++++++
 3 files changed, 44 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index f0cfb1e..bfecbfa 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1267,6 +1267,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/json-c-CVE-2020-12762.patch             \
   %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch        \
   %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch        \
+  %D%/packages/patches/jsoncpp-pkg-config-version.patch                \
   %D%/packages/patches/jacal-fix-texinfo.patch                 \
   %D%/packages/patches/jamvm-1.5.1-aarch64-support.patch       \
   %D%/packages/patches/jamvm-1.5.1-armv7-support.patch \
diff --git a/gnu/packages/patches/jsoncpp-pkg-config-version.patch 
b/gnu/packages/patches/jsoncpp-pkg-config-version.patch
new file mode 100644
index 0000000..3983cc3
--- /dev/null
+++ b/gnu/packages/patches/jsoncpp-pkg-config-version.patch
@@ -0,0 +1,24 @@
+Taken from upstream: 
https://github.com/open-source-parsers/jsoncpp/issues/1235.
+
+From ac2870298ed5b5a96a688d9df07461b31f83e906 Mon Sep 17 00:00:00 2001
+From: Derick Vigne <derickvigne@me.com>
+Date: Tue, 26 Jan 2021 14:59:12 -0500
+Subject: [PATCH] Fixed pkg-config Version
+
+---
+ pkg-config/jsoncpp.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkg-config/jsoncpp.pc.in b/pkg-config/jsoncpp.pc.in
+index 632a377f5..2a2221069 100644
+--- a/pkg-config/jsoncpp.pc.in
++++ b/pkg-config/jsoncpp.pc.in
+@@ -5,7 +5,7 @@ includedir=@includedir_for_pc_file@
+ 
+ Name: jsoncpp
+ Description: A C++ library for interacting with JSON
+-Version: @JSONCPP_VERSION@
++Version: @PROJECT_VERSION@
+ URL: https://github.com/open-source-parsers/jsoncpp
+ Libs: -L${libdir} -ljsoncpp
+ Cflags: -I${includedir}
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index c8dcf65..ae2e113 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -454,6 +454,25 @@ preserve existing comment in unserialization/serialization 
steps, making
 it a convenient format to store user input files.")
     (license license:expat)))
 
+;; XXX: TODO(core-updates): Remove this package and apply the patch to the
+;; jsoncpp package.  This patch fixes the package version declared in the
+;; pkg-config file.
+(define-public jsoncpp-with-pkg-version
+  (package
+    (inherit jsoncpp)
+    (name "jsoncpp")
+    (version "1.9.4")
+    (home-page "https://github.com/open-source-parsers/jsoncpp";)
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference (url home-page) (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0qnx5y6c90fphl9mj9d20j2dfgy6s5yr5l0xnzid0vh71zrp6jwv"))
+              (patches
+               (search-patches "jsoncpp-pkg-config-version.patch"))))))
+
 ;; Tensorflow does not build with jsoncpp 1.8.x.  It is built with commit
 ;; 4356d9bba191e1e16ce7a92073cbf3e63564e973, which lies between version 1.7.2
 ;; and 1.7.3.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]