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