diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-03-24 22:59:21 +0000 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2011-03-24 22:59:21 +0000 |
commit | 087137ff2c5a4d10b954417c670d14e9e30b1763 (patch) | |
tree | f6e20678f86336fc5502469c1c15a215674fc754 /kde-base | |
parent | Stable on amd64 wrt bug #360369 (diff) | |
download | gentoo-2-087137ff2c5a4d10b954417c670d14e9e30b1763.tar.gz gentoo-2-087137ff2c5a4d10b954417c670d14e9e30b1763.tar.bz2 gentoo-2-087137ff2c5a4d10b954417c670d14e9e30b1763.zip |
Fix duplicate entries in XDG_DATA_DIRS that make akonadi complain
(Portage version: 2.1.9.42/cvs/Linux x86_64)
Diffstat (limited to 'kde-base')
-rw-r--r-- | kde-base/kdebase-startkde/ChangeLog | 8 | ||||
-rw-r--r-- | kde-base/kdebase-startkde/files/gentoo-startkde4-3.patch | 71 | ||||
-rw-r--r-- | kde-base/kdebase-startkde/kdebase-startkde-4.6.1-r1.ebuild | 136 |
3 files changed, 214 insertions, 1 deletions
diff --git a/kde-base/kdebase-startkde/ChangeLog b/kde-base/kdebase-startkde/ChangeLog index 55f94acf5412..f9974cea3bf0 100644 --- a/kde-base/kdebase-startkde/ChangeLog +++ b/kde-base/kdebase-startkde/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for kde-base/kdebase-startkde # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-startkde/ChangeLog,v 1.222 2011/03/04 18:00:21 alexxy Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-startkde/ChangeLog,v 1.223 2011/03/24 22:59:21 dilfridge Exp $ + +*kdebase-startkde-4.6.1-r1 (24 Mar 2011) + + 24 Mar 2011; Andreas K. Huettel <dilfridge@gentoo.org> + +files/gentoo-startkde4-3.patch, +kdebase-startkde-4.6.1-r1.ebuild: + Fix duplicate entries in XDG_DATA_DIRS that make akonadi complain *kdebase-startkde-4.6.1 (04 Mar 2011) diff --git a/kde-base/kdebase-startkde/files/gentoo-startkde4-3.patch b/kde-base/kdebase-startkde/files/gentoo-startkde4-3.patch new file mode 100644 index 000000000000..36829fd17f4c --- /dev/null +++ b/kde-base/kdebase-startkde/files/gentoo-startkde4-3.patch @@ -0,0 +1,71 @@ +--- startkde.cmake.old 2011-03-24 13:07:04.919889148 +0100 ++++ startkde.cmake 2011-03-24 13:14:42.033174445 +0100 +@@ -13,6 +13,40 @@ + # because we still need to do some cleanup. + trap 'echo GOT SIGHUP' HUP + ++_KDEDIR=@GENTOO_PORTAGE_EPREFIX@@REPLACE_PREFIX@ ++if [ "$_KDEDIR" != "@GENTOO_PORTAGE_EPREFIX@/usr" ]; then ++ export PATH=${_KDEDIR}/bin:$(echo ${PATH} | sed 's/$/:/g;s#@GENTOO_PORTAGE_EPREFIX@/usr/kde/[^/]*/s\?bin/\?:##g;s/:$//g') ++ export ROOTPATH=${_KDEDIR}/sbin:${_KDEDIR}/bin:$(echo ${PATH} | sed 's/$/:/g;s#@GENTOO_PORTAGE_EPREFIX@/usr/kde/[^/]*/s\?bin/\?:##g;s/:$//g') ++fi ++@REPLACE_LDPATH@ ++export STRIGI_PLUGIN_PATH="${_KDEDIR}/@REPLACE_LIBDIR@/strigi:${STRIGI_PLUGIN_PATH}" ++xdgs=$(echo ${XDG_DATA_DIRS} | sed 's/$/:/g;s#@GENTOO_PORTAGE_EPREFIX@/usr/kde/[^/]*/share/\?:##g;s/:$//g') ++if [ $(echo $xdgs |grep -c -E "(:|^)${_KDEDIR}/share(:|$)") -eq 0 ]; then ++ xdgs="${_KDEDIR}/share:${xdgs}" ++fi ++export XDG_DATA_DIRS=${xdgs} ++unset xdgs ++ ++if [ -z "$HOME" ]; then ++ xmessage "HOME is unset. Your user config seems to be broken. Aborting." ++ exit 1 ++fi ++ ++# Gentoo: handle the possible home directory layout for config directory ++# Note that we change the default KDEHOME in kdelibs to .kde4 or .kde${SLOT} ++# for -kdeprefix and +kdeprefix respectively. ++if [ "${_KDEDIR}" = "@GENTOO_PORTAGE_EPREFIX@/usr" ]; then ++ # If the directory doesn't exist make it ++ [ -e "${HOME}/.kde4" ] || mkdir "$HOME/.kde4" ++else ++ # Use multiple directories based upon the KDE directory ++ [ -e "$HOME/.kde$(basename $_KDEDIR)" ] || mkdir "$HOME/.kde$(basename $_KDEDIR)" ++ if [ ! -d "$HOME/.kde$(basename $_KDEDIR)" ]; then ++ xmessage "$HOME/.kde$(basename $_KDEDIR) exists but is not a dir. Aborting." ++ exit 1 ++ fi ++fi ++ + # Check if a KDE session already is running and whether it's possible to connect to X + kcheckrunning + kcheckrunning_result=$? +@@ -187,6 +221,13 @@ + done + done + ++# Gentoo part for FHS installs ++if [ "${_KDEDIR}" = "@GENTOO_PORTAGE_EPREFIX@/usr" ]; then ++ for file in "@GENTOO_PORTAGE_EPREFIX@/etc/kde/startup/"*.sh; do ++ test -r "${file}" && . "${file}" ++ done ++fi ++ + # Set the path for Qt plugins provided by KDE + if test -n "$QT_PLUGIN_PATH"; then + QT_PLUGIN_PATH="$QT_PLUGIN_PATH:`kde4-config --path qtplugins`" +@@ -400,6 +441,13 @@ + done + done + ++# Gentoo part for FHS installs ++if [ "${_KDEDIR}" = "@GENTOO_PORTAGE_EPREFIX@/usr" ]; then ++ for file in "@GENTOO_PORTAGE_EPREFIX@/etc/kde/shutdown/"*.sh; do ++ test -r "${file}" && . "${file}" ++ done ++fi ++ + unset KDE_FULL_SESSION + xprop -root -remove KDE_FULL_SESSION + unset KDE_SESSION_VERSION diff --git a/kde-base/kdebase-startkde/kdebase-startkde-4.6.1-r1.ebuild b/kde-base/kdebase-startkde/kdebase-startkde-4.6.1-r1.ebuild new file mode 100644 index 000000000000..7134774df7d4 --- /dev/null +++ b/kde-base/kdebase-startkde/kdebase-startkde-4.6.1-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase-startkde/kdebase-startkde-4.6.1-r1.ebuild,v 1.1 2011/03/24 22:59:21 dilfridge Exp $ + +EAPI=3 + +KMNAME="kdebase-workspace" +KMNOMODULE="true" +inherit kde4-meta multilib prefix + +DESCRIPTION="Startkde script, which starts a complete KDE session, and associated scripts" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +# The KDE apps called from the startkde script. +# These provide the most minimal KDE desktop. +RDEPEND=" + $(add_kdebase_dep kcminit) + $(add_kdebase_dep kdebase-runtime-meta) + $(add_kdebase_dep kdebase-wallpapers) + $(add_kdebase_dep kfmclient) + $(add_kdebase_dep knotify) + $(add_kdebase_dep kreadconfig) + $(add_kdebase_dep krunner) + $(add_kdebase_dep ksmserver) + $(add_kdebase_dep ksplash) + $(add_kdebase_dep kstartupconfig) + $(add_kdebase_dep kwin) + $(add_kdebase_dep phonon-kde) + $(add_kdebase_dep plasma-apps) + $(add_kdebase_dep plasma-workspace) + $(add_kdebase_dep systemsettings) + x11-apps/mkfontdir + x11-apps/xmessage + x11-apps/xprop + x11-apps/xrandr + x11-apps/xrdb + x11-apps/xsetroot + x11-apps/xset +" + +KMEXTRACTONLY=" + ConfigureChecks.cmake + kdm/ + startkde.cmake +" + +PATCHES=("${FILESDIR}/gentoo-startkde4-3.patch") + +src_prepare() { + kde4-meta_src_prepare + + # Patch the startkde script to setup the environment for KDE + # List all the multilib libdirs + local _libdir _libdirs= + for _libdir in $(get_all_libdirs); do + _libdirs+=":${EKDEDIR}/${_libdir}" + done + _libdirs=${_libdirs#:} + + # Sort the LDFLAGS out if necessary + if use kdeprefix; then + sed -e "s#@REPLACE_LDFLAGS@#export LDFLAGS=${_libdirs}:\$LDFLAGS#" \ + -i startkde.cmake || die "Sed for LDPATH failed." + else + sed -e "s#@REPLACE_LDFLAGS@##" \ + -i startkde.cmake || die "sed for LDPATH failed" + fi + + # Complete LDPATH + sed -e "s#@REPLACE_LIBDIR@#$(get_libdir)#" \ + -i startkde.cmake || die "Sed for REPLACE_LIBDIR failed." + # Now fix the prefix + sed -e "s#@REPLACE_PREFIX@#${KDEDIR}#" \ + -i startkde.cmake || die "Sed for REPLACE_PREFIX failed." + # ... and fix ${EPREFIX} + eprefixify startkde.cmake +} + +src_install() { + kde4-meta_src_install + + # startup and shutdown scripts + if use kdeprefix; then + insinto "${KDEDIR}/env" + else + insinto "/etc/kde/startup" + fi + doins "${FILESDIR}/agent-startup.sh" || die "doexe agent-startup.sh failed" + + if use kdeprefix; then + exeinto "${KDEDIR}/shutdown" + else + exeinto "/etc/kde/shutdown" + fi + doexe "${FILESDIR}/agent-shutdown.sh" || die "doexe agent-shutdown.sh failed" + + if use kdeprefix; then + KDE_X="KDE-${SLOT}" + else + KDE_X="KDE-4" + fi + + # x11 session script + cat <<-EOF > "${T}/${KDE_X}" + #!/bin/sh + exec "${EKDEDIR}/bin/startkde" + EOF + exeinto /etc/X11/Sessions + doexe "${T}/${KDE_X}" || die "doexe ${KDE_X} failed" + + # freedesktop compliant session script + sed -e "s:\${KDE4_BIN_INSTALL_DIR}:${EKDEDIR}/bin:g;s:Name=KDE:Name=KDE ${SLOT}:" \ + "${S}/kdm/kfrontend/sessions/kde-plasma.desktop.cmake" > "${T}/${KDE_X}.desktop" + insinto /usr/share/xsessions + doins "${T}/${KDE_X}.desktop" || die "doins ${KDE_X}.desktop failed" +} + +pkg_postinst () { + kde4-meta_pkg_postinst + + echo + elog "To enable gpg-agent and/or ssh-agent in KDE sessions," + if use kdeprefix; then + elog "edit ${EKDEDIR}/env/agent-startup.sh and" + elog "${EKDEDIR}/shutdown/agent-shutdown.sh" + else + elog "edit ${EPREFIX}/etc/kde/startup/agent-startup.sh and" + elog "${EPREFIX}/etc/kde/shutdown/agent-shutdown.sh" + fi + echo + elog "The name of the session script has changed." + elog "If you currently have XSESSION=\"kde-${SLOT}\" in your" + elog "configuration files, you will need to change it to" + elog "XSESSION=\"${KDE_X}\"" +} |