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