blob: 6b12335513a73e78b0b9785025aaff6510268bda [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."
Andrew Geissler220dafd2023-10-04 10:18:08 -05005HOMEPAGE = "https://jqlang.github.io/jq/"
6BUGTRACKER = "https://github.com/jqlang/jq/issues"
Andrew Geissler595f6302022-01-24 19:11:47 +00007SECTION = "utils"
8LICENSE = "MIT"
Andrew Geissler220dafd2023-10-04 10:18:08 -05009LIC_FILES_CHKSUM = "file://COPYING;md5=488f4e0b04c0456337fb70d1ac1758ba"
Andrew Geissler595f6302022-01-24 19:11:47 +000010
Andrew Geissler220dafd2023-10-04 10:18:08 -050011GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/"
12SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050013 file://run-ptest \
14 "
Patrick Williams169d7bc2024-01-05 11:33:25 -060015SRC_URI[sha256sum] = "478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2"
Andrew Geissler595f6302022-01-24 19:11:47 +000016
Andrew Geissler220dafd2023-10-04 10:18:08 -050017inherit autotools github-releases ptest
18
19UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)"
Andrew Geissler595f6302022-01-24 19:11:47 +000020
21PACKAGECONFIG ?= "oniguruma"
22
23PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native"
24PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native"
25PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig"
Patrick Williams2390b1b2022-11-03 13:47:49 -050026# enable if you want ptest running under valgrind
27PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
Andrew Geissler595f6302022-01-24 19:11:47 +000028
Andrew Geissler220dafd2023-10-04 10:18:08 -050029do_configure:append() {
30 sed -i -e "/^ac_cs_config=/ s:${WORKDIR}::g" ${B}/config.status
31}
32
Andrew Geissler87f5cff2022-09-30 13:13:31 -050033do_install_ptest() {
Andrew Geissler220dafd2023-10-04 10:18:08 -050034 cp -rf ${S}/tests ${D}${PTEST_PATH}
Andrew Geissler87f5cff2022-09-30 13:13:31 -050035 cp -rf ${B}/.libs ${D}${PTEST_PATH}
36 # libjq.so.* is packaged in the main jq component, so remove it from ptest
37 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.*
38 ln -sf ${bindir}/jq ${D}${PTEST_PATH}
Patrick Williams2390b1b2022-11-03 13:47:49 -050039 if [ "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'true', 'false', d)}" = "false" ]; then
40 sed -i 's:#export NO_VALGRIND=1:export NO_VALGRIND=1:g' ${D}${PTEST_PATH}/run-ptest
41 fi
42 # handle multilib
43 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
Andrew Geissler87f5cff2022-09-30 13:13:31 -050044}
45
Andrew Geissler595f6302022-01-24 19:11:47 +000046BBCLASSEXTEND = "native"