--- trunk/core/include/kde4.sminc 2009/11/18 23:17:22 4090 +++ trunk/core/include/kde4.sminc 2009/11/18 23:49:28 4091 @@ -6,6 +6,7 @@ export KDEDIR=/opt/kde4 export KDECONFDIR=/etc/kde4 export QT_PLUGIN_PATH=${KDEDIR}/$(mlibdir)/kde4/plugins +export DBUS_SYSTEM_DIR=/usr/share/dbus-1 # fixes some compile issues ala "kde-config: command not found" export PATH="${KDEDIR}/bin:${PATH}" @@ -53,21 +54,21 @@ # disabled, seems to be broken atm # # use --enable-final only on i*86 -# [[ ${ARCH} = i*86 ]] && configure_opts="${configure_opts} -DKDE4_ENABLE_FINAL=ON" - configure_opts="${configure_opts} -DCMAKE_BUILD_TYPE=Release" +# [[ ${ARCH} = i*86 ]] && configure_opts+=" -DKDE4_ENABLE_FINAL=ON" + configure_opts+=" -DCMAKE_BUILD_TYPE=Release" # use full rpath on non /usr installations - [[ ${KDEDIR} != /usr ]] && configure_opts="${configure_opts} -DKDE4_USE_ALWAYS_FULL_RPATH=ON" + [[ ${KDEDIR} != /usr ]] && configure_opts+=" -DKDE4_USE_ALWAYS_FULL_RPATH=ON" # add akonadi dbus dir if [[ ${PNAME/4/} = akonadi ]] || [[ ${PNAME/4/} = kdepim-runtime ]] then - configure_opts="${configure_opts} -DAKONADI_DBUS_INTERFACES_DIR=${PREFIX:-/usr/share/dbus-1/interfaces/}" - configure_opts="${configure_opts} -DAKONADI_DBUS_SERVICES_DIR=${PREFIX:-/usr/share/dbus-1/services/}" + configure_opts+=" -DAKONADI_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/" + configure_opts+=" -DAKONADI_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/" fi # add commandline given arguments - configure_opts="${configure_opts} $@" + configure_opts+=" $@" # remove build dir if exist [[ -d ${BUILDDIR}/build ]] && rm -rf ${BUILDDIR}/build @@ -77,11 +78,13 @@ cd ${BUILDDIR}/build cmake_configure \ - -DCMAKE_INSTALL_PREFIX=${PREFIX:-${KDEDIR}} \ - -DSYSCONF_INSTALL_DIR=${PREFIX:-${KDECONFDIR}} \ - -DLIB_INSTALL_DIR=${PREFIX:-${KDEDIR}/$(mlibdir)} \ - -DKDE4_DBUS_INTERFACES_DIR=${PREFIX:-"/usr/share/dbus-1/interfaces/"} \ - -DKDE4_DBUS_SERVICES_DIR=${PREFIX:-"/usr/share/dbus-1/services/"} \ + -DCMAKE_INSTALL_PREFIX=${KDEDIR} \ + -DSYSCONF_INSTALL_DIR=${KDECONFDIR} \ + -DLIB_INSTALL_DIR=${KDEDIR}/$(mlibdir) \ + -DDBUS_INTERFACES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ + -DDBUS_SERVICES_INSTALL_DIR=${DBUS_SYSTEM_DIR}/services/ \ + -DKDE4_DBUS_INTERFACES_DIR=${DBUS_SYSTEM_DIR}/interfaces/ \ + -DKDE4_DBUS_SERVICES_DIR=${DBUS_SYSTEM_DIR}/services/ \ -DKDE4_ENABLE_FPIE=ON \ -DKDE4_BUILD_TESTS=OFF \ -DKDE4_ENABLE_HTMLHANDBOOK=ON \ @@ -107,15 +110,17 @@ cd ${BUILDDIR}/build mmake DESTDIR=${BINDIR} ${KDE4_MAKE_OPTS} install || die -# # move dbus service dirs to a proper location if KDEDIR != /usr -# if [[ ${KDEDIR} != /usr ]] -# then -# if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] -# then -# minstalldir /usr/share || die -# mv ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die -# fi -# fi + # move dbus service dirs to a proper location if KDEDIR != /usr + if [[ ${KDEDIR} != /usr ]] + then + if [[ -d ${BINDIR}/${KDEDIR}/share/dbus-1 ]] + then + echo -e "${COLYELLOW}Warning: using dbus hotfix, dbus locations should be fixed!${COLDEFAULT}" + minstalldir /usr/share || die + cp -R ${BINDIR}/${KDEDIR}/share/dbus-1 ${BINDIR}/usr/share/ || die + rm -r ${BINDIR}/${KDEDIR}/share/dbus-1 || die + fi + fi cd ${SRCDIR} local i