summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2026-04-08 19:47:32 +0200
committerKhem Raj <khem.raj@oss.qualcomm.com>2026-04-10 07:59:52 -0700
commited33569f822a3a8d41f82f6980a046d17aca37d5 (patch)
tree14952c09a0ea5d6e2e37a5624e183eb94bd7bb6d /meta-oe/recipes-devtools
parenteb16f0631ec656486ca4f003a9547190f497bed3 (diff)
downloadmeta-openembedded-ed33569f822a3a8d41f82f6980a046d17aca37d5.tar.gz
jq: Use Git to fetch the code
There is a bug (see https://github.com/jqlang/jq/issues/434), which results in an empty version being used if autoreconf is run on the jq sources when using a release tar ball. The incorrect assumption is that autoreconf is only used when fetching the code using Git. The empty version results in an incorrect libjq.pc file being created where the version is not set, which results in, e.g., `pkgconf --libs 'libjq > 1.6'` failing even if version 1.8.1 of jq is actually installed. Switch to fetching the code using Git to workaround the bug. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch44
-rw-r--r--meta-oe/recipes-devtools/jq/jq_1.8.1.bb14
2 files changed, 52 insertions, 6 deletions
diff --git a/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch
new file mode 100644
index 0000000000..12a64a75ed
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch
@@ -0,0 +1,44 @@
1From 27f417f4812e688a59fc5186b7768cec004cd6e5 Mon Sep 17 00:00:00 2001
2From: Peter Kjellerstedt <peter.kjellerstedt@gmail.com>
3Date: Wed, 8 Apr 2026 05:58:49 +0200
4Subject: [PATCH] Support building with --disable-maintainer-mode and source !=
5 build dir (#3518)
6
7If --disable-maintainer-mode is enabled, then the rules for generating
8parser.[ch] and lexer.[ch] did nothing. This worked fine if the source
9and build directories are the same as the pre-generated parser.c and
10lexer.c files would suffice. However, if the build directory is not the
11same as the source directory, then the rest of the Make rules expect
12parser.[ch] and lexer.[ch] to have been created in the build directory
13if their source files (parser.y and lexer.l) are newer than the target
14files, which can happen in case the source is fetched using Git.
15
16Avoid the problem by copying the files to the build directory if needed.
17
18Co-authored-by: Peter Kjellerstedt <pkj@axis.com>
19Upstream-Status: Backport [https://github.com/jqlang/jq/commit/27f417f4812e688a59fc5186b7768cec004cd6e5]
20---
21 Makefile.am | 9 +++++++--
22 1 file changed, 7 insertions(+), 2 deletions(-)
23
24diff --git a/Makefile.am b/Makefile.am
25index 96d6038..acb9443 100644
26--- a/Makefile.am
27+++ b/Makefile.am
28@@ -41,9 +41,14 @@ src/lexer.h: src/lexer.c
29 else
30 BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h
31 .y.c:
32- $(AM_V_YACC) echo "NOT building parser.c!"
33+ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@
34+ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h
35+ $(AM_V_YACC) touch $@ $*.h
36+
37 .l.c:
38- $(AM_V_LEX) echo "NOT building lexer.c!"
39+ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@
40+ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h
41+ $(AM_V_LEX) touch $@ $*.h
42 endif
43
44 # Tell YACC (Bison) autoconf macros that you want a header file created.
diff --git a/meta-oe/recipes-devtools/jq/jq_1.8.1.bb b/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
index b9383c76f7..6eaa2de6df 100644
--- a/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
+++ b/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
@@ -8,15 +8,17 @@ SECTION = "utils"
8LICENSE = "MIT & BSD-2-Clause" 8LICENSE = "MIT & BSD-2-Clause"
9LIC_FILES_CHKSUM = "file://COPYING;md5=cf7fcb0a1def4a7ad62c028f7d0dca47" 9LIC_FILES_CHKSUM = "file://COPYING;md5=cf7fcb0a1def4a7ad62c028f7d0dca47"
10 10
11GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/" 11SRCREV = "4467af7068b1bcd7f882defff6e7ea674c5357f4"
12SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ 12
13SRC_URI = " \
14 git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${PV} \
13 file://run-ptest \ 15 file://run-ptest \
14 " 16 file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \
15SRC_URI[sha256sum] = "2be64e7129cecb11d5906290eba10af694fb9e3e7f9fc208a311dc33ca837eb0" 17"
16 18
17inherit autotools github-releases ptest 19inherit autotools ptest
18 20
19UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)" 21UPSTREAM_CHECK_GITTAGREGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)"
20 22
21PACKAGECONFIG ?= "oniguruma" 23PACKAGECONFIG ?= "oniguruma"
22 24