1 |
commit: b61bef4418f124efdf37752805951f79b6572a7a |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 29 15:14:36 2013 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 29 15:14:36 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b61bef44 |
7 |
|
8 |
sci-chemistry/pymol: Bump python eclass |
9 |
|
10 |
Package-Manager: portage-2.2.0_alpha161 |
11 |
|
12 |
--- |
13 |
sci-chemistry/pymol/ChangeLog | 5 ++- |
14 |
sci-chemistry/pymol/metadata.xml | 20 ++++++------ |
15 |
sci-chemistry/pymol/pymol-9999.ebuild | 57 ++++++++++++++++----------------- |
16 |
3 files changed, 42 insertions(+), 40 deletions(-) |
17 |
|
18 |
diff --git a/sci-chemistry/pymol/ChangeLog b/sci-chemistry/pymol/ChangeLog |
19 |
index 83d97e1..c88876a 100644 |
20 |
--- a/sci-chemistry/pymol/ChangeLog |
21 |
+++ b/sci-chemistry/pymol/ChangeLog |
22 |
@@ -1,7 +1,10 @@ |
23 |
# ChangeLog for sci-chemistry/pymol |
24 |
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
25 |
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
26 |
# $Header: $ |
27 |
|
28 |
+ 29 Jan 2013; Justin Lecher <jlec@g.o> pymol-9999.ebuild, metadata.xml: |
29 |
+ Bump python eclass |
30 |
+ |
31 |
15 Oct 2012; Justin Lecher <jlec@g.o> pymol-9999.ebuild: |
32 |
Add mime type definition |
33 |
|
34 |
|
35 |
diff --git a/sci-chemistry/pymol/metadata.xml b/sci-chemistry/pymol/metadata.xml |
36 |
index 1a70ddc..8ada2f2 100644 |
37 |
--- a/sci-chemistry/pymol/metadata.xml |
38 |
+++ b/sci-chemistry/pymol/metadata.xml |
39 |
@@ -1,13 +1,13 @@ |
40 |
<?xml version="1.0" encoding="UTF-8"?> |
41 |
<pkgmetadata> |
42 |
- <herd>sci-chemistry</herd> |
43 |
- <maintainer> |
44 |
- <email>jlec@g.o</email> |
45 |
- </maintainer> |
46 |
- <use> |
47 |
- <flag name="apbs">Pymol supprt for sci-chemistry/apbs</flag> |
48 |
- <flag name="numpy">Enable numpy support for Pymol</flag> |
49 |
- <flag name="vmd">Builds molfile plugin support</flag> |
50 |
- <flag name="web">Install Pymodule needed for web app support</flag> |
51 |
- </use> |
52 |
+ <herd>sci-chemistry</herd> |
53 |
+ <maintainer> |
54 |
+ <email>jlec@g.o</email> |
55 |
+ </maintainer> |
56 |
+ <use> |
57 |
+ <flag name="apbs">Pymol supprt for sci-chemistry/apbs</flag> |
58 |
+ <flag name="numpy">Enable numpy support for Pymol</flag> |
59 |
+ <flag name="vmd">Builds molfile plugin support</flag> |
60 |
+ <flag name="web">Install Pymodule needed for web app support</flag> |
61 |
+ </use> |
62 |
</pkgmetadata> |
63 |
|
64 |
diff --git a/sci-chemistry/pymol/pymol-9999.ebuild b/sci-chemistry/pymol/pymol-9999.ebuild |
65 |
index 932aa80..5cddebf 100644 |
66 |
--- a/sci-chemistry/pymol/pymol-9999.ebuild |
67 |
+++ b/sci-chemistry/pymol/pymol-9999.ebuild |
68 |
@@ -1,16 +1,13 @@ |
69 |
-# Copyright 1999-2012 Gentoo Foundation |
70 |
+# Copyright 1999-2013 Gentoo Foundation |
71 |
# Distributed under the terms of the GNU General Public License v2 |
72 |
# $Header: $ |
73 |
|
74 |
-EAPI=4 |
75 |
+EAPI=5 |
76 |
|
77 |
-PYTHON_DEPEND="2:2.7" |
78 |
-SUPPORT_PYTHON_ABIS="1" |
79 |
-RESTRICT_PYTHON_ABIS="2.4 2.5 2.6 3.* *-jython 2.7-pypy-*" |
80 |
-PYTHON_USE_WITH="tk" |
81 |
-PYTHON_MODNAME="${PN} chempy pmg_tk pmg_wx" |
82 |
+PYTHON_COMPAT=( python2_7 ) |
83 |
+PYTHON_REQ_USE="tk" |
84 |
|
85 |
-inherit distutils eutils fdo-mime prefix subversion versionator |
86 |
+inherit distutils-r1 fdo-mime prefix subversion versionator |
87 |
|
88 |
DESCRIPTION="A Python-extensible molecular graphics system." |
89 |
HOMEPAGE="http://pymol.sourceforge.net/" |
90 |
@@ -24,7 +21,7 @@ IUSE="apbs numpy vmd web" |
91 |
|
92 |
DEPEND=" |
93 |
dev-python/numpy |
94 |
- dev-python/pmw |
95 |
+ dev-python/pmw[${PYTHON_USEDEP}] |
96 |
media-libs/freetype:2 |
97 |
media-libs/glew |
98 |
media-libs/libpng |
99 |
@@ -45,18 +42,16 @@ src_unpack() { |
100 |
subversion_src_unpack |
101 |
} |
102 |
|
103 |
-src_prepare() { |
104 |
- epatch \ |
105 |
- "${FILESDIR}"/${P}-setup.py.patch \ |
106 |
- "${FILESDIR}"/${P}-data-path.patch \ |
107 |
+python_prepare_all() { |
108 |
+ local PATCHES=( |
109 |
+ "${FILESDIR}"/${P}-setup.py.patch |
110 |
+ "${FILESDIR}"/${P}-data-path.patch |
111 |
"${FILESDIR}"/${P}-flags.patch |
112 |
+ "${FILESDIR}"/${P}-prefix.patch |
113 |
+ ) |
114 |
|
115 |
- use web || epatch "${FILESDIR}"/${P}-web.patch |
116 |
- |
117 |
- epatch "${FILESDIR}"/${P}-prefix.patch && \ |
118 |
- eprefixify setup.py |
119 |
- |
120 |
- use vmd && epatch "${FILESDIR}"/${P}-vmd.patch |
121 |
+ use web || PATCHES+=( "${FILESDIR}"/${P}-web.patch ) |
122 |
+ use vmd && PATCHES+=( "${FILESDIR}"/${P}-vmd.patch ) |
123 |
|
124 |
if use numpy; then |
125 |
sed \ |
126 |
@@ -66,29 +61,33 @@ src_prepare() { |
127 |
|
128 |
rm ./modules/pmg_tk/startup/apbs_tools.py || die |
129 |
|
130 |
- echo "site_packages = \'$(python_get_sitedir -f)\'" > setup3.py || die |
131 |
+ python_export python2_7 EPYTHON PYTHON_SITEDIR |
132 |
+ echo "site_packages = \'$(python_get_sitedir)\'" > setup3.py || die |
133 |
|
134 |
sed \ |
135 |
-e "s:/opt/local:${EPREFIX}/usr:g" \ |
136 |
-e '/ext_comp_args/s:\[.*\]:[]:g' \ |
137 |
-i setup.py || die |
138 |
|
139 |
- # python 3.* fix |
140 |
- # sed '452,465d' -i setup.py |
141 |
- distutils_src_prepare |
142 |
+ distutils-r1_python_prepare_all |
143 |
+ |
144 |
+ eprefixify setup.py |
145 |
} |
146 |
|
147 |
-src_configure() { |
148 |
- : |
149 |
+src_prepare() { |
150 |
+ subversion_src_prepare |
151 |
+ distutils-r1_src_prepare |
152 |
} |
153 |
|
154 |
-src_install() { |
155 |
- distutils_src_install |
156 |
+python_install_all() { |
157 |
+ distutils-r1_python_install_all |
158 |
+ |
159 |
+ python_export python2_7 EPYTHON |
160 |
|
161 |
# These environment variables should not go in the wrapper script, or else |
162 |
# it will be impossible to use the PyMOL libraries from Python. |
163 |
cat >> "${T}"/20pymol <<- EOF |
164 |
- PYMOL_PATH="${EPREFIX}/$(python_get_sitedir -f)/${PN}" |
165 |
+ PYMOL_PATH="${EPREFIX}/$(python_get_sitedir)/${PN}" |
166 |
PYMOL_DATA="${EPREFIX}/usr/share/pymol/data" |
167 |
PYMOL_SCRIPTS="${EPREFIX}/usr/share/pymol/scripts" |
168 |
EOF |
169 |
@@ -97,7 +96,7 @@ src_install() { |
170 |
|
171 |
cat >> "${T}"/pymol <<- EOF |
172 |
#!/bin/sh |
173 |
- $(PYTHON -f) -O \${PYMOL_PATH}/__init__.py -q \$* |
174 |
+ ${EPYTHON} -O \${PYMOL_PATH}/__init__.py -q \$* |
175 |
EOF |
176 |
|
177 |
dobin "${T}"/pymol |