From 874b69a8c390cd8d3eb8233910ea1613c63d012b Mon Sep 17 00:00:00 2001 From: Justin Lecher Date: Mon, 12 Aug 2013 11:34:42 +0200 Subject: sci-chemistry/nmrpipe: Version Bump Package-Manager: portage-2.2.0_alpha195 RepoMan-Options: --force --- sci-chemistry/nmrpipe/ChangeLog | 6 + sci-chemistry/nmrpipe/Manifest | 6 +- .../files/nmrpipe-7.9.2013.021.23.09-lib.patch | 36 ---- .../files/nmrpipe-8.1.2013.218.23.09-lib.patch | 36 ++++ .../nmrpipe/nmrpipe-7.9.2013.021.23.09-r3.ebuild | 211 --------------------- .../nmrpipe/nmrpipe-8.1.2013.218.23.09.ebuild | 211 +++++++++++++++++++++ 6 files changed, 256 insertions(+), 250 deletions(-) delete mode 100644 sci-chemistry/nmrpipe/files/nmrpipe-7.9.2013.021.23.09-lib.patch create mode 100644 sci-chemistry/nmrpipe/files/nmrpipe-8.1.2013.218.23.09-lib.patch delete mode 100644 sci-chemistry/nmrpipe/nmrpipe-7.9.2013.021.23.09-r3.ebuild create mode 100644 sci-chemistry/nmrpipe/nmrpipe-8.1.2013.218.23.09.ebuild (limited to 'sci-chemistry') diff --git a/sci-chemistry/nmrpipe/ChangeLog b/sci-chemistry/nmrpipe/ChangeLog index 40c0d7102..5ad1beec3 100644 --- a/sci-chemistry/nmrpipe/ChangeLog +++ b/sci-chemistry/nmrpipe/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 12 Aug 2013; Justin Lecher + -nmrpipe-7.9.2013.021.23.09-r3.ebuild, +nmrpipe-8.1.2013.218.23.09.ebuild, + -files/nmrpipe-7.9.2013.021.23.09-lib.patch, + +files/nmrpipe-8.1.2013.218.23.09-lib.patch: + Version Bump + 11 Jul 2013; Justin Lecher -nmrpipe-7.9.2013.021.23.09-r2.ebuild, +nmrpipe-7.9.2013.021.23.09-r3.ebuild: Fix for prefix diff --git a/sci-chemistry/nmrpipe/Manifest b/sci-chemistry/nmrpipe/Manifest index 85a3bbc2f..90f241e2e 100644 --- a/sci-chemistry/nmrpipe/Manifest +++ b/sci-chemistry/nmrpipe/Manifest @@ -1,5 +1,5 @@ -DIST NMRPipeX.tZ 121183011 SHA256 504cec3766729ca5c81cf1327ffdde458243b4d066bdc21eaa43e2b724e0dc0d SHA512 e1b4561876cb0b3b8dc055c0f29e1026e0dd679aeb4044c29088a8bf777a2077622a8d75e6731984dc6816c1b330d639919a2e2bd240b29af7ae1c41d030ff8d WHIRLPOOL 03f4974c9a7de8bcea4ca63aee476d4fb4eadc5e0dce16bc0635905e1f8f36c73314bc458015463590f4c2b1fe49d134a391e3028a143a3b908ddede46c76db3 +DIST NMRPipeX.tZ 121403333 SHA256 5dd0cba157b0682ea9d91d9b3f7bc34fdea791826f1ead7330a32d8ff6429ac5 SHA512 4fbac84a3b18f622de4ffda387ca5f87d121c3ac891d7365828c06d1dca9a8b3879d4ac90ccb5d23e45c104d128bfbcc83a9e2b5ce49e0448ace19abb8662161 WHIRLPOOL a2c0754055eea3856e6992cab6f18d66cd67960210662d816df1e00c0653c27f1ba3a0cc975b7583c40fdeed61291b5990a80d72cc9e2aeef82e7823de8b69a4 DIST binval.com 3865 SHA256 5742154bed54087130fa6093ff62bdc991d12960d7c1ef7e74436aa97e730975 SHA512 6bce8a2bfdb10b4e0997d54043c5447025f6d7e24501fc63591b9184a22523c152a76aebec56a9b8ae9ab01674986d998fde7a77b63477468aa099cdf1791a57 WHIRLPOOL 10e257fefe9905dacd0ee159e80ac488c8781cb6464c01599b0a227023de83bfe9075b34f422f2ab14e4964a75886d53ea43cb0f5cbac3470e6ea96b45355ca0 -DIST dyn.tZ 143897344 SHA256 ccf9924cecb0a80e9895ec20b034069c57bd108d585c72fd44a783e9a818c3a3 SHA512 9cd02cd8bea7301dc64837111a4f8eca4329d54d59369458480cf5d16c3b96ec738aac66de1ccf3d98e9306031db89b43734b256daebb28bd250560198f240eb WHIRLPOOL 5138b87a13e3094644de34a8bf5532d0be5ae775e4eaafd0c728c219560a363a861ea8e7036d7cbd7f7cca63b93ddc757f788925a7b0a5048d43766cda2459fa +DIST dyn.tZ 144108823 SHA256 6c7aa81464714f7da66029f5d76acde4dda3646ca0ab2f6672344fc0639e5438 SHA512 eb405397ea20ba2161012b5be1ad0c9ac13ccb155b4e15b726ebaf45dae59a86dd4ba37a79da7bf3d94d92008301b4d418cb9fc7620e4bfed8c44c778168199d WHIRLPOOL b3d747336283b2d54ac2c2c345081fc56bb13b4d9f29b05343dd98df6239b89a30d6de0d1b3cd1884bd8586ea153d9d7c4927396ec0958a9d9f2d272613c0257 DIST install.com 44432 SHA256 e6a9730652dff943cb276a3434986b379b7ea9db0947e1f26322ea45216c4130 SHA512 45d6d5b93e63abed9139146138a14103282eeca8142f174e85191576d839ffdd4471a606a476f1ad2aae656aff1a4fd762ef1b989b627137236cec1637cda6b5 WHIRLPOOL 0001df370f9eca369ca6c3261a3432b8d828228c923eb8a0b3a0ec789b400ba3f81caab4d6851da7c6578ba86a2730434ce0d4a66cf9297c28b227e0ec2f5ac1 -DIST talos.tZ 56596419 SHA256 25a4a95a78b7363cf48c73fcc0c4706ca129c29696014798f52c9d089d27684e SHA512 c8d7e05fbea0f8dd27a77217b784cbdb305e0247af7b52fb4b0b356868ae66b181afae17b84787455b3e413d453885fbffe815992510804e79eeb937b6fd3509 WHIRLPOOL b916d7b7ed730883a337e3ffdc5a8843884ae3405efc474149ed338adb9cc22017ac04c5ab10848364c9147311fe4233a56778b5e754b8a5e54c48efe0d0b5c9 +DIST talos.tZ 56675905 SHA256 a6ecccc5976be632243fdc1b24d899e70590bf3af0d21fecf3f0e6447d935875 SHA512 764fff10be7ff1ca73af979d132d991cd2517fea68b5cdb17990a47d6581e3fc8ed153392c5f5f4d8f88cdb0434670eadd0cc35d5346372cbdbd1c8811982c42 WHIRLPOOL 86a91abb012246a83e5acb6f286c4dae7b44bf4b423b18d3f7ff076feb1da412abd3536ad37433c483a2e6ac46275cc5075fb446dc6100afde683eaf1ceadbc6 diff --git a/sci-chemistry/nmrpipe/files/nmrpipe-7.9.2013.021.23.09-lib.patch b/sci-chemistry/nmrpipe/files/nmrpipe-7.9.2013.021.23.09-lib.patch deleted file mode 100644 index 91abd611d..000000000 --- a/sci-chemistry/nmrpipe/files/nmrpipe-7.9.2013.021.23.09-lib.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- nmrbin.linux9/nmrDraw 2009-10-07 23:33:21.000000000 +0200 -+++ nmrbin.linux9/nmrDraw.new 2009-10-24 16:29:03.000000000 +0200 -@@ -2,6 +2,17 @@ - - setenv EXTRASMENU $NMRTXT/dot.text_extras_menu - -+setenv NMRBIN ${NMRBASE}/bin/ -+setenv NMRLIB ${NMRBIN}/lib -+setenv AUXLIB ${NMRBIN}/openwin/lib -+ -+if (!($?LD_LIBRARY_PATH)) then -+ setenv LD_LIBRARY_PATH ${NMRLIB}:${AUXLIB} -+else -+ setenv LD_LIBRARY_PATH ${NMRLIB}:${LD_LIBRARY_PATH}:${AUXLIB} -+endif -+ -+ - if ($DISPLAY == "") then - echo Warning: DISPLAY environment variable is not set. - exit 1 ---- nmrbin.linux9/xNotify 2009-10-07 23:33:21.000000000 +0200 -+++ nmrbin.linux9/xNotify.new 2009-10-24 16:29:42.000000000 +0200 -@@ -1,2 +1,13 @@ - #!/bin/csh -f -+ -+setenv NMRBIN ${NMRBASE}/bin -+setenv NMRLIB ${NMRBIN}/lib -+setenv AUXLIB ${NMRBIN}/openwin/lib -+ -+if (!($?LD_LIBRARY_PATH)) then -+ setenv LD_LIBRARY_PATH ${NMRLIB}:${AUXLIB} -+else -+ setenv LD_LIBRARY_PATH ${NMRLIB}:${LD_LIBRARY_PATH}:${AUXLIB} -+endif -+ - xnotify.exe -Wfsdb $* diff --git a/sci-chemistry/nmrpipe/files/nmrpipe-8.1.2013.218.23.09-lib.patch b/sci-chemistry/nmrpipe/files/nmrpipe-8.1.2013.218.23.09-lib.patch new file mode 100644 index 000000000..91abd611d --- /dev/null +++ b/sci-chemistry/nmrpipe/files/nmrpipe-8.1.2013.218.23.09-lib.patch @@ -0,0 +1,36 @@ +--- nmrbin.linux9/nmrDraw 2009-10-07 23:33:21.000000000 +0200 ++++ nmrbin.linux9/nmrDraw.new 2009-10-24 16:29:03.000000000 +0200 +@@ -2,6 +2,17 @@ + + setenv EXTRASMENU $NMRTXT/dot.text_extras_menu + ++setenv NMRBIN ${NMRBASE}/bin/ ++setenv NMRLIB ${NMRBIN}/lib ++setenv AUXLIB ${NMRBIN}/openwin/lib ++ ++if (!($?LD_LIBRARY_PATH)) then ++ setenv LD_LIBRARY_PATH ${NMRLIB}:${AUXLIB} ++else ++ setenv LD_LIBRARY_PATH ${NMRLIB}:${LD_LIBRARY_PATH}:${AUXLIB} ++endif ++ ++ + if ($DISPLAY == "") then + echo Warning: DISPLAY environment variable is not set. + exit 1 +--- nmrbin.linux9/xNotify 2009-10-07 23:33:21.000000000 +0200 ++++ nmrbin.linux9/xNotify.new 2009-10-24 16:29:42.000000000 +0200 +@@ -1,2 +1,13 @@ + #!/bin/csh -f ++ ++setenv NMRBIN ${NMRBASE}/bin ++setenv NMRLIB ${NMRBIN}/lib ++setenv AUXLIB ${NMRBIN}/openwin/lib ++ ++if (!($?LD_LIBRARY_PATH)) then ++ setenv LD_LIBRARY_PATH ${NMRLIB}:${AUXLIB} ++else ++ setenv LD_LIBRARY_PATH ${NMRLIB}:${LD_LIBRARY_PATH}:${AUXLIB} ++endif ++ + xnotify.exe -Wfsdb $* diff --git a/sci-chemistry/nmrpipe/nmrpipe-7.9.2013.021.23.09-r3.ebuild b/sci-chemistry/nmrpipe/nmrpipe-7.9.2013.021.23.09-r3.ebuild deleted file mode 100644 index 51c453057..000000000 --- a/sci-chemistry/nmrpipe/nmrpipe-7.9.2013.021.23.09-r3.ebuild +++ /dev/null @@ -1,211 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -# Versioning is output of nmrPipe -help - -EAPI=5 - -inherit eutils virtualx - -DESCRIPTION="Spectral visualisation, analysis and Fourier processing" -HOMEPAGE="http://spin.niddk.nih.gov/bax/software/NMRPipe/" -#SRC_URI=" -# NMRPipeX.tZ -# talos.tZ -# dyn.tZ -# binval.com -# install.com" -SRC_URI=" - http://spin.niddk.nih.gov/NMRPipe/install/download/install.com - http://spin.niddk.nih.gov/NMRPipe/install/download/binval.com - http://spin.niddk.nih.gov/NMRPipe/install/download/NMRPipeX.tZ - http://spin.niddk.nih.gov/NMRPipe/install/download/talos.tZ - http://spin.niddk.nih.gov/NMRPipe/install/download/dyn.tZ - " - -SLOT="0" -LICENSE="all-rights-reserved" -# Right now, precompiled executables are only available for Linux on the -# x86 architecture. The maintainer chose to keep the sources closed, but -# says he will gladly provide precompiled executables for other platforms -# if there are such requests. -KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" -IUSE="" - -#RESTRICT="fetch strip" -RESTRICT="strip" - -DEPEND="app-shells/tcsh" -RDEPEND="${DEPEND} - app-editors/nedit - dev-lang/tk - dev-tcltk/blt - media-fonts/font-sun-misc - !sci-chemistry/sparta+ - !sci-chemistry/talos+ - sys-libs/ncurses - x11-apps/xset - x11-libs/libX11 - || ( x11-libs/xview x11-libs/xview-bin ) - amd64? ( - app-emulation/emul-linux-x86-baselibs - app-emulation/emul-linux-x86-xlibs - ) - prefix? ( dev-util/patchelf )" - -S="${WORKDIR}" - -NMRBASE="/opt/${PN}" -ENMRBASE="${EPREFIX}/${NMRBASE}" - -QA_PREBUILT=" - opt/nmrpipe/nmrbin.linux9/lib/.* - opt/nmrpipe/nmrbin.linux9/.* - opt/nmrpipe/talos/bin/.* - opt/nmrpipe/talosplus/bin/.* - opt/nmrpipe/promega/.* - opt/nmrpipe/spartaplus/.* - " - -pkg_nofetch() { - einfo "Please visit:" - einfo "\t${HOMEPAGE}" - einfo - einfo "Contact the author, then download the following files:" - for i in ${A}; do - einfo "\t${i}" - done - einfo - einfo "Place the downloaded files in your distfiles directory:" - einfo "\t${DISTDIR}" -} - -src_unpack() { - # The installation script will unpack the package. We just provide symlinks - # to the archive files, ... - for i in NMRPipeX.tZ talos.tZ dyn.tZ; do - ln -sf "${DISTDIR}"/${i} || die - done - # ... copy the installation scripts ... - cp -L "${DISTDIR}"/{binval.com,install.com} . - # ... and make the installation scripts executable. - chmod +x binval.com install.com - # Unset DISPLAY to avoid the interactive graphical test. - # This just unpacks the stuff -# env DISPLAY="" csh ./install.com +type linux9 +dest "${S}"/NMR || die - VIRTUALX_COMMAND="csh ./install.com +type linux9 +dest ${S}/NMR +nopost" virtualmake -} - -src_prepare() { - local bin - epatch "${FILESDIR}"/${P}-lib.patch - - mv nmrbin.linux9/nmr{W,w}ish || die - - ebegin "Cleaning installation" - for i in ${A} ; do - rm -f ${i} || die "Failed to remove archive symlinks." - done - - # Remove some of the bundled applications and libraries; they are provided by Gentoo instead. -# rm -r nmrbin.linux9/{lib/{libBLT24.so,libolgx.so*,libxview.so*,*.timestamp},*timestamp,xv,gnuplot*,rasmol*,nc,nedit} \ - rm -rf nmrbin.linux9/{lib/*.timestamp,*timestamp,xv,gnuplot*,rasmol*,nc,nedit} \ - nmrbin.{linux,mac,sgi6x,sol,winxp} nmruser format \ - || die "Failed to remove unnecessary libraries." - # As long as xview is not fixed for amd64 we do this - rm nmrbin.linux9/lib/{libxview.so*,libolgx.so*} || die - # Remove the initialisation script generated during the installation. - # It contains incorrect hardcoded paths; only the "nmrInit.com" script - # should be used. - rm -f com/nmrInit.linux9.com || die "Failed to remove broken init script." - # Remove installation log files. - rm -f README_NMRPIPE_USERS *.log || die "Failed to remove installation log." - # Remove unused binaries - rm -f {talos*,spartaplus,promega}/bin/*{linux,mac,sgi6x,winxp} pdb/misc/addSeg || die - - # Some scripts are on the wrong place - cp -f nmrtxt/*.com com/ - rm -f {acme,com}/{nmrproc,fid}.com || die - - eend - - ebegin "Fixing paths in scripts" - - # Set the correct path to NMRPipe in the auxiliary scripts. - for i in $(find com/ dynamo/surface/misc/ nmrtxt/ talos/misc talosplus/com -type f); do - sed -e "s%/u/delaglio%${ENMRBASE}%" -i ${i} || die \ - "Failed patching scripts." - done - sed -i "s:${WORKDIR}:${ENMRBASE}:g" com/font.com || die - - sed \ - -e "s:!/bin:!${EPREFIX}/bin:g" \ - -e "s:!/usr/bin:!${EPREFIX}/usr/bin:g" \ - -e "s:!/usr/local/bin:!${EPREFIX}/usr/bin:g" \ - -e "s: /bin: ${EPREFIX}/bin:g" \ - -e "s: /usr/bin: ${EPREFIX}/usr/bin:g" \ - -e "s: /usr/local/bin: ${EPREFIX}/usr/bin:g" \ - -i $(find "${S}" \( -name *.tcl -o -name *.com -o -name *.ksh \) ) \ - {com/,nmrtxt/*.com,nmrtxt/nt/*.com,dynamo/tcl/,talos*/com/,dynamo/tcl/}* \ - nmrbin.linux9/{nmrDraw,xNotify} || die - - eend - - if use prefix; then - sed \ - -e "s: sh : \"${EPREFIX}/bin/sh\" :g" \ - -e "s: csh : \"${EPREFIX}/bin/csh\" :g" \ - -e "s: bash : \"${EPREFIX}/bin/bash\" :g" \ - -e "s:appTerm -e:appTerm -e \"${EPREFIX}/bin/csh\":g" \ - -i com/* || die - - ebegin "Setting RPATH in binaries" - for bin in $(find nmrbin.linux9/ -type f -maxdepth 1); do - patchelf --set-rpath "${EPREFIX}/usr/lib/" ${bin} - done - eend $? - fi -} - -src_install() { - cat >> "${T}"/nmrWish <<- EOF - #!${EPREFIX}/bin/csh -f - setenv NMRBIN \${NMRBASE}/bin/ - setenv NMRLIB \${NMRBIN}/lib - setenv AUXLIB \${NMRBIN}/openwin/lib - setenv TCLPATH \${NMRBASE}/com - setenv TCL_LIBRARY \${NMRBASE}/nmrtcl/tcl8.4 - setenv TK_LIBRARY \${NMRBASE}/nmrtcl/tk8.4 - setenv BLT_LIBRARY \${NMRBASE}/nmrtcl/blt2.4 - setenv NMRPIPE_TCL_LIB \${NMRBASE}/nmrtcl/tcl8.4 - setenv NMRPIPE_TK_LIB \${NMRBASE}/nmrtcl/tk8.4 - setenv NMRPIPE_BLT_LIB \${NMRBASE}/nmrtcl/blt2.4 - - if (!(\$?LD_LIBRARY_PATH)) then - setenv LD_LIBRARY_PATH \${NMRLIB}:\${AUXLIB} - else - setenv LD_LIBRARY_PATH \${NMRLIB}:\${LD_LIBRARY_PATH}:\${AUXLIB} - endif - - nmrwish \$* - EOF - - sed \ - -e "s:/opt/nmrpipe:${EPREFIX}/opt/nmrpipe:g" \ - "${FILESDIR}"/env-${PN}-new \ - > env-${PN}-new || die - newenvd env-${PN}-new 40${PN} - - insinto ${NMRBASE} - doins -r * - - dosym nmrbin.linux9 ${NMRBASE}/bin - - ebegin "Fixing permissions" - chmod 775 "${ED}"/${NMRBASE}/{talos*/bin/,sparta*/bin/,nmrbin.linux9/,com/,dynamo/tcl/,nmrtxt/*.com,talos*/com/,promega/bin/}* || die - eend - - exeinto ${NMRBASE}/nmrbin.linux9 - doexe "${T}"/nmrWish -} diff --git a/sci-chemistry/nmrpipe/nmrpipe-8.1.2013.218.23.09.ebuild b/sci-chemistry/nmrpipe/nmrpipe-8.1.2013.218.23.09.ebuild new file mode 100644 index 000000000..1a81a38f0 --- /dev/null +++ b/sci-chemistry/nmrpipe/nmrpipe-8.1.2013.218.23.09.ebuild @@ -0,0 +1,211 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +# Versioning is output of nmrPipe -help + +EAPI=5 + +inherit eutils virtualx + +DESCRIPTION="Spectral visualisation, analysis and Fourier processing" +HOMEPAGE="http://spin.niddk.nih.gov/bax/software/NMRPipe/" +#SRC_URI=" +# NMRPipeX.tZ +# talos.tZ +# dyn.tZ +# binval.com +# install.com" +SRC_URI=" + http://spin.niddk.nih.gov/NMRPipe/install/download/install.com + http://spin.niddk.nih.gov/NMRPipe/install/download/binval.com + http://spin.niddk.nih.gov/NMRPipe/install/download/NMRPipeX.tZ + http://spin.niddk.nih.gov/NMRPipe/install/download/talos.tZ + http://spin.niddk.nih.gov/NMRPipe/install/download/dyn.tZ + " + +SLOT="0" +LICENSE="nmrpipe" +# Right now, precompiled executables are only available for Linux on the +# x86 architecture. The maintainer chose to keep the sources closed, but +# says he will gladly provide precompiled executables for other platforms +# if there are such requests. +KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +#RESTRICT="fetch strip" +RESTRICT="strip" + +DEPEND="app-shells/tcsh" +RDEPEND="${DEPEND} + app-editors/nedit + dev-lang/tk + dev-tcltk/blt + media-fonts/font-sun-misc + !sci-chemistry/sparta+ + !sci-chemistry/talos+ + sys-libs/ncurses + x11-apps/xset + x11-libs/libX11 + || ( x11-libs/xview x11-libs/xview-bin ) + amd64? ( + app-emulation/emul-linux-x86-baselibs + app-emulation/emul-linux-x86-xlibs + ) + prefix? ( dev-util/patchelf )" + +S="${WORKDIR}" + +NMRBASE="/opt/${PN}" +ENMRBASE="${EPREFIX}/${NMRBASE}" + +QA_PREBUILT=" + opt/nmrpipe/nmrbin.linux9/lib/.* + opt/nmrpipe/nmrbin.linux9/.* + opt/nmrpipe/talos/bin/.* + opt/nmrpipe/talosplus/bin/.* + opt/nmrpipe/promega/.* + opt/nmrpipe/spartaplus/.* + " + +pkg_nofetch() { + einfo "Please visit:" + einfo "\t${HOMEPAGE}" + einfo + einfo "Contact the author, then download the following files:" + for i in ${A}; do + einfo "\t${i}" + done + einfo + einfo "Place the downloaded files in your distfiles directory:" + einfo "\t${DISTDIR}" +} + +src_unpack() { + # The installation script will unpack the package. We just provide symlinks + # to the archive files, ... + for i in NMRPipeX.tZ talos.tZ dyn.tZ; do + ln -sf "${DISTDIR}"/${i} || die + done + # ... copy the installation scripts ... + cp -L "${DISTDIR}"/{binval.com,install.com} . + # ... and make the installation scripts executable. + chmod +x binval.com install.com + # Unset DISPLAY to avoid the interactive graphical test. + # This just unpacks the stuff +# env DISPLAY="" csh ./install.com +type linux9 +dest "${S}"/NMR || die + VIRTUALX_COMMAND="csh ./install.com +type linux9 +dest ${S}/NMR +nopost" virtualmake +} + +src_prepare() { + local bin + epatch "${FILESDIR}"/${P}-lib.patch + + mv nmrbin.linux9/nmr{W,w}ish || die + + ebegin "Cleaning installation" + for i in ${A} ; do + rm -f ${i} || die "Failed to remove archive symlinks." + done + + # Remove some of the bundled applications and libraries; they are provided by Gentoo instead. +# rm -r nmrbin.linux9/{lib/{libBLT24.so,libolgx.so*,libxview.so*,*.timestamp},*timestamp,xv,gnuplot*,rasmol*,nc,nedit} \ + rm -rf nmrbin.linux9/{lib/*.timestamp,*timestamp,xv,gnuplot*,rasmol*,nc,nedit} \ + nmrbin.{linux,mac,sgi6x,sol,winxp} nmruser format \ + || die "Failed to remove unnecessary libraries." + # As long as xview is not fixed for amd64 we do this + rm nmrbin.linux9/lib/{libxview.so*,libolgx.so*} || die + # Remove the initialisation script generated during the installation. + # It contains incorrect hardcoded paths; only the "nmrInit.com" script + # should be used. + rm -f com/nmrInit.linux9.com || die "Failed to remove broken init script." + # Remove installation log files. + rm -f README_NMRPIPE_USERS *.log || die "Failed to remove installation log." + # Remove unused binaries + rm -f {talos*,spartaplus,promega}/bin/*{linux,mac,sgi6x,winxp} pdb/misc/addSeg || die + + # Some scripts are on the wrong place + cp -f nmrtxt/*.com com/ + rm -f {acme,com}/{nmrproc,fid}.com || die + + eend + + ebegin "Fixing paths in scripts" + + # Set the correct path to NMRPipe in the auxiliary scripts. + for i in $(find com/ dynamo/surface/misc/ nmrtxt/ talos/misc talosplus/com -type f); do + sed -e "s%/u/delaglio%${ENMRBASE}%" -i ${i} || die \ + "Failed patching scripts." + done + sed -i "s:${WORKDIR}:${ENMRBASE}:g" com/font.com || die + + sed \ + -e "s:!/bin:!${EPREFIX}/bin:g" \ + -e "s:!/usr/bin:!${EPREFIX}/usr/bin:g" \ + -e "s:!/usr/local/bin:!${EPREFIX}/usr/bin:g" \ + -e "s: /bin: ${EPREFIX}/bin:g" \ + -e "s: /usr/bin: ${EPREFIX}/usr/bin:g" \ + -e "s: /usr/local/bin: ${EPREFIX}/usr/bin:g" \ + -i $(find "${S}" \( -name *.tcl -o -name *.com -o -name *.ksh \) ) \ + {com/,nmrtxt/*.com,nmrtxt/nt/*.com,dynamo/tcl/,talos*/com/,dynamo/tcl/}* \ + nmrbin.linux9/{nmrDraw,xNotify} || die + + eend + + if use prefix; then + sed \ + -e "s: sh : \"${EPREFIX}/bin/sh\" :g" \ + -e "s: csh : \"${EPREFIX}/bin/csh\" :g" \ + -e "s: bash : \"${EPREFIX}/bin/bash\" :g" \ + -e "s:appTerm -e:appTerm -e \"${EPREFIX}/bin/csh\":g" \ + -i com/* || die + + ebegin "Setting RPATH in binaries" + for bin in $(find nmrbin.linux9/ -type f -maxdepth 1); do + patchelf --set-rpath "${EPREFIX}/usr/lib/" ${bin} + done + eend $? + fi +} + +src_install() { + cat >> "${T}"/nmrWish <<- EOF + #!${EPREFIX}/bin/csh -f + setenv NMRBIN \${NMRBASE}/bin/ + setenv NMRLIB \${NMRBIN}/lib + setenv AUXLIB \${NMRBIN}/openwin/lib + setenv TCLPATH \${NMRBASE}/com + setenv TCL_LIBRARY \${NMRBASE}/nmrtcl/tcl8.4 + setenv TK_LIBRARY \${NMRBASE}/nmrtcl/tk8.4 + setenv BLT_LIBRARY \${NMRBASE}/nmrtcl/blt2.4 + setenv NMRPIPE_TCL_LIB \${NMRBASE}/nmrtcl/tcl8.4 + setenv NMRPIPE_TK_LIB \${NMRBASE}/nmrtcl/tk8.4 + setenv NMRPIPE_BLT_LIB \${NMRBASE}/nmrtcl/blt2.4 + + if (!(\$?LD_LIBRARY_PATH)) then + setenv LD_LIBRARY_PATH \${NMRLIB}:\${AUXLIB} + else + setenv LD_LIBRARY_PATH \${NMRLIB}:\${LD_LIBRARY_PATH}:\${AUXLIB} + endif + + nmrwish \$* + EOF + + sed \ + -e "s:/opt/nmrpipe:${EPREFIX}/opt/nmrpipe:g" \ + "${FILESDIR}"/env-${PN}-new \ + > env-${PN}-new || die + newenvd env-${PN}-new 40${PN} + + insinto ${NMRBASE} + doins -r * + + dosym nmrbin.linux9 ${NMRBASE}/bin + + ebegin "Fixing permissions" + chmod 775 "${ED}"/${NMRBASE}/{talos*/bin/,sparta*/bin/,nmrbin.linux9/,com/,dynamo/tcl/,nmrtxt/*.com,talos*/com/,promega/bin/}* || die + eend + + exeinto ${NMRBASE}/nmrbin.linux9 + doexe "${T}"/nmrWish +} -- cgit v1.2.3-65-gdbad