From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- eclass/gnome-python-common-r1.eclass | 106 +++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 eclass/gnome-python-common-r1.eclass (limited to 'eclass/gnome-python-common-r1.eclass') diff --git a/eclass/gnome-python-common-r1.eclass b/eclass/gnome-python-common-r1.eclass new file mode 100644 index 00000000000..b80c17a481b --- /dev/null +++ b/eclass/gnome-python-common-r1.eclass @@ -0,0 +1,106 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# @ECLASS: gnome-python-common-r1 +# @MAINTAINER: +# GNOME team +# @AUTHOR: +# Author: Michał Górny +# Based on the work of: Arun raghaven +# which in turn was based on the work of Jim Ramsay +# @BLURB: Common functionality for building gnome-python* bindings +# @DESCRIPTION: +# This eclass provides python-r1 support for the GNOME2 library Python +# bindings. + +: ${GNOME_ORG_MODULE:=gnome-python} +: ${GNOME_TARBALL_SUFFIX:=bz2} +: ${GNOME2_LA_PUNT:=yes} +: ${GCONF_DEBUG:=no} + +# @ECLASS-VARIABLE: G_PY_BINDINGS +# @DESCRIPTION: +# The actual '--enable-' name. If multiple bindings are to +# be enabled, must be an array. +: ${G_PY_BINDINGS:=${PN%-python}} + +# @ECLASS-VARIABLE: EXAMPLES +# @DEFAULT_UNSET +# @DESCRIPTION: +# The set of example files to be installed if the 'examples' USE flag +# is set. + +case "${EAPI:-0}" in + 0|1|2|3|4) + die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" + ;; + 5) + ;; + *) + die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" + ;; +esac + +inherit eutils gnome2 python-r1 + +EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install + +HOMEPAGE="http://pygtk.org/" + +RESTRICT="${RESTRICT} test" + +DOCS="AUTHORS ChangeLog NEWS README" + +if [[ ${GNOME_ORG_MODULE} != "gnome-python" ]]; then + DOCS="${DOCS} MAINTAINERS" +fi + +RDEPEND="~dev-python/${GNOME_ORG_MODULE}-base-${PV} + ${PYTHON_DEPS}" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +REQUIRED_USE=${PYTHON_REQUIRED_USE} + +gnome-python-common-r1_src_prepare() { + gnome2_src_prepare + + # The .pc file is installed by respective gnome-python*-base package + sed -i '/^pkgconfig_DATA/d' Makefile.in || die "sed failed" + sed -i '/^pkgconfigdir/d' Makefile.in || die "sed failed" +# +# python_copy_sources +} + +gnome-python-common-r1_src_configure() { + local myconf=( + --disable-allbindings + "${G_PY_BINDINGS[@]/#/--enable-}" + ) + + ECONF_SOURCE=${S} \ + python_parallel_foreach_impl \ + gnome2_src_configure "${myconf[@]}" "${@}" +} + +gnome-python-common-r1_src_compile() { + python_foreach_impl default +} + +gnome-python-common-r1_src_test() { + python_foreach_impl default +} + +# Do a regular gnome2 src_install and then install examples if required. +# Set the variable EXAMPLES to provide the set of examples to be installed. +# (to install a directory recursively, specify it with a trailing '/' - for +# example, foo/bar/) +gnome-python-common-r1_src_install() { + python_foreach_impl gnome2_src_install + + if in_iuse examples && use examples; then + docinto examples + dodoc -r "${EXAMPLES[@]}" + fi +} -- cgit v1.2.1