1 |
commit: 01b4cc080b9dcecb9db614fb91b921e4d08d8cbd |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 10 09:32:23 2017 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 10 09:32:33 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01b4cc08 |
7 |
|
8 |
app-misc/jq: make valgrind optional for tests |
9 |
|
10 |
Some arches like alpha, ia64 or x86 on modern toolchain |
11 |
do not support valgrind. Tests are still useful to run. |
12 |
|
13 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
14 |
|
15 |
app-misc/jq/jq-1.5-r3.ebuild | 60 ++++++++++++++++++++++++++++++++++++++++++++ |
16 |
app-misc/jq/metadata.xml | 1 + |
17 |
2 files changed, 61 insertions(+) |
18 |
|
19 |
diff --git a/app-misc/jq/jq-1.5-r3.ebuild b/app-misc/jq/jq-1.5-r3.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..0d2d67b5b72 |
22 |
--- /dev/null |
23 |
+++ b/app-misc/jq/jq-1.5-r3.ebuild |
24 |
@@ -0,0 +1,60 @@ |
25 |
+# Copyright 1999-2017 Gentoo Foundation |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=6 |
29 |
+ |
30 |
+inherit autotools eutils |
31 |
+ |
32 |
+DESCRIPTION="A lightweight and flexible command-line JSON processor" |
33 |
+HOMEPAGE="https://stedolan.github.com/jq/" |
34 |
+SRC_URI="https://github.com/stedolan/jq/releases/download/${P}/${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="MIT CC-BY-3.0" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~arm ~ia64 ~x86 ~amd64-linux ~x64-macos" |
39 |
+IUSE="oniguruma static-libs test +valgrind" |
40 |
+ |
41 |
+DEPEND=" |
42 |
+ >=sys-devel/bison-3.0 |
43 |
+ sys-devel/flex |
44 |
+ oniguruma? ( dev-libs/oniguruma[static-libs?] ) |
45 |
+ test? ( valgrind? ( dev-util/valgrind ) ) |
46 |
+" |
47 |
+RDEPEND=" |
48 |
+ !static-libs? ( |
49 |
+ oniguruma? ( dev-libs/oniguruma[static-libs?] ) |
50 |
+ ) |
51 |
+" |
52 |
+ |
53 |
+src_prepare() { |
54 |
+ local PATCHES=( |
55 |
+ "${FILESDIR}"/${PN}-1.5-dynamic-link.patch |
56 |
+ "${FILESDIR}"/${PN}-1.5-remove-automagic-dep-on-oniguruma.patch |
57 |
+ "${FILESDIR}"/${PN}-1.5-heap_buffer_overflow_in_tokenadd.patch |
58 |
+ ) |
59 |
+ |
60 |
+ sed -i '/^dist_doc_DATA/d' Makefile.am || die |
61 |
+ sed -i -r "s:(m4_define\(\[jq_version\],) .+\):\1 \[${PV}\]):" \ |
62 |
+ configure.ac || die |
63 |
+ |
64 |
+ default |
65 |
+ eautoreconf |
66 |
+} |
67 |
+ |
68 |
+src_configure() { |
69 |
+ local econfargs=( |
70 |
+ # don't try to rebuild docs |
71 |
+ --disable-docs |
72 |
+ $(use_enable static-libs static) |
73 |
+ $(use_enable valgrind) |
74 |
+ $(use_with oniguruma) |
75 |
+ ) |
76 |
+ econf "${econfargs[@]}" |
77 |
+} |
78 |
+ |
79 |
+src_install() { |
80 |
+ local DOCS=( AUTHORS README ) |
81 |
+ default |
82 |
+ |
83 |
+ use static-libs || prune_libtool_files |
84 |
+} |
85 |
|
86 |
diff --git a/app-misc/jq/metadata.xml b/app-misc/jq/metadata.xml |
87 |
index d9b5cb1343c..ef652ee00bf 100644 |
88 |
--- a/app-misc/jq/metadata.xml |
89 |
+++ b/app-misc/jq/metadata.xml |
90 |
@@ -7,6 +7,7 @@ |
91 |
</maintainer> |
92 |
<use> |
93 |
<flag name="oniguruma">Use dev-libs/oniguruma for regular expression support</flag> |
94 |
+ <flag name="valgrind">Depend on dev-util/vagrind for test suite</flag> |
95 |
</use> |
96 |
<upstream> |
97 |
<remote-id type="github">stedolan/jq</remote-id> |