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.3.1_p100330.ebuild
Date: Tue, 30 Mar 2010 10:00:52
Message-Id: E1NwYFe-0004uf-F6@stork.gentoo.org
1 jlec 10/03/30 10:00:50
2
3 Modified: ChangeLog
4 Added: ccpn-2.1.3.1_p100330.ebuild
5 Log:
6 Todays python patches
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.22 sci-chemistry/ccpn/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.22&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.22&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/ccpn/ChangeLog?r1=1.21&r2=1.22
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v
19 retrieving revision 1.21
20 retrieving revision 1.22
21 diff -u -r1.21 -r1.22
22 --- ChangeLog 27 Mar 2010 08:04:22 -0000 1.21
23 +++ ChangeLog 30 Mar 2010 10:00:50 -0000 1.22
24 @@ -1,6 +1,11 @@
25 # ChangeLog for sci-chemistry/ccpn
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.21 2010/03/27 08:04:22 jlec Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.22 2010/03/30 10:00:50 jlec Exp $
29 +
30 +*ccpn-2.1.3.1_p100330 (30 Mar 2010)
31 +
32 + 30 Mar 2010; Justin Lecher <jlec@g.o> +ccpn-2.1.3.1_p100330.ebuild:
33 + Todays python patches
34
35 *ccpn-2.1.3.1_p100327 (27 Mar 2010)
36
37
38
39
40 1.1 sci-chemistry/ccpn/ccpn-2.1.3.1_p100330.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.3.1_p100330.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.3.1_p100330.ebuild?rev=1.1&content-type=text/plain
44
45 Index: ccpn-2.1.3.1_p100330.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.3.1_p100330.ebuild,v 1.1 2010/03/30 10:00:50 jlec Exp $
50
51 EAPI="3"
52 PYTHON_DEPEND="2:2.5"
53 SUPPORT_PYTHON_ABIS="1"
54 PYTHON_USE_WITH="ssl tk"
55
56 inherit eutils portability python toolchain-funcs versionator
57
58 PATCHSET="${PV##*_p}"
59 MY_PN="${PN}mr"
60 MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
61
62 DESCRIPTION="The Collaborative Computing Project for NMR"
63 SRC_URI="http://www.bio.cam.ac.uk/ccpn/download/${MY_PN}/analysis${MY_PV}.tar.gz"
64 [[ -n ${PATCHSET} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${PATCHSET}.patch.bz2"
65 HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
66
67 SLOT="0"
68 LICENSE="|| ( CCPN LGPL-2.1 )"
69 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
70 IUSE="+opengl"
71
72 RDEPEND="
73 dev-lang/tk
74 dev-python/numpy
75 dev-tcltk/tix
76 opengl? ( virtual/glut )"
77 DEPEND="${RDEPEND}"
78 RESTRICT_PYTHON_ABIS="2.4 3.*"
79
80 RESTRICT="mirror"
81 S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2 ${PV})
82
83 src_prepare() {
84 [[ -n ${PATCHSET} ]] && \
85 epatch "${WORKDIR}"/ccpn-update-${PATCHSET}.patch
86
87 epatch "${FILESDIR}"/${MY_PV}-parallel.patch
88 epatch "${FILESDIR}"/${MY_PV}-dynamics.patch
89
90 local tk_ver
91 local myconf
92
93 tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
94
95 if use opengl; then
96 GLUT_NEED_INIT="-DNEED_GLUT_INIT"
97 IGNORE_GL_FLAG=""
98 GL_FLAG="-DUSE_GL_FALSE"
99 GL_DIR="${EPREFIX}/usr"
100 GL_LIB="-lglut -lGLU -lGL"
101 GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
102 GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
103
104 else
105 IGNORE_GL_FLAG="-DIGNORE_GL"
106 GL_FLAG="-DUSE_GL_FALSE"
107 fi
108
109 GLUT_NOT_IN_GL=""
110 GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
111
112 python_copy_sources
113
114 preparation() {
115 sed \
116 -e "s:/usr:${EPREFIX}/usr:g" \
117 -e "s:^\(CC =\).*:\1 $(tc-getCC):g" \
118 -e "s:^\(OPT_FLAG =\).*:\1 ${CFLAGS}:g" \
119 -e "s:^\(LINK_FLAGS =.*\):\1 ${LDFLAGS}:g" \
120 -e "s:^\(IGNORE_GL_FLAG =\).*:\1 ${IGNORE_GL_FLAG}:g" \
121 -e "s:^\(GL_FLAG =\).*:\1 ${GL_FLAG}:g" \
122 -e "s:^\(GLUT_NEED_INIT =\).*:\1 ${GLUT_NEED_INIT}:g" \
123 -e "s:^\(GLUT_NOT_IN_GL =\).*:\1:g" \
124 -e "s:^\(X11_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
125 -e "s:^\(TCL_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
126 -e "s:^\(TK_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
127 -e "s:^\(PYTHON_INCLUDE_FLAGS =\).*:\1 -I\$(PYTHON_DIR)/include/python$(python_get_version):g" \
128 -e "s:^\(PYTHON_LIB =\).*:\1 -lpython$(python_get_version):g" \
129 -e "s:^\(GL_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
130 c/environment_default.txt > c/environment.txt
131 }
132 python_execute_function -s preparation
133 }
134
135 src_compile() {
136 building() {
137 emake -C c all links
138 }
139 python_execute_function -s building
140 }
141
142 src_install() {
143 local libdir
144 local tkver
145
146 libdir=$(get_libdir)
147 tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
148
149 for wrapper in analysis dangle dataShifter eci formatConverter pipe2azara; do
150 sed -e "s:gentoo_sitedir:${EPREFIX}/$(python_get_sitedir -f):g" \
151 -e "s:gentoolibdir:${EPREFIX}/usr/${libdir}:g" \
152 -e "s:gentootk:${EPREFIX}/usr/${libdir}/tk${tkver}:g" \
153 -e "s:gentootcl:${EPREFIX}/usr/${libdir}/tclk${tkver}:g" \
154 -e "s:gentoopython:${EPREFIX}/usr/bin/python:g" \
155 "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
156 dobin "${T}"/${wrapper} || die "Failed to install ${wrapper}"
157 done
158
159 installation() {
160 local in_path
161 local files
162
163 in_path=$(python_get_sitedir)/${PN}
164
165 for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
166 sed \
167 -e 's:#from __future__:from __future__:g' \
168 -i ${i}
169 done
170
171 insinto ${in_path}
172
173 dodir ${in_path}/c
174
175 ebegin "Installing main files"
176 doins -r data model python || die "main files installation failed"
177 eend
178
179 dohtml -r doc/* || die
180 dosym ../../../../share/doc/${PF}/html ${in_path}/doc || die
181
182 einfo "Adjusting permissions"
183
184 files="ccpnmr/c/ContourFile.so
185 ccpnmr/c/ContourLevels.so
186 ccpnmr/c/ContourStyle.so
187 ccpnmr/c/PeakList.so
188 ccpnmr/c/SliceFile.so
189 ccpnmr/c/WinPeakList.so
190 ccpnmr/c/AtomCoordList.so
191 ccpnmr/c/AtomCoord.so
192 ccpnmr/c/Bacus.so
193 ccpnmr/c/CloudUtil.so
194 ccpnmr/c/DistConstraintList.so
195 ccpnmr/c/DistConstraint.so
196 ccpnmr/c/DistForce.so
197 ccpnmr/c/Dynamics.so
198 ccpnmr/c/Midge.so
199 ccp/c/StructAtom.so
200 ccp/c/StructBond.so
201 ccp/c/StructStructure.so
202 ccp/c/StructUtil.so
203 memops/c/BlockFile.so
204 memops/c/FitMethod.so
205 memops/c/GlHandler.so
206 memops/c/MemCache.so
207 memops/c/PdfHandler.so
208 memops/c/PsHandler.so
209 memops/c/ShapeFile.so
210 memops/c/StoreFile.so
211 memops/c/StoreHandler.so
212 memops/c/TkHandler.so"
213
214 for FILE in ${files}; do
215 fperms 755 ${in_path}/python/${FILE}
216 done
217 }
218 python_execute_function -s installation
219 }
220
221 pkg_postinst() {
222 python_mod_optimize ${PN}
223 }
224
225 pkg_postrm() {
226 python_mod_cleanup ${PN}
227 }