jq: New Package (#5526)

* jq: New Package

Port jq (and dependency oniguruma) from MINGW

* cleanups

fake cygwin for tests to avoid weird msys logic

---------

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
This commit is contained in:
Ben 2025-07-28 21:51:28 +02:00 committed by GitHub
parent 60b4ad0da6
commit 1fe85ede3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 83 additions and 0 deletions

48
jq/PKGBUILD Normal file
View File

@ -0,0 +1,48 @@
_realname=jq
pkgname=${_realname}
pkgver=1.8.1
pkgrel=1
pkgdesc="Command-line JSON processor"
arch=('x86_64')
url='https://jqlang.github.io/jq/'
msys2_repository_url="https://github.com/jqlang/jq"
msys2_references=(
"cpe: cpe:/a:jq_project:jq"
)
license=('spdx:MIT')
depends=('gcc-libs' 'oniguruma')
makedepends=("autotools" "gcc")
source=(
"https://github.com/jqlang/${_realname}/releases/download/${_realname}-${pkgver}/${_realname}-${pkgver}.tar.gz"
)
sha512sums=('b09d48dbeaac7b552397b75692ed7833afa72186de80d977fb1b887a14ac66c02f677acdd79f9a2736db1fd738b7ce57a39725e34846bfa21ed3728cd7adc187')
prepare() {
cd "${pkgname}-${pkgver}"
# avoid it asking git for the version
echo "echo ${pkgver}" > scripts/version
autoreconf -fiv
}
build() {
cd "${pkgname}-${pkgver}"
./configure \
--prefix=/usr \
--disable-docs \
ac_cv_lib_m_scalb=no \
ac_cv_lib_m_significand=no
make
}
check() {
cd "${pkgname}-${pkgver}"
MSYSTEM=CYGWIN make check
}
package() {
cd "${pkgname}-${pkgver}"
make install DESTDIR="${pkgdir}"
}

35
oniguruma/PKGBUILD Normal file
View File

@ -0,0 +1,35 @@
_realname=onig
_fullname=oniguruma
pkgname=${_fullname}
pkgver=6.9.10
pkgrel=1
pkgdesc="A regular expressions library"
arch=('x86_64')
url="https://github.com/kkos/oniguruma"
license=('BSD')
makedepends=("autotools" "gcc")
source=("https://github.com/kkos/${_fullname}/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('2a5cfc5ae259e4e97f86b68dfffc152cdaffe94e2060b770cb827238d769fc05')
prepare() {
cd "${srcdir}/${_realname}-${pkgver%.1}"
autoreconf -fiv
}
build() {
cd "${srcdir}/${_realname}-${pkgver%.1}"
./configure \
--prefix=/usr \
--enable-posix-api
make
}
check() {
cd "${srcdir}/${_realname}-${pkgver%.1}"
make check || true
}
package() {
cd "${srcdir}/${_realname}-${pkgver%.1}"
make install DESTDIR="${pkgdir}"
}