diff options
Diffstat (limited to 'sci-chemistry')
-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_p111017.ebuild | 213 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p111017.ebuild | 213 |
4 files changed, 442 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index e46618957cc0..b53d5e7e1b83 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.71 2011/10/11 19:28:28 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.72 2011/10/17 15:38:40 jlec Exp $ + +*ccpn-2.2.1_p111017 (17 Oct 2011) +*ccpn-2.1.5_p111017 (17 Oct 2011) + + 17 Oct 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.2.1_p111017.ebuild, + +ccpn-2.1.5_p111017.ebuild, metadata.xml: + Todays Python patches *ccpn-2.2.1_p111011 (11 Oct 2011) *ccpn-2.1.5_p111011 (11 Oct 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index 08a2737cddaf..5b94a0f6b309 100644 --- a/sci-chemistry/ccpn/Manifest +++ b/sci-chemistry/ccpn/Manifest @@ -25,12 +25,14 @@ DIST ccpn-update-2.1.5-110817.patch.bz2 88191 RMD160 9fe24e51a1416cdde25ac6d25c2 DIST ccpn-update-2.1.5-110905.patch.bz2 99670 RMD160 d3163c0d2d07661e318fa101267ef9dba6d05244 SHA1 3b61f72e66bf56c8c2799b864eef91643a30f367 SHA256 c2fa8f6c3f9826747e9f244a46b7ab701ff83dabc36f8ae534db0d76239c5da9 DIST ccpn-update-2.1.5-110926.patch.bz2 99882 RMD160 8e1aa7563ea395c9ef68c87fb4d400d8d8ddc3ec SHA1 efafa90ae1edd7bf0be0bffad76c27c514b47213 SHA256 cff2cec1728fa92636ec4b89d638238755ae055c12b8453298c3ee9daceac012 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.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 DIST ccpn-update-2.2.1-110905.patch.bz2 78329 RMD160 295a3057f4ccd0ad89a3bc75a9992351953be891 SHA1 b7f1e545777d5850564475ce5fb495c0f516a748 SHA256 e3823d29f58a2f6adb3a1855c6665604d8cff8a7f26af75f2b8c6c990a58a36f DIST ccpn-update-2.2.1-110926.patch.bz2 79805 RMD160 2eb19fe8cc1bcf98dba2aa892f41cef16ababd01 SHA1 09199cec4c733befb32558d5138fff93a94fa03f SHA256 5e8b44399cb0fd3b0a20405c3c65428aefd3a47445a003e40f4caac2fe77fd41 DIST ccpn-update-2.2.1-111011.patch.xz 76948 RMD160 1bac8433d91adb373971a4130bb9a89cf46a4051 SHA1 a6001349d0da0bcf9f1142c5b4050ad1903fdf0d SHA256 ec7fc527d6f869f2a952e52e73a4ea17a257237e9724e4916119ba484688aeeb +DIST ccpn-update-2.2.1-111017.patch.xz 76984 RMD160 26a58d486bdc33cafaced593c327a00162b6605a SHA1 e8503957efaa6deb53c8537b954ec2ce972a6bc4 SHA256 73e38c80b38957a9484e885cb4c867f67d17b43ff61a5f25ad35d6c9fddd3e7a 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 @@ -38,18 +40,20 @@ EBUILD ccpn-2.1.5_p110817.ebuild 5802 RMD160 112485a848b98a5f8377b2d05c8555147de EBUILD ccpn-2.1.5_p110905.ebuild 5802 RMD160 4213a4957af30e78714604bed3cc565acc172a71 SHA1 579587f639367f3988f9f1925e78751bad08ad41 SHA256 dcf706cbadac4352090d7650838af11e0d5c03c6b42d71ba7d4906847b248f92 EBUILD ccpn-2.1.5_p110926.ebuild 5979 RMD160 2e45a9cfeaf5dde3da4a5e21855e0ac940cbf03c SHA1 eec884bcd131188d897d9328307e5f2212843591 SHA256 1a29fd4f7e4a77d3dc4f87e3acd5c7531818d2d67e8b4bf529f61de8ec14bee6 EBUILD ccpn-2.1.5_p111011.ebuild 5735 RMD160 345cedf4338bccb608cfb9594fc755006fd3cc8c SHA1 f68f3114f6b43f8361d87651b587066bbdbe2cf8 SHA256 a3f7fe3a060faeade96be90d59b937bf6a17172f3fec98e962806a38b013c3e1 +EBUILD ccpn-2.1.5_p111017.ebuild 5742 RMD160 ee685d3cbf28c2d48d48eb9eeb0c98a88b6e43b5 SHA1 f00ef8088e7a663281166f6b6c04c2fbe6ed06ab SHA256 6032c58bee52646ae332082b40fad322cebba125cb2007d77c6338419d1dbe7b 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 EBUILD ccpn-2.2.1_p110905.ebuild 5817 RMD160 d3f9cc71971395a5e7b907c7081851d756f9ced8 SHA1 dd8c79e2b29af8f9de92edf4b0e9425f13fd6203 SHA256 4b8d550918003a3f3e25c043ed2625ea634c08ffc353a6354579a235c7a1e2a1 EBUILD ccpn-2.2.1_p110926.ebuild 5994 RMD160 9129c768ad48573ce77f78eba188ac9463f1e4e6 SHA1 62537eb587b07d685eab4a3283830d8c4ae98ea6 SHA256 98c21322d95f3b0049382c3a541a318dc9c7b4fa65257b64ef4185ded414d5d2 EBUILD ccpn-2.2.1_p111011.ebuild 5750 RMD160 f1f681042dbd6c477195c3a660dd7891a8d68eec SHA1 918ed53ea2036dc6526983fb560b50bc611b81af SHA256 72d5d8ab6b144a1a630d2b5aa85cf17b813630926bd747fbd9808c89c968f26d -MISC ChangeLog 13864 RMD160 51aaef9514c2003426b9b07d19a5975fd826ace1 SHA1 6b2f06899612840478f2c7a69900991ed5e89d44 SHA256 d43c4f5ae84460fc2aff30173440d9e4f62b9db662f2cb224245976e60c10528 +EBUILD ccpn-2.2.1_p111017.ebuild 5757 RMD160 59e601b865038e47ab236e15b853fdb1313cfde0 SHA1 9b97afb8481bb1c425dcf2af4a9de62bc7405ae3 SHA256 f6680f2892d4f407a4d8f9e17577e6e28d8d581b6db6eabfa440700a93c720bb +MISC ChangeLog 14077 RMD160 47d58d1c6e3c7adbad0415b2deb694dceea4d554 SHA1 415d508ba621913decc2351ad1e6e15aabce3c1a SHA256 3b38dae785c75500f0b0f3ae5bc0e6b3874d687d61419f3f3493539f469da2d4 MISC metadata.xml 322 RMD160 9fd5fba7405b689fc39a089d81ffdaa9f961b514 SHA1 0c31132b25fca04cff97ef11fdc11940f90c77d0 SHA256 7468ba4c27b879e7ed5f82274f5837e51f1f389673a33b9e26e1756a6b0783df -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEAREKAAYFAk6UmOcACgkQgAnW8HDreRaFBgCePYAMPw5R3yX9AgdzvgJzuVXs -jYAAnRn0iE+w5Qtje40hLuQmkBT3UvwG -=F4eF +iEYEAREKAAYFAk6cTAUACgkQgAnW8HDreRa8WgCeL465OJCXPNkQ5G0ry8I/r/j2 +/d0An0+10+J6iR31MReo2l9AhGQ0Pvjq +=4rnT -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p111017.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p111017.ebuild new file mode 100644 index 000000000000..29908be3c9f1 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p111017.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_p111017.ebuild,v 1.1 2011/10/17 15:38:40 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" \ + -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_p111017.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p111017.ebuild new file mode 100644 index 000000000000..28849630e1fe --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p111017.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_p111017.ebuild,v 1.1 2011/10/17 15:38:40 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" \ + -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} +} |