diff options
author | Justin Lecher <jlec@gentoo.org> | 2012-01-09 12:42:11 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2012-01-09 12:42:11 +0000 |
commit | 3e8e628679446ca3f2f57d03bc9c380f172b7ab5 (patch) | |
tree | fc22a326412b0dd4d97492a33e38576bdfb0c513 /sci-chemistry | |
parent | Stable for AMD64, wrt bug #397617 (diff) | |
download | historical-3e8e628679446ca3f2f57d03bc9c380f172b7ab5.tar.gz historical-3e8e628679446ca3f2f57d03bc9c380f172b7ab5.tar.bz2 historical-3e8e628679446ca3f2f57d03bc9c380f172b7ab5.zip |
Todays Python Patches
Package-Manager: portage-2.2.0_alpha84/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/ccpn/ChangeLog | 11 | ||||
-rw-r--r-- | sci-chemistry/ccpn/Manifest | 12 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.1.5_p120109.ebuild | 214 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p120109.ebuild | 214 |
4 files changed, 445 insertions, 6 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index d5aa8f7216d1..52351934cb27 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.78 2011/12/21 13:46:42 jlec Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.79 2012/01/09 12:42:11 jlec Exp $ + +*ccpn-2.2.1_p120109 (09 Jan 2012) +*ccpn-2.1.5_p120109 (09 Jan 2012) + + 09 Jan 2012; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p120109.ebuild, + +ccpn-2.2.1_p120109.ebuild: + Todays Python Patches *ccpn-2.2.1_p111221 (21 Dec 2011) *ccpn-2.1.5_p111221 (21 Dec 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index c1525f8b9942..96cb90a171e5 100644 --- a/sci-chemistry/ccpn/Manifest +++ b/sci-chemistry/ccpn/Manifest @@ -22,22 +22,26 @@ DIST ccpn-update-100806.patch.bz2 187965 RMD160 3297162fe3314aa405ee58737ce45cda DIST ccpn-update-2.1.5-111213.patch.xz 104892 RMD160 d2a83a0b809a91f8f8422a24c11ce20a8e2cde8d SHA1 ae819afdf4cb6aa39c9059cd1bb96d3d188a86fb SHA256 72bbe7f2a68ee20eca029685b8b3daaf15f71d164767b3aa5d222c3a5de779b1 DIST ccpn-update-2.1.5-111220.patch.xz 105472 RMD160 f8c358e7bc7757a4f645a2f26fa38e0159e5bc2f SHA1 21721845d3f0df77c548a3e5774ed5a82f3d12df SHA256 a4d8d4982c8bf63031cd11cbe67121a598b97f1c490862c363555bf9c2f11140 DIST ccpn-update-2.1.5-111221.patch.xz 105424 RMD160 70f3b43b0ef4a827cb43f4673ca426deacff13d5 SHA1 6a240d2db8afe9166c8965207ac6701859089fba SHA256 fa9385c46b2aa535917b68de1c9ac0a0dcf0e4a3b2362ec75274fe8374289ca6 +DIST ccpn-update-2.1.5-120109.patch.xz 105508 RMD160 a485389af341270598a134a37e061674b935b60b SHA1 b0b3159ab01eda8d93971172bf9b62a588604d30 SHA256 024d65a1e2d82815db891ef920c10442366413d9aeefe7dd6d0d17d7bdbb37ba DIST ccpn-update-2.2.1-111213.patch.xz 81520 RMD160 55038a1272f8e01ce54fefdba081ee51ec5d4f36 SHA1 0bbd8c029a98b282002d8b5385a85355722de323 SHA256 807cef8e8b2822e178d50695c7e234ea8c243264a4711610f6a95e30e1b40d12 DIST ccpn-update-2.2.1-111220.patch.xz 82840 RMD160 c0fb328ad93d7f07e1f0d45215d7686204315f91 SHA1 7b2ef76c62e85fcb4c5c95be053a9e281bc3d59d SHA256 f8942568e4f859da71e5a38b279355222882de19328501a0297bcddefef75c9f DIST ccpn-update-2.2.1-111221.patch.xz 82988 RMD160 e1ce373080f97411d9b00a269d8ed29ab8a4db0e SHA1 fe68eccce53bbbc7cfd69d398381cf3b28303c2d SHA256 6482ac0a90b34e4fbb6944a2f158d8743f6a23d7b28193b28fe7517044e27a76 +DIST ccpn-update-2.2.1-120109.patch.xz 85304 RMD160 3f2662f16f8c52b8c3813a0a45ad12f26bb8ba3c SHA1 267686361c0ee730d132beede957591428cd7016 SHA256 2997ae03541267e75577f4df317c6a9b69a282723271a6689265a9c2309c5769 EBUILD ccpn-2.1.3.1_p100806.ebuild 5188 RMD160 b66825e37b79a5f6ec6635b9f3236d1cda2da672 SHA1 458f516ffad25d9283b21c9dfb8e50c6323f4264 SHA256 ff57abefefd3bb128a3f96bf039cbaa5ed97350f6b41fdbdd4b4365ff9e68e51 EBUILD ccpn-2.1.5_p111213.ebuild 5773 RMD160 4fc120d9e6c5ecfd375a3df14a7b8b9afdebb3b5 SHA1 30bb2d2e22087ac6c93434863f1347db50f2514f SHA256 46de0ddcfd2fcb196dfb9ceb07c74c25ff3c8f4655b55f5e4b2f1d90a3787641 EBUILD ccpn-2.1.5_p111220.ebuild 5773 RMD160 726f13ab2aa4532df15cbdc5a96b15293e53791e SHA1 5038f1c70ee0979181278ad3bbc9cdafff54d81c SHA256 7c21ffd5368b3a1c46ee838be8b970c6f7af371ea1048a253eca9c4c73af40c8 EBUILD ccpn-2.1.5_p111221.ebuild 5773 RMD160 466f12257ec67eb942856702439f3f3b980618e7 SHA1 c7b160431d76ec2d619d4af84c24daf29a7594af SHA256 64429004d43a013ddeaad65e5aa7e6df9aafb1a5ff05455864f8ed88918bc5de +EBUILD ccpn-2.1.5_p120109.ebuild 5773 RMD160 e382dac6b717b686f0f3d602ef5a1ca37835196e SHA1 57259c9f366f8f30fd2778491387d0235eff1269 SHA256 13a02a66fd2823d55529f6ccfde31e8523e211f62d892a93af262ff37e29313f EBUILD ccpn-2.2.1_p111213.ebuild 5788 RMD160 49f50c489d3eee93f80e1548c66fe2acf1131e20 SHA1 fe36614826a38746d32f32071f8583744fa263fd SHA256 2f25c2e6e348f37d95bc89dc36137303def1c66a02ff1603eedb8c32f61867e4 EBUILD ccpn-2.2.1_p111220.ebuild 5788 RMD160 abb85d91207669ef94be18d38b4e9efc5dca135b SHA1 e07108a62c4867be2d4538a0ecf09bf5ac4dd968 SHA256 37885cacf0a4e97d05201b18949b87889c5e5965f04434399a2e52b24d30cf98 EBUILD ccpn-2.2.1_p111221.ebuild 5788 RMD160 e722eaef088dbe8f273190fed6331157ab57c553 SHA1 97328118dcde05d92d7d5410f61a8c2b9b5badc5 SHA256 72216a2ec437f6cafa02eb435fffcf97bc274c5d6009f303a3eb214bd08badf5 -MISC ChangeLog 15971 RMD160 327d2cf3b19ca3896e89d61188e7a29f251ebb30 SHA1 34239192b5ccea8cd4abac9554b38722311034c4 SHA256 05786084d91cf44b8c6a11f0b5cd3c31cd3a423e7b9cedbcd5ef50d28171d674 +EBUILD ccpn-2.2.1_p120109.ebuild 5788 RMD160 2497c798c7de97c708b7835810623a0384d1e218 SHA1 233aa1787b5dfa4e39fe7bd330d38255e77be5cb SHA256 bd873ee86eff68721575836e60a989e966ace314dd34dd07dd3ece180b899239 +MISC ChangeLog 16170 RMD160 ade7204956f1edd0a9e1990cf71f194b9e93b019 SHA1 b38a208282c65b6f7aab5c8867fdf845fe74d6e3 SHA256 1afcaa694756d306bb7c967050ed859ccfdeea97c44d33c8e29cd54e88d2ac85 MISC metadata.xml 322 RMD160 9fd5fba7405b689fc39a089d81ffdaa9f961b514 SHA1 0c31132b25fca04cff97ef11fdc11940f90c77d0 SHA256 7468ba4c27b879e7ed5f82274f5837e51f1f389673a33b9e26e1756a6b0783df -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEAREKAAYFAk7x40cACgkQgAnW8HDreRaDZwCfbvIO+XQ1m5fS2/IVaSfQoNYy -JyYAn3Z+v1KFX/4areJfAxGVs1zhtpbn -=5hLj +iEYEAREKAAYFAk8K4KgACgkQgAnW8HDreRaEYwCaA6TibhXWG8kJ+jb7YhsO7oa5 +VQgAoITdHiK/jAFselD/RaQgpkwpMdA3 +=y1uz -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p120109.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p120109.ebuild new file mode 100644 index 000000000000..af75b515c81e --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p120109.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2012 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_p120109.ebuild,v 1.1 2012/01/09 12:42:11 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_p120109.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p120109.ebuild new file mode 100644 index 000000000000..840639d9880c --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p120109.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2012 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_p120109.ebuild,v 1.1 2012/01/09 12:42:11 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} +} |