summaryrefslogtreecommitdiff
path: root/media-libs/fontconfig
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-09-21 18:00:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-09-21 18:00:10 +0100
commit265dbe5dbc14c199299496c6db8fce3f76647015 (patch)
treeab18b5617d138f6684566b619405090989d55a2c /media-libs/fontconfig
parent586819755b4dbfdffdc8a725ab7c0f86095b8489 (diff)
gentoo resync : 21.09.2018
Diffstat (limited to 'media-libs/fontconfig')
-rw-r--r--media-libs/fontconfig/Manifest7
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch323
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch43
-rw-r--r--media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch101
-rw-r--r--media-libs/fontconfig/fontconfig-2.13.0-r4.ebuild2
-rw-r--r--media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild171
6 files changed, 645 insertions, 2 deletions
diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
index c065d7a302b9..901896093a9f 100644
--- a/media-libs/fontconfig/Manifest
+++ b/media-libs/fontconfig/Manifest
@@ -3,8 +3,13 @@ AUX fontconfig-2.12.3-latin-update.patch 2049 BLAKE2B 5fdf036d307a09eaa3b475fc9b
AUX fontconfig-2.13.0-add-missing-lintl.patch 1119 BLAKE2B 7b6b8deeb5b06ed3016add4e9e04c65ec7d8ef43223783950ea911c3544ec084c8ae78739be5eb79f4bcd91b91bdc943726d2d3d6dab46cabec69e2ce2b8338f SHA512 439470687be12c6cf3f9da21a5b0d1fac6c685296f740247aaf6cf1c1e22bf567ab2348408ed9fabe0c6f7b738e54b9813e562e9d762c861b61f70ee569ad754
AUX fontconfig-2.13.0-locale.patch 4096 BLAKE2B 8ebb0d8b72af07053a0fb7ee5550558d530b874051c7cfe8abde7f504c643a8b52bdaf265d39205d9c9fd5375f464ddaed858c9b599e633d04b92f94873bf65f SHA512 845b2db1783840070a27de2f28ce8f9cc6968b5e07c89c91110248261e9977bf15edc886b5ed9badb2fa14efc1868c82c4ab0ee45aec8a0cfbc74b5ae459c939
AUX fontconfig-2.13.0-names.patch 2421 BLAKE2B e8e922a445dee1d7bc77b72384cf3ab58b6fc7e1e1bc7b341d59bd1dcdfd818cd15071278fac69229e3f6b8b09d19a351390d76b7112ebf8d9749d2e1de29b8d SHA512 7c9bebf3eb76de05cfd1481e679715bebc5c429ea6976e96866c0e80b0021d3f00adae888e348897574193d7029e48409a0b73698dc2c8963e485992400192ad
+AUX fontconfig-2.13.1-proper_homedir.patch 8048 BLAKE2B 8735be09139f13f41eeccd6ec9b34ad5086ec6716053570b1368a0c8068bff6431e15d5c3ca0a0341958aa8801ceba422ceec012adeca7f0fe71e4bd1f9a5970 SHA512 ecd77822f9ee6ff2529cb3401c5f4e8cf105583f51b040ab160b8ee99c62762a9eb04f836a15b1f6186423c8180238d0379d55442088d2bab03d8abe817e6e22
+AUX fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch 1005 BLAKE2B 48d1ad733b7543a17f4917c81a7ca2df402f6fbc851d97edbb0d6e58d28446b532a9804db0af45eaf3b294158ad5377ed2dee95b2f66fe63b44312c39def5262 SHA512 b583cd21d11add33bc94ff624ba96ab8fe585beac2fa285b7b207bfdf199debe2496d8cf12ec406d84fcb46eaba4c9c5afd768002e2b35e0d569fc82d894947b
+AUX fontconfig-2.13.1-static_build.patch 2274 BLAKE2B 41dcaf492c8096d9d5d964f98fe4fed432afecfa2ee97c2a53f297cd7f674ca162aa01dcdadcc648c9cfb4cb8bd3f91714f1808322dd65c70308550c3a8e1b6c SHA512 c5a1a80cc99850d1ab197079ec629032310913d7756d86defcae5c721f3a50078c4059347b21cdc409b0de0d45c1466f038a9b5280bd7f772a966b43cbb3fe6e
DIST fontconfig-2.12.6.tar.bz2 1624683 BLAKE2B 48432f3d3cc90240ec19dffb6714e7f780eb6b401693b40e2efa2bb593bc89c42b03c99fce8f2ceb7c108da254dc248d91a790849d22feaa50a725338b80fd1f SHA512 2a1d3e62cae2bfcae2e67e9cb75ab6534a35bda4215f1ad4b8bf757e77e7d9d609c016562f5288fd10046a0e94655a807f6dd044d7868ed81a146c4275c4dd06
DIST fontconfig-2.13.0.tar.bz2 1700500 BLAKE2B bf137b27c9f73c5e2763b7a4a443a4aa5016bd3c0e35138249c2cf8841eb364c8e7bbea6495b53b88de26e3d5a429ebfb598a9f4fe7d875028a621df592ff35a SHA512 f0ad8f2542c8b1e900f5c3d213466a31dd3785da726d6eb455b6734c71c6e5751b28172203e2f9668e9c8e1512072235ea46a1a5e6a85ec54ccc332adb4e5fbc
+DIST fontconfig-2.13.1.tar.bz2 1723639 BLAKE2B 08b9a522a9d89bc5e5ed0f0898182359efb110f22b6b7010f6bdda0d6d516957ea74ebe0703d684d4724fd9f44a2eaf50d8329d4e0f4e45e79f50466d808b9e1 SHA512 f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100
EBUILD fontconfig-2.12.6.ebuild 4914 BLAKE2B 0088f7ef6b497b086c5f90a42330f1727e404e9818b29d25e30340679ddddf3df222cab240ee09021d99660a4fac2a5f16f59faf5b4ff4e56fc6fd6f689aa72b SHA512 7f78420ed60f3b575965e5088cde35c346f6a54ee1ee0ee1321c028a00e60f9df52bf6fcc13b3da53b0c1714209f513e5d49b64e24b5a9a4b4920fa0fadc1e79
-EBUILD fontconfig-2.13.0-r4.ebuild 5188 BLAKE2B 5a3242a0e0c9c9542107436070781165d768cb9265378b2e6a4dc07b4b236c2fe6bf03f31a354768369fd61e3e86a8a3ce7f44756e76c2fbf237bfb7656d0ff1 SHA512 964c0c1ba8cd44bbda81a7cb589abc72108ed24bd3c090ca3f560365e77a12905e594edfd5ee75ae50d2c8e7682dfaa8301a603132a7cd72161fcef994e3be24
+EBUILD fontconfig-2.13.0-r4.ebuild 5185 BLAKE2B ca625b954af37fdd7baf5b763479f07eb455d9bb37bf57c911c548a9a49a42bc9e6b1d06b8bd190f516a2c253f6daa5f46b2128e724bb2913d2ab8835f20b6d8 SHA512 412465dc3d02634e98ee395d300d7fdacc555c1dfeea7ee35819f9f7628962f11b57b6e41750698e6e327fa4077dbb0ca89b6d73b900eefc791a791bd84794ad
+EBUILD fontconfig-2.13.1-r2.ebuild 5119 BLAKE2B 4f885e4714892210a8cce5e138ae83a9331df3193e2b72bcfde8c30ba2def370a64435ef63c5ef0a24d09fef9f09845ec14d67dc2893f458b9513b84f8060e10 SHA512 c60092f8fed0fe72dac37e4649945b7e0cd06ed22ef25b1871eb8d113e57e0fca446199368102f2708b61260c1bb020e3932706b7a87722f178a4a2ac7903565
MISC metadata.xml 500 BLAKE2B 5326535fbf21d56868f15d3e5cda11bddba722762423b8831da99f9ff31bee71ed6d4e5ec62af46a7981c233c9d516068257413cb473c02657d3543619692b24 SHA512 bfc956b5196face33a60fa495b7948cd8f01802f23efd02da9da41146443b76f3d01ef5192a7541dd65e107df5e1935f73f5bfdb939c14fdde599919c7fde190
diff --git a/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch b/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch
new file mode 100644
index 000000000000..19aee94ba988
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch
@@ -0,0 +1,323 @@
+From 806fd4c2c5164d66d978b0a4c579c157e5cbe766 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Tue, 4 Sep 2018 09:08:37 +0000
+Subject: [PATCH] Fix the issue that '~' wasn't extracted to the proper homedir
+
+'~' in the filename was extracted to the home directory name in FcConfigFilename() though,
+this behavior was broken by d1f48f11. this change fixes it back to the correct behavior.
+
+https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/110
+diff --git a/src/fccfg.c b/src/fccfg.c
+index d7c48e8..4a53581 100644
+--- a/src/fccfg.c
++++ b/src/fccfg.c
+@@ -2207,17 +2207,19 @@ FcConfigFilename (const FcChar8 *url)
+ else
+ file = 0;
+ }
+-
+- path = FcConfigGetPath ();
+- if (!path)
+- return NULL;
+- for (p = path; *p; p++)
++ else
+ {
+- file = FcConfigFileExists (*p, url);
+- if (file)
+- break;
++ path = FcConfigGetPath ();
++ if (!path)
++ return NULL;
++ for (p = path; *p; p++)
++ {
++ file = FcConfigFileExists (*p, url);
++ if (file)
++ break;
++ }
++ FcConfigFreePath (path);
+ }
+- FcConfigFreePath (path);
+ return file;
+ }
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 79bcede..9f4d48a 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -91,6 +91,22 @@ test_bz106632_CFLAGS = \
+ test_bz106632_LDADD = $(top_builddir)/src/libfontconfig.la
+ TESTS += test-bz106632
+
++if !ENABLE_SHARED
++check_PROGRAMS += test-issue110
++test_issue110_CFLAGS = \
++ -I$(top_builddir) \
++ -I$(top_builddir)/src \
++ -I$(top_srcdir) \
++ -I$(top_srcdir)/src \
++ -DHAVE_CONFIG_H \
++ -DFONTCONFIG_PATH='"$(BASECONFIGDIR)"' \
++ $(NULL)
++test_issue110_LDADD = \
++ $(top_builddir)/src/libfontconfig.la \
++ $(NULL)
++TESTS += test-issue110
++endif
++
+ EXTRA_DIST=run-test.sh run-test-conf.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
+
+ CLEANFILES=out out1 out2 fonts.conf out.expected
+diff --git a/test/test-issue110.c b/test/test-issue110.c
+new file mode 100644
+index 0000000..28a3bd2
+--- /dev/null
++++ b/test/test-issue110.c
+@@ -0,0 +1,245 @@
++/*
++ * fontconfig/test/test-issue110.c
++ *
++ * Copyright © 2000 Keith Packard
++ * Copyright © 2018 Akira TAGOH
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that
++ * copyright notice and this permission notice appear in supporting
++ * documentation, and that the name of the author(s) not be used in
++ * advertising or publicity pertaining to distribution of the software without
++ * specific, written prior permission. The authors make no
++ * representations about the suitability of this software for any purpose. It
++ * is provided "as is" without express or implied warranty.
++ *
++ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
++ * PERFORMANCE OF THIS SOFTWARE.
++ */
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <dirent.h>
++#include <unistd.h>
++#include <errno.h>
++#ifndef HAVE_STRUCT_DIRENT_D_TYPE
++#include <sys/types.h>
++#include <sys/stat.h>
++#endif
++#include <fontconfig/fontconfig.h>
++
++#ifdef _WIN32
++# define FC_DIR_SEPARATOR '\\'
++# define FC_DIR_SEPARATOR_S "\\"
++#else
++# define FC_DIR_SEPARATOR '/'
++# define FC_DIR_SEPARATOR_S "/"
++#endif
++
++extern FcChar8 *FcConfigRealFilename (FcConfig *, FcChar8 *);
++
++#ifdef HAVE_MKDTEMP
++#define fc_mkdtemp mkdtemp
++#else
++char *
++fc_mkdtemp (char *template)
++{
++ if (!mktemp (template) || mkdir (template, 0700))
++ return NULL;
++
++ return template;
++}
++#endif
++
++FcBool
++mkdir_p (const char *dir)
++{
++ char *parent;
++ FcBool ret;
++
++ if (strlen (dir) == 0)
++ return FcFalse;
++ parent = (char *) FcStrDirname ((const FcChar8 *) dir);
++ if (!parent)
++ return FcFalse;
++ if (access (parent, F_OK) == 0)
++ ret = mkdir (dir, 0755) == 0 && chmod (dir, 0755) == 0;
++ else if (access (parent, F_OK) == -1)
++ ret = mkdir_p (parent) && (mkdir (dir, 0755) == 0) && chmod (dir, 0755) == 0;
++ else
++ ret = FcFalse;
++ free (parent);
++
++ return ret;
++}
++
++FcBool
++unlink_dirs (const char *dir)
++{
++ DIR *d = opendir (dir);
++ struct dirent *e;
++ size_t len = strlen (dir);
++ char *n = NULL;
++ FcBool ret = FcTrue;
++#ifndef HAVE_STRUCT_DIRENT_D_TYPE
++ struct stat statb;
++#endif
++
++ if (!d)
++ return FcFalse;
++ while ((e = readdir (d)) != NULL)
++ {
++ size_t l;
++
++ if (strcmp (e->d_name, ".") == 0 ||
++ strcmp (e->d_name, "..") == 0)
++ continue;
++ l = strlen (e->d_name) + 1;
++ if (n)
++ free (n);
++ n = malloc (l + len + 1);
++ if (!n)
++ {
++ ret = FcFalse;
++ break;
++ }
++ strcpy (n, dir);
++ n[len] = FC_DIR_SEPARATOR;
++ strcpy (&n[len + 1], e->d_name);
++#ifdef HAVE_STRUCT_DIRENT_D_TYPE
++ if (e->d_type == DT_DIR)
++#else
++ if (stat (n, &statb) == -1)
++ {
++ fprintf (stderr, "E: %s\n", n);
++ ret = FcFalse;
++ break;
++ }
++ if (S_ISDIR (statb.st_mode))
++#endif
++ {
++ if (!unlink_dirs (n))
++ {
++ fprintf (stderr, "E: %s\n", n);
++ ret = FcFalse;
++ break;
++ }
++ }
++ else
++ {
++ if (unlink (n) == -1)
++ {
++ fprintf (stderr, "E: %s\n", n);
++ ret = FcFalse;
++ break;
++ }
++ }
++ }
++ if (n)
++ free (n);
++ closedir (d);
++
++ if (rmdir (dir) == -1)
++ {
++ fprintf (stderr, "E: %s\n", dir);
++ return FcFalse;
++ }
++
++ return ret;
++}
++
++int
++main(void)
++{
++ FcConfig *cfg = FcConfigCreate ();
++ char *basedir, template[512] = "/tmp/fc110-XXXXXX";
++ char *sysroot, systempl[512] = "/tmp/fc110-XXXXXX";
++ FcChar8 *d = NULL;
++ FcChar8 *ret = NULL;
++ FcChar8 *s = NULL;
++ FILE *fp;
++ int retval = 0;
++
++ retval++;
++ basedir = fc_mkdtemp (template);
++ if (!basedir)
++ {
++ fprintf (stderr, "%s: %s\n", template, strerror (errno));
++ goto bail;
++ }
++ retval++;
++ sysroot = fc_mkdtemp (systempl);
++ if (!sysroot)
++ {
++ fprintf (stderr, "%s: %s\n", systempl, strerror (errno));
++ goto bail;
++ }
++ fprintf (stderr, "D: Creating %s\n", basedir);
++ mkdir_p (basedir);
++ setenv ("HOME", basedir, 1);
++ retval++;
++ s = FcStrBuildFilename (basedir, ".fonts.conf", NULL);
++ if (!s)
++ goto bail;
++ retval++;
++ fprintf (stderr, "D: Creating %s\n", s);
++ if ((fp = fopen (s, "wb")) == NULL)
++ goto bail;
++ fprintf (fp, "%s", s);
++ fclose (fp);
++ retval++;
++ fprintf (stderr, "D: Checking file path\n");
++ ret = FcConfigRealFilename (cfg, "~/.fonts.conf");
++ if (!ret)
++ goto bail;
++ retval++;
++ if (strcmp ((const char *) s, (const char *) ret) != 0)
++ goto bail;
++ free (ret);
++ free (s);
++ setenv ("FONTCONFIG_SYSROOT", sysroot, 1);
++ fprintf (stderr, "D: Creating %s\n", sysroot);
++ mkdir_p (sysroot);
++ retval++;
++ d = FcStrBuildFilename (sysroot, basedir, NULL);
++ fprintf (stderr, "D: Creating %s\n", d);
++ mkdir_p (d);
++ free (d);
++ s = FcStrBuildFilename (sysroot, basedir, ".fonts.conf", NULL);
++ if (!s)
++ goto bail;
++ retval++;
++ fprintf (stderr, "D: Creating %s\n", s);
++ if ((fp = fopen (s, "wb")) == NULL)
++ goto bail;
++ fprintf (fp, "%s", s);
++ fclose (fp);
++ retval++;
++ fprintf (stderr, "D: Checking file path\n");
++ ret = FcConfigRealFilename (cfg, "~/.fonts.conf");
++ if (!ret)
++ goto bail;
++ retval++;
++ if (strcmp ((const char *) s, (const char *) ret) != 0)
++ goto bail;
++ retval = 0;
++bail:
++ fprintf (stderr, "Cleaning up\n");
++ unlink_dirs (basedir);
++ if (ret)
++ free (ret);
++ if (s)
++ free (s);
++
++ return retval;
++}
++
+--
+2.18.0
+
diff --git a/media-libs/fontconfig/files/fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch b/media-libs/fontconfig/files/fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch
new file mode 100644
index 000000000000..cd66082eedd8
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch
@@ -0,0 +1,43 @@
+https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/107
+
+Reversion of part of:
+https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/f5dd8512bdf9fd8e01c30ae36f593758b29385cf
+
+--- /src/fcdir.c
++++ /src/fcdir.c
+@@ -421,13 +421,6 @@
+ /* Not using existing cache file, construct new cache */
+ if (!cache)
+ cache = FcDirCacheScan (dir, config);
+- if (cache)
+- {
+- FcFontSet *fs = FcCacheSet (cache);
+-
+- if (cache->dirs_count == 0 && (!fs || fs->nfont == 0))
+- FcDirCacheDeleteUUID (dir, config);
+- }
+
+ return cache;
+ }
+--- /test/run-test.sh
++++ /test/run-test.sh
+@@ -239,19 +239,4 @@
+
+ rm -rf $MyPWD/sysroot
+
+-dotest "deleting .uuid file on empty dir"
+-prep
+-cp $FONT1 $FONT2 $FONTDIR
+-$FCCACHE $FONTDIR
+-sleep 1
+-rm -f $FONTDIR/*pcf
+-$FCCACHE $FONTDIR
+-rmdir $FONTDIR > /dev/null 2>&1
+-if [ $? != 0 ]; then
+- echo "*** Test failed: $TEST"
+- echo "$FONTDIR isn't empty"
+- ls -al $FONTDIR
+- exit 1
+-fi
+-
+ rm -rf $FONTDIR $CACHEFILE $CACHEDIR $FONTCONFIG_FILE out
diff --git a/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch b/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
new file mode 100644
index 000000000000..7a0edfd849ab
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
@@ -0,0 +1,101 @@
+From 8208f99fa1676c42bfd8d74de3e9dac5366c150c Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Mon, 3 Sep 2018 04:56:16 +0000
+Subject: [PATCH] Fix the build issue with --enable-static
+
+Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/109
+---
+diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
+index bac1dda..af870d0 100644
+--- a/fontconfig/fontconfig.h
++++ b/fontconfig/fontconfig.h
+@@ -1076,6 +1076,10 @@ FcUtf16Len (const FcChar8 *string,
+ int *nchar,
+ int *wchar);
+
++FcPublic FcChar8 *
++FcStrBuildFilename (const FcChar8 *path,
++ ...);
++
+ FcPublic FcChar8 *
+ FcStrDirname (const FcChar8 *file);
+
+diff --git a/src/fcint.h b/src/fcint.h
+index de78cd8..a9d075a 100644
+--- a/src/fcint.h
++++ b/src/fcint.h
+@@ -1282,10 +1282,6 @@ FcStrUsesHome (const FcChar8 *s);
+ FcPrivate FcBool
+ FcStrIsAbsoluteFilename (const FcChar8 *s);
+
+-FcPrivate FcChar8 *
+-FcStrBuildFilename (const FcChar8 *path,
+- ...);
+-
+ FcPrivate FcChar8 *
+ FcStrLastSlash (const FcChar8 *path);
+
+diff --git a/test/test-bz106632.c b/test/test-bz106632.c
+index daa0c1e..2d67c2e 100644
+--- a/test/test-bz106632.c
++++ b/test/test-bz106632.c
+@@ -25,25 +25,26 @@
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
++#include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <dirent.h>
++#include <unistd.h>
++#include <errno.h>
+ #ifndef HAVE_STRUCT_DIRENT_D_TYPE
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <unistd.h>
+ #endif
+-#include "fcstr.c"
+-#undef FcConfigBuildFonts
+-#undef FcConfigCreate
+-#undef FcConfigGetCurrent
+-#undef FcConfigParseAndLoadFromMemory
+-#undef FcConfigUptoDate
+-#undef FcFontList
+-#undef FcInitReinitialize
+-#undef FcPatternCreate
+-#undef FcPatternDestroy
+ #include <fontconfig/fontconfig.h>
+
++#ifdef _WIN32
++# define FC_DIR_SEPARATOR '\\'
++# define FC_DIR_SEPARATOR_S "\\"
++#else
++# define FC_DIR_SEPARATOR '/'
++# define FC_DIR_SEPARATOR_S "/"
++#endif
++
+ #ifdef HAVE_MKDTEMP
+ #define fc_mkdtemp mkdtemp
+ #else
+@@ -154,18 +155,6 @@ unlink_dirs (const char *dir)
+ return ret;
+ }
+
+-FcChar8 *
+-FcLangNormalize (const FcChar8 *lang)
+-{
+- return NULL;
+-}
+-
+-FcChar8 *
+-FcConfigHome (void)
+-{
+- return NULL;
+-}
+-
+ int
+ main (void)
+ {
+--
+2.18.0
+
diff --git a/media-libs/fontconfig/fontconfig-2.13.0-r4.ebuild b/media-libs/fontconfig/fontconfig-2.13.0-r4.ebuild
index b0fe597f6e5b..490263d1f590 100644
--- a/media-libs/fontconfig/fontconfig-2.13.0-r4.ebuild
+++ b/media-libs/fontconfig/fontconfig-2.13.0-r4.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://fontconfig.org/release/${P}.tar.bz2"
LICENSE="MIT"
SLOT="1.0"
[[ $(ver_cut 3) -ge 90 ]] || \
-KEYWORDS="alpha amd64 ~arm arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="doc static-libs"
# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
diff --git a/media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild b/media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild
new file mode 100644
index 000000000000..0ba7f651fabb
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools multilib-minimal readme.gentoo-r1
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="https://fontconfig.org/"
+SRC_URI="https://fontconfig.org/release/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="1.0"
+[[ $(ver_cut 3) -ge 90 ]] || \
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="doc static-libs"
+
+BDEPEND="dev-util/gperf
+ >=sys-devel/gettext-0.19.8
+ virtual/pkgconfig[${MULTILIB_USEDEP}]
+ doc? (
+ =app-text/docbook-sgml-dtd-3.1*
+ app-text/docbook-sgml-utils[jadetex]
+ )"
+# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
+# default and used by every distro. See bug #283191.
+RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+ >=media-libs/freetype-2.9[${MULTILIB_USEDEP}]
+ !elibc_Darwin? ( sys-apps/util-linux[${MULTILIB_USEDEP}] )
+ elibc_Darwin? ( sys-libs/native-uuid )
+ virtual/libintl[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
+ virtual/ttf-fonts"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
+ "${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make liberation default
+ "${FILESDIR}"/${P}-revert_delete_.uuid_for_empty_directory.patch # 666418
+
+ # Patches from upstream (can usually be removed with next version bump)
+ "${FILESDIR}"/${P}-static_build.patch
+ "${FILESDIR}"/${P}-proper_homedir.patch
+)
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
+
+pkg_setup() {
+ DOC_CONTENTS="Please make fontconfig configuration changes using
+ \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
+ overwritten. If you need to reset your configuration to upstream defaults,
+ delete the directory ${EROOT}/etc/fonts/conf.d/ and re-emerge fontconfig."
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local addfonts
+ # harvest some font locations, such that users can benefit from the
+ # host OS's installed fonts
+ case ${CHOST} in
+ *-darwin*)
+ addfonts=",/Library/Fonts,/System/Library/Fonts"
+ ;;
+ *-solaris*)
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+ addfonts=",/usr/X/lib/X11/fonts/TrueType"
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+ addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
+ ;;
+ *-linux-gnu)
+ use prefix && [[ -d /usr/share/fonts ]] && \
+ addfonts=",/usr/share/fonts"
+ ;;
+ esac
+
+ local myeconfargs=(
+ $(use_enable doc docbook)
+ $(use_enable static-libs static)
+ --enable-docs
+ --localstatedir="${EPREFIX}"/var
+ --with-default-fonts="${EPREFIX}"/usr/share/fonts
+ --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}"
+ --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
+ )
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install() {
+ default
+
+ # avoid calling this multiple times, bug #459210
+ if multilib_is_native_abi; then
+ # stuff installed from build-dir
+ emake -C doc DESTDIR="${D}" install-man
+
+ insinto /etc/fonts
+ doins fonts.conf
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -name "*.la" -delete || die
+
+ # fc-lang directory contains language coverage datafiles
+ # which are needed to test the coverage of fonts.
+ insinto /usr/share/fc-lang
+ doins fc-lang/*.orth
+
+ dodoc doc/fontconfig-user.{txt,pdf}
+
+ if [[ -e ${ED}/usr/share/doc/fontconfig/ ]]; then
+ mv "${ED}"/usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die
+ rm -rf "${ED}"/usr/share/doc/fontconfig
+ fi
+
+ # Changes should be made to /etc/fonts/local.conf, and as we had
+ # too much problems with broken fonts.conf we force update it ...
+ echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
+ doenvd "${T}"/37fontconfig
+
+ # As of fontconfig 2.7, everything sticks their noses in here.
+ dodir /etc/sandbox.d
+ echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig
+
+ readme.gentoo_create_doc
+
+ keepdir /var/cache/${PN}
+}
+
+pkg_preinst() {
+ # Bug #193476
+ # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
+ # config files. If we install as-is, we'll blow away user settings.
+ ebegin "Syncing fontconfig configuration to system"
+ if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
+ for file in "${EROOT}"/etc/fonts/conf.avail/*; do
+ f=${file##*/}
+ if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
+ [[ -f ${ED}/etc/fonts/conf.avail/${f} ]] \
+ && ln -sf ../conf.avail/"${f}" "${ED}"/etc/fonts/conf.d/ &>/dev/null
+ else
+ [[ -f ${ED}/etc/fonts/conf.avail/${f} ]] \
+ && rm "${ED}"/etc/fonts/conf.d/"${f}" &>/dev/null
+ fi
+ done
+ fi
+ eend $?
+}
+
+pkg_postinst() {
+ einfo "Cleaning broken symlinks in ${EROOT}/etc/fonts/conf.d/"
+ find -L "${EROOT}"/etc/fonts/conf.d/ -type l -delete
+
+ readme.gentoo_print_elog
+
+ if [[ ${ROOT} == "" ]]; then
+ multilib_pkg_postinst() {
+ ebegin "Creating global font cache for ${ABI}"
+ "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
+ eend $?
+ }
+
+ multilib_parallel_foreach_abi multilib_pkg_postinst
+ fi
+}