From e47057459aab40cd71adb88c6424644777a6df91 Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Sat, 18 Sep 2021 22:41:02 +0200 Subject: [PATCH] gjs: update to 1.70.0. --- .../gjs/patches/ignore-encoding-test.patch | 11 ++++ srcpkgs/gjs/patches/libatomic.patch | 62 +++++++++++++++++++ srcpkgs/gjs/template | 10 ++- 3 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/gjs/patches/ignore-encoding-test.patch create mode 100644 srcpkgs/gjs/patches/libatomic.patch diff --git a/srcpkgs/gjs/patches/ignore-encoding-test.patch b/srcpkgs/gjs/patches/ignore-encoding-test.patch new file mode 100644 index 0000000000..e0f9390a20 --- /dev/null +++ b/srcpkgs/gjs/patches/ignore-encoding-test.patch @@ -0,0 +1,11 @@ +broken on musl +--- a/installed-tests/js/meson.build +--- b/installed-tests/js/meson.build +@@ -243,7 +243,6 @@ + modules_tests = [ + 'Console', + 'ESModules', +- 'Encoding', + 'GLibLogWriter', + ] + if build_cairo diff --git a/srcpkgs/gjs/patches/libatomic.patch b/srcpkgs/gjs/patches/libatomic.patch new file mode 100644 index 0000000000..4c439d6f80 --- /dev/null +++ b/srcpkgs/gjs/patches/libatomic.patch @@ -0,0 +1,62 @@ +From d68601062729e7cc35dca2ffce84c6d93703a7bf Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Fri, 8 Oct 2021 11:42:49 +0100 +Subject: [PATCH] build: Link with libatomic if necessary + +The implementation of atomic operations in gcc uses atomic opcodes if +supported, but falls back to a library implementation if necessary. +Link that library on architectures where 64-bit atomic operations need it, +such as Debian armel (ARMv5 EABI softfloat), mipsel and powerpc. + +Resolves: https://gitlab.gnome.org/GNOME/gjs/-/issues/442 +Signed-off-by: Simon McVittie +--- + meson.build | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index e28c4bf9..ed857d7f 100644 +--- a/meson.build ++++ b/meson.build +@@ -109,6 +109,8 @@ endif + + ### Check for required libraries ############################################### + ++null_dep = dependency('', required : false) ++ + # Note: Notify GNOME release team when adding or updating dependencies + glib_required_version = '>= 2.66.0' + glib = dependency('glib-2.0', version: glib_required_version, +@@ -180,6 +182,20 @@ features.''') + endif + endif + ++if cxx.links(''' ++#include ++ ++int main(void) ++{ ++ std::atomic_int64_t value = ATOMIC_VAR_INIT(0); ++ return value.load(); ++} ++''', name: '64-bit atomics built-in') ++ libatomic = null_dep ++else ++ libatomic = cc.find_library('atomic', required: false) ++endif ++ + build_profiler = sysprof_capture.found() and not get_option('profiler').disabled() + profiler_deps = [sysprof_capture] + if build_profiler and not cxx.has_function('timer_settime') +@@ -458,7 +474,7 @@ module_resource_srcs = gnome.compile_resources('js-resources', + c_name: 'js_resources') + + libgjs_dependencies = [glib, gobject, gthread, gio, gi, ffi, spidermonkey, +- readline] ++ readline, libatomic] + pkg_dependencies = [glib, gobject, gthread, gio, gi, ffi, spidermonkey] + libraries_private = [] + +-- +GitLab + diff --git a/srcpkgs/gjs/template b/srcpkgs/gjs/template index 4d73ae96b5..4609094a21 100644 --- a/srcpkgs/gjs/template +++ b/srcpkgs/gjs/template @@ -1,6 +1,6 @@ # Template file for 'gjs' pkgname=gjs -version=1.68.1 +version=1.70.0 revision=1 build_style=meson build_helper="gir qemu" @@ -12,9 +12,13 @@ short_desc="Mozilla-based javascript bindings for the GNOME platform" maintainer="Enno Boland " license="MIT, LGPL-2.0-or-later" homepage="https://wiki.gnome.org/action/show/Projects/Gjs" -changelog="https://gitlab.gnome.org/GNOME/gjs/blob/gnome-3-30/NEWS" +changelog="https://gitlab.gnome.org/GNOME/gjs/blob/gnome-41/NEWS" distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz" -checksum=2ffa3ec2041104fcf9ab5dcc8f7cd9caa062278590318ffef9541956af5b4c70 +checksum=4b0629341a318a02374e113ab97f9a9f3325423269fc1e0b043a5ffb01861c5f + +if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then + makedepends+=" libatomic-devel" +fi post_install() { vlicense COPYING