1 |
jlec 14/03/25 17:37:40 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ccpn-2.3.1_p140325.ebuild |
5 |
Log: |
6 |
sci-chemistry/ccpn: Todays python patches |
7 |
|
8 |
(Portage version: 2.2.9-r1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.135 sci-chemistry/ccpn/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.135&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.135&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?r1=1.134&r2=1.135 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v |
20 |
retrieving revision 1.134 |
21 |
retrieving revision 1.135 |
22 |
diff -u -r1.134 -r1.135 |
23 |
--- ChangeLog 10 Mar 2014 06:51:57 -0000 1.134 |
24 |
+++ ChangeLog 25 Mar 2014 17:37:39 -0000 1.135 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for sci-chemistry/ccpn |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.134 2014/03/10 06:51:57 jlec Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.135 2014/03/25 17:37:39 jlec Exp $ |
30 |
+ |
31 |
+*ccpn-2.3.1_p140325 (25 Mar 2014) |
32 |
+ |
33 |
+ 25 Mar 2014; Justin Lecher <jlec@g.o> +ccpn-2.3.1_p140325.ebuild: |
34 |
+ Todays python patches |
35 |
|
36 |
*ccpn-2.3.1_p140310 (10 Mar 2014) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 sci-chemistry/ccpn/ccpn-2.3.1_p140325.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.3.1_p140325.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.3.1_p140325.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: ccpn-2.3.1_p140325.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2014 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ccpn-2.3.1_p140325.ebuild,v 1.1 2014/03/25 17:37:39 jlec Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
|
54 |
PYTHON_COMPAT=( python{2_6,2_7} ) |
55 |
PYTHON_REQ_USE="ssl,tk" |
56 |
|
57 |
inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator |
58 |
|
59 |
PATCHSET="${PV##*_p}" |
60 |
MY_PN="${PN}mr" |
61 |
MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})" |
62 |
MY_MAJOR="$(get_version_component_range 1-3)" |
63 |
|
64 |
DESCRIPTION="The Collaborative Computing Project for NMR" |
65 |
HOMEPAGE="http://www.ccpn.ac.uk/ccpn" |
66 |
SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}r2.tar.gz" |
67 |
[[ -n ${PATCHSET} ]] \ |
68 |
&& SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz" |
69 |
|
70 |
SLOT="0" |
71 |
LICENSE="|| ( CCPN LGPL-2.1 )" |
72 |
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
73 |
IUSE="+opengl" |
74 |
|
75 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
76 |
|
77 |
RDEPEND=" |
78 |
${PYTHON_DEPS} |
79 |
dev-lang/tk[threads] |
80 |
dev-python/numpy[${PYTHON_USEDEP}] |
81 |
dev-tcltk/tix |
82 |
=sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}] |
83 |
sci-biology/psipred |
84 |
x11-libs/libXext |
85 |
x11-libs/libX11 |
86 |
opengl? ( |
87 |
media-libs/freeglut |
88 |
dev-python/pyglet[${PYTHON_USEDEP}] )" |
89 |
DEPEND="${RDEPEND}" |
90 |
|
91 |
RESTRICT="mirror" |
92 |
|
93 |
S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2) |
94 |
|
95 |
src_prepare() { |
96 |
[[ -n ${PATCHSET} ]] && \ |
97 |
EPATCH_OPTS="-p2" epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch |
98 |
|
99 |
epatch "${FILESDIR}"/${MY_PV}-parallel.patch |
100 |
|
101 |
append-lfs-flags |
102 |
|
103 |
sed \ |
104 |
-e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \ |
105 |
-e "s:weights_s:weights:g" \ |
106 |
-i python/ccpnmr/analysis/wrappers/Psipred.py || die |
107 |
|
108 |
local tk_ver |
109 |
local myconf |
110 |
|
111 |
tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)" |
112 |
|
113 |
if use opengl; then |
114 |
GLUT_NEED_INIT="-DNEED_GLUT_INIT" |
115 |
IGNORE_GL_FLAG="" |
116 |
GL_FLAG="-DUSE_GL_TRUE" |
117 |
GL_DIR="${EPREFIX}/usr" |
118 |
GL_LIB="-lglut -lGLU -lGL" |
119 |
GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include" |
120 |
GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)" |
121 |
|
122 |
else |
123 |
IGNORE_GL_FLAG="-DIGNORE_GL" |
124 |
GL_FLAG="-DUSE_GL_FALSE" |
125 |
fi |
126 |
|
127 |
GLUT_NOT_IN_GL="" |
128 |
GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)" |
129 |
|
130 |
rm -rf data model doc license || die |
131 |
|
132 |
sed \ |
133 |
-e "s|/usr|${EPREFIX}/usr|g" \ |
134 |
-e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \ |
135 |
-e "s|^\(OPT_FLAG =\).*|\1 ${CPPFLAGS} ${CFLAGS}|g" \ |
136 |
-e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \ |
137 |
-e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \ |
138 |
-e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \ |
139 |
-e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \ |
140 |
-e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \ |
141 |
-e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \ |
142 |
-e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \ |
143 |
-e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \ |
144 |
-e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \ |
145 |
-e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \ |
146 |
-e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \ |
147 |
-e "s|^\(TK_LIB =\).*|\1 -ltk|g" \ |
148 |
-e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \ |
149 |
-e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I$(python_get_includedir)|g" \ |
150 |
-e "s|^\(PYTHON_LIB =\).*|\1 -l${EPYTHON}|g" \ |
151 |
c/environment_default.txt > c/environment.txt || die |
152 |
|
153 |
sed \ |
154 |
-e 's:ln -s:cp -f:g' \ |
155 |
-i $(find python -name linkSharedObjs) || die |
156 |
} |
157 |
|
158 |
src_compile() { |
159 |
emake -C c all |
160 |
emake -C c links |
161 |
} |
162 |
|
163 |
src_install() { |
164 |
local libdir |
165 |
local tkver |
166 |
local _wrapper |
167 |
|
168 |
find . -name "*.pyc" -type f -delete || die |
169 |
|
170 |
libdir=$(get_libdir) |
171 |
tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2) |
172 |
|
173 |
_wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara extendNmr" |
174 |
for wrapper in ${_wrapper}; do |
175 |
sed \ |
176 |
-e "s|gentoo_sitedir|$(python_get_sitedir)|g" \ |
177 |
-e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \ |
178 |
-e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \ |
179 |
-e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \ |
180 |
-e "s|gentoopython|${EPYTHON}|g" \ |
181 |
-e "s|gentoousr|${EPREFIX}/usr|g" \ |
182 |
-e "s|//|/|g" \ |
183 |
"${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}" |
184 |
dobin "${T}"/${wrapper} |
185 |
done |
186 |
|
187 |
local in_path=$(python_get_sitedir)/${PN} |
188 |
local files |
189 |
local pydocs |
190 |
|
191 |
pydocs="$(find python -name doc -type d)" |
192 |
rm -rf ${pydocs} || die |
193 |
|
194 |
for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do |
195 |
sed \ |
196 |
-e 's|#from __future__|from __future__|g' \ |
197 |
-i ${i} || die |
198 |
done |
199 |
|
200 |
dodir ${in_path#${EPREFIX}}/c |
201 |
|
202 |
ebegin "Installing main files" |
203 |
python_moduleinto ${PN} |
204 |
python_domodule python |
205 |
eend |
206 |
|
207 |
ebegin "Adjusting permissions" |
208 |
for _file in $(find "${ED}" -type f -name "*so"); do |
209 |
chmod 755 ${_file} |
210 |
done |
211 |
eend |
212 |
python_optimize |
213 |
} |