diff options
Diffstat (limited to 'dev-libs/gobject-introspection')
-rw-r--r-- | dev-libs/gobject-introspection/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/gobject-introspection/files/gobject-introspection-1.78.1-tests-py312.patch | 73 | ||||
-rw-r--r-- | dev-libs/gobject-introspection/gobject-introspection-1.76.1.ebuild (renamed from dev-libs/gobject-introspection/gobject-introspection-1.68.0.ebuild) | 22 | ||||
-rw-r--r-- | dev-libs/gobject-introspection/gobject-introspection-1.78.1.ebuild | 84 | ||||
-rw-r--r-- | dev-libs/gobject-introspection/metadata.xml | 20 |
5 files changed, 182 insertions, 20 deletions
diff --git a/dev-libs/gobject-introspection/Manifest b/dev-libs/gobject-introspection/Manifest index bdfba874bc5d..dcf0501a11b1 100644 --- a/dev-libs/gobject-introspection/Manifest +++ b/dev-libs/gobject-introspection/Manifest @@ -1 +1,2 @@ -DIST gobject-introspection-1.68.0.tar.xz 1019732 BLAKE2B 2f99cc9cec5ea05f1a5fa4473d1ad424cc1f6b097075f798e89cf740519db180417a3f0de37afc8a0cf0771436a9d9f7d6193b69289dfb47ec077d33a7d27c91 SHA512 d2e64c119aa500b624a57baa2cebe9126ab100003d98b771f4fb51cf92748635de352997f702f40656f7c665f3dfedfbfa19912cc7a2d039d254555243bbc381 +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 diff --git a/dev-libs/gobject-introspection/files/gobject-introspection-1.78.1-tests-py312.patch b/dev-libs/gobject-introspection/files/gobject-introspection-1.78.1-tests-py312.patch new file mode 100644 index 000000000000..0b32d8dcfa4d --- /dev/null +++ b/dev-libs/gobject-introspection/files/gobject-introspection-1.78.1-tests-py312.patch @@ -0,0 +1,73 @@ +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 + diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.68.0.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.76.1.ebuild index fec54fa1772f..dd5dc146ec03 100644 --- a/dev-libs/gobject-introspection/gobject-introspection-1.68.0.ebuild +++ b/dev-libs/gobject-introspection/gobject-introspection-1.76.1.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{8..10} ) -PYTHON_REQ_USE="xml" +PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_REQ_USE="xml(+)" inherit gnome.org meson python-single-r1 xdg DESCRIPTION="Introspection system for GObject-based libraries" @@ -15,12 +15,12 @@ SLOT="0" IUSE="doctool gtk-doc test" RESTRICT="!test? ( test )" REQUIRED_USE="${PYTHON_REQUIRED_USE}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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.58.0:2 + >=dev-libs/glib-2.75.0:2 dev-libs/libffi:= doctool? ( $(python_gen_cond_dep ' @@ -31,14 +31,16 @@ RDEPEND=" virtual/pkgconfig ${PYTHON_DEPS} " -# Wants real bison, not virtual/yacc -DEPEND="${RDEPEND} - gtk-doc? ( >=dev-util/gtk-doc-1.19 +# 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 - sys-devel/flex + app-alternatives/lex test? ( x11-libs/cairo[glib] $(python_gen_cond_dep ' diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.78.1.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.78.1.ebuild new file mode 100644 index 000000000000..e54b7e1668da --- /dev/null +++ b/dev-libs/gobject-introspection/gobject-introspection-1.78.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +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 ~ia64 ~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}] + ' 3.12) + 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" ) + +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 +} diff --git a/dev-libs/gobject-introspection/metadata.xml b/dev-libs/gobject-introspection/metadata.xml index ed75a827c8a9..ba6ebec84084 100644 --- a/dev-libs/gobject-introspection/metadata.xml +++ b/dev-libs/gobject-introspection/metadata.xml @@ -1,12 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!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> + <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> |