1 |
I have used the python-single-r1 eclass both for packages which build |
2 |
Python libraries and those who unly use them in build-time. This is |
3 |
necessary in order to ensure that the dependencies are properly |
4 |
versioned as well. |
5 |
|
6 |
This shows an important weakness of python-any-r1 design but I intend to |
7 |
fix it at some point. See https://bugs.gentoo.org/show_bug.cgi?id=453248 |
8 |
--- |
9 |
media-libs/mesa/mesa-9999.ebuild | 13 +++++++++---- |
10 |
x11-libs/libxcb/libxcb-9999.ebuild | 16 ++++++++++++---- |
11 |
x11-libs/xpyb/xpyb-9999.ebuild | 15 +++++++++++---- |
12 |
x11-proto/xcb-proto/xcb-proto-9999.ebuild | 22 +++++++--------------- |
13 |
4 files changed, 39 insertions(+), 27 deletions(-) |
14 |
|
15 |
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild |
16 |
index 6e79a23..4cb3488 100644 |
17 |
--- a/media-libs/mesa/mesa-9999.ebuild |
18 |
+++ b/media-libs/mesa/mesa-9999.ebuild |
19 |
@@ -2,7 +2,7 @@ |
20 |
# Distributed under the terms of the GNU General Public License v2 |
21 |
# $Header: $ |
22 |
|
23 |
-EAPI=4 |
24 |
+EAPI=5 |
25 |
|
26 |
EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
27 |
|
28 |
@@ -11,7 +11,10 @@ if [[ ${PV} = 9999* ]]; then |
29 |
EXPERIMENTAL="true" |
30 |
fi |
31 |
|
32 |
-inherit base autotools multilib flag-o-matic toolchain-funcs ${GIT_ECLASS} |
33 |
+PYTHON_COMPAT=( python{2_6,2_7} ) |
34 |
+ |
35 |
+inherit base autotools multilib flag-o-matic toolchain-funcs python-single-r1 \ |
36 |
+ ${GIT_ECLASS} |
37 |
|
38 |
OPENGL_DIR="xorg-x11" |
39 |
|
40 |
@@ -117,8 +120,7 @@ DEPEND="${RDEPEND} |
41 |
r600-llvm-compiler? ( >=sys-devel/llvm-3.1 ) |
42 |
video_cards_radeonsi? ( >=sys-devel/llvm-3.1 ) |
43 |
) |
44 |
- =dev-lang/python-2* |
45 |
- dev-libs/libxml2[python] |
46 |
+ dev-libs/libxml2[python,${PYTHON_USEDEP}] |
47 |
sys-devel/bison |
48 |
sys-devel/flex |
49 |
virtual/pkgconfig |
50 |
@@ -141,6 +143,8 @@ QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
51 |
pkg_setup() { |
52 |
# workaround toc-issue wrt #386545 |
53 |
use ppc64 && append-flags -mminimal-toc |
54 |
+ |
55 |
+ python-single-r1_pkg_setup |
56 |
} |
57 |
|
58 |
src_unpack() { |
59 |
@@ -263,6 +267,7 @@ src_configure() { |
60 |
$(use_enable xorg) \ |
61 |
--with-dri-drivers=${DRI_DRIVERS} \ |
62 |
--with-gallium-drivers=${GALLIUM_DRIVERS} \ |
63 |
+ PYTHON2="${PYTHON}" \ |
64 |
${myconf} |
65 |
} |
66 |
|
67 |
diff --git a/x11-libs/libxcb/libxcb-9999.ebuild b/x11-libs/libxcb/libxcb-9999.ebuild |
68 |
index dfe0a82..6f340cf 100644 |
69 |
--- a/x11-libs/libxcb/libxcb-9999.ebuild |
70 |
+++ b/x11-libs/libxcb/libxcb-9999.ebuild |
71 |
@@ -2,10 +2,13 @@ |
72 |
# Distributed under the terms of the GNU General Public License v2 |
73 |
# $Header: $ |
74 |
|
75 |
-EAPI=4 |
76 |
+EAPI=5 |
77 |
+ |
78 |
+PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2,3_3} ) |
79 |
+PYTHON_REQ_USE='xml' |
80 |
|
81 |
XORG_DOC=doc |
82 |
-inherit xorg-2 |
83 |
+inherit python-single-r1 xorg-2 |
84 |
|
85 |
DESCRIPTION="X C-language Bindings library" |
86 |
HOMEPAGE="http://xcb.freedesktop.org/" |
87 |
@@ -20,9 +23,14 @@ RDEPEND="dev-libs/libpthread-stubs |
88 |
x11-libs/libXau |
89 |
x11-libs/libXdmcp" |
90 |
DEPEND="${RDEPEND} |
91 |
- dev-lang/python[xml] |
92 |
dev-libs/libxslt |
93 |
- >=x11-proto/xcb-proto-1.7" |
94 |
+ >=x11-proto/xcb-proto-1.7[${PYTHON_USEDEP}] |
95 |
+ ${PYTHON_DEPS}" |
96 |
+ |
97 |
+pkg_setup() { |
98 |
+ python-single-r1_pkg_setup |
99 |
+ xorg-2_pkg_setup |
100 |
+} |
101 |
|
102 |
src_configure() { |
103 |
XORG_CONFIGURE_OPTIONS=( |
104 |
diff --git a/x11-libs/xpyb/xpyb-9999.ebuild b/x11-libs/xpyb/xpyb-9999.ebuild |
105 |
index 3dee03d..adf6635 100644 |
106 |
--- a/x11-libs/xpyb/xpyb-9999.ebuild |
107 |
+++ b/x11-libs/xpyb/xpyb-9999.ebuild |
108 |
@@ -2,8 +2,10 @@ |
109 |
# Distributed under the terms of the GNU General Public License v2 |
110 |
# $Header: $ |
111 |
|
112 |
-EAPI=4 |
113 |
-inherit xorg-2 |
114 |
+EAPI=5 |
115 |
+ |
116 |
+PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) |
117 |
+inherit python-single-r1 xorg-2 |
118 |
|
119 |
EGIT_REPO_URI="git://anongit.freedesktop.org/git/xcb/xpyb" |
120 |
#SRC_URI="http://xcb.freedesktop.org/dist/${P}.tar.bz2" |
121 |
@@ -14,12 +16,17 @@ KEYWORDS="~amd64 ~x86" |
122 |
IUSE="selinux" |
123 |
|
124 |
RDEPEND=">=x11-libs/libxcb-1.1 |
125 |
- >=dev-lang/python-2.5 |
126 |
- >=x11-proto/xcb-proto-1.2" |
127 |
+ >=x11-proto/xcb-proto-1.2[${PYTHON_USEDEP}] |
128 |
+ ${PYTHON_DEPS}" |
129 |
DEPEND="${RDEPEND}" |
130 |
|
131 |
DOCS=( NEWS README ) |
132 |
|
133 |
+pkg_setup() { |
134 |
+ python-single-r1_pkg_setup |
135 |
+ xorg-2_pkg_setup |
136 |
+} |
137 |
+ |
138 |
src_configure() { |
139 |
XORG_CONFIGURE_OPTIONS=( |
140 |
$(use_enable selinux xselinux) |
141 |
diff --git a/x11-proto/xcb-proto/xcb-proto-9999.ebuild b/x11-proto/xcb-proto/xcb-proto-9999.ebuild |
142 |
index 9fd53a0..cb7269f 100644 |
143 |
--- a/x11-proto/xcb-proto/xcb-proto-9999.ebuild |
144 |
+++ b/x11-proto/xcb-proto/xcb-proto-9999.ebuild |
145 |
@@ -2,10 +2,10 @@ |
146 |
# Distributed under the terms of the GNU General Public License v2 |
147 |
# $Header: $ |
148 |
|
149 |
-EAPI=4 |
150 |
-PYTHON_DEPEND="*" |
151 |
+EAPI=5 |
152 |
+PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} ) |
153 |
|
154 |
-inherit python xorg-2 |
155 |
+inherit python-single-r1 xorg-2 |
156 |
|
157 |
DESCRIPTION="X C-language Bindings protocol headers" |
158 |
HOMEPAGE="http://xcb.freedesktop.org/" |
159 |
@@ -16,19 +16,11 @@ EGIT_REPO_URI="git://anongit.freedesktop.org/git/xcb/proto" |
160 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
161 |
IUSE="" |
162 |
|
163 |
-RDEPEND="" |
164 |
+RDEPEND="${PYTHON_DEPS}" |
165 |
DEPEND="${RDEPEND} |
166 |
dev-libs/libxml2" |
167 |
|
168 |
-src_prepare() { |
169 |
- python_clean_py-compile_files |
170 |
- xorg-2_src_prepare |
171 |
-} |
172 |
- |
173 |
-pkg_postinst() { |
174 |
- python_mod_optimize xcbgen |
175 |
-} |
176 |
- |
177 |
-pkg_postrm() { |
178 |
- python_mod_cleanup xcbgen |
179 |
+pkg_setup() { |
180 |
+ python-single-r1_pkg_setup |
181 |
+ xorg-2_pkg_setup |
182 |
} |
183 |
-- |
184 |
1.8.1.1 |