dev-libs/gobject-introspection: Drop the troublesome package

This commit is contained in:
Krzesimir Nowak 2025-01-17 14:43:51 +01:00
parent e9f0cb38a6
commit 8ffb6f8cff
8 changed files with 0 additions and 539 deletions

View File

@ -1,4 +0,0 @@
DIST gobject-introspection-1.76.1.tar.xz 1055416 BLAKE2B 2251c34b543c95f95bdec6853c8234db1b2e6271e729eaa5abf28e39c7718b326e0813a1214c62fb4634fd11218c4c856e6651de09081b01c9fcf8f73b8cf316 SHA512 84331a30f8854d2259609650c21aadd6363ea1417a75828bd395f8f4346da1c6d6550cff5f2c9f5f6fd6fbf2a9d27b5880c2ee1616fa905c5f362384d481a916
DIST gobject-introspection-1.78.1.tar.xz 1060296 BLAKE2B 115cf9ea27cec2d8d3a84081c909b72144fd1568bc316677c26f49652dc93b34fba10701678ad4977dcf97a89f7608545fbd2d73c2503c87635b2102e66ae024 SHA512 a3081882995a762645b04faa71082dbd523bee845519007e48b13235aad8a4cd4c74f0d042a6c17710125f945bd970e4b76e95a559274e294d595e04725a4e97
DIST gobject-introspection-1.80.1.tar.xz 1040228 BLAKE2B 7a8c1da9bc8aef293deedde1eed97536fa2f42f79a9761ac8ededb0676e46b636545a69e20e63d812844aeb626fa4fb7ce3c7922e51554fdc79560f16443acd9 SHA512 f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a
DIST gobject-introspection-1.82.0.tar.xz 1052872 BLAKE2B 8336ae26d48a71a203655d9d268076f603055ceabb55dbfa676f2c67b4096b83afc106d485dc45d02b3a8be806f9ef50d54806a82e61f2a252ae59543c61e934 SHA512 e139fadb4174c72b648914f3774d89fc0e5eaee45bba0c13edf05de883664dad8276dbc34006217bb09871ed4bad23adab51ff232a17b9eb131329b2926cafb7

View File

