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