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.3.1_p100628.ebuild ChangeLog
Date: Mon, 28 Jun 2010 06:27:33
Message-Id: 20100628062728.177D82CFA5@corvid.gentoo.org
1 jlec 10/06/28 06:27:27
2
3 Modified: ChangeLog
4 Added: ccpn-2.1.3.1_p100628.ebuild
5 Log:
6 Version Bump
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.30 sci-chemistry/ccpn/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.30&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.30&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?r1=1.29&r2=1.30
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v
19 retrieving revision 1.29
20 retrieving revision 1.30
21 diff -u -r1.29 -r1.30
22 --- ChangeLog 7 Jun 2010 06:52:32 -0000 1.29
23 +++ ChangeLog 28 Jun 2010 06:27:26 -0000 1.30
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.29 2010/06/07 06:52:32 jlec Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.30 2010/06/28 06:27:26 jlec Exp $
29 +
30 +*ccpn-2.1.3.1_p100628 (28 Jun 2010)
31 +
32 + 28 Jun 2010; Justin Lecher <jlec@g.o> +ccpn-2.1.3.1_p100628.ebuild:
33 + Version Bump
34
35 *ccpn-2.1.3.1_p100607 (07 Jun 2010)
36
37
38
39
40 1.1 sci-chemistry/ccpn/ccpn-2.1.3.1_p100628.ebuild
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.3.1_p100628.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.3.1_p100628.ebuild?rev=1.1&content-type=text/plain
44
45 Index: ccpn-2.1.3.1_p100628.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_p100628.ebuild,v 1.1 2010/06/28 06:27:26 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 x11-libs/libXext
77 x11-libs/libX11
78 opengl? ( virtual/glut )"
79 DEPEND="${RDEPEND}"
80 RESTRICT_PYTHON_ABIS="2.4 3.*"
81
82 RESTRICT="mirror"
83 S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2 ${PV})
84
85 src_prepare() {
86 [[ -n ${PATCHSET} ]] && \
87 epatch "${WORKDIR}"/ccpn-update-${PATCHSET}.patch
88
89 epatch "${FILESDIR}"/${MY_PV}-parallel.patch
90 epatch "${FILESDIR}"/${MY_PV}-dynamics.patch
91
92 local tk_ver
93 local myconf
94
95 tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
96
97 if use opengl; then
98 GLUT_NEED_INIT="-DNEED_GLUT_INIT"
99 IGNORE_GL_FLAG=""
100 GL_FLAG="-DUSE_GL_FALSE"
101 GL_DIR="${EPREFIX}/usr"
102 GL_LIB="-lglut -lGLU -lGL"
103 GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
104 GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
105
106 else
107 IGNORE_GL_FLAG="-DIGNORE_GL"
108 GL_FLAG="-DUSE_GL_FALSE"
109 fi
110
111 GLUT_NOT_IN_GL=""
112 GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
113
114 python_copy_sources
115
116 preparation() {
117 sed \
118 -e "s:/usr:${EPREFIX}/usr:g" \
119 -e "s:^\(CC =\).*:\1 $(tc-getCC):g" \
120 -e "s:^\(OPT_FLAG =\).*:\1 ${CFLAGS}:g" \
121 -e "s:^\(LINK_FLAGS =.*\):\1 ${LDFLAGS}:g" \
122 -e "s:^\(IGNORE_GL_FLAG =\).*:\1 ${IGNORE_GL_FLAG}:g" \
123 -e "s:^\(GL_FLAG =\).*:\1 ${GL_FLAG}:g" \
124 -e "s:^\(GL_DIR =\).*:\1 ${GL_DIR}:g" \
125 -e "s:^\(GL_LIB =\).*:\1 ${GL_LIB}:g" \
126 -e "s:^\(GL_LIB_FLAGS =\).*:\1 ${GL_LIB_FLAGS}:g" \
127 -e "s:^\(GL_INCLUDE_FLAGS =\).*:\1 ${GL_INCLUDE_FLAGS}:g" \
128 -e "s:^\(GLUT_NEED_INIT =\).*:\1 ${GLUT_NEED_INIT}:g" \
129 -e "s:^\(GLUT_NOT_IN_GL =\).*:\1:g" \
130 -e "s:^\(X11_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
131 -e "s:^\(TCL_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
132 -e "s:^\(TK_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
133 -e "s:^\(PYTHON_INCLUDE_FLAGS =\).*:\1 -I\$(PYTHON_DIR)/include/python$(python_get_version):g" \
134 -e "s:^\(PYTHON_LIB =\).*:\1 -lpython$(python_get_version):g" \
135 c/environment_default.txt > c/environment.txt
136 }
137 python_execute_function -s preparation
138 }
139
140 src_compile() {
141 building() {
142 emake -C c all links
143 }
144 python_execute_function -s building
145 }
146
147 src_install() {
148 local libdir
149 local tkver
150
151 libdir=$(get_libdir)
152 tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
153
154 for wrapper in analysis dangle dataShifter eci formatConverter pipe2azara; do
155 sed -e "s:gentoo_sitedir:${EPREFIX}/$(python_get_sitedir -f):g" \
156 -e "s:gentoolibdir:${EPREFIX}/usr/${libdir}:g" \
157 -e "s:gentootk:${EPREFIX}/usr/${libdir}/tk${tkver}:g" \
158 -e "s:gentootcl:${EPREFIX}/usr/${libdir}/tclk${tkver}:g" \
159 -e "s:gentoopython:${EPREFIX}/usr/bin/python:g" \
160 "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
161 dobin "${T}"/${wrapper} || die "Failed to install ${wrapper}"
162 done
163
164 installation() {
165 local in_path
166 local files
167
168 in_path=$(python_get_sitedir)/${PN}
169
170 for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
171 sed \
172 -e 's:#from __future__:from __future__:g' \
173 -i ${i}
174 done
175
176 insinto ${in_path}
177
178 dodir ${in_path}/c
179
180 ebegin "Installing main files"
181 doins -r data model python || die "main files installation failed"
182 eend
183
184 dohtml -r doc/* || die
185 dosym ../../../../share/doc/${PF}/html ${in_path}/doc || die
186
187 einfo "Adjusting permissions"
188
189 files="ccpnmr/c/ContourFile.so
190 ccpnmr/c/ContourLevels.so
191 ccpnmr/c/ContourStyle.so
192 ccpnmr/c/PeakList.so
193 ccpnmr/c/SliceFile.so
194 ccpnmr/c/WinPeakList.so
195 ccpnmr/c/AtomCoordList.so
196 ccpnmr/c/AtomCoord.so
197 ccpnmr/c/Bacus.so
198 ccpnmr/c/CloudUtil.so
199 ccpnmr/c/DistConstraintList.so
200 ccpnmr/c/DistConstraint.so
201 ccpnmr/c/DistForce.so
202 ccpnmr/c/Dynamics.so
203 ccpnmr/c/Midge.so
204 ccp/c/StructAtom.so
205 ccp/c/StructBond.so
206 ccp/c/StructStructure.so
207 ccp/c/StructUtil.so
208 memops/c/BlockFile.so
209 memops/c/FitMethod.so
210 memops/c/GlHandler.so
211 memops/c/MemCache.so
212 memops/c/PdfHandler.so
213 memops/c/PsHandler.so
214 memops/c/ShapeFile.so
215 memops/c/StoreFile.so
216 memops/c/StoreHandler.so
217 memops/c/TkHandler.so"
218
219 for FILE in ${files}; do
220 fperms 755 ${in_path}/python/${FILE}
221 done
222 }
223 python_execute_function -s installation
224 }
225
226 pkg_postinst() {
227 python_mod_optimize ${PN}
228 }
229
230 pkg_postrm() {
231 python_mod_cleanup ${PN}
232 }