summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-05-27 10:28:55 +0000
committerJustin Lecher <jlec@gentoo.org>2011-05-27 10:28:55 +0000
commit0a2e43234609d5774ae3f761526c37ef4909cd69 (patch)
tree0c8c9594730bf8611c9979a4e310005e6de6bfbd /sci-chemistry
parent[bump] dev-perl/JSON-Any-1.280.0 (diff)
downloadhistorical-0a2e43234609d5774ae3f761526c37ef4909cd69.tar.gz
historical-0a2e43234609d5774ae3f761526c37ef4909cd69.tar.bz2
historical-0a2e43234609d5774ae3f761526c37ef4909cd69.zip
Todays Python patches
Package-Manager: portage-2.2.0_alpha37/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/ccpn/ChangeLog9
-rw-r--r--sci-chemistry/ccpn/Manifest12
-rw-r--r--sci-chemistry/ccpn/ccpn-2.1.5_p110527.ebuild213
-rw-r--r--sci-chemistry/ccpn/ccpn-2.2.1_p110527.ebuild213
4 files changed, 442 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog
index cc06154e6d65..6c60e7c72b94 100644
--- a/sci-chemistry/ccpn/ChangeLog
+++ b/sci-chemistry/ccpn/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-chemistry/ccpn
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.62 2011/05/26 09:37:35 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.63 2011/05/27 10:28:55 jlec Exp $
+
+*ccpn-2.2.1_p110527 (27 May 2011)
+*ccpn-2.1.5_p110527 (27 May 2011)
+
+ 27 May 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p110527.ebuild,
+ +ccpn-2.2.1_p110527.ebuild:
+ Todays Python patches
*ccpn-2.2.1_p110526 (26 May 2011)
*ccpn-2.1.5_p110526 (26 May 2011)
diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest
index a517d43c310f..49b07465dfc9 100644
--- a/sci-chemistry/ccpn/Manifest
+++ b/sci-chemistry/ccpn/Manifest
@@ -27,12 +27,14 @@ DIST ccpn-update-2.1.5-110308.patch.bz2 67868 RMD160 7b8aeb929a1f77317d9eb60a7ca
DIST ccpn-update-2.1.5-110401.patch.bz2 75380 RMD160 20acef6c31a9e2252a6dcec23f965ae7d498f6b3 SHA1 084b4270142b04c02478e742e2e312c4410ecf13 SHA256 896fc00dfbe97d5ce1bbeac91a2221a79d8d112eac208202cede1a5396286ae7
DIST ccpn-update-2.1.5-110505.patch.bz2 78824 RMD160 0deb492900e4fd1dab18f44924ea4ab242251cd3 SHA1 c5d8a59df36f73125a27dc25fcb09e36fcb1990d SHA256 cc63f88d0676258c931909a7e6055c110e661e12e0ce9f8040402a25d76e9319
DIST ccpn-update-2.1.5-110526.patch.bz2 81262 RMD160 6070db12c97422a56cfc93112976e7c829911534 SHA1 3bb2ba67da979d726864a866ee53394e510e15c8 SHA256 23fc2518243705bf41216b1f641964e9348342471fcb5807f611eaf32e8f456d
+DIST ccpn-update-2.1.5-110527.patch.bz2 81455 RMD160 9aa99530334ee2e204ee69cc7831ddb0f2e52b7a SHA1 17dcb166f259ceae457ce90f89cf4e664c0557c1 SHA256 2eb84606e79afe94ab0775a34770e4696237e91628ed496ee3c7a52d997a5364
DIST ccpn-update-2.2.1-110222.patch.bz2 2346 RMD160 89ebe4954b56b25e59f81a7243af088068323f11 SHA1 4b94bf6fa2d1bd1dd0d4bdd2fae4a6caf64b0d1d SHA256 7dd92ee0350beaefddbcbd62420aa5b3699f0797f31a4d47799d2669d8499b7a
DIST ccpn-update-2.2.1-110226.patch.bz2 3836 RMD160 95d07934ae6ec7d434c1cacd01858ab606ff8ccb SHA1 eb8a735785206472b5681fdbdb700d3126a6ec9c SHA256 a7576d8e3af8083f324bafa85b598616559307725a00780380de6f5909ea6b4d
DIST ccpn-update-2.2.1-110308.patch.bz2 8112 RMD160 6985dd15b0a705b787ddc5d06c16a66575e4dee1 SHA1 c7726a10cfdd94574d1cbc55ea68d63148336251 SHA256 223a40975ccccafffdf08167b3eb5885a826402092fc5d8e23723f01f5b34e48
DIST ccpn-update-2.2.1-110401.patch.bz2 20666 RMD160 193d7f86ab75d2a862953683ec503bed947f3468 SHA1 cfab70216cd485a68234c06808abcdf51b917d98 SHA256 15468c3e1412d9d2c97ef52bcaac255d65d79dd3016d0ae3adb48f7f3d0dc46f
DIST ccpn-update-2.2.1-110505.patch.bz2 44951 RMD160 dd4a3cd1be1dd3155f1ade758e8775cbb7d3904b SHA1 0ce1ecf46736ace3a073e1154ed2f7280d502aee SHA256 f661602210e9bc4a7d45df78cfce6893962ce53c4f30a92439344c533f72be95
DIST ccpn-update-2.2.1-110526.patch.bz2 55034 RMD160 6c6fab4c048cb603f2964db9fc4d98ae06b493a5 SHA1 e6307ffbc62d4ab56434171b1e90309c6a2d53f6 SHA256 5051fd896a31572402d6b8a3fc824dced6e8f1d26abde17b2ebf0ace7f748d2d
+DIST ccpn-update-2.2.1-110527.patch.bz2 56349 RMD160 f28b7dff03d10b7adab7db3dba7d7c5243817698 SHA1 5ee35f14f233eead9066b520c46820614271ea6e SHA256 aeaadc6afd804003fdd13fe99955561c2da4cd374a7c5be672285c4129c6b849
EBUILD ccpn-2.1.3.1_p100806.ebuild 5190 RMD160 c1dd4e2443ab5cf8386627a9feba25be6e61b715 SHA1 0d9700191a04c6ed5f106e2712b010d499315827 SHA256 ed26ef362193f91d4726fd49a1c4b19c1f975c3847b0616ada2e64ce7a90ffa5
EBUILD ccpn-2.1.5_p110202.ebuild 5770 RMD160 98c49d481a5a0e28d2f62b303950bab3467c3246 SHA1 2fb5b0d792b4dcfac20f4d11d405104ab5f81129 SHA256 77d1d7239204ffa4247501133996478e13f07b863fdfebe5d4b056089f9e08ba
EBUILD ccpn-2.1.5_p110217.ebuild 5794 RMD160 acbb36a1c2f01d9d6944b421b20f5c6ed8a2766e SHA1 268ced5e44ed04339e96242560c06d84ebb3031e SHA256 b6b776e2972389b0e2cbd8054c4a52bb50a5310e5c99364bd7b4ae0cd32c3872
@@ -42,18 +44,20 @@ EBUILD ccpn-2.1.5_p110308.ebuild 5794 RMD160 cd635335e052642cc6216b646aace2ab625
EBUILD ccpn-2.1.5_p110401.ebuild 5794 RMD160 d28f97f70b7d2c7e67680ccbc7dfa80f3c7e4c16 SHA1 995d70095ca28b0f4e24cb3dcab85ffd66a0e55f SHA256 1562e73abd583a6904b16bda472e39c0e384392014f76b706377ca871bf91033
EBUILD ccpn-2.1.5_p110505.ebuild 5794 RMD160 a3762c3a58722466535819233def936b48cae77b SHA1 6c4550ef6ce6d1c36e0bf07aa060dda6395024ca SHA256 e1fb6a0f5ae16183080a4df866a917810505772ec8e756356ff67481ec24c2b4
EBUILD ccpn-2.1.5_p110526.ebuild 5794 RMD160 d58bca2cf4604fb18b6ea002206cbbe91b12fd50 SHA1 a27e07aab1e3e366b39eeaf2069d26b7746a5501 SHA256 e43f88d83d43df963dcb6fc72af81d6e21a1c4dd3bc6506b5bc56d18fe0874fe
+EBUILD ccpn-2.1.5_p110527.ebuild 5794 RMD160 1551003946619dcbd8fa6782917263d531d53fc1 SHA1 776f4daa263e58b965934d4eccbc7d08057c366c SHA256 ded2febbbf17a484ba4b3135e23e84f6b06ddf27caf086b37d4c3073066fc3f7
EBUILD ccpn-2.2.1_p110222.ebuild 5806 RMD160 9145fa2208f389a1399e91a3406190cb92ebb6bc SHA1 8b978ecaf8cb6992a958170b80a71f9399726b5c SHA256 a7102fefe463355b9a0119850fb3c1ae597c663814ac83e340908820eef97be5
EBUILD ccpn-2.2.1_p110226.ebuild 5806 RMD160 ec1671816fa06ddc53a3bcd12faeb3869dff5094 SHA1 85922fac46dd185e7ebd3a3a4dfb61cf942b2adc SHA256 34942eea58c13108a7605de8b0721bdebd5b0b320b0b596c9d084e90f6059a85
EBUILD ccpn-2.2.1_p110308.ebuild 5806 RMD160 a85b12264e5717e2564d97cbd9b1c3d5d685cd32 SHA1 371ff75268ca9a0cc9a37df35c4c57641ea70707 SHA256 7f9bfe05904a1c5320c3e11a1397227f0f6d5f1f59dd8288045aef84513a8c5d
EBUILD ccpn-2.2.1_p110401.ebuild 5806 RMD160 9ead6d298b01630008ac0caab8b9a09b5af72feb SHA1 2977a61ae37b49ff5b978aaa274632f74de47ed4 SHA256 b7a12ad78c0b4ddac1400e4d26fa24b5c024de5cecbd814f7f922a348f2cdc60
EBUILD ccpn-2.2.1_p110505.ebuild 5806 RMD160 215de2ad1e2c8a9de38aba1f4af80ab0c0a8bd79 SHA1 7b994bf07bd09beeb248cb8bd1ba7458aa8b9916 SHA256 d07bca5797de82970ca01e7c15b0390afd3b4003e200242f0a04529a95d2a3de
EBUILD ccpn-2.2.1_p110526.ebuild 5806 RMD160 ff2b7937c2fa1a2d99251f28bd3834a654705a13 SHA1 adda8f2dee3181626731f410a45db92513c01979 SHA256 b72aff1ba5a448988c7293fcd5184454ca503497dd801efa4e0f1c737145269e
-MISC ChangeLog 10776 RMD160 bb31bf4771a7194336710b992ae57061ab09168b SHA1 79f1f2ba9f374b2288a71a4af36f801564cbd66f SHA256 5a01a0fc13fd04fbc883c8df030714fb6b29a1a0927648ba0e3ded2fdfb2b235
+EBUILD ccpn-2.2.1_p110527.ebuild 5806 RMD160 96251a79c28e9c96856012fb81acd6c52f1b9558 SHA1 beb2fb075bf8d22e25f1f1471b5c296c6c3d4410 SHA256 57e40eeb06d49129b130ac85c77edf034199f9609a1ac29da1392b75fe991b40
+MISC ChangeLog 10975 RMD160 8fdab4bcbe79284de49bae1bc759352b7c2281c9 SHA1 58880096920e310827972d4f78940b2fbca71523 SHA256 80945c0267e550f5466129559f38bd1af4b0fbceb414aaf00fbabc02265cc554
MISC metadata.xml 317 RMD160 6e56ad407f163d80504468f6fedcfb35fc31db00 SHA1 30b72b0612b1f91712537d24e3a2407eec50e1dd SHA256 1fb093ab05124dcd078fc93a4aa6f787f5829066e100ed98da8ecf65cece63fb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAk3eH2UACgkQgAnW8HDreRbxjwCePCqDMTq7TssQqv3kzNs5gMxV
-bjcAni1z4hgZ2hUNsX7llI9XA5dhMEA1
-=gebw
+iEYEARECAAYFAk3ffO0ACgkQgAnW8HDreRZwuACglwKHylkv4+qPAe6OlYFPF8/8
+aksAmwYvh7Jr+L2aoEixlgoJ3ZY+mCHY
+=/8bu
-----END PGP SIGNATURE-----
diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p110527.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p110527.ebuild
new file mode 100644
index 000000000000..28fee2bb741e
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.1.5_p110527.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ccpn-2.1.5_p110527.ebuild,v 1.1 2011/05/27 10:28:55 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="2:2.5"
+PYTHON_USE_WITH="ssl tk"
+
+inherit eutils portability python toolchain-funcs versionator
+
+PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+SRC_URI="http://www.bio.cam.ac.uk/ccpn/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+ [[ -n ${PATCHSET} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.bz2"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="extendnmr +opengl"
+
+RDEPEND="
+ dev-lang/tk[threads]
+ >=dev-python/numpy-1.4
+ >=dev-tcltk/tix-8.4.3
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet )"
+# We need to fix this
+# sci-chemistry/mdd
+DEPEND="${RDEPEND}"
+PDEPEND="
+ extendnmr? (
+ sci-chemistry/aria
+ sci-chemistry/prodecomp )"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2 ${PV})
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/${MY_PV}-parallel.patch
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
+
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:^\(CC =\).*:\1 $(tc-getCC):g" \
+ -e "s:^\(OPT_FLAG =\).*:\1 ${CFLAGS}:g" \
+ -e "s:^\(LINK_FLAGS =.*\):\1 ${LDFLAGS}:g" \
+ -e "s:^\(IGNORE_GL_FLAG =\).*:\1 ${IGNORE_GL_FLAG}:g" \
+ -e "s:^\(GL_FLAG =\).*:\1 ${GL_FLAG}:g" \
+ -e "s:^\(GL_DIR =\).*:\1 ${GL_DIR}:g" \
+ -e "s:^\(GL_LIB =\).*:\1 ${GL_LIB}:g" \
+ -e "s:^\(GL_LIB_FLAGS =\).*:\1 ${GL_LIB_FLAGS}:g" \
+ -e "s:^\(GL_INCLUDE_FLAGS =\).*:\1 ${GL_INCLUDE_FLAGS}:g" \
+ -e "s:^\(GLUT_NEED_INIT =\).*:\1 ${GLUT_NEED_INIT}:g" \
+ -e "s:^\(GLUT_NOT_IN_GL =\).*:\1:g" \
+ -e "s:^\(X11_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:^\(TCL_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:^\(TK_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:^\(PYTHON_INCLUDE_FLAGS =\).*:\1 -I${EPREFIX}/$(python_get_includedir):g" \
+ -e "s:^\(PYTHON_LIB =\).*:\1 $(python_get_library -l):g" \
+ c/environment_default.txt > c/environment.txt
+}
+
+src_compile() {
+ emake -C c all links || die
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type d -delete
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara"
+ use extendnmr && _wrapper="${_wrapper} extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s:gentoo_sitedir:${EPREFIX}$(python_get_sitedir):g" \
+ -e "s:gentoolibdir:${EPREFIX}/usr/${libdir}:g" \
+ -e "s:gentootk:${EPREFIX}/usr/${libdir}/tk${tkver}:g" \
+ -e "s:gentootcl:${EPREFIX}/usr/${libdir}/tclk${tkver}:g" \
+ -e "s:gentoopython:${EPREFIX}/usr/bin/python:g" \
+ -e "s://:/:g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper} || die "Failed to install ${wrapper}"
+ done
+
+ local in_path
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ in_path=$(python_get_sitedir)/${PN}
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's:#from __future__:from __future__:g' \
+ -i ${i} || die
+ done
+
+ insinto ${in_path}
+
+ dodir ${in_path}/c
+
+ ebegin "Installing main files"
+ doins -r python || die "main files installation failed"
+ eend
+ dosym ../../../..//share/doc/ccpn-data-${MY_MAJOR}/html ${in_path}/doc || die
+ for i in ${pydocs}; do
+ dosym /usr/share/doc/ccpn-data-${MY_MAJOR}/html/${i} ${in_path}/${i}
+ done
+
+ dosym /usr/share/ccpn/data ${in_path}/data
+ dosym /usr/share/ccpn/model ${in_path}/model
+
+ einfo "Adjusting permissions"
+
+ files="
+ cambridge/c/BayesPeakSeparator.so
+ ccp/c/StructUtil.so
+ ccp/c/StructStructure.so
+ ccp/c/StructBond.so
+ ccp/c/StructAtom.so
+ ccpnmr/c/DyAtomCoord.so
+ ccpnmr/c/DyDistConstraint.so
+ ccpnmr/c/DyDistForce.so
+ ccpnmr/c/AtomCoordList.so
+ ccpnmr/c/DyAtomCoordList.so
+ ccpnmr/c/ContourStyle.so
+ ccpnmr/c/ContourLevels.so
+ ccpnmr/c/SliceFile.so
+ ccpnmr/c/PeakCluster.so
+ ccpnmr/c/Dynamics.so
+ ccpnmr/c/Bacus.so
+ ccpnmr/c/Midge.so
+ ccpnmr/c/DyDistConstraintList.so
+ ccpnmr/c/WinPeakList.so
+ ccpnmr/c/PeakList.so
+ ccpnmr/c/DistConstraint.so
+ ccpnmr/c/CloudUtil.so
+ ccpnmr/c/DistForce.so
+ ccpnmr/c/DistConstraintList.so
+ ccpnmr/c/AtomCoord.so
+ ccpnmr/c/DyDynamics.so
+ ccpnmr/c/ContourFile.so
+ memops/c/ShapeFile.so
+ memops/c/BlockFile.so
+ memops/c/PdfHandler.so
+ memops/c/MemCache.so
+ memops/c/FitMethod.so
+ memops/c/PsHandler.so
+ memops/c/GlHandler.so
+ memops/c/StoreFile.so
+ memops/c/StoreHandler.so
+ memops/c/TkHandler.so"
+ for FILE in ${files}; do
+ fperms 755 ${in_path}/python/${FILE}
+ done
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+}
diff --git a/sci-chemistry/ccpn/ccpn-2.2.1_p110527.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p110527.ebuild
new file mode 100644
index 000000000000..1189b4c4bbf5
--- /dev/null
+++ b/sci-chemistry/ccpn/ccpn-2.2.1_p110527.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ccpn-2.2.1_p110527.ebuild,v 1.1 2011/05/27 10:28:55 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="2:2.5"
+PYTHON_USE_WITH="ssl tk"
+
+inherit eutils portability python toolchain-funcs versionator
+
+PATCHSET="${PV##*_p}"
+MY_PN="${PN}mr"
+MY_PV="$(replace_version_separator 3 _ ${PV%%_p*})"
+MY_MAJOR="$(get_version_component_range 1-3)"
+
+DESCRIPTION="The Collaborative Computing Project for NMR"
+SRC_URI="http://www.bio.cam.ac.uk/ccpn/download/${MY_PN}/analysis${MY_PV}.tar.gz"
+ [[ -n ${PATCHSET} ]] && SRC_URI="${SRC_URI} http://dev.gentoo.org/~jlec/distfiles/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch.bz2"
+HOMEPAGE="http://www.ccpn.ac.uk/ccpn"
+
+SLOT="0"
+LICENSE="|| ( CCPN LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="extendnmr +opengl"
+
+RDEPEND="
+ dev-lang/tk[threads]
+ >=dev-python/numpy-1.4
+ >=dev-tcltk/tix-8.4.3
+ =sci-libs/ccpn-data-"${MY_MAJOR}"*
+ x11-libs/libXext
+ x11-libs/libX11
+ opengl? (
+ media-libs/freeglut
+ dev-python/pyglet )"
+# We need to fix this
+# sci-chemistry/mdd
+DEPEND="${RDEPEND}"
+PDEPEND="
+ extendnmr? (
+ sci-chemistry/aria
+ sci-chemistry/prodecomp )"
+
+RESTRICT="mirror"
+
+S="${WORKDIR}"/${MY_PN}/${MY_PN}$(get_version_component_range 1-2 ${PV})
+
+pkg_setup() {
+ python_set_active_version 2
+}
+
+src_prepare() {
+ [[ -n ${PATCHSET} ]] && \
+ epatch "${WORKDIR}"/ccpn-update-${MY_MAJOR}-${PATCHSET}.patch
+
+ epatch "${FILESDIR}"/${MY_PV}-parallel.patch
+
+ local tk_ver
+ local myconf
+
+ tk_ver="$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)"
+
+ if use opengl; then
+ GLUT_NEED_INIT="-DNEED_GLUT_INIT"
+ IGNORE_GL_FLAG=""
+ GL_FLAG="-DUSE_GL_TRUE"
+ GL_DIR="${EPREFIX}/usr"
+ GL_LIB="-lglut -lGLU -lGL"
+ GL_INCLUDE_FLAGS="-I\$(GL_DIR)/include"
+ GL_LIB_FLAGS="-L\$(GL_DIR)/$(get_libdir)"
+
+ else
+ IGNORE_GL_FLAG="-DIGNORE_GL"
+ GL_FLAG="-DUSE_GL_FALSE"
+ fi
+
+ GLUT_NOT_IN_GL=""
+ GLUT_FLAG="\$(GLUT_NEED_INIT) \$(GLUT_NOT_IN_GL)"
+
+ rm -rf data model doc license || die
+
+ sed \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ -e "s:^\(CC =\).*:\1 $(tc-getCC):g" \
+ -e "s:^\(OPT_FLAG =\).*:\1 ${CFLAGS}:g" \
+ -e "s:^\(LINK_FLAGS =.*\):\1 ${LDFLAGS}:g" \
+ -e "s:^\(IGNORE_GL_FLAG =\).*:\1 ${IGNORE_GL_FLAG}:g" \
+ -e "s:^\(GL_FLAG =\).*:\1 ${GL_FLAG}:g" \
+ -e "s:^\(GL_DIR =\).*:\1 ${GL_DIR}:g" \
+ -e "s:^\(GL_LIB =\).*:\1 ${GL_LIB}:g" \
+ -e "s:^\(GL_LIB_FLAGS =\).*:\1 ${GL_LIB_FLAGS}:g" \
+ -e "s:^\(GL_INCLUDE_FLAGS =\).*:\1 ${GL_INCLUDE_FLAGS}:g" \
+ -e "s:^\(GLUT_NEED_INIT =\).*:\1 ${GLUT_NEED_INIT}:g" \
+ -e "s:^\(GLUT_NOT_IN_GL =\).*:\1:g" \
+ -e "s:^\(X11_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:^\(TCL_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:^\(TK_LIB_FLAGS =\).*:\1 -L${EPREFIX}/usr/$(get_libdir):g" \
+ -e "s:^\(PYTHON_INCLUDE_FLAGS =\).*:\1 -I${EPREFIX}/$(python_get_includedir):g" \
+ -e "s:^\(PYTHON_LIB =\).*:\1 $(python_get_library -l):g" \
+ c/environment_default.txt > c/environment.txt
+}
+
+src_compile() {
+ emake -C c all links || die
+}
+
+src_install() {
+ local libdir
+ local tkver
+ local _wrapper
+
+ find . -name "*.pyc" -type d -delete
+
+ libdir=$(get_libdir)
+ tkver=$(best_version dev-lang/tk | cut -d- -f3 | cut -d. -f1,2)
+
+ _wrapper="analysis dangle dataShifter depositionFileImporter eci formatConverter pipe2azara xeasy2azara"
+ use extendnmr && _wrapper="${_wrapper} extendNmr"
+ for wrapper in ${_wrapper}; do
+ sed \
+ -e "s:gentoo_sitedir:${EPREFIX}$(python_get_sitedir):g" \
+ -e "s:gentoolibdir:${EPREFIX}/usr/${libdir}:g" \
+ -e "s:gentootk:${EPREFIX}/usr/${libdir}/tk${tkver}:g" \
+ -e "s:gentootcl:${EPREFIX}/usr/${libdir}/tclk${tkver}:g" \
+ -e "s:gentoopython:${EPREFIX}/usr/bin/python:g" \
+ -e "s://:/:g" \
+ "${FILESDIR}"/${wrapper} > "${T}"/${wrapper} || die "Fail fix ${wrapper}"
+ dobin "${T}"/${wrapper} || die "Failed to install ${wrapper}"
+ done
+
+ local in_path
+ local files
+ local pydocs
+
+ pydocs="$(find python -name doc -type d)"
+ rm -rf ${pydocs} || die
+
+ in_path=$(python_get_sitedir)/${PN}
+
+ for i in python/memops/format/compatibility/{Converters,part2/Converters2}.py; do
+ sed \
+ -e 's:#from __future__:from __future__:g' \
+ -i ${i} || die
+ done
+
+ insinto ${in_path}
+
+ dodir ${in_path}/c
+
+ ebegin "Installing main files"
+ doins -r python || die "main files installation failed"
+ eend
+ dosym ../../../..//share/doc/ccpn-data-${MY_MAJOR}/html ${in_path}/doc || die
+ for i in ${pydocs}; do
+ dosym /usr/share/doc/ccpn-data-${MY_MAJOR}/html/${i} ${in_path}/${i}
+ done
+
+ dosym /usr/share/ccpn/data ${in_path}/data
+ dosym /usr/share/ccpn/model ${in_path}/model
+
+ einfo "Adjusting permissions"
+
+ files="
+ cambridge/c/BayesPeakSeparator.so
+ ccp/c/StructUtil.so
+ ccp/c/StructStructure.so
+ ccp/c/StructBond.so
+ ccp/c/StructAtom.so
+ ccpnmr/c/DyAtomCoord.so
+ ccpnmr/c/DyDistConstraint.so
+ ccpnmr/c/DyDistForce.so
+ ccpnmr/c/AtomCoordList.so
+ ccpnmr/c/DyAtomCoordList.so
+ ccpnmr/c/ContourStyle.so
+ ccpnmr/c/ContourLevels.so
+ ccpnmr/c/SliceFile.so
+ ccpnmr/c/PeakCluster.so
+ ccpnmr/c/Dynamics.so
+ ccpnmr/c/Bacus.so
+ ccpnmr/c/Midge.so
+ ccpnmr/c/DyDistConstraintList.so
+ ccpnmr/c/WinPeakList.so
+ ccpnmr/c/PeakList.so
+ ccpnmr/c/DistConstraint.so
+ ccpnmr/c/CloudUtil.so
+ ccpnmr/c/DistForce.so
+ ccpnmr/c/DistConstraintList.so
+ ccpnmr/c/AtomCoord.so
+ ccpnmr/c/DyDynamics.so
+ ccpnmr/c/ContourFile.so
+ memops/c/ShapeFile.so
+ memops/c/BlockFile.so
+ memops/c/PdfHandler.so
+ memops/c/MemCache.so
+ memops/c/FitMethod.so
+ memops/c/PsHandler.so
+ memops/c/GlHandler.so
+ memops/c/StoreFile.so
+ memops/c/StoreHandler.so
+ memops/c/TkHandler.so"
+ for FILE in ${files}; do
+ fperms 755 ${in_path}/python/${FILE}
+ done
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+}