diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-09-28 14:17:21 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-09-28 14:17:21 +0000 |
commit | 32f7efeb91c2ef2c968492b4aff9e6c442fc69bf (patch) | |
tree | 0345a139f3b35f1e4b1d02679c5282cb8e132b01 /sci-chemistry | |
parent | Move symlink createtion to the data package (diff) | |
download | historical-32f7efeb91c2ef2c968492b4aff9e6c442fc69bf.tar.gz historical-32f7efeb91c2ef2c968492b4aff9e6c442fc69bf.tar.bz2 historical-32f7efeb91c2ef2c968492b4aff9e6c442fc69bf.zip |
Move symlink createtion to the data package
Package-Manager: portage-2.2.0_alpha59/cvs/Linux x86_64
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/ccpn/ChangeLog | 13 | ||||
-rw-r--r-- | sci-chemistry/ccpn/Manifest | 12 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.1.5_p110928.ebuild | 213 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p110928.ebuild | 213 |
4 files changed, 446 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index cd83b35f8817..07c1db3268a1 100644 --- a/sci-chemistry/ccpn/ChangeLog +++ b/sci-chemistry/ccpn/ChangeLog @@ -1,6 +1,17 @@ # 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.68 2011/09/27 08:26:00 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.69 2011/09/28 14:17:21 jlec Exp $ + + 28 Sep 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p110928.ebuild, + +ccpn-2.2.1_p110928.ebuild: + Move symlink createtion to the data package + +*ccpn-2.2.1_p110928 (28 Sep 2011) +*ccpn-2.1.5_p110928 (28 Sep 2011) + + 28 Sep 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p110928.ebuild, + +ccpn-2.2.1_p110928.ebuild: + Move symlink create to the data package *ccpn-2.2.1_p110926 (27 Sep 2011) *ccpn-2.1.5_p110926 (27 Sep 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index 0e28d5304458..81c96eeb79cf 100644 --- a/sci-chemistry/ccpn/Manifest +++ b/sci-chemistry/ccpn/Manifest @@ -24,28 +24,32 @@ DIST ccpn-update-2.1.5-110629.patch.bz2 86224 RMD160 d4cb190ce84f62639d77f659247 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.1.5-110926.patch.bz2 99882 RMD160 8e1aa7563ea395c9ef68c87fb4d400d8d8ddc3ec SHA1 efafa90ae1edd7bf0be0bffad76c27c514b47213 SHA256 cff2cec1728fa92636ec4b89d638238755ae055c12b8453298c3ee9daceac012 +DIST ccpn-update-2.1.5-110928.patch.xz 96260 RMD160 fdbf92ec90bcf4e0aae2aefcbc61dd71befbea80 SHA1 c6130a35c614222b98c1091f324efac1a28b1a93 SHA256 a6f5928dd0795e8842d446ddc27712b40bccb01ef9a48235d24f54b8b8957313 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-110928.patch.xz 73556 RMD160 c0fc370a3b4b93f5c42f6f4820513e0203d5f480 SHA1 cabb6f89cd2621c4380f3546e8d38e413502f339 SHA256 50af2ca7ed5b2af7772e0111c7dcd7aadbf55f90f0a623f6642dc9d042fff9ce 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.1.5_p110926.ebuild 5971 RMD160 632413ffb550cfc36299c2107b430c4eb3ae3bdf SHA1 5e6c3fa4d68ee075c785d4101740f36698bc9098 SHA256 4891223c20b5be543e892f746dc59d5b4d2dd34b45f492e0593852bbda103197 +EBUILD ccpn-2.1.5_p110928.ebuild 5727 RMD160 d339eadadecfd10dca4de1517ebaacb359dbc54f SHA1 5898d4814e82c4d67f209c2da502dd3041a7ecdb SHA256 140eb320ff25cc5d8b3e643047006be8b00fd82e271a2bab4a9a0117d22ff9ca 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 EBUILD ccpn-2.2.1_p110905.ebuild 5806 RMD160 12307b04226e935f4b81649515a0cfbfc6d1b26c SHA1 fe299ba1ab0dbe330dbe3170e74d0488943291ae SHA256 e770d80a032174cdd5e533afd5d70caa8e8913e44544eb151c02334ef770480f EBUILD ccpn-2.2.1_p110926.ebuild 5983 RMD160 3a1f53b1e71cb58c3d8668ef73bd4a13bb70c19c SHA1 cae4a96243081a557393fe8c522f67539bfcec29 SHA256 070cb02b41dc1361a82c8450d120de472639114bf0059c1b83d17ddf78814e19 -MISC ChangeLog 12752 RMD160 951407cfb564668298cd89e1c20cbb84bb07bc33 SHA1 d706bc8741dad3f10e00869facb3bc276e559b61 SHA256 522c3a07ccca5ca8c737e9d2f9e3397dde5631340abf0c12aa185b0b9ac237e9 +EBUILD ccpn-2.2.1_p110928.ebuild 5739 RMD160 55248e3a99574506e96a51611904d4b1237854cd SHA1 e595ef3f35bd0728c4d876d234f116bf78395a4d SHA256 e1d04394d505978761c9ed4bf73eeb90c7414d7bd88ee9d71b6b13a628e321e5 +MISC ChangeLog 13121 RMD160 88a67db9bb826c2768ff1ca9e762c6247357dad3 SHA1 5f4b113a738862dea2a7882514336830cc267984 SHA256 5ec72851b63c1c0146e6e4df4c90b75c7b3feb7f7a72a84be34a56e1ccb265f9 MISC metadata.xml 322 RMD160 9fd5fba7405b689fc39a089d81ffdaa9f961b514 SHA1 0c31132b25fca04cff97ef11fdc11940f90c77d0 SHA256 7468ba4c27b879e7ed5f82274f5837e51f1f389673a33b9e26e1756a6b0783df -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) -iEYEAREKAAYFAk6BiL4ACgkQgAnW8HDreRZzRACeIcqVrWxRzLa3KNC05o6eDTjW -kvwAniYuqZUtiwxTpHfmV6L2yJUeeRUh -=tocu +iEYEAREKAAYFAk6DLHwACgkQgAnW8HDreRYLogCdFmXNzRoBAUZApW+GqZpzWM2+ +PZYAn2YEQFzlC3eFR42ZKVypHTDaaEAM +=BhFc -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p110928.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p110928.ebuild new file mode 100644 index 000000000000..57f21311f6b5 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p110928.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_p110928.ebuild,v 1.1 2011/09/28 14:17:21 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-${PVR} + 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 + 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_p110928.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p110928.ebuild new file mode 100644 index 000000000000..2aa3c4422546 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p110928.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_p110928.ebuild,v 1.1 2011/09/28 14:17:21 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-${PVR} + 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 + 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} +} |