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

Diff of /eclass/eutils.eclass

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

Revision 1.163 Revision 1.164
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.163 2005/03/26 06:33:16 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.164 2005/03/30 14:12:25 wolf31o2 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.
1763# -- wolf31o2 1763# -- wolf31o2
1764# $1 == wrapper name 1764# $1 == wrapper name
1765# $2 == binary to run 1765# $2 == binary to run
1766# $3 == directory to chdir before running binary 1766# $3 == directory to chdir before running binary
1767# $4 == extra LD_LIBRARY_PATH's (make it : delimited) 1767# $4 == extra LD_LIBRARY_PATH's (make it : delimited)
1768# $5 == path for wrapper
1768make_wrapper() { 1769make_wrapper() {
1769 local wrapper=$1 bin=$2 chdir=$3 libdir=$4 1770 local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5
1770 local tmpwrapper=$(emktemp) 1771 local tmpwrapper=$(emktemp)
1771 cat << EOF > "${tmpwrapper}" 1772 cat << EOF > "${tmpwrapper}"
1772#!/bin/sh 1773#!/bin/sh
1773cd "${chdir}" 1774cd "${chdir}"
1774export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}" 1775export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
1775exec ${bin} "\$@" 1776exec ${bin} "\$@"
1776EOF 1777EOF
1777 chmod go+rx "${tmpwrapper}" 1778 chmod go+rx "${tmpwrapper}"
1779 if [ -n "${5}" ]
1780 then
1781 exeinto ${5}
1782 newexe "${tmpwrapper}" "${wrapper}"
1783 else
1778 newbin "${tmpwrapper}" "${wrapper}" 1784 newbin "${tmpwrapper}" "${wrapper}"
1785 fi
1779} 1786}

Legend:
Removed from v.1.163  
changed lines
  Added in v.1.164

  ViewVC Help
Powered by ViewVC 1.1.20