--- trunk/core/include/kde4.sminc 2010/07/27 18:29:03 5637 +++ trunk/include/kde4.sminc 2014/03/12 16:39:55 21141 @@ -3,7 +3,7 @@ sminclude mtools cmake qt4 ## some global vars ## -export KDEDIR=/opt/kde4 +export KDEDIR=/usr export KDECONFDIR=/etc/kde4 export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins export DBUS_SYSTEM_DIR=/usr/share/dbus-1 @@ -18,37 +18,57 @@ export KDEDIRS=${KDEDIR} # some sane default values -: ${PCATEGORIE="kde-base"} -: ${SRCFILE="${PNAME/4/}-${PVER}.tar.bz2"} +: ${PCAT="kde-base"} +if [[ -z ${SRCFILE} ]] +then + if [[ ${PVER//.} -ge 483 ]] + then + KDE4_TARBALL_EXTENSION="tar.xz" + else + KDE4_TARBALL_EXTENSION="tar.bz2" + fi +fi +: ${SRCFILE="${PNAME/4/}-${PVER}.${KDE4_TARBALL_EXTENSION}"} : ${SRCDIR="${BUILDDIR}/${PNAME/4/}-${PVER}"} : ${DESCRIPTION="${PNAME}"} : ${HOMEPAGE="http://www.kde.org/"} -DEPEND="${DEPEND} - >= x11-libs/libXt-1 - >= x11-libs/libXinerama-1 - >= x11-libs/qt4-gui-4.5 - >= x11-libs/qt4-qt3support-4.5 - >= x11-libs/qt4-script-4.5 - >= x11-libs/qt4-sql-4.5 - >= x11-libs/qt4-svg-4.5 - >= x11-libs/qt4-test-4.5 - >= x11-libs/qt4-dbus-4.5 - >= x11-libs/qt4-opengl-4.5 - >= x11-libs/qt4-webkit-4.5" +if [[ ${PNAME} != oxygen-icons ]] +then + DEPEND="${DEPEND} + >= x11-libs/libXt-1 + >= x11-libs/libXinerama-1 + >= x11-libs/qt4-gui-4.8 + >= x11-libs/qt4-qt3support-4.8 + >= x11-libs/qt4-script-4.8 + >= x11-libs/qt4-sql-4.8 + >= x11-libs/qt4-svg-4.8 + >= x11-libs/qt4-test-4.8 + >= x11-libs/qt4-dbus-4.8 + >= x11-libs/qt4-opengl-4.8 + >= x11-libs/qt4-webkit-4.8 + >= x11-libs/qt4-declarative-4.8" +fi -if [[ ${PNAME} != phonon ]] +if [[ ${PNAME} != phonon ]] && [[ ${PNAME} != phonon-backend-* ]] && [[ ${PNAME} != oxygen-icons ]] then DEPEND="${DEPEND} - >= virtual/phonon" + >= virtual/phonon + >= virtual/phonon-backend" fi SDEPEND="${SDEPEND} - >= dev-util/cmake-2.4.7 - >= dev-util/pkgconfig-0.20 + >= dev-util/cmake-2.8.12 + >= dev-util/pkgconfig-0.25 >= x11-proto/xf86vidmodeproto-2 >= x11-proto/xineramaproto-1" +if [[ ${PNAME} != automoc4 ]] +then + SDEPEND="${SDEPEND} + >= kde-base/automoc4-0.9.88" +fi + # small hack to fix kdemirrors [[ ${KDE_MIRROR_UNSTABLE} = 1 ]] && KDE_MIRRORS=$(echo ${KDE_MIRRORS} | sed "s:/stable:/unstable:g") @@ -59,9 +79,11 @@ mirror://${PNAME}/${SRCFILE} ) +UP2DATE="updatecmd -listonly http://download.kde.org/stable/ | grep 'stable/[0-9]' | sed -n 's:.*/\([0-9].*\)/:\1:;$ p'" + # exported functions and variables for mage-file SPECIAL_VARS="${SPECIAL_VARS} KDEDIR" -SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_buildsycoca kde4_postinstall kde4_postremove" +SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} kde4_postinstall kde4_postremove" kde4_configure() { @@ -136,6 +158,17 @@ rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die fi fi + # or if KDECONFDIR != /etc + if [[ ${KDECONFDIR} != /etc ]] + then + if [[ -d ${BINDIR}/${KDECONFDIR}/dbus-1 ]] + then + echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" + minstalldir /etc || die + cp -R ${BINDIR}/${KDECONFDIR}/dbus-1 ${BINDIR}/etc/ || die + rm -r ${BINDIR}/${KDECONFDIR}/dbus-1 || die + fi + fi cd ${SRCDIR} local i @@ -149,45 +182,4 @@ done } -kde4_buildsycoca() -{ - if [[ -x ${KDEDIR}/bin/kbuildsycoca4 ]] && - [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] - then - # install services dir with right permissions - install -m0755 -o root -g root -d ${MROOT}/usr/share/services - - # kbuildsycoco4 needs a dbus session, but should not use the users session. - # so we start an own session here - - # export everything the be able to kill the session - echo "Starting dbus session for kbuildsycoca4 ..." - local i - for i in $(dbus-launch) - do - export "$i" - done - - echo "Running kbuildsycoca4 to build global database ..." - XDG_DATA_DIRS="${MROOT}/usr/share:${MROOT}${KDEDIR}/share:${MROOT}/usr/local/share" - ${MROOT}${KDEDIR}/bin/kbuildsycoca4 --global --noincremental &> /dev/null - - echo "Killing dbus session for kbuildsycoca4 ..." - kill ${DBUS_SESSION_BUS_PID} - unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID - fi -} - -kde4_postinstall() -{ - # rebuild system konfiguration cache - kde4_buildsycoca -} - -kde4_postremove() -{ - # rebuild system konfiguration cache - kde4_buildsycoca -} - -export_inherits kde4 src_prepare src_compile src_install postinstall postremove +export_inherits kde4 src_prepare src_compile src_install