diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-11-24 08:36:43 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-11-24 08:36:43 +0000 |
commit | 858669a73e7bcdc4251c4421dbc067c85a4e0565 (patch) | |
tree | 6201c21bc539c651a1604684bc2327cc6f5d63e2 /sci-chemistry/ccpn | |
parent | Version Bump, fixes https://github.com/kjn/lbzip2/issues/4 which was rated to... (diff) | |
download | historical-858669a73e7bcdc4251c4421dbc067c85a4e0565.tar.gz historical-858669a73e7bcdc4251c4421dbc067c85a4e0565.tar.bz2 historical-858669a73e7bcdc4251c4421dbc067c85a4e0565.zip |
Todays Python patches
Package-Manager: portage-2.2.0_alpha77/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry/ccpn')
-rw-r--r-- | sci-chemistry/ccpn/ChangeLog | 9 | ||||
-rw-r--r-- | sci-chemistry/ccpn/Manifest | 12 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.1.5_p111124.ebuild | 214 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p111124.ebuild | 214 |
4 files changed, 444 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index 527a0cbd9bfe..96c8f13a1364 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.74 2011/10/28 08:50:29 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.75 2011/11/24 08:36:43 jlec Exp $ + +*ccpn-2.2.1_p111124 (24 Nov 2011) +*ccpn-2.1.5_p111124 (24 Nov 2011) + + 24 Nov 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p111124.ebuild, + +ccpn-2.2.1_p111124.ebuild: + Todays Python patches *ccpn-2.2.1_p111028 (28 Oct 2011) *ccpn-2.1.5_p111028 (28 Oct 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index 268fac043b7b..d56911258c33 100644 --- a/sci-chemistry/ccpn/Manifest +++ b/sci-chemistry/ccpn/Manifest @@ -27,6 +27,7 @@ DIST ccpn-update-2.1.5-110926.patch.bz2 99882 RMD160 8e1aa7563ea395c9ef68c87fb4d DIST ccpn-update-2.1.5-111011.patch.xz 103208 RMD160 475d1f1bba8e72c2e30340d3ab33969206a7e22b SHA1 b05f14ba39d14f67b879b1c190eac024278d9c27 SHA256 6e07a122f3353522c5abf3e02739aa792538403674393192b3f0b86f68a067d3 DIST ccpn-update-2.1.5-111017.patch.xz 103212 RMD160 5ca2023fe7cb29f2989b9f56e7d0a1594d835c42 SHA1 c77d66ff9521c1e796c75e8719e85048126d2d95 SHA256 7485e59ad4cffcc4139a913b17afcdba971967c871a512c4afdf76c580f339a5 DIST ccpn-update-2.1.5-111028.patch.xz 103400 RMD160 2dbfc857edf38d75f48fda887378b4565e59d43d SHA1 98625971247eb169d13a52ad6b774b0578fb8f8c SHA256 d7ae6e5e0a7e75901f0713a7d44bd00bb48fa5402ab6caf4cf4c7ca9e50125e5 +DIST ccpn-update-2.1.5-111124.patch.xz 104712 RMD160 43f4c96d295e9fe98484ea78413e430e64e61acc SHA1 85a47fc245e0a5ff9a54c3d48696cc4b1c5e9b7c SHA256 e227124fead5df83ea8e0ff7ecefcd2e49743b492c606f4d58781d2481280012 DIST ccpn-update-2.2.1-110602.patch.bz2 57084 RMD160 502c9ca948caf7be5e87759222982a952dd81bc2 SHA1 31725499eba0bb851357227fc4db274121a32240 SHA256 591be1c0c5dfea56c7fa8aec5da154a2a7263a11e8e20ff2a71a2e6e484c6e00 DIST ccpn-update-2.2.1-110629.patch.bz2 66050 RMD160 8d3b37d9c848f177b4c35f36eccd1026500af0b4 SHA1 66371f52b15ec8c689c1634fa30f6679c4e8c681 SHA256 99280022b594a45d1bdb9811f0f78851a8cb8282476c521987def7ab13cb0dac DIST ccpn-update-2.2.1-110817.patch.bz2 77149 RMD160 69c2417ca700129d9c53f90d5be665b2192ae0c0 SHA1 b61874c4753251ac08fd4549f6b656352e462ece SHA256 f08b1082435546c605d516167617cdf5b163aa820150718fa8e205cd4f9a3232 @@ -36,6 +37,7 @@ DIST ccpn-update-2.2.1-111011.patch.xz 76948 RMD160 1bac8433d91adb373971a4130bb9 DIST ccpn-update-2.2.1-111017.patch.xz 76984 RMD160 26a58d486bdc33cafaced593c327a00162b6605a SHA1 e8503957efaa6deb53c8537b954ec2ce972a6bc4 SHA256 73e38c80b38957a9484e885cb4c867f67d17b43ff61a5f25ad35d6c9fddd3e7a DIST ccpn-update-2.2.1-111019.patch.xz 68036 RMD160 6481ae9b2ba14f1084e33a7cfde6d75d690cbc84 SHA1 3d0227376ac2d67a421dc9e00cb4a276be8ad671 SHA256 e812aeec0d065e69b59567bb3e1b9d3d47968665bd223edbbd92c74ec811bdc9 DIST ccpn-update-2.2.1-111028.patch.xz 78540 RMD160 4a496dac05b2cc787b7ad27aabf2f22542ff8656 SHA1 25270b1ff71997b766a4fc6b87340016f4e9b6a5 SHA256 31cca8ddd372a45ea0b97d9629918c09e581883eef344685a4fa500874aa8634 +DIST ccpn-update-2.2.1-111124.patch.xz 81296 RMD160 3cbcd233e037d5608140766c20d26365583e6222 SHA1 a8e8e7d1881d10186bd50295453753776ff5892a SHA256 d03d9f9a5834a412660220e1979c257166f112f40437c934030f4831c2c07fe7 EBUILD ccpn-2.1.3.1_p100806.ebuild 5188 RMD160 b66825e37b79a5f6ec6635b9f3236d1cda2da672 SHA1 458f516ffad25d9283b21c9dfb8e50c6323f4264 SHA256 ff57abefefd3bb128a3f96bf039cbaa5ed97350f6b41fdbdd4b4365ff9e68e51 EBUILD ccpn-2.1.5_p110602.ebuild 5802 RMD160 b979b28541d4a52d52df45af0ac194c147e9e586 SHA1 bf731d3e076684670155ea7ed6f862785c961130 SHA256 a5b205266d47c77f3bcb2f4149a53e2866a665d28e49b5749dd0d3774d50cc38 EBUILD ccpn-2.1.5_p110629.ebuild 5802 RMD160 99ce3cef5396276532ab3301e5442f72c379e39e SHA1 9efbd6e35633b15b92449228c17a82890d394c38 SHA256 f29088839b852119b20caa877a105aa4af4a447d60c429b8c7bd92e0918a9ea1 @@ -45,6 +47,7 @@ EBUILD ccpn-2.1.5_p110926.ebuild 6010 RMD160 b1c16c451387a7f6aec29662843d79fa5eb EBUILD ccpn-2.1.5_p111011.ebuild 5766 RMD160 2de7124aa015e929939a35372841eca6b9c6b760 SHA1 d9d40612897662548f67fc05bf19a65ce893c8eb SHA256 1826ca6259f1f58f0b34d8e9baa785d4542e8cdd926370a9be4b36f9d0fc256b EBUILD ccpn-2.1.5_p111017.ebuild 5773 RMD160 74770cdc30a513ca57b66667b9377883cc25ffd4 SHA1 1cc1c784d1921c3922a98548fc4f219327725248 SHA256 5da3935144bbb0b01bc826218c9b92de1148f799a0bd5965f83ca753cc7391e2 EBUILD ccpn-2.1.5_p111028.ebuild 5773 RMD160 71c046eb48f2c1c88e619c4a7cb66ab08a792477 SHA1 9bd4d196cd738e823ef8e118e1620541f7a328fd SHA256 0285a567273fae510d241fc378be5822eef0f7b4319723d5df4e8803ea0f4a10 +EBUILD ccpn-2.1.5_p111124.ebuild 5773 RMD160 40602ef32b4690fc7cc940199f5a18f765d9ee79 SHA1 982e51c9cdcb02b292eebe546a9192f8adb81e01 SHA256 978cbd154039ca80c0b4fdcd11f93ba19f0b7edc7137147488b81177728220e6 EBUILD ccpn-2.2.1_p110602.ebuild 5817 RMD160 02a268d39e592e55955bd768c13d486fa37394df SHA1 4d419c6825b3eba1bbc9d1f21a441fee54633dcf SHA256 d01e038bb78efe67639c2fe0571f17ead32fb931cc14bf3f1a2d0140e322557c EBUILD ccpn-2.2.1_p110629.ebuild 5817 RMD160 10a004a5f52097e30cceef012832dc31ac4a35ee SHA1 7d23a32e384549d53ab406c5e2ff96d6984e8b9c SHA256 99cb9b2c41b7c6cbb8405177b9d99b1c06ad140059bfa001ffbae68bc150b636 EBUILD ccpn-2.2.1_p110817.ebuild 5817 RMD160 e9302ad7cb2e95a8c2e24359691a3c2371402a89 SHA1 923d0a52f358bf45de72d6b71fcb519f187f9298 SHA256 67c4e3e30cb978b5eb879ad532f3b30d3afcd14b3019bb5d27c779607914448c @@ -54,12 +57,13 @@ EBUILD ccpn-2.2.1_p111011.ebuild 5781 RMD160 078beee165b07aa92753a05312179edc6ed EBUILD ccpn-2.2.1_p111017.ebuild 5788 RMD160 f83ad913229aeb54667bf55ec2d5b1563b511492 SHA1 9dbce4e6f7c1e90e84fc389873261410e882fc1d SHA256 6a85c4e9c4ca84325bd2cb6627b7f82d0d245a893ab43bd8fdb39fed74f2876a EBUILD ccpn-2.2.1_p111019.ebuild 5788 RMD160 1199938733ab49962a7cda42f86cb9d1d4d99840 SHA1 ebed2c4883b8c8c4f3788ba4b160df136b1c5d35 SHA256 08dc643197243a4836c440c37258be1651fe1d8b96d46ef4da668ae03d65cdd3 EBUILD ccpn-2.2.1_p111028.ebuild 5788 RMD160 c9d9075636aa52e8e92d3fb1ab7f0800bcfdc3ef SHA1 bb2a99f8bef3327ed15bc118304aec4210a52024 SHA256 bf0fbf5f6558d780925e95b722575f1c3d32607244af1f744c85f58f452fa4ed -MISC ChangeLog 14612 RMD160 9dcfe3cdfd0eb5caf5fa749100c3c9c62ea6439b SHA1 9f89e45f693e7646b19b4825eb646213a819e9e6 SHA256 ecec868d6e7bdccc6cf32fabcefcdec5f52167ff04a7491a73cd789b82db22de +EBUILD ccpn-2.2.1_p111124.ebuild 5788 RMD160 67c30d743b838b890dd3499e36f28b0380e9e644 SHA1 37ea9409000485c057cbbd7d160e02f783b1b3fd SHA256 23aa3778bf05b3bc9a21bcbc79f2bd17516c0b1a82ecd078a8ca6988a846201d +MISC ChangeLog 14811 RMD160 034ba68f2c79cbf0aeba7854853bbcb1cb214baf SHA1 2b7bb2efe689c17d0bab1cf3a0131e73a5a93959 SHA256 ba8d9ddee2a4b35c0450a4e1de8616c17583448e468db08f7fc38798188e8a7b MISC metadata.xml 322 RMD160 9fd5fba7405b689fc39a089d81ffdaa9f961b514 SHA1 0c31132b25fca04cff97ef11fdc11940f90c77d0 SHA256 7468ba4c27b879e7ed5f82274f5837e51f1f389673a33b9e26e1756a6b0783df -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEAREKAAYFAk6qbNsACgkQgAnW8HDreRZgSQCggnOulTvHktMRMh1YWdG4ivwN -sa8AoJxLoUaTdpXDE5X+TP0YK0L5G9GQ -=Fer6 +iEYEAREKAAYFAk7OAiEACgkQgAnW8HDreRanPgCfUBmjiQ3KkbBX0/BGdaASPGAd +qA0An09Tnm3PRYuHqHZYSe51D6olGF7i +=vSpd -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p111124.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p111124.ebuild new file mode 100644 index 000000000000..c1ecb9ceaede --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p111124.ebuild @@ -0,0 +1,214 @@ +# 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_p111124.ebuild,v 1.1 2011/11/24 08:36:43 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.xz" + +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}"* + >=sci-libs/ccpn-data-2.1.5_p111011 + sci-biology/psipred + 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-2.3.2 + 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 + + sed \ + -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \ + -e "s:weights_s:weights:g" \ + -i python/ccpnmr/analysis/wrappers/Psipred.py || die + + 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|gentoousr|${EPREFIX}/usr|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 + + 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_p111124.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p111124.ebuild new file mode 100644 index 000000000000..14650a1952d9 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p111124.ebuild @@ -0,0 +1,214 @@ +# 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_p111124.ebuild,v 1.1 2011/11/24 08:36:43 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.xz" +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}"* + >=sci-libs/ccpn-data-2.2.1_p111011 + sci-biology/psipred + 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-2.3.2-r1 + 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 + + sed \ + -e "/PSIPRED_DIR/s:'data':'share/psipred/data':g" \ + -e "s:weights_s:weights:g" \ + -i python/ccpnmr/analysis/wrappers/Psipred.py || die + + 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|gentoousr|${EPREFIX}/usr|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 + + 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} +} |