aboutsummaryrefslogtreecommitdiffstats
path: root/community/gjs/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/gjs/APKBUILD')
-rw-r--r--community/gjs/APKBUILD82
1 files changed, 63 insertions, 19 deletions
diff --git a/community/gjs/APKBUILD b/community/gjs/APKBUILD
index 87996060e02..855099cbace 100644
--- a/community/gjs/APKBUILD
+++ b/community/gjs/APKBUILD
@@ -1,38 +1,82 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
-# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gjs
-pkgver=1.64.3
-pkgrel=0
+# even number after first dot are the stable releases
+pkgver=1.80.2
+pkgrel=1
pkgdesc="GNOME javascript library"
url="https://wiki.gnome.org/Projects/Gjs"
-arch="all !s390x !mips !mips64"
+# armhf and s390x blocked by mozjs102
+arch="all !armhf !s390x"
license="MIT AND LGPL-2.0-or-later"
-makedepends="dbus gobject-introspection-dev mozjs68-dev mozjs68
- gtk+3.0-dev cairo-dev meson libffi>=3.3"
+makedepends="
+ cairo-dev
+ clang
+ dbus
+ gobject-introspection-dev
+ gtk+3.0-dev
+ libffi>=3.3
+ meson
+ mozjs115-dev
+ "
checkdepends="xvfb-run"
-subpackages="$pkgname-dev"
-source="https://download.gnome.org/sources/gjs/${pkgver%.*}/gjs-$pkgver.tar.xz"
+subpackages="$pkgname-dev $pkgname-dbg"
+source="https://download.gnome.org/sources/gjs/${pkgver%.*}/gjs-$pkgver.tar.xz
+ encoding.patch
+ "
+
+case "$CARCH" in
+riscv64)
+ # lld broken on riscv64
+ ;;
+*)
+ makedepends="$makedepends lld"
+ ;;
+esac
build() {
- meson \
- --buildtype=plain \
- --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --localstatedir=/var \
- -Dprofile=disabled \
+ case "$CARCH" in
+ aarch64|arm*|riscv64)
+ # not supported by clang here
+ export CFLAGS="${CFLAGS/-fstack-clash-protection}"
+ export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection}"
+ ;;
+ esac
+
+ case "$CARCH" in
+ riscv64)
+ local lto=false
+ ;;
+ *)
+ local lto=true
+ export LDFLAGS="$LDFLAGS -fuse-ld=lld"
+ ;;
+ esac
+
+ CC=clang \
+ CXX=clang++ \
+ CFLAGS="$CFLAGS -O2" \
+ CXXFLAGS="$CXXFLAGS -O2" \
+ abuild-meson \
+ --buildtype=release \
+ -Db_lto=$lto \
+ -Db_ndebug=true \
+ -Dprofiler=disabled \
-Dinstalled_tests=false \
output
- ninja -C output
+ meson compile -C output
}
check() {
# Tests can take a while on armv7
- xvfb-run meson test -C output -t 10
+ xvfb-run -a meson test --print-errorlogs --no-rebuild -C output -t 10
}
package() {
- DESTDIR="$pkgdir" ninja -C output install
+ DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
-sha512sums="9d92e52a7fef07853f3beb181798f89deb60b97b928d916cd827c99a6ab8f83abf7c352a1aa46be476a50e2efadfaf09befa54ccab0d51b0ac7127f2fe794801 gjs-1.64.3.tar.xz"
+sha512sums="
+cc9a9073f741ee60eff2d2ce808cca7f40e97798f9ffa9197ebc3780a8a5df6e174ba76293bf7547fc8fa7e82be6a828a633a5aa8ba27d551dec72d635b6c5bd gjs-1.80.2.tar.xz
+3524a4c6772f1be1d6e2320650d7fb9f81cc2ceb7c79c2521c0ee7a4202d5681a88586ab9439050611ee1719f9a977bb65d0eaaa536148e7e4590baf1f50eae8 encoding.patch
+"