diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-10-27 16:15:20 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-10-27 16:15:20 +0000 |
commit | 2ec5218b7a5ceca34ed376c825b1694a4ae52d21 (patch) | |
tree | 5d87c1868a0a45acd40ba32266e6a75c7d82d8a1 /media-libs | |
parent | added virtual/xft (diff) | |
download | historical-2ec5218b7a5ceca34ed376c825b1694a4ae52d21.tar.gz historical-2ec5218b7a5ceca34ed376c825b1694a4ae52d21.tar.bz2 historical-2ec5218b7a5ceca34ed376c825b1694a4ae52d21.zip |
some patches added
Diffstat (limited to 'media-libs')
7 files changed, 362 insertions, 1 deletions
diff --git a/media-libs/fontconfig/ChangeLog b/media-libs/fontconfig/ChangeLog index ed9a9e4a4dc7..e38d9a0a9172 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.4 2002/10/25 13:01:20 jmorgan Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/fontconfig/ChangeLog,v 1.5 2002/10/27 16:15:20 azarah Exp $ + +*fontconfig-2.0-r1 (26 Oct 2002) + + 26 Oct 2002; Martin Schlemmer <azarah@gentoo.org> fontconfig-2.0-r1.ebuild : + Add some patches from Redhat. *fontconfig-2.0 (30 Sep 2002) diff --git a/media-libs/fontconfig/files/digest-fontconfig-2.0-r1 b/media-libs/fontconfig/files/digest-fontconfig-2.0-r1 new file mode 100644 index 000000000000..05efa21a9a47 --- /dev/null +++ b/media-libs/fontconfig/files/digest-fontconfig-2.0-r1 @@ -0,0 +1 @@ +MD5 5ef5c58e501b0cb873ee2b2a04ed74e3 fcpackage.2_0.tar.gz 538159 diff --git a/media-libs/fontconfig/files/patch/fontconfig-0.0.1.020811.1151-slighthint.patch b/media-libs/fontconfig/files/patch/fontconfig-0.0.1.020811.1151-slighthint.patch new file mode 100644 index 000000000000..fb2527a3f151 --- /dev/null +++ b/media-libs/fontconfig/files/patch/fontconfig-0.0.1.020811.1151-slighthint.patch @@ -0,0 +1,57 @@ +--- fontconfig/fontconfig/fontconfig.h.slighthint Sun Aug 11 14:10:41 2002 ++++ fontconfig/fontconfig/fontconfig.h Mon Aug 12 16:23:51 2002 +@@ -55,6 +55,7 @@ + #define FC_FOUNDRY "foundry" /* String */ + #define FC_ANTIALIAS "antialias" /* Bool (depends) */ + #define FC_HINTING "hinting" /* Bool (true) */ ++#define FC_HINT_STYLE "hintstyle" /* Int */ + #define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */ + #define FC_AUTOHINT "autohint" /* Bool (false) */ + #define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */ +@@ -102,6 +103,12 @@ + #define FC_RGBA_VRGB 3 + #define FC_RGBA_VBGR 4 + ++/* hinting style */ ++#define FC_HINT_NONE 0 ++#define FC_HINT_SLIGHT 1 ++#define FC_HINT_MEDIUM 2 ++#define FC_HINT_FULL 3 ++ + typedef enum _FcType { + FcTypeVoid, + FcTypeInteger, +--- fontconfig/src/fcdefault.c.slighthint Tue Jul 9 18:08:14 2002 ++++ fontconfig/src/fcdefault.c Mon Aug 12 16:22:01 2002 +@@ -137,4 +137,9 @@ + FcPatternAddString (pattern, FC_LANG, (FcChar8 *) lang); + } + } ++ ++ if (FcPatternGet (pattern, FC_HINT_STYLE, 0, &v) == FcResultNoMatch) ++ { ++ FcPatternAddInteger (pattern, FC_HINT_STYLE, FC_HINT_FULL); ++ } + } +--- fontconfig/src/fcname.c.slighthint Sun Aug 11 14:10:42 2002 ++++ fontconfig/src/fcname.c Mon Aug 12 16:24:28 2002 +@@ -40,6 +40,7 @@ + { FC_FOUNDRY, FcTypeString, }, + /* { FC_CORE, FcTypeBool, }, */ + { FC_ANTIALIAS, FcTypeBool, }, ++ { FC_HINT_STYLE, FcTypeInteger, }, + { FC_HINTING, FcTypeBool, }, + { FC_VERTICAL_LAYOUT, FcTypeBool, }, + { FC_AUTOHINT, FcTypeBool, }, +@@ -153,6 +154,11 @@ + { (FcChar8 *) "bgr", "rgba", FC_RGBA_BGR, }, + { (FcChar8 *) "vrgb", "rgba", FC_RGBA_VRGB }, + { (FcChar8 *) "vbgr", "rgba", FC_RGBA_VBGR }, ++ ++ { (FcChar8 *) "hintnone", "hintstyle", FC_HINT_NONE }, ++ { (FcChar8 *) "hintslight", "hintstyle", FC_HINT_SLIGHT }, ++ { (FcChar8 *) "hintmedium", "hintstyle", FC_HINT_MEDIUM }, ++ { (FcChar8 *) "hintfull", "hintstyle", FC_HINT_FULL }, + }; + + #define NUM_FC_CONSTANTS (sizeof _FcBaseConstants/sizeof _FcBaseConstants[0]) diff --git a/media-libs/fontconfig/files/patch/fontconfig-0.0.1.020826.1330-blacklist.patch b/media-libs/fontconfig/files/patch/fontconfig-0.0.1.020826.1330-blacklist.patch new file mode 100644 index 000000000000..43eb110a7df9 --- /dev/null +++ b/media-libs/fontconfig/files/patch/fontconfig-0.0.1.020826.1330-blacklist.patch @@ -0,0 +1,53 @@ +--- fontconfig/src/fcdir.c.blacklist Mon Aug 26 15:57:40 2002 ++++ fontconfig/src/fcdir.c Fri Aug 30 14:59:05 2002 +@@ -150,6 +150,40 @@ + return ret; + } + ++static FcBool ++FcBlackListed (const char *name) ++{ ++ static const char * const black_listed_names[] = { ++ "hrger.pfa", ++ "hrgrr.pfa", ++ "hritr.pfa", ++ "hrpld.pfa", ++ "hrpldi.pfa", ++ "hrplt.pfa", ++ "hrplti.pfa", ++ "hrscc.pfa", ++ "hrscs.pfa", ++ "u003043t.gsf", ++ "u004006t.gsf" ++ }; ++ ++ int low = 0; ++ int high = sizeof(black_listed_names) / sizeof(black_listed_names[0]) - 1; ++ ++ while (low <= high) { ++ int mid = (low + high) / 2; ++ int res = strcmp (name, black_listed_names[mid]); ++ if (res == 0) ++ return FcTrue; ++ else if (res < 0) ++ high = mid - 1; ++ else ++ low = mid + 1; ++ } ++ ++ return FcFalse; ++} ++ + #define FC_MAX_FILE_LEN 4096 + + FcBool +@@ -201,7 +235,8 @@ + } + while (ret && (e = readdir (d))) + { +- if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN) ++ if (e->d_name[0] != '.' && strlen (e->d_name) < FC_MAX_FILE_LEN && ++ !FcBlackListed (e->d_name)) + { + strcpy ((char *) base, (char *) e->d_name); + ret = FcFileScan (set, dirs, cache, blanks, file, force); diff --git a/media-libs/fontconfig/files/patch/fontconfig-2.0-defaultconfig.patch b/media-libs/fontconfig/files/patch/fontconfig-2.0-defaultconfig.patch new file mode 100644 index 000000000000..d4c39806a75d --- /dev/null +++ b/media-libs/fontconfig/files/patch/fontconfig-2.0-defaultconfig.patch @@ -0,0 +1,93 @@ +--- fontconfig/fonts.conf.in.defaultconfig Mon Aug 19 15:31:59 2002 ++++ fontconfig/fonts.conf.in Mon Sep 2 23:32:37 2002 +@@ -170,45 +170,78 @@ + <alias> + <family>serif</family> + <prefer> +- <family>Times New Roman</family> + <family>Nimbus Roman No9 L</family> + <family>Luxi Serif</family> +- <family>Times</family> + <family>Kochi Mincho</family> ++ <family>ZYSong18030</family> + <family>AR PL SungtiL GB</family> + <family>AR PL Mingti2L Big5</family> + <family>Baekmuk Batang</family> ++ <family>Times New Roman</family> ++ <family>Times</family> + </prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer> +- <family>Verdana</family> +- <family>Nimbus Sans L</family> + <family>Luxi Sans</family> +- <family>Arial</family> ++ <family>Nimbus Sans L</family> + <family>Helvetica</family> + <family>Kochi Gothic</family> +- <family>AR PL KaitiM GB</family> +- <family>AR PL KaitiM Big5</family> +- <family>Baekmuk Dotum</family> ++ <family>ZYSong18030</family> ++ <family>AR PL SungtiL GB</family> ++ <family>AR PL Mingti2L Big5</family> ++ <family>Baekmuk Gulim</family> ++ <family>Verdana</family> ++ <family>Arial</family> + <family>SimSun</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> +- <family>Andale Mono</family> +- <family>Courier New</family> + <family>Luxi Mono</family> + <family>Nimbus Mono L</family> + <family>Kochi Gothic</family> +- <family>AR PL KaitiM GB</family> +- <family>Baekmuk Dotum</family> ++ <family>ZYSong18030</family> ++ <family>AR PL SungtiL GB</family> ++ <family>AR PL Mingti2L Big5</family> ++ <family>Baekmuk Gulim</family> ++ <family>Andale Mono</family> ++ <family>Courier New</family> + </prefer> + </alias> + + <!-- ++ We can't hint CJK fonts well, so turn off hinting for CJK fonts. ++ --> ++ ++ <match target="font"> ++ <test name="lang" compare="contains"> ++ <string>ja</string> ++ </test> ++ <edit name="hinting" mode="assign"> ++ <bool>false</bool> ++ </edit> ++ </match> ++ <match target="font"> ++ <test name="lang" compare="contains"> ++ <string>ko</string> ++ </test> ++ <edit name="hinting" mode="assign"> ++ <bool>false</bool> ++ </edit> ++ </match> ++ <match target="font"> ++ <test name="lang" compare="contains"> ++ <string>zh</string> ++ </test> ++ <edit name="hinting" mode="assign"> ++ <bool>false</bool> ++ </edit> ++ </match> ++ ++<!-- + Artificial oblique for fonts without an italic or oblique version + --> + diff --git a/media-libs/fontconfig/files/patch/fontconfig-2.0-subdir.patch b/media-libs/fontconfig/files/patch/fontconfig-2.0-subdir.patch new file mode 100644 index 000000000000..f79c0585985c --- /dev/null +++ b/media-libs/fontconfig/files/patch/fontconfig-2.0-subdir.patch @@ -0,0 +1,84 @@ +--- fontconfig/src/fcint.h.subdir Sat Aug 31 18:17:32 2002 ++++ fontconfig/src/fcint.h Mon Sep 9 15:09:41 2002 +@@ -238,18 +238,20 @@ + FcChar8 *name; + } FcGlobalCacheFile; + ++typedef struct _FcGlobalCacheDir FcGlobalCacheDir; ++ + typedef struct _FcGlobalCacheSubdir { + struct _FcGlobalCacheSubdir *next; +- FcChar8 *file; ++ FcGlobalCacheDir *ent; + } FcGlobalCacheSubdir; + +-typedef struct _FcGlobalCacheDir { ++struct _FcGlobalCacheDir { + struct _FcGlobalCacheDir *next; + FcGlobalCacheInfo info; + int len; + FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE]; + FcGlobalCacheSubdir *subdirs; +-} FcGlobalCacheDir; ++}; + + typedef struct _FcGlobalCache { + FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE]; +--- fontconfig/src/fcdir.c.subdir Mon Sep 9 13:04:09 2002 ++++ fontconfig/src/fcdir.c Mon Sep 9 15:09:41 2002 +@@ -117,6 +117,8 @@ + { + isDir = FcTrue; + ret = FcStrSetAdd (dirs, file); ++ if (cache && ret) ++ FcGlobalCacheUpdate (cache, file, 0, FC_FONT_FILE_DIR); + } + /* + * Update the cache +--- fontconfig/src/fccache.c.subdir Sat Aug 31 18:17:31 2002 ++++ fontconfig/src/fccache.c Mon Sep 9 15:09:41 2002 +@@ -448,14 +448,11 @@ + parent = FcGlobalCacheDirGet (cache, i.dir, i.dir_len, FcTrue); + if (!parent) + return 0; +- subdir = malloc (sizeof (FcGlobalCacheSubdir) + +- strlen ((const char *) i.base) + 1); ++ subdir = malloc (sizeof (FcGlobalCacheSubdir)); + if (!subdir) + return 0; +- FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir) + +- strlen ((const char *) i.base) + 1); +- subdir->file = (FcChar8 *) (subdir + 1); +- strcpy ((char *) subdir->file, (const char *) i.base); ++ FcMemAlloc (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir)); ++ subdir->ent = d; + subdir->next = parent->subdirs; + parent->subdirs = subdir; + return &d->info; +@@ -480,8 +477,7 @@ + for (s = d->subdirs; s; s = nexts) + { + nexts = s->next; +- FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir) + +- strlen ((char *) s->file) + 1); ++ FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheSubdir)); + free (s); + } + FcMemFree (FC_MEM_CACHE, sizeof (FcGlobalCacheDir) + d->len + 1); +@@ -535,12 +531,15 @@ + } + for (subdir = d->subdirs; subdir; subdir = subdir->next) + { ++ FcFilePathInfo info = FcFilePathInfoGet (subdir->ent->info.file); ++ + if (!FcCacheFontSetAdd (set, dirs, dir, dir_len, +- subdir->file, FC_FONT_FILE_DIR)) ++ info.base, FC_FONT_FILE_DIR)) + { + cache->broken = FcTrue; + return FcFalse; + } ++ FcGlobalCacheReferenced (cache, &subdir->ent->info); + } + + FcGlobalCacheReferenced (cache, &d->info); diff --git a/media-libs/fontconfig/fontconfig-2.0-r1.ebuild b/media-libs/fontconfig/fontconfig-2.0-r1.ebuild new file mode 100644 index 000000000000..704cead38ba3 --- /dev/null +++ b/media-libs/fontconfig/fontconfig-2.0-r1.ebuild @@ -0,0 +1,68 @@ +# 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.0-r1.ebuild,v 1.1 2002/10/27 16:15:20 azarah Exp $ + +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 sparc64" + +DEPEND=">=media-libs/freetype-2.0.9 + >=dev-libs/expat-1.95.3 + >=sys-apps/ed-0.2" + + +src_unpack() { + unpack ${A} + + cd ${S} + local PPREFIX="${FILESDIR}/patch/${PN}" + einfo "Applying patches..." + # Some patches from Redhat + patch -p1 < ${PPREFIX}-2.0-defaultconfig.patch &> /dev/null || die + patch -p1 < ${PPREFIX}-0.0.1.020811.1151-slighthint.patch &> /dev/null || die + # Blacklist certain fonts that freetype can't handle + patch -p1 < ${PPREFIX}-0.0.1.020826.1330-blacklist.patch &> /dev/null || die + # Patch from Keith Packard to fix problem where + # subdirectories could get lost from ~/.fonts.cache + patch -p1 < ${PPREFIX}-2.0-subdir.patch &> /dev/null || die +} + +src_compile() { + econf || die + + emake || die +} + +src_install() { + einstall confdir=${D}/etc/fonts \ + datadir=${D}/usr/share || die + + insinto /etc/fonts + doins ${S}/fonts.conf + + 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() { + if [ "${ROOT}" = "/" ] + then + einfo "Creating font cache..." + /usr/bin/fc-cache + fi +} + |