diff options
Diffstat (limited to 'kde-base/kdebase/files/3.0.5a-r2/kdebase-3.0.5a-xft2.0-fix.diff')
-rw-r--r-- | kde-base/kdebase/files/3.0.5a-r2/kdebase-3.0.5a-xft2.0-fix.diff | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/kde-base/kdebase/files/3.0.5a-r2/kdebase-3.0.5a-xft2.0-fix.diff b/kde-base/kdebase/files/3.0.5a-r2/kdebase-3.0.5a-xft2.0-fix.diff new file mode 100644 index 000000000000..940b20968a0f --- /dev/null +++ b/kde-base/kdebase/files/3.0.5a-r2/kdebase-3.0.5a-xft2.0-fix.diff @@ -0,0 +1,148 @@ + 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> (25 Dec 2002) + + +--- kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfig.cpp.orig 2002-12-25 04:06:47.000000000 +0200 ++++ kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfig.cpp 2002-12-25 04:07:27.000000000 +0200 +@@ -276,7 +276,11 @@ + } + case XftTypeString: + str+="\""; ++#ifndef XFT_WITH_FONTCONFIG + str+=test->value.u.s; ++#else ++ str+=(const char *)test->value.u.s; ++#endif + str+="\""; + break; + case XftTypeBool: +@@ -554,7 +558,11 @@ + XftValue value; + CXftConfig::TEntry *entry=new CXftConfig::TEntry; + ++#ifndef XFT_WITH_FONTCONFIG + value.u.s=sval; ++#else ++ value.u.s=(FcChar8 *)sval; ++#endif + value.type=XftTypeString; + entry->test=XftTestCreate(XftQualAny, "family", XftOpEqual, value); + +@@ -780,7 +788,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((const 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 +810,11 @@ + free(test->field); + + if(XftTypeString==test->value.type) ++#ifndef XFT_WITH_FONTCONFIG + free(test->value.u.s); ++#else ++ free((FcChar8 *)test->value.u.s); ++#endif + } + } + +--- kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfigEditor.cpp.orig 2002-12-25 04:07:06.000000000 +0200 ++++ kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/XftConfigEditor.cpp 2002-12-25 04: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 +659,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 ++ val.u.s=(FcChar8 *)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 +763,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 ++ val.u.s=(FcChar8 *)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-25 04:07:17.000000000 +0200 ++++ kdebase-3.0.5a/kcontrol/kfontinst/kfontinst/xftint.h 2002-12-25 04:07:27.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,10 +390,12 @@ + XftListValueCompare (XftValue v1, + XftValue v2); + ++#ifndef HAVE_XFT2 + Bool + XftListValueListCompare (XftValueList *v1orig, + XftValueList *v2orig, + XftQual qual); ++#endif + + Bool + XftListMatch (XftPattern *p, |