diff --git a/app-misc/jq-1.8.1.PKGBUILD b/app-misc/jq-1.8.1.PKGBUILD new file mode 100644 index 0000000..63ee070 --- /dev/null +++ b/app-misc/jq-1.8.1.PKGBUILD @@ -0,0 +1,56 @@ +pkgname=jq +pkgver=1.8.1 +pkgdesc='Command-line JSON processor' +arch=('x86_64') +homepage='https://jqlang.github.io/jq/' +license=('MIT') +depends=('glibc' 'oniguruma') +makedepends=('autoconf' 'automake' 'bison' 'flex' 'python') +_patches=("jq-1.6-r3-never-bundle-oniguruma.patch") +_patch_sums=("08413ae86ca528083375cf89bdfd84c1") +sources=("${pkgname}-${pkgver}.tar.gz" + ${_patches[@]} +) +urls=("https://github.com/jqlang/jq/release/download/${pkgname}-${pkgver/_/}.tar.gz" + ${_patches[@]} +) +md5sums=("0df1524fe928528b3c533c69d4ddfa23" + ${_patch_sums[@]} +) + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + + sed -e '/^dist_doc_DATA/d; s:-Wextra ::' -i Makefile.am + printf "#!/bin/sh\\nprintf '%s'\\n\n" "${pkgver/_/}" > scripts/version + + sed -e '/vendor\/oniguruma/d' -i Makefile.am + rm -rf "${srcdir}"/vendor/oniguruma + + for _patch in ${_patches[@]}; do + patch -p1 -i ${filedir}/${_patch} + done + + sed -i "s/\[jq_version\]/[${pkgver/_/}]/" configure.ac + + autoreconf -fi +} + +src_build() { + local conf_args=( + --prefix=/usr + --disable-docs + --enable-valgrind=no + --disable-maintainer-mode + --disable-static + --with-oniguruma + ) + ./configure "${conf_args[@]}" +} + +src_install() { + make DESTDIR="${pkgdir}" prefix=/usr install + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} + +# vim:ft=sh syn=sh et sw=2: diff --git a/app-misc/jq-1.8.1/jq-1.6-r3-never-bundle-oniguruma.patch b/app-misc/jq-1.8.1/jq-1.6-r3-never-bundle-oniguruma.patch new file mode 100644 index 0000000..75ab111 --- /dev/null +++ b/app-misc/jq-1.8.1/jq-1.6-r3-never-bundle-oniguruma.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.am b/Makefile.am +index 6344b4e..86d968e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -47,7 +47,7 @@ AM_YFLAGS = --warnings=all -d + + lib_LTLIBRARIES = libjq.la + libjq_la_SOURCES = ${LIBJQ_SRC} +-libjq_la_LIBADD = -lm ++libjq_la_LIBADD = -lm $(onig_LIBS) + libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:0 + + if WIN32 +diff --git a/configure.ac b/configure.ac +index 280694c..d96026e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -249,6 +249,9 @@ AS_IF([test "x$with_oniguruma" != xno], [ + onig_CFLAGS="-I${with_oniguruma}/include" + onig_LDFLAGS="-L${with_oniguruma}/lib" + ]) ++ ], [ ++ # with_oniguruma == yes ++ PKG_CHECK_MODULES([onig], [oniguruma]) + ]) + AS_IF([test "x$build_oniguruma" = xno], [ + # check for ONIGURUMA library, either in /usr or where requested