Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/jq/, app-misc/jq/files/
Date: Wed, 05 Dec 2018 02:27:35
Message-Id: 1543976808.ed98a0926d3e99ce9e76fb16311b491797cd1042.chutzpah@gentoo
1 commit: ed98a0926d3e99ce9e76fb16311b491797cd1042
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 5 02:26:26 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 5 02:26:48 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed98a092
7
8 app-misc/jq: Version bump to 1.6
9
10 Package-Manager: Portage-2.3.52, Repoman-2.3.12
11 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
12
13 app-misc/jq/Manifest | 1 +
14 .../jq/files/jq-1.6-never-bundle-oniguruma.patch | 80 ++++++++++++++++++++++
15 app-misc/jq/files/jq-1.6-runpath.patch | 17 +++++
16 app-misc/jq/jq-1.6.ebuild | 60 ++++++++++++++++
17 4 files changed, 158 insertions(+)
18
19 diff --git a/app-misc/jq/Manifest b/app-misc/jq/Manifest
20 index ddcdd6da4a9..d57b21c2677 100644
21 --- a/app-misc/jq/Manifest
22 +++ b/app-misc/jq/Manifest
23 @@ -1 +1,2 @@
24 DIST jq-1.5.tar.gz 739309 BLAKE2B 9d36db80fa9365d9967c9e1691e723d5237e7db2ddef43e06391bb97ba3a163f07c79906b9cf94d4b53f20598dc8ccacaff9e54ff3c32387fef1b3d484c13e73 SHA512 4a0bb069ae875f47731d7d84ae6b82240703dc7a694cfb0aee4c7e9639defe7ba9af575d17dc32bda4426b80c186cc8dcd4505f3a6bcbe16b39e9b13097da238
25 +DIST jq-1.6.tar.gz 1750584 BLAKE2B c9be1314e9d027247de63492ee362e996ef85faf45a47ee421cad95ebde9188bff8d3fc7db64e717ab922e1052f3b1c1500f5589fc5b2199ab66effb000e442d SHA512 5da71f53c325257f1f546a2520fe47828b495c953270df25ea0e37741463fdda72f0ba4d5b05b25114ec30f27a559344c2b024bacabf610759f4e3e9efadb480
26
27 diff --git a/app-misc/jq/files/jq-1.6-never-bundle-oniguruma.patch b/app-misc/jq/files/jq-1.6-never-bundle-oniguruma.patch
28 new file mode 100644
29 index 00000000000..0b0e9260050
30 --- /dev/null
31 +++ b/app-misc/jq/files/jq-1.6-never-bundle-oniguruma.patch
32 @@ -0,0 +1,80 @@
33 +diff --git a/Makefile.am b/Makefile.am
34 +index 6344b4e..5f0c74d 100644
35 +--- a/Makefile.am
36 ++++ b/Makefile.am
37 +@@ -48,7 +48,7 @@ AM_YFLAGS = --warnings=all -d
38 + lib_LTLIBRARIES = libjq.la
39 + libjq_la_SOURCES = ${LIBJQ_SRC}
40 + libjq_la_LIBADD = -lm
41 +-libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:0
42 ++libjq_la_LDFLAGS = -export-symbols-regex '^j[qv]_' -version-info 1:4:0
43 +
44 + if WIN32
45 + libjq_la_LIBADD += -lshlwapi
46 +@@ -137,15 +137,6 @@ jq.1: $(srcdir)/jq.1.prebuilt
47 + endif
48 +
49 +
50 +-### Build oniguruma
51 +-
52 +-if BUILD_ONIGURUMA
53 +-libjq_la_LIBADD += modules/oniguruma/src/.libs/libonig.la
54 +-SUBDIRS = modules/oniguruma
55 +-endif
56 +-
57 +-AM_CFLAGS += $(onig_CFLAGS)
58 +-
59 + ### Packaging
60 +
61 + docs/site.yml: configure.ac
62 +diff --git a/configure.ac b/configure.ac
63 +index 280694c..0c5d86f 100644
64 +--- a/configure.ac
65 ++++ b/configure.ac
66 +@@ -236,45 +236,20 @@ AC_ARG_WITH([oniguruma],
67 + [try this for a non-standard install prefix of the oniguruma library])], ,
68 + [with_oniguruma=yes])
69 +
70 +-onig_CFLAGS=
71 +-onig_LDFLAGS=
72 +-build_oniguruma=no
73 + AS_IF([test "x$with_oniguruma" != xno], [
74 + save_CFLAGS="$CFLAGS"
75 + save_LDFLAGS="$LDFLAGS"
76 +- AS_IF([test "x$with_oniguruma" != xyes], [
77 +- AS_IF([test "x$with_oniguruma" = xbuiltin], [
78 +- build_oniguruma=yes
79 +- ], [
80 +- onig_CFLAGS="-I${with_oniguruma}/include"
81 +- onig_LDFLAGS="-L${with_oniguruma}/lib"
82 +- ])
83 +- ])
84 + AS_IF([test "x$build_oniguruma" = xno], [
85 + # check for ONIGURUMA library, either in /usr or where requested
86 +- CFLAGS="$CFLAGS $onig_CFLAGS"
87 +- LDFLAGS="$LDFLAGS $onig_LDFLAGS"
88 + AC_CHECK_HEADER("oniguruma.h",
89 + AC_CHECK_LIB([onig],[onig_version]))
90 + # handle check results
91 + AS_IF([test "x$ac_cv_lib_onig_onig_version" != "xyes"], [
92 +- build_oniguruma=yes
93 +- AC_MSG_NOTICE([Oniguruma was not found. Will use the packaged oniguruma.])
94 ++ AC_MSG_ERROR(oniguruma.h not found)
95 + ])
96 + ])
97 +- AS_IF([test "x$build_oniguruma" = xyes -a -f "${srcdir}/modules/oniguruma/configure.ac" ], [
98 +- onig_CFLAGS="-I${srcdir}/modules/oniguruma/src"
99 +- onig_LDFLAGS="-L${srcdir}/modules/oniguruma/src -Wl,-rpath,${libdir}"
100 +- AC_CONFIG_SUBDIRS([modules/oniguruma])
101 +- AC_DEFINE([HAVE_LIBONIG],1,[Define to 1 if the system includes libonig])
102 +- ])
103 +- CFLAGS="$save_CFLAGS"
104 +- LDFLAGS="$save_LDFLAGS"
105 + ])
106 +-AC_SUBST(onig_CFLAGS)
107 +-AC_SUBST(onig_LDFLAGS)
108 +
109 +-AM_CONDITIONAL([BUILD_ONIGURUMA], [test "x$build_oniguruma" = xyes])
110 + AC_SUBST([BUNDLER], ["$bundle_cmd"])
111 +
112 + AC_CONFIG_MACRO_DIR([config/m4])
113
114 diff --git a/app-misc/jq/files/jq-1.6-runpath.patch b/app-misc/jq/files/jq-1.6-runpath.patch
115 new file mode 100644
116 index 00000000000..40a2ed02f3d
117 --- /dev/null
118 +++ b/app-misc/jq/files/jq-1.6-runpath.patch
119 @@ -0,0 +1,17 @@
120 +diff --git a/configure.ac b/configure.ac
121 +index 280694c..7227c9d 100644
122 +--- a/configure.ac
123 ++++ b/configure.ac
124 +@@ -280,4 +280,11 @@ AC_SUBST([BUNDLER], ["$bundle_cmd"])
125 + AC_CONFIG_MACRO_DIR([config/m4])
126 + AC_CONFIG_FILES([Makefile])
127 + AC_OUTPUT
128 +-
129 ++AC_ARG_ENABLE([rpathhack],
130 ++ [AC_HELP_STRING([--enable-rpathhack], [patch libtool to remove RPATH])],
131 ++ [
132 ++AC_MSG_RESULT([patching libtool to fix rpath])
133 ++sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
134 ++sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
135 ++ ],
136 ++ [])
137
138 diff --git a/app-misc/jq/jq-1.6.ebuild b/app-misc/jq/jq-1.6.ebuild
139 new file mode 100644
140 index 00000000000..43d94479124
141 --- /dev/null
142 +++ b/app-misc/jq/jq-1.6.ebuild
143 @@ -0,0 +1,60 @@
144 +# Copyright 1999-2018 Gentoo Authors
145 +# Distributed under the terms of the GNU General Public License v2
146 +
147 +EAPI=7
148 +
149 +inherit autotools
150 +
151 +DESCRIPTION="A lightweight and flexible command-line JSON processor"
152 +HOMEPAGE="https://stedolan.github.com/jq/"
153 +SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz"
154 +
155 +LICENSE="MIT CC-BY-3.0"
156 +SLOT="0"
157 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x64-macos"
158 +IUSE="oniguruma static-libs"
159 +
160 +DEPEND="
161 + >=sys-devel/bison-3.0
162 + sys-devel/flex
163 + oniguruma? ( dev-libs/oniguruma:=[static-libs?] )
164 +"
165 +RDEPEND="
166 + !static-libs? (
167 + oniguruma? ( dev-libs/oniguruma[static-libs?] )
168 + )
169 +"
170 +
171 +src_prepare() {
172 + local PATCHES=(
173 + "${FILESDIR}"/jq-1.6-never-bundle-oniguruma.patch
174 + "${FILESDIR}"/jq-1.6-runpath.patch
175 + )
176 + use oniguruma || { sed -i 's:tests/onigtest::' Makefile.am || die; }
177 + sed -i '/^dist_doc_DATA/d' Makefile.am || die
178 + sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \
179 + configure.ac || die
180 +
181 + default
182 + eautoreconf
183 +}
184 +
185 +src_configure() {
186 + local econfargs=(
187 + # don't try to rebuild docs
188 + --disable-docs
189 + --disable-valgrind
190 + --disable-maintainer-mode
191 + --enable-rpathhack
192 + $(use_enable static-libs static)
193 + $(use_with oniguruma)
194 + )
195 + econf "${econfargs[@]}"
196 +}
197 +
198 +src_install() {
199 + local DOCS=( AUTHORS README )
200 + default
201 +
202 + use static-libs || { find "${D}" -name '*.la' -delete || die; }
203 +}