blob: 4fa98aa44f351747d79cd58d21151625b8effd91 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "Lightweight and flexible command-line JSON processor"
2DESCRIPTION = "jq is like sed for JSON data, you can use it to slice and \
3 filter and map and transform structured data with the same \
4 ease that sed, awk, grep and friends let you play with text."
5HOMEPAGE = "https://stedolan.github.io/jq/"
6BUGTRACKER = "https://github.com/stedolan/jq/issues"
7SECTION = "utils"
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://COPYING;md5=2814b59e00e7918c864fa3b6bbe049b4"
10
11PV = "1.6+git${SRCPV}"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050012SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \
13 file://0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch \
14 file://0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch \
15 file://run-ptest \
16 "
17SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8"
Andrew Geissler595f6302022-01-24 19:11:47 +000018S = "${WORKDIR}/git"
19
Andrew Geissler87f5cff2022-09-30 13:13:31 -050020inherit autotools-brokensep ptest
Andrew Geissler595f6302022-01-24 19:11:47 +000021
22PACKAGECONFIG ?= "oniguruma"
23
24PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native"
25PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native"
26PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig"
Patrick Williams2390b1b2022-11-03 13:47:49 -050027# enable if you want ptest running under valgrind
28PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
Andrew Geissler595f6302022-01-24 19:11:47 +000029
Andrew Geissler87f5cff2022-09-30 13:13:31 -050030do_install_ptest() {
31 cp -rf ${B}/tests ${D}${PTEST_PATH}
32 cp -rf ${B}/.libs ${D}${PTEST_PATH}
33 # libjq.so.* is packaged in the main jq component, so remove it from ptest
34 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.*
35 ln -sf ${bindir}/jq ${D}${PTEST_PATH}
Patrick Williams2390b1b2022-11-03 13:47:49 -050036 if [ "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'true', 'false', d)}" = "false" ]; then
37 sed -i 's:#export NO_VALGRIND=1:export NO_VALGRIND=1:g' ${D}${PTEST_PATH}/run-ptest
38 fi
39 # handle multilib
40 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Andrew Geissler87f5cff2022-09-30 13:13:31 -050041}
42
Andrew Geissler595f6302022-01-24 19:11:47 +000043BBCLASSEXTEND = "native"