summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2016-01-08 17:07:52 -0800
committerPatrick McLean <chutzpah@gentoo.org>2016-01-08 17:07:52 -0800
commitb362cd3915b4c0df43185a85377640ac3f0fda96 (patch)
tree3415d1db5d8d40a533e642a32b7da2492fb4389b /app-misc/jq
parentdev-libs/girara: Version bump. (diff)
downloadgentoo-b362cd3915b4c0df43185a85377640ac3f0fda96.tar.gz
gentoo-b362cd3915b4c0df43185a85377640ac3f0fda96.tar.bz2
gentoo-b362cd3915b4c0df43185a85377640ac3f0fda96.zip
app-misc/jq: version bump to 1.5
This also fixes bugs 559334 and 566140, and adds a new "oniguruma" USE flag. Package-Manager: portage-2.2.26
Diffstat (limited to 'app-misc/jq')
-rw-r--r--app-misc/jq/Manifest1
-rw-r--r--app-misc/jq/files/jq-1.5-dynamic-link.patch13
-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.ebuild50
-rw-r--r--app-misc/jq/metadata.xml3
5 files changed, 125 insertions, 0 deletions
diff --git a/app-misc/jq/Manifest b/app-misc/jq/Manifest
index b9320a7f4dc3..e3acfd5834dd 100644
--- a/app-misc/jq/Manifest
+++ b/app-misc/jq/Manifest
@@ -1 +1,2 @@
DIST jq-1.4.tar.gz 578317 SHA256 998c41babeb57b4304e65b4eb73094279b3ab1e63801b6b4bddd487ce009b39d SHA512 02e601b713a3249bcfe5373153dff38a63bf504895181ca3f691dbf033b407373a9c5880001bbd1954123cdf89f4fe75e2a5168e7a7cf13b3f7355dc18f92458 WHIRLPOOL 93c85a40d8aaf36d1f846ee9050aebe32a3a135e89a64647688b447af8733d210a4716d4ee62271a7d33f2e498e8aee7b2e88ed5373d0ec07e810215c1d288ab
+DIST jq-1.5.tar.gz 739309 SHA256 c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c SHA512 4a0bb069ae875f47731d7d84ae6b82240703dc7a694cfb0aee4c7e9639defe7ba9af575d17dc32bda4426b80c186cc8dcd4505f3a6bcbe16b39e9b13097da238 WHIRLPOOL ca45763fb43ba0bc4a97f1a6d34e3c5af0f25f2548d04646f76ac18e95792445eaa42869ce4a7a736b7d6bc09440225e277df79abacf23ef3c8f1b41170e2907
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-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.ebuild b/app-misc/jq/jq-1.5.ebuild
new file mode 100644
index 000000000000..4bf14a4d8d75
--- /dev/null
+++ b/app-misc/jq/jq-1.5.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools
+
+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 ~x86 ~x64-macos"
+IUSE="oniguruma static-libs test"
+
+DEPEND="sys-devel/bison
+ sys-devel/flex
+ oniguruma? ( dev-libs/oniguruma[static-libs?] )
+ test? ( dev-util/valgrind )"
+
+DOCS=( AUTHORS README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.5-dynamic-link.patch
+ "${FILESDIR}"/${P}-remove-automagic-dep-on-oniguruma.patch
+)
+
+src_prepare() {
+ 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() {
+ # don't try to rebuild docs
+ econf \
+ --disable-docs \
+ $(use_enable static-libs static) \
+ $(use_with oniguruma)
+}
+
+src_install() {
+ default
+ use static-libs || find "${ED}" -name libjq.la -delete
+}
diff --git a/app-misc/jq/metadata.xml b/app-misc/jq/metadata.xml
index efa5eb0078f3..21adb91b7b7e 100644
--- a/app-misc/jq/metadata.xml
+++ b/app-misc/jq/metadata.xml
@@ -5,4 +5,7 @@
<email>radhermit@gentoo.org</email>
<name>Tim Harder</name>
</maintainer>
+ <use>
+ <flag name='oniguruma'>Use dev-libs/oniguruma for regular expression support</flag>
+ </use>
</pkgmetadata>