| 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.198 2005/09/18 22:02:59 flameeyes Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.199 2005/09/22 14:52:36 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. |
| … | |
… | |
| 1134 | check_license() { |
1134 | check_license() { |
| 1135 | local lic=$1 |
1135 | local lic=$1 |
| 1136 | if [ -z "${lic}" ] ; then |
1136 | if [ -z "${lic}" ] ; then |
| 1137 | lic="${PORTDIR}/licenses/${LICENSE}" |
1137 | lic="${PORTDIR}/licenses/${LICENSE}" |
| 1138 | else |
1138 | else |
| 1139 | if [ -e "${PORTDIR}/licenses/${src}" ] ; then |
1139 | if [ -e "${PORTDIR}/licenses/${lic}" ] ; then |
| 1140 | lic="${PORTDIR}/licenses/${src}" |
1140 | lic="${PORTDIR}/licenses/${lic}" |
| 1141 | elif [ -e "${PWD}/${src}" ] ; then |
1141 | elif [ -e "${PWD}/${lic}" ] ; then |
| 1142 | lic="${PWD}/${src}" |
1142 | lic="${PWD}/${lic}" |
| 1143 | elif [ -e "${src}" ] ; then |
1143 | elif [ -e "${lic}" ] ; then |
| 1144 | lic="${src}" |
1144 | lic="${lic}" |
| 1145 | fi |
1145 | fi |
| 1146 | fi |
1146 | fi |
| 1147 | [ ! -f "${lic}" ] && die "Could not find requested license ${src}" |
1147 | [ ! -f "${lic}" ] && die "Could not find requested license ${src}" |
| 1148 | local l="`basename ${lic}`" |
1148 | local l="`basename ${lic}`" |
| 1149 | |
1149 | |