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.3.1_p140131-r1.ebuild ChangeLog ccpn-2.3.1_p140131.ebuild
Date: Fri, 31 Jan 2014 10:02:17
Message-Id: 20140131100213.68BF82004C@flycatcher.gentoo.org
1 jlec 14/01/31 10:02:12
2
3 Modified: ChangeLog
4 Added: ccpn-2.3.1_p140131-r1.ebuild
5 Removed: ccpn-2.3.1_p140131.ebuild
6 Log:
7 Update patch
8
9 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
10
11 Revision Changes Path
12 1.132 sci-chemistry/ccpn/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.132&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?rev=1.132&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ChangeLog?r1=1.131&r2=1.132
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v
21 retrieving revision 1.131
22 retrieving revision 1.132
23 diff -u -r1.131 -r1.132
24 --- ChangeLog 31 Jan 2014 09:07:59 -0000 1.131
25 +++ ChangeLog 31 Jan 2014 10:02:12 -0000 1.132
26 @@ -1,6 +1,12 @@
27 # ChangeLog for sci-chemistry/ccpn
28 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.131 2014/01/31 09:07:59 jlec Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.132 2014/01/31 10:02:12 jlec Exp $
31 +
32 +*ccpn-2.3.1_p140131-r1 (31 Jan 2014)
33 +
34 + 31 Jan 2014; Justin Lecher <jlec@g.o> +ccpn-2.3.1_p140131-r1.ebuild,
35 + -ccpn-2.3.1_p140131.ebuild:
36 + Update patch
37
38 *ccpn-2.3.1_p140131 (31 Jan 2014)
39
40
41
42
43 1.1 sci-chemistry/ccpn/ccpn-2.3.1_p140131-r1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.3.1_p140131-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ccpn/ccpn-2.3.1_p140131-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: ccpn-2.3.1_p140131-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2014 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.3.1_p140131-r1.ebuild,v 1.1 2014/01/31 10:02:12 jlec Exp $
53
54 EAPI=5
55
56 PYTHON_COMPAT=( python{2_6,2_7} )
57 PYTHON_REQ_USE="ssl,tk"
58
59 inherit eutils flag-o-matic multilib portability python-single-r1 toolchain-funcs versionator
60
61 PATCHSET="${PV##*_p}"
62 MY_PN="${PN}mr"
63 MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
64 MY_MAJOR="$(get_version_component_range 1-3)"
65
66 DESCRIPTION="The Collaborative Computing Project for NMR"
67 HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
68 SRC_URI="http://www-old.ccpn.ac.uk/download/${MY_PN}/analysis${MY_PV}r2.tar.gz"
69 [[ -n ${PATCHSET} ]] \
70 && SRC_URI+=" http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.xz"
71
72 SLOT="0"
73 LICENSE="|| ( CCPN LGPL-2.1 )"
74 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
75 IUSE="+opengl"
76
77 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
78
79 RDEPEND="
80 ${PYTHON_DEPS}
81 dev-lang/tk[threads]
82 dev-python/numpy[${PYTHON_USEDEP}]
83 dev-tcltk/tix
84 =sci-libs/ccpn-data-"${MY_MAJOR}"*[${PYTHON_USEDEP}]
85 sci-biology/psipred
86 x11-libs/libXext
87 x11-libs/libX11
88 opengl? (
89 media-libs/freeglut
90 dev-python/pyglet[${PYTHON_USEDEP}] )"
91 DEPEND="${RDEPEND}"
92
93 RESTRICT="mirror"
94
95 S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2)
96
97 src_prepare() {
98 [[ -n ${PATCHSET} ]] && \
99 epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
100
101 epatch "${FILESDIR}"/${MY_PV}-parallel.patch "${FILESDIR}"/talosn.patch
102
103 append-lfs-flags
104
105 sed \
106 -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \
107 -e "s:weights_s:weights:g" \
108 -i python/ccpnmr/analysis/wrappers/Psipred.py || die
109
110 local tk_ver
111 local myconf
112
113 tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
114
115 if use opengl; then
116 GLUT_NEED_INIT="-DNEED_GLUT_INIT"
117 IGNORE_GL_FLAG=""
118 GL_FLAG="-DUSE_GL_TRUE"
119 GL_DIR="${EPREFIX}/usr"
120 GL_LIB="-lglut -lGLU -lGL"
121 GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
122 GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
123
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 }