diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-09-25 10:08:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-25 10:08:23 +0000 |
commit | d14e400d5f1522abb8baad7cb7fc6598512c87b2 (patch) | |
tree | 712543507f9dabe4d6d324350d5f25c91464513f /eclass/eutils.eclass | |
parent | added dropped keyword ~ppc (diff) | |
download | historical-d14e400d5f1522abb8baad7cb7fc6598512c87b2.tar.gz historical-d14e400d5f1522abb8baad7cb7fc6598512c87b2.tar.bz2 historical-d14e400d5f1522abb8baad7cb7fc6598512c87b2.zip |
tweak behavior of make_wrapper to better handle default values
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r-- | eclass/eutils.eclass | 15 |
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}" |