summaryrefslogtreecommitdiffstats
path: root/main/fontconfig
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-05-28 09:57:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-05-28 09:57:22 +0000
commitb6af44b5a8f8ae0e8a14af955eee08b486381bc2 (patch)
treeb9d28a4a6e21937ddeaee5410ced612753d31d69 /main/fontconfig
parent870060036177b1788a47394ebb07e2c47199511d (diff)
downloadaports-b6af44b5a8f8ae0e8a14af955eee08b486381bc2.tar.bz2
aports-b6af44b5a8f8ae0e8a14af955eee08b486381bc2.tar.xz
main/fontconfig: upgrade to 2.10.93
Diffstat (limited to 'main/fontconfig')
-rw-r--r--main/fontconfig/APKBUILD20
-rw-r--r--main/fontconfig/fontconfig-fix-woff.patch157
2 files changed, 8 insertions, 169 deletions
diff --git a/main/fontconfig/APKBUILD b/main/fontconfig/APKBUILD
index cac6f1900..ecc9a9fb4 100644
--- a/main/fontconfig/APKBUILD
+++ b/main/fontconfig/APKBUILD
@@ -1,20 +1,19 @@
# Contributor: Mika Havela <mika.havela@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=fontconfig
-pkgver=2.10.92
-pkgrel=1
+pkgver=2.10.93
+pkgrel=0
pkgdesc="The Fontconfig package is a library for configuring and customizing font access."
url="http://fontconfig.org"
arch="all"
license="GPL"
depends=
-makedepends="pkgconfig freetype-dev expat-dev zlib-dev"
+depends_dev="freetype-dev expat-dev"
+makedepends="$depends_dev zlib-dev"
install=
triggers="$pkgname.trigger=/usr/share/fonts/*"
subpackages="$pkgname-doc $pkgname-dev"
-source="http://fontconfig.org/release/${pkgname}-${pkgver}.tar.gz
- fontconfig-fix-woff.patch"
-depends_dev="freetype-dev expat-dev"
+source="http://fontconfig.org/release/${pkgname}-${pkgver}.tar.gz"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
@@ -44,9 +43,6 @@ package() {
install -m644 -D COPYING "$pkgdir"/usr/share/licenses/"${pkgname}"/COPYING
}
-md5sums="5738838ef01f4c77fe33eeac2ceafe4d fontconfig-2.10.92.tar.gz
-d14a7c88fa001f1e5c2e350a2cf737cd fontconfig-fix-woff.patch"
-sha256sums="d9185302a937f800483fa50d9333581f1035cf4f7339e7aab456e6cde5c50bd2 fontconfig-2.10.92.tar.gz
-8ef41c69d5a87fd4d180a86fa80160277bb13fba020d547724698128590f60a1 fontconfig-fix-woff.patch"
-sha512sums="536a82ecb39488774a2ec83615ebdce08eff2f7884749e2d2bc4dec841b8142cf874d3a77d191b8d80a479efc10a1281e47bb5d96802e55936dbefd6fab62f9d fontconfig-2.10.92.tar.gz
-38b40fd954b3aa571661cea03e58ff2314c0fee55559db3abb6f2d705e7ea8ae9b9ad8a707791f2cd831220ae38926893ee4df3fd5c3a1beffb144e0e5e7e73d fontconfig-fix-woff.patch"
+md5sums="7772133ecce109f805ad8a2c1cce1dc7 fontconfig-2.10.93.tar.gz"
+sha256sums="381541e4d1a150dac46af1d9ad64bdc3a131d6b2707d192209b2ed26e3e64147 fontconfig-2.10.93.tar.gz"
+sha512sums="8baccbf38da4208307358c9474b060d56b68df3e9d35f2e20358766c68cedfb3c5a2a5f8dc113231bff492f8ff20c2d45c5af112207816d31d31ff414403c183 fontconfig-2.10.93.tar.gz"
diff --git a/main/fontconfig/fontconfig-fix-woff.patch b/main/fontconfig/fontconfig-fix-woff.patch
deleted file mode 100644
index a3600c018..000000000
--- a/main/fontconfig/fontconfig-fix-woff.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-diff --git a/src/fcfreetype.c b/src/fcfreetype.c
-index 8a037c0..5e8990d 100644
---- a/src/fcfreetype.c
-+++ b/src/fcfreetype.c
-@@ -1104,7 +1104,10 @@ FcFreeTypeQueryFace (const FT_Face face,
- char psname[256];
- const char *tmp;
-
-- FcChar8 *hashstr;
-+ FcChar8 *hashstr = NULL;
-+ char *fontdata = NULL;
-+ FT_Error err;
-+ FT_ULong len = 0, alen;
-
- pat = FcPatternCreate ();
- if (!pat)
-@@ -1662,12 +1665,34 @@ FcFreeTypeQueryFace (const FT_Face face,
- if (!FcPatternAddBool (pat, FC_DECORATIVE, decorative))
- goto bail1;
-
-- hashstr = FcHashGetSHA256DigestFromFile (file);
-+ err = FT_Load_Sfnt_Table (face, 0, 0, NULL, &len);
-+ if (err == FT_Err_Ok)
-+ {
-+ alen = (len + 63) & ~63;
-+ fontdata = malloc (alen);
-+ if (!fontdata)
-+ goto bail1;
-+ err = FT_Load_Sfnt_Table (face, 0, 0, (FT_Byte *)fontdata, &len);
-+ if (err != FT_Err_Ok)
-+ goto bail1;
-+ memset (&fontdata[len], 0, alen - len);
-+ hashstr = FcHashGetSHA256DigestFromMemory (fontdata, len);
-+ }
-+ else if (err == FT_Err_Invalid_Face_Handle)
-+ {
-+ /* font may not support SFNT. falling back to
-+ * read the font data from file directly
-+ */
-+ hashstr = FcHashGetSHA256DigestFromFile (file);
-+ }
-+ else
-+ {
-+ goto bail1;
-+ }
- if (!hashstr)
- goto bail1;
- if (!FcPatternAddString (pat, FC_HASH, hashstr))
- goto bail1;
-- free (hashstr);
-
- /*
- * Compute the unicode coverage for the font
-@@ -1756,6 +1781,10 @@ FcFreeTypeQueryFace (const FT_Face face,
- bail2:
- FcCharSetDestroy (cs);
- bail1:
-+ if (hashstr)
-+ free (hashstr);
-+ if (fontdata)
-+ free (fontdata);
- FcPatternDestroy (pat);
- bail0:
- return NULL;
-diff --git a/src/fchash.c b/src/fchash.c
-index 827b20f..92585a6 100644
---- a/src/fchash.c
-+++ b/src/fchash.c
-@@ -220,7 +220,7 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
-
- ret = FcHashInitSHA256Digest ();
- if (!ret)
-- return NULL;
-+ goto bail0;
-
- while (!feof (fp))
- {
-@@ -261,5 +261,60 @@ FcHashGetSHA256DigestFromFile (const FcChar8 *filename)
-
- bail0:
- fclose (fp);
-+
- return NULL;
- }
-+
-+FcChar8 *
-+FcHashGetSHA256DigestFromMemory (const char *fontdata,
-+ size_t length)
-+{
-+ char ibuf[64];
-+ FcChar32 *ret;
-+ size_t i = 0;
-+
-+ ret = FcHashInitSHA256Digest ();
-+ if (!ret)
-+ return NULL;
-+
-+ while (i <= length)
-+ {
-+ if ((length - i) < 64)
-+ {
-+ long v;
-+ size_t n;
-+
-+ /* add a padding */
-+ n = length - i;
-+ if (n > 0)
-+ memcpy (ibuf, &fontdata[i], n);
-+ memset (&ibuf[n], 0, 64 - n);
-+ ibuf[n] = 0x80;
-+ if ((64 - n) < 9)
-+ {
-+ /* process a block once */
-+ FcHashComputeSHA256Digest (ret, ibuf);
-+ memset (ibuf, 0, 64);
-+ }
-+ /* set input size at the end */
-+ v = length * 8;
-+ ibuf[63 - 0] = v & 0xff;
-+ ibuf[63 - 1] = (v >> 8) & 0xff;
-+ ibuf[63 - 2] = (v >> 16) & 0xff;
-+ ibuf[63 - 3] = (v >> 24) & 0xff;
-+ ibuf[63 - 4] = (v >> 32) & 0xff;
-+ ibuf[63 - 5] = (v >> 40) & 0xff;
-+ ibuf[63 - 6] = (v >> 48) & 0xff;
-+ ibuf[63 - 7] = (v >> 56) & 0xff;
-+ FcHashComputeSHA256Digest (ret, ibuf);
-+ break;
-+ }
-+ else
-+ {
-+ FcHashComputeSHA256Digest (ret, &fontdata[i]);
-+ }
-+ i += 64;
-+ }
-+
-+ return FcHashSHA256ToString (ret);
-+}
-diff --git a/src/fcint.h b/src/fcint.h
-index c45075e..8919958 100644
---- a/src/fcint.h
-+++ b/src/fcint.h
-@@ -818,9 +818,14 @@ FcFontSetSerialize (FcSerialize *serialize, const FcFontSet * s);
- FcPrivate FcChar8 *
- FcHashGetSHA256Digest (const FcChar8 *input_strings,
- size_t len);
-+
- FcPrivate FcChar8 *
- FcHashGetSHA256DigestFromFile (const FcChar8 *filename);
-
-+FcPrivate FcChar8 *
-+FcHashGetSHA256DigestFromMemory (const char *fontdata,
-+ size_t length);
-+
- /* fcinit.c */
- FcPrivate FcConfig *
- FcInitLoadOwnConfig (FcConfig *config);