summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch40
-rw-r--r--meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch32
-rw-r--r--meta-oe/recipes-devtools/jq/jq_1.7.bb (renamed from meta-oe/recipes-devtools/jq/jq_git.bb)25
3 files changed, 14 insertions, 83 deletions
diff --git a/meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch b/meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch
deleted file mode 100644
index e4d6ebb45b..0000000000
--- a/meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch
+++ /dev/null
@@ -1,40 +0,0 @@
1From 40bbd419ad8d1bd9cbe8b17063c323f8a40ab327 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 6 Sep 2022 09:59:31 -0700
4Subject: [PATCH 1/2] configure: Pass _XOPEN_SOURCE when checking for strptime
5
6Include sys/time.h for gettimeofday since thats where its in glibc
7
8Upstream-Status: Submitted [https://github.com/stedolan/jq/pull/2480]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 configure.ac | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/configure.ac b/configure.ac
15index a2cd99e..95afe06 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -139,7 +139,10 @@ AC_FUNC_ALLOCA
19
20 AC_FIND_FUNC([isatty], [c], [#include <unistd.h>], [0])
21 AC_FIND_FUNC([_isatty], [c], [#include <io.h>], [0])
22+OLD_CFLAGS=$CFLAGS
23+CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
24 AC_FIND_FUNC([strptime], [c], [#include <time.h>], [0, 0, 0])
25+CFLAGS=$OLD_CFLAGS
26 AC_FIND_FUNC([strftime], [c], [#include <time.h>], [0, 0, 0, 0])
27 AC_FIND_FUNC([setenv], [c], [#include <stdlib.h>], [0, 0, 0])
28 AC_FIND_FUNC([timegm], [c], [#include <time.h>], [0])
29@@ -147,7 +150,7 @@ AC_FIND_FUNC([gmtime_r], [c], [#include <time.h>], [0, 0])
30 AC_FIND_FUNC([gmtime], [c], [#include <time.h>], [0])
31 AC_FIND_FUNC([localtime_r], [c], [#include <time.h>], [0, 0])
32 AC_FIND_FUNC([localtime], [c], [#include <time.h>], [0])
33-AC_FIND_FUNC([gettimeofday], [c], [#include <time.h>], [0, 0])
34+AC_FIND_FUNC([gettimeofday], [c], [#include <sys/time.h>], [0, 0])
35 AC_CHECK_MEMBER([struct tm.tm_gmtoff], [AC_DEFINE([HAVE_TM_TM_GMT_OFF],1,[Define to 1 if the system has the tm_gmt_off field in struct tm])],
36 [], [[#include <time.h>]])
37 AC_CHECK_MEMBER([struct tm.__tm_gmtoff], [AC_DEFINE([HAVE_TM___TM_GMT_OFF],1,[Define to 1 if the system has the __tm_gmt_off field in struct tm])],
38--
392.37.3
40
diff --git a/meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch b/meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch
deleted file mode 100644
index e849436578..0000000000
--- a/meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From cda1734bed3b048c01452c798877d05b8c2f4c15 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 6 Sep 2022 10:00:59 -0700
4Subject: [PATCH 2/2] builtin: Replace _BSD_SOURCE with _DEFAULT_SOURCE
5
6newer glibc has remove _BSD_SOURCE and wants it to be replaced with _DEFAULT_SOURCE
7
8Fixes
9/usr/include/features.h:194:3: warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-W#warnings]
10warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
11
12Uptream-Status: Submitted [https://github.com/stedolan/jq/pull/2480]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15Upstream-Status: Pending
16
17 src/builtin.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/src/builtin.c b/src/builtin.c
21index 1c6b08c..2a31496 100644
22--- a/src/builtin.c
23+++ b/src/builtin.c
24@@ -1,4 +1,4 @@
25-#define _BSD_SOURCE
26+#define _DEFAULT_SOURCE
27 #define _GNU_SOURCE
28 #ifndef __sun__
29 # define _XOPEN_SOURCE
30--
312.37.3
32
diff --git a/meta-oe/recipes-devtools/jq/jq_git.bb b/meta-oe/recipes-devtools/jq/jq_1.7.bb
index 4fa98aa44f..5c2e3aae8f 100644
--- a/meta-oe/recipes-devtools/jq/jq_git.bb
+++ b/meta-oe/recipes-devtools/jq/jq_1.7.bb
@@ -2,22 +2,21 @@ SUMMARY = "Lightweight and flexible command-line JSON processor"
2DESCRIPTION = "jq is like sed for JSON data, you can use it to slice and \ 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 \ 3 filter and map and transform structured data with the same \
4 ease that sed, awk, grep and friends let you play with text." 4 ease that sed, awk, grep and friends let you play with text."
5HOMEPAGE = "https://stedolan.github.io/jq/" 5HOMEPAGE = "https://jqlang.github.io/jq/"
6BUGTRACKER = "https://github.com/stedolan/jq/issues" 6BUGTRACKER = "https://github.com/jqlang/jq/issues"
7SECTION = "utils" 7SECTION = "utils"
8LICENSE = "MIT" 8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://COPYING;md5=2814b59e00e7918c864fa3b6bbe049b4" 9LIC_FILES_CHKSUM = "file://COPYING;md5=488f4e0b04c0456337fb70d1ac1758ba"
10 10
11PV = "1.6+git${SRCPV}" 11GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/"
12SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \ 12SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
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 \ 13 file://run-ptest \
16 " 14 "
17SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8" 15SRC_URI[sha256sum] = "402a0d6975d946e6f4e484d1a84320414a0ff8eb6cf49d2c11d144d4d344db62"
18S = "${WORKDIR}/git"
19 16
20inherit autotools-brokensep ptest 17inherit autotools github-releases ptest
18
19UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)"
21 20
22PACKAGECONFIG ?= "oniguruma" 21PACKAGECONFIG ?= "oniguruma"
23 22
@@ -27,8 +26,12 @@ PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig"
27# enable if you want ptest running under valgrind 26# enable if you want ptest running under valgrind
28PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" 27PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
29 28
29do_configure:append() {
30 sed -i -e "/^ac_cs_config=/ s:${WORKDIR}::g" ${B}/config.status
31}
32
30do_install_ptest() { 33do_install_ptest() {
31 cp -rf ${B}/tests ${D}${PTEST_PATH} 34 cp -rf ${S}/tests ${D}${PTEST_PATH}
32 cp -rf ${B}/.libs ${D}${PTEST_PATH} 35 cp -rf ${B}/.libs ${D}${PTEST_PATH}
33 # libjq.so.* is packaged in the main jq component, so remove it from ptest 36 # libjq.so.* is packaged in the main jq component, so remove it from ptest
34 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.* 37 rm -f ${D}${PTEST_PATH}/.libs/libjq.so.*