--- qt3.eclass.orig 2007-12-24 08:23:03.000000000 +0100 +++ qt3.eclass 2007-12-24 08:22:22.000000000 +0100 @@ -66,6 +66,59 @@ echo ${VERSIONS} } +# @FUNCTION: qt3_pkg_setup +# @MAINTAINER: +# Caleb Tennis +# Przemyslaw Maciag +# @DESCRIPTION: +# Default pkg_setup function for packages that depends on qt3. If you have to +# create ebuilds own pkg_setup in your ebuild, call qt3_pkg_setup in it. +# This function uses two global vars from ebuild: +# - QT3_BUILT_WITH_USE_CHECK - contains use flags that need to be turned on for +# =x11-libs/qt-3* +# - QT3_OPTIONAL_BUILT_WITH_USE_CHECK - qt3 flags that provides some +# functionality, but can alternatively be disabled in ${CATEGORY}/${PN} +# (so qt3 don't have to be recompiled) +qt3_pkg_setup() { + local requiredflags="" + for x in ${QT3_BUILT_WITH_USE_CHECK}; do + if ! built_with_use =x11-libs/qt-3* ${x}; then + requiredflags="${requiredflags} ${x}" + fi + done + + local optionalflags="" + for x in ${QT3_OPTIONAL_BUILT_WITH_USE_CHECK}; do + if use ${x} && ! built_with_use =x11-libs/qt-3* ${x}; then + optionalflags="${optionalflags} ${x}" + fi + done + + local diemessage="" + if [[ ${requiredflags} != "" ]]; then + eerror + eerror "(1) In order to compile ${CATEGORY}/${PN} first you need to build" + eerror "=x11-libs/qt-3* with USE=\"${requiredflags}\" flag(s)" + eerror + diemessage="(1) recompile qt3 with \"${requiredflags}\" USE flag(s) ; " + fi + if [[ ${optionalflags} != "" ]]; then + eerror + eerror "(2) You are trying to compile ${CATEGORY}/${PN} package with" + eerror "USE=\"${optionalflags}\"" + eerror "while qt3 is built without this particular flag(s): it will" + eerror "not work." + eerror + eerror "Possible solutions to this problem are:" + eerror "a) install package ${CATEGORY}/${PN} without \"${optionalflags}\" USE flag(s)" + eerror "b) re-emerge qt3 with \"${optionalflags}\" USE flag(s)" + eerror + diemessage="${diemessage}(2) recompile qt3 with \"${optionalflags}\" USE flag(s) or disable them for ${PN} package\n" + fi + + [[ ${diemessage} != "" ]] && die "can't emerge ${CATEGORY}/${PN}: ${diemessage}" +} + # @FUNCTION: eqmake3 # @USAGE: [.pro file] [additional parameters to qmake] # @MAINTAINER: