logo

overlay

My own overlay for experimentations, use with caution, no support is provided

gdbus-codegen-2.62.3.ebuild (2133B)


      1 # Copyright 1999-2019 Gentoo Authors
      2 # Distributed under the terms of the GNU General Public License v2
      3 
      4 EAPI=6
      5 GNOME_ORG_MODULE="glib"
      6 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
      7 PYTHON_REQ_USE="xml"
      8 DISTUTILS_SINGLE_IMPL=1
      9 
     10 inherit gnome.org distutils-r1
     11 
     12 DESCRIPTION="GDBus code and documentation generator"
     13 HOMEPAGE="https://www.gtk.org/"
     14 
     15 LICENSE="LGPL-2+"
     16 SLOT="0"
     17 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
     18 IUSE=""
     19 
     20 RDEPEND="${PYTHON_DEPS}"
     21 DEPEND="${RDEPEND}
     22 	dev-libs/libxslt
     23 	app-text/docbook-xsl-stylesheets
     24 "
     25 
     26 # To prevent circular dependencies with glib[test]
     27 PDEPEND=">=dev-libs/glib-${PV}:2"
     28 
     29 S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
     30 
     31 python_prepare_all() {
     32 	PATCHES=(
     33 		"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
     34 	)
     35 	distutils-r1_python_prepare_all
     36 
     37 	sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
     38 	sed -e "s:@VERSION@:${PV}:" config.py.in > config.py || die
     39 	cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
     40 	sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
     41 }
     42 
     43 do_xsltproc_command() {
     44 	# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
     45 	xsltproc \
     46 		--nonet \
     47 		--stringparam man.output.quietly 1 \
     48 		--stringparam funcsynopsis.style ansi \
     49 		--stringparam man.th.extra1.suppress 1 \
     50 		--stringparam man.authors.section.enabled 0 \
     51 		--stringparam man.copyright.section.enabled 0 \
     52 		-o "${2}" \
     53 		http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
     54 		"${1}" || die "manpage generation failed"
     55 }
     56 
     57 src_compile() {
     58 	distutils-r1_src_compile
     59 	do_xsltproc_command "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.xml" "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
     60 }
     61 
     62 src_test() {
     63 	einfo "Skipping tests. This package is tested by dev-libs/glib"
     64 	einfo "when merged with FEATURES=test"
     65 }
     66 
     67 python_install_all() {
     68 	distutils-r1_python_install_all # no-op, but prevents QA warning
     69 	doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
     70 }