From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/
Date: Wed, 18 Dec 2024 02:37:55 +0000 (UTC) [thread overview]
Message-ID: <1734489411.cdf427ba20cfabb231a3b463d93bb8572e600bc8.sam@gentoo> (raw)
commit: cdf427ba20cfabb231a3b463d93bb8572e600bc8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 18 02:36:23 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 18 02:36:51 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdf427ba
dev-libs/glib: patch bootstrap gobject-introspection in 2.80.5 for distutils
Closes: https://bugs.gentoo.org/946578
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../glib-2.80.5-gobject-introspection-1.80.patch | 103 +++++++++++++++++++++
dev-libs/glib/glib-2.80.5-r1.ebuild | 5 +
2 files changed, 108 insertions(+)
diff --git a/dev-libs/glib/files/glib-2.80.5-gobject-introspection-1.80.patch b/dev-libs/glib/files/glib-2.80.5-gobject-introspection-1.80.patch
new file mode 100644
index 000000000000..3e31626a3fff
--- /dev/null
+++ b/dev-libs/glib/files/glib-2.80.5-gobject-introspection-1.80.patch
@@ -0,0 +1,103 @@
+https://bugs.gentoo.org/946578
+https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/a2139dba59eac283a7f543ed737f038deebddc19
+
+From a2139dba59eac283a7f543ed737f038deebddc19 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Wed, 28 Aug 2024 21:26:02 +0200
+Subject: [PATCH] giscanner: remove dependency on distutils.msvccompiler
+
+It was removed with setuptools 74.0.0. Since we still depend on the
+MSVCCompiler class use new_compiler() to get it some other way.
+
+Remove any reference to MSVC9Compiler, which was for Visual Studio 2008
+which we no longer support anyway.
+
+Fixes #515
+---
+ giscanner/ccompiler.py | 7 +++----
+ giscanner/msvccompiler.py | 14 +++++++-------
+ 2 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
+index d0ed70a3c..9a732cd5e 100644
+--- a/giscanner/ccompiler.py
++++ b/giscanner/ccompiler.py
+@@ -26,7 +26,6 @@ import tempfile
+ import sys
+ import distutils
+
+-from distutils.msvccompiler import MSVCCompiler
+ from distutils.unixccompiler import UnixCCompiler
+ from distutils.cygwinccompiler import Mingw32CCompiler
+ from distutils.sysconfig import get_config_vars
+@@ -167,7 +166,7 @@ class CCompiler(object):
+ # Now, create the distutils ccompiler instance based on the info we have.
+ if compiler_name == 'msvc':
+ # For MSVC, we need to create a instance of a subclass of distutil's
+- # MSVC9Compiler class, as it does not provide a preprocess()
++ # MSVCCompiler class, as it does not provide a preprocess()
+ # implementation
+ from . import msvccompiler
+ self.compiler = msvccompiler.get_msvc_compiler()
+@@ -460,7 +459,7 @@ class CCompiler(object):
+ return self.compiler.linker_exe
+
+ def check_is_msvc(self):
+- return isinstance(self.compiler, MSVCCompiler)
++ return self.compiler.compiler_type == "msvc"
+
+ # Private APIs
+ def _set_cpp_options(self, options):
+@@ -486,7 +485,7 @@ class CCompiler(object):
+ # macros for compiling using distutils
+ # get dropped for MSVC builds, so
+ # escape the escape character.
+- if isinstance(self.compiler, MSVCCompiler):
++ if self.check_is_msvc():
+ macro_value = macro_value.replace('\"', '\\\"')
+ macros.append((macro_name, macro_value))
+ elif option.startswith('-U'):
+diff --git a/giscanner/msvccompiler.py b/giscanner/msvccompiler.py
+index 0a5439820..e333a80f5 100644
+--- a/giscanner/msvccompiler.py
++++ b/giscanner/msvccompiler.py
+@@ -19,30 +19,30 @@
+ #
+
+ import os
+-import distutils
++from typing import Type
+
+ from distutils.errors import DistutilsExecError, CompileError
+-from distutils.ccompiler import CCompiler, gen_preprocess_options
++from distutils.ccompiler import CCompiler, gen_preprocess_options, new_compiler
+ from distutils.dep_util import newer
+
+ # Distutil's MSVCCompiler does not provide a preprocess()
+ # Implementation, so do our own here.
+
+
++DistutilsMSVCCompiler: Type = type(new_compiler(compiler="msvc"))
++
++
+ def get_msvc_compiler():
+ return MSVCCompiler()
+
+
+-class MSVCCompiler(distutils.msvccompiler.MSVCCompiler):
++class MSVCCompiler(DistutilsMSVCCompiler):
+
+ def __init__(self, verbose=0, dry_run=0, force=0):
+- super(distutils.msvccompiler.MSVCCompiler, self).__init__()
++ super(DistutilsMSVCCompiler, self).__init__()
+ CCompiler.__init__(self, verbose, dry_run, force)
+ self.__paths = []
+ self.__arch = None # deprecated name
+- if os.name == 'nt':
+- if isinstance(self, distutils.msvc9compiler.MSVCCompiler):
+- self.__version = distutils.msvc9compiler.VERSION
+ self.initialized = False
+ self.preprocess_options = None
+ if self.check_is_clang_cl():
+--
+GitLab
diff --git a/dev-libs/glib/glib-2.80.5-r1.ebuild b/dev-libs/glib/glib-2.80.5-r1.ebuild
index a07569da4316..2ffe82e34732 100644
--- a/dev-libs/glib/glib-2.80.5-r1.ebuild
+++ b/dev-libs/glib/glib-2.80.5-r1.ebuild
@@ -193,6 +193,11 @@ src_prepare() {
ln -s "${S}" "${INTROSPECTION_SOURCE_DIR}/subprojects/glib"
fi
+ # bug #946578
+ cd "${INTROSPECTION_SOURCE_DIR}" || die
+ eapply "${FILESDIR}"/glib-2.80.5-gobject-introspection-1.80.patch
+ cd "${S}" || die
+
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
next reply other threads:[~2024-12-18 2:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-18 2:37 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-22 5:52 [gentoo-commits] repo/gentoo:master commit in: dev-libs/glib/files/, dev-libs/glib/ Sam James
2023-03-16 23:51 Sam James
2023-03-04 0:48 Matt Turner
2022-12-21 23:28 Sam James
2022-11-26 17:19 Matt Turner
2022-11-01 22:10 Sam James
2022-09-22 4:13 Sam James
2020-03-25 2:20 Matt Turner
2020-02-22 18:30 Mart Raudsepp
2020-01-11 18:13 Mart Raudsepp
2020-01-01 15:41 Mart Raudsepp
2019-04-08 8:39 Mart Raudsepp
2018-12-30 11:28 Mart Raudsepp
2018-12-19 16:19 Mart Raudsepp
2018-11-29 15:25 Mart Raudsepp
2018-06-10 8:25 Mart Raudsepp
2016-05-01 14:37 Alexandre Rostovtsev
2016-02-28 12:02 Pacho Ramos
2015-10-13 3:28 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1734489411.cdf427ba20cfabb231a3b463d93bb8572e600bc8.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox