public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/gjs/files/
@ 2022-01-24  8:21 Mart Raudsepp
  0 siblings, 0 replies; 2+ messages in thread
From: Mart Raudsepp @ 2022-01-24  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     c63a11ad71c189878ec35f679718aa5995dd5605
Author:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 21 18:47:34 2022 +0000
Commit:     Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Mon Jan 24 08:20:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c63a11ad

dev-libs/gjs: drop redundant patch file

Fixes: a0d230f8213c4a0a21661a315e637d80a3718e3d
Bug: https://bugs.gentoo.org/831580
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>

 dev-libs/gjs/files/gjs-1.70.0-meson-0.60.2.patch | 76 ------------------------
 1 file changed, 76 deletions(-)

diff --git a/dev-libs/gjs/files/gjs-1.70.0-meson-0.60.2.patch b/dev-libs/gjs/files/gjs-1.70.0-meson-0.60.2.patch
deleted file mode 100644
index 9a051131d98c..000000000000
--- a/dev-libs/gjs/files/gjs-1.70.0-meson-0.60.2.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 59bbb5e4795d2b6e41ce27ae3b18257e75b71a19 Mon Sep 17 00:00:00 2001
-From: Jan Beich <jbeich@FreeBSD.org>
-Date: Sat, 27 Nov 2021 22:57:11 +0000
-Subject: [PATCH] build: disable gir install via list to pacify meson >= 0.60.2
-
-meson.build:580:0: ERROR: "install_dir" must be specified when installing a target
-installed-tests/js/meson.build:73:0: ERROR: "install_dir" must be specified when installing a target
-installed-tests/js/meson.build:91:4: ERROR: "install_dir" must be specified when installing a target
-installed-tests/js/meson.build:104:0: ERROR: "install_dir" must be specified when installing a target
-installed-tests/js/libgjstesttools/meson.build:13:0: ERROR: "install_dir" must be specified when installing a target
----
- installed-tests/js/libgjstesttools/meson.build | 2 +-
- installed-tests/js/meson.build                 | 6 +++---
- meson.build                                    | 2 +-
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/installed-tests/js/libgjstesttools/meson.build b/installed-tests/js/libgjstesttools/meson.build
-index 2e57483a..3ca4d7ed 100644
---- a/installed-tests/js/libgjstesttools/meson.build
-+++ b/installed-tests/js/libgjstesttools/meson.build
-@@ -14,7 +14,7 @@ gjstest_tools_gir = gnome.generate_gir(libgjstesttools,
-     includes: ['GObject-2.0', 'Gio-2.0'], sources: gjstest_tools_sources,
-     namespace: 'GjsTestTools', nsversion: '1.0',
-     symbol_prefix: 'gjs_test_tools_', extra_args: '--warn-error',
--    install: get_option('installed_tests'), install_dir_gir: false,
-+    install: get_option('installed_tests'), install_dir_gir: [false],
-     install_dir_typelib: installed_tests_execdir)
- gjstest_tools_typelib = gjstest_tools_gir[1]
- libgjstesttools_dep = declare_dependency(
-diff --git a/installed-tests/js/meson.build b/installed-tests/js/meson.build
-index 2f007351..16b59660 100644
---- a/installed-tests/js/meson.build
-+++ b/installed-tests/js/meson.build
-@@ -74,7 +74,7 @@ regress_gir = gnome.generate_gir(libregress, includes: regress_gir_includes,
-     sources: regress_sources, namespace: 'Regress', nsversion: '1.0',
-     identifier_prefix: 'Regress', symbol_prefix: 'regress_',
-     extra_args: ['--warn-all', '--warn-error'] + regress_gir_c_args,
--    install: get_option('installed_tests'), install_dir_gir: false,
-+    install: get_option('installed_tests'), install_dir_gir: [false],
-     install_dir_typelib: installed_tests_execdir)
- regress_typelib = regress_gir[1]
- 
-@@ -91,7 +91,7 @@ if not skip_warnlib
-     warnlib_gir = gnome.generate_gir(libwarnlib, includes: ['Gio-2.0'],
-         sources: warnlib_sources, namespace: 'WarnLib', nsversion: '1.0',
-         symbol_prefix: 'warnlib_', header: 'warnlib.h',
--        install: get_option('installed_tests'), install_dir_gir: false,
-+        install: get_option('installed_tests'), install_dir_gir: [false],
-         install_dir_typelib: installed_tests_execdir)
-     warnlib_typelib = warnlib_gir[1]
- endif
-@@ -105,7 +105,7 @@ gimarshallingtests_gir = gnome.generate_gir(libgimarshallingtests,
-     includes: ['Gio-2.0'], sources: gimarshallingtests_sources,
-     namespace: 'GIMarshallingTests', nsversion: '1.0',
-     symbol_prefix: 'gi_marshalling_tests_', extra_args: '--warn-error',
--    install: get_option('installed_tests'), install_dir_gir: false,
-+    install: get_option('installed_tests'), install_dir_gir: [false],
-     install_dir_typelib: installed_tests_execdir)
- gimarshallingtests_typelib = gimarshallingtests_gir[1]
- 
-diff --git a/meson.build b/meson.build
-index 437b3fd3..73d0eaca 100644
---- a/meson.build
-+++ b/meson.build
-@@ -581,7 +581,7 @@ gjs_private_gir = gnome.generate_gir(libgjs,
-     includes: ['GObject-2.0', 'Gio-2.0'], sources: libgjs_private_sources,
-     namespace: 'GjsPrivate', nsversion: '1.0', identifier_prefix: 'Gjs',
-     symbol_prefix: 'gjs_', extra_args: '--warn-error', install: true,
--    install_dir_gir: false, install_dir_typelib: pkglibdir / 'girepository-1.0')
-+    install_dir_gir: [false], install_dir_typelib: pkglibdir / 'girepository-1.0')
- gjs_private_typelib = gjs_private_gir[1]
- 
- ### Build gjs-console interpreter ##############################################
--- 
-GitLab
-


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/gjs/files/
@ 2022-05-28  2:17 Matt Turner
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Turner @ 2022-05-28  2:17 UTC (permalink / raw
  To: gentoo-commits

commit:     d8566b90d226a1c086bfb359fbdf458b0fc196dd
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat May 28 02:14:20 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat May 28 02:17:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8566b90

dev-libs/gjs: Add missing GCC-11 support patch

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 dev-libs/gjs/files/gjs-1.64.5-gcc-11-support.patch | 129 +++++++++++++++++++++
 1 file changed, 129 insertions(+)

diff --git a/dev-libs/gjs/files/gjs-1.64.5-gcc-11-support.patch b/dev-libs/gjs/files/gjs-1.64.5-gcc-11-support.patch
new file mode 100644
index 000000000000..3808b6d7862b
--- /dev/null
+++ b/dev-libs/gjs/files/gjs-1.64.5-gcc-11-support.patch
@@ -0,0 +1,129 @@
+From 757d42d87e8a3b52a0782bc9cbd33c788ecc34e4 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento@gmail.com>
+Date: Mon, 15 Feb 2021 20:40:43 -0800
+Subject: [PATCH 1/2] GjsPrivate: Remove volatile from g_once_init_enter flag
+
+On platforms where g_once_init_enter() is defined to use C11 atomic
+builtins, passing a pointer to a volatile value will generate a warning
+in GCC 11 and later.
+
+More info about the GCC change:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95378
+https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548283.html
+
+More info about changes made in GLib:
+https://gitlab.gnome.org/GNOME/glib/-/issues/600
+
+See: #376
+(cherry picked from commit 989ac9ac723dc1c8b6b8961292f236c558f5c0f0)
+---
+ libgjs-private/gjs-util.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libgjs-private/gjs-util.c b/libgjs-private/gjs-util.c
+index 20a732d5..f7f3189a 100644
+--- a/libgjs-private/gjs-util.c
++++ b/libgjs-private/gjs-util.c
+@@ -57,8 +57,8 @@ gjs_format_int_alternative_output(int n)
+ GType
+ gjs_locale_category_get_type(void)
+ {
+-  static volatile size_t g_define_type_id__volatile = 0;
+-  if (g_once_init_enter(&g_define_type_id__volatile)) {
++    static size_t gjs_locale_category_get_type = 0;
++    if (g_once_init_enter(&gjs_locale_category_get_type)) {
+       static const GEnumValue v[] = {
+           { GJS_LOCALE_CATEGORY_ALL, "GJS_LOCALE_CATEGORY_ALL", "all" },
+           { GJS_LOCALE_CATEGORY_COLLATE, "GJS_LOCALE_CATEGORY_COLLATE", "collate" },
+@@ -72,9 +72,9 @@ gjs_locale_category_get_type(void)
+       GType g_define_type_id =
+         g_enum_register_static(g_intern_static_string("GjsLocaleCategory"), v);
+ 
+-      g_once_init_leave(&g_define_type_id__volatile, g_define_type_id);
++      g_once_init_leave(&gjs_locale_category_get_type, g_define_type_id);
+   }
+-  return g_define_type_id__volatile;
++  return gjs_locale_category_get_type;
+ }
+ 
+ /**
+-- 
+2.35.1
+
+From dade6ee66e07a1865dc380060abe921eaeeae763 Mon Sep 17 00:00:00 2001
+From: Philip Chimento <philip.chimento@gmail.com>
+Date: Sun, 14 Feb 2021 12:20:09 -0800
+Subject: [PATCH 2/2] maint: Avoid g_once_init_enter error in GCC 11
+
+On platforms where g_once_init_enter() is defined to use C11 atomic
+builtins, passing a pointer to a volatile value is an error in GCC 11 and
+later, in C++.
+
+More info about the GCC change:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95378
+https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548283.html
+
+However, it's my understanding that in modern C++ there is no longer a
+need to guard the initialization of these variables. Since C++11, static
+local variables in a function are guaranteed to be initialized only once,
+the first time control passes through that function. So we can just remove
+the g_once_init_enter guard.
+
+More info:
+https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables
+
+Stack Overflow answers with quotations from the C++ standard:
+https://stackoverflow.com/a/58804/172999
+https://stackoverflow.com/a/8102145/172999
+
+Closes: #376
+(cherry picked from commit f02eaf3a9d3465915eb849428c2d9615e2184a4c)
+---
+ gjs/error-types.cpp | 32 +++++++++++++-------------------
+ 1 file changed, 13 insertions(+), 19 deletions(-)
+
+diff --git a/gjs/error-types.cpp b/gjs/error-types.cpp
+index 86cb8789..5eba61b2 100644
+--- a/gjs/error-types.cpp
++++ b/gjs/error-types.cpp
+@@ -31,24 +31,18 @@ G_DEFINE_QUARK(gjs-js-error-quark, gjs_js_error)
+ // clang-format on
+ 
+ GType gjs_js_error_get_type(void) {
+-    static volatile GType g_type_id;
+-
+-    if (g_once_init_enter(&g_type_id)) {
+-        static GEnumValue errors[] = {
+-            { GJS_JS_ERROR_ERROR, "Error", "error" },
+-            { GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error" },
+-            { GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error" },
+-            { GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error" },
+-            { GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error" },
+-            { GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration" },
+-            { GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error" },
+-            { GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error" },
+-            { GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error" },
+-            { 0, nullptr, nullptr }
+-        };
+-
+-        g_type_id = g_enum_register_static("GjsJSError", errors);
+-    }
+-
++    static const GEnumValue errors[] = {
++        {GJS_JS_ERROR_ERROR, "Error", "error"},
++        {GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error"},
++        {GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error"},
++        {GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error"},
++        {GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error"},
++        {GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration"},
++        {GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error"},
++        {GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error"},
++        {GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error"},
++        {0, nullptr, nullptr}};
++    // Initialization of static local variable guaranteed only once in C++11
++    static GType g_type_id = g_enum_register_static("GjsJSError", errors);
+     return g_type_id;
+ }
+-- 
+2.35.1
+


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-28  2:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-24  8:21 [gentoo-commits] repo/gentoo:master commit in: dev-libs/gjs/files/ Mart Raudsepp
  -- strict thread matches above, loose matches on Subject: below --
2022-05-28  2:17 Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox