diff options
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 @@ | |||
| 1 | From 95379de2132786f855e8caec1fd5869225774d02 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Sat, 18 May 2019 01:14:07 +0200 | ||
| 4 | Subject: [PATCH] Disable tests on host | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [OE-specific] | ||
| 10 | |||
| 11 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 4 +--- | ||
| 14 | 1 file changed, 1 insertion(+), 3 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index 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 | -- | ||
| 32 | 2.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 @@ | |||
| 1 | From 550e98013b0e003c1a6771d8e811375913adf16b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Wed, 27 Oct 2021 20:18:47 +0200 | ||
| 4 | Subject: [PATCH] Support cross builds a bit better | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | * Do not build/run mozjs-linked program | ||
| 10 | * Do not try to run test applications | ||
| 11 | |||
| 12 | Upstream-Status: Submitted[https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690] | ||
| 13 | |||
| 14 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 15 | --- | ||
| 16 | meson.build | 4 +++- | ||
| 17 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/meson.build b/meson.build | ||
| 20 | index 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 | -- | ||
| 49 | 2.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 @@ | |||
| 1 | From dae0055be61937fe70252f3f4ee09b355aba2b8f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Philip Chimento <philip.chimento@gmail.com> | ||
| 3 | Date: Sun, 14 Feb 2021 12:20:09 -0800 | ||
| 4 | Subject: [PATCH] maint: Avoid g_once_init_enter error in GCC 11 | ||
| 5 | |||
| 6 | On platforms where g_once_init_enter() is defined to use C11 atomic | ||
| 7 | builtins, passing a pointer to a volatile value is an error in GCC 11 and | ||
| 8 | later, in C++. | ||
| 9 | |||
| 10 | More info about the GCC change: | ||
| 11 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95378 | ||
| 12 | https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548283.html | ||
| 13 | |||
| 14 | However, it's my understanding that in modern C++ there is no longer a | ||
| 15 | need to guard the initialization of these variables. Since C++11, static | ||
| 16 | local variables in a function are guaranteed to be initialized only once, | ||
| 17 | the first time control passes through that function. So we can just remove | ||
| 18 | the g_once_init_enter guard. | ||
| 19 | |||
| 20 | More info: | ||
| 21 | https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables | ||
| 22 | |||
| 23 | Stack Overflow answers with quotations from the C++ standard: | ||
| 24 | https://stackoverflow.com/a/58804/172999 | ||
| 25 | https://stackoverflow.com/a/8102145/172999 | ||
| 26 | |||
| 27 | Closes: #376 | ||
| 28 | --- | ||
| 29 | gjs/error-types.cpp | 32 +++++++++++++------------------- | ||
| 30 | 1 file changed, 13 insertions(+), 19 deletions(-) | ||
| 31 | |||
| 32 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gjs/-/commit/f02eaf3a9d3465915eb849428c2d9615e2184a4c] | ||
| 33 | diff --git a/gjs/error-types.cpp b/gjs/error-types.cpp | ||
| 34 | index 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 | -- | ||
| 76 | 2.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 @@ | |||
| 1 | From 6a29818204e647d5fad68ed7ca8cac53d301cae6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> | ||
| 3 | Date: Wed, 27 Oct 2021 20:04:02 +0200 | ||
| 4 | Subject: [PATCH] meson.build: Do not add dir installed-tests when | ||
| 5 | installed_tests is false | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | Upstream-Status: Submitted[https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/690] | ||
| 11 | |||
| 12 | Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> | ||
| 13 | --- | ||
| 14 | meson.build | 4 +++- | ||
| 15 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/meson.build b/meson.build | ||
| 18 | index 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 | -- | ||
| 33 | 2.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 @@ | |||
| 1 | SUMMARY = "Javascript bindings for GNOME" | ||
| 2 | LICENSE = "MIT & LGPLv2+" | ||
| 3 | LIC_FILES_CHKSUM = " \ | ||
| 4 | file://COPYING;md5=beb29cf17fabe736f0639b09ee6e76fa \ | ||
| 5 | file://COPYING.LGPL;md5=3bf50002aefd002f49e7bb854063f7e7 \ | ||
| 6 | " | ||
| 7 | |||
| 8 | GNOMEBASEBUILDCLASS = "autotools" | ||
| 9 | |||
| 10 | DEPENDS = "mozjs gtk+3" | ||
| 11 | |||
| 12 | inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig | ||
| 13 | |||
| 14 | SRC_URI[archive.sha256sum] = "7fb3eb746c17363d9ee47f4a5d0bb048f0075611763eb0da11d85e0e57aff381" | ||
| 15 | SRC_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 | ||
| 20 | REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" | ||
| 21 | UNKNOWN_CONFIGURE_WHITELIST:append = " --enable-introspection --disable-introspection" | ||
| 22 | |||
| 23 | EXTRA_OECONF = " \ | ||
| 24 | --without-dbus-tests \ | ||
| 25 | --disable-installed-tests \ | ||
| 26 | " | ||
| 27 | |||
| 28 | do_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 | |||
| 34 | FILES:${PN} += "${datadir}/gjs-1.0/lsan" | ||
| 35 | |||
| 36 | PACKAGES =+ "${PN}-valgrind" | ||
| 37 | FILES:${PN}-valgrind = "${datadir}/gjs-1.0/valgrind" | ||
| 38 | RDEPENDS:${PN}-valgrind += "valgrind" | ||
| 39 | |||
| 40 | # Valgrind not yet available on rv32/rv64 | ||
| 41 | RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind" | ||
| 42 | RDEPENDS:${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 @@ | |||
| 1 | SUMMARY = "Javascript bindings for GNOME" | ||
| 2 | LICENSE = "MIT & LGPL-2.0-or-later" | ||
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=8dcea832f6acf45d856abfeb2d51ec48" | ||
| 4 | |||
| 5 | GNOMEBASEBUILDCLASS = "meson" | ||
| 6 | |||
| 7 | DEPENDS = "mozjs-78 gtk4" | ||
| 8 | |||
| 9 | inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig | ||
| 10 | |||
| 11 | SRC_URI[archive.sha256sum] = "4b0629341a318a02374e113ab97f9a9f3325423269fc1e0b043a5ffb01861c5f" | ||
| 12 | SRC_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 | ||
| 18 | REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" | ||
| 19 | UNKNOWN_CONFIGURE_WHITELIST:append = " introspection" | ||
| 20 | |||
| 21 | EXTRA_OEMESON = " \ | ||
| 22 | -Dinstalled_tests=false \ | ||
| 23 | -Dskip_dbus_tests=true \ | ||
| 24 | " | ||
| 25 | |||
| 26 | LDFLAGS:append:mipsarch = " -latomic" | ||
| 27 | LDFLAGS:append:powerpc = " -latomic" | ||
| 28 | LDFLAGS:append:powerpc64 = " -latomic" | ||
| 29 | |||
| 30 | FILES:${PN} += "${datadir}/gjs-1.0/lsan" | ||
| 31 | |||
| 32 | PACKAGES =+ "${PN}-valgrind" | ||
| 33 | FILES:${PN}-valgrind = "${datadir}/gjs-1.0/valgrind" | ||
| 34 | RDEPENDS:${PN}-valgrind += "valgrind" | ||
| 35 | |||
| 36 | # Valgrind not yet available on rv32/rv64 | ||
| 37 | RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind" | ||
| 38 | RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind" | ||