@ -1,73 +0,0 @@
From fb6f33082a42202c55dc3d5cbc984cc9b6b01629 Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Mon, 25 Dec 2023 00:06:53 +0000
Subject: [PATCH] tests: Do not use PYTHONPATH to import giscanner
The PYTHONPATH environment variable will prepend its contents to
sys.path; since giscanner contains an ast sub-module, we are going to
cause a collision with Python's own ast module. In some cases, Python
3.12's distutils compatibility shim will try to import Python's ast,
which will end up trying to import giscanner.ast instead.
Instead of prepending the giscanner build directory, we can append it,
and keep the current project layout.
See: #429
---
tests/scanner/meson.build | 2 +-
tests/warn/meson.build | 5 +----
tests/warn/warningtester.py | 9 +++++++++
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build
index e77c2de03..c92ce6474 100644
--- a/tests/scanner/meson.build
+++ b/tests/scanner/meson.build
@@ -1,7 +1,7 @@
scanner_test_env = environment()
scanner_test_env.prepend('PYTHONPATH', test_env_common_pypath)
if test_env_common_path.length() > 0
- scanner_test_env.prepend('PATH', test_env_common_path)
+ scanner_test_env.prepend('PATH', test_env_common_path)
endif
scanner_test_files = [
diff --git a/tests/warn/meson.build b/tests/warn/meson.build
index 9641787f7..c57268081 100644
--- a/tests/warn/meson.build
+++ b/tests/warn/meson.build
@@ -23,10 +23,7 @@ warn_tests = [
warn_test_env = environment()
warn_test_env.set('UNINSTALLED_INTROSPECTION_SRCDIR', source_root)
warn_test_env.set('TOP_BUILDDIR', build_root)
-warn_test_env.set(
- 'PYTHONPATH',
- build_root,
- join_paths(build_root, 'giscanner'))
+warn_test_env.set('GISCANNER_DIR', build_root, build_root / 'giscanner')
# FIXME: Glib as a subproject (used on Windows mostly).
if glib_dep.type_name() == 'pkgconfig'
diff --git a/tests/warn/warningtester.py b/tests/warn/warningtester.py
index acb271f23..cce2827b1 100644
--- a/tests/warn/warningtester.py
+++ b/tests/warn/warningtester.py
@@ -11,6 +11,15 @@ sys.path.insert(0, path)
builtins.__dict__['DATADIR'] = path
builtins.__dict__['GIR_DIR'] = path
+# We cannot use PYTHONPATH, because it would prepend the giscanner
+# root, and we have an "ast" module that conflicts with Python's
+# own ast. In some cases, Python's distutils ends up importing ast,
+# and that will end up trying to import giscanner.ast
+path = os.getenv('GISCANNER_DIR', None)
+assert path is not None
+for p in path.split(os.pathsep):
+ sys.path.append(p)
+
from giscanner.annotationparser import GtkDocCommentBlockParser
from giscanner.ast import Include, Namespace
from giscanner.introspectablepass import IntrospectablePass
--
GitLab

View File

@ -1,101 +0,0 @@
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

View File

@ -1,84 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.75.0:2
dev-libs/libffi:=
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not app-alternatives/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
app-alternatives/lex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
PATCHES=(
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/490
"${FILESDIR}/${PN}-1.80.1-setuptools-74.patch"
)
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View File

@ -1,88 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://gi.readthedocs.io"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.$(($(ver_cut 2) - 1)).0:2
dev-libs/libffi:=
$(python_gen_cond_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not app-alternatives/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
app-alternatives/lex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
PATCHES=(
"${FILESDIR}/${P}-tests-py312.patch"
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/490
"${FILESDIR}/${PN}-1.80.1-setuptools-74.patch"
)
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View File

@ -1,90 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://gi.readthedocs.io/"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.79.0:2[introspection]
dev-libs/libffi:=
$(python_gen_cond_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not app-alternatives/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
app-alternatives/lex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
PATCHES=(
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/490
"${FILESDIR}/${PN}-1.80.1-setuptools-74.patch"
)
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
-Dbuild_introspection_data=true
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View File

@ -1,85 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
inherit gnome.org meson python-single-r1 xdg
DESCRIPTION="Introspection system for GObject-based libraries"
HOMEPAGE="https://gi.readthedocs.io/"
LICENSE="LGPL-2+ GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="doctool gtk-doc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
# virtual/pkgconfig needed at runtime, bug #505408
RDEPEND="
>=dev-libs/gobject-introspection-common-${PV}
>=dev-libs/glib-2.82.0:2[introspection]
dev-libs/libffi:=
$(python_gen_cond_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
doctool? (
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
virtual/pkgconfig
${PYTHON_DEPS}
"
# Wants real bison, not app-alternatives/yacc
DEPEND="${RDEPEND}"
BDEPEND="
gtk-doc? (
>=dev-util/gtk-doc-1.19
app-text/docbook-xml-dtd:4.3
app-text/docbook-xml-dtd:4.5
)
sys-devel/bison
app-alternatives/lex
test? (
x11-libs/cairo[glib]
$(python_gen_cond_dep '
dev-python/mako[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
')
)
"
pkg_setup() {
python-single-r1_pkg_setup
}
src_configure() {
local emesonargs=(
$(meson_feature test cairo)
$(meson_feature doctool)
#-Dglib_src_dir
$(meson_use gtk-doc gtk_doc)
#-Dcairo_libname
-Dpython="${EPYTHON}"
-Dbuild_introspection_data=true
#-Dgir_dir_prefix
)
meson_src_configure
}
src_install() {
meson_src_install
python_fix_shebang "${ED}"/usr/bin/
python_optimize "${ED}"/usr/$(get_libdir)/gobject-introspection/giscanner
# Prevent collision with gobject-introspection-common
rm -v "${ED}"/usr/share/aclocal/introspection.m4 \
"${ED}"/usr/share/gobject-introspection-1.0/Makefile.introspection || die
rmdir "${ED}"/usr/share/aclocal || die
}

View File

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="doctool">Install g-ir-doc-tool for generating documentation from introspected data</flag>
</use>
<upstream>
<remote-id type="gnome-gitlab">GNOME/gobject-introspection</remote-id>
</upstream>
</pkgmetadata>