summaryrefslogtreecommitdiff
path: root/app-misc/jq
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/jq
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/jq')
-rw-r--r--app-misc/jq/Manifest6
-rw-r--r--app-misc/jq/files/jq-1.5-dynamic-link.patch13
-rw-r--r--app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch34
-rw-r--r--app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch58
-rw-r--r--app-misc/jq/jq-1.5-r3.ebuild60
-rw-r--r--app-misc/jq/metadata.xml14
6 files changed, 185 insertions, 0 deletions
diff --git a/app-misc/jq/Manifest b/app-misc/jq/Manifest
new file mode 100644
index 000000000000..488b05f81d73
--- /dev/null
+++ b/app-misc/jq/Manifest
@@ -0,0 +1,6 @@
+AUX jq-1.5-dynamic-link.patch 292 BLAKE2B 65edf9902b3a97621cb5485931d6978625b89870e0728c92dec008abf0a978aa1ea496245294c0a8eed75498abec5a01b7fea8efa8185b7c54d4140e75af8abd SHA512 1573ab7bdb9bd28db1ef7cbf834aada998b9651ffc1a9c67941faf23490ac3b145b6af6f1e41212b2c8c990d738b24bc7912a591db386f922c0b829a59e465ee
+AUX jq-1.5-heap_buffer_overflow_in_tokenadd.patch 1241 BLAKE2B ae161ea9ce220f57ee5aeec1b9d202de8401dcb5e842ba8d105eb3a2bc2cbd0f387980d76bfe8a30a6304ea04a1d00fe8733e7dab46507602d16eac74387f3a6 SHA512 7c0e7268a8715f9354322b81e82971fd6e6810206024fb59f55fdf319c1053fdd17ab4d2a78c8edc9ed1638339671419f4ea92cbb0f8ffbb34e5b521efb35718
+AUX jq-1.5-remove-automagic-dep-on-oniguruma.patch 1879 BLAKE2B 821dc0ba57bdabf268efb3429417ee5e32d666dc33debea89aa7550c4bbad3c5938a6a0bf0cb4adfc2c0173b7bfeac3dcd16c52b19be6e92733ea8dfee89b4b5 SHA512 3c7efccf85beda5f80c66432f6950b2d885c4587e6ed3cdc66447f60440dc0287da834cc5744ddd7af8ad36677254ebae6969bc498d36e457dfac69ca0da3f6d
+DIST jq-1.5.tar.gz 739309 BLAKE2B 9d36db80fa9365d9967c9e1691e723d5237e7db2ddef43e06391bb97ba3a163f07c79906b9cf94d4b53f20598dc8ccacaff9e54ff3c32387fef1b3d484c13e73 SHA512 4a0bb069ae875f47731d7d84ae6b82240703dc7a694cfb0aee4c7e9639defe7ba9af575d17dc32bda4426b80c186cc8dcd4505f3a6bcbe16b39e9b13097da238
+EBUILD jq-1.5-r3.ebuild 1385 BLAKE2B e5e6fcc3dd40dc2a6667763dced918ed3c007275a2daecb60704ecfdcacae7398fcba373809c9f22c146f91caafae4b4d2b0eeae6c187a2cfeb34efdb9027d6d SHA512 da253fc8d393a3106437b5cba2a4c618076f9c8d23b834d8aab2079de876a53e8a2f2b5ebcd6d79ff48b53c54276a81aa314ccbbbc22e02d720a800a40e20ef7
+MISC metadata.xml 423 BLAKE2B 1e5f03ac7d6b93814bdfe760d9b2d9b74447272b554f7e92c40918069c7787ee8c60dd68a86df38c67f27422f0f281c7ad7234305a45532b657be0397a5b81af SHA512 1787b1ce5d050aaa440996ceaf2367e39192af71e7d9a0d973e8dc8a87854f910aefd020c869867e3da5da33d27cc261047a1ded58b18052b21bf6737ef3081c
diff --git a/app-misc/jq/files/jq-1.5-dynamic-link.patch b/app-misc/jq/files/jq-1.5-dynamic-link.patch
new file mode 100644
index 000000000000..dbc2f11acb7f
--- /dev/null
+++ b/app-misc/jq/files/jq-1.5-dynamic-link.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index c3a771f..274c01e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -84,7 +84,7 @@ main.c: version.h
+
+ bin_PROGRAMS = jq
+ jq_SOURCES = main.c version.h
+-jq_LDFLAGS = -static-libtool-libs
++jq_LDFLAGS =
+ jq_LDADD = libjq.la -lm
+
+ if ENABLE_ALL_STATIC
diff --git a/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch b/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch
new file mode 100644
index 000000000000..edb07d8388b5
--- /dev/null
+++ b/app-misc/jq/files/jq-1.5-heap_buffer_overflow_in_tokenadd.patch
@@ -0,0 +1,34 @@
+From 8eb1367ca44e772963e704a700ef72ae2e12babd Mon Sep 17 00:00:00 2001
+From: Nicolas Williams <nico@cryptonector.com>
+Date: Sat, 24 Oct 2015 17:24:57 -0500
+Subject: [PATCH] Heap buffer overflow in tokenadd() (fix #105)
+
+This was an off-by one: the NUL terminator byte was not allocated on
+resize. This was triggered by JSON-encoded numbers longer than 256
+bytes.
+---
+ src/jv_parse.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/jv_parse.c b/src/jv_parse.c
+index 3102ed4..84245b8 100644
+--- a/jv_parse.c
++++ b/jv_parse.c
+@@ -383,7 +383,7 @@ static pfunc stream_token(struct jv_parser* p, char ch) {
+
+ static void tokenadd(struct jv_parser* p, char c) {
+ assert(p->tokenpos <= p->tokenlen);
+- if (p->tokenpos == p->tokenlen) {
++ if (p->tokenpos >= (p->tokenlen - 1)) {
+ p->tokenlen = p->tokenlen*2 + 256;
+ p->tokenbuf = jv_mem_realloc(p->tokenbuf, p->tokenlen);
+ }
+@@ -485,7 +485,7 @@ static pfunc check_literal(struct jv_parser* p) {
+ TRY(value(p, v));
+ } else {
+ // FIXME: better parser
+- p->tokenbuf[p->tokenpos] = 0; // FIXME: invalid
++ p->tokenbuf[p->tokenpos] = 0;
+ char* end = 0;
+ double d = jvp_strtod(&p->dtoa, p->tokenbuf, &end);
+ if (end == 0 || *end != 0)
diff --git a/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch b/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch
new file mode 100644
index 000000000000..95ba0e058056
--- /dev/null
+++ b/app-misc/jq/files/jq-1.5-remove-automagic-dep-on-oniguruma.patch
@@ -0,0 +1,58 @@
+commit 18b4b18b41f5ed396d73449ce8d6ec408d95d6b2
+Author: David Tolnay <dtolnay@gmail.com>
+Date: Sat Nov 21 10:05:37 2015 -0800
+
+ Support --without-oniguruma
+
+diff --git a/configure.ac b/configure.ac
+index 9e2c8cf..7f6be34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,27 +52,26 @@ fi
+ AC_ARG_WITH([oniguruma],
+ [AS_HELP_STRING([--with-oniguruma=prefix],
+ [try this for a non-standard install prefix of the oniguruma library])],
+- [ONIGURUMAPATHSET=1],
+- [ONIGURUMAPATHSET=0])
+-
+-if test $ONIGURUMAPATHSET = 1; then
+- CFLAGS="$CFLAGS -I${with_oniguruma}/include"
+- LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib"
+-fi
+-
+-# check for ONIGURUMA library
+-HAVE_ONIGURUMA=0
+-AC_CHECK_HEADER("oniguruma.h",
+- AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; HAVE_ONIGURUMA=1;]))
+-
+-# handle check results
+-if test $HAVE_ONIGURUMA != 1; then
+- AC_MSG_NOTICE([Oniguruma was not found.])
+- AC_MSG_NOTICE([ Try setting the location using '--with-oniguruma=PREFIX' ])
+-else
+- AC_DEFINE([HAVE_ONIGURUMA],1,[Define to 1 if Oniguruma is installed])
+-fi
+-
++ [],
++ [with_oniguruma=yes])
++
++AS_IF([test "x$with_oniguruma" != xno], [
++ AS_IF([test "x$with_oniguruma" != xyes], [
++ CFLAGS="$CFLAGS -I${with_oniguruma}/include"
++ LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib"
++ ])
++ # check for ONIGURUMA library
++ have_oniguruma=0
++ AC_CHECK_HEADER("oniguruma.h",
++ AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; have_oniguruma=1;]))
++ # handle check results
++ AS_IF([test $have_oniguruma = 1], [
++ AC_DEFINE([HAVE_ONIGURUMA], 1, [Define to 1 if Oniguruma is installed])
++ ], [
++ AC_MSG_NOTICE([Oniguruma was not found.])
++ AC_MSG_NOTICE([Try setting the location using '--with-oniguruma=PREFIX'])
++ ])
++])
+
+ dnl Check for valgrind
+ AC_CHECK_PROGS(valgrind_cmd, valgrind)
diff --git a/app-misc/jq/jq-1.5-r3.ebuild b/app-misc/jq/jq-1.5-r3.ebuild
new file mode 100644
index 000000000000..f2b7f8001e52
--- /dev/null
+++ b/app-misc/jq/jq-1.5-r3.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools ltprune
+
+DESCRIPTION="A lightweight and flexible command-line JSON processor"
+HOMEPAGE="https://stedolan.github.com/jq/"
+SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz"
+
+LICENSE="MIT CC-BY-3.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~ppc64 x86 ~amd64-linux ~x64-macos"
+IUSE="oniguruma static-libs"
+
+DEPEND="
+ >=sys-devel/bison-3.0
+ sys-devel/flex
+ oniguruma? ( dev-libs/oniguruma:=[static-libs?] )
+"
+RDEPEND="
+ !static-libs? (
+ oniguruma? ( dev-libs/oniguruma[static-libs?] )
+ )
+"
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-1.5-dynamic-link.patch
+ "${FILESDIR}"/${PN}-1.5-remove-automagic-dep-on-oniguruma.patch
+ "${FILESDIR}"/${PN}-1.5-heap_buffer_overflow_in_tokenadd.patch
+ )
+
+ use oniguruma || { sed -i 's:tests/onigtest::' Makefile.am || die; }
+ sed -i '/^dist_doc_DATA/d' Makefile.am || die
+ sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \
+ configure.ac || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local econfargs=(
+ # don't try to rebuild docs
+ --disable-docs
+ --disable-valgrind
+ $(use_enable static-libs static)
+ $(use_with oniguruma)
+ )
+ econf "${econfargs[@]}"
+}
+
+src_install() {
+ local DOCS=( AUTHORS README )
+ default
+
+ use static-libs || prune_libtool_files
+}
diff --git a/app-misc/jq/metadata.xml b/app-misc/jq/metadata.xml
new file mode 100644
index 000000000000..d9b5cb1343c4
--- /dev/null
+++ b/app-misc/jq/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <use>
+ <flag name="oniguruma">Use dev-libs/oniguruma for regular expression support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">stedolan/jq</remote-id>
+ </upstream>
+</pkgmetadata>