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

Diff of /eclass/eutils.eclass

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

Revision 1.141 Revision 1.143
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.141 2005/01/12 00:21:53 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.143 2005/01/26 16:19:12 ka0ttic 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.
1492 case ${ARCH} in 1492 case ${ARCH} in
1493 x86) export ARCH="i386";; 1493 x86) export ARCH="i386";;
1494 amd64) export ARCH="x86_64";; 1494 amd64) export ARCH="x86_64";;
1495 hppa) export ARCH="parisc";; 1495 hppa) export ARCH="parisc";;
1496 mips) export ARCH="mips";; 1496 mips) export ARCH="mips";;
1497 sparc) export ARCH="$(tc-arch-kernel)";; # Yeah this is ugly, but it's even WORSE if you don't do this. linux-info.eclass's set_arch_to_kernel is fixed, but won't get used over this one!
1497 *) export ARCH="${ARCH}";; 1498 *) export ARCH="${ARCH}";;
1498 esac 1499 esac
1499} 1500}
1500 1501
1501# set's ARCH back to what portage expects 1502# set's ARCH back to what portage expects
1557 einfo "After doing that, you can safely remove ${LIB}" 1558 einfo "After doing that, you can safely remove ${LIB}"
1558 einfo "Note: 'emerge gentoolkit' to get revdep-rebuild" 1559 einfo "Note: 'emerge gentoolkit' to get revdep-rebuild"
1559 fi 1560 fi
1560} 1561}
1561 1562
1562# Hack for people to figure out if a package was built with 1563# Hack for people to figure out if a package was built with
1563# certain USE flags 1564# certain USE flags
1564# 1565#
1565# Usage: built_with_use [-a|-o] <DEPEND ATOM> <List of USE flags> 1566# Usage: built_with_use [-a|-o] <DEPEND ATOM> <List of USE flags>
1566# ex: built_with_use xchat gtk2 1567# ex: built_with_use xchat gtk2
1567# 1568#
1588 shift 1589 shift
1589 done 1590 done
1590 [[ ${opt} = "-a" ]] 1591 [[ ${opt} = "-a" ]]
1591} 1592}
1592 1593
1593# Many configure scripts wrongly bail when a C++ compiler 1594# Many configure scripts wrongly bail when a C++ compiler
1594# could not be detected. #73450 1595# could not be detected. #73450
1595epunt_cxx() { 1596epunt_cxx() {
1596 local dir=$1 1597 local dir=$1
1597 [[ -z ${dir} ]] && dir=${S} 1598 [[ -z ${dir} ]] && dir=${S}
1598 ebegin "Removing useless C++ checks" 1599 ebegin "Removing useless C++ checks"
1600 for f in $(find ${dir} -name configure) ; do 1601 for f in $(find ${dir} -name configure) ; do
1601 patch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null 1602 patch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null
1602 done 1603 done
1603 eend 0 1604 eend 0
1604} 1605}
1606
1607# dopamd [ file ] [ new file ]
1608#
1609# Install pam auth config file in /etc/pam.d
1610#
1611# The first argument, 'file' is required. Install as 'new file', if
1612# specified.
1613
1614dopamd() {
1615 local pamd="$1" newpamd="${2:-$1}"
1616 [[ -z "$1" ]] && die "dopamd requires at least one argument."
1617
1618 use pam || return 0
1619
1620 insinto /etc/pam.d
1621 # these are the default doins options, but be explicit just in case
1622 insopts -m 0644 -o root -g root
1623 newins ${pamd} ${newpamd} || die "failed to install ${newpamd}"
1624}

Legend:
Removed from v.1.141  
changed lines
  Added in v.1.143

  ViewVC Help
Powered by ViewVC 1.1.20