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