summaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authorVlad Glagolev2019-06-12 19:06:22 +0000
committerVlad Glagolev2019-06-12 19:06:45 +0000
commit7c8503d92e92181c81e7958f33177847319bb837 (patch)
tree8bb682cabef871142cfbcbf4701aac0b65dd6952 /editors
parentfad660f0f1e67962aa0f529b8afe7d618afa44cc (diff)
jq: => 1.6
Diffstat (limited to 'editors')
-rwxr-xr-xeditors/jq/BUILD3
-rwxr-xr-xeditors/jq/DEPENDS7
-rwxr-xr-xeditors/jq/DETAILS4
-rw-r--r--editors/jq/HISTORY8
-rwxr-xr-xeditors/jq/PRE_BUILD7
-rw-r--r--editors/jq/oniguruma.patch27
-rw-r--r--editors/jq/segfault.patch22
7 files changed, 75 insertions, 3 deletions
diff --git a/editors/jq/BUILD b/editors/jq/BUILD
new file mode 100755
index 0000000000..a5c6e1758a
--- /dev/null
+++ b/editors/jq/BUILD
@@ -0,0 +1,3 @@
+OPTS="${JQ_OPTS} ${OPTS}" &&
+
+default_build
diff --git a/editors/jq/DEPENDS b/editors/jq/DEPENDS
index 7ecea68e58..de263f77d6 100755
--- a/editors/jq/DEPENDS
+++ b/editors/jq/DEPENDS
@@ -1,2 +1,7 @@
depends flex &&
-depends bison
+depends bison &&
+
+optional_depends oniguruma \
+ "--with-oniguruma=${INSTALL_ROOT}/usr" \
+ "--without-oniguruma" \
+ "for regexp support via system oniguruma library"
diff --git a/editors/jq/DETAILS b/editors/jq/DETAILS
index 8b6981fa05..27592f9448 100755
--- a/editors/jq/DETAILS
+++ b/editors/jq/DETAILS
@@ -1,8 +1,8 @@
SPELL=jq
- VERSION=1.5
+ VERSION=1.6
SOURCE="${SPELL}-${VERSION}.tar.gz"
SOURCE_URL[0]=https://github.com/stedolan/$SPELL/releases/download/$SPELL-$VERSION/$SOURCE
- SOURCE_HASH=sha512:4a0bb069ae875f47731d7d84ae6b82240703dc7a694cfb0aee4c7e9639defe7ba9af575d17dc32bda4426b80c186cc8dcd4505f3a6bcbe16b39e9b13097da238
+ SOURCE_HASH=sha512:5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE="http://stedolan.github.io/jq/download/"
LICENSE[0]=MIT
diff --git a/editors/jq/HISTORY b/editors/jq/HISTORY
index 8255576e4c..b48b0ec2c7 100644
--- a/editors/jq/HISTORY
+++ b/editors/jq/HISTORY
@@ -1,3 +1,11 @@
+2019-06-12 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS: updated spell to 1.6
+ * DEPENDS: added oniguruma optional dependency
+ * BUILD: added, to use JQ_OPTS
+ * PRE_BUILD: added, to apply patches and reconfigure
+ * segfault.patch, oniguruma.patch: backported some patches from Gentoo
+ that fix minor issues
+
2016-08-31 Ismael Luceno <ismael@sourcemage.org>
* DETAILS: Fixed SOURCE_URL[0]
updated spell to 1.5
diff --git a/editors/jq/PRE_BUILD b/editors/jq/PRE_BUILD
new file mode 100755
index 0000000000..535e3e5850
--- /dev/null
+++ b/editors/jq/PRE_BUILD
@@ -0,0 +1,7 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+patch -p1 < "${SPELL_DIRECTORY}/segfault.patch" &&
+patch -p1 < "${SPELL_DIRECTORY}/oniguruma.patch" &&
+
+autoreconf -fi
diff --git a/editors/jq/oniguruma.patch b/editors/jq/oniguruma.patch
new file mode 100644
index 0000000000..75ab111f88
--- /dev/null
+++ b/editors/jq/oniguruma.patch
@@ -0,0 +1,27 @@
+diff --git a/Makefile.am b/Makefile.am
+index 6344b4e..86d968e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -47,7 +47,7 @@ AM_YFLAGS = --warnings=all -d
+
+ lib_LTLIBRARIES = libjq.la
+ libjq_la_SOURCES = ${LIBJQ_SRC}
+-libjq_la_LIBADD = -lm
++libjq_la_LIBADD = -lm $(onig_LIBS)
+ libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:0
+
+ if WIN32
+diff --git a/configure.ac b/configure.ac
+index 280694c..d96026e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -249,6 +249,9 @@ AS_IF([test "x$with_oniguruma" != xno], [
+ onig_CFLAGS="-I${with_oniguruma}/include"
+ onig_LDFLAGS="-L${with_oniguruma}/lib"
+ ])
++ ], [
++ # with_oniguruma == yes
++ PKG_CHECK_MODULES([onig], [oniguruma])
+ ])
+ AS_IF([test "x$build_oniguruma" = xno], [
+ # check for ONIGURUMA library, either in /usr or where requested
diff --git a/editors/jq/segfault.patch b/editors/jq/segfault.patch
new file mode 100644
index 0000000000..8eb7d456bc
--- /dev/null
+++ b/editors/jq/segfault.patch
@@ -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);
+ }