commit: c73313ba294602d3ec781bbfafc4c63b9e518062
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Dec 5 21:56:11 2018 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Dec 5 21:56:39 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c73313ba
app-misc/jq: Revision bump, segfault fix with -ar params
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
app-misc/jq/files/jq-1.6-segfault-fix.patch | 22 ++++++++++++++++++++++
app-misc/jq/{jq-1.6.ebuild => jq-1.6-r1.ebuild} | 1 +
2 files changed, 23 insertions(+)
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
index 00000000000..8eb7d456bc6
--- /dev/null
+++ b/app-misc/jq/files/jq-1.6-segfault-fix.patch
@@ -0,0 +1,22 @@
+From a1f1231a73c221155d539a281181ef37f874869d Mon Sep 17 00:00:00 2001
+From: William Langford <[email protected]>
+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);
+ }
diff --git a/app-misc/jq/jq-1.6.ebuild b/app-misc/jq/jq-1.6-r1.ebuild
similarity index 97%
rename from app-misc/jq/jq-1.6.ebuild
rename to app-misc/jq/jq-1.6-r1.ebuild
index 43d94479124..e5e7da47aca 100644
--- a/app-misc/jq/jq-1.6.ebuild
+++ b/app-misc/jq/jq-1.6-r1.ebuild
@@ -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