--- eclass/kde.eclass 2006-05-07 20:35:22.000000000 +0200 +++ eclass/kde.eclass 2006-05-13 12:15:24.000000000 +0200 @@ -10,7 +10,11 @@ inherit base eutils kde-functions flag-o-matic libtool DESCRIPTION="Based on the $ECLASS eclass" HOMEPAGE="http://www.kde.org/" -IUSE="debug arts xinerama" +IUSE="debug xinerama" + +if [[ ${ARTS_IS_OPTIONAL} != "no" ]]; then + IUSE="${IUSE} arts" +fi if [[ ${CATEGORY} == "kde-base" ]]; then IUSE="${IUSE} kdeenablefinal" @@ -41,13 +45,15 @@ kde_pkg_setup() { if [ "${PN}" != "arts" ] && [ "${PN}" != "kdelibs" ] ; then - use arts && if ! built_with_use kde-base/kdelibs arts ; then - eerror "You are trying to compile ${CATEGORY}/${P} with the \"arts\" USE flag enabled." - eerror "However, $(best_version kde-base/kdelibs) was compiled with this flag disabled." - eerror - eerror "You must either disable this use flag, or recompile" - eerror "$(best_version kde-base/kdelibs) with this use flag enabled." - die + if [ ${ARTS_IS_OPTIONAL} == 'no' ] || use arts ; then + if ! built_with_use kde-base/kdelibs arts ; then + eerror "You are trying to compile ${CATEGORY}/${P} with the \"arts\" USE flag enabled." + eerror "However, $(best_version kde-base/kdelibs) was compiled with this flag disabled." + eerror + eerror "You must either disable this use flag, or recompile" + eerror "$(best_version kde-base/kdelibs) with this use flag enabled." + die + fi fi fi @@ -155,8 +161,12 @@ if hasq kdeenablefinal ${IUSE}; then myconf="$myconf $(use_enable kdeenablefinal final)" fi - [[ -z "$KDEBASE" ]] && myconf="$myconf $(use_with arts)" - [[ -n "$KDEBASE" && "$KDEMINORVER" -ge 3 ]] && myconf="$myconf $(use_with arts)" + if [[ ${ARTS_IS_OPTIONAL} == 'no' ]]; then + myconf="$myconf --with-alsa" + else + [[ -z "$KDEBASE" ]] && myconf="$myconf $(use_with arts)" + [[ -n "$KDEBASE" && "$KDEMINORVER" -ge 3 ]] && myconf="$myconf $(use_with arts)" + fi debug-print "$FUNCNAME: myconf: set to ${myconf}" ;; configure)