fix the LD_LIBRARY_PATH logic in make_wrapper so that it works again #109793 by UncleOwen
authorMike Frysinger <vapier@gentoo.org>
Thu, 20 Oct 2005 00:13:20 +0000 (00:13 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 20 Oct 2005 00:13:20 +0000 (00:13 +0000)
eclass/eutils.eclass

index bf341402d090f87017d94a93bcd80f9694d6fd2d..57936932b0a439644b856c892f26e50129343e59 100644 (file)
@@ -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.209 2005/10/19 03:37:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.210 2005/10/20 00:13:20 vapier Exp $
 #
 # Author: Martin Schlemmer <azarah@gentoo.org>
 #
@@ -1626,8 +1626,12 @@ make_wrapper() {
        cat << EOF > "${tmpwrapper}"
 #!/bin/sh
 cd "${chdir:-.}"
-if [ "\${LD_LIBRARY_PATH+set}" = "set" ] && [ -n "${libdir}" ] ; then
-       export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
+if [ -n "${libdir}" ] ; then
+       if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then
+               export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
+       else
+               export LD_LIBRARY_PATH="${libdir}"
+       fi
 fi
 exec ${bin} "\$@"
 EOF