--- eutils.eclass.bak 2007-01-31 19:27:10.000000000 +0100 +++ eutils.eclass 2007-01-31 20:01:54.000000000 +0100 @@ -1218,10 +1218,32 @@ check_license() { local lic=$1 if [ -z "${lic}" ] ; then - lic="${PORTDIR}/licenses/${LICENSE}" + if [ -e "${PORTDIR}/licenses/${LICENSE}" ] ; then + lic="${PORTDIR}/licenses/${LICENSE}" + elif [ -n ${PORTDIR_OVERLAY} ] ; then + for overdir in ${PORTDIR_OVERLAY} ; do + if [ -e "${overdir}/licenses/${LICENSE}" ] ; then + lic="${overdir}/licenses/${LICENSE}" + fi + done + if [ -z "${lic}" ] ; then + lic="${LICENSE}" + fi + else + lic="${LICENSE}" + fi else if [ -e "${PORTDIR}/licenses/${lic}" ] ; then lic="${PORTDIR}/licenses/${lic}" + elif [ -n ${PORTDIR_OVERLAY} ] ; then + for overdir in ${PORTDIR_OVERLAY} ; do + if [ -e "${overdir}/licenses/${lic}" ] ; then + lic="${overdir}/licenses/${lic}" + fi + done + if [ -z "${lic}" ] ; then + lic="${LICENSE}" + fi elif [ -e "${PWD}/${lic}" ] ; then lic="${PWD}/${lic}" elif [ -e "${lic}" ] ; then