Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog gnome-python-common-r1.eclass
Date: Mon, 26 May 2014 17:20:20
Message-Id: 20140526172014.430D52004E@flycatcher.gentoo.org
1 mgorny 14/05/26 17:20:14
2
3 Modified: ChangeLog
4 Added: gnome-python-common-r1.eclass
5 Log:
6 Convert gnome-python-common.eclass to use python-r1, and clean it up a lot.
7
8 Revision Changes Path
9 1.1275 eclass/ChangeLog
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1275&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1275&content-type=text/plain
13 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1274&r2=1.1275
14
15 Index: ChangeLog
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
18 retrieving revision 1.1274
19 retrieving revision 1.1275
20 diff -u -r1.1274 -r1.1275
21 --- ChangeLog 26 May 2014 16:13:35 -0000 1.1274
22 +++ ChangeLog 26 May 2014 17:20:14 -0000 1.1275
23 @@ -1,6 +1,10 @@
24 # ChangeLog for eclass directory
25 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
26 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1274 2014/05/26 16:13:35 mgorny Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1275 2014/05/26 17:20:14 mgorny Exp $
28 +
29 + 26 May 2014; Michał Górny <mgorny@g.o>
30 + +gnome-python-common-r1.eclass:
31 + Convert gnome-python-common.eclass to use python-r1, and clean it up a lot.
32
33 26 May 2014; Michał Górny <mgorny@g.o> python-r1.eclass,
34 python-single-r1.eclass, python-utils-r1.eclass:
35
36
37
38 1.1 eclass/gnome-python-common-r1.eclass
39
40 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome-python-common-r1.eclass?rev=1.1&view=markup
41 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/gnome-python-common-r1.eclass?rev=1.1&content-type=text/plain
42
43 Index: gnome-python-common-r1.eclass
44 ===================================================================
45 # Copyright 1999-2014 Gentoo Foundation
46 # Distributed under the terms of the GNU General Public License v2
47 # $Header: /var/cvsroot/gentoo-x86/eclass/gnome-python-common-r1.eclass,v 1.1 2014/05/26 17:20:14 mgorny Exp $
48
49 # @ECLASS: gnome-python-common-r1
50 # @MAINTAINER:
51 # GNOME team <gnome@g.o>
52 # @AUTHOR:
53 # Author: Michał Górny <mgorny@g.o>
54 # Based on the work of: Arun raghaven <ford_prefect@g.o>
55 # which in turn was based on the work of Jim Ramsay <lack@g.o>
56 # @BLURB: Common functionality for building gnome-python* bindings
57 # @DESCRIPTION:
58 # This eclass provides python-r1 support for the GNOME2 library Python
59 # bindings.
60
61 : ${GNOME_ORG_MODULE:=gnome-python}
62 : ${GNOME_TARBALL_SUFFIX:=bz2}
63 : ${GNOME2_LA_PUNT:=yes}
64 : ${GCONF_DEBUG:=no}
65
66 # @ECLASS-VARIABLE: G_PY_BINDINGS
67 # @DESCRIPTION:
68 # The actual '--enable-<binding>' name. If multiple bindings are to
69 # be enabled, must be an array.
70 : ${G_PY_BINDINGS:=${PN%-python}}
71
72 # @ECLASS-VARIABLE: EXAMPLES
73 # @DEFAULT_UNSET
74 # @DESCRIPTION:
75 # The set of example files to be installed if the 'examples' USE flag
76 # is set.
77
78 case "${EAPI:-0}" in
79 0|1|2|3|4)
80 die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
81 ;;
82 5)
83 ;;
84 *)
85 die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
86 ;;
87 esac
88
89 inherit eutils gnome2 python-r1
90
91 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
92
93 HOMEPAGE="http://pygtk.org/"
94
95 RESTRICT="${RESTRICT} test"
96
97 DOCS="AUTHORS ChangeLog NEWS README"
98
99 if [[ ${GNOME_ORG_MODULE} != "gnome-python" ]]; then
100 DOCS="${DOCS} MAINTAINERS"
101 fi
102
103 RDEPEND="~dev-python/${GNOME_ORG_MODULE}-base-${PV}
104 ${PYTHON_DEPS}"
105 DEPEND="${RDEPEND}
106 virtual/pkgconfig"
107
108 REQUIRED_USE=${PYTHON_REQUIRED_SUE}
109
110 gnome-python-common-r1_src_prepare() {
111 gnome2_src_prepare
112
113 # The .pc file is installed by respective gnome-python*-base package
114 sed -i '/^pkgconfig_DATA/d' Makefile.in || die "sed failed"
115 sed -i '/^pkgconfigdir/d' Makefile.in || die "sed failed"
116 #
117 # python_copy_sources
118 }
119
120 gnome-python-common-r1_src_configure() {
121 local myconf=(
122 --disable-allbindings
123 "${G_PY_BINDINGS[@]/#/--enable-}"
124 )
125
126 ECONF_SOURCE=${S} \
127 python_parallel_foreach_impl \
128 gnome2_src_configure "${myconf[@]}" "${@}"
129 }
130
131 gnome-python-common-r1_src_compile() {
132 python_foreach_impl default
133 }
134
135 gnome-python-common-r1_src_test() {
136 python_foreach_impl default
137 }
138
139 # Do a regular gnome2 src_install and then install examples if required.
140 # Set the variable EXAMPLES to provide the set of examples to be installed.
141 # (to install a directory recursively, specify it with a trailing '/' - for
142 # example, foo/bar/)
143 gnome-python-common-r1_src_install() {
144 python_foreach_impl gnome2_src_install
145
146 if in_iuse examples && use examples; then
147 docinto examples
148 dodoc -r "${EXAMPLES[@]}"
149 fi
150 }