1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/community/quickjs/APKBUILD
Jakub Jirutka e082ac3fa7 community/quickjs: move libquickjs*.a to -static subpackage
njs tries to link static the static library when it's available.
2025-05-14 09:18:09 +00:00

63 lines
1.6 KiB
Text

# Contributor: Chloe Kudryavtsev <code@toast.bunkerlabs.net>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=quickjs
_pkgver=2025-04-26
pkgver=0.${_pkgver//-}
pkgrel=0
pkgdesc="Small and embeddable Javascript engine"
url="https://bellard.org/quickjs/"
arch="all"
license="MIT"
depends_dev="$pkgname=$pkgver-r$pkgrel"
subpackages="
$pkgname-static
$pkgname-dev
$pkgname-doc
$pkgname-libs
"
source="https://bellard.org/quickjs/quickjs-$_pkgver.tar.xz
00-makefile.patch
01-sharedlib.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
# secfixes:
# 2021-03-27-r5:
# - CVE-2023-31922
build() {
for bin in qjs qjsc ; do
CONFIG_STATIC=y make PREFIX=/usr $bin
cp $bin $bin.static
done
make clean
make PREFIX=/usr VERSION=$pkgver
}
check() {
make test
}
package() {
make install DESTDIR="$pkgdir" PREFIX=/usr VERSION=$pkgver
for bin in qjs.static qjsc.static ; do
install -Dm755 $bin "$pkgdir"/usr/bin/$bin
done
for doc in doc/*.html; do
install -Dm644 $doc "$pkgdir"/usr/share/doc/quickjs/$doc
done
}
static() {
pkgdesc="$pkgdesc - static binaries"
amove usr/bin/*.static
amove usr/lib/quickjs/*.a
}
sha512sums="
7b9e4316c470f1163abed038ba2919e9367f026f8af8afb07ec07ac98409083c45373126764b526a78651a83e7896d6d05456e60dec46e451315bbeb336da23e quickjs-2025-04-26.tar.xz
c69217ba9cd38e2c4a8fe6a55ea552dd1c1ece8ac77514e824cc90ff36c616c76e98c43f23397e8939412ad8303c7e0bb813762565f97075eee70017fdd27c82 00-makefile.patch
0116e8562909e4867145b4b41a39c24600957ac57b048432ef068d18af007811f7eeab753d8902cd265d0327e64501c69160dfafee37ea840941e77514329514 01-sharedlib.patch
"