From d0e2d761ea4543188758a0cbfe8478f0658e3e64 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Tue, 7 Apr 2026 22:49:10 +0200 Subject: [PATCH] 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 Signed-off-by: Khem Raj --- ...-with-disable-maintainer-mode-and-so.patch | 43 +++++++++++++++++++ meta-oe/recipes-devtools/jq/jq_1.8.1.bb | 14 +++--- 2 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch 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..5986fd963c --- /dev/null +++ b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch @@ -0,0 +1,43 @@ +From 91ea97fb0993d755ac971497da59985950b23843 Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt +Date: Tue, 7 Apr 2026 21:59:27 +0200 +Subject: [PATCH] Support building with --disable-maintainer-mode and source != + build dir + +If --disable-maintainer-mode is enabled, then the rules for generating +parser.[ch] and lexer.[ch] did nothing. This worked fine if the source +and build directories are the same as the pre-generated parser.c and +lexer.c files would suffice. However, if the build directory is not the +same as the source directory, then the rest of the Make rules expect +parser.[ch] and lexer.[ch] to have been created in the build directory +if their source files (parser.y and lexer.l) are newer than the target +files, which can happen in case the source is fetched using Git. + +Avoid the problem by copying the files to the build directory if needed. + +Upstream-Status: Submitted [https://github.com/jqlang/jq/pull/3518/changes/282619d60d42c193ddce1095b34469e14dbe87b6] +--- + Makefile.am | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 1df4143..511012f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -41,9 +41,14 @@ src/lexer.h: src/lexer.c + else + BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h + .y.c: +- $(AM_V_YACC) echo "NOT building parser.c!" ++ $(AM_V_YACC) [ "$(