Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/ccpn: ChangeLog ccpn-2.1.5_p110202.ebuild ccpn-2.1.5_p110125.ebuild ccpn-2.1.5_p110113.ebuild ccpn-2.1.5_p110105.ebuild
Date: Wed, 02 Feb 2011 17:18:14
Message-Id: 20110202171802.E5C3E20054@flycatcher.gentoo.org
1 jlec 11/02/02 17:18:02
2
3 Modified: ChangeLog
4 Added: ccpn-2.1.5_p110202.ebuild
5 Removed: ccpn-2.1.5_p110125.ebuild ccpn-2.1.5_p110113.ebuild
6 ccpn-2.1.5_p110105.ebuild
7 Log:
8 Pyhton Bump, Fixes for new X server and nvidia drivers
9
10 (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
11
12 Revision Changes Path
13 1.53 sci-chemistry/ccpn/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.53&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.53&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?r1=1.52&r2=1.53
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v
22 retrieving revision 1.52
23 retrieving revision 1.53
24 diff -u -r1.52 -r1.53
25 --- ChangeLog 25 Jan 2011 14:16:36 -0000 1.52
26 +++ ChangeLog 2 Feb 2011 17:18:02 -0000 1.53
27 @@ -1,6 +1,13 @@
28 # ChangeLog for sci-chemistry/ccpn
29 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.52 2011/01/25 14:16:36 jlec Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.53 2011/02/02 17:18:02 jlec Exp $
32 +
33 +*ccpn-2.1.5_p110202 (02 Feb 2011)
34 +
35 + 02 Feb 2011; Justin Lecher <jlec@g.o> -ccpn-2.1.5_p110105.ebuild,
36 + -ccpn-2.1.5_p110113.ebuild, -ccpn-2.1.5_p110125.ebuild,
37 + +ccpn-2.1.5_p110202.ebuild:
38 + Pyhton Bump, Fixes for new X server and nvidia drivers
39
40 *ccpn-2.1.5_p110125 (25 Jan 2011)
41
42
43
44
45 1.1 sci-chemistry/ccpn/ccpn-2.1.5_p110202.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.5_p110202.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.5_p110202.ebuild?rev=1.1&content-type=text/plain
49
50 Index: ccpn-2.1.5_p110202.ebuild
51 ===================================================================
52 # Copyright 1999-2011 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.5_p110202.ebuild,v 1.1 2011/02/02 17:18:02 jlec Exp $
55
56 EAPI="3"
57
58 PYTHON_DEPEND="2:2.5"
59 PYTHON_USE_WITH="ssl tk"
60
61 inherit eutils portability python toolchain-funcs versionator
62
63 PATCHSET="${PV##*_p}"
64 MY_PN="${PN}mr"
65 MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
66 MY_MAJOR="$(get_version_component_range 1-3)"
67
68 DESCRIPTION="The Collaborative Computing Project for NMR"
69 SRC_URI="http://www.bio.cam.ac.uk/ccpn/download/${MY_PN}/analysis${MY_PV}.tar.gz"
70 [[ -n ${PATCHSET} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${PATCHSET}.patch.bz2"
71 HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
72
73 SLOT="0"
74 LICENSE="|| ( CCPN LGPL-2.1 )"
75 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
76 IUSE="extendnmr +opengl"
77
78 RDEPEND="
79 dev-lang/tk[threads]
80 >=dev-python/numpy-1.4
81 >=dev-tcltk/tix-8.4.3
82 =sci-libs/ccpn-data-"${MY_MAJOR}"*
83 x11-libs/libXext
84 x11-libs/libX11
85 opengl? (
86 media-libs/freeglut
87 dev-python/pyglet )"
88 # We need to fix this
89 # sci-chemistry/mdd
90 DEPEND="${RDEPEND}"
91 PDEPEND="
92 extendnmr? (
93 sci-chemistry/aria
94 sci-chemistry/prodecomp )"
95
96 RESTRICT="mirror"
97
98 S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2 ${PV})
99
100 pkg_setup() {
101 python_set_active_version 2
102 }
103
104 src_prepare() {
105 [[ -n ${PATCHSET} ]] && \
106 epatch "${WORKDIR}"/ccpn-update-${PATCHSET}.patch
107
108 epatch "${FILESDIR}"/${MY_PV}-parallel.patch
109
110 local tk_ver
111 local myconf
112
113 tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
114
115 if use opengl; then
116 GLUT_NEED_INIT="-DNEED_GLUT_INIT"
117 IGNORE_GL_FLAG=""
118 GL_FLAG="-DUSE_GL_TRUE"
119 GL_DIR="${EPREFIX}/usr"
120 GL_LIB="-lglut -lGLU -lGL"
121 GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
122 GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
123
124 else
125 IGNORE_GL_FLAG="-DIGNORE_GL"
126 GL_FLAG="-DUSE_GL_FALSE"
127 fi
128
129 GLUT_NOT_IN_GL=""
130 GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
131
132 rm -rf data model doc license || die
133
134 sed \
135 -e "s:/usr:${EPREFIX}/usr:g" \
136 -e "s:^\(CC =\).*:\1 $(tc-getCC):g" \
137 -e "s:^\(OPT_FLAG =\).*:\1 ${CFLAGS}:g" \
138 -e "s:^\(LINK_FLAGS =.*\):\1 ${LDFLAGS}:g" \
139 -e "s:^\(IGNORE_GL_FLAG =\).*:\1 ${IGNORE_GL_FLAG}:g" \
140 -e "s:^\(GL_FLAG =\).*:\1 ${GL_FLAG}:g" \
141 -e "s:^\(GL_DIR =\).*:\1 ${GL_DIR}:g" \
142 -e "s:^\(GL_LIB =\).*:\1 ${GL_LIB}:g" \
143 -e "s:^\(GL_LIB_FLAGS =\).*:\1 ${GL_LIB_FLAGS}:g" \
144 -e "s:^\(GL_INCLUDE_FLAGS =\).*:\1 ${GL_INCLUDE_FLAGS}:g" \
145 -e "s:^\(GLUT_NEED_INIT =\).*:\1 ${GLUT_NEED_INIT}:g" \
146 -e "s:^\(GLUT_NOT_IN_GL =\).*:\1:g" \
147 -e "s:^\(X11_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
148 -e "s:^\(TCL_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
149 -e "s:^\(TK_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
150 -e "s:^\(PYTHON_INCLUDE_FLAGS =\).*:\1 -I${EPREFIX}/$(python_get_includedir):g" \
151 -e "s:^\(PYTHON_LIB =\).*:\1 $(python_get_library -l):g" \
152 c/environment_default.txt > c/environment.txt
153 }
154
155 src_compile() {
156 emake -C c all links || die
157 }
158
159 src_install() {
160 local libdir
161 local tkver
162 local _wrapper
163
164 find . -name "*.pyc" -type d -delete
165
166 libdir=$(get_libdir)
167 tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
168
169 _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara"
170 use extendnmr && _wrapper="${_wrapper} extendNmr"
171 for wrapper in ${_wrapper}; do
172 sed \
173 -e "s:gentoo_sitedir:${EPREFIX}$(python_get_sitedir):g" \
174 -e "s:gentoolibdir:${EPREFIX}/usr/${libdir}:g" \
175 -e "s:gentootk:${EPREFIX}/usr/${libdir}/tk${tkver}:g" \
176 -e "s:gentootcl:${EPREFIX}/usr/${libdir}/tclk${tkver}:g" \
177 -e "s:gentoopython:${EPREFIX}/usr/bin/python:g" \
178 -e "s://:/:g" \
179 "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
180 dobin "${T}"/${wrapper} || die "Failed to install ${wrapper}"
181 done
182
183 local in_path
184 local files
185 local pydocs
186
187 pydocs="$(find python -name doc -type d)"
188 rm -rf ${pydocs} || die
189
190 in_path=$(python_get_sitedir)/${PN}
191
192 for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
193 sed \
194 -e 's:#from __future__:from __future__:g' \
195 -i ${i} || die
196 done
197
198 insinto ${in_path}
199
200 dodir ${in_path}/c
201
202 ebegin "Installing main files"
203 doins -r python || die "main files installation failed"
204 eend
205 dosym ../../../..//share/doc/ccpn-data-${MY_MAJOR}/html ${in_path}/doc || die
206 for i in ${pydocs}; do
207 dosym /usr/share/doc/ccpn-data-${MY_MAJOR}/html/${i} ${in_path}/${i}
208 done
209
210 dosym /usr/share/ccpn/data ${in_path}/data
211 dosym /usr/share/ccpn/model ${in_path}/model
212
213 einfo "Adjusting permissions"
214
215 files="
216 cambridge/c/BayesPeakSeparator.so
217 ccp/c/StructUtil.so
218 ccp/c/StructStructure.so
219 ccp/c/StructBond.so
220 ccp/c/StructAtom.so
221 ccpnmr/c/DyAtomCoord.so
222 ccpnmr/c/DyDistConstraint.so
223 ccpnmr/c/DyDistForce.so
224 ccpnmr/c/AtomCoordList.so
225 ccpnmr/c/DyAtomCoordList.so
226 ccpnmr/c/ContourStyle.so
227 ccpnmr/c/ContourLevels.so
228 ccpnmr/c/SliceFile.so
229 ccpnmr/c/PeakCluster.so
230 ccpnmr/c/Dynamics.so
231 ccpnmr/c/Bacus.so
232 ccpnmr/c/Midge.so
233 ccpnmr/c/DyDistConstraintList.so
234 ccpnmr/c/WinPeakList.so
235 ccpnmr/c/PeakList.so
236 ccpnmr/c/DistConstraint.so
237 ccpnmr/c/CloudUtil.so
238 ccpnmr/c/DistForce.so
239 ccpnmr/c/DistConstraintList.so
240 ccpnmr/c/AtomCoord.so
241 ccpnmr/c/DyDynamics.so
242 ccpnmr/c/ContourFile.so
243 memops/c/ShapeFile.so
244 memops/c/BlockFile.so
245 memops/c/PdfHandler.so
246 memops/c/MemCache.so
247 memops/c/FitMethod.so
248 memops/c/PsHandler.so
249 memops/c/GlHandler.so
250 memops/c/StoreFile.so
251 memops/c/StoreHandler.so
252 memops/c/TkHandler.so"
253 for FILE in ${files}; do
254 fperms 755 ${in_path}/python/${FILE}
255 done
256 }
257
258 pkg_postinst() {
259 python_mod_optimize ${PN}
260 }
261
262 pkg_postrm() {
263 python_mod_cleanup ${PN}
264 }