1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Ionut Biru <ibiru@archlinux.org>
8 pkgdesc="Javascript Bindings for GNOME"
9 url="https://wiki.gnome.org/Projects/Gjs"
12 depends=(cairo gobject-introspection-runtime js91 dconf readline
14 makedepends=(gobject-introspection git meson dbus)
15 checkdepends=(xorg-server-xvfb gtk3 gtk4)
18 _commit=56d74f6fd6398d933696eaf96c1f3a3f2a52cbf9 # tags/1.72.2^0
19 source=("git+https://gitlab.gnome.org/GNOME/gjs.git#commit=$_commit")
24 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
30 # Work around https://github.com/mesonbuild/meson/issues/10577
31 sed -e "/protocol/s/'tap'/'exitcode'/" \
32 -i {test,installed-tests{,/js}}/meson.build
36 CFLAGS="${CFLAGS/-O2/-O3} -fno-semantic-interposition"
37 CXXFLAGS="${CXXFLAGS/-O2/-O3} -fno-semantic-interposition"
38 LDFLAGS+=" -Wl,-Bsymbolic-functions"
40 arch-meson gjs build -D installed_tests=false
41 meson compile -C build
45 xvfb-run -s '-nolisten local' \
46 meson test -C build --print-errorlogs
50 depends+=(libreadline.so)
51 meson install -C build --destdir "$pkgdir"