app-misc/jq: disable valgrind and conditionally oniguruma tests
authorTim Harder <radhermit@gentoo.org>
Sat, 23 Sep 2017 10:21:38 +0000 (06:21 -0400)
committerTim Harder <radhermit@gentoo.org>
Sat, 23 Sep 2017 10:25:26 +0000 (06:25 -0400)
Closes: https://bugs.gentoo.org/603532

app-misc/jq/jq-1.5-r3.ebuild

index 1c82032438027a9ca92908952f2fb59affff0aa0..c82256392967fa55626afa93bd7e2b12191633b7 100644 (file)
@@ -12,13 +12,12 @@ 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 test +valgrind"
+IUSE="oniguruma static-libs test"
 
 DEPEND="
        >=sys-devel/bison-3.0
        sys-devel/flex
        oniguruma? ( dev-libs/oniguruma:=[static-libs?] )
-       test? ( valgrind? ( dev-util/valgrind ) )
 "
 RDEPEND="
        !static-libs? (
@@ -33,6 +32,7 @@ src_prepare() {
                "${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
@@ -45,8 +45,8 @@ src_configure() {
        local econfargs=(
                # don't try to rebuild docs
                --disable-docs
+               --disable-valgrind
                $(use_enable static-libs static)
-               $(use_enable valgrind)
                $(use_with oniguruma)
        )
        econf "${econfargs[@]}"