2021-04-16 18:30:42 +02:00
|
|
|
# Template file for 'quickjs'
|
|
|
|
pkgname=quickjs
|
|
|
|
version=2021.03.27
|
2021-04-17 06:07:59 +02:00
|
|
|
revision=2
|
2021-04-16 18:30:42 +02:00
|
|
|
wrksrc="${pkgname}-${version//./-}"
|
|
|
|
build_style=gnu-makefile
|
|
|
|
make_use_env=true
|
|
|
|
make_build_args="CONFIG_LTO= prefix=/usr"
|
|
|
|
make_install_args="${make_build_args}"
|
|
|
|
short_desc="Small and embeddable Javascript engine"
|
|
|
|
maintainer="Leah Neukirchen <leah@vuxu.org>"
|
|
|
|
license="MIT"
|
|
|
|
homepage="https://bellard.org/quickjs/"
|
|
|
|
distfiles="https://bellard.org/quickjs/quickjs-${version//./-}.tar.xz"
|
|
|
|
checksum=a45bface4c3379538dea8533878d694e289330488ea7028b105f72572fe7fe1a
|
|
|
|
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
make_build_args+=" CROSS_PREFIX=${XBPS_CROSS_TRIPLET}-"
|
|
|
|
make_install_args="${make_build_args}"
|
|
|
|
fi
|
|
|
|
|
2021-04-16 21:38:39 +02:00
|
|
|
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
|
|
|
|
makedepends+=" libatomic-devel"
|
2021-04-17 07:20:34 +02:00
|
|
|
CFLAGS+=" -DLINK_ATOMIC"
|
2021-04-16 21:38:39 +02:00
|
|
|
export EXTRA_LIBS="-latomic"
|
|
|
|
fi
|
|
|
|
|
2021-04-16 18:30:42 +02:00
|
|
|
pre_configure() {
|
|
|
|
vsed -i -e '/HOST_CC/s/CFLAGS_OPT/BUILD_CFLAGS/' Makefile
|
|
|
|
cat >>Makefile <<EOF
|
|
|
|
CFLAGS += ${CFLAGS}
|
|
|
|
LDFLAGS += ${LDFLAGS}
|
|
|
|
BUILD_CFLAGS += \$(DEFINES) ${BUILD_CFLAGS}
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
mv ${DESTDIR}/usr/lib/quickjs/* ${DESTDIR}/usr/lib
|
|
|
|
vlicense LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
quickjs-devel_package() {
|
|
|
|
short_desc+=" - development files"
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/*.a
|
|
|
|
}
|
|
|
|
}
|