summaryrefslogtreecommitdiffstats
path: root/system/jq
diff options
context:
space:
mode:
Diffstat (limited to 'system/jq')
-rw-r--r--system/jq/jq.SlackBuild31
-rw-r--r--system/jq/jq.info14
-rw-r--r--system/jq/run_tests_in_C_locale.patch15
-rw-r--r--system/jq/slack-desc2
4 files changed, 43 insertions, 19 deletions
diff --git a/system/jq/jq.SlackBuild b/system/jq/jq.SlackBuild
index e832ccaa0e..174989f237 100644
--- a/system/jq/jq.SlackBuild
+++ b/system/jq/jq.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for jq
# Copyright 2015, 2018 Gary Herreman <gary@garyrh.com>
+# Copyright 2024 Isaac Yu <isaacyu@protonmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=jq
-VERSION=${VERSION:-1.6}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.7.1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +39,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -69,6 +77,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Fix build test failures if LANG is not C or en_US.UTF-8
+patch -p1 < $CWD/run_tests_in_C_locale.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -87,16 +98,14 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-# Put docs into proper directory.
-mv $PKG/usr/share/doc $PKG/usr
-mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
-rmdir $PKG/usr/share
-
-cp -a ChangeLog KEYS NEWS docs/ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS ChangeLog COPYING NEWS.md README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Address sbopkglint gripes
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.{la,a}
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/system/jq/jq.info b/system/jq/jq.info
index 9ccad14300..dec92480e9 100644
--- a/system/jq/jq.info
+++ b/system/jq/jq.info
@@ -1,10 +1,10 @@
PRGNAM="jq"
-VERSION="1.6"
-HOMEPAGE="https://stedolan.github.io/jq/"
-DOWNLOAD="https://github.com/stedolan/jq/releases/download/jq-1.6/jq-1.6.tar.gz"
-MD5SUM="e68fbd6a992e36f1ac48c99bbf825d6b"
+VERSION="1.7.1"
+HOMEPAGE="https://jqlang.github.io/jq/"
+DOWNLOAD="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-1.7.1.tar.gz"
+MD5SUM="974a340105ecb43add8c55601525f9fc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="oniguruma"
-MAINTAINER="Gary Herreman"
-EMAIL="gary@garyrh.com"
+REQUIRES=""
+MAINTAINER="Isaac Yu"
+EMAIL="isaacyu@protonmail.com"
diff --git a/system/jq/run_tests_in_C_locale.patch b/system/jq/run_tests_in_C_locale.patch
new file mode 100644
index 0000000000..5d1d36b0b1
--- /dev/null
+++ b/system/jq/run_tests_in_C_locale.patch
@@ -0,0 +1,15 @@
+The following patch is taken from this pull request:
+https://github.com/jqlang/jq/pull/3039
+--- a/tests/setup
++++ b/tests/setup
+@@ -12,6 +12,10 @@
+ JQBASEDIR=$JQTESTDIR/..
+ JQ=${JQ:-$JQBASEDIR/jq}
+
++# Some tests have locale-dependent output; use C locale. Fixes #3038
++LC_ALL=C
++export LC_ALL
++
+ if [ -z "${NO_VALGRIND-}" ] && which valgrind > /dev/null; then
+ VALGRIND="valgrind --error-exitcode=1 --leak-check=full \
+ --suppressions=$JQTESTDIR/onig.supp \
diff --git a/system/jq/slack-desc b/system/jq/slack-desc
index b5de0b89fc..0919f74c3f 100644
--- a/system/jq/slack-desc
+++ b/system/jq/slack-desc
@@ -14,6 +14,6 @@ jq: jq is like sed for JSON data - you can use it to slice and filter
jq: and map and transform structured data with the same ease that
jq: sed, awk, grep and friends let you play with text.
jq:
-jq: Homepage: https://stedolan.github.io/jq/
+jq: Homepage: https://jqlang.github.io/jq/
jq:
jq: