summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-25 10:08:23 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-25 10:08:23 +0000
commit58b098ce5461d21bf9277245e6336f5d5ff9af42 (patch)
tree2545b4e052dff543de7c1e655330ae342ccc801f /eclass/eutils.eclass
parentadded dropped keyword ~ppc (diff)
downloadgentoo-2-58b098ce5461d21bf9277245e6336f5d5ff9af42.tar.gz
gentoo-2-58b098ce5461d21bf9277245e6336f5d5ff9af42.tar.bz2
gentoo-2-58b098ce5461d21bf9277245e6336f5d5ff9af42.zip
tweak behavior of make_wrapper to better handle default values
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass15
1 files changed, 8 insertions, 7 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index aeed3fb0d1a5..7231513bfd14 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.200 2005/09/23 20:44:26 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.201 2005/09/25 10:08:23 vapier Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -1586,14 +1586,15 @@ make_wrapper() {
local tmpwrapper=$(emktemp)
cat << EOF > "${tmpwrapper}"
#!/bin/sh
-cd "${chdir}"
-export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
-exec ${bin} "\$@"
+cd "${chdir:-.}"
+if [ "\${LD_LIBRARY_PATH+set}" = "set" ] && [ -n "${libdir}" ] ; then
+ export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
+fi
+exec "${bin}" "\$@"
EOF
chmod go+rx "${tmpwrapper}"
- if [ -n "${5}" ]
- then
- exeinto ${5}
+ if [[ -n ${path} ]] ; then
+ exeinto "${path}"
newexe "${tmpwrapper}" "${wrapper}"
else
newbin "${tmpwrapper}" "${wrapper}"