diff options
author | Justin Lecher <jlec@gentoo.org> | 2011-04-01 10:35:38 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2011-04-01 10:35:38 +0000 |
commit | 6ca3bb4b64f557736321b3942e6be0d9ec80aee9 (patch) | |
tree | e2892b7f67005136c81c616a3af42f49085cbc69 /sci-chemistry/ccpn | |
parent | Use ED since we use eapi3. (diff) | |
download | historical-6ca3bb4b64f557736321b3942e6be0d9ec80aee9.tar.gz historical-6ca3bb4b64f557736321b3942e6be0d9ec80aee9.tar.bz2 historical-6ca3bb4b64f557736321b3942e6be0d9ec80aee9.zip |
Upstream changes to python modul added
Package-Manager: portage-2.2.0_alpha29/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_p110401.ebuild | 213 | ||||
-rw-r--r-- | sci-chemistry/ccpn/ccpn-2.2.1_p110401.ebuild | 213 |
4 files changed, 442 insertions, 5 deletions
diff --git a/sci-chemistry/ccpn/ChangeLog b/sci-chemistry/ccpn/ChangeLog index 016ad1657ff7..5d2def31b578 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.59 2011/03/08 06:21:46 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ccpn/ChangeLog,v 1.60 2011/04/01 10:35:38 jlec Exp $ + +*ccpn-2.2.1_p110401 (01 Apr 2011) +*ccpn-2.1.5_p110401 (01 Apr 2011) + + 01 Apr 2011; Justin Lecher <jlec@gentoo.org> +ccpn-2.1.5_p110401.ebuild, + +ccpn-2.2.1_p110401.ebuild: + Upstream changes to python modul added *ccpn-2.2.1_p110308 (08 Mar 2011) *ccpn-2.1.5_p110308 (08 Mar 2011) diff --git a/sci-chemistry/ccpn/Manifest b/sci-chemistry/ccpn/Manifest index d45652581ac4..42a481ea7660 100644 --- a/sci-chemistry/ccpn/Manifest +++ b/sci-chemistry/ccpn/Manifest @@ -24,24 +24,28 @@ DIST ccpn-update-2.1.5-110217.patch.bz2 64228 RMD160 41035b6bedcb87e84991050aad8 DIST ccpn-update-2.1.5-110222.patch.bz2 64519 RMD160 726a0b719d33d3847a4d89d5ffd32be73255a1b2 SHA1 69d5e2cae6813b45ed9687829c5ef6a3dcdb2c3f SHA256 c83c3ca35be51f29719d50622ee6700cc6c9b57640f6f002a66d46d256a42970 DIST ccpn-update-2.1.5-110226.patch.bz2 64972 RMD160 d5c6934a68c2a02d042c67329a021bbb3bcb97c3 SHA1 9fcf7c1d7053fad9e61769b16c5415c20a56bef0 SHA256 70ebf213b699d1fe4303fcf6c60332863cec02c1284684cdafb502d4af5de79f DIST ccpn-update-2.1.5-110308.patch.bz2 67868 RMD160 7b8aeb929a1f77317d9eb60a7ca830857baac826 SHA1 6ddf0f94086e5fbc26be338002bc98f3944090e3 SHA256 9f70b1ee0bdf302df3f3c91776dc549af0a8a7c7e3088b6e79b9659c16703cfc +DIST ccpn-update-2.1.5-110401.patch.bz2 75380 RMD160 20acef6c31a9e2252a6dcec23f965ae7d498f6b3 SHA1 084b4270142b04c02478e742e2e312c4410ecf13 SHA256 896fc00dfbe97d5ce1bbeac91a2221a79d8d112eac208202cede1a5396286ae7 DIST ccpn-update-2.2.1-110222.patch.bz2 2346 RMD160 89ebe4954b56b25e59f81a7243af088068323f11 SHA1 4b94bf6fa2d1bd1dd0d4bdd2fae4a6caf64b0d1d SHA256 7dd92ee0350beaefddbcbd62420aa5b3699f0797f31a4d47799d2669d8499b7a DIST ccpn-update-2.2.1-110226.patch.bz2 3836 RMD160 95d07934ae6ec7d434c1cacd01858ab606ff8ccb SHA1 eb8a735785206472b5681fdbdb700d3126a6ec9c SHA256 a7576d8e3af8083f324bafa85b598616559307725a00780380de6f5909ea6b4d DIST ccpn-update-2.2.1-110308.patch.bz2 8112 RMD160 6985dd15b0a705b787ddc5d06c16a66575e4dee1 SHA1 c7726a10cfdd94574d1cbc55ea68d63148336251 SHA256 223a40975ccccafffdf08167b3eb5885a826402092fc5d8e23723f01f5b34e48 +DIST ccpn-update-2.2.1-110401.patch.bz2 20666 RMD160 193d7f86ab75d2a862953683ec503bed947f3468 SHA1 cfab70216cd485a68234c06808abcdf51b917d98 SHA256 15468c3e1412d9d2c97ef52bcaac255d65d79dd3016d0ae3adb48f7f3d0dc46f EBUILD ccpn-2.1.3.1_p100806.ebuild 5190 RMD160 c1dd4e2443ab5cf8386627a9feba25be6e61b715 SHA1 0d9700191a04c6ed5f106e2712b010d499315827 SHA256 ed26ef362193f91d4726fd49a1c4b19c1f975c3847b0616ada2e64ce7a90ffa5 EBUILD ccpn-2.1.5_p110202.ebuild 5770 RMD160 98c49d481a5a0e28d2f62b303950bab3467c3246 SHA1 2fb5b0d792b4dcfac20f4d11d405104ab5f81129 SHA256 77d1d7239204ffa4247501133996478e13f07b863fdfebe5d4b056089f9e08ba EBUILD ccpn-2.1.5_p110217.ebuild 5794 RMD160 acbb36a1c2f01d9d6944b421b20f5c6ed8a2766e SHA1 268ced5e44ed04339e96242560c06d84ebb3031e SHA256 b6b776e2972389b0e2cbd8054c4a52bb50a5310e5c99364bd7b4ae0cd32c3872 EBUILD ccpn-2.1.5_p110222.ebuild 5794 RMD160 3a528e62388cd87f6911d00049687f4ad8a21990 SHA1 3c4443f4caa7a7138cc4e33d7ae29988413849db SHA256 b7b1180d996abc515d8d4040c6119f3798b5d8c2f035b5d57f33d05616f99cb9 EBUILD ccpn-2.1.5_p110226.ebuild 5794 RMD160 0ccb454a05faa00f6ef9087ad979ae0bb12eeb57 SHA1 cf8cfe88e665772cc6e2c8d42718ff711d5b6c4c SHA256 3e7548fa407b4cc3dfc30618f100b515f82bd6920d5182cddbd5cf0003bf9d22 EBUILD ccpn-2.1.5_p110308.ebuild 5794 RMD160 cd635335e052642cc6216b646aace2ab625a13e9 SHA1 6cc2205d0ef6b7304f3f6041f91a01a0da803fa6 SHA256 0a8f7cda9fbc99e1a9f16c3081dcd7920aae188fbecedbb2f1a4ee6fba90770d +EBUILD ccpn-2.1.5_p110401.ebuild 5794 RMD160 d28f97f70b7d2c7e67680ccbc7dfa80f3c7e4c16 SHA1 995d70095ca28b0f4e24cb3dcab85ffd66a0e55f SHA256 1562e73abd583a6904b16bda472e39c0e384392014f76b706377ca871bf91033 EBUILD ccpn-2.2.1_p110222.ebuild 5806 RMD160 9145fa2208f389a1399e91a3406190cb92ebb6bc SHA1 8b978ecaf8cb6992a958170b80a71f9399726b5c SHA256 a7102fefe463355b9a0119850fb3c1ae597c663814ac83e340908820eef97be5 EBUILD ccpn-2.2.1_p110226.ebuild 5806 RMD160 ec1671816fa06ddc53a3bcd12faeb3869dff5094 SHA1 85922fac46dd185e7ebd3a3a4dfb61cf942b2adc SHA256 34942eea58c13108a7605de8b0721bdebd5b0b320b0b596c9d084e90f6059a85 EBUILD ccpn-2.2.1_p110308.ebuild 5806 RMD160 a85b12264e5717e2564d97cbd9b1c3d5d685cd32 SHA1 371ff75268ca9a0cc9a37df35c4c57641ea70707 SHA256 7f9bfe05904a1c5320c3e11a1397227f0f6d5f1f59dd8288045aef84513a8c5d -MISC ChangeLog 10164 RMD160 7f9c4e5732d96b4ff0054ec17ffb8cfa5e8aba07 SHA1 18b8f86471cdddd922be5e0ae72f691e6b0d3b7a SHA256 a54981fd0dbf63c2cc8314d1d3c7124cb75061c11842371f45a33e8dd71a05f6 +EBUILD ccpn-2.2.1_p110401.ebuild 5806 RMD160 9ead6d298b01630008ac0caab8b9a09b5af72feb SHA1 2977a61ae37b49ff5b978aaa274632f74de47ed4 SHA256 b7a12ad78c0b4ddac1400e4d26fa24b5c024de5cecbd814f7f922a348f2cdc60 +MISC ChangeLog 10380 RMD160 dc195f1478ab376269500ac5515f75844bc90d3e SHA1 63ee459e817c127876745604307d8e1e3c700a9c SHA256 f4500a5351de88f7acd1b323c5603fb550e7a17df11f5d379241fe3e7cfec751 MISC metadata.xml 317 RMD160 6e56ad407f163d80504468f6fedcfb35fc31db00 SHA1 30b72b0612b1f91712537d24e3a2407eec50e1dd SHA256 1fb093ab05124dcd078fc93a4aa6f787f5829066e100ed98da8ecf65cece63fb -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk11yv8ACgkQgAnW8HDreRaH9wCeKFSQuO/lcgeGNvO8NUyRouRf -nkoAoIF9ih3OW3bvSmViETLyGsWy79S8 -=7HfX +iEYEARECAAYFAk2VqoAACgkQgAnW8HDreRZQsQCeP/kBPbD4A+GWr/AuTi7XNseI +1KwAoMjBY3CNM4+VW3uTEC83IzExXgLU +=+eyH -----END PGP SIGNATURE----- diff --git a/sci-chemistry/ccpn/ccpn-2.1.5_p110401.ebuild b/sci-chemistry/ccpn/ccpn-2.1.5_p110401.ebuild new file mode 100644 index 000000000000..6189b6ac9723 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.1.5_p110401.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_p110401.ebuild,v 1.1 2011/04/01 10:35:38 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_p110401.ebuild b/sci-chemistry/ccpn/ccpn-2.2.1_p110401.ebuild new file mode 100644 index 000000000000..06c1e6109bf3 --- /dev/null +++ b/sci-chemistry/ccpn/ccpn-2.2.1_p110401.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_p110401.ebuild,v 1.1 2011/04/01 10:35:38 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} +} |