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