diff options
-rw-r--r-- | media-libs/fontconfig/ChangeLog | 7 | ||||
-rw-r--r-- | media-libs/fontconfig/files/digest-fontconfig-2.1-r1 | 1 | ||||
-rw-r--r-- | media-libs/fontconfig/files/patch/fontconfig-2.1-cvs-update-20021221.patch | 253 | ||||
-rw-r--r-- | media-libs/fontconfig/files/patch/fontconfig-2.1-x11fontpath-date-configure-v2.patch | 23 | ||||
-rw-r--r-- | media-libs/fontconfig/fontconfig-2.1-r1.ebuild | 94 | ||||
-rw-r--r-- | x11-libs/xft/ChangeLog | 8 | ||||
-rw-r--r-- | x11-libs/xft/files/digest-xft-2.0.1-r1 | 1 | ||||
-rw-r--r-- | x11-libs/xft/files/xft-2.0.1-cvs-update-20021221.patch | 235 | ||||
-rw-r--r-- | x11-libs/xft/xft-2.0.1-r1.ebuild | 65 |
9 files changed, 685 insertions, 2 deletions
diff --git a/media-libs/fontconfig/ChangeLog b/media-libs/fontconfig/ChangeLog index af38fe84475f..cfd617269338 100644 --- a/media-libs/fontconfig/ChangeLog +++ b/media-libs/fontconfig/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-libs/fontconfig # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/ChangeLog,v 1.12 2002/12/13 04:13:05 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/ChangeLog,v 1.13 2002/12/23 17:50:12 azarah Exp $ + +*fontconfig-2.1-r1 (23 Dec 2002) + + 23 Dec 2002; Martin Schlemmer <azarah@gentoo.org> fontconfig-2.1-r1.ebuild : + Update from XFree86 cvs. 13 Dec 2002; Martin Schlemmer <azarah@gentoo.org> fontconfig-2.1.ebuild : Bump to stable. Initial testing seems fine, and we need to resove the diff --git a/media-libs/fontconfig/files/digest-fontconfig-2.1-r1 b/media-libs/fontconfig/files/digest-fontconfig-2.1-r1 new file mode 100644 index 000000000000..1952672e6a0d --- /dev/null +++ b/media-libs/fontconfig/files/digest-fontconfig-2.1-r1 @@ -0,0 +1 @@ +MD5 2f2852c80924a9b5356c3037a471c1a1 fcpackage.2_1.tar.gz 544661 diff --git a/media-libs/fontconfig/files/patch/fontconfig-2.1-cvs-update-20021221.patch b/media-libs/fontconfig/files/patch/fontconfig-2.1-cvs-update-20021221.patch new file mode 100644 index 000000000000..08e3756b215f --- /dev/null +++ b/media-libs/fontconfig/files/patch/fontconfig-2.1-cvs-update-20021221.patch @@ -0,0 +1,253 @@ +diff -urN fontconfig.orig/fc-lang/fc-lang.c fontconfig/fc-lang/fc-lang.c +--- fontconfig.orig/fc-lang/fc-lang.c 2002-08-22 09:36:43.000000000 +0200 ++++ fontconfig/fc-lang/fc-lang.c 2002-12-16 11:16:29.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.3 2002/08/22 07:36:43 keithp Exp $ ++ * $XFree86: xc/lib/fontconfig/fc-lang/fc-lang.c,v 1.4 2002/12/14 02:03:58 dawes Exp $ + * + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -165,22 +165,38 @@ + return FcStrCmpIgnoreCase (*as, *bs); + } + ++#define MAX_LANG 1024 ++#define MAX_LANG_SET_MAP ((MAX_LANG + 31) / 32) ++ ++#define BitSet(map, id) ((map)[(id)>>5] |= ((FcChar32) 1 << ((id) & 0x1f))) ++#define BitGet(map, id) ((map)[(id)>>5] >> ((id) & 0x1f)) & 1) ++ + int + main (int argc, char **argv) + { +- char *files[1024]; +- FcCharSet *sets[1024]; +- int duplicate[1024]; +- char *names[1024]; ++ char *files[MAX_LANG]; ++ FcCharSet *sets[MAX_LANG]; ++ int duplicate[MAX_LANG]; ++ int country[MAX_LANG]; ++ char *names[MAX_LANG]; ++ char *langs[MAX_LANG]; + FILE *f; ++ int ncountry = 0; + int i = 0; + FcCharLeaf **leaves, **sleaves; + int total_leaves = 0; + int l, sl, tl; ++ int c; + char line[1024]; ++ FcChar32 map[MAX_LANG_SET_MAP]; ++ int num_lang_set_map; + + while (*++argv) ++ { ++ if (i == MAX_LANG) ++ fatal (*argv, 0, "Too many languages"); + files[i++] = *argv; ++ } + files[i] = 0; + qsort (files, i, sizeof (char *), compare); + i = 0; +@@ -191,6 +207,10 @@ + fatal (files[i], 0, strerror (errno)); + sets[i] = scan (f, files[i]); + names[i] = get_name (files[i]); ++ langs[i] = get_lang(names[i]); ++ if (strchr (langs[i], '-')) ++ country[ncountry++] = i; ++ + total_leaves += sets[i]->num; + i++; + fclose (f); +@@ -319,10 +339,54 @@ + " { FC_REF_CONSTANT, %d, " + "(FcCharLeaf **) leaves_%s, " + "(FcChar16 *) numbers_%s } },\n", +- get_lang(names[i]), ++ langs[i], + sets[j]->num, names[j], names[j]); + } + printf ("};\n\n"); ++ printf ("#define NUM_LANG_CHAR_SET %d\n", i); ++ num_lang_set_map = (i + 31) / 32; ++ printf ("#define NUM_LANG_SET_MAP %d\n", num_lang_set_map); ++ /* ++ * Dump indices with country codes ++ */ ++ if (ncountry) ++ { ++ int ncountry_ent = 0; ++ printf ("\n"); ++ printf ("static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = {\n"); ++ for (c = 0; c < ncountry; c++) ++ { ++ i = country[c]; ++ if (i >= 0) ++ { ++ int l = strchr (langs[i], '-') - langs[i]; ++ int d, k; ++ ++ for (k = 0; k < num_lang_set_map; k++) ++ map[k] = 0; ++ ++ BitSet (map, i); ++ for (d = c + 1; d < ncountry; d++) ++ { ++ int j = country[d]; ++ if (j >= 0 && !strncmp (langs[j], langs[i], l)) ++ { ++ BitSet(map, j); ++ country[d] = -1; ++ } ++ } ++ printf (" {"); ++ for (k = 0; k < num_lang_set_map; k++) ++ printf (" 0x%08x,", map[k]); ++ printf (" }, /* %*.*s */\n", ++ l, l, langs[i]); ++ ++ncountry_ent; ++ } ++ } ++ printf ("};\n\n"); ++ printf ("#define NUM_COUNTRY_SET %d\n", ncountry_ent); ++ } ++ + while (fgets (line, sizeof (line), stdin)) + fputs (line, stdout); + +diff -urN fontconfig.orig/fc-lang/fclang.h fontconfig/fc-lang/fclang.h +--- fontconfig.orig/fc-lang/fclang.h 2002-10-21 19:03:47.000000000 +0200 ++++ fontconfig/fc-lang/fclang.h 2002-12-16 11:16:29.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/fontconfig/fc-lang/fclang.h,v 1.20 2002/10/21 17:03:47 keithp Exp $ ++ * $XFree86: xc/lib/fontconfig/fc-lang/fclang.h,v 1.21 2002/12/14 02:03:58 dawes Exp $ + * + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -3996,3 +3996,11 @@ + { FC_REF_CONSTANT, 1, (FcCharLeaf **) leaves_fj, (FcChar16 *) numbers_fj } }, + }; + ++#define NUM_LANG_CHAR_SET 175 ++#define NUM_LANG_SET_MAP 6 ++ ++static const FcChar32 fcLangCountrySets[][NUM_LANG_SET_MAP] = { ++ { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00003e00, }, /* zh */ ++}; ++ ++#define NUM_COUNTRY_SET 1 +diff -urN fontconfig.orig/fontconfig/fcprivate.h fontconfig/fontconfig/fcprivate.h +--- fontconfig.orig/fontconfig/fcprivate.h 2002-08-22 09:36:44.000000000 +0200 ++++ fontconfig/fontconfig/fcprivate.h 2002-12-05 00:45:28.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.6 2002/08/22 07:36:44 keithp Exp $ ++ * $XFree86: xc/lib/fontconfig/fontconfig/fcprivate.h,v 1.7 2002/12/04 10:28:03 eich Exp $ + * + * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -87,7 +87,7 @@ + if (!orig) \ + FcPatternDestroy (__p__); \ + _FcPatternVapBuild_bail0: \ +- result = 0; \ ++ result = (void*)0; \ + \ + _FcPatternVapBuild_return: \ + ; \ +diff -urN fontconfig.orig/setfontdirs fontconfig/setfontdirs +--- fontconfig.orig/setfontdirs 2002-08-01 18:17:33.000000000 +0200 ++++ fontconfig/setfontdirs 2002-12-20 08:29:39.000000000 +0200 +@@ -1,6 +1,6 @@ + #!/bin/sh + # +-# $XFree86: xc/lib/fontconfig/setfontdirs,v 1.4 2002/08/01 16:17:33 keithp Exp $ ++# $XFree86: xc/lib/fontconfig/setfontdirs,v 1.5 2002/12/17 03:26:36 dawes Exp $ + # + LANG=C + export LANG +@@ -9,7 +9,17 @@ + sh ./findfonts ${1+"$@"} > $FONTDIRS + cp fonts.conf.in fonts.conf + chmod +w fonts.conf +-ed fonts.conf << EOF ++EDITOR=ed ++(echo q | ed) > /dev/null 2>&1 ++if [ $? -ne 0 ]; then ++ EDITOR=ex ++ (echo q | ex) > /dev/null 2>&1 ++ if [ $? -ne 0 ]; then ++ echo "$0: *** Error: Cannot find 'ed' or 'ex' editor" ++ exit 1 ++ fi ++fi ++$EDITOR fonts.conf << EOF + /FONTPATH_END/a + <!-- Font directory list configured on `date` --> + . +diff -urN fontconfig.orig/src/fclang.c fontconfig/src/fclang.c +--- fontconfig.orig/src/fclang.c 2002-08-27 01:34:31.000000000 +0200 ++++ fontconfig/src/fclang.c 2002-12-16 11:16:29.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.7 2002/08/26 23:34:31 keithp Exp $ ++ * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.8 2002/12/14 02:03:59 dawes Exp $ + * + * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -31,9 +31,6 @@ + + #include "../fc-lang/fclang.h" + +-#define NUM_LANG_CHAR_SET (sizeof (fcLangCharSets) / sizeof (fcLangCharSets[0])) +-#define NUM_LANG_SET_MAP ((NUM_LANG_CHAR_SET + 31) / 32) +- + struct _FcLangSet { + FcChar32 map[NUM_LANG_SET_MAP]; + FcStrSet *extra; +@@ -339,13 +336,21 @@ + FcLangResult + FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb) + { +- int i; ++ int i, j; + FcLangResult best, r; + + for (i = 0; i < NUM_LANG_SET_MAP; i++) + if (lsa->map[i] & lsb->map[i]) + return FcLangEqual; + best = FcLangDifferentLang; ++ for (j = 0; j < NUM_COUNTRY_SET; j++) ++ for (i = 0; i < NUM_LANG_SET_MAP; i++) ++ if ((lsa->map[i] & fcLangCountrySets[j][i]) && ++ (lsb->map[i] & fcLangCountrySets[j][i])) ++ { ++ best = FcLangDifferentCountry; ++ break; ++ } + if (lsa->extra) + { + r = FcLangSetCompareStrSet (lsb, lsa->extra); +diff -urN fontconfig.orig/src/fcstr.c fontconfig/src/fcstr.c +--- fontconfig.orig/src/fcstr.c 2002-09-01 00:17:32.000000000 +0200 ++++ fontconfig/src/fcstr.c 2002-12-16 11:16:29.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/fontconfig/src/fcstr.c,v 1.10 2002/08/31 22:17:32 keithp Exp $ ++ * $XFree86: xc/lib/fontconfig/src/fcstr.c,v 1.11 2002/12/14 01:59:38 dawes Exp $ + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -283,7 +283,7 @@ + if ((b & 0xfc00) != 0xdc00) + return 0; + result = ((((FcChar32) a & 0x3ff) << 10) | +- ((FcChar32) b & 0x3ff)) | 0x10000; ++ ((FcChar32) b & 0x3ff)) + 0x10000; + } + else + result = a; diff --git a/media-libs/fontconfig/files/patch/fontconfig-2.1-x11fontpath-date-configure-v2.patch b/media-libs/fontconfig/files/patch/fontconfig-2.1-x11fontpath-date-configure-v2.patch new file mode 100644 index 000000000000..0e8425744a0e --- /dev/null +++ b/media-libs/fontconfig/files/patch/fontconfig-2.1-x11fontpath-date-configure-v2.patch @@ -0,0 +1,23 @@ +--- fcpackage.2_1/fontconfig/setfontdirs.orig 2002-12-23 11:38:24.000000000 +0200 ++++ fcpackage.2_1/fontconfig/setfontdirs 2002-12-23 11:40:02.000000000 +0200 +@@ -6,7 +6,7 @@ + export LANG + FONTDIRS=fontdirs$$ + trap "rm $FONTDIRS" 0 +-sh ./findfonts ${1+"$@"} > $FONTDIRS ++sh ./findfonts ${1+"$@"} | awk '!/\/usr\/X11R6\/lib\/X11\/fonts/ { print }' > $FONTDIRS + cp fonts.conf.in fonts.conf + chmod +w fonts.conf + EDITOR=ed +@@ -21,10 +21,10 @@ + fi + $EDITOR fonts.conf << EOF + /FONTPATH_END/a +-<!-- Font directory list configured on `date` --> + . + +r $FONTDIRS + a ++ <dir>/usr/X11R6/lib/X11/fonts</dir> + <dir>~/.fonts</dir> + + . diff --git a/media-libs/fontconfig/fontconfig-2.1-r1.ebuild b/media-libs/fontconfig/fontconfig-2.1-r1.ebuild new file mode 100644 index 000000000000..be2c84be5fc6 --- /dev/null +++ b/media-libs/fontconfig/fontconfig-2.1-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/fontconfig-2.1-r1.ebuild,v 1.1 2002/12/23 17:50:12 azarah Exp $ + +inherit debug eutils + +S="${WORKDIR}/fcpackage.${PV/\./_}/fontconfig" +DESCRIPTION="A library for configuring and customizing font access." +SRC_URI="http://fontconfig.org/release/fcpackage.${PV/\./_}.tar.gz" +HOMEPAGE="http://fontconfig.org/" + +LICENSE="fontconfig" +SLOT="1.0" +KEYWORDS="~x86 ~alpha ~ppc ~sparc ~mips" + +# Seems like patches in freetype-2.1.2-r2 fixes bug #10028 +DEPEND=">=media-libs/freetype-2.1.2-r2 + >=dev-libs/expat-1.95.3 + >=sys-apps/ed-0.2" + + +fc_setup() { + # Do not use 'cc' to compile + [ ! -n "${CC}" ] && export CC="gcc" || : +} + +src_unpack() { + unpack ${A} + + cd ${S} + local PPREFIX="${FILESDIR}/patch/${PN}" + + # Cvs update from XFree86 tree + epatch ${PPREFIX}-${PV}-cvs-update-20021221.patch + + # Some patches from Redhat + epatch ${PPREFIX}-2.0-defaultconfig.patch + epatch ${PPREFIX}-${PV}-slighthint.patch + # Blacklist certain fonts that freetype can't handle + epatch ${PPREFIX}-0.0.1.020826.1330-blacklist.patch + # Fix config script to alway include X11 fontpath and remove date + epatch ${PPREFIX}-${PV}-x11fontpath-date-configure-v2.patch +} + +src_compile() { + fc_setup + + econf \ + --x-includes=/usr/X11R6/include \ + --x-libraries=/usr/X11R6/lib || die + + emake || die +} + +src_install() { + fc_setup + + einstall confdir=${D}/etc/fonts \ + datadir=${D}/usr/share || die + + insinto /etc/fonts + doins ${S}/fonts.conf + newins ${S}/fonts.conf fonts.conf.new + + cd ${S} + + mv fc-cache/fc-cache.man fc-cache/fc-cache.1 + mv fc-list/fc-list.man fc-list/fc-list.1 + mv src/fontconfig.man src/fontconfig.3 + for x in fc-cache/fc-cache.1 fc-list/fc-list.1 src/fontconfig.3 + do + doman ${x} + done + + dodoc AUTHORS COPYING ChangeLog NEWS README +} + +pkg_postinst() { + # Changes should be made to /etc/fonts/local.conf, and as we had + # too much problems with broken fonts.conf, we force update it ... + # <azarah@gentoo.org> (11 Dec 2002) + ewarn "Please make fontconfig related changes to /etc/fonts/local.conf," + ewarn "and NOT to /etc/fonts/fonts.conf, as it will be replaced!" + mv -f ${ROOT}/etc/fonts/fonts.conf.new ${ROOT}/etc/fonts/fonts.conf + rm -f ${ROOT}/etc/fonts/._cfg????_fonts.conf + + if [ "${ROOT}" = "/" ] + then + echo + einfo "Creating font cache..." + HOME="/root" /usr/bin/fc-cache -f + fi +} + diff --git a/x11-libs/xft/ChangeLog b/x11-libs/xft/ChangeLog index 318bb9df2d11..cc969ece620d 100644 --- a/x11-libs/xft/ChangeLog +++ b/x11-libs/xft/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-libs/xft # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/xft/ChangeLog,v 1.7 2002/12/11 20:06:04 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/xft/ChangeLog,v 1.8 2002/12/23 17:51:29 azarah Exp $ + +*xft-2.0.1-r1 (23 Dec 2002) + + 23 Dec 2002; Martin Schlemmer <azarah@gentoo.org> xft-2.0.1-r1.ebuild : + Update from XFree86 cvs tree. Only backup the Xft headers if XftFreetype.h + are present. *xft-2.0.1 (11 Dec 2002) diff --git a/x11-libs/xft/files/digest-xft-2.0.1-r1 b/x11-libs/xft/files/digest-xft-2.0.1-r1 new file mode 100644 index 000000000000..1952672e6a0d --- /dev/null +++ b/x11-libs/xft/files/digest-xft-2.0.1-r1 @@ -0,0 +1 @@ +MD5 2f2852c80924a9b5356c3037a471c1a1 fcpackage.2_1.tar.gz 544661 diff --git a/x11-libs/xft/files/xft-2.0.1-cvs-update-20021221.patch b/x11-libs/xft/files/xft-2.0.1-cvs-update-20021221.patch new file mode 100644 index 000000000000..532ca125954a --- /dev/null +++ b/x11-libs/xft/files/xft-2.0.1-cvs-update-20021221.patch @@ -0,0 +1,235 @@ +diff -urN Xft.orig/Xft.h Xft/Xft.h +--- Xft.orig/Xft.h 2002-10-11 19:53:02.000000000 +0200 ++++ Xft/Xft.h 2002-12-16 11:16:28.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/Xft/Xft.h,v 1.30 2002/10/11 17:53:02 keithp Exp $ ++ * $XFree86: xc/lib/Xft/Xft.h,v 1.31 2002/12/14 01:59:38 dawes Exp $ + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -325,11 +325,12 @@ + XGlyphInfo *extents); + + void +-XftTextExtentsUtf16 (XftFont *pub, ++XftTextExtentsUtf16 (Display *dpy, ++ XftFont *pub, + _Xconst FcChar8 *string, + FcEndian endian, +- int len, +- XGlyphInfo *extents); ++ int len, ++ XGlyphInfo *extents); + + /* xftfont.c */ + FcPattern * +@@ -606,6 +607,20 @@ + _Xconst FcChar8 *string, + int len); + ++void ++XftTextRenderUtf16 (Display *dpy, ++ int op, ++ Picture src, ++ XftFont *pub, ++ Picture dst, ++ int srcx, ++ int srcy, ++ int x, ++ int y, ++ _Xconst FcChar8 *string, ++ FcEndian endian, ++ int len); ++ + /* xftstr.c */ + + /* xftxlfd.c */ +diff -urN Xft.orig/xftextent.c Xft/xftextent.c +--- Xft.orig/xftextent.c 2002-10-11 19:53:02.000000000 +0200 ++++ Xft/xftextent.c 2002-12-16 11:16:28.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/Xft/xftextent.c,v 1.9 2002/10/11 17:53:02 keithp Exp $ ++ * $XFree86: xc/lib/Xft/xftextent.c,v 1.10 2002/12/14 01:59:38 dawes Exp $ + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -245,3 +245,47 @@ + if (glyphs != glyphs_local) + free (glyphs); + } ++ ++void ++XftTextExtentsUtf16 (Display *dpy, ++ XftFont *pub, ++ _Xconst FcChar8 *string, ++ FcEndian endian, ++ int len, ++ XGlyphInfo *extents) ++{ ++ FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; ++ FcChar32 ucs4; ++ int i; ++ int l; ++ int size; ++ ++ i = 0; ++ glyphs = glyphs_local; ++ size = NUM_LOCAL; ++ while (len && (l = FcUtf16ToUcs4 (string, endian, &ucs4, len)) > 0) ++ { ++ if (i == size) ++ { ++ glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); ++ if (!glyphs_new) ++ { ++ if (glyphs != glyphs_local) ++ free (glyphs); ++ memset (extents, '\0', sizeof (XGlyphInfo)); ++ return; ++ } ++ memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); ++ size *= 2; ++ if (glyphs != glyphs_local) ++ free (glyphs); ++ glyphs = glyphs_new; ++ } ++ glyphs[i++] = XftCharIndex (dpy, pub, ucs4); ++ string += l; ++ len -= l; ++ } ++ XftGlyphExtents (dpy, pub, glyphs, i, extents); ++ if (glyphs != glyphs_local) ++ free (glyphs); ++} +diff -urN Xft.orig/xftrender.c Xft/xftrender.c +--- Xft.orig/xftrender.c 2002-10-11 19:53:02.000000000 +0200 ++++ Xft/xftrender.c 2002-12-16 11:16:28.000000000 +0200 +@@ -1,5 +1,5 @@ + /* +- * $XFree86: xc/lib/Xft/xftrender.c,v 1.14 2002/10/11 17:53:02 keithp Exp $ ++ * $XFree86: xc/lib/Xft/xftrender.c,v 1.15 2002/12/14 01:59:38 dawes Exp $ + * + * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. + * +@@ -673,7 +673,7 @@ + } + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -705,7 +705,7 @@ + } + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -738,7 +738,7 @@ + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, + (string[i*2]<<8) | string[i*2+1]); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -771,7 +771,7 @@ + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, + string[i*2] | (string[i*2+1]<<8)); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -803,7 +803,7 @@ + } + for (i = 0; i < len; i++) + glyphs[i] = XftCharIndex (dpy, pub, string[i]); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -839,7 +839,7 @@ + (string[i*4+1] << 16) | + (string[i*4+2] << 8) | + (string[i*4+3])); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -875,7 +875,7 @@ + (string[i*4+1] << 8) | + (string[i*4+2] << 16) | + (string[i*4+3] << 24)); +- XftGlyphRender (dpy, PictOpOver, src, pub, dst, ++ XftGlyphRender (dpy, op, src, pub, dst, + srcx, srcy, x, y, glyphs, len); + if (glyphs != glyphs_local) + free (glyphs); +@@ -924,6 +924,56 @@ + string += l; + len -= l; + } ++ XftGlyphRender (dpy, op, src, pub, dst, ++ srcx, srcy, x, y, glyphs, i); ++ if (glyphs != glyphs_local) ++ free (glyphs); ++} ++ ++void ++XftTextRenderUtf16 (Display *dpy, ++ int op, ++ Picture src, ++ XftFont *pub, ++ Picture dst, ++ int srcx, ++ int srcy, ++ int x, ++ int y, ++ _Xconst FcChar8 *string, ++ FcEndian endian, ++ int len) ++{ ++ FT_UInt *glyphs, *glyphs_new, glyphs_local[NUM_LOCAL]; ++ FcChar32 ucs4; ++ int i; ++ int l; ++ int size; ++ ++ i = 0; ++ glyphs = glyphs_local; ++ size = NUM_LOCAL; ++ while (len && (l = FcUtf16ToUcs4 (string, endian, &ucs4, len)) > 0) ++ { ++ if (i == size) ++ { ++ glyphs_new = malloc (size * 2 * sizeof (FT_UInt)); ++ if (!glyphs_new) ++ { ++ if (glyphs != glyphs_local) ++ free (glyphs); ++ return; ++ } ++ memcpy (glyphs_new, glyphs, size * sizeof (FT_UInt)); ++ size *= 2; ++ if (glyphs != glyphs_local) ++ free (glyphs); ++ glyphs = glyphs_new; ++ } ++ glyphs[i++] = XftCharIndex (dpy, pub, ucs4); ++ string += l; ++ len -= l; ++ } + XftGlyphRender (dpy, PictOpOver, src, pub, dst, + srcx, srcy, x, y, glyphs, i); + if (glyphs != glyphs_local) diff --git a/x11-libs/xft/xft-2.0.1-r1.ebuild b/x11-libs/xft/xft-2.0.1-r1.ebuild new file mode 100644 index 000000000000..1f962f8aee38 --- /dev/null +++ b/x11-libs/xft/xft-2.0.1-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/xft/xft-2.0.1-r1.ebuild,v 1.1 2002/12/23 17:51:29 azarah Exp $ + +IUSE="" + +inherit eutils + +S="${WORKDIR}/fcpackage.${PV/\.0\./_}/Xft" +PROVIDE="virtual/xft" +DESCRIPTION="X FreeType library, also known as Xft2.0" +SRC_URI="http://fontconfig.org/release/fcpackage.${PV/\.0\./_}.tar.gz" +HOMEPAGE="http://fontconfig.org/" + +LICENSE="fontconfig" +SLOT="0" +KEYWORDS="~x86 ~ppc" + +RDEPEND="x11-base/xfree + >=media-libs/fontconfig-2.1-r1" + +DEPEND="${RDEPEND} + >=sys-devel/autoconf-2.53a" + +src_unpack() { + unpack ${A} + + cd ${S} + + # Update from XFree86 cvs tree + epatch ${FILESDIR}/${P}-cvs-update-20021221.patch + + einfo "Running autoconf..." + export WANT_AUTOCONF_2_5=1 + autoconf --force +} + +src_compile() { + econf --x-includes=/usr/X11R6/include \ + --x-libraries=/usr/X11R6/lib \ + || die "Xft2 config failed" + emake || die "Xft2 make failed" +} + +src_install() { + einstall confdir=${D}/etc/fonts \ + datadir=${D}/usr/share || die + + dodir /usr/X11R6/lib + dosym ../../lib/libXft.so.2.0 /usr/X11R6/lib/libXft.so +} + +pkg_preinst() { + if [ "${ROOT}" = "/" -a ! -d /root/.Xft -a \ + -f /usr/X11R6/include/X11/Xft/XftFreetype.h ] + then + mv -f /usr/X11R6/include/X11/Xft /root/.Xft + fi +} + +pkg_postinst() { + einfo "Your old Xft1.1 includes have been saved to /root/.Xft," + einfo "if they were present ..." +} + |