Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | SUMMARY = "Lightweight and flexible command-line JSON processor" |
| 2 | DESCRIPTION = "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 Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 5 | HOMEPAGE = "https://jqlang.github.io/jq/" |
| 6 | BUGTRACKER = "https://github.com/jqlang/jq/issues" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7 | SECTION = "utils" |
| 8 | LICENSE = "MIT" |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=488f4e0b04c0456337fb70d1ac1758ba" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 10 | |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 11 | GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/" |
| 12 | SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 13 | file://run-ptest \ |
| 14 | " |
Patrick Williams | 169d7bc | 2024-01-05 11:33:25 -0600 | [diff] [blame^] | 15 | SRC_URI[sha256sum] = "478c9ca129fd2e3443fe27314b455e211e0d8c60bc8ff7df703873deeee580c2" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 16 | |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 17 | inherit autotools github-releases ptest |
| 18 | |
| 19 | UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 20 | |
| 21 | PACKAGECONFIG ?= "oniguruma" |
| 22 | |
| 23 | PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native" |
| 24 | PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native" |
| 25 | PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 26 | # enable if you want ptest running under valgrind |
| 27 | PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 28 | |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 29 | do_configure:append() { |
| 30 | sed -i -e "/^ac_cs_config=/ s:${WORKDIR}::g" ${B}/config.status |
| 31 | } |
| 32 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 33 | do_install_ptest() { |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 34 | cp -rf ${S}/tests ${D}${PTEST_PATH} |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 35 | 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 Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 39 | 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 Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 44 | } |
| 45 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 46 | BBCLASSEXTEND = "native" |