summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-12-25 00:51:50 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-12-25 00:51:50 +0000
commite07b28f02cf03c272500ab542cda6c4c16eb31a2 (patch)
treeb3c3531730cc3f93bb4cd3afc95c28ca685dce3d /kde-base
parentmoved lm_sensors and i2c (diff)
downloadgentoo-2-e07b28f02cf03c272500ab542cda6c4c16eb31a2.tar.gz
gentoo-2-e07b28f02cf03c272500ab542cda6c4c16eb31a2.tar.bz2
gentoo-2-e07b28f02cf03c272500ab542cda6c4c16eb31a2.zip
fix Xft issues and kscreensaver.pam to use pam_stack.so
Diffstat (limited to 'kde-base')
-rw-r--r--kde-base/kdebase/ChangeLog16
-rw-r--r--kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-nspluginviewer-qt31.diff.gzbin0 -> 36346 bytes
-rw-r--r--kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft2.0-fix.diff149
-rw-r--r--kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft_h-fix.diff11
-rw-r--r--kde-base/kdebase/files/3.0.5a-r1/startkde-3.0.5a-r1-gentoo.diff55
-rw-r--r--kde-base/kdebase/files/digest-kdebase-3.0.5a-r11
-rw-r--r--kde-base/kdebase/files/kscreensaver.pam5
-rw-r--r--kde-base/kdebase/kdebase-3.0.5a-r1.ebuild227
8 files changed, 462 insertions, 2 deletions
diff --git a/kde-base/kdebase/ChangeLog b/kde-base/kdebase/ChangeLog
index cbfda3c86d03..5b0335d4c42a 100644
--- a/kde-base/kdebase/ChangeLog
+++ b/kde-base/kdebase/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for kde-base/kdebase
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/ChangeLog,v 1.42 2002/12/21 14:02:39 hannes Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/ChangeLog,v 1.43 2002/12/25 00:51:49 azarah Exp $
+
+ 25 Dec 2002; Martin Schlemmer <azarah@gentoo.org> kscreensaver.pam :
+
+ Fix kscreensaver's pam.d file to use pam_stack.so again (bug #12596).
+
+*kdebase-3.0.5a-r1 (24 Dec 2002)
+
+ 24 Dec 2002; Martin Schlemmer <azarah@gentoo.org> kdebase-3.0.5a-r1.ebuild,
+ kdebase-3.0.5a-xft2.0-fix.diff :
+
+ Patch kdebase-3.0.5a to compile with Xft2.0 installed. Also add a function to
+ detect if we have Xft1 or Xft2 installed, and against what QT was compiled.
+ The System->Font Installer->Anti-Alias->Advance do crash though, will see if
+ I can get this fixed. This should close bug #9423 again.
*kdebase-3.0.5a (21 Dec 2002)
diff --git a/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-nspluginviewer-qt31.diff.gz b/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-nspluginviewer-qt31.diff.gz
new file mode 100644
index 000000000000..281ca5298fb2
--- /dev/null
+++ b/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-nspluginviewer-qt31.diff.gz
Binary files differ
diff --git a/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft2.0-fix.diff b/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft2.0-fix.diff
new file mode 100644
index 000000000000..715c06e7c9e7
--- /dev/null
+++ b/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft2.0-fix.diff
@@ -0,0 +1,149 @@
+ We have two problems when we start to use Xft1.2 or Xft2.0
+
+ 1) With Xft1.2 or Xft2.0 we now use fontconfig, and thus have
+ to cast the variables for use with fontconfig struct's and
+ variables.
+
+ 2) With Xft2.0, some functions in xftint.h are already defined
+ in the Xft.h from Xft2.0.
+
+ Fix: If we have Xft1.2 or Xft2.0, either change configure to
+ to define XFT_WITH_FONTCONFIG, or add -DXFT_WITH_FONTCONFIG
+ to our CXXFLAGS.
+
+ If we have Xft2.0, define HAVE_XFT2 somehow.
+
+
+ Martin Schlemmer <azarah@gentoo.org> (24 Dec 2002)
+
+
+--- kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfig.cpp.orig 2002-10-30 00:53:18.000000000 +0200
++++ kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfig.cpp 2002-10-30 01:01:49.000000000 +0200
+@@ -276,7 +276,11 @@
+ }
+ case XftTypeString:
+ str+="\"";
++#ifndef XFT_WITH_FONTCONFIG
+ str+=test->value.u.s;
++#else
++ str+=(QCString &)test->value.u.s;
++#endif
+ str+="\"";
+ break;
+ case XftTypeBool:
+@@ -554,7 +554,11 @@
+ XftValue value;
+ CXftConfig::TEntry *entry=new CXftConfig::TEntry;
+
++#ifndef XFT_WITH_FONTCONFIG
+ value.u.s=sval;
++#else
++ (char *)value.u.s=sval;
++#endif
+ value.type=XftTypeString;
+ entry->test=XftTestCreate(XftQualAny, "family", XftOpEqual, value);
+
+@@ -780,7 +780,11 @@
+
+ for(entry=itsList.first(); entry; entry=itsList.next())
+ if(entry->test && 0==CMisc::stricmp(entry->test->field, "family") && XftTypeString==entry->test->value.type &&
++#ifndef XFT_WITH_FONTCONFIG
+ 0==CMisc::stricmp(entry->test->value.u.s, family.latin1()) && entry->edit &&
++#else
++ 0==CMisc::stricmp((char *)entry->test->value.u.s, family.latin1()) && entry->edit &&
++#endif
+ 0==CMisc::stricmp(entry->edit->field, field) && XftOpAssign==entry->edit->op && entry->edit->expr)
+ break;
+
+@@ -798,7 +798,11 @@
+ free(test->field);
+
+ if(XftTypeString==test->value.type)
++#ifndef XFT_WITH_FONTCONFIG
+ free(test->value.u.s);
++#else
++ free((void *)test->value.u.s);
++#endif
+ }
+ }
+
+--- kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfigEditor.cpp.orig 2002-10-30 01:03:25.000000000 +0200
++++ kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfigEditor.cpp 2002-10-30 01:07:27.000000000 +0200
+@@ -469,7 +469,11 @@
+ break;
+ case XftTypeString:
+ expr->op=XftOpString;
++#ifndef XFT_WITH_FONTCONFIG
+ expr->u.sval=val.u.s;
++#else
++ expr->u.sval=(char *)val.u.s;
++#endif
+ break;
+ case XftTypeBool:
+ default:
+@@ -655,12 +655,24 @@
+ if("foundry"==field || "family"==field || "encoding"==field || "style"==field)
+ {
+ val.type=XftTypeString;
++#ifndef XFT_WITH_FONTCONFIG
+ val.u.s=(char *)malloc(edit ? strVal.length()+1 : strVal.length()-1);
++#else
++ (char *)val.u.s=(char *)malloc(edit ? strVal.length()+1 : strVal.length()-1);
++#endif
+
+ if(edit)
++#ifndef XFT_WITH_FONTCONFIG
+ strcpy(val.u.s, strVal.local8Bit());
++#else
++ strcpy((char *)val.u.s, strVal.local8Bit());
++#endif
+ else
++#ifndef XFT_WITH_FONTCONFIG
+ strcpy(val.u.s, strVal.mid(1, strVal.length()-2).local8Bit()); // Need to remove quotes from each end of the string...
++#else
++ strcpy((char *)val.u.s, strVal.mid(1, strVal.length()-2).local8Bit()); // Need to remove quotes from each end of the string...
++#endif
+ }
+ else if("spacing"==field)
+ {
+@@ -747,8 +747,13 @@
+ {
+ // Not sure about this...
+ val.type=XftTypeString;
++#ifndef XFT_WITH_FONTCONFIG
+ val.u.s=(char *)malloc(strVal.length()+1);
+ strcpy(val.u.s, strVal.local8Bit());
++#else
++ (char *)val.u.s=(char *)malloc(strVal.length()+1);
++ strcpy((char *)val.u.s, strVal.local8Bit());
++#endif
+ }
+ else if("rgba"==field)
+ {
+--- kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/xftint.h.orig 2002-12-24 23:34:28.000000000 +0200
++++ kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/xftint.h 2002-12-24 23:35:22.000000000 +0200
+@@ -276,8 +276,10 @@
+ XftSubstPrint (XftSubst *subst);
+
+ /* xftdir.c */
++#ifndef HAVE_XFT2
+ Bool
+ XftDirScan (XftFontSet *set, const char *dir);
++#endif
+
+ /* xftdpy.c */
+ int
+@@ -388,11 +390,13 @@
+ XftListValueCompare (XftValue v1,
+ XftValue v2);
+
++#ifndef HAVE_XFT2
+ Bool
+ XftListValueListCompare (XftValueList *v1orig,
+ XftValueList *v2orig,
+ XftQual qual);
++#endif
+
+ Bool
+ XftListMatch (XftPattern *p,
+ XftPattern *font,
diff --git a/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft_h-fix.diff b/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft_h-fix.diff
new file mode 100644
index 000000000000..0971b0d039c3
--- /dev/null
+++ b/kde-base/kdebase/files/3.0.5a-r1/kdebase-3.0.5a-xft_h-fix.diff
@@ -0,0 +1,11 @@
+--- Xft.h.orig 2002-10-30 00:48:12.000000000 +0200
++++ Xft.h 2002-10-30 00:47:28.000000000 +0200
+@@ -150,6 +150,8 @@
+ int ref;
+ };
+
++typedef FcValueList XftValueList;
++
+ /*
+ * End of Gentoo hack
+ */
diff --git a/kde-base/kdebase/files/3.0.5a-r1/startkde-3.0.5a-r1-gentoo.diff b/kde-base/kdebase/files/3.0.5a-r1/startkde-3.0.5a-r1-gentoo.diff
new file mode 100644
index 000000000000..413af205de77
--- /dev/null
+++ b/kde-base/kdebase/files/3.0.5a-r1/startkde-3.0.5a-r1-gentoo.diff
@@ -0,0 +1,55 @@
+--- startkde~ 2002-12-20 14:34:51.000000000 +0100
++++ startkde 2002-12-20 14:24:38.000000000 +0100
+@@ -1,8 +1,21 @@
+-#!/bin/sh
++#!/bin/sh --login
+ #
+-# DEFAULT KDE STARTUP SCRIPT ( KDE-3.0.5a )
++# GENTOO CUSTOMIZED KDE STARTUP SCRIPT ( KDE-3.0.5a )
+ #
+
++# Gentoo part:
++export PATH="_KDEDIR_/bin:${PATH}"
++export KDEDIR="_KDEDIR_"
++export KDEDIRS="_KDEDIR_:/usr" # do NOT include env.d's $KDEDIRS
++
++cd ~
++[ -d .kde ] && mv .kde .kde.backup
++[ -e .kde3 ] || mkdir .kde3
++ln -sf .kde3 .kde
++export KDEHOME="${HOME}/.kde3"
++
++# Gentoo part ends
++
+ # Boot sequence:
+ #
+ # kdeinit is used to fork off processes which improves memory usage
+@@ -25,12 +38,12 @@
+ # especially necessary on slow machines, where starting KDE takes one or two
+ # minutes until anything appears on the screen.
+ #
+-# Set the background to plain grey.
++# Set the background to cyan (Gentoo version change).
+ # The standard X background is nasty, causing moire effects and exploding
+ # people's heads. We use colours from the standard KDE palette for those with
+ # palettised displays.
+
+-test "$XDM_MANAGED" || bkg="-solid #C0C0C0"
++test "$XDM_MANAGED" || bkg="-solid #5477A0"
+ xsetroot -cursor_name left_ptr $bkg
+
+ # The user's personal KDE directory is usually ~/.kde, but this setting
+@@ -131,7 +144,12 @@
+ fi
+
+ # the splashscreen and progress indicator
+-ksplash
++# Gentoo addition: run $KSPLASH if set, otherwise just the default 'ksplash'
++if [ -n "$KSPLASH" ]; then
++ $KSPLASH
++else
++ ksplash
++fi
+
+ # We set LD_BIND_NOW to increase the efficiency of kdeinit.
+ # kdeinit unsets this variable before loading applications.
diff --git a/kde-base/kdebase/files/digest-kdebase-3.0.5a-r1 b/kde-base/kdebase/files/digest-kdebase-3.0.5a-r1
new file mode 100644
index 000000000000..0c472115576e
--- /dev/null
+++ b/kde-base/kdebase/files/digest-kdebase-3.0.5a-r1
@@ -0,0 +1 @@
+MD5 16c53e754e866f112797f695ba84c3a4 kdebase-3.0.5a.tar.bz2 13117676
diff --git a/kde-base/kdebase/files/kscreensaver.pam b/kde-base/kdebase/files/kscreensaver.pam
index 8e4a1d9f516a..9490793c7d53 100644
--- a/kde-base/kdebase/files/kscreensaver.pam
+++ b/kde-base/kdebase/files/kscreensaver.pam
@@ -1 +1,4 @@
-auth required pam_pwdb.so shadow nullok
+#%PAM-1.0
+
+auth required /lib/security/pam_stack.so service=system-auth
+
diff --git a/kde-base/kdebase/kdebase-3.0.5a-r1.ebuild b/kde-base/kdebase/kdebase-3.0.5a-r1.ebuild
new file mode 100644
index 000000000000..d804215f2e16
--- /dev/null
+++ b/kde-base/kdebase/kdebase-3.0.5a-r1.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdebase/kdebase-3.0.5a-r1.ebuild,v 1.1 2002/12/25 00:51:49 azarah Exp $
+
+inherit eutils flag-o-matic kde-dist
+
+IUSE="ldap pam motif encode oggvorbis cups ssl opengl samba"
+
+DESCRIPTION="KDE ${PV} - base packages: the desktop, panel, window manager, konqueror..."
+
+KEYWORDS="~x86 ~ppc ~alpha"
+
+newdepend ">=media-sound/cdparanoia-3.9.8
+ ldap? ( >=net-nds/openldap-1.2 )
+ pam? ( >=sys-libs/pam-0.73 )
+ motif? ( >=x11-libs/openmotif-2.1.30 )
+ encode? ( >=media-sound/lame-3.89b )
+ oggvorbis? ( >=media-libs/libvorbis-1.0_beta1 )
+ cups? ( net-print/cups )
+ ssl? ( >=dev-libs/openssl-0.9.6b )
+ opengl? ( virtual/opengl )
+ samba? ( net-fs/samba )"
+# lm_sensors? ( ?/lm_sensors ) # ebuild doesn't exist yet
+
+DEPEND="${DEPEND} sys-apps/gzip"
+
+myconf="${myconf} --with-dpms --with-cdparanoia"
+
+use ldap && myconf="${myconf} --with-ldap" || myconf="${myconf} --without-ldap"
+use pam && myconf="${myconf} --with-pam" || myconf="${myconf} --with-shadow"
+use motif && myconf="${myconf} --with-motif" || myconf="${myconf} --without-motif"
+use encode && myconf="${myconf} --with-lame" || myconf="${myconf} --without-lame"
+use cups && myconf="${myconf} --with-cups" || myconf="${myconf} --disable-cups"
+use oggvorbis && myconf="${myconf} --with-vorbis" || myconf="${myconf} --without-vorbis"
+use opengl && myconf="${myconf} --with-gl" || myconf="${myconf} --without-gl"
+use ssl && myconf="${myconf} --with-ssl" || myconf="${myconf} --without-ssl"
+use pam && myconf="${myconf} --with-pam=yes" || myconf="${myconf} --with-pam=no --with-shadow"
+
+get_xft_setup() {
+ # This function tries to figure out if we have QT compiled against Xft1
+ # or Xft2.0, and also if we have Xft1, Xft2.0 or a broken Xft setup
+ # <azarah@gentoo.org> (24 Dec 2002)
+
+ # Check if QT was compiled agaist Xft1 or Xft2 ... the idea is to only get
+ # the major version of the linked lib if its Xft2, else it should be "" ..
+ # we then set it to "1" with the next check.
+ export QT_XFT_VER="`ldd ${QTDIR}/lib/libqt.so 2> /dev/null | grep "libXft" | awk '{split($1, ver, "."); print ver[3]}'`"
+ [ -z "${QT_XFT_VER}" ] && QT_XFT_VER="1"
+
+ # Check if the Xft headers are Xft1 or Xft2 ... the idea is to only get the
+ # major version of the Xft version if its Xft2, else it should be "" ..
+ # we then set it to "1" with the next check.
+ local XFT_HDR_VER="`grep "XFT_MAJOR" /usr/X11R6/include/X11/Xft/Xft.h | awk '($2 == "XFT_MAJOR") {print $3}'`"
+ [ -z "${XFT_HDR_VER}" ] && XFT_HDR_VER="1"
+
+ # Check if the libs installed are Xft1 or Xft2 ... We only check
+ # what the /usr/X11R6/lib/libXft.so symlink poinst to, as that should
+ # be 99% what apps will link to (except if we have Xft2 in /usr/lib,
+ # but that should not matter) ...
+ local XFT_LIB_VER="`readlink /usr/X11R6/lib/libXft.so 2> /dev/null | \
+ awk '{split($0, file, "/"); for (x in file) if (file[x] ~ /libXft\.so\.2/) print file[x]}'`"
+ [ "${XFT_LIB_VER/libXft}" != "${XFT_LIB_VER}" ] \
+ && XFT_LIB_VER="2" \
+ || XFT_LIB_VER="1"
+
+ if [ "${XFT_HDR_VER}" -eq "2" -a "${XFT_LIB_VER}" -eq "2" ]
+ then
+ # Yep, we have Xft2 support ...
+ export HAVE_XFT_2="yes"
+
+ [ -n "${BUILDDEBUG}" ] && einfo "We have Xft2.0 support"
+
+ elif [ "${XFT_HDR_VER}" != "${XFT_LIB_VER}" ]
+ then
+ # Xft support are broken (mixed header and lib versions) ...
+ export HAVE_XFT_2="broken"
+
+ [ -n "${BUILDDEBUG}" ] && einfo "We have broken Xft support"
+
+ elif [ "${XFT_HDR_VER}" -eq "1" -a "${XFT_LIB_VER}" -eq "1" ]
+ then
+ # Nope, we only have Xft1 installed ...
+ export HAVE_XFT_2="no"
+
+ [ -n "${BUILDDEBUG}" ] && einfo "We have Xft1 support"
+ fi
+}
+
+pkg_setup() {
+
+ # It should generally be considered bad form to touch files in the
+ # live filesystem, but we had a broken Xft.h out there, and to expect
+ # all users to update X because of it is harsh. Also, there is no
+ # official fix to xfree for this issue as of writing. See bug #9423
+ # for more info.
+ cd /usr/X11R6/include/X11/Xft
+ if patch --dry-run -p0 < ${FILESDIR}/${PVR}/${P}-xft_h-fix.diff > /dev/null
+ then
+ EPATCH_SINGLE_MSG="Patching Xft.h to fix missing defines..." \
+ epatch ${FILESDIR}/${PVR}/${P}-xft_h-fix.diff
+ fi
+
+ get_xft_setup
+
+ # Check what the setup are, and if things do not seem OK, die
+ # with a hopefully helpful message ...
+ if [ "${HAVE_XFT_2}" = "yes" -a "${QT_XFT_VER}" -eq "1" ]
+ then
+ eerror "You have Xft2.0 installed, but QT is linked against Xft1!"
+ eerror
+ eerror "Please fix this by remerging >=x11-libs/qt-3.1 and doing:"
+ eerror
+ eerror " # emerge \">=x11-libs/qt-3.1\""
+ die "You have Xft2.0 installed, but QT is linked against Xft1!"
+
+ elif [ "${HAVE_XFT_2}" = "broken" ]
+ then
+ eerror "You have a broken Xft setup! This could mean that you"
+ eerror "have Xft2.0 headers with Xft1 libs, or reversed. Please"
+ eerror "fix this before you try to merge kdebase again."
+ die "You have a broken Xft setup!"
+
+ elif [ "${HAVE_XFT_2}" = "no" -a "${QT_XFT_VER}" -eq "2" ]
+ then
+ eerror "You have QT compiled against Xft2.0, but Xft2.0 is no"
+ eerror "longer installed. Please remerge QT, and then try"
+ eerror "again to merge kdebase."
+ die "You have QT compiled against Xft2.0, but Xft2.0 is no longer installed."
+ fi
+}
+
+src_unpack() {
+
+ base_src_unpack
+
+ cd ${S}; epatch ${FILESDIR}/${PVR}/${P}-nspluginviewer-qt31.diff.gz
+
+ get_xft_setup
+
+ # Apply this only if we have a Xft1.2 Xft.h or have Xft2.0 installed ...
+ if [ -n "`grep "fontconfig" /usr/X11R6/include/X11/Xft/Xft.h`" ] || \
+ [ "${HAVE_XFT_2}" = "yes" ]
+ then
+ cd ${S}; epatch ${FILESDIR}/${PVR}/${P}-xft2.0-fix.diff
+ fi
+}
+
+src_compile() {
+
+ get_xft_setup
+
+ # Add '-DXFT_WITH_FONTCONFIG' to our C[XX]FLAGS if we have a Xft.h that
+ # uses fontconfig ... this will enable the fix in the '${P}-xft2.0-fix.diff'
+ # patch.
+ if [ -n "`grep "fontconfig" /usr/X11R6/include/X11/Xft/Xft.h`" ]
+ then
+ append-flags "-DXFT_WITH_FONTCONFIG"
+ fi
+
+ # Add '-DHAVE_XFT2' to our C[XX]FLAGS if we have Xft2.0 installed ...
+ # this will enable the fix in the '${P}-xft2.0-fix.diff' patch.
+ if [ "${HAVE_XFT_2}" = "yes" ]
+ then
+ append-flags "-DHAVE_XFT2"
+ fi
+
+ kde_src_compile myconf configure
+ kde_remove_flag kdm/kfrontend -fomit-frame-pointer
+ kde_src_compile make
+}
+
+src_install() {
+
+ kde_src_install
+
+ # cf bug #5953
+ insinto /etc/pam.d
+ newins ${FILESDIR}/kscreensaver.pam kscreensaver
+ newins ${FILESDIR}/kde.pam kde
+
+ # startkde script
+ cd ${D}/${KDEDIR}/bin
+ epatch ${FILESDIR}/${PVR}/startkde-${PVR}-gentoo.diff
+ dosed "s:_KDEDIR_:${KDEDIR}:" ${KDEDIR}/bin/startkde
+ chmod a+x ${KDEDIR}/bin/startkde
+
+ # x11 session script
+ cd ${T}
+ echo "#!/bin/sh
+${KDEDIR}/bin/startkde" > kde-${PV}
+ chmod a+x kde-${PV}
+ # old scheme - compatibility
+ exeinto /usr/X11R6/bin/wm
+ doexe kde-${PV}
+ # new scheme - for now >=xfree-4.2-r3 only
+ exeinto /etc/X11/Sessions
+ doexe kde-${PV}
+
+ cd ${D}/${PREFIX}/share/config/kdm || die
+ mv kdmrc kdmrc.orig
+ dosed "s:SessionTypes=:SessionTypes=kde-${PV},:" \
+ ${PREFIX}/share/config/kdm/kdmrc
+ dosed "s:Session=${PREFIX}/share/config/kdm/Xsession:Session=/etc/X11/xdm/Xsession:" \
+ ${PREFIX}/share/config/kdm/kdmrc
+
+ #backup splashscreen images, so they can be put back when unmerging
+ #mosfet or so.
+ if [ ! -d ${KDEDIR}/share/apps/ksplash.default ]
+ then
+ cd ${D}/${KDEDIR}/share/apps
+ cp -rf ksplash/ ksplash.default
+ fi
+
+ # Show gnome icons when choosing new icon for desktop shortcut
+ dodir /usr/share/pixmaps
+ mv ${D}/${KDEDIR}/share/apps/kdesktop/pics/* ${D}/usr/share/pixmaps/
+ rm -rf ${D}/${KDEDIR}/share/apps/kdesktop/pics/
+ cd ${D}/${KDEDIR}/share/apps/kdesktop/
+ ln -sf /usr/share/pixmaps/ pics
+
+ rmdir ${D}/${KDEDIR}/share/templates/.source/emptydir
+}
+
+pkg_postinst() {
+ mkdir -p ${KDEDIR}/share/templates/.source/emptydir
+}
+