/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.200 Revision 1.201
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.200 2005/09/23 20:44:26 wolf31o2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.201 2005/09/25 10:08:23 vapier Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
1584make_wrapper() { 1584make_wrapper() {
1585 local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5 1585 local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5
1586 local tmpwrapper=$(emktemp) 1586 local tmpwrapper=$(emktemp)
1587 cat << EOF > "${tmpwrapper}" 1587 cat << EOF > "${tmpwrapper}"
1588#!/bin/sh 1588#!/bin/sh
1589cd "${chdir}" 1589cd "${chdir:-.}"
1590if [ "\${LD_LIBRARY_PATH+set}" = "set" ] && [ -n "${libdir}" ] ; then
1590export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}" 1591 export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
1592fi
1591exec ${bin} "\$@" 1593exec "${bin}" "\$@"
1592EOF 1594EOF
1593 chmod go+rx "${tmpwrapper}" 1595 chmod go+rx "${tmpwrapper}"
1594 if [ -n "${5}" ] 1596 if [[ -n ${path} ]] ; then
1595 then
1596 exeinto ${5} 1597 exeinto "${path}"
1597 newexe "${tmpwrapper}" "${wrapper}" 1598 newexe "${tmpwrapper}" "${wrapper}"
1598 else 1599 else
1599 newbin "${tmpwrapper}" "${wrapper}" 1600 newbin "${tmpwrapper}" "${wrapper}"
1600 fi 1601 fi
1601} 1602}

Legend:
Removed from v.1.200  
changed lines
  Added in v.1.201

  ViewVC Help
Powered by ViewVC 1.1.20