added my Recipes
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
From 40bbd419ad8d1bd9cbe8b17063c323f8a40ab327 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 6 Sep 2022 09:59:31 -0700
|
||||
Subject: [PATCH 1/2] configure: Pass _XOPEN_SOURCE when checking for strptime
|
||||
|
||||
Include sys/time.h for gettimeofday since thats where its in glibc
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/stedolan/jq/pull/2480]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a2cd99e..95afe06 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -139,7 +139,10 @@ AC_FUNC_ALLOCA
|
||||
|
||||
AC_FIND_FUNC([isatty], [c], [#include <unistd.h>], [0])
|
||||
AC_FIND_FUNC([_isatty], [c], [#include <io.h>], [0])
|
||||
+OLD_CFLAGS=$CFLAGS
|
||||
+CFLAGS="$CFLAGS -D_XOPEN_SOURCE"
|
||||
AC_FIND_FUNC([strptime], [c], [#include <time.h>], [0, 0, 0])
|
||||
+CFLAGS=$OLD_CFLAGS
|
||||
AC_FIND_FUNC([strftime], [c], [#include <time.h>], [0, 0, 0, 0])
|
||||
AC_FIND_FUNC([setenv], [c], [#include <stdlib.h>], [0, 0, 0])
|
||||
AC_FIND_FUNC([timegm], [c], [#include <time.h>], [0])
|
||||
@@ -147,7 +150,7 @@ AC_FIND_FUNC([gmtime_r], [c], [#include <time.h>], [0, 0])
|
||||
AC_FIND_FUNC([gmtime], [c], [#include <time.h>], [0])
|
||||
AC_FIND_FUNC([localtime_r], [c], [#include <time.h>], [0, 0])
|
||||
AC_FIND_FUNC([localtime], [c], [#include <time.h>], [0])
|
||||
-AC_FIND_FUNC([gettimeofday], [c], [#include <time.h>], [0, 0])
|
||||
+AC_FIND_FUNC([gettimeofday], [c], [#include <sys/time.h>], [0, 0])
|
||||
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])],
|
||||
[], [[#include <time.h>]])
|
||||
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])],
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From cda1734bed3b048c01452c798877d05b8c2f4c15 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 6 Sep 2022 10:00:59 -0700
|
||||
Subject: [PATCH 2/2] builtin: Replace _BSD_SOURCE with _DEFAULT_SOURCE
|
||||
|
||||
newer glibc has remove _BSD_SOURCE and wants it to be replaced with _DEFAULT_SOURCE
|
||||
|
||||
Fixes
|
||||
/usr/include/features.h:194:3: warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-W#warnings]
|
||||
warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
|
||||
|
||||
Uptream-Status: Submitted [https://github.com/stedolan/jq/pull/2480]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/builtin.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/builtin.c b/src/builtin.c
|
||||
index 1c6b08c..2a31496 100644
|
||||
--- a/src/builtin.c
|
||||
+++ b/src/builtin.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-#define _BSD_SOURCE
|
||||
+#define _DEFAULT_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#ifndef __sun__
|
||||
# define _XOPEN_SOURCE
|
||||
--
|
||||
2.37.3
|
||||
|
||||
37
meta-openembedded/meta-oe/recipes-devtools/jq/jq/run-ptest
Executable file
37
meta-openembedded/meta-oe/recipes-devtools/jq/jq/run-ptest
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
JQ_LIB=@libdir@/jq
|
||||
LOG="${JQ_LIB}/ptest/jq_ptest_$(date +%Y%m%d-%H%M%S).log"
|
||||
|
||||
# clean up the log file to avoid a file has the same name and has existing content
|
||||
echo "" > ${LOG}
|
||||
|
||||
# The purpose of ptest is doing intergration test, so disable valgrind by default
|
||||
# change PACKAGECOFIG to enable valgrind.
|
||||
#export NO_VALGRIND=1
|
||||
# The --enable-valgrind configure option for jq only can be used within Makefiles,
|
||||
# and it cannot be utilized here since it also checks compile, which cannot be avoid
|
||||
# Requested enhancement to jq: https://github.com/stedolan/jq/issues/2493
|
||||
|
||||
for test in optionaltest mantest jqtest onigtest shtest utf8test base64test; do
|
||||
./tests/${test} >> ${LOG} 2>> ${LOG}
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "PASS: ${test}"
|
||||
echo "PASS: ${test}" >> ${LOG}
|
||||
else
|
||||
echo "FAIL: ${test}"
|
||||
echo "FAIL: ${test}" >> ${LOG}
|
||||
fi
|
||||
done
|
||||
|
||||
passed=`grep PASS: ${LOG}|wc -l`
|
||||
failed=`grep FAIL: ${LOG}|wc -l`
|
||||
skipped=`grep SKIP: ${LOG}|wc -l`
|
||||
all=$((passed + failed + skipped))
|
||||
|
||||
( echo "=== Test Summary ==="
|
||||
echo "TOTAL: ${all}"
|
||||
echo "PASSED: ${passed}"
|
||||
echo "FAILED: ${failed}"
|
||||
echo "SKIPPED: ${skipped}"
|
||||
) | tee -a /${LOG}
|
||||
43
meta-openembedded/meta-oe/recipes-devtools/jq/jq_git.bb
Normal file
43
meta-openembedded/meta-oe/recipes-devtools/jq/jq_git.bb
Normal file
@@ -0,0 +1,43 @@
|
||||
SUMMARY = "Lightweight and flexible command-line JSON processor"
|
||||
DESCRIPTION = "jq is like sed for JSON data, you can use it to slice and \
|
||||
filter and map and transform structured data with the same \
|
||||
ease that sed, awk, grep and friends let you play with text."
|
||||
HOMEPAGE = "https://stedolan.github.io/jq/"
|
||||
BUGTRACKER = "https://github.com/stedolan/jq/issues"
|
||||
SECTION = "utils"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=2814b59e00e7918c864fa3b6bbe049b4"
|
||||
|
||||
PV = "1.6+git${SRCPV}"
|
||||
SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \
|
||||
file://0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch \
|
||||
file://0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools-brokensep ptest
|
||||
|
||||
PACKAGECONFIG ?= "oniguruma"
|
||||
|
||||
PACKAGECONFIG[docs] = "--enable-docs,--disable-docs,ruby-native"
|
||||
PACKAGECONFIG[maintainer-mode] = "--enable-maintainer-mode,--disable-maintainer-mode,flex-native bison-native"
|
||||
PACKAGECONFIG[oniguruma] = "--with-oniguruma,--without-oniguruma,onig"
|
||||
# enable if you want ptest running under valgrind
|
||||
PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
|
||||
|
||||
do_install_ptest() {
|
||||
cp -rf ${B}/tests ${D}${PTEST_PATH}
|
||||
cp -rf ${B}/.libs ${D}${PTEST_PATH}
|
||||
# libjq.so.* is packaged in the main jq component, so remove it from ptest
|
||||
rm -f ${D}${PTEST_PATH}/.libs/libjq.so.*
|
||||
ln -sf ${bindir}/jq ${D}${PTEST_PATH}
|
||||
if [ "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'true', 'false', d)}" = "false" ]; then
|
||||
sed -i 's:#export NO_VALGRIND=1:export NO_VALGRIND=1:g' ${D}${PTEST_PATH}/run-ptest
|
||||
fi
|
||||
# handle multilib
|
||||
sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Reference in New Issue
Block a user