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