--- qt4.eclass.orig 2007-12-10 07:17:16.000000000 +0100 +++ qt4.eclass 2007-12-10 09:09:47.000000000 +0100 @@ -54,11 +54,43 @@ } qt4_pkg_setup() { + local requiredflags="" for x in ${QT4_BUILT_WITH_USE_CHECK}; do if ! built_with_use =x11-libs/qt-4* $x; then - die "This package requires Qt4 to be built with the '${x}' use flag." + requiredflags="${requiredflags} $x" fi done + + local optionalflags="" + for x in ${QT4_OPTIONAL_BUILT_WITH_USE_CHECK}; do + if ! built_with_use =x11-libs/qt-4* $x; then + optionalflags="${optionalflags} $x" + fi + done + + local diemessage="" + if [[ ${requiredflags} != "" ]]; then + eerror + eerror "(1) In order to compile ${PN} package first you need to build qt4" + eerror "with USE=\"${requiredflags}\" flag(s)" + eerror + diemessage="(1) recompile qt4 with${requiredflags} USE flag(s) ; " + fi + if [[ ${optionalflags} != "" ]]; then + eerror + eerror "(2) You are trying to compile ${PN} package with" + eerror "USE=\"${optionalflags}\"" + eerror "while qt4 is built without this particular flag(s): it will" + eerror "not work." + eerror + eerror "Possible solutions to this problem are:" + eerror "a) install package ${PN} without ${optionalflags}USE flag(s)" + eerror "b) re-emerge qt4 with ${optionalflags} USE flag(s)" + eerror + diemessage="${diemessage}(2) recompile qt4 with${optionalflags} USE flag(s) or disable them for ${PN} package\n" + fi + + [[ ${diemessage} != "" ]] && die "can't emerge ${PN}: ${diemessage}" } eqmake4() { @@ -86,9 +118,9 @@ # as a workaround for broken qmake, put everything into file if has debug ${IUSE} && use debug; then - echo -e "$CONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile} + echo -e "\nCONFIG -= release\nCONFIG += no_fixpath debug" >> ${projprofile} else - echo -e "$CONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile} + echo -e "\nCONFIG -= debug\nCONFIG += no_fixpath release" >> ${projprofile} fi /usr/bin/qmake ${projprofile} \