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.2.2_p120731.ebuild
Date: Tue, 31 Jul 2012 07:20:19
Message-Id: 20120731072005.989022004B@flycatcher.gentoo.org
1 jlec 12/07/31 07:20:05
2
3 Modified: ChangeLog
4 Added: ccpn-2.2.2_p120731.ebuild
5 Log:
6 sci-chemistry/ccpn: Latest python patches
7
8 (Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.88 sci-chemistry/ccpn/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.88&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.88&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?r1=1.87&r2=1.88
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v
20 retrieving revision 1.87
21 retrieving revision 1.88
22 diff -u -r1.87 -r1.88
23 --- ChangeLog 9 Jul 2012 08:03:33 -0000 1.87
24 +++ ChangeLog 31 Jul 2012 07:20:05 -0000 1.88
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-chemistry/ccpn
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.87 2012/07/09 08:03:33 jlec Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.88 2012/07/31 07:20:05 jlec Exp $
30 +
31 +*ccpn-2.2.2_p120731 (31 Jul 2012)
32 +
33 + 31 Jul 2012; Justin Lecher <jlec@g.o> +ccpn-2.2.2_p120731.ebuild:
34 + Latest python patches
35
36 *ccpn-2.2.2_p120709 (09 Jul 2012)
37
38
39
40
41 1.1 sci-chemistry/ccpn/ccpn-2.2.2_p120731.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.2.2_p120731.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.2.2_p120731.ebuild?rev=1.1&content-type=text/plain
45
46 Index: ccpn-2.2.2_p120731.ebuild
47 ===================================================================
48 # Copyright 1999-2012 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.2.2_p120731.ebuild,v 1.1 2012/07/31 07:20:05 jlec Exp $
51
52 EAPI=4
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-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}.tar.gz"
66 [[ -n ${PATCHSET} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
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
77 dev-tcltk/tix
78 =sci-libs/ccpn-data-"${MY_MAJOR}"*
79 sci-biology/psipred
80 x11-libs/libXext
81 x11-libs/libX11
82 opengl? (
83 media-libs/freeglut
84 dev-python/pyglet )"
85 # We need to fix this
86 # sci-chemistry/mdd
87 DEPEND="${RDEPEND}"
88 PDEPEND="
89 extendnmr? (
90 >=sci-chemistry/aria-2.3.2-r1
91 sci-chemistry/prodecomp )"
92
93 RESTRICT="mirror"
94
95 S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2 ${PV})
96
97 pkg_setup() {
98 python_set_active_version 2
99 python_pkg_setup
100 }
101
102 src_prepare() {
103 [[ -n ${PATCHSET} ]] && \
104 epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
105
106 epatch "${FILESDIR}"/${MY_PV}-parallel.patch
107
108 sed \
109 -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
110 -e "s:weights_s:weights:g" \
111 -i python/ccpnmr/analysis/wrappers/Psipred.py || die
112
113 local tk_ver
114 local myconf
115
116 tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
117
118 if use opengl; then
119 GLUT_NEED_INIT="-DNEED_GLUT_INIT"
120 IGNORE_GL_FLAG=""
121 GL_FLAG="-DUSE_GL_TRUE"
122 GL_DIR="${EPREFIX}/usr"
123 GL_LIB="-lglut -lGLU -lGL"
124 GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
125 GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
126
127 else
128 IGNORE_GL_FLAG="-DIGNORE_GL"
129 GL_FLAG="-DUSE_GL_FALSE"
130 fi
131
132 GLUT_NOT_IN_GL=""
133 GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
134
135 rm -rf data model doc license || die
136
137 sed \
138 -e "s|/usr|${EPREFIX}/usr|g" \
139 -e "s|^\(CC =\).*|\1 $(tc-getCC)|g" \
140 -e "s|^\(OPT_FLAG =\).*|\1 ${CFLAGS}|g" \
141 -e "s|^\(LINK_FLAGS =.*\)|\1 ${LDFLAGS}|g" \
142 -e "s|^\(IGNORE_GL_FLAG =\).*|\1 ${IGNORE_GL_FLAG}|g" \
143 -e "s|^\(GL_FLAG =\).*|\1 ${GL_FLAG}|g" \
144 -e "s|^\(GL_DIR =\).*|\1 ${GL_DIR}|g" \
145 -e "s|^\(GL_LIB =\).*|\1 ${GL_LIB}|g" \
146 -e "s|^\(GL_LIB_FLAGS =\).*|\1 ${GL_LIB_FLAGS}|g" \
147 -e "s|^\(GL_INCLUDE_FLAGS =\).*|\1 ${GL_INCLUDE_FLAGS}|g" \
148 -e "s|^\(GLUT_NEED_INIT =\).*|\1 ${GLUT_NEED_INIT}|g" \
149 -e "s|^\(GLUT_NOT_IN_GL =\).*|\1|g" \
150 -e "s|^\(X11_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
151 -e "s|^\(TCL_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
152 -e "s|^\(TK_LIB_FLAGS =\).*|\1 -L${EPREFIX}/usr/$(get_libdir)|g" \
153 -e "s|^\(PYTHON_INCLUDE_FLAGS =\).*|\1 -I${EPREFIX}/$(python_get_includedir)|g" \
154 -e "s|^\(PYTHON_LIB =\).*|\1 $(python_get_library -l)|g" \
155 c/environment_default.txt > c/environment.txt || die
156
157 sed \
158 -e 's:ln -s:cp -f:g' \
159 -i $(find python -name linkSharedObjs) || die
160 }
161
162 src_compile() {
163 emake -C c all
164 emake -C c links
165 }
166
167 src_install() {
168 local libdir
169 local tkver
170 local _wrapper
171
172 find . -name "*.pyc" -type f -delete
173
174 libdir=$(get_libdir)
175 tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
176
177 _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara"
178 use extendnmr && _wrapper="${_wrapper} extendNmr"
179 for wrapper in ${_wrapper}; do
180 sed \
181 -e "s|gentoo_sitedir|${EPREFIX}$(python_get_sitedir)|g" \
182 -e "s|gentoolibdir|${EPREFIX}/usr/${libdir}|g" \
183 -e "s|gentootk|${EPREFIX}/usr/${libdir}/tk${tkver}|g" \
184 -e "s|gentootcl|${EPREFIX}/usr/${libdir}/tclk${tkver}|g" \
185 -e "s|gentoopython|$(PYTHON -a)|g" \
186 -e "s|gentoousr|${EPREFIX}/usr|g" \
187 -e "s|//|/|g" \
188 "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
189 dobin "${T}"/${wrapper}
190 done
191
192 local in_path=$(python_get_sitedir)/${PN}
193 local files
194 local pydocs
195
196 pydocs="$(find python -name doc -type d)"
197 rm -rf ${pydocs} || die
198
199 for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
200 sed \
201 -e 's|#from __future__|from __future__|g' \
202 -i ${i} || die
203 done
204
205 insinto ${in_path}
206
207 dodir ${in_path}/c
208
209 ebegin "Installing main files"
210 doins -r python
211 eend
212
213 ebegin "Adjusting permissions"
214
215 for _file in $(find "${ED}" -type f -name "*so"); do
216 chmod 755 ${_file}
217 done
218 eend
219 }
220
221 pkg_postinst() {
222 python_mod_optimize ${PN}
223 }
224
225 pkg_postrm() {
226 python_mod_cleanup ${PN}
227 }