Xft-1.1 fix
authorMartin Schlemmer <azarah@gentoo.org>
Thu, 31 Oct 2002 22:40:27 +0000 (22:40 +0000)
committerMartin Schlemmer <azarah@gentoo.org>
Thu, 31 Oct 2002 22:40:27 +0000 (22:40 +0000)
kde-base/kdebase/files/digest-kdebase-3.0.4-r2 [new file with mode: 0644]
kde-base/kdebase/files/kdebase-3.0.4-xft1.1-fix.diff [new file with mode: 0644]
kde-base/kdebase/files/kdebase-3.0.4-xft_h-fix.diff [new file with mode: 0644]
kde-base/kdebase/kdebase-3.0.4-r2.ebuild [new file with mode: 0644]

diff --git a/kde-base/kdebase/files/digest-kdebase-3.0.4-r2 b/kde-base/kdebase/files/digest-kdebase-3.0.4-r2
new file mode 100644 (file)
index 0000000..ace35a6
--- /dev/null
@@ -0,0 +1 @@
+MD5 d82ddae716912a3195139c8755e5c668 kdebase-3.0.4.tar.bz2 13111203
diff --git a/kde-base/kdebase/files/kdebase-3.0.4-xft1.1-fix.diff b/kde-base/kdebase/files/kdebase-3.0.4-xft1.1-fix.diff
new file mode 100644 (file)
index 0000000..2a6000d
--- /dev/null
@@ -0,0 +1,76 @@
+--- kdebase-3.0.4/kcontrol/kfontinst/kfontinst/XftConfig.cpp.orig      2002-10-30 00:53:18.000000000 +0200
++++ kdebase-3.0.4/kcontrol/kfontinst/kfontinst/XftConfig.cpp   2002-10-30 01:01:49.000000000 +0200
+@@ -276,7 +276,7 @@
+             }
+             case XftTypeString:
+                 str+="\"";
+-                str+=test->value.u.s;
++                str+=(QCString &)test->value.u.s;
+                 str+="\"";
+                 break;
+             case XftTypeBool:
+@@ -554,7 +554,7 @@
+     XftValue           value;
+     CXftConfig::TEntry *entry=new CXftConfig::TEntry;
+ 
+-    value.u.s=sval;
++    (char *)value.u.s=sval;
+     value.type=XftTypeString;
+     entry->test=XftTestCreate(XftQualAny, "family", XftOpEqual, value);
+ 
+@@ -780,7 +780,7 @@
+ 
+     for(entry=itsList.first(); entry; entry=itsList.next())
+         if(entry->test && 0==CMisc::stricmp(entry->test->field, "family") && XftTypeString==entry->test->value.type &&
+-           0==CMisc::stricmp(entry->test->value.u.s, family.latin1()) && entry->edit &&
++           0==CMisc::stricmp((char *)entry->test->value.u.s, family.latin1()) && entry->edit &&
+            0==CMisc::stricmp(entry->edit->field, field) && XftOpAssign==entry->edit->op && entry->edit->expr)
+             break;
+ 
+@@ -798,7 +798,7 @@
+             free(test->field);
+ 
+         if(XftTypeString==test->value.type)
+-            free(test->value.u.s);
++            free((void *)test->value.u.s);
+     }
+ }
+ 
+--- kdebase-3.0.4/kcontrol/kfontinst/kfontinst/XftConfigEditor.cpp.orig        2002-10-30 01:03:25.000000000 +0200
++++ kdebase-3.0.4/kcontrol/kfontinst/kfontinst/XftConfigEditor.cpp     2002-10-30 01:07:27.000000000 +0200
+@@ -469,7 +469,7 @@
+                     break;
+                 case XftTypeString:
+                     expr->op=XftOpString;
+-                    expr->u.sval=val.u.s;
++                    expr->u.sval=(char *)val.u.s;
+                     break;
+                 case XftTypeBool:
+                 default:
+@@ -655,12 +655,12 @@
+     if("foundry"==field || "family"==field || "encoding"==field || "style"==field)
+     {
+         val.type=XftTypeString;
+-        val.u.s=(char *)malloc(edit ? strVal.length()+1 : strVal.length()-1);
++        (char *)val.u.s=(char *)malloc(edit ? strVal.length()+1 : strVal.length()-1);
+ 
+         if(edit)
+-            strcpy(val.u.s, strVal.local8Bit());
++            strcpy((char *)val.u.s, strVal.local8Bit());
+         else
+-            strcpy(val.u.s, strVal.mid(1, strVal.length()-2).local8Bit());  // Need to remove quotes from each end of the string...
++            strcpy((char *)val.u.s, strVal.mid(1, strVal.length()-2).local8Bit());  // Need to remove quotes from each end of the string...
+     }
+     else if("spacing"==field)
+     {
+@@ -747,8 +747,8 @@
+         {
+             // Not sure about this...
+             val.type=XftTypeString;
+-            val.u.s=(char *)malloc(strVal.length()+1);
+-            strcpy(val.u.s, strVal.local8Bit());
++            (char *)val.u.s=(char *)malloc(strVal.length()+1);
++            strcpy((char *)val.u.s, strVal.local8Bit());
+         }
+         else if("rgba"==field)
+         {
diff --git a/kde-base/kdebase/files/kdebase-3.0.4-xft_h-fix.diff b/kde-base/kdebase/files/kdebase-3.0.4-xft_h-fix.diff
new file mode 100644 (file)
index 0000000..0971b0d
--- /dev/null
@@ -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/kdebase-3.0.4-r2.ebuild b/kde-base/kdebase/kdebase-3.0.4-r2.ebuild
new file mode 100644 (file)
index 0000000..276792a
--- /dev/null
@@ -0,0 +1,140 @@
+# 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.4-r2.ebuild,v 1.1 2002/10/31 22:40:27 azarah Exp $
+inherit kde-dist
+
+IUSE="ldap pam motif encode oggvorbis cups ssl opengl samba qt31patch"
+
+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"
+
+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}/${P}-xft_h-fix.diff > /dev/null
+       then
+               einfo "Patching Xft.h to fix missing defines..."
+               patch -p0 < ${FILESDIR}/${P}-xft_h-fix.diff > /dev/null || die
+       fi
+}
+
+src_unpack() {
+    
+    base_src_unpack
+
+    # Enable this local USE flag to allow nspluginviewer to compile with qt 3.1.x.
+    # It will patch nsplugins/viewer dir to cvs HEAD status.
+    # THIS MAY BE UNSTABLE AND YOU SHOULD NOT USE IT UNLESS YOU REALLY HAVE TO
+    # USE KDE 3.0.4 WITH QT >=3.1.X!
+    # Also note that kdebase 3.0.3 will compile just fine with all version of QT.
+    # However kdebase 3.0.4 introduced an nspluginviewer fix that necessitates this
+    # additional patch to work with qt 3.1.
+    if [ -n "`use qt31patch`" ]; then
+       cd $S
+       /bin/zcat "$FILESDIR/$P-nspluginviewer-qt31.diff.gz" | patch -p0 --
+    fi
+
+       # Apply this only if we are using a hacked Xft-1.1 Xft.h.
+       if [ -n "`grep "End of Gentoo hack" /usr/X11R6/include/X11/Xft/Xft.h`" ]
+       then
+               cd ${S}; patch -p1 < ${FILESDIR}/${P}-xft1.1-fix.diff || die
+       fi
+}
+
+src_compile() {
+
+    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
+    patch -p0 < ${FILESDIR}/startkde-${PVR}-gentoo.diff || die
+    mv startkde startkde.orig
+    sed -e "s:_KDEDIR_:${KDEDIR}:" startkde.orig > startkde
+    rm startkde.orig
+    chmod a+x 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
+    sed -e "s:SessionTypes=:SessionTypes=kde-${PV},:" \
+       -e "s:Session=${PREFIX}/share/config/kdm/Xsession:Session=/etc/X11/xdm/Xsession:" kdmrc.orig > kdmrc
+    rm kdmrc.orig
+
+    #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
+    mkdir -p ${D}/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
+}