diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-12-13 08:33:36 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-12-13 08:33:36 +0000 |
commit | bd71cf2c2d3aa2b0e29472390a5b0f926c60ca54 (patch) | |
tree | d5ea5162d9e925cbd0be12fafd8c16e1670cc405 /sci-chemistry/ccpn | |
parent | Version bump. (diff) | |
download | historical-bd71cf2c2d3aa2b0e29472390a5b0f926c60ca54.tar.gz historical-bd71cf2c2d3aa2b0e29472390a5b0f926c60ca54.tar.bz2 historical-bd71cf2c2d3aa2b0e29472390a5b0f926c60ca54.zip |
Todays Python patches
Package-Manager: portage-2.2.0_alpha80/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_p111213.ebuild | 214 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p111213.ebuild | 214 |
4 files changed, 444 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index 96c8f13a1364..b0b7f0fd0413 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.75 2011/11/24 08:36:43 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.76 2011/12/13 08:33:36 jlec Exp $ + +*ccpn-2.2.1_p111213 (13 Dec 2011) +*ccpn-2.1.5_p111213 (13 Dec 2011) + + 13 Dec 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p111213.ebuild, + +ccpn-2.2.1_p111213.ebuild: + Todays Python patches *ccpn-2.2.1_p111124 (24 Nov 2011) *ccpn-2.1.5_p111124 (24 Nov 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index d56911258c33..1489f0c83a2d 100644 --- a/sci-chemistry/ccpn/Manifest +++ b/sci-chemistry/ccpn/Manifest @@ -28,6 +28,7 @@ DIST ccpn-update-2.1.5-111011.patch.xz 103208 RMD160 475d1f1bba8e72c2e30340d3ab3 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.1.5-111213.patch.xz 104892 RMD160 d2a83a0b809a91f8f8422a24c11ce20a8e2cde8d SHA1 ae819afdf4cb6aa39c9059cd1bb96d3d188a86fb SHA256 72bbe7f2a68ee20eca029685b8b3daaf15f71d164767b3aa5d222c3a5de779b1 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 @@ -38,6 +39,7 @@ DIST ccpn-update-2.2.1-111017.patch.xz 76984 RMD160 26a58d486bdc33cafaced593c327 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 +DIST ccpn-update-2.2.1-111213.patch.xz 81520 RMD160 55038a1272f8e01ce54fefdba081ee51ec5d4f36 SHA1 0bbd8c029a98b282002d8b5385a85355722de323 SHA256 807cef8e8b2822e178d50695c7e234ea8c243264a4711610f6a95e30e1b40d12 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 @@ -48,6 +50,7 @@ EBUILD ccpn-2.1.5_p111011.ebuild 5766 RMD160 2de7124aa015e929939a35372841eca6b9c 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.1.5_p111213.ebuild 5773 RMD160 4fc120d9e6c5ecfd375a3df14a7b8b9afdebb3b5 SHA1 30bb2d2e22087ac6c93434863f1347db50f2514f SHA256 46de0ddcfd2fcb196dfb9ceb07c74c25ff3c8f4655b55f5e4b2f1d90a3787641 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 @@ -58,12 +61,13 @@ EBUILD ccpn-2.2.1_p111017.ebuild 5788 RMD160 f83ad913229aeb54667bf55ec2d5b1563b5 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 EBUILD ccpn-2.2.1_p111124.ebuild 5788 RMD160 67c30d743b838b890dd3499e36f28b0380e9e644 SHA1 37ea9409000485c057cbbd7d160e02f783b1b3fd SHA256 23aa3778bf05b3bc9a21bcbc79f2bd17516c0b1a82ecd078a8ca6988a846201d -MISC ChangeLog 14811 RMD160 034ba68f2c79cbf0aeba7854853bbcb1cb214baf SHA1 2b7bb2efe689c17d0bab1cf3a0131e73a5a93959 SHA256 ba8d9ddee2a4b35c0450a4e1de8616c17583448e468db08f7fc38798188e8a7b +EBUILD ccpn-2.2.1_p111213.ebuild 5788 RMD160 49f50c489d3eee93f80e1548c66fe2acf1131e20 SHA1 fe36614826a38746d32f32071f8583744fa263fd SHA256 2f25c2e6e348f37d95bc89dc36137303def1c66a02ff1603eedb8c32f61867e4 +MISC ChangeLog 15010 RMD160 69c0a89d67873d1ed305f172bdeeda14de6671e4 SHA1 08af23375e54832c13b03edecd575aed79a5ca62 SHA256 c717826240b6edf5f6a573e219eda7db43c0c7fef4595d72e635d53d1c2746f2 MISC metadata.xml 322 RMD160 9fd5fba7405b689fc39a089d81ffdaa9f961b514 SHA1 0c31132b25fca04cff97ef11fdc11940f90c77d0 SHA256 7468ba4c27b879e7ed5f82274f5837e51f1f389673a33b9e26e1756a6b0783df -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEAREKAAYFAk7OAiEACgkQgAnW8HDreRanPgCfUBmjiQ3KkbBX0/BGdaASPGAd -qA0An09Tnm3PRYuHqHZYSe51D6olGF7i -=vSpd +iEYEAREKAAYFAk7nDeYACgkQgAnW8HDreRbNcwCgnuaNufAbEgOugaw76YudZySC +ynUAnRENqyT5onSNL3SABwabzd8L6Umn +=CDS1 -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p111213.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p111213.ebuild new file mode 100644 index 000000000000..7c1269cadc79 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p111213.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_p111213.ebuild,v 1.1 2011/12/13 08:33:36 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_p111213.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p111213.ebuild new file mode 100644 index 000000000000..b004c24dc7a2 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p111213.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_p111213.ebuild,v 1.1 2011/12/13 08:33:36 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} +} |