diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-09-05 08:55:32 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-09-05 08:55:32 +0000 |
commit | 244d8adfc3c96847a5e25b908d7ae19d59c676c0 (patch) | |
tree | 5902bed6fe3c92102b4f3bf39b0f1269ac39c486 /sci-chemistry/ccpn | |
parent | Drop old version (diff) | |
download | historical-244d8adfc3c96847a5e25b908d7ae19d59c676c0.tar.gz historical-244d8adfc3c96847a5e25b908d7ae19d59c676c0.tar.bz2 historical-244d8adfc3c96847a5e25b908d7ae19d59c676c0.zip |
Todays Python Patches
Package-Manager: portage-2.2.0_alpha53/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_p110905.ebuild | 213 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p110905.ebuild | 213 |
4 files changed, 442 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index 6bd1f73ef6e2..311643ae1b8f 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.66 2011/08/17 10:23:13 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.67 2011/09/05 08:55:32 jlec Exp $ + +*ccpn-2.2.1_p110905 (05 Sep 2011) +*ccpn-2.1.5_p110905 (05 Sep 2011) + + 05 Sep 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p110905.ebuild, + +ccpn-2.2.1_p110905.ebuild: + Todays Python Patches *ccpn-2.2.1_p110817 (17 Aug 2011) *ccpn-2.1.5_p110817 (17 Aug 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index 1b98878cf298..b1f9eb4fe30e 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-110602.patch.bz2 81505 RMD160 2af0d5ca21828ccc3345ec763edfce81f2e12d11 SHA1 cf4a8613ecbb11421a4fb007500a6090b017fb2f SHA256 c8880d295914ac95c2ae2f0ffe3eb57e0e2b1b6c3c573eb31c8a40852c5cb886 DIST ccpn-update-2.1.5-110629.patch.bz2 86224 RMD160 d4cb190ce84f62639d77f6592475746e8b9f6a0e SHA1 e20f3313853dff4a3de723a2efc70efe81c63861 SHA256 df847050c95ea925db16a5c6630861e308d39286cc7c207efc4360fce53e29b2 DIST ccpn-update-2.1.5-110817.patch.bz2 88191 RMD160 9fe24e51a1416cdde25ac6d25c2764840c1a00ef SHA1 d16956e6ad7530d17c9e46b877eaf993959f49a2 SHA256 176fd4488c40d7eb426df353d85a05ddb8e4b4126f32264c9d536bf1799fe44c +DIST ccpn-update-2.1.5-110905.patch.bz2 99670 RMD160 d3163c0d2d07661e318fa101267ef9dba6d05244 SHA1 3b61f72e66bf56c8c2799b864eef91643a30f367 SHA256 c2fa8f6c3f9826747e9f244a46b7ab701ff83dabc36f8ae534db0d76239c5da9 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 EBUILD ccpn-2.1.3.1_p100806.ebuild 5188 RMD160 b66825e37b79a5f6ec6635b9f3236d1cda2da672 SHA1 458f516ffad25d9283b21c9dfb8e50c6323f4264 SHA256 ff57abefefd3bb128a3f96bf039cbaa5ed97350f6b41fdbdd4b4365ff9e68e51 EBUILD ccpn-2.1.5_p110602.ebuild 5794 RMD160 8a28dce36877c1bf37a188364d831322f6a88049 SHA1 a5bbc2015b8b7f7f8a11e9a6297be2f80edcf585 SHA256 6c28d2dfd433267d1dcd5ba25de0ae6a8dcfd312df2943cca70e2eb896b2343b EBUILD ccpn-2.1.5_p110629.ebuild 5794 RMD160 a4bc4bfc58ac834cb2551366e8eaf59eb9079f6f SHA1 679454b9f8f7317ebb4b75d9729efe2ccd8fcd1e SHA256 4eb9b69f024bf309d9f88468528aeecffa03f14e96d59a5fca3ce8733e7f6bf0 EBUILD ccpn-2.1.5_p110817.ebuild 5794 RMD160 d18b5e31dcb31eeaff5dc88a26ce2e5db7147906 SHA1 f2485d1ba0d0a7110b1947019770e045e43f8e2c SHA256 8c8a13a96ea4b5707879a422245117491ca4b87f46b3aa2a63e74379ffcc5de1 +EBUILD ccpn-2.1.5_p110905.ebuild 5794 RMD160 5b40785ae8c0471b54e19fa04f0ed008a50f1aa5 SHA1 a728c6529fb566c5537dd6e8c4c0fc75d5725bef SHA256 e009253f4bc3c8b50af8a036a457ec81cb70e06cdd2156e8d8a336acc8e8b16a EBUILD ccpn-2.2.1_p110602.ebuild 5806 RMD160 ad1b5507ba8c6534023cf02498a1689ebad49b71 SHA1 18935d2bb4af71fd0063927084d5bb1a454672dc SHA256 e5d6eae560e472bfa730454d37dad7d7979ded74a2fa7bbcec963332d68d7c0d EBUILD ccpn-2.2.1_p110629.ebuild 5806 RMD160 a63bf6ce2b38cfb5a39a1b98a0666d492fd90c87 SHA1 695710527df0138d62a448870e0a3809aab1ccae SHA256 fad2ae44188fa8fd22f1d0096c9d2164ea947e57f170683e08781fb7f1364f60 EBUILD ccpn-2.2.1_p110817.ebuild 5806 RMD160 397603fb9fea25aea0c5a9d92029a535e2ae7aa2 SHA1 376860302c8aab8fc0a3bcd33931eff158c4459a SHA256 ae98ca1bd9383d1d16051f66e9056bb37884261514e6aec469dfb2a9ebaeb318 -MISC ChangeLog 12160 RMD160 da848c629c448c29ae71f06e1700202fb694707d SHA1 cf7cda54031e19e5e86ab1ab75a2e865c2d267db SHA256 cf4eba4c6954f9e5652a1bc0c696324e48e870fee61073cbee8e0a7f9c22deec +EBUILD ccpn-2.2.1_p110905.ebuild 5806 RMD160 12307b04226e935f4b81649515a0cfbfc6d1b26c SHA1 fe299ba1ab0dbe330dbe3170e74d0488943291ae SHA256 e770d80a032174cdd5e533afd5d70caa8e8913e44544eb151c02334ef770480f +MISC ChangeLog 12359 RMD160 004b2b8a2a967e2ffe9dacef917363a6c25385f8 SHA1 2821106f79a555127d0d1d09a16f4f3281a016ac SHA256 f4a0835b7fef3737634e614d8aa08d2d66062e9da212d41e34379974819d9588 MISC metadata.xml 322 RMD160 9fd5fba7405b689fc39a089d81ffdaa9f961b514 SHA1 0c31132b25fca04cff97ef11fdc11940f90c77d0 SHA256 7468ba4c27b879e7ed5f82274f5837e51f1f389673a33b9e26e1756a6b0783df -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEAREKAAYFAk5LlpcACgkQgAnW8HDreRbAFwCgm9GVMJlakXkMsUf5uHKGDQlu -McUAnA4CHDSFoXZHSSirTwncMiZ5ddrx -=aVYs +iEYEAREKAAYFAk5kjooACgkQgAnW8HDreRa4fQCgm4UbmuQFUokV8ddXQUE3ESmr +fOMAn0SPhD1ywtcEMlKAfkFS21F6uGtC +=G2da -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p110905.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p110905.ebuild new file mode 100644 index 000000000000..6051399c1b3a --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p110905.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_p110905.ebuild,v 1.1 2011/09/05 08:55:32 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_p110905.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p110905.ebuild new file mode 100644 index 000000000000..bc5429cc7a12 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p110905.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_p110905.ebuild,v 1.1 2011/09/05 08:55:32 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} +} |