1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 GNOME_ORG_MODULE="glib"
6 PYTHON_COMPAT=( python3_{6,7,8} )
8 DISTUTILS_SINGLE_IMPL=1
9 DISTUTILS_USE_SETUPTOOLS=no
11 inherit gnome.org distutils-r1
13 DESCRIPTION="GDBus code and documentation generator"
14 HOMEPAGE="https://www.gtk.org/"
18 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
21 RDEPEND="${PYTHON_DEPS}"
25 app-text/docbook-xsl-stylesheets
28 S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
30 python_prepare_all() {
32 "${FILESDIR}/${PN}-2.56.1-sitedir.patch"
34 distutils-r1_python_prepare_all
36 sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
37 sed -e "s:@VERSION@:${PV}:" config.py.in > config.py || die
38 cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
39 sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
42 do_xsltproc_command() {
43 # Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
46 --stringparam man.output.quietly 1 \
47 --stringparam funcsynopsis.style ansi \
48 --stringparam man.th.extra1.suppress 1 \
49 --stringparam man.authors.section.enabled 0 \
50 --stringparam man.copyright.section.enabled 0 \
52 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
53 "${1}" || die "manpage generation failed"
57 distutils-r1_src_compile
58 do_xsltproc_command "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.xml" "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
62 einfo "Skipping tests. This package is tested by dev-libs/glib"
63 einfo "when merged with FEATURES=test"
66 python_install_all() {
67 distutils-r1_python_install_all # no-op, but prevents QA warning
68 doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"