summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-gnome/recipes-gnome/gjs/gjs/0001-Disable-tests-on-host.patch33
-rw-r--r--meta-gnome/recipes-gnome/gjs/gjs/0001-Support-cross-builds-a-bit-better.patch50
-rw-r--r--meta-gnome/recipes-gnome/gjs/gjs/0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch77
-rw-r--r--meta-gnome/recipes-gnome/gjs/gjs/0002-meson.build-Do-not-add-dir-installed-tests-when-inst.patch34
-rw-r--r--meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb42
-rw-r--r--meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb38
6 files changed, 122 insertions, 152 deletions
diff --git a/meta-gnome/recipes-gnome/gjs/gjs/0001-Disable-tests-on-host.patch b/meta-gnome/recipes-gnome/gjs/gjs/0001-Disable-tests-on-host.patch
deleted file mode 100644
index 0953214fbf..0000000000
--- a/meta-gnome/recipes-gnome/gjs/gjs/0001-Disable-tests-on-host.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 95379de2132786f855e8caec1fd5869225774d02 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sat, 18 May 2019 01:14:07 +0200
4Subject: [PATCH] Disable tests on host
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Inappropriate [OE-specific]
10
11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
12---
13 configure.ac | 4 +---
14 1 file changed, 1 insertion(+), 3 deletions(-)
15
16diff --git a/configure.ac b/configure.ac
17index fa4e136..056e96e 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -335,9 +335,7 @@ AS_IF([test "x$with_dbus_tests" != "xno"], [
21 ])
22 AM_CONDITIONAL([DBUS_TESTS], [test "x$with_dbus_tests" != "xno"])
23
24-AC_MSG_CHECKING([for a suitable UTF-8 locale to run the tests in])
25-TESTS_LOCALE=$($srcdir/build/choose-tests-locale.sh)
26-AC_MSG_RESULT([$TESTS_LOCALE])
27+TESTS_LOCALE=C
28 AC_SUBST([TESTS_LOCALE])
29
30 AC_SUBST([gjsjsdir], [\${datadir}/gjs-1.0])
31--
322.20.1
33
diff --git a/meta-gnome/recipes-gnome/gjs/gjs/0001-Support-cross-builds-a-bit-better.patch b/meta-gnome/recipes-gnome/gjs/gjs/0001-Support-cross-builds-a-bit-better.patch
new file mode 100644
index 0000000000..55af681af0
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gjs/gjs/0001-Support-cross-builds-a-bit-better.patch
@@ -0,0 +1,50 @@
1From 550e98013b0e003c1a6771d8e811375913adf16b Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Wed, 27 Oct 2021 20:18:47 +0200
4Subject: [PATCH] Support cross builds a bit better
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9* Do not build/run mozjs-linked program
10* Do not try to run test applications
11
12Upstream-Status: Submitted[https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690]
13
14Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
15---
16 meson.build | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19diff --git a/meson.build b/meson.build
20index dfcc2c3..192b1b5 100644
21--- a/meson.build
22+++ b/meson.build
23@@ -234,6 +234,7 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with
24 --disable-debug.''')
25 endif
26
27+if not meson.is_cross_build()
28 # Check if a minimal SpiderMonkey program compiles, links, and runs. If not,
29 # it's most likely the case that SpiderMonkey was configured incorrectly, for
30 # example by building mozglue as a shared library.
31@@ -254,6 +255,7 @@ could not be compiled, linked, or run. Most likely you should build it with a
32 different configuration. Check the recommended configuration:
33 https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr78/docs/Building%20SpiderMonkey.md''')
34 endif
35+endif # not meson.is_cross_build()
36
37 have_printf_alternative_int = cc.compiles('''
38 #include <stdio.h>
39@@ -662,7 +664,7 @@ endif
40
41 # Note: The test program in test/ needs to be ported
42 # to Windows before we can build it on Windows.
43-if host_machine.system() != 'windows'
44+if host_machine.system() != 'windows' and not meson.is_cross_build()
45 subdir('test')
46 endif
47
48--
492.31.1
50
diff --git a/meta-gnome/recipes-gnome/gjs/gjs/0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch b/meta-gnome/recipes-gnome/gjs/gjs/0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch
deleted file mode 100644
index 6343a24a2d..0000000000
--- a/meta-gnome/recipes-gnome/gjs/gjs/0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch
+++ /dev/null
@@ -1,77 +0,0 @@
1From dae0055be61937fe70252f3f4ee09b355aba2b8f Mon Sep 17 00:00:00 2001
2From: Philip Chimento <philip.chimento@gmail.com>
3Date: Sun, 14 Feb 2021 12:20:09 -0800
4Subject: [PATCH] maint: Avoid g_once_init_enter error in GCC 11
5
6On platforms where g_once_init_enter() is defined to use C11 atomic
7builtins, passing a pointer to a volatile value is an error in GCC 11 and
8later, in C++.
9
10More info about the GCC change:
11https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95378
12https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548283.html
13
14However, it's my understanding that in modern C++ there is no longer a
15need to guard the initialization of these variables. Since C++11, static
16local variables in a function are guaranteed to be initialized only once,
17the first time control passes through that function. So we can just remove
18the g_once_init_enter guard.
19
20More info:
21https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables
22
23Stack Overflow answers with quotations from the C++ standard:
24https://stackoverflow.com/a/58804/172999
25https://stackoverflow.com/a/8102145/172999
26
27Closes: #376
28---
29 gjs/error-types.cpp | 32 +++++++++++++-------------------
30 1 file changed, 13 insertions(+), 19 deletions(-)
31
32Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gjs/-/commit/f02eaf3a9d3465915eb849428c2d9615e2184a4c]
33diff --git a/gjs/error-types.cpp b/gjs/error-types.cpp
34index 86cb878..5eba61b 100644
35--- a/gjs/error-types.cpp
36+++ b/gjs/error-types.cpp
37@@ -31,24 +31,18 @@ G_DEFINE_QUARK(gjs-js-error-quark, gjs_js_error)
38 // clang-format on
39
40 GType gjs_js_error_get_type(void) {
41- static volatile GType g_type_id;
42-
43- if (g_once_init_enter(&g_type_id)) {
44- static GEnumValue errors[] = {
45- { GJS_JS_ERROR_ERROR, "Error", "error" },
46- { GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error" },
47- { GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error" },
48- { GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error" },
49- { GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error" },
50- { GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration" },
51- { GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error" },
52- { GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error" },
53- { GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error" },
54- { 0, nullptr, nullptr }
55- };
56-
57- g_type_id = g_enum_register_static("GjsJSError", errors);
58- }
59-
60+ static const GEnumValue errors[] = {
61+ {GJS_JS_ERROR_ERROR, "Error", "error"},
62+ {GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error"},
63+ {GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error"},
64+ {GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error"},
65+ {GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error"},
66+ {GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration"},
67+ {GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error"},
68+ {GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error"},
69+ {GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error"},
70+ {0, nullptr, nullptr}};
71+ // Initialization of static local variable guaranteed only once in C++11
72+ static GType g_type_id = g_enum_register_static("GjsJSError", errors);
73 return g_type_id;
74 }
75--
762.31.1
77
diff --git a/meta-gnome/recipes-gnome/gjs/gjs/0002-meson.build-Do-not-add-dir-installed-tests-when-inst.patch b/meta-gnome/recipes-gnome/gjs/gjs/0002-meson.build-Do-not-add-dir-installed-tests-when-inst.patch
new file mode 100644
index 0000000000..8777d14f53
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gjs/gjs/0002-meson.build-Do-not-add-dir-installed-tests-when-inst.patch
@@ -0,0 +1,34 @@
1From 6a29818204e647d5fad68ed7ca8cac53d301cae6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Wed, 27 Oct 2021 20:04:02 +0200
4Subject: [PATCH] meson.build: Do not add dir installed-tests when
5 installed_tests is false
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Upstream-Status: Submitted[https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690]
11
12Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
13---
14 meson.build | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
16
17diff --git a/meson.build b/meson.build
18index 6878e2e..edbbf79 100644
19--- a/meson.build
20+++ b/meson.build
21@@ -635,7 +635,9 @@ if not get_option('skip_gtk_tests')
22 have_gtk4 = dependency('gtk4', required: false).found()
23 endif
24
25-subdir('installed-tests')
26+if get_option('installed_tests')
27+ subdir('installed-tests')
28+endif
29
30 # Note: The test program in test/ needs to be ported
31 # to Windows before we can build it on Windows.
32--
332.31.1
34
diff --git a/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb b/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb
deleted file mode 100644
index 096e277bb4..0000000000
--- a/meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb
+++ /dev/null
@@ -1,42 +0,0 @@
1SUMMARY = "Javascript bindings for GNOME"
2LICENSE = "MIT & LGPLv2+"
3LIC_FILES_CHKSUM = " \
4 file://COPYING;md5=beb29cf17fabe736f0639b09ee6e76fa \
5 file://COPYING.LGPL;md5=3bf50002aefd002f49e7bb854063f7e7 \
6"
7
8GNOMEBASEBUILDCLASS = "autotools"
9
10DEPENDS = "mozjs gtk+3"
11
12inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig
13
14SRC_URI[archive.sha256sum] = "7fb3eb746c17363d9ee47f4a5d0bb048f0075611763eb0da11d85e0e57aff381"
15SRC_URI += "file://0001-Disable-tests-on-host.patch \
16 file://0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch \
17"
18
19# gobject-introspection is mandatory and cannot be configured
20REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
21UNKNOWN_CONFIGURE_WHITELIST:append = " --enable-introspection --disable-introspection"
22
23EXTRA_OECONF = " \
24 --without-dbus-tests \
25 --disable-installed-tests \
26"
27
28do_configure:prepend() {
29 # make configure find gobject-introspection test code. Although we set
30 # --disable-installed-tests gjs builds them
31 sed -i 's|:$GI_DATADIR|:${STAGING_DIR_NATIVE}$GI_DATADIR|g' ${S}/configure.ac
32}
33
34FILES:${PN} += "${datadir}/gjs-1.0/lsan"
35
36PACKAGES =+ "${PN}-valgrind"
37FILES:${PN}-valgrind = "${datadir}/gjs-1.0/valgrind"
38RDEPENDS:${PN}-valgrind += "valgrind"
39
40# Valgrind not yet available on rv32/rv64
41RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind"
42RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind"
diff --git a/meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb b/meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb
new file mode 100644
index 0000000000..92f14e0846
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Javascript bindings for GNOME"
2LICENSE = "MIT & LGPL-2.0-or-later"
3LIC_FILES_CHKSUM = "file://COPYING;md5=8dcea832f6acf45d856abfeb2d51ec48"
4
5GNOMEBASEBUILDCLASS = "meson"
6
7DEPENDS = "mozjs-78 gtk4"
8
9inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig
10
11SRC_URI[archive.sha256sum] = "4b0629341a318a02374e113ab97f9a9f3325423269fc1e0b043a5ffb01861c5f"
12SRC_URI += " \
13 file://0001-Support-cross-builds-a-bit-better.patch \
14 file://0002-meson.build-Do-not-add-dir-installed-tests-when-inst.patch \
15"
16
17# gobject-introspection is mandatory and cannot be configured
18REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
19UNKNOWN_CONFIGURE_WHITELIST:append = " introspection"
20
21EXTRA_OEMESON = " \
22 -Dinstalled_tests=false \
23 -Dskip_dbus_tests=true \
24"
25
26LDFLAGS:append:mipsarch = " -latomic"
27LDFLAGS:append:powerpc = " -latomic"
28LDFLAGS:append:powerpc64 = " -latomic"
29
30FILES:${PN} += "${datadir}/gjs-1.0/lsan"
31
32PACKAGES =+ "${PN}-valgrind"
33FILES:${PN}-valgrind = "${datadir}/gjs-1.0/valgrind"
34RDEPENDS:${PN}-valgrind += "valgrind"
35
36# Valgrind not yet available on rv32/rv64
37RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind"
38RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind"