app-misc/jq: Revision bump, segfault fix with -ar params
authorPatrick McLean <patrick.mclean@sony.com>
Wed, 5 Dec 2018 21:56:11 +0000 (13:56 -0800)
committerPatrick McLean <chutzpah@gentoo.org>
Wed, 5 Dec 2018 21:56:39 +0000 (13:56 -0800)
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
app-misc/jq/files/jq-1.6-segfault-fix.patch [new file with mode: 0644]
app-misc/jq/jq-1.6-r1.ebuild [moved from app-misc/jq/jq-1.6.ebuild with 97% similarity]

diff --git a/app-misc/jq/files/jq-1.6-segfault-fix.patch b/app-misc/jq/files/jq-1.6-segfault-fix.patch
new file mode 100644 (file)
index 0000000..8eb7d45
--- /dev/null
@@ -0,0 +1,22 @@
+From a1f1231a73c221155d539a281181ef37f874869d Mon Sep 17 00:00:00 2001
+From: William Langford <wlangfor@gmail.com>
+Date: Tue, 20 Nov 2018 09:58:25 -0500
+Subject: [PATCH] Add missing jv_copy when printing with -ar
+
+---
+ src/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main.c b/src/main.c
+index b154689e..61ae43f9 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -168,7 +168,7 @@ static int process(jq_state *jq, jv value, int flags, int dumpopts) {
+   while (jv_is_valid(result = jq_next(jq))) {
+     if ((options & RAW_OUTPUT) && jv_get_kind(result) == JV_KIND_STRING) {
+       if (options & ASCII_OUTPUT) {
+-        jv_dumpf(result, stdout, JV_PRINT_ASCII);
++        jv_dumpf(jv_copy(result), stdout, JV_PRINT_ASCII);
+       } else {
+         fwrite(jv_string_value(result), 1, jv_string_length_bytes(jv_copy(result)), stdout);
+       }
similarity index 97%
rename from app-misc/jq/jq-1.6.ebuild
rename to app-misc/jq/jq-1.6-r1.ebuild
index 43d94479124218df7803504ec1cbf7110cce1182..e5e7da47acac18452b94fee6a963088b5e9158f2 100644 (file)
@@ -29,6 +29,7 @@ src_prepare() {
        local PATCHES=(
                "${FILESDIR}"/jq-1.6-never-bundle-oniguruma.patch
                "${FILESDIR}"/jq-1.6-runpath.patch
+               "${FILESDIR}"/jq-1.6-segfault-fix.patch
        )
        use oniguruma || { sed -i 's:tests/onigtest::' Makefile.am || die; }
        sed -i '/^dist_doc_DATA/d' Makefile.am || die