public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/nmrpipe/
Date: Fri, 10 Aug 2012 12:54:37 +0000 (UTC)	[thread overview]
Message-ID: <1344603268.027f80a867db0e1b3cce69943c458c344cc7b45d.jlec@gentoo> (raw)

commit:     027f80a867db0e1b3cce69943c458c344cc7b45d
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 10 12:54:28 2012 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Aug 10 12:54:28 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=027f80a8

sci-chemistry/nmrpipe: Enhancing prefix support

(Portage version: 2.2.0_alpha120/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)

---
 sci-chemistry/nmrpipe/ChangeLog                    |    8 ++
 .../nmrpipe/nmrpipe-7.5.2012.204.11.07.ebuild      |  123 +++++++++++---------
 2 files changed, 77 insertions(+), 54 deletions(-)

diff --git a/sci-chemistry/nmrpipe/ChangeLog b/sci-chemistry/nmrpipe/ChangeLog
index 87651f3..aff912a 100644
--- a/sci-chemistry/nmrpipe/ChangeLog
+++ b/sci-chemistry/nmrpipe/ChangeLog
@@ -2,6 +2,14 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  10 Aug 2012; Justin Lecher <jlec@gentoo.org>
+  nmrpipe-7.5.2012.204.11.07.ebuild:
+  Enhancing prefix support
+
+  10 Aug 2012; Justin Lecher <jlec@gentoo.org>
+  nmrpipe-7.5.2012.204.11.07.ebuild:
+  Enhancing prefix support
+
   31 Jul 2012; Justin Lecher <jlec@gentoo.org>
   +files/7.5.2012.204.11.07-lib.patch, -files/7.3.2012.114.11.33-lib.patch,
   -nmrpipe-7.3.2012.114.11.33.ebuild, +nmrpipe-7.5.2012.204.11.07.ebuild:

diff --git a/sci-chemistry/nmrpipe/nmrpipe-7.5.2012.204.11.07.ebuild b/sci-chemistry/nmrpipe/nmrpipe-7.5.2012.204.11.07.ebuild
index 7d84f8a..ad5cd8e 100644
--- a/sci-chemistry/nmrpipe/nmrpipe-7.5.2012.204.11.07.ebuild
+++ b/sci-chemistry/nmrpipe/nmrpipe-7.5.2012.204.11.07.ebuild
@@ -26,7 +26,7 @@ LICENSE="as-is"
 KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE=""
 
-RESTRICT="fetch"
+RESTRICT="fetch strip"
 
 DEPEND="app-shells/tcsh"
 RDEPEND="${DEPEND}
@@ -39,11 +39,12 @@ RDEPEND="${DEPEND}
 	sys-libs/ncurses
 	x11-apps/xset
 	x11-libs/libX11
-	x11-libs/xview
+	|| ( 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}"
 
@@ -89,38 +90,16 @@ src_unpack() {
 }
 
 src_prepare() {
+	local bin
 	epatch "${FILESDIR}"/${PV}-lib.patch
 
 	mv nmrbin.linux9/nmr{W,w}ish || die
-}
-
-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
-
-	# Remove the symlinks for the archives and the installation scripts.
+	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} \
@@ -137,6 +116,14 @@ src_install() {
 	# 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 \
@@ -145,24 +132,6 @@ src_install() {
 	sed -i "s:${WORKDIR}:${ENMRBASE}:g" com/font.com || die
 
 	sed \
-		-e "s:/opt/nmrpipe:${EPREFIX}/opt/nmrpipe:g" \
-		"${FILESDIR}"/env-${PN}-new \
-		> env-${PN}-new || die
-	newenvd env-${PN}-new 40${PN} || die "Failed to install env file."
-
-	# PREFIX stuff
-	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
-
-	# Some scripts are on the wrong place
-	cp -f nmrtxt/*.com com/
-	rm -f {acme,com}/{nmrproc,fid}.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" \
@@ -170,19 +139,65 @@ src_install() {
 		-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 \) ) \
-		-i {com/,nmrtxt/*.com,nmrtxt/nt/*.com,dynamo/tcl/,talos*/com/,dynamo/tcl/}* \
+			{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 * || die "Failed to install application."
+	doins -r *
 
-	dosym nmrbin.linux9 ${NMRBASE}/bin || die \
-		"Failed to symlink binaries."
+	dosym nmrbin.linux9 ${NMRBASE}/bin
 
-	# fperms does not chmod nmrwish
-#	fperms -v 775 ${NMRBASE}/{talos/bin,nmrbin.linux9,com,dynamo/tcl}/* || die
-	chmod -c 775 "${ED}"/${NMRBASE}/{talos*/bin/,sparta*/bin/,nmrbin.linux9/,com/,dynamo/tcl/,nmrtxt/*.com,talos*/com/,promega/bin/}* || die
+	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 || die
+	doexe "${T}"/nmrWish
 }


             reply	other threads:[~2012-08-10 12:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 12:54 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-24  8:04 [gentoo-commits] proj/sci:master commit in: sci-chemistry/nmrpipe/ Andrew Ammerlaan
2021-01-30 15:18 Andrew Ammerlaan
2021-01-19 16:56 Andrew Ammerlaan
2017-03-26 14:45 Justin Lecher
2015-10-12  9:34 Justin Lecher
2015-07-31 10:09 Justin Lecher
2015-04-13  6:34 Justin Lecher
2014-11-13 13:15 Justin Lecher
2014-09-16  8:28 Justin Lecher
2014-09-16  0:26 Christoph Junghans
2014-07-07  6:36 Justin Lecher
2014-07-04  7:10 Justin Lecher
2013-07-11 15:36 Justin Lecher
2013-06-16 15:53 Justin Lecher
2013-03-03 17:52 Justin Lecher
2013-02-27 17:23 Justin Lecher
2013-01-24  8:55 Justin Lecher
2013-01-14  7:11 Justin Lecher
2012-08-10 12:56 Justin Lecher
2012-05-02 19:22 Justin Lecher
2011-12-26 13:43 Justin Lecher
2011-12-26 13:41 Justin Lecher
2011-10-05  7:59 Justin Lecher
2011-02-26 12:53 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1344603268.027f80a867db0e1b3cce69943c458c344cc7b45d.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox