public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2017-05-09 21:47 Thomas Deutschmann
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2017-05-09 21:47 UTC (permalink / raw
  To: gentoo-commits

commit:     11be27377891a6da90b8ab04a7de3cfe5db276b9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue May  9 21:47:13 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May  9 21:47:26 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11be2737

media-libs/fontconfig: Rev bump to fix build issue with >=glibc-2.25 (bug #608924)

Gentoo-Bug: https://bugs.gentoo.org/608924
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 ...fix-ts18661-1-namespace-conflicts-w-glibc.patch |  59 ++++++++
 media-libs/fontconfig/fontconfig-2.12.1-r1.ebuild  | 158 +++++++++++++++++++++
 2 files changed, 217 insertions(+)

diff --git a/media-libs/fontconfig/files/fontconfig-2.12.1-fix-ts18661-1-namespace-conflicts-w-glibc.patch b/media-libs/fontconfig/files/fontconfig-2.12.1-fix-ts18661-1-namespace-conflicts-w-glibc.patch
new file mode 100644
index 00000000000..c0306280ef8
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.12.1-fix-ts18661-1-namespace-conflicts-w-glibc.patch
@@ -0,0 +1,59 @@
+http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130213.html
+
+Gentoo-Bug: https://bugs.gentoo.org/608924
+
+diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
+index 5c72b22..070a557 100644
+--- a/fontconfig/fontconfig.h
++++ b/fontconfig/fontconfig.h
+@@ -128,7 +128,8 @@ typedef int		FcBool;
+ #define FC_USER_CACHE_FILE	    ".fonts.cache-" FC_CACHE_VERSION
+ 
+ /* Adjust outline rasterizer */
+-#define FC_CHAR_WIDTH	    "charwidth"	/* Int */
++#define FC_CHARWIDTH	    "charwidth"	/* Int */
++#define FC_CHAR_WIDTH	    FC_CHARWIDTH
+ #define FC_CHAR_HEIGHT	    "charheight"/* Int */
+ #define FC_MATRIX	    "matrix"    /* FcMatrix */
+ 
+diff --git a/src/fcobjs.h b/src/fcobjs.h
+index 1fc4f65..d27864b 100644
+--- a/src/fcobjs.h
++++ b/src/fcobjs.h
+@@ -51,7 +51,7 @@ FC_OBJECT (DPI,			FcTypeDouble,	NULL)
+ FC_OBJECT (RGBA,		FcTypeInteger,	NULL)
+ FC_OBJECT (SCALE,		FcTypeDouble,	NULL)
+ FC_OBJECT (MINSPACE,		FcTypeBool,	NULL)
+-FC_OBJECT (CHAR_WIDTH,		FcTypeInteger,	NULL)
++FC_OBJECT (CHARWIDTH,		FcTypeInteger,	NULL)
+ FC_OBJECT (CHAR_HEIGHT,		FcTypeInteger,	NULL)
+ FC_OBJECT (MATRIX,		FcTypeMatrix,	NULL)
+ FC_OBJECT (CHARSET,		FcTypeCharSet,	FcCompareCharSet)
+
+diff --git a/src/fcobjshash.gperf b/src/fcobjshash.gperf
+index 80a0237..eb4ad84 100644
+--- a/src/fcobjshash.gperf
++++ b/src/fcobjshash.gperf
+@@ -44,7 +44,7 @@ int id;
+ "rgba",FC_RGBA_OBJECT
+ "scale",FC_SCALE_OBJECT
+ "minspace",FC_MINSPACE_OBJECT
+-"charwidth",FC_CHAR_WIDTH_OBJECT
++"charwidth",FC_CHARWIDTH_OBJECT
+ "charheight",FC_CHAR_HEIGHT_OBJECT
+ "matrix",FC_MATRIX_OBJECT
+ "charset",FC_CHARSET_OBJECT
+
+diff --git a/src/fcobjshash.h b/src/fcobjshash.h
+index 5a4d1ea..4e66bb0 100644
+--- a/src/fcobjshash.h
++++ b/src/fcobjshash.h
+@@ -284,7 +284,7 @@ FcObjectTypeLookup (register const char *str, register unsigned int len)
+       {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str43,FC_CHARSET_OBJECT},
+       {-1},
+ #line 47 "fcobjshash.gperf"
+-      {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT},
++      {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT},
+ #line 48 "fcobjshash.gperf"
+       {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str46,FC_CHAR_HEIGHT_OBJECT},
+ #line 55 "fcobjshash.gperf"

diff --git a/media-libs/fontconfig/fontconfig-2.12.1-r1.ebuild b/media-libs/fontconfig/fontconfig-2.12.1-r1.ebuild
new file mode 100644
index 00000000000..a68bb0be4bd
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.12.1-r1.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib-minimal readme.gentoo-r1
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="http://fontconfig.org/"
+SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc static-libs"
+
+# 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.5.3-r1[${MULTILIB_USEDEP}]
+	abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	doc? ( =app-text/docbook-sgml-dtd-3.1*
+		app-text/docbook-sgml-utils[jadetex] )"
+PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
+	virtual/ttf-fonts"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
+	"${FILESDIR}"/${PN}-2.11.93-latin-update.patch # 130466 + make liberation default
+	"${FILESDIR}"/${PN}-2.12.1-fix-ts18661-1-namespace-conflicts-w-glibc.patch # 608924
+)
+
+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)
+		--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
+	prune_libtool_files --all
+
+	# 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
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2018-03-08 10:12 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2018-03-08 10:12 UTC (permalink / raw
  To: gentoo-commits

commit:     01d8b1b08bcc63d3cfe209ab11b2942f8a32dd1f
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  8 10:11:27 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar  8 10:11:59 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01d8b1b0

media-libs/fontconfig: Removed old.

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 media-libs/fontconfig/Manifest                     |   1 -
 .../files/fontconfig-2.11.1-fc-cache-r.patch       |  26 ----
 .../files/fontconfig-2.7.1-latin-reorder.patch     |  50 -------
 media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild  | 159 ---------------------
 4 files changed, 236 deletions(-)

diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
index 01e04578f42..0ab2d6c2885 100644
--- a/media-libs/fontconfig/Manifest
+++ b/media-libs/fontconfig/Manifest
@@ -1,4 +1,3 @@
-DIST fontconfig-2.11.1.tar.bz2 1516095 BLAKE2B 4f78c606d198c4d721dd7fe61181f4433a562fee7f69372e64b661e4aac7750928bc158691fdbaf5ae932bda373d007f95a6d0089cda2eb50f15f599c4eb9d6f SHA512 acf4e6293e0e5521e4b8f29f4b48860ecd1d39744d0eab21c7332e56bfc3ccc63548e459243c5e425b8e5ef265f2cf065eece02460725e794041219d41188149
 DIST fontconfig-2.12.4.tar.bz2 1613580 BLAKE2B 9d6b0d5d7bc61cd3dbab2ad769df3aa33c1b38d6c55e02e18aee875a1bef4162a5bba0b9bf8f09c0f94d63c64c3f6bf6f3c5d993f210f74076f861c696f5262c SHA512 f336e9220afe738e0bf7186d87a5eb09842342ad99ca2102c69820a1f0b232e15c61ef72ae3f5d56503f5be32557d09180a80e05690e85b4eb13ed88f5cece81
 DIST fontconfig-2.12.6.tar.bz2 1624683 BLAKE2B 48432f3d3cc90240ec19dffb6714e7f780eb6b401693b40e2efa2bb593bc89c42b03c99fce8f2ceb7c108da254dc248d91a790849d22feaa50a725338b80fd1f SHA512 2a1d3e62cae2bfcae2e67e9cb75ab6534a35bda4215f1ad4b8bf757e77e7d9d609c016562f5288fd10046a0e94655a807f6dd044d7868ed81a146c4275c4dd06
 DIST fontconfig-2.13.0.tar.bz2 1700500 BLAKE2B bf137b27c9f73c5e2763b7a4a443a4aa5016bd3c0e35138249c2cf8841eb364c8e7bbea6495b53b88de26e3d5a429ebfb598a9f4fe7d875028a621df592ff35a SHA512 f0ad8f2542c8b1e900f5c3d213466a31dd3785da726d6eb455b6734c71c6e5751b28172203e2f9668e9c8e1512072235ea46a1a5e6a85ec54ccc332adb4e5fbc

diff --git a/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch b/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch
deleted file mode 100644
index 48f67f12974..00000000000
--- a/media-libs/fontconfig/files/fontconfig-2.11.1-fc-cache-r.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From f44157c809d280e2a0ce87fb078fc4b278d24a67 Mon Sep 17 00:00:00 2001
-From: Akira TAGOH <akira@tagoh.org>
-Date: Thu, 10 Apr 2014 19:27:55 +0900
-Subject: Fix fc-cache fail with -r
-
-Do not unlink the cache even if --really-force is given.
-because re-scanning process expects the cache exists.
-
-https://bugs.freedesktop.org/show_bug.cgi?id=77252
-
-diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
-index 99e0e9f..90ebad3 100644
---- a/fc-cache/fc-cache.c
-+++ b/fc-cache/fc-cache.c
-@@ -388,7 +388,7 @@ main (int argc, char **argv)
-     list = FcStrListCreate (updateDirs);
-     if (list)
-     {
--	ret += scanDirs (list, config, FcTrue, really_force, verbose, FcFalse, &changed, NULL);
-+	ret += scanDirs (list, config, FcTrue, FcFalse, verbose, FcFalse, &changed, NULL);
- 	FcStrListDone (list);
-     }
-     FcStrSetDestroy (updateDirs);
--- 
-cgit v0.10.2
-

diff --git a/media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch b/media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch
deleted file mode 100644
index 6ecf6cb9df6..00000000000
--- a/media-libs/fontconfig/files/fontconfig-2.7.1-latin-reorder.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Naurp fontconfig-2.7.1-orig/conf.d/60-latin.conf fontconfig-2.7.1/conf.d/60-latin.conf
---- fontconfig-2.7.1-orig/conf.d/60-latin.conf	2009-07-10 11:09:33.000000000 -0600
-+++ fontconfig-2.7.1/conf.d/60-latin.conf	2009-08-16 15:25:38.347701112 -0600
-@@ -4,8 +4,8 @@
- 	<alias>
- 		<family>serif</family>
- 		<prefer>
--			<family>Bitstream Vera Serif</family>
- 			<family>DejaVu Serif</family>
-+			<family>Bitstream Vera Serif</family>
- 			<family>Times New Roman</family>
- 			<family>Thorndale AMT</family>
- 			<family>Luxi Serif</family>
-@@ -16,14 +16,14 @@
- 	<alias>
- 		<family>sans-serif</family>
- 		<prefer>
--			<family>Bitstream Vera Sans</family>
- 			<family>DejaVu Sans</family>
--			<family>Verdana</family>
--			<family>Arial</family>
--			<family>Albany AMT</family>
-+			<family>Bitstream Vera Sans</family>
- 			<family>Luxi Sans</family>
- 			<family>Nimbus Sans L</family>
-+			<family>Arial</family>
-+			<family>Albany AMT</family>
- 			<family>Helvetica</family>
-+			<family>Verdana</family>
- 			<family>Lucida Sans Unicode</family>
- 			<family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
- 			<family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
-@@ -32,14 +32,14 @@
- 	<alias>
- 		<family>monospace</family>
- 		<prefer>
--			<family>Bitstream Vera Sans Mono</family>
- 			<family>DejaVu Sans Mono</family>
-+			<family>Bitstream Vera Sans Mono</family>
- 			<family>Inconsolata</family>
-+			<family>Luxi Mono</family>
-+			<family>Nimbus Mono L</family>
- 			<family>Andale Mono</family>
- 			<family>Courier New</family>
- 			<family>Cumberland AMT</family>
--			<family>Luxi Mono</family>
--			<family>Nimbus Mono L</family>
- 			<family>Courier</family>
- 		</prefer>
- 	</alias>

diff --git a/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild b/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild
deleted file mode 100644
index 4c6d46f8844..00000000000
--- a/media-libs/fontconfig/fontconfig-2.11.1-r2.ebuild
+++ /dev/null
@@ -1,159 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-AUTOTOOLS_AUTORECONF=yes
-
-inherit eutils readme.gentoo autotools-multilib
-
-DESCRIPTION="A library for configuring and customizing font access"
-HOMEPAGE="http://fontconfig.org/"
-SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="1.0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="doc static-libs"
-
-# 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.5.3-r1[${MULTILIB_USEDEP}]
-	abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	doc? (
-		=app-text/docbook-sgml-dtd-3.1*
-		app-text/docbook-sgml-utils[jadetex]
-	)"
-PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
-	virtual/ttf-fonts"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2.7.1-latin-reorder.patch	# 130466
-	"${FILESDIR}"/${PN}-2.10.2-docbook.patch	# 310157
-	"${FILESDIR}"/${PN}-2.11.1-fc-cache-r.patch	# 531748
-)
-
-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_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)
-		# always enable docs to install manpages
-		--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
-	)
-
-	autotools-multilib_src_configure
-}
-
-multilib_src_install() {
-	default
-
-	# XXX: 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
-	prune_libtool_files --all
-
-	#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
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2018-03-15  5:22 Ulrich Müller
  0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Müller @ 2018-03-15  5:22 UTC (permalink / raw
  To: gentoo-commits

commit:     af2a402ec7449348b50332919a66e54b552d6da0
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 15 05:19:23 2018 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Thu Mar 15 05:20:00 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af2a402e

media-libs/fontconfig: Do not call setlocale in the library.

Patch from upstream.
https://bugs.freedesktop.org/show_bug.cgi?id=105492

Closes: https://bugs.gentoo.org/650332
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/fontconfig-2.13.0-locale.patch           | 200 +++++++++++++++++----
 ....13.0-r1.ebuild => fontconfig-2.13.0-r2.ebuild} |   0
 2 files changed, 170 insertions(+), 30 deletions(-)

diff --git a/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch b/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch
index 70868b1abc1..002e493a409 100644
--- a/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch
+++ b/media-libs/fontconfig/files/fontconfig-2.13.0-locale.patch
@@ -1,37 +1,177 @@
 https://bugs.gentoo.org/650332
+Do not set locale in the library.
+Patch from upstream.
 
-From 923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f Mon Sep 17 00:00:00 2001
-From: Akira TAGOH <akira@tagoh.org>
-Date: Wed, 14 Mar 2018 12:35:05 +0900
-Subject: [PATCH] Do not override locale if already set by app
-
-https://bugs.freedesktop.org/show_bug.cgi?id=105492
----
- src/fccfg.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/fccfg.c b/src/fccfg.c
-index eb0b76d..e311f17 100644
+--- a/fc-cache/fc-cache.c
++++ b/fc-cache/fc-cache.c
+@@ -41,6 +41,7 @@
+ #include <fcntl.h>
+ #include <dirent.h>
+ #include <string.h>
++#include <locale.h>
+ 
+ #if defined (_WIN32)
+ #define STRICT
+@@ -302,6 +303,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int		c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "Efrsy:Vvh", longopts, NULL)) != -1)
+ #else
+--- a/fc-cat/fc-cat.c
++++ b/fc-cat/fc-cat.c
+@@ -40,6 +40,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
++#include <locale.h>
+ 
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+@@ -271,6 +272,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int		c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "Vvrh", longopts, NULL)) != -1)
+ #else
+--- a/fc-conflist/fc-conflist.c
++++ b/fc-conflist/fc-conflist.c
+@@ -38,6 +38,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <locale.h>
+ 
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+@@ -102,6 +103,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int		c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "Vh", longopts, NULL)) != -1)
+ #else
+--- a/fc-list/fc-list.c
++++ b/fc-list/fc-list.c
+@@ -27,6 +27,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <locale.h>
+ #ifdef HAVE_CONFIG_H
+ #include <config.h>
+ #else
+@@ -117,6 +118,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int			c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "vbf:qVh", longopts, NULL)) != -1)
+ #else
+--- a/fc-match/fc-match.c
++++ b/fc-match/fc-match.c
+@@ -36,6 +36,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <locale.h>
+ 
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+@@ -121,6 +122,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int			c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "asvbf:Vh", longopts, NULL)) != -1)
+ #else
+--- a/fc-pattern/fc-pattern.c
++++ b/fc-pattern/fc-pattern.c
+@@ -36,6 +36,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <locale.h>
+ 
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+@@ -111,6 +112,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int		c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "cdf:Vh", longopts, NULL)) != -1)
+ #else
+--- a/fc-query/fc-query.c
++++ b/fc-query/fc-query.c
+@@ -39,6 +39,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <locale.h>
+ 
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+@@ -115,6 +116,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int		c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "i:bf:Vh", longopts, NULL)) != -1)
+ #else
+--- a/fc-scan/fc-scan.c
++++ b/fc-scan/fc-scan.c
+@@ -39,6 +39,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <locale.h>
+ 
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+@@ -110,6 +111,7 @@
+ #if HAVE_GETOPT_LONG || HAVE_GETOPT
+     int		c;
+ 
++    setlocale (LC_ALL, "");
+ #if HAVE_GETOPT_LONG
+     while ((c = getopt_long (argc, argv, "bf:Vh", longopts, NULL)) != -1)
+ #else
 --- a/src/fccfg.c
 +++ b/src/fccfg.c
-@@ -45,11 +45,16 @@ retry_locale:
-     is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
-     if (!is_locale_initialized)
-     {
-+	char *loc;
-+
- 	is_locale_initialized = FcTrue;
- 	if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
- 				    (void *)(intptr_t) is_locale_initialized))
- 	    goto retry_locale;
+@@ -26,7 +26,6 @@
+ 
+ #include "fcint.h"
+ #include <dirent.h>
+-#include <locale.h>
+ #include <sys/types.h>
+ 
+ #if defined (_WIN32) && !defined (R_OK)
+@@ -39,18 +38,6 @@
+ FcConfigEnsure (void)
+ {
+     FcConfig	*config;
+-    FcBool	is_locale_initialized;
+-    static void *static_is_locale_initialized;
+-retry_locale:
+-    is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
+-    if (!is_locale_initialized)
+-    {
+-	is_locale_initialized = FcTrue;
+-	if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
+-				    (void *)(intptr_t) is_locale_initialized))
+-	    goto retry_locale;
 -	setlocale (LC_ALL, "");
-+
-+	loc = setlocale (LC_ALL, NULL);
-+	if (!loc || strcmp (loc, "C") == 0)
-+	    setlocale (LC_ALL, "");
-     }
+-    }
  retry_config:
      config = fc_atomic_ptr_get (&_fcConfig);
--- 
-2.16.2
-
+     if (!config)

diff --git a/media-libs/fontconfig/fontconfig-2.13.0-r1.ebuild b/media-libs/fontconfig/fontconfig-2.13.0-r2.ebuild
similarity index 100%
rename from media-libs/fontconfig/fontconfig-2.13.0-r1.ebuild
rename to media-libs/fontconfig/fontconfig-2.13.0-r2.ebuild


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2018-04-10 23:33 Thomas Deutschmann
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Deutschmann @ 2018-04-10 23:33 UTC (permalink / raw
  To: gentoo-commits

commit:     ba605ebba49476c6147af7abe8cbd5c9668ed20c
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 10 23:33:05 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr 10 23:33:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba605ebb

media-libs/fontconfig: Rev bump to add missing -lintl

Closes: https://bugs.gentoo.org/652674
Package-Manager: Portage-2.3.28, Repoman-2.3.9

 .../fontconfig-2.13.0-add-missing-lintl.patch      | 34 ++++++++++++++++++++++
 ....13.0-r2.ebuild => fontconfig-2.13.0-r3.ebuild} |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/media-libs/fontconfig/files/fontconfig-2.13.0-add-missing-lintl.patch b/media-libs/fontconfig/files/fontconfig-2.13.0-add-missing-lintl.patch
new file mode 100644
index 00000000000..6bea02b1fca
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.13.0-add-missing-lintl.patch
@@ -0,0 +1,34 @@
+From 07bd14c5c7fed103020dc9b630d6a254861ada07 Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <akira@tagoh.org>
+Date: Fri, 9 Mar 2018 11:55:43 +0900
+Subject: Fix the build issue again on MinGW with enabling nls
+
+---
+ src/Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1ff065b..2111ce0 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -82,7 +82,7 @@ AM_CPPFLAGS = 						\
+ 	-DFC_CACHEDIR='"$(FC_CACHEDIR)"'                \
+ 	-DFONTCONFIG_PATH='"$(BASECONFIGDIR)"'		\
+ 	-DFC_TEMPLATEDIR='"$(TEMPLATEDIR)"'
+-LDADD  = $(INTLLIBS)
++LDADD  = $(LIBINTL)
+ 
+ EXTRA_DIST += makealias
+ 
+@@ -168,7 +168,7 @@ lib_LTLIBRARIES = libfontconfig.la
+ libfontconfig_la_LDFLAGS =			\
+ 	-version-info @LIBT_VERSION_INFO@ -no-undefined $(export_symbols)
+ 
+-libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(UUID_LIBS) $(INTLLIBS)
++libfontconfig_la_LIBADD = $(ICONV_LIBS) $(FREETYPE_LIBS) $(LIBXML2_LIBS) $(EXPAT_LIBS) $(UUID_LIBS) $(LTLIBINTL)
+ 
+ libfontconfig_la_DEPENDENCIES = $(fontconfig_def_dependency)
+ 
+-- 
+cgit v1.1
+

diff --git a/media-libs/fontconfig/fontconfig-2.13.0-r2.ebuild b/media-libs/fontconfig/fontconfig-2.13.0-r3.ebuild
similarity index 98%
rename from media-libs/fontconfig/fontconfig-2.13.0-r2.ebuild
rename to media-libs/fontconfig/fontconfig-2.13.0-r3.ebuild
index 12d1cab673b..1e73daa1929 100644
--- a/media-libs/fontconfig/fontconfig-2.13.0-r2.ebuild
+++ b/media-libs/fontconfig/fontconfig-2.13.0-r3.ebuild
@@ -6,7 +6,7 @@ EAPI=6
 inherit autotools multilib-minimal readme.gentoo-r1 eapi7-ver
 
 DESCRIPTION="A library for configuring and customizing font access"
-HOMEPAGE="http://fontconfig.org/"
+HOMEPAGE="https://fontconfig.org/"
 SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
 
 LICENSE="MIT"
@@ -32,6 +32,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make liberation default
 	"${FILESDIR}"/${P}-locale.patch #650332
 	"${FILESDIR}"/${P}-names.patch #650370
+	"${FILESDIR}"/${P}-add-missing-lintl.patch #652674
 )
 
 MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2018-09-17 12:29 Lars Wendler
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Wendler @ 2018-09-17 12:29 UTC (permalink / raw
  To: gentoo-commits

commit:     35cf888ba9bb8529bb6624327e1edcaca6487d34
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 17 12:18:55 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 12:29:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35cf888b

media-libs/fontconfig: Bump to version 2.13.1

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 media-libs/fontconfig/Manifest                     |   1 +
 .../files/fontconfig-2.13.1-proper_homedir.patch   | 323 +++++++++++++++++++++
 .../files/fontconfig-2.13.1-static_build.patch     | 101 +++++++
 media-libs/fontconfig/fontconfig-2.13.1.ebuild     | 173 +++++++++++
 4 files changed, 598 insertions(+)

diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
index de6fde79604..684dfc449fd 100644
--- a/media-libs/fontconfig/Manifest
+++ b/media-libs/fontconfig/Manifest
@@ -1,2 +1,3 @@
 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

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 00000000000..19aee94ba98
--- /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-static_build.patch b/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
new file mode 100644
index 00000000000..7a0edfd849a
--- /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.1.ebuild b/media-libs/fontconfig/fontconfig-2.13.1.ebuild
new file mode 100644
index 00000000000..3b995391a94
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.13.1.ebuild
@@ -0,0 +1,173 @@
+# 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"
+
+# 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}
+	virtual/pkgconfig
+	dev-util/gperf
+	>=sys-devel/gettext-0.19.8
+	doc? ( =app-text/docbook-sgml-dtd-3.1*
+		app-text/docbook-sgml-utils[jadetex] )"
+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
+
+	# 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[@]}"
+
+	# Ugly hackaround to prevent build failure
+	find "${BUILD_DIR}" -name "Makefile" -print0 \
+		| xargs --null sed 's@ FcStrBuildFilename\.3@@' -i \
+		|| die
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2022-08-18  2:53 Matt Turner
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Turner @ 2022-08-18  2:53 UTC (permalink / raw
  To: gentoo-commits

commit:     08eb7f258111a6fbe509078306fec729e92d37be
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 18 02:45:51 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 02:53:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08eb7f25

media-libs/fontconfig: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 media-libs/fontconfig/Manifest                     |   1 -
 .../files/fontconfig-2.12.3-latin-update.patch     |  68 -----
 .../files/fontconfig-2.13.1-proper_homedir.patch   | 313 ---------------------
 ...1-revert_delete_.uuid_for_empty_directory.patch |  43 ---
 .../files/fontconfig-2.13.1-static_build.patch     |  91 ------
 media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild  | 182 ------------
 6 files changed, 698 deletions(-)

diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
index a42cf3ac9874..24cff4b4b53f 100644
--- a/media-libs/fontconfig/Manifest
+++ b/media-libs/fontconfig/Manifest
@@ -1,3 +1,2 @@
-DIST fontconfig-2.13.1.tar.bz2 1723639 BLAKE2B 08b9a522a9d89bc5e5ed0f0898182359efb110f22b6b7010f6bdda0d6d516957ea74ebe0703d684d4724fd9f44a2eaf50d8329d4e0f4e45e79f50466d808b9e1 SHA512 f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100
 DIST fontconfig-2.13.93.tar.xz 1418288 BLAKE2B 2be273c21c16f9bb2dfe618177eaf2de48610a145d402ba53becc1c4c2d0417a9cd0ce969d4521ff00c8c71e4b1d65e4bf945da56e140434244b81e7e24ecb7a SHA512 1ba119ea3faba662e108df6fce22f242eb2b7c5ec087159ca0cb76944991b19563f744c181263343941c50547bc0c73c6437d5380df09b5029facaab80465b58
 DIST fontconfig-2.14.0.tar.xz 1431056 BLAKE2B 880f34d33ac30158ea61e922f6635900c5b244c2eb5d259f7947a364df86ee13f6190f651471b0a28bcd3c13f19c970783517903df374839e474921611dff1ff SHA512 a5257249d031b3cd1a7b1521cd58f48d235a970020da4136a727db5407ec98e74a3776bc467d7e39f30ec664f56ff9fe39068317744a5e737a65109f7a005bfc

diff --git a/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch b/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch
deleted file mode 100644
index 397781e87acd..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- fontconfig-2.12.3/conf.d/60-latin.conf
-+++ fontconfig-2.12.3/conf.d/60-latin.conf
-@@ -4,47 +4,50 @@
- 	<alias>
- 		<family>serif</family>
- 		<prefer>
--			<family>Bitstream Vera Serif</family>
-+			<family>Liberation Serif</family>
- 			<family>DejaVu Serif</family>
- 			<family>Times New Roman</family>
--			<family>Thorndale AMT</family>
- 			<family>Luxi Serif</family>
- 			<family>Nimbus Roman No9 L</family>
- 			<family>Nimbus Roman</family>
- 			<family>Times</family>
-+			<family>Thorndale AMT</family>
-+			<family>Bitstream Vera Serif</family>
- 		</prefer>
- 	</alias>
- 	<alias>
- 		<family>sans-serif</family>
- 		<prefer>
--			<family>Bitstream Vera Sans</family>
-+			<family>Liberation Sans</family>
- 			<family>DejaVu Sans</family>
--			<family>Verdana</family>
- 			<family>Arial</family>
--			<family>Albany AMT</family>
- 			<family>Luxi Sans</family>
- 			<family>Nimbus Sans L</family>
- 			<family>Nimbus Sans</family>
- 			<family>Helvetica</family>
- 			<family>Lucida Sans Unicode</family>
- 			<family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
-+			<family>Verdana</family>
- 			<family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
-+			<family>Albany AMT</family>
-+			<family>Bitstream Vera Sans</family>
- 		</prefer>
- 	</alias>
- 	<alias>
- 		<family>monospace</family>
- 		<prefer>
--			<family>Bitstream Vera Sans Mono</family>
-+			<family>Liberation Mono</family>
- 			<family>DejaVu Sans Mono</family>
- 			<family>Inconsolata</family>
- 			<family>Andale Mono</family>
- 			<family>Courier New</family>
--			<family>Cumberland AMT</family>
- 			<family>Luxi Mono</family>
- 			<family>Nimbus Mono L</family>
- 			<family>Nimbus Mono</family>
- 			<family>Nimbus Mono PS</family>
- 			<family>Courier</family>
-+			<family>Cumberland AMT</family>
-+			<family>Bitstream Vera Sans Mono</family>
- 		</prefer>
- 	</alias>
- <!--
-@@ -65,6 +68,7 @@
- 	<alias>
- 		<family>cursive</family>
- 		<prefer>
-+			<family>Comic Neue</family>
- 			<family>ITC Zapf Chancery Std</family>
- 			<family>Zapfino</family>
- 			<family>Comic Sans MS</family>

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
deleted file mode 100644
index 71c27f56f644..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch
+++ /dev/null
@@ -1,313 +0,0 @@
-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
---- 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;
- }
- 
---- 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
---- /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;
-+}
-+

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
deleted file mode 100644
index cd66082eedd8..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.13.1-revert_delete_.uuid_for_empty_directory.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-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
deleted file mode 100644
index d78317da0b3c..000000000000
--- a/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-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
---- 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);
- 
---- 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);
- 
---- 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)
- {

diff --git a/media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild b/media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild
deleted file mode 100644
index b00c1b232b14..000000000000
--- a/media-libs/fontconfig/fontconfig-2.13.1-r2.ebuild
+++ /dev/null
@@ -1,182 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# 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 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="doc static-libs"
-
-# Test test-bz106632 is known to be broken, see bug #751232
-# and would require several backports. It will be fixed in
-# next version.
-# check-missing-doc is known to be broken, see bug #733608
-# because fontconfig-2.13.1-static_build.patch introduces a
-# function FcStrBuildFilename which is lacking documentation.
-# However, backporting isn't worth it. Will be fixed in
-# next version.
-RESTRICT="test"
-
-BDEPEND="dev-util/gperf
-	>=sys-devel/gettext-0.19.8
-	virtual/pkgconfig
-	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? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) )
-	elibc_Darwin? ( sys-libs/native-uuid )
-	elibc_SunOS? ( sys-libs/libuuid )
-	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
-)
-
-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() {
-	MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
-
-	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 [[ -z ${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
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/
@ 2023-05-30 17:26 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2023-05-30 17:26 UTC (permalink / raw
  To: gentoo-commits

commit:     cd25a4746a974454ffc7906a86df0e24a791a6ed
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 30 17:26:08 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 30 17:26:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd25a474

media-libs/fontconfig: backport fix for fc-cache w/ sysroot

Closes: https://bugs.gentoo.org/907424
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../fontconfig-2.14.2-fix-sysroot-fc-cache.patch   |  60 ++++++
 media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild  | 232 +++++++++++++++++++++
 2 files changed, 292 insertions(+)

diff --git a/media-libs/fontconfig/files/fontconfig-2.14.2-fix-sysroot-fc-cache.patch b/media-libs/fontconfig/files/fontconfig-2.14.2-fix-sysroot-fc-cache.patch
new file mode 100644
index 000000000000..8568d5f4a99f
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.14.2-fix-sysroot-fc-cache.patch
@@ -0,0 +1,60 @@
+https://bugs.gentoo.org/907424
+https://gitlab.freedesktop.org/fontconfig/fontconfig/-/commit/2ef790a0dbbab24235d1b8c0325ab4414de5f0a9
+
+From 2ef790a0dbbab24235d1b8c0325ab4414de5f0a9 Mon Sep 17 00:00:00 2001
+From: Tom Anderson <thomasanderson@chromium.org>
+Date: Thu, 9 Feb 2023 01:31:26 +0000
+Subject: [PATCH] Fix filepaths added when scanning with sysroot
+
+This fixes a regression introduced by 76f88e780.  When
+using FONTCONFIG_SYSROOT=/home/tom/test_fonts, strace
+reveals that fontconfig attempted to open /test_fonts/Ahem.ttf
+instead of /home/tom/test_fonts/Ahem.ttf.  The fix is to use
+`s_dir` instead of `dir` in `file_prefix`.
+--- a/src/fcdir.c
++++ b/src/fcdir.c
+@@ -201,7 +201,7 @@ FcDirScanConfig (FcFontSet	*set,
+     DIR			*d;
+     struct dirent	*e;
+     FcStrSet		*files;
+-    FcChar8		*file_prefix, *s_dir = NULL;
++    FcChar8		*file_prefix = NULL, *s_dir = NULL;
+     FcChar8		*base;
+     const FcChar8	*sysroot = FcConfigGetSysRoot (config);
+     FcBool		ret = FcTrue;
+@@ -213,16 +213,6 @@ FcDirScanConfig (FcFontSet	*set,
+     if (!set && !dirs)
+ 	return FcTrue;
+ 
+-    /* freed below */
+-    file_prefix = (FcChar8 *) malloc (strlen ((char *) dir) + 1 + FC_MAX_FILE_LEN + 1);
+-    if (!file_prefix) {
+-	ret = FcFalse;
+-	goto bail;
+-    }
+-    strcpy ((char *) file_prefix, (char *) dir);
+-    strcat ((char *) file_prefix, FC_DIR_SEPARATOR_S);
+-    base = file_prefix + strlen ((char *) file_prefix);
+-
+     if (sysroot)
+ 	s_dir = FcStrBuildFilename (sysroot, dir, NULL);
+     else
+@@ -232,6 +222,16 @@ FcDirScanConfig (FcFontSet	*set,
+ 	goto bail;
+     }
+ 
++    /* freed below */
++    file_prefix = (FcChar8 *) malloc (strlen ((char *) s_dir) + 1 + FC_MAX_FILE_LEN + 1);
++    if (!file_prefix) {
++	ret = FcFalse;
++	goto bail;
++    }
++    strcpy ((char *) file_prefix, (char *) s_dir);
++    strcat ((char *) file_prefix, FC_DIR_SEPARATOR_S);
++    base = file_prefix + strlen ((char *) file_prefix);
++
+     if (FcDebug () & FC_DBG_SCAN)
+ 	printf ("\tScanning dir %s\n", s_dir);
+ 	
+-- 
+GitLab

diff --git a/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild b/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild
new file mode 100644
index 000000000000..c4f8f60b690d
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.14.2-r3.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+inherit multilib meson-multilib python-any-r1 readme.gentoo-r1
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="https://fontconfig.org/"
+SRC_URI="https://fontconfig.org/release/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="1.0"
+if ! [[ $(ver_cut 3) -ge 90 ]] ; then
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+IUSE="doc nls test"
+RESTRICT="!test? ( test )"
+
+# - Check minimum freetype & other deps on bumps. See
+#   https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/configure.ac#L314.
+#   Note that FT versioning is confusing, need to map it using
+#   https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT
+#   But sometimes it's actually greater than that, e.g. see Fedora's spec file
+#   https://src.fedoraproject.org/rpms/fontconfig/blob/rawhide/f/fontconfig.spec#_1
+#
+# - Purposefully dropped the xml USE flag and libxml2 support. Expat is the
+#   default and used by every distro. See bug #283191.
+#
+# - There's a test-only dep on json-c.
+#   It might become an optional(?) runtime dep in future though. Who knows.
+#   Keep an eye on it.
+RDEPEND="
+	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+	>=media-libs/freetype-2.9.1[${MULTILIB_USEDEP}]
+	virtual/libintl[${MULTILIB_USEDEP}]
+	!elibc_Darwin? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) )
+	elibc_Darwin? ( sys-libs/native-uuid )
+	elibc_SunOS? ( sys-libs/libuuid )
+"
+DEPEND="
+	${RDEPEND}
+	test? ( dev-libs/json-c )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	dev-util/gperf
+	virtual/pkgconfig
+	doc? (
+		=app-text/docbook-sgml-dtd-3.1*
+		app-text/docbook-sgml-utils[jadetex]
+	)
+	nls? ( >=sys-devel/gettext-0.19.8 )
+"
+PDEPEND="virtual/ttf-fonts"
+# We need app-eselect/eselect-fontconfig in IDEPEND to update ROOT
+# when cross-compiling.
+IDEPEND="app-eselect/eselect-fontconfig"
+
+PATCHES=(
+	# bug #130466 + make liberation default
+	"${FILESDIR}"/${PN}-2.14.0-latin-update.patch
+	# Avoid test failure (bubblewrap doesn't work within sandbox)
+	"${FILESDIR}"/${PN}-2.14.0-skip-bubblewrap-tests.patch
+
+	# Patches from upstream (can usually be removed with next version bump)
+	"${FILESDIR}"/${P}-fix-sysroot-fc-cache.patch
+)
+
+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
+
+	# Test needs network access
+	# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/319
+	# On bumps, please check to see if this has been fixed
+	# to allow local access!
+	sed -i -e '/test-crbug1004254/d' test/meson.build || die
+}
+
+multilib_src_configure() {
+	local addfonts=(
+		"${EPREFIX}"/usr/local/share/fonts
+	)
+
+	# 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+=( /usr/X/lib/X11/fonts/Type1 )
+		;;
+
+		*-linux-gnu)
+			use prefix && [[ -d /usr/share/fonts ]] && \
+				addfonts+=( /usr/share/fonts )
+		;;
+	esac
+
+	local emesonargs=(
+		# USE=doc only controls the additional bits like html/pdf
+		# and regeneration of man pages from source. We always install
+		# the prebuilt man pages.
+		$(meson_native_use_feature doc)
+		$(meson_native_use_feature doc doc-txt)
+		$(meson_native_use_feature doc doc-html)
+		$(meson_native_use_feature doc doc-man)
+		$(meson_native_use_feature doc doc-pdf)
+
+		$(meson_native_use_feature nls)
+		$(meson_feature test tests)
+
+		-Dcache-build=disabled
+		-Dcache-dir="${EPREFIX}"/var/cache/fontconfig
+		-Ddefault-fonts-dirs="${EPREFIX}"/usr/share/fonts
+		-Dadditional-fonts-dirs=$(IFS=, ; echo "${addfonts[*]}" )
+		-Dtemplate-dir="${EPREFIX}"/etc/fonts/conf.avail
+
+		# Let users choose via eselect-fontconfig. See bug #900681
+		# and https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/356.
+		-Ddefault-sub-pixel-rendering=none
+	)
+
+	meson_src_configure
+}
+
+multilib_src_install() {
+	MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
+
+	meson_src_install
+
+	# Avoid calling this multiple times, bug #459210
+	if multilib_is_native_abi; then
+		insinto /etc/fonts
+		doins fonts.conf
+	fi
+}
+
+multilib_src_install_all() {
+	einstalldocs
+
+	# 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 ! use doc ; then
+		find "${S}" -name "*.[[:digit:]]" -type f -exec doman '{}' + || die
+	fi
+
+	if [[ -e ${ED}/usr/share/doc/fontconfig/ ]] ;  then
+		mv "${ED}"/usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${PF} || die
+		rm -rf "${ED}"/usr/share/doc/fontconfig || die
+	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 || die
+	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 || die
+
+	readme.gentoo_create_doc
+}
+
+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
+		local file f
+		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
+
+	local ver
+	for ver in ${REPLACING_VERSIONS} ; do
+		# 2.14.2 and 2.14.2-r1 included the bad 10-sub-pixel-none.conf
+		if ver_test ${ver} -lt 2.14.2-r2 && ver_test ${ver} -ge 2.14.2 ; then
+			if [[ -e "${EROOT}"/etc/fonts/conf.d/10-sub-pixel-none.conf ]] ; then
+				einfo "Deleting 10-sub-pixel-none.conf from bad fontconfig-2.14.2 (bug #900681)"
+				rm "${EROOT}"/etc/fonts/conf.d/10-sub-pixel-none.conf || die
+			fi
+		fi
+	done
+
+	if [[ -z ${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
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-30 17:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-08 10:12 [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/files/, media-libs/fontconfig/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2023-05-30 17:26 Sam James
2022-08-18  2:53 Matt Turner
2018-09-17 12:29 Lars Wendler
2018-04-10 23:33 Thomas Deutschmann
2018-03-15  5:22 Ulrich Müller
2017-05-09 21:47 Thomas Deutschmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox