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