public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2016-02-11  9:17 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2016-02-11  9:17 UTC (permalink / raw
  To: gentoo-commits

commit:     54eccaa4452841463257fa6c1a95ce015ae9be14
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 11 09:17:24 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Feb 11 09:17:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54eccaa4

media-libs/freetype: Removed old.

Package-Manager: portage-2.2.27
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-libs/freetype/Manifest                       |   4 -
 .../freetype/files/freetype-2.6.1-bad-shift.patch  |  50 -------
 media-libs/freetype/freetype-2.6.1-r1.ebuild       | 163 ---------------------
 3 files changed, 217 deletions(-)

diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
index 41b5caf..3b4f3db 100644
--- a/media-libs/freetype/Manifest
+++ b/media-libs/freetype/Manifest
@@ -1,16 +1,12 @@
-DIST 03-infinality-2.6-2015.10.04.patch.xz 24444 SHA256 0c28892e9b6bc27afe9149da04fc9733c9323817dd81802f2f40c680a7f887a8 SHA512 8733a7c7c118dee7fd2303435fc9c10d66aba49bd16f1215fe069b5cf16242776f2701c02fa17bca772195f0fc569e35cff11f73fc5f77519d4858737d511db3 WHIRLPOOL 5e7fbbea273df890efe8a101106430bba54cf3ce52228cb3eb272302189397bc25b4451a9bfb4e8ba56413c39c9cd21bc1df9896f0232dd1825aad51fabc045d
 DIST 03-infinality-2.6.2-2015.11.28.patch.xz 27056 SHA256 a91f27f76fdcdffcea1d377824db84d6c6d5ab1f6afd61c62a29471dae06f0ea SHA512 676978f117fcb9b6a25886cbf7c7eb0d451eca745c72feed6c7caec17287881e087757ed15a2776377cdca53477d3cd832ef967759635b7c5b36232eb4d7d99c WHIRLPOOL f1bd477c1b5c8dddbcd6801d51c2e687b91411113b7002e418237d6fb6154e1c89c0f82f22abbdca3fc695abbae6409e7491416afe1057d2ea20cfe7afee525a
 DIST 03-infinality-2.6.3-2015.11.28.patch.xz 26092 SHA256 92b30ac53a1ce27a658aff17f6f6d0e0a7303412acd620904c7328e290e452a7 SHA512 9f7838dc2b002d5d996c90d284f99c08d5f3000b77f9b68652da8592517aeda7af052c56e2040568c5f4eecfb15d3e3ca188e980234716760f41afc545917554 WHIRLPOOL 7b3ca16ad418f3b0622780fffdc198f8656279d19cd6ad5f8b556a24b809e8ddb850d1c6157a80cc21ae21c9ecf1a82c5d97d265181e867f2621b1c24348c612
 DIST freetype-2.5.5-infinality-patches.tar.xz 24380 SHA256 6b7bc373b068c71feca2e19c3741993ee0ff787984aa0653ca66814e05ef195f SHA512 8831e3337214cc57a0381c56ef6750f85b11f1b6358adaa3dda34d449f234335bede124be9d23df817ae8c06f80c8e3ce63ed3fc32eb05586b8c8e43ce52e575 WHIRLPOOL 27b945e9524e984ef57f96415a86095d91dea8fa8e402a3eb6a3d7c38a7636d53d5e47fc37b734ca88f41a499f3398ab9d7bd147e1424c19b09f41e17f2cbe8d
 DIST freetype-2.5.5.tar.bz2 1714529 SHA256 387bcc4b780b12484aa2ec9f7db1a55d8286eb5639f45fbc0fbba7a4e5a1afb9 SHA512 1fc72d24da1744a6a5faf3338e49912c81ce83f30def1e80a2a15b50e7f83893a4fe24a70ef88b65ecc217bed1c15d85804c364eba221b35e25531c727fe8559 WHIRLPOOL 57cf0f020cda6a66cfe8e2a30e1e997c0fd7f97bdaed38da65cce0b360fcc60cfdf1ba0724c1745668ae3f80743052e135edb8356dff4c90365caa6262d59158
-DIST freetype-2.6.1.tar.bz2 1744692 SHA256 2f6e9a7de3ae8e85bdd2fe237e27d868d3ba7a27495e65906455c27722dd1a17 SHA512 cbc003e8f353d47ddcc2110aa8ecfdc1df53e61698e1ed68ed60afd5fd1d10d921c9719a505196c95865a68482822f9cccf5d131ec36d64c0230def774e7bb4b WHIRLPOOL 6319c8764f8d29669b241f0152338d356761d65a75235544c0c831aa03700e8b663b40b501519e57f09968c98bc8d56d1005ad069c9ee066c679b3400e20779a
 DIST freetype-2.6.2.tar.bz2 1767940 SHA256 baf6bdef7cdcc12ac270583f76ef245efe936267dbecef835f02a3409fcbb892 SHA512 269d7a2ba728b4cb79d1d533ce93674bfd483566ab80bc6be0ec24f869cb65ba1fd852fbeff8f045607dd044845ce3d125374faeb14c986761b94dce7d1ff48b WHIRLPOOL d1ffa0d84605ac4e1480c46f7ff7c9c6f87137a539258c3a38900850dbf53cf4f752b57f2e5d22164020d62295b6c4e50ae529ac953b7591b3c3a034701d845c
 DIST freetype-2.6.3.tar.bz2 1753083 SHA256 371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2 SHA512 e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d WHIRLPOOL e17e87fe7b821730da13b1a54073fd0314025e3e15a41b10b5ece2731c8152c4d8dbe1fb7f26593794d70f15f6dfd70582678d48a8f068cec865f821eb3847a0
 DIST freetype-doc-2.5.5.tar.bz2 108133 SHA256 68becbae3578a8101e9f3c55f10e435fb75535011d3f7a523719371e86e368e7 SHA512 0e2455433f72766ec88275d2e53e49630457579a83ca491697bb5ce12196ee964618d1af86956651557d34e8ea1d57f75f69e0d60ef90e943509bc571370fb64 WHIRLPOOL 28d13ae3ce9bc3fb278df9a963cef3622672fa288fc0fd654e874054bedccd8510a3dcf7636ea2ec107b5299984742607d2a9436d5e473202856e27bf262655f
-DIST freetype-doc-2.6.1.tar.bz2 477313 SHA256 69b1102c9f4e7d75ad2701618f7e5c084d819264755ecbf11893e3cc6de0e0f5 SHA512 8353c5324166004f8e65c92bbe9be567c7ed2681b0c125758df8be098cd51983016a1387d58b147c2d57c984fcd0a615fe580e38d6e0ed445c5781e28c7c77b3 WHIRLPOOL c1f9f27db8975d89f91c8fff4ed523536525747bf57d116d5dd220986370287e8b05a4678fe31cbb0c08461cd9a49cbd6d9d05769d22a03220227c40baed2359
 DIST freetype-doc-2.6.2.tar.bz2 477268 SHA256 d5108a972d8f80561fd698aa856233999527375b4e8f6c82d2eafe5ac66f989b SHA512 7eb9c2cee68e0557a9c177db83525c91ea59fbfaf2a6516916b76b7b3d82f17cf08ce21f062cf1012ed872db612444a1ae6fa31290ee1b0377d84531a17a4dea WHIRLPOOL 1822b3fbe2c1b83c2add119defe0052d18fd2875dd457432f024d8b197b48a93cc05be2743a1290050aae9b935cb3790b5ed28cf1b658eeba5ee43781de752c4
 DIST freetype-doc-2.6.3.tar.bz2 5367900 SHA256 28b7cb0b1ff3962d386c54cdffd3891d2126292f57b4ea9ad0467f07cf68de7d SHA512 7731d96543f73ace8afc4b5ff2148c32a8dacbf01a976a6870705f73b45dfe1429ffa94406cdfc83b163b039c4d375c0c553a7d7aaad659a87079f357e6599cc WHIRLPOOL 71b01f8d5daf8e93efab5453f198d1790365fd010b5a137f4f34e93f6bc03a6a644900b92b8263973248954895c73e70cad64fe50b09bb4042627182299a5a1c
 DIST ft2demos-2.5.5.tar.bz2 182006 SHA256 b87c7deb5d9b1fddb8520c091a5491cc63ecac4de25139e1da38aebee82195ea SHA512 c6e1855f2315665e39a894ecfcb65f8546de435c1dada0ea0a6665a1e3ef22331d6949cd9261dfb6b68e653631d4c2e74f8ea31b53b40e46f44ab4dae38e368b WHIRLPOOL 55d6add5e3fac008a39231e3805e151a5a9b7cafb6ef970e546d96d3fa338a6a4a744aeb59ea04804312164aedd5e5a21e19773dbf5c42a1acfc42d283d90930
-DIST ft2demos-2.6.1.tar.bz2 190308 SHA256 369d27ae65ba04c2e3e74cf948ebcc5aa51abd47cd2e1d7d5cad0bc1f82da2aa SHA512 9740e1ae7fa4f8a932de3766dc8512c22a847d606b99aaff568865a68e059b3970ca9708d6c17f4d171f6f9bb63194f2c3498adf5461e3233b3b3206c57c6d7e WHIRLPOOL 84d59e27300085e4551f622374d0080184f0180d4b3c9447492af906612c7da3cfb3bf66e8f038c3fa008c2d590d7956fc4a2d347190d45b028c729949182b69
 DIST ft2demos-2.6.2.tar.bz2 191120 SHA256 819791a0548dcb8301c0f22e893ad7dadb1cb88cb37055e75f609bd436f013ca SHA512 570b6c6f072c93674b8cd27f9c42540e2bcd6b4f499c227634009277b0b6ac0833a2101285c5055a429a17be341cb2ff257eba25172a41accd4b43245908431c WHIRLPOOL a8f3fb54305ef8b0eb5161691546afdaa0cc65d48c9a7c411fe78fe8b5c11e118e6fccc579ac9e5d25d0199fce1e28a3d2c2e931cdae8080549cd5173cf1fa2c
 DIST ft2demos-2.6.3.tar.bz2 193412 SHA256 b076ac52465e912d035f111ede78b88bf3dd186f91a56a54ff83ffdf862e84e4 SHA512 1f23f9ab0bd59a06b8fd223bcc335ffba064477abee74d33308ddc28eb41e4ccf3728a52c36d4cab3995be695b56e1e099c2889f04e0835ba242b2938c5d2e78 WHIRLPOOL 1246985eca92e2e4d1b618d633602fc4114a69c1a8d715c51a5e96c17b3119fb3a254a577c876ad8ba9e2871bf59f4bd67f6721a706b3706a0a532728723f6a4

diff --git a/media-libs/freetype/files/freetype-2.6.1-bad-shift.patch b/media-libs/freetype/files/freetype-2.6.1-bad-shift.patch
deleted file mode 100644
index c361baf..0000000
--- a/media-libs/freetype/files/freetype-2.6.1-bad-shift.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-taken from upstream
-
-http://savannah.nongnu.org/bugs/?func=detailitem&item_id=46118
-
-From 30fe5e762e062612fdf4b56b50d813525a5aa311 Mon Sep 17 00:00:00 2001
-From: Werner Lemberg <wl@gnu.org>
-Date: Sun, 4 Oct 2015 13:08:08 +0200
-Subject: [PATCH] [base] Replace left shifts with multiplication (#46118).
-
-* src/base/ftglyph.c (ft_bitmap_glyph_bbox, FT_Get_Glyph): Do it.
----
- ChangeLog          |  6 ++++++
- src/base/ftglyph.c | 14 +++++++-------
- 2 files changed, 13 insertions(+), 7 deletions(-)
-
-diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
-index cb7fc37..2778743 100644
---- a/src/base/ftglyph.c
-+++ b/src/base/ftglyph.c
-@@ -125,10 +125,10 @@
-     FT_BitmapGlyph  glyph = (FT_BitmapGlyph)bitmap_glyph;
- 
- 
--    cbox->xMin = glyph->left << 6;
--    cbox->xMax = cbox->xMin + (FT_Pos)( glyph->bitmap.width << 6 );
--    cbox->yMax = glyph->top << 6;
--    cbox->yMin = cbox->yMax - (FT_Pos)( glyph->bitmap.rows << 6 );
-+    cbox->xMin = glyph->left * 64;
-+    cbox->xMax = cbox->xMin + (FT_Pos)( glyph->bitmap.width * 64 );
-+    cbox->yMax = glyph->top * 64;
-+    cbox->yMin = cbox->yMax - (FT_Pos)( glyph->bitmap.rows * 64 );
-   }
- 
- 
-@@ -403,9 +403,9 @@
-     if ( error )
-       goto Exit;
- 
--    /* copy advance while converting it to 16.16 format */
--    glyph->advance.x = slot->advance.x << 10;
--    glyph->advance.y = slot->advance.y << 10;
-+    /* copy advance while converting 26.6 to 16.16 format */
-+    glyph->advance.x = slot->advance.x * 1024;
-+    glyph->advance.y = slot->advance.y * 1024;
- 
-     /* now import the image from the glyph slot */
-     error = clazz->glyph_init( glyph, slot );
--- 
-2.5.2
-

diff --git a/media-libs/freetype/freetype-2.6.1-r1.ebuild b/media-libs/freetype/freetype-2.6.1-r1.ebuild
deleted file mode 100644
index de89f39..0000000
--- a/media-libs/freetype/freetype-2.6.1-r1.ebuild
+++ /dev/null
@@ -1,163 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit autotools-multilib flag-o-matic multilib toolchain-funcs
-
-INFINALITY_PATCH="03-infinality-2.6-2015.10.04.patch"
-
-DESCRIPTION="A high-quality and portable font engine"
-HOMEPAGE="http://www.freetype.org/"
-SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
-	mirror://nongnu/freetype/${P/_/}.tar.bz2
-	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
-		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
-	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
-		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )
-	infinality? ( https://dev.gentoo.org/~polynomial-c/${INFINALITY_PATCH}.xz )"
-
-LICENSE="|| ( FTL GPL-2+ )"
-SLOT="2"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~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="X +adobe-cff bindist bzip2 debug doc fontforge harfbuzz
-	infinality png static-libs utils"
-RESTRICT="!bindist? ( bindist )" # bug 541408
-
-CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
-	utils? (
-		X? (
-			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
-			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
-		)
-	)"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
-PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
-
-src_prepare() {
-	enable_option() {
-		sed -i -e "/#define $1/a #define $1" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to enable option $1"
-	}
-
-	disable_option() {
-		sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to disable option $1"
-	}
-
-	# This is the same as the 01 patch from infinality
-	epatch "${FILESDIR}"/${PN}-2.3.2-enable-valid.patch
-
-	if use infinality; then
-		epatch "${WORKDIR}/${INFINALITY_PATCH}"
-
-		# FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11
-		enable_option TT_CONFIG_OPTION_SUBPIXEL_HINTING
-	fi
-
-	if ! use bindist; then
-		# See http://freetype.org/patents.html
-		# ClearType is covered by several Microsoft patents in the US
-		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-	fi
-
-	if ! use adobe-cff; then
-		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
-	fi
-
-	if use debug; then
-		enable_option FT_DEBUG_LEVEL_TRACE
-		enable_option FT_DEBUG_MEMORY
-	fi
-
-	epatch "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
-	epatch "${FILESDIR}"/${PN}-2.6.1-bad-shift.patch
-
-	if use utils; then
-		cd "${WORKDIR}/ft2demos-${PV}" || die
-		# Disable tests needing X11 when USE="-X". (bug #177597)
-		if ! use X; then
-			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
-		fi
-		cd "${S}" || die
-	fi
-
-	# we need non-/bin/sh to run configure
-	if [[ -n ${CONFIG_SHELL} ]] ; then
-		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
-			"${S}"/builds/unix/configure || die
-	fi
-
-	autotools-utils_src_prepare
-}
-
-multilib_src_configure() {
-	append-flags -fno-strict-aliasing
-	type -P gmake &> /dev/null && export GNUMAKE=gmake
-
-	local myeconfargs=(
-		--enable-biarch-config
-		$(use_with bzip2)
-		$(use_with harfbuzz)
-		$(use_with png)
-
-		# avoid using libpng-config
-		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
-		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
-	)
-
-	autotools-utils_src_configure
-}
-
-multilib_src_compile() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Building utils"
-		# fix for Prefix, bug #339334
-		emake \
-			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
-			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
-	fi
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Installing utils"
-		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
-		local ft2demo
-		for ft2demo in ../ft2demos-${PV}/bin/*; do
-			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
-				"${ED}"/usr/bin || die
-		done
-	fi
-}
-
-multilib_src_install_all() {
-	if use fontforge; then
-		# Probably fontforge needs less but this way makes things simplier...
-		einfo "Installing internal headers required for fontforge"
-		local header
-		find src/truetype include/internal -name '*.h' | \
-		while read header; do
-			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-		done
-	fi
-
-	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
-	use doc && dohtml -r docs/*
-
-	prune_libtool_files --all
-}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2017-01-21 16:56 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2017-01-21 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     c0a1539f0e81afe824f1b9ab1794308353c5e56d
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 21 16:55:49 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Jan 21 16:56:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0a1539f

media-libs/freetype: Revbump to fix pfc font handling (bug #606688).

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../freetype/files/freetype-2.7.1-pcf_fix.patch    | 711 +++++++++++++++++++++
 media-libs/freetype/freetype-2.7.1-r1.ebuild       | 179 ++++++
 2 files changed, 890 insertions(+)

diff --git a/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch b/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch
new file mode 100644
index 00000000..5b89121
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch
@@ -0,0 +1,711 @@
+From f837a50ec3a4f240d73f018f237f9f58631e2ba5 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Mon, 9 Jan 2017 10:49:03 +0100
+Subject: [pcf] Introduce a driver structure.
+
+To be filled later on with something useful.
+
+* src/pcf/pcf.h (PCF_Driver): New structure.
+
+* src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy
+functions.
+(pcf_driver_class): Updated.
+---
+ src/pcf/pcf.h      |  7 +++++++
+ src/pcf/pcfdrivr.c | 24 ++++++++++++++++++++----
+ 3 files changed, 39 insertions(+), 4 deletions(-)
+
+diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h
+index c726e5e..830cabe 100644
+--- a/src/pcf/pcf.h
++++ b/src/pcf/pcf.h
+@@ -163,6 +163,13 @@ FT_BEGIN_HEADER
+   } PCF_FaceRec, *PCF_Face;
+ 
+ 
++  typedef struct  PCF_DriverRec_
++  {
++    FT_DriverRec  root;
++
++  } PCF_DriverRec, *PCF_Driver;
++
++
+   /* macros for pcf font format */
+ 
+ #define LSBFirst  0
+diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
+index 10d5c20..8f4a90d 100644
+--- a/src/pcf/pcfdrivr.c
++++ b/src/pcf/pcfdrivr.c
+@@ -691,22 +691,38 @@ THE SOFTWARE.
+   }
+ 
+ 
++  FT_CALLBACK_DEF( FT_Error )
++  pcf_driver_init( FT_Module  module )      /* PCF_Driver */
++  {
++    FT_UNUSED( module );
++
++    return FT_Err_Ok;
++  }
++
++
++  FT_CALLBACK_DEF( void )
++  pcf_driver_done( FT_Module  module )      /* PCF_Driver */
++  {
++    FT_UNUSED( module );
++  }
++
++
+   FT_CALLBACK_TABLE_DEF
+   const FT_Driver_ClassRec  pcf_driver_class =
+   {
+     {
+       FT_MODULE_FONT_DRIVER        |
+       FT_MODULE_DRIVER_NO_OUTLINES,
+-      sizeof ( FT_DriverRec ),
+ 
++      sizeof ( PCF_DriverRec ),
+       "pcf",
+       0x10000L,
+       0x20000L,
+ 
+-      NULL,    /* module-specific interface */
++      NULL,   /* module-specific interface */
+ 
+-      NULL,                     /* FT_Module_Constructor  module_init   */
+-      NULL,                     /* FT_Module_Destructor   module_done   */
++      pcf_driver_init,          /* FT_Module_Constructor  module_init   */
++      pcf_driver_done,          /* FT_Module_Destructor   module_done   */
+       pcf_driver_requester      /* FT_Module_Requester    get_interface */
+     },
+ 
+-- 
+cgit v1.0
+
+From 08fd250e1af0aa16d18012d39462e6ca9bbc6e90 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Mon, 9 Jan 2017 11:30:32 +0100
+Subject: [pcf] Make long family names configurable.
+
+The change from 2016-09-29 was too radical (except for people using
+the openSuSE GNU/Linux distribution).  To ameliorate the situation,
+PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
+the feature; if set, a new PCF property option
+`no-long-family-names' can be used to switch this feature off.
+
+* include/freetype/config/ftoption.h, devel/ftoption.h
+(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.
+
+* include/freetype/ftpcfdrv.h: New header file (only containing
+comments currently, used for building the documentation).
+
+* include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.
+
+* src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.
+
+* src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
+FT_PCF_DRIVER_H.
+(pcf_property_set, pcf_property_get): New functions.
+(pcf_service_properties): New service.
+(pcf_servives): Updated.
+(pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
+`no_long_family_names'.
+
+* src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
+and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
+
+* docs/CHANGES: Updated.
+---
+ devel/ftoption.h                   |  31 +++++++++-
+ docs/CHANGES                       |  16 ++++++
+ include/freetype/config/ftheader.h |  13 +++++
+ include/freetype/config/ftoption.h |  31 +++++++++-
+ include/freetype/ftchapters.h      |   1 +
+ include/freetype/ftpcfdrv.h        | 105 ++++++++++++++++++++++++++++++++++
+ src/pcf/pcf.h                      |   2 +
+ src/pcf/pcfdrivr.c                 | 114 +++++++++++++++++++++++++++++++++++++
+ src/pcf/pcfread.c                  |  98 ++++++++++++++++++-------------
+ 10 files changed, 400 insertions(+), 44 deletions(-)
+ create mode 100644 include/freetype/ftpcfdrv.h
+
+diff --git a/devel/ftoption.h b/devel/ftoption.h
+index 3b63931..b8b0a8d 100644
+--- a/devel/ftoption.h
++++ b/devel/ftoption.h
+@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
+   /* to control the various font drivers and modules.  The controllable    */
+   /* properties are listed in the section `Controlling FreeType Modules'   */
+   /* in the reference's table of contents; currently there are properties  */
+-  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and  */
+-  /* TrueType (file `ftttdrv.h').                                          */
++  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
++  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
+   /*                                                                       */
+   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
+   /* multiple lines for better readability).                               */
+@@ -835,6 +835,33 @@ FT_BEGIN_HEADER
+   /*************************************************************************/
+   /*************************************************************************/
+   /****                                                                 ****/
++  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/
++  /****                                                                 ****/
++  /*************************************************************************/
++  /*************************************************************************/
++
++
++  /*************************************************************************/
++  /*                                                                       */
++  /* There are many PCF fonts just called `Fixed' which look completely    */
++  /* different, and which have nothing to do with each other.  When        */
++  /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
++  /* random, the style changes often if one changes the size and one       */
++  /* cannot select some fonts at all.  This option makes the PCF module    */
++  /* prepend the foundry name (plus a space) to the family name.           */
++  /*                                                                       */
++  /* We also check whether we have `wide' characters; all put together, we */
++  /* get family names like `Sony Fixed' or `Misc Fixed Wide'.              */
++  /*                                                                       */
++  /* If this option is activated, it can be controlled with the            */
++  /* `no-long-family-names' property of the pcf driver module.             */
++  /*                                                                       */
++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++
++
++  /*************************************************************************/
++  /*************************************************************************/
++  /****                                                                 ****/
+   /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
+   /****                                                                 ****/
+   /*************************************************************************/
+diff --git a/docs/CHANGES b/docs/CHANGES
+index cb3b327..3823395 100644
+--- a/docs/CHANGES
++++ b/docs/CHANGES
+@@ -1,4 +1,20 @@
+ 
++CHANGES BETWEEN 2.7.1 and 2.7.2
++
++  I. IMPORTANT CHANGES
++
++    - The PCF change to show more `colourful' family names (introduced
++      in version 2.7.1) was too radical; it can now be configured with
++      PCF_CONFIG_OPTION_LONG_FAMILY_NAMES   at   compile   time.    If
++      activated, it can  be switched off at run time  with the new pcf
++      property  `no-long-family-names'.  If  the `FREETYPE_PROPERTIES'
++      environment variable is available, you can say
++
++        FREETYPE_PROPERTIES=pcf:no-long-family-names=1
++
++
++======================================================================
++
+ CHANGES BETWEEN 2.7 and 2.7.1
+ 
+   I. IMPORTANT CHANGES
+diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
+index 950d36c..d491af5 100644
+--- a/include/freetype/config/ftheader.h
++++ b/include/freetype/config/ftheader.h
+@@ -357,6 +357,19 @@
+   /*************************************************************************
+    *
+    * @macro:
++   *   FT_PCF_DRIVER_H
++   *
++   * @description:
++   *   A macro used in #include statements to name the file containing
++   *   structures and macros related to the PCF driver module.
++   *
++   */
++#define FT_PCF_DRIVER_H  <freetype/ftpcfdrv.h>
++
++
++  /*************************************************************************
++   *
++   * @macro:
+    *   FT_TYPE1_TABLES_H
+    *
+    * @description:
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index f5bc540..5676074 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
+   /* to control the various font drivers and modules.  The controllable    */
+   /* properties are listed in the section `Controlling FreeType Modules'   */
+   /* in the reference's table of contents; currently there are properties  */
+-  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and  */
+-  /* TrueType (file `ftttdrv.h').                                          */
++  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
++  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
+   /*                                                                       */
+   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
+   /* multiple lines for better readability).                               */
+@@ -835,6 +835,33 @@ FT_BEGIN_HEADER
+   /*************************************************************************/
+   /*************************************************************************/
+   /****                                                                 ****/
++  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/
++  /****                                                                 ****/
++  /*************************************************************************/
++  /*************************************************************************/
++
++
++  /*************************************************************************/
++  /*                                                                       */
++  /* There are many PCF fonts just called `Fixed' which look completely    */
++  /* different, and which have nothing to do with each other.  When        */
++  /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
++  /* random, the style changes often if one changes the size and one       */
++  /* cannot select some fonts at all.  This option makes the PCF module    */
++  /* prepend the foundry name (plus a space) to the family name.           */
++  /*                                                                       */
++  /* We also check whether we have `wide' characters; all put together, we */
++  /* get family names like `Sony Fixed' or `Misc Fixed Wide'.              */
++  /*                                                                       */
++  /* If this option is activated, it can be controlled with the            */
++  /* `no-long-family-names' property of the pcf driver module.             */
++  /*                                                                       */
++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++
++
++  /*************************************************************************/
++  /*************************************************************************/
++  /****                                                                 ****/
+   /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
+   /****                                                                 ****/
+   /*************************************************************************/
+diff --git a/include/freetype/ftchapters.h b/include/freetype/ftchapters.h
+index ab43895..a0a121b 100644
+--- a/include/freetype/ftchapters.h
++++ b/include/freetype/ftchapters.h
+@@ -77,6 +77,7 @@
+ /*    auto_hinter                                                          */
+ /*    cff_driver                                                           */
+ /*    tt_driver                                                            */
++/*    pcf_driver                                                           */
+ /*                                                                         */
+ /***************************************************************************/
+ 
+diff --git a/include/freetype/ftpcfdrv.h b/include/freetype/ftpcfdrv.h
+new file mode 100644
+index 0000000..6622c93
+--- /dev/null
++++ b/include/freetype/ftpcfdrv.h
+@@ -0,0 +1,105 @@
++/***************************************************************************/
++/*                                                                         */
++/*  ftpcfdrv.h                                                             */
++/*                                                                         */
++/*    FreeType API for controlling the PCF driver (specification only).    */
++/*                                                                         */
++/*  Copyright 2017 by                                                      */
++/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
++/*                                                                         */
++/*  This file is part of the FreeType project, and may only be used,       */
++/*  modified, and distributed under the terms of the FreeType project      */
++/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
++/*  this file you indicate that you have read the license and              */
++/*  understand and accept it fully.                                        */
++/*                                                                         */
++/***************************************************************************/
++
++
++#ifndef FTPCFDRV_H_
++#define FTPCFDRV_H_
++
++#include <ft2build.h>
++#include FT_FREETYPE_H
++
++#ifdef FREETYPE_H
++#error "freetype.h of FreeType 1 has been loaded!"
++#error "Please fix the directory search order for header files"
++#error "so that freetype.h of FreeType 2 is found first."
++#endif
++
++
++FT_BEGIN_HEADER
++
++
++  /**************************************************************************
++   *
++   * @section:
++   *   pcf_driver
++   *
++   * @title:
++   *   The PCF driver
++   *
++   * @abstract:
++   *   Controlling the PCF driver module.
++   *
++   * @description:
++   *   While FreeType's PCF driver doesn't expose API functions by itself,
++   *   it is possible to control its behaviour with @FT_Property_Set and
++   *   @FT_Property_Get.  Right now, there is a single property
++   *   `no-long-family-names' available if FreeType is compiled with
++   *   PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
++   *
++   *   The PCF driver's module name is `pcf'.
++   *
++   */
++
++
++  /**************************************************************************
++   *
++   * @property:
++   *   no-long-family-names
++   *
++   * @description:
++   *   If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
++   *   FreeType, the PCF driver constructs long family names.
++   *
++   *   There are many PCF fonts just called `Fixed' which look completely
++   *   different, and which have nothing to do with each other.  When
++   *   selecting `Fixed' in KDE or Gnome one gets results that appear rather
++   *   random, the style changes often if one changes the size and one
++   *   cannot select some fonts at all.  The improve this situation, the PCF
++   *   module prepends the foundry name (plus a space) to the family name. 
++   *   It also checks whether there are `wide' characters; all put together,
++   *   family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
++   *
++   *   If `no-long-family-names' is set, this feature gets switched off.
++   *
++   *   {
++   *     FT_Library  library;
++   *     FT_Bool     no_long_family_names = TRUE;
++   *
++   *
++   *     FT_Init_FreeType( &library );
++   *
++   *     FT_Property_Set( library, "pcf",
++   *                               "no-long-family-names",
++   *                               &no_long_family_names );
++   *   }
++   *
++   * @note:
++   *   This property can be used with @FT_Property_Get also.
++   *
++   *   This property can be set via the `FREETYPE_PROPERTIES' environment
++   *   variable (using values 1 and 0 for `on' and `off', respectively).
++   *
++   */
++
++
++FT_END_HEADER
++
++
++#endif /* FTPCFDRV_H_ */
++
++
++/* END */
+diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h
+index 830cabe..f0390cb 100644
+--- a/src/pcf/pcf.h
++++ b/src/pcf/pcf.h
+@@ -167,6 +167,8 @@ FT_BEGIN_HEADER
+   {
+     FT_DriverRec  root;
+ 
++    FT_Bool  no_long_family_names;
++
+   } PCF_DriverRec, *PCF_Driver;
+ 
+ 
+diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
+index 8f4a90d..bc65423 100644
+--- a/src/pcf/pcfdrivr.c
++++ b/src/pcf/pcfdrivr.c
+@@ -49,6 +49,8 @@ THE SOFTWARE.
+ 
+ #include FT_SERVICE_BDF_H
+ #include FT_SERVICE_FONT_FORMAT_H
++#include FT_SERVICE_PROPERTIES_H
++#include FT_PCF_DRIVER_H
+ 
+ 
+   /*************************************************************************/
+@@ -667,6 +669,110 @@ THE SOFTWARE.
+   };
+ 
+ 
++  /*
++   *  PROPERTY SERVICE
++   *
++   */
++  static FT_Error
++  pcf_property_set( FT_Module    module,         /* PCF_Driver */
++                    const char*  property_name,
++                    const void*  value,
++                    FT_Bool      value_is_string )
++  {
++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++
++    FT_Error    error  = FT_Err_Ok;
++    PCF_Driver  driver = (PCF_Driver)module;
++
++#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
++    FT_UNUSED( value_is_string );
++#endif
++
++
++    if ( !ft_strcmp( property_name, "no-long-family-names" ) )
++    {
++#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
++      if ( value_is_string )
++      {
++        const char*  s   = (const char*)value;
++        long         lfn = ft_strtol( s, NULL, 10 );
++
++
++        if ( lfn == 0 )
++          driver->no_long_family_names = 0;
++        else if ( lfn == 1 )
++          driver->no_long_family_names = 1;
++        else
++          return FT_THROW( Invalid_Argument );
++      }
++      else
++#endif
++      {
++        FT_Bool*  no_long_family_names = (FT_Bool*)value;
++
++
++        driver->no_long_family_names = *no_long_family_names;
++      }
++
++      return error;
++    }
++
++#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++
++    FT_UNUSED( module );
++    FT_UNUSED( value );
++    FT_UNUSED( value_is_string );
++
++#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++
++    FT_TRACE0(( "pcf_property_set: missing property `%s'\n",
++                property_name ));
++    return FT_THROW( Missing_Property );
++  }
++
++
++  static FT_Error
++  pcf_property_get( FT_Module    module,         /* PCF_Driver */
++                    const char*  property_name,
++                    const void*  value )
++  {
++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++
++    FT_Error    error  = FT_Err_Ok;
++    PCF_Driver  driver = (PCF_Driver)module;
++
++
++    if ( !ft_strcmp( property_name, "no-long-family-names" ) )
++    {
++      FT_Bool   no_long_family_names = driver->no_long_family_names;
++      FT_Bool*  val                  = (FT_Bool*)value;
++
++
++      *val = no_long_family_names;
++
++      return error;
++    }
++
++#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++
++    FT_UNUSED( module );
++    FT_UNUSED( value );
++
++#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++
++    FT_TRACE0(( "pcf_property_get: missing property `%s'\n",
++                property_name ));
++    return FT_THROW( Missing_Property );
++  }
++
++
++  FT_DEFINE_SERVICE_PROPERTIESREC(
++    pcf_service_properties,
++
++    (FT_Properties_SetFunc)pcf_property_set,      /* set_property */
++    (FT_Properties_GetFunc)pcf_property_get )     /* get_property */
++
++
+  /*
+   *
+   *  SERVICE LIST
+@@ -677,6 +783,7 @@ THE SOFTWARE.
+   {
+     { FT_SERVICE_ID_BDF,         &pcf_service_bdf },
+     { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF },
++    { FT_SERVICE_ID_PROPERTIES,  &pcf_service_properties },
+     { NULL, NULL }
+   };
+ 
+@@ -694,7 +801,14 @@ THE SOFTWARE.
+   FT_CALLBACK_DEF( FT_Error )
+   pcf_driver_init( FT_Module  module )      /* PCF_Driver */
+   {
++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++    PCF_Driver  driver = (PCF_Driver)module;
++
++
++    driver->no_long_family_names = 0;
++#else
+     FT_UNUSED( module );
++#endif
+ 
+     return FT_Err_Ok;
+   }
+diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
+index 38ba110..3eacf2b 100644
+--- a/src/pcf/pcfread.c
++++ b/src/pcf/pcfread.c
+@@ -1393,57 +1393,75 @@ THE SOFTWARE.
+       prop = pcf_find_property( face, "FAMILY_NAME" );
+       if ( prop && prop->isString )
+       {
+-        /* Prepend the foundry name plus a space to the family name.      */
+-        /* There are many fonts just called `Fixed' which look completely */
+-        /* different, and which have nothing to do with each other.  When */
+-        /* selecting `Fixed' in KDE or Gnome one gets results that appear */
+-        /* rather random, the style changes often if one changes the size */
+-        /* and one cannot select some fonts at all.                       */
+-        /*                                                                */
+-        /* We also check whether we have `wide' characters; all put       */
+-        /* together, we get family names like `Sony Fixed' or `Misc Fixed */
+-        /* Wide'.                                                         */
+-        PCF_Property  foundry_prop, point_size_prop, average_width_prop;
+-
+-        int  l    = ft_strlen( prop->value.atom ) + 1;
+-        int  wide = 0;
+-
+-
+-        foundry_prop       = pcf_find_property( face, "FOUNDRY" );
+-        point_size_prop    = pcf_find_property( face, "POINT_SIZE" );
+-        average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
+-
+-        if ( point_size_prop && average_width_prop )
++
++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++
++        PCF_Driver  driver = (PCF_Driver)FT_FACE_DRIVER( face );
++
++
++        if ( !driver->no_long_family_names )
+         {
+-          if ( average_width_prop->value.l >= point_size_prop->value.l )
++          /* Prepend the foundry name plus a space to the family name.     */
++          /* There are many fonts just called `Fixed' which look           */
++          /* completely different, and which have nothing to do with each  */
++          /* other.  When selecting `Fixed' in KDE or Gnome one gets       */
++          /* results that appear rather random, the style changes often if */
++          /* one changes the size and one cannot select some fonts at all. */
++          /*                                                               */
++          /* We also check whether we have `wide' characters; all put      */
++          /* together, we get family names like `Sony Fixed' or `Misc      */
++          /* Fixed Wide'.                                                  */
++
++          PCF_Property  foundry_prop, point_size_prop, average_width_prop;
++
++          int  l    = ft_strlen( prop->value.atom ) + 1;
++          int  wide = 0;
++
++
++          foundry_prop       = pcf_find_property( face, "FOUNDRY" );
++          point_size_prop    = pcf_find_property( face, "POINT_SIZE" );
++          average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
++
++          if ( point_size_prop && average_width_prop )
+           {
+-            /* This font is at least square shaped or even wider */
+-            wide = 1;
+-            l   += ft_strlen( " Wide" );
++            if ( average_width_prop->value.l >= point_size_prop->value.l )
++            {
++              /* This font is at least square shaped or even wider */
++              wide = 1;
++              l   += ft_strlen( " Wide" );
++            }
+           }
+-        }
+ 
+-        if ( foundry_prop && foundry_prop->isString )
+-        {
+-          l += ft_strlen( foundry_prop->value.atom ) + 1;
++          if ( foundry_prop && foundry_prop->isString )
++          {
++            l += ft_strlen( foundry_prop->value.atom ) + 1;
+ 
+-          if ( FT_NEW_ARRAY( root->family_name, l ) )
+-            goto Exit;
++            if ( FT_NEW_ARRAY( root->family_name, l ) )
++              goto Exit;
++
++            ft_strcpy( root->family_name, foundry_prop->value.atom );
++            ft_strcat( root->family_name, " " );
++            ft_strcat( root->family_name, prop->value.atom );
++          }
++          else
++          {
++            if ( FT_NEW_ARRAY( root->family_name, l ) )
++              goto Exit;
+ 
+-          ft_strcpy( root->family_name, foundry_prop->value.atom );
+-          ft_strcat( root->family_name, " " );
+-          ft_strcat( root->family_name, prop->value.atom );
++            ft_strcpy( root->family_name, prop->value.atom );
++          }
++
++          if ( wide )
++            ft_strcat( root->family_name, " Wide" );
+         }
+         else
++
++#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
++
+         {
+-          if ( FT_NEW_ARRAY( root->family_name, l ) )
++          if ( FT_STRDUP( root->family_name, prop->value.atom ) )
+             goto Exit;
+-
+-          ft_strcpy( root->family_name, prop->value.atom );
+         }
+-
+-        if ( wide )
+-          ft_strcat( root->family_name, " Wide" );
+       }
+       else
+         root->family_name = NULL;
+-- 
+cgit v1.0
+
+From 7ccca6aec167c2c30c569765ece808f0eee023a6 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Mon, 9 Jan 2017 19:54:44 +0100
+Subject: [pcf] Disable long family names by default.
+
+* include/freetype/config/ftoption.h
+(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
+---
+ include/freetype/config/ftoption.h | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
+index 5676074..37a0d00 100644
+--- a/include/freetype/config/ftoption.h
++++ b/include/freetype/config/ftoption.h
+@@ -856,7 +856,7 @@ FT_BEGIN_HEADER
+   /* If this option is activated, it can be controlled with the            */
+   /* `no-long-family-names' property of the pcf driver module.             */
+   /*                                                                       */
+-#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
++/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+ 
+ 
+   /*************************************************************************/
+-- 
+cgit v1.0
+

diff --git a/media-libs/freetype/freetype-2.7.1-r1.ebuild b/media-libs/freetype/freetype-2.7.1-r1.ebuild
new file mode 100644
index 00000000..d245429
--- /dev/null
+++ b/media-libs/freetype/freetype-2.7.1-r1.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools flag-o-matic multilib multilib-build multilib-minimal toolchain-funcs
+
+INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"
+
+DESCRIPTION="A high-quality and portable font engine"
+HOMEPAGE="http://www.freetype.org/"
+SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
+	mirror://nongnu/freetype/${P/_/}.tar.bz2
+	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
+		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
+	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
+		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )"
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~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="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz
+	infinality png static-libs utils"
+RESTRICT="!bindist? ( bindist )" # bug 541408
+
+CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
+	utils? (
+		X? (
+			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+		)
+	)"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
+PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
+
+PATCHES=(
+	# This is the same as the 01 patch from infinality
+	"${FILESDIR}"/${PN}-2.7-enable-valid.patch
+
+	"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
+
+	# patches from upstream (can be removed with the next version bump)
+	"${FILESDIR}"/${P}-pcf_fix.patch #606688
+)
+
+src_prepare() {
+	enable_option() {
+		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to enable option $1"
+	}
+
+	disable_option() {
+		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to disable option $1"
+	}
+
+	default
+
+	# Will be the new default for >=freetype-2.7.0
+	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+
+	if use infinality && use cleartype_hinting; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
+	elif use infinality; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
+	elif use cleartype_hinting; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+	fi
+
+	if ! use bindist; then
+		# See http://freetype.org/patents.html
+		# ClearType is covered by several Microsoft patents in the US
+		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+	fi
+
+	if ! use adobe-cff; then
+		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+	fi
+
+	if use debug; then
+		enable_option FT_DEBUG_LEVEL_TRACE
+		enable_option FT_DEBUG_MEMORY
+	fi
+
+	if use utils; then
+		cd "${WORKDIR}/ft2demos-${PV}" || die
+		# Disable tests needing X11 when USE="-X". (bug #177597)
+		if ! use X; then
+			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+		fi
+		cd "${S}" || die
+	fi
+
+	# we need non-/bin/sh to run configure
+	if [[ -n ${CONFIG_SHELL} ]] ; then
+		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
+			"${S}"/builds/unix/configure || die
+	fi
+
+	elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+	append-flags -fno-strict-aliasing
+	type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+	local myeconfargs=(
+		--enable-biarch-config
+		--enable-shared
+		$(use_with bzip2)
+		$(use_with harfbuzz)
+		$(use_with png)
+		$(use_enable static-libs static)
+
+		# avoid using libpng-config
+		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+	)
+
+	ECONF_SOURCE="${S}" \
+		econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use utils; then
+		einfo "Building utils"
+		# fix for Prefix, bug #339334
+		emake \
+			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use utils; then
+		einfo "Installing utils"
+		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
+		local ft2demo
+		for ft2demo in ../ft2demos-${PV}/bin/*; do
+			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
+				"${ED}"/usr/bin || die
+		done
+	fi
+}
+
+multilib_src_install_all() {
+	if use fontforge; then
+		# Probably fontforge needs less but this way makes things simplier...
+		einfo "Installing internal headers required for fontforge"
+		local header
+		find src/truetype include/freetype/internal -name '*.h' | \
+		while read header; do
+			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+		done
+	fi
+
+	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+	if use doc ; then
+		docinto html
+		dodoc -r docs/*
+	fi
+
+	prune_libtool_files --all
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2017-03-10 11:40 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2017-03-10 11:40 UTC (permalink / raw
  To: gentoo-commits

commit:     b718d16b1e7331ab125b9803d1add14b2617e0b0
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 10 11:40:30 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar 10 11:40:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b718d16b

media-libs/freetype: Security revbump for bug #612192.

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 .../freetype/files/freetype-2.7.1-glyph_name.patch |  31 ++++
 media-libs/freetype/freetype-2.7.1-r2.ebuild       | 179 +++++++++++++++++++++
 2 files changed, 210 insertions(+)

diff --git a/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch b/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch
new file mode 100644
index 00000000000..99c27a7a02f
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch
@@ -0,0 +1,31 @@
+From a660e3de422731b94d4a134d27555430cbb6fb39 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Fri, 26 Aug 2016 00:23:27 +0200
+Subject: [PATCH] [type1] Fix heap buffer overflow.
+
+Reported as
+
+  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
+
+* src/type1/t1load.c (parse_charstrings): Reject fonts that don't
+contain glyph names.
+---
+diff --git a/src/type1/t1load.c b/src/type1/t1load.c
+index c981adcf..f8bf3132 100644
+--- a/src/type1/t1load.c
++++ b/src/type1/t1load.c
+@@ -1776,6 +1776,12 @@
+       }
+     }
+ 
++    if ( !n )
++    {
++      error = FT_THROW( Invalid_File_Format );
++      goto Fail;
++    }
++
+     loader->num_glyphs = n;
+ 
+     /* if /.notdef is found but does not occupy index 0, do our magic. */
+-- 
+2.12.0

diff --git a/media-libs/freetype/freetype-2.7.1-r2.ebuild b/media-libs/freetype/freetype-2.7.1-r2.ebuild
new file mode 100644
index 00000000000..498c3a7df4f
--- /dev/null
+++ b/media-libs/freetype/freetype-2.7.1-r2.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs
+
+INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"
+
+DESCRIPTION="A high-quality and portable font engine"
+HOMEPAGE="http://www.freetype.org/"
+SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
+	mirror://nongnu/freetype/${P/_/}.tar.bz2
+	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
+		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
+	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
+		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )"
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~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="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz
+	infinality png static-libs utils"
+RESTRICT="!bindist? ( bindist )" # bug 541408
+
+CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
+	utils? (
+		X? (
+			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+		)
+	)"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
+PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
+
+PATCHES=(
+	# This is the same as the 01 patch from infinality
+	"${FILESDIR}"/${PN}-2.7-enable-valid.patch
+
+	"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
+
+	# patches from upstream (can be removed with the next version bump)
+	"${FILESDIR}"/${P}-pcf_fix.patch #606688
+	"${FILESDIR}"/${P}-glyph_name.patch #612192
+)
+
+src_prepare() {
+	enable_option() {
+		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to enable option $1"
+	}
+
+	disable_option() {
+		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to disable option $1"
+	}
+
+	default
+
+	# Will be the new default for >=freetype-2.7.0
+	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+
+	if use infinality && use cleartype_hinting; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
+	elif use infinality; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
+	elif use cleartype_hinting; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+	fi
+
+	if ! use bindist; then
+		# See http://freetype.org/patents.html
+		# ClearType is covered by several Microsoft patents in the US
+		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+	fi
+
+	if ! use adobe-cff; then
+		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+	fi
+
+	if use debug; then
+		enable_option FT_DEBUG_LEVEL_TRACE
+		enable_option FT_DEBUG_MEMORY
+	fi
+
+	if use utils; then
+		cd "${WORKDIR}/ft2demos-${PV}" || die
+		# Disable tests needing X11 when USE="-X". (bug #177597)
+		if ! use X; then
+			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+		fi
+		cd "${S}" || die
+	fi
+
+	# we need non-/bin/sh to run configure
+	if [[ -n ${CONFIG_SHELL} ]] ; then
+		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
+			"${S}"/builds/unix/configure || die
+	fi
+
+	elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+	append-flags -fno-strict-aliasing
+	type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+	local myeconfargs=(
+		--enable-biarch-config
+		--enable-shared
+		$(use_with bzip2)
+		$(use_with harfbuzz)
+		$(use_with png)
+		$(use_enable static-libs static)
+
+		# avoid using libpng-config
+		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+	)
+
+	ECONF_SOURCE="${S}" \
+		econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use utils; then
+		einfo "Building utils"
+		# fix for Prefix, bug #339334
+		emake \
+			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use utils; then
+		einfo "Installing utils"
+		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
+		local ft2demo
+		for ft2demo in ../ft2demos-${PV}/bin/*; do
+			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
+				"${ED}"/usr/bin || die
+		done
+	fi
+}
+
+multilib_src_install_all() {
+	if use fontforge; then
+		# Probably fontforge needs less but this way makes things simplier...
+		einfo "Installing internal headers required for fontforge"
+		local header
+		find src/truetype include/freetype/internal -name '*.h' | \
+		while read header; do
+			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+		done
+	fi
+
+	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+	if use doc ; then
+		docinto html
+		dodoc -r docs/*
+	fi
+
+	prune_libtool_files --all
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2017-05-13 21:39 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2017-05-13 21:39 UTC (permalink / raw
  To: gentoo-commits

commit:     38fb3e66a91cc67dfa0274bb8b0499301222915b
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 21:39:15 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat May 13 21:39:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38fb3e66

media-libs/freetype: Removed old.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 media-libs/freetype/Manifest                       |   7 -
 .../files/freetype-2.3.2-enable-valid.patch        |  22 ---
 media-libs/freetype/freetype-2.6.3-r1.ebuild       | 172 --------------------
 media-libs/freetype/freetype-2.6.5.ebuild          | 176 --------------------
 media-libs/freetype/freetype-2.7.1-r1.ebuild       | 178 ---------------------
 5 files changed, 555 deletions(-)

diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
index 5f9e2cc3190..707e21f3db7 100644
--- a/media-libs/freetype/Manifest
+++ b/media-libs/freetype/Manifest
@@ -1,13 +1,6 @@
-DIST 03-infinality-2.6.3-2016.03.26.patch.xz 28104 SHA256 330540ead509aaeba3885236275cfab998c0a23143ef1de9c9c4bfabca8054d6 SHA512 c28c7bcd826acb608b9e240328cf91583ff1462c60ee8e6b3a677ec1ee8941cdc1a5f05680742f2d35c8b6cbfd62e1df6e12e6e9f80942935b8debc349cd1dba WHIRLPOOL 8a7d6a6ba58d363cff06f2223ac20ef56b2ec99fb895f7e308ae9d2451ca4c984c713dbe1b10870e90e55c497af9d81a6fa7f9bc783cf58b897a8cb7e3f4bac2
-DIST freetype-2.6.3.tar.bz2 1753083 SHA256 371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2 SHA512 e1f9018835fc88beeb4479537b59f866c52393ae18d24a1e0710a464cf948ab02b35c2c6043bc20c1db3a04871ee4eb0bb1d210550c0ea2780c8b1aea98fbf0d WHIRLPOOL e17e87fe7b821730da13b1a54073fd0314025e3e15a41b10b5ece2731c8152c4d8dbe1fb7f26593794d70f15f6dfd70582678d48a8f068cec865f821eb3847a0
-DIST freetype-2.6.5.tar.bz2 1779603 SHA256 e20a6e1400798fd5e3d831dd821b61c35b1f9a6465d6b18a53a9df4cf441acf0 SHA512 d60f057e12992b4dccd7d5e232bda5c344e6ed0d74362032fbbc52526bac42d600fe0aa04c6442a9502a27a88f5d5155fb42e723531127400ccfce0d1911487f WHIRLPOOL 3cfbbe407ee024ff939469aa2b82b764fe89b1ba4fc7edcdd537e9ad81b3ea6a8fe807e2d5fdb80ec47de2f66cf3f28b5e45320c84a84ea446acbf6c2966cccb
 DIST freetype-2.7.1.tar.bz2 1825107 SHA256 3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 SHA512 df39e2ef55f9090a66fecb6b5e9a5d296a043ddfd919d0ce3d7ea5132aa388bfbbeeaa6d6df6513956134b987e1c3a5eac6975c0c9631213af77457a623b49da WHIRLPOOL f1d506dae87b718131299e24c959ad0636bca9739fdd3dce1ad1e8009e7e16a11faede66d234f7071f3de86c83b275f09323804be77a2a4b3a785adba4b74ed6
 DIST freetype-2.8.tar.bz2 1873526 SHA256 a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b SHA512 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 WHIRLPOOL 2fb845ede217b228c39e1e767ea5b21868bd3b02521ca48fe614d78f790c9dab5145cc6feb147725e8e44cd3aa716a14742ef4893b2f54e5b167efe9f4905386
-DIST freetype-doc-2.6.3.tar.bz2 5367900 SHA256 28b7cb0b1ff3962d386c54cdffd3891d2126292f57b4ea9ad0467f07cf68de7d SHA512 7731d96543f73ace8afc4b5ff2148c32a8dacbf01a976a6870705f73b45dfe1429ffa94406cdfc83b163b039c4d375c0c553a7d7aaad659a87079f357e6599cc WHIRLPOOL 71b01f8d5daf8e93efab5453f198d1790365fd010b5a137f4f34e93f6bc03a6a644900b92b8263973248954895c73e70cad64fe50b09bb4042627182299a5a1c
-DIST freetype-doc-2.6.5.tar.bz2 1932398 SHA256 cb9cd73c3a713138e690a634608ec7b64ff645f9a71ac6645804b18e38be49e9 SHA512 1d2affa07f34c6486f1738141b428256f1d44bc0d166c74e9884caeeecdf3204164542e9bbc1c0eba6ff605f41d6022068546da64aee7859b72636bcd72fff00 WHIRLPOOL 90499d7ffdfe079dc058974e9d89a18a35c011244ea6d6003e8f445af579430910331fad2c6c7f4cc5ff318cf8582d8b30a32f878a4b8e4e5723e1b02025a396
 DIST freetype-doc-2.7.1.tar.bz2 2127460 SHA256 8e09cf22d1c98006fe3af160b7c3b7c847e4a3743963d6d89314d350b859dfb0 SHA512 acccc0cdacf277abb967aee3a09850f10aafe7719d01fc179fc660e8f3d596203d9a0ae74785e5c7e7ad744032d2209a547607edc43c8fde9d136de00cd59ff6 WHIRLPOOL f5d079472e22ba7ae1aa9c74f13279960f9c773be97def5039d5ac5473e1f1e691e4d94cf0e9183708e066faf2537b72777940996b61854e815ebe3d32ca71fd
 DIST freetype-doc-2.8.tar.bz2 2127740 SHA256 427ba04d11f450df4bac4c95fec247be1b835ccdcf85d8b081f3f39d31811154 SHA512 3a970a7dd6f0ba580c9f8084b271c11e6e87111ab9a5b6a3148eb1087e45ee18e998aa7e36a4311067a3b674cb784b1e827cf8c3a853e380078219be3eccce06 WHIRLPOOL 21863e784f993e301dceffb5b5cd20c94abaeec3e936cdcb0c54fe4e65a7cdb4768d890d7b97891f75ec3f3db7d47d2db52eda68cf6f776028cffac7b2e30696
-DIST ft2demos-2.6.3.tar.bz2 193412 SHA256 b076ac52465e912d035f111ede78b88bf3dd186f91a56a54ff83ffdf862e84e4 SHA512 1f23f9ab0bd59a06b8fd223bcc335ffba064477abee74d33308ddc28eb41e4ccf3728a52c36d4cab3995be695b56e1e099c2889f04e0835ba242b2938c5d2e78 WHIRLPOOL 1246985eca92e2e4d1b618d633602fc4114a69c1a8d715c51a5e96c17b3119fb3a254a577c876ad8ba9e2871bf59f4bd67f6721a706b3706a0a532728723f6a4
-DIST ft2demos-2.6.5.tar.bz2 216722 SHA256 568a8f3a6301189a881d2f7ec95da280d20c862de94d81815341870e380b00e6 SHA512 1b950254588835c4f797a3cf45034af714676e6b2a8415ee8fa860bab7e284c3833675efc84167a90bed29dc0dc2079b22a513cfb6642ba9b5cbc84f1bc4d30d WHIRLPOOL 64780f2ca5c1fe64f1e25f18297c7761bca7b4e9defa0ef823376037f99f5c270f875efd8052f372af3b6cf0f104db91cacad957691df89818404a17ff3d8fb3
 DIST ft2demos-2.7.1.tar.bz2 222288 SHA256 d3f8a0d5a3f0d58701133458a8c1d3f97f658869f3c904b1fda447ed3b290ecd SHA512 d3c5d81f302629c50b82696db0a83f17e3940fe38ecfddf5c56f63ff3f136f248b0458fe75337823cc080852f48a7326f4e5599240042ba1cb8984e05edd9823 WHIRLPOOL b1f8a1171fafa3147a3cd4c6dcc3237fe5b03240923e99acbd0f38da4129be443eb81178bb4df907bdcf3acf37248e59e012291b6a2ba66dc1d8a9e77a038f96
 DIST ft2demos-2.8.tar.bz2 225274 SHA256 2b6ce0d36bcb43fcc8aac07a0287982d855571ee271c3803c768e501f9c1a233 SHA512 dffdf6a493e8145c6513be34b57734a9a99c61f758a0e1ea691ef4284cee4c274ad7c3a8120a8ec425d86e33a70cd879d9db258e9c67b6a4db79c3243d4c9fb3 WHIRLPOOL 90f7d197912e968fe0443f67ae208ed4705b217e8d952c5063f476a30c3b585c6e6b55d01b174545b6972236e8f774d5674e2cad5d89c6e88b1c492be43512a4

diff --git a/media-libs/freetype/files/freetype-2.3.2-enable-valid.patch b/media-libs/freetype/files/freetype-2.3.2-enable-valid.patch
deleted file mode 100644
index 44f3bf6e1c9..00000000000
--- a/media-libs/freetype/files/freetype-2.3.2-enable-valid.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Enables gxvalid and otvalid modules for use with ftvalid.
-
---- freetype-2.2.1/modules.cfg.orig	2006-07-07 21:01:09.000000000 -0400
-+++ freetype-2.2.1/modules.cfg	2006-07-07 21:01:54.000000000 -0400
-@@ -110,7 +110,7 @@
- AUX_MODULES += cache
- 
- # TrueType GX/AAT table validation.  Needs ftgxval.c below.
--# AUX_MODULES += gxvalid
-+AUX_MODULES += gxvalid
- 
- # Support for streams compressed with gzip (files with suffix .gz).
- #
-@@ -124,7 +124,7 @@
- 
- # OpenType table validation.  Needs ftotval.c below.
- #
--# AUX_MODULES += otvalid
-+AUX_MODULES += otvalid
- 
- # Auxiliary PostScript driver component to share common code.
- #

diff --git a/media-libs/freetype/freetype-2.6.3-r1.ebuild b/media-libs/freetype/freetype-2.6.3-r1.ebuild
deleted file mode 100644
index 1a8ec29517b..00000000000
--- a/media-libs/freetype/freetype-2.6.3-r1.ebuild
+++ /dev/null
@@ -1,172 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs
-
-INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"
-
-DESCRIPTION="A high-quality and portable font engine"
-HOMEPAGE="http://www.freetype.org/"
-SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
-	mirror://nongnu/freetype/${P/_/}.tar.bz2
-	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
-		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
-	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
-		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )
-	infinality? ( https://dev.gentoo.org/~polynomial-c/${INFINALITY_PATCH}.xz )"
-
-LICENSE="|| ( FTL GPL-2+ )"
-SLOT="2"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~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="X +adobe-cff bindist bzip2 debug doc fontforge harfbuzz
-	infinality png static-libs utils"
-RESTRICT="!bindist? ( bindist )" # bug 541408
-
-CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
-	utils? (
-		X? (
-			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
-			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
-		)
-	)"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
-PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
-
-PATCHES=(
-	# This is the same as the 01 patch from infinality
-	"${FILESDIR}"/${PN}-2.3.2-enable-valid.patch
-
-	"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
-)
-
-src_prepare() {
-	enable_option() {
-		sed -i -e "/#define $1/a #define $1" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to enable option $1"
-	}
-
-	disable_option() {
-		sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to disable option $1"
-	}
-
-	default
-
-	if use infinality; then
-		eapply "${WORKDIR}/${INFINALITY_PATCH}"
-
-		# FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11
-		enable_option TT_CONFIG_OPTION_SUBPIXEL_HINTING
-	fi
-
-	if ! use bindist; then
-		# See http://freetype.org/patents.html
-		# ClearType is covered by several Microsoft patents in the US
-		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-	fi
-
-	if ! use adobe-cff; then
-		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
-	fi
-
-	if use debug; then
-		enable_option FT_DEBUG_LEVEL_TRACE
-		enable_option FT_DEBUG_MEMORY
-	fi
-
-	if use utils; then
-		cd "${WORKDIR}/ft2demos-${PV}" || die
-		# Disable tests needing X11 when USE="-X". (bug #177597)
-		if ! use X; then
-			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
-		fi
-		cd "${S}" || die
-	fi
-
-	# we need non-/bin/sh to run configure
-	if [[ -n ${CONFIG_SHELL} ]] ; then
-		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
-			"${S}"/builds/unix/configure || die
-	fi
-
-	elibtoolize --patch-only
-}
-
-multilib_src_configure() {
-	append-flags -fno-strict-aliasing
-	type -P gmake &> /dev/null && export GNUMAKE=gmake
-
-	local myeconfargs=(
-		--enable-biarch-config
-		--enable-shared
-		$(use_with bzip2)
-		$(use_with harfbuzz)
-		$(use_with png)
-		$(use_enable static-libs static)
-
-		# avoid using libpng-config
-		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
-		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
-	)
-
-	ECONF_SOURCE="${S}" \
-		econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Building utils"
-		# fix for Prefix, bug #339334
-		emake \
-			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
-			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
-	fi
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Installing utils"
-		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
-		local ft2demo
-		for ft2demo in ../ft2demos-${PV}/bin/*; do
-			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
-				"${ED}"/usr/bin || die
-		done
-	fi
-}
-
-multilib_src_install_all() {
-	if use fontforge; then
-		# Probably fontforge needs less but this way makes things simplier...
-		einfo "Installing internal headers required for fontforge"
-		local header
-		find src/truetype include/freetype/internal -name '*.h' | \
-		while read header; do
-			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-		done
-	fi
-
-	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
-	if use doc ; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	prune_libtool_files --all
-}

diff --git a/media-libs/freetype/freetype-2.6.5.ebuild b/media-libs/freetype/freetype-2.6.5.ebuild
deleted file mode 100644
index ea4b757a95c..00000000000
--- a/media-libs/freetype/freetype-2.6.5.ebuild
+++ /dev/null
@@ -1,176 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs
-
-INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"
-
-DESCRIPTION="A high-quality and portable font engine"
-HOMEPAGE="http://www.freetype.org/"
-SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
-	mirror://nongnu/freetype/${P/_/}.tar.bz2
-	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
-		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
-	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
-		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )"
-
-LICENSE="|| ( FTL GPL-2+ )"
-SLOT="2"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~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="X +adobe-cff bindist bzip2 cleartype_hinting debug doc fontforge harfbuzz
-	infinality png static-libs utils"
-RESTRICT="!bindist? ( bindist )" # bug 541408
-
-CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
-	utils? (
-		X? (
-			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
-			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
-		)
-	)"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
-PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
-
-REQUIRED_USE="?? ( cleartype_hinting infinality )"
-
-PATCHES=(
-	# This is the same as the 01 patch from infinality
-	"${FILESDIR}"/${PN}-2.3.2-enable-valid.patch
-
-	"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
-)
-
-src_prepare() {
-	enable_option() {
-		sed -i -e "/#define $1/a #define $1" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to enable option $1"
-	}
-
-	disable_option() {
-		sed -i -e "/#define $1/ { s:^:/*:; s:$:*/: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to disable option $1"
-	}
-
-	default
-
-	if use infinality; then
-		# FT_CONFIG_OPTION_SUBPIXEL_RENDERING is already enabled in freetype-2.4.11
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
-	fi
-
-	if use cleartype_hinting; then
-		# Will be the new default for >=freetype-2.7.0
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
-	fi
-
-	if ! use bindist; then
-		# See http://freetype.org/patents.html
-		# ClearType is covered by several Microsoft patents in the US
-		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-	fi
-
-	if ! use adobe-cff; then
-		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
-	fi
-
-	if use debug; then
-		enable_option FT_DEBUG_LEVEL_TRACE
-		enable_option FT_DEBUG_MEMORY
-	fi
-
-	if use utils; then
-		cd "${WORKDIR}/ft2demos-${PV}" || die
-		# Disable tests needing X11 when USE="-X". (bug #177597)
-		if ! use X; then
-			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
-		fi
-		cd "${S}" || die
-	fi
-
-	# we need non-/bin/sh to run configure
-	if [[ -n ${CONFIG_SHELL} ]] ; then
-		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
-			"${S}"/builds/unix/configure || die
-	fi
-
-	elibtoolize --patch-only
-}
-
-multilib_src_configure() {
-	append-flags -fno-strict-aliasing
-	type -P gmake &> /dev/null && export GNUMAKE=gmake
-
-	local myeconfargs=(
-		--enable-biarch-config
-		--enable-shared
-		$(use_with bzip2)
-		$(use_with harfbuzz)
-		$(use_with png)
-		$(use_enable static-libs static)
-
-		# avoid using libpng-config
-		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
-		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
-	)
-
-	ECONF_SOURCE="${S}" \
-		econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Building utils"
-		# fix for Prefix, bug #339334
-		emake \
-			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
-			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
-	fi
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Installing utils"
-		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
-		local ft2demo
-		for ft2demo in ../ft2demos-${PV}/bin/*; do
-			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
-				"${ED}"/usr/bin || die
-		done
-	fi
-}
-
-multilib_src_install_all() {
-	if use fontforge; then
-		# Probably fontforge needs less but this way makes things simplier...
-		einfo "Installing internal headers required for fontforge"
-		local header
-		find src/truetype include/freetype/internal -name '*.h' | \
-		while read header; do
-			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-		done
-	fi
-
-	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
-	if use doc ; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	prune_libtool_files --all
-}

diff --git a/media-libs/freetype/freetype-2.7.1-r1.ebuild b/media-libs/freetype/freetype-2.7.1-r1.ebuild
deleted file mode 100644
index ef239d81c1f..00000000000
--- a/media-libs/freetype/freetype-2.7.1-r1.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs
-
-INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"
-
-DESCRIPTION="A high-quality and portable font engine"
-HOMEPAGE="http://www.freetype.org/"
-SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
-	mirror://nongnu/freetype/${P/_/}.tar.bz2
-	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
-		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
-	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
-		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )"
-
-LICENSE="|| ( FTL GPL-2+ )"
-SLOT="2"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~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="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz
-	infinality png static-libs utils"
-RESTRICT="!bindist? ( bindist )" # bug 541408
-
-CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
-	utils? (
-		X? (
-			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
-			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
-		)
-	)"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
-PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
-
-PATCHES=(
-	# This is the same as the 01 patch from infinality
-	"${FILESDIR}"/${PN}-2.7-enable-valid.patch
-
-	"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
-
-	# patches from upstream (can be removed with the next version bump)
-	"${FILESDIR}"/${P}-pcf_fix.patch #606688
-)
-
-src_prepare() {
-	enable_option() {
-		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to enable option $1"
-	}
-
-	disable_option() {
-		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to disable option $1"
-	}
-
-	default
-
-	# Will be the new default for >=freetype-2.7.0
-	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
-
-	if use infinality && use cleartype_hinting; then
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
-	elif use infinality; then
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
-	elif use cleartype_hinting; then
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
-	fi
-
-	if ! use bindist; then
-		# See http://freetype.org/patents.html
-		# ClearType is covered by several Microsoft patents in the US
-		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-	fi
-
-	if ! use adobe-cff; then
-		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
-	fi
-
-	if use debug; then
-		enable_option FT_DEBUG_LEVEL_TRACE
-		enable_option FT_DEBUG_MEMORY
-	fi
-
-	if use utils; then
-		cd "${WORKDIR}/ft2demos-${PV}" || die
-		# Disable tests needing X11 when USE="-X". (bug #177597)
-		if ! use X; then
-			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
-		fi
-		cd "${S}" || die
-	fi
-
-	# we need non-/bin/sh to run configure
-	if [[ -n ${CONFIG_SHELL} ]] ; then
-		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
-			"${S}"/builds/unix/configure || die
-	fi
-
-	elibtoolize --patch-only
-}
-
-multilib_src_configure() {
-	append-flags -fno-strict-aliasing
-	type -P gmake &> /dev/null && export GNUMAKE=gmake
-
-	local myeconfargs=(
-		--enable-biarch-config
-		--enable-shared
-		$(use_with bzip2)
-		$(use_with harfbuzz)
-		$(use_with png)
-		$(use_enable static-libs static)
-
-		# avoid using libpng-config
-		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
-		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
-	)
-
-	ECONF_SOURCE="${S}" \
-		econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Building utils"
-		# fix for Prefix, bug #339334
-		emake \
-			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
-			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
-	fi
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Installing utils"
-		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
-		local ft2demo
-		for ft2demo in ../ft2demos-${PV}/bin/*; do
-			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
-				"${ED}"/usr/bin || die
-		done
-	fi
-}
-
-multilib_src_install_all() {
-	if use fontforge; then
-		# Probably fontforge needs less but this way makes things simplier...
-		einfo "Installing internal headers required for fontforge"
-		local header
-		find src/truetype include/freetype/internal -name '*.h' | \
-		while read header; do
-			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-		done
-	fi
-
-	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
-	if use doc ; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	prune_libtool_files --all
-}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2017-12-08 20:54 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2017-12-08 20:54 UTC (permalink / raw
  To: gentoo-commits

commit:     a1d125da192cd01ecb4edc32252a65414ea8bce5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  8 20:54:47 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Dec  8 20:54:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1d125da

media-libs/freetype: Removed old.

Package-Manager: Portage-2.3.17, Repoman-2.3.6

 media-libs/freetype/Manifest                       |   3 -
 .../freetype/files/freetype-2.7.1-glyph_name.patch |  31 -
 .../freetype/files/freetype-2.7.1-pcf_fix.patch    | 711 ---------------------
 media-libs/freetype/freetype-2.7.1-r2.ebuild       | 179 ------
 4 files changed, 924 deletions(-)

diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
index 3dd4c756ec4..a7c25ccca18 100644
--- a/media-libs/freetype/Manifest
+++ b/media-libs/freetype/Manifest
@@ -1,9 +1,6 @@
-DIST freetype-2.7.1.tar.bz2 1825107 SHA256 3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 SHA512 df39e2ef55f9090a66fecb6b5e9a5d296a043ddfd919d0ce3d7ea5132aa388bfbbeeaa6d6df6513956134b987e1c3a5eac6975c0c9631213af77457a623b49da WHIRLPOOL f1d506dae87b718131299e24c959ad0636bca9739fdd3dce1ad1e8009e7e16a11faede66d234f7071f3de86c83b275f09323804be77a2a4b3a785adba4b74ed6
 DIST freetype-2.8.1.tar.bz2 1886443 SHA256 e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78 SHA512 ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823 WHIRLPOOL 4827e36cccf23323be8e5e55edd6692503747e90ff3764a497571c06338c711c0d2071ab06766ccb803152e4b00df4cefbee2768ad3660fbf6430f3622620893
 DIST freetype-2.8.tar.bz2 1873526 SHA256 a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b SHA512 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 WHIRLPOOL 2fb845ede217b228c39e1e767ea5b21868bd3b02521ca48fe614d78f790c9dab5145cc6feb147725e8e44cd3aa716a14742ef4893b2f54e5b167efe9f4905386
-DIST freetype-doc-2.7.1.tar.bz2 2127460 SHA256 8e09cf22d1c98006fe3af160b7c3b7c847e4a3743963d6d89314d350b859dfb0 SHA512 acccc0cdacf277abb967aee3a09850f10aafe7719d01fc179fc660e8f3d596203d9a0ae74785e5c7e7ad744032d2209a547607edc43c8fde9d136de00cd59ff6 WHIRLPOOL f5d079472e22ba7ae1aa9c74f13279960f9c773be97def5039d5ac5473e1f1e691e4d94cf0e9183708e066faf2537b72777940996b61854e815ebe3d32ca71fd
 DIST freetype-doc-2.8.1.tar.bz2 2128376 SHA256 e6251ab44adcb075c7ca4205163c43b6539cbe5265b8a24ec0afa07f8b9213f3 SHA512 386f3e2f123e60e697eb446d667bdcdf184d354a7a9a7bcc42767ea7964cd5a89e5ef42a234838c03e7ce926d3e92d763acb84983afdaf9f6977c028d55f2806 WHIRLPOOL 3197ea90412e32b5086b1f1d1ba80a069e73e021a1289423509ea36e0b13431be28af12666c619b498f5e50e07854e97cdf15383433a7ea0a1211470bca7dd1c
 DIST freetype-doc-2.8.tar.bz2 2127740 SHA256 427ba04d11f450df4bac4c95fec247be1b835ccdcf85d8b081f3f39d31811154 SHA512 3a970a7dd6f0ba580c9f8084b271c11e6e87111ab9a5b6a3148eb1087e45ee18e998aa7e36a4311067a3b674cb784b1e827cf8c3a853e380078219be3eccce06 WHIRLPOOL 21863e784f993e301dceffb5b5cd20c94abaeec3e936cdcb0c54fe4e65a7cdb4768d890d7b97891f75ec3f3db7d47d2db52eda68cf6f776028cffac7b2e30696
-DIST ft2demos-2.7.1.tar.bz2 222288 SHA256 d3f8a0d5a3f0d58701133458a8c1d3f97f658869f3c904b1fda447ed3b290ecd SHA512 d3c5d81f302629c50b82696db0a83f17e3940fe38ecfddf5c56f63ff3f136f248b0458fe75337823cc080852f48a7326f4e5599240042ba1cb8984e05edd9823 WHIRLPOOL b1f8a1171fafa3147a3cd4c6dcc3237fe5b03240923e99acbd0f38da4129be443eb81178bb4df907bdcf3acf37248e59e012291b6a2ba66dc1d8a9e77a038f96
 DIST ft2demos-2.8.1.tar.bz2 228934 SHA256 7e385c34fc91978e4db976cbb9e1cdc4d1ce611046f2a21ceb0737e9a60cefd9 SHA512 f3a3216448df7b9bebb875a69587f31d0548f4b7e1b1bd70b0f06b3c4a43b3f5ca99ac2fcfecb32909b16b32a466fff24d1a6407e5fd6c2145fd64d2a156429a WHIRLPOOL adc29f9e0dce4e897f450b06800dd6a36ba1a64a53972bb15d5bb10e4551334b0267006b257cbde909462c8c00444e8a8e7335e95092add1c90f786fd1b1baf7
 DIST ft2demos-2.8.tar.bz2 225274 SHA256 2b6ce0d36bcb43fcc8aac07a0287982d855571ee271c3803c768e501f9c1a233 SHA512 dffdf6a493e8145c6513be34b57734a9a99c61f758a0e1ea691ef4284cee4c274ad7c3a8120a8ec425d86e33a70cd879d9db258e9c67b6a4db79c3243d4c9fb3 WHIRLPOOL 90f7d197912e968fe0443f67ae208ed4705b217e8d952c5063f476a30c3b585c6e6b55d01b174545b6972236e8f774d5674e2cad5d89c6e88b1c492be43512a4

diff --git a/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch b/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch
deleted file mode 100644
index 99c27a7a02f..00000000000
--- a/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From a660e3de422731b94d4a134d27555430cbb6fb39 Mon Sep 17 00:00:00 2001
-From: Werner Lemberg <wl@gnu.org>
-Date: Fri, 26 Aug 2016 00:23:27 +0200
-Subject: [PATCH] [type1] Fix heap buffer overflow.
-
-Reported as
-
-  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36
-
-* src/type1/t1load.c (parse_charstrings): Reject fonts that don't
-contain glyph names.
----
-diff --git a/src/type1/t1load.c b/src/type1/t1load.c
-index c981adcf..f8bf3132 100644
---- a/src/type1/t1load.c
-+++ b/src/type1/t1load.c
-@@ -1776,6 +1776,12 @@
-       }
-     }
- 
-+    if ( !n )
-+    {
-+      error = FT_THROW( Invalid_File_Format );
-+      goto Fail;
-+    }
-+
-     loader->num_glyphs = n;
- 
-     /* if /.notdef is found but does not occupy index 0, do our magic. */
--- 
-2.12.0

diff --git a/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch b/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch
deleted file mode 100644
index 5b891218132..00000000000
--- a/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch
+++ /dev/null
@@ -1,711 +0,0 @@
-From f837a50ec3a4f240d73f018f237f9f58631e2ba5 Mon Sep 17 00:00:00 2001
-From: Werner Lemberg <wl@gnu.org>
-Date: Mon, 9 Jan 2017 10:49:03 +0100
-Subject: [pcf] Introduce a driver structure.
-
-To be filled later on with something useful.
-
-* src/pcf/pcf.h (PCF_Driver): New structure.
-
-* src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy
-functions.
-(pcf_driver_class): Updated.
----
- src/pcf/pcf.h      |  7 +++++++
- src/pcf/pcfdrivr.c | 24 ++++++++++++++++++++----
- 3 files changed, 39 insertions(+), 4 deletions(-)
-
-diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h
-index c726e5e..830cabe 100644
---- a/src/pcf/pcf.h
-+++ b/src/pcf/pcf.h
-@@ -163,6 +163,13 @@ FT_BEGIN_HEADER
-   } PCF_FaceRec, *PCF_Face;
- 
- 
-+  typedef struct  PCF_DriverRec_
-+  {
-+    FT_DriverRec  root;
-+
-+  } PCF_DriverRec, *PCF_Driver;
-+
-+
-   /* macros for pcf font format */
- 
- #define LSBFirst  0
-diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
-index 10d5c20..8f4a90d 100644
---- a/src/pcf/pcfdrivr.c
-+++ b/src/pcf/pcfdrivr.c
-@@ -691,22 +691,38 @@ THE SOFTWARE.
-   }
- 
- 
-+  FT_CALLBACK_DEF( FT_Error )
-+  pcf_driver_init( FT_Module  module )      /* PCF_Driver */
-+  {
-+    FT_UNUSED( module );
-+
-+    return FT_Err_Ok;
-+  }
-+
-+
-+  FT_CALLBACK_DEF( void )
-+  pcf_driver_done( FT_Module  module )      /* PCF_Driver */
-+  {
-+    FT_UNUSED( module );
-+  }
-+
-+
-   FT_CALLBACK_TABLE_DEF
-   const FT_Driver_ClassRec  pcf_driver_class =
-   {
-     {
-       FT_MODULE_FONT_DRIVER        |
-       FT_MODULE_DRIVER_NO_OUTLINES,
--      sizeof ( FT_DriverRec ),
- 
-+      sizeof ( PCF_DriverRec ),
-       "pcf",
-       0x10000L,
-       0x20000L,
- 
--      NULL,    /* module-specific interface */
-+      NULL,   /* module-specific interface */
- 
--      NULL,                     /* FT_Module_Constructor  module_init   */
--      NULL,                     /* FT_Module_Destructor   module_done   */
-+      pcf_driver_init,          /* FT_Module_Constructor  module_init   */
-+      pcf_driver_done,          /* FT_Module_Destructor   module_done   */
-       pcf_driver_requester      /* FT_Module_Requester    get_interface */
-     },
- 
--- 
-cgit v1.0
-
-From 08fd250e1af0aa16d18012d39462e6ca9bbc6e90 Mon Sep 17 00:00:00 2001
-From: Werner Lemberg <wl@gnu.org>
-Date: Mon, 9 Jan 2017 11:30:32 +0100
-Subject: [pcf] Make long family names configurable.
-
-The change from 2016-09-29 was too radical (except for people using
-the openSuSE GNU/Linux distribution).  To ameliorate the situation,
-PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls
-the feature; if set, a new PCF property option
-`no-long-family-names' can be used to switch this feature off.
-
-* include/freetype/config/ftoption.h, devel/ftoption.h
-(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option.
-
-* include/freetype/ftpcfdrv.h: New header file (only containing
-comments currently, used for building the documentation).
-
-* include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro.
-
-* src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field.
-
-* src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and
-FT_PCF_DRIVER_H.
-(pcf_property_set, pcf_property_get): New functions.
-(pcf_service_properties): New service.
-(pcf_servives): Updated.
-(pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle
-`no_long_family_names'.
-
-* src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names'
-and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
-
-* docs/CHANGES: Updated.
----
- devel/ftoption.h                   |  31 +++++++++-
- docs/CHANGES                       |  16 ++++++
- include/freetype/config/ftheader.h |  13 +++++
- include/freetype/config/ftoption.h |  31 +++++++++-
- include/freetype/ftchapters.h      |   1 +
- include/freetype/ftpcfdrv.h        | 105 ++++++++++++++++++++++++++++++++++
- src/pcf/pcf.h                      |   2 +
- src/pcf/pcfdrivr.c                 | 114 +++++++++++++++++++++++++++++++++++++
- src/pcf/pcfread.c                  |  98 ++++++++++++++++++-------------
- 10 files changed, 400 insertions(+), 44 deletions(-)
- create mode 100644 include/freetype/ftpcfdrv.h
-
-diff --git a/devel/ftoption.h b/devel/ftoption.h
-index 3b63931..b8b0a8d 100644
---- a/devel/ftoption.h
-+++ b/devel/ftoption.h
-@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
-   /* to control the various font drivers and modules.  The controllable    */
-   /* properties are listed in the section `Controlling FreeType Modules'   */
-   /* in the reference's table of contents; currently there are properties  */
--  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and  */
--  /* TrueType (file `ftttdrv.h').                                          */
-+  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
-+  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
-   /*                                                                       */
-   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
-   /* multiple lines for better readability).                               */
-@@ -835,6 +835,33 @@ FT_BEGIN_HEADER
-   /*************************************************************************/
-   /*************************************************************************/
-   /****                                                                 ****/
-+  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/
-+  /****                                                                 ****/
-+  /*************************************************************************/
-+  /*************************************************************************/
-+
-+
-+  /*************************************************************************/
-+  /*                                                                       */
-+  /* There are many PCF fonts just called `Fixed' which look completely    */
-+  /* different, and which have nothing to do with each other.  When        */
-+  /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
-+  /* random, the style changes often if one changes the size and one       */
-+  /* cannot select some fonts at all.  This option makes the PCF module    */
-+  /* prepend the foundry name (plus a space) to the family name.           */
-+  /*                                                                       */
-+  /* We also check whether we have `wide' characters; all put together, we */
-+  /* get family names like `Sony Fixed' or `Misc Fixed Wide'.              */
-+  /*                                                                       */
-+  /* If this option is activated, it can be controlled with the            */
-+  /* `no-long-family-names' property of the pcf driver module.             */
-+  /*                                                                       */
-+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+
-+
-+  /*************************************************************************/
-+  /*************************************************************************/
-+  /****                                                                 ****/
-   /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
-   /****                                                                 ****/
-   /*************************************************************************/
-diff --git a/docs/CHANGES b/docs/CHANGES
-index cb3b327..3823395 100644
---- a/docs/CHANGES
-+++ b/docs/CHANGES
-@@ -1,4 +1,20 @@
- 
-+CHANGES BETWEEN 2.7.1 and 2.7.2
-+
-+  I. IMPORTANT CHANGES
-+
-+    - The PCF change to show more `colourful' family names (introduced
-+      in version 2.7.1) was too radical; it can now be configured with
-+      PCF_CONFIG_OPTION_LONG_FAMILY_NAMES   at   compile   time.    If
-+      activated, it can  be switched off at run time  with the new pcf
-+      property  `no-long-family-names'.  If  the `FREETYPE_PROPERTIES'
-+      environment variable is available, you can say
-+
-+        FREETYPE_PROPERTIES=pcf:no-long-family-names=1
-+
-+
-+======================================================================
-+
- CHANGES BETWEEN 2.7 and 2.7.1
- 
-   I. IMPORTANT CHANGES
-diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
-index 950d36c..d491af5 100644
---- a/include/freetype/config/ftheader.h
-+++ b/include/freetype/config/ftheader.h
-@@ -357,6 +357,19 @@
-   /*************************************************************************
-    *
-    * @macro:
-+   *   FT_PCF_DRIVER_H
-+   *
-+   * @description:
-+   *   A macro used in #include statements to name the file containing
-+   *   structures and macros related to the PCF driver module.
-+   *
-+   */
-+#define FT_PCF_DRIVER_H  <freetype/ftpcfdrv.h>
-+
-+
-+  /*************************************************************************
-+   *
-+   * @macro:
-    *   FT_TYPE1_TABLES_H
-    *
-    * @description:
-diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
-index f5bc540..5676074 100644
---- a/include/freetype/config/ftoption.h
-+++ b/include/freetype/config/ftoption.h
-@@ -82,8 +82,8 @@ FT_BEGIN_HEADER
-   /* to control the various font drivers and modules.  The controllable    */
-   /* properties are listed in the section `Controlling FreeType Modules'   */
-   /* in the reference's table of contents; currently there are properties  */
--  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and  */
--  /* TrueType (file `ftttdrv.h').                                          */
-+  /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'),      */
-+  /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h').             */
-   /*                                                                       */
-   /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */
-   /* multiple lines for better readability).                               */
-@@ -835,6 +835,33 @@ FT_BEGIN_HEADER
-   /*************************************************************************/
-   /*************************************************************************/
-   /****                                                                 ****/
-+  /****         P C F   D R I V E R    C O N F I G U R A T I O N        ****/
-+  /****                                                                 ****/
-+  /*************************************************************************/
-+  /*************************************************************************/
-+
-+
-+  /*************************************************************************/
-+  /*                                                                       */
-+  /* There are many PCF fonts just called `Fixed' which look completely    */
-+  /* different, and which have nothing to do with each other.  When        */
-+  /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */
-+  /* random, the style changes often if one changes the size and one       */
-+  /* cannot select some fonts at all.  This option makes the PCF module    */
-+  /* prepend the foundry name (plus a space) to the family name.           */
-+  /*                                                                       */
-+  /* We also check whether we have `wide' characters; all put together, we */
-+  /* get family names like `Sony Fixed' or `Misc Fixed Wide'.              */
-+  /*                                                                       */
-+  /* If this option is activated, it can be controlled with the            */
-+  /* `no-long-family-names' property of the pcf driver module.             */
-+  /*                                                                       */
-+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+
-+
-+  /*************************************************************************/
-+  /*************************************************************************/
-+  /****                                                                 ****/
-   /****    A U T O F I T   M O D U L E    C O N F I G U R A T I O N     ****/
-   /****                                                                 ****/
-   /*************************************************************************/
-diff --git a/include/freetype/ftchapters.h b/include/freetype/ftchapters.h
-index ab43895..a0a121b 100644
---- a/include/freetype/ftchapters.h
-+++ b/include/freetype/ftchapters.h
-@@ -77,6 +77,7 @@
- /*    auto_hinter                                                          */
- /*    cff_driver                                                           */
- /*    tt_driver                                                            */
-+/*    pcf_driver                                                           */
- /*                                                                         */
- /***************************************************************************/
- 
-diff --git a/include/freetype/ftpcfdrv.h b/include/freetype/ftpcfdrv.h
-new file mode 100644
-index 0000000..6622c93
---- /dev/null
-+++ b/include/freetype/ftpcfdrv.h
-@@ -0,0 +1,105 @@
-+/***************************************************************************/
-+/*                                                                         */
-+/*  ftpcfdrv.h                                                             */
-+/*                                                                         */
-+/*    FreeType API for controlling the PCF driver (specification only).    */
-+/*                                                                         */
-+/*  Copyright 2017 by                                                      */
-+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-+/*                                                                         */
-+/*  This file is part of the FreeType project, and may only be used,       */
-+/*  modified, and distributed under the terms of the FreeType project      */
-+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-+/*  this file you indicate that you have read the license and              */
-+/*  understand and accept it fully.                                        */
-+/*                                                                         */
-+/***************************************************************************/
-+
-+
-+#ifndef FTPCFDRV_H_
-+#define FTPCFDRV_H_
-+
-+#include <ft2build.h>
-+#include FT_FREETYPE_H
-+
-+#ifdef FREETYPE_H
-+#error "freetype.h of FreeType 1 has been loaded!"
-+#error "Please fix the directory search order for header files"
-+#error "so that freetype.h of FreeType 2 is found first."
-+#endif
-+
-+
-+FT_BEGIN_HEADER
-+
-+
-+  /**************************************************************************
-+   *
-+   * @section:
-+   *   pcf_driver
-+   *
-+   * @title:
-+   *   The PCF driver
-+   *
-+   * @abstract:
-+   *   Controlling the PCF driver module.
-+   *
-+   * @description:
-+   *   While FreeType's PCF driver doesn't expose API functions by itself,
-+   *   it is possible to control its behaviour with @FT_Property_Set and
-+   *   @FT_Property_Get.  Right now, there is a single property
-+   *   `no-long-family-names' available if FreeType is compiled with
-+   *   PCF_CONFIG_OPTION_LONG_FAMILY_NAMES.
-+   *
-+   *   The PCF driver's module name is `pcf'.
-+   *
-+   */
-+
-+
-+  /**************************************************************************
-+   *
-+   * @property:
-+   *   no-long-family-names
-+   *
-+   * @description:
-+   *   If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling
-+   *   FreeType, the PCF driver constructs long family names.
-+   *
-+   *   There are many PCF fonts just called `Fixed' which look completely
-+   *   different, and which have nothing to do with each other.  When
-+   *   selecting `Fixed' in KDE or Gnome one gets results that appear rather
-+   *   random, the style changes often if one changes the size and one
-+   *   cannot select some fonts at all.  The improve this situation, the PCF
-+   *   module prepends the foundry name (plus a space) to the family name. 
-+   *   It also checks whether there are `wide' characters; all put together,
-+   *   family names like `Sony Fixed' or `Misc Fixed Wide' are constructed.
-+   *
-+   *   If `no-long-family-names' is set, this feature gets switched off.
-+   *
-+   *   {
-+   *     FT_Library  library;
-+   *     FT_Bool     no_long_family_names = TRUE;
-+   *
-+   *
-+   *     FT_Init_FreeType( &library );
-+   *
-+   *     FT_Property_Set( library, "pcf",
-+   *                               "no-long-family-names",
-+   *                               &no_long_family_names );
-+   *   }
-+   *
-+   * @note:
-+   *   This property can be used with @FT_Property_Get also.
-+   *
-+   *   This property can be set via the `FREETYPE_PROPERTIES' environment
-+   *   variable (using values 1 and 0 for `on' and `off', respectively).
-+   *
-+   */
-+
-+
-+FT_END_HEADER
-+
-+
-+#endif /* FTPCFDRV_H_ */
-+
-+
-+/* END */
-diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h
-index 830cabe..f0390cb 100644
---- a/src/pcf/pcf.h
-+++ b/src/pcf/pcf.h
-@@ -167,6 +167,8 @@ FT_BEGIN_HEADER
-   {
-     FT_DriverRec  root;
- 
-+    FT_Bool  no_long_family_names;
-+
-   } PCF_DriverRec, *PCF_Driver;
- 
- 
-diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
-index 8f4a90d..bc65423 100644
---- a/src/pcf/pcfdrivr.c
-+++ b/src/pcf/pcfdrivr.c
-@@ -49,6 +49,8 @@ THE SOFTWARE.
- 
- #include FT_SERVICE_BDF_H
- #include FT_SERVICE_FONT_FORMAT_H
-+#include FT_SERVICE_PROPERTIES_H
-+#include FT_PCF_DRIVER_H
- 
- 
-   /*************************************************************************/
-@@ -667,6 +669,110 @@ THE SOFTWARE.
-   };
- 
- 
-+  /*
-+   *  PROPERTY SERVICE
-+   *
-+   */
-+  static FT_Error
-+  pcf_property_set( FT_Module    module,         /* PCF_Driver */
-+                    const char*  property_name,
-+                    const void*  value,
-+                    FT_Bool      value_is_string )
-+  {
-+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+
-+    FT_Error    error  = FT_Err_Ok;
-+    PCF_Driver  driver = (PCF_Driver)module;
-+
-+#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
-+    FT_UNUSED( value_is_string );
-+#endif
-+
-+
-+    if ( !ft_strcmp( property_name, "no-long-family-names" ) )
-+    {
-+#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES
-+      if ( value_is_string )
-+      {
-+        const char*  s   = (const char*)value;
-+        long         lfn = ft_strtol( s, NULL, 10 );
-+
-+
-+        if ( lfn == 0 )
-+          driver->no_long_family_names = 0;
-+        else if ( lfn == 1 )
-+          driver->no_long_family_names = 1;
-+        else
-+          return FT_THROW( Invalid_Argument );
-+      }
-+      else
-+#endif
-+      {
-+        FT_Bool*  no_long_family_names = (FT_Bool*)value;
-+
-+
-+        driver->no_long_family_names = *no_long_family_names;
-+      }
-+
-+      return error;
-+    }
-+
-+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
-+
-+    FT_UNUSED( module );
-+    FT_UNUSED( value );
-+    FT_UNUSED( value_is_string );
-+
-+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
-+
-+    FT_TRACE0(( "pcf_property_set: missing property `%s'\n",
-+                property_name ));
-+    return FT_THROW( Missing_Property );
-+  }
-+
-+
-+  static FT_Error
-+  pcf_property_get( FT_Module    module,         /* PCF_Driver */
-+                    const char*  property_name,
-+                    const void*  value )
-+  {
-+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+
-+    FT_Error    error  = FT_Err_Ok;
-+    PCF_Driver  driver = (PCF_Driver)module;
-+
-+
-+    if ( !ft_strcmp( property_name, "no-long-family-names" ) )
-+    {
-+      FT_Bool   no_long_family_names = driver->no_long_family_names;
-+      FT_Bool*  val                  = (FT_Bool*)value;
-+
-+
-+      *val = no_long_family_names;
-+
-+      return error;
-+    }
-+
-+#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
-+
-+    FT_UNUSED( module );
-+    FT_UNUSED( value );
-+
-+#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
-+
-+    FT_TRACE0(( "pcf_property_get: missing property `%s'\n",
-+                property_name ));
-+    return FT_THROW( Missing_Property );
-+  }
-+
-+
-+  FT_DEFINE_SERVICE_PROPERTIESREC(
-+    pcf_service_properties,
-+
-+    (FT_Properties_SetFunc)pcf_property_set,      /* set_property */
-+    (FT_Properties_GetFunc)pcf_property_get )     /* get_property */
-+
-+
-  /*
-   *
-   *  SERVICE LIST
-@@ -677,6 +783,7 @@ THE SOFTWARE.
-   {
-     { FT_SERVICE_ID_BDF,         &pcf_service_bdf },
-     { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF },
-+    { FT_SERVICE_ID_PROPERTIES,  &pcf_service_properties },
-     { NULL, NULL }
-   };
- 
-@@ -694,7 +801,14 @@ THE SOFTWARE.
-   FT_CALLBACK_DEF( FT_Error )
-   pcf_driver_init( FT_Module  module )      /* PCF_Driver */
-   {
-+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+    PCF_Driver  driver = (PCF_Driver)module;
-+
-+
-+    driver->no_long_family_names = 0;
-+#else
-     FT_UNUSED( module );
-+#endif
- 
-     return FT_Err_Ok;
-   }
-diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
-index 38ba110..3eacf2b 100644
---- a/src/pcf/pcfread.c
-+++ b/src/pcf/pcfread.c
-@@ -1393,57 +1393,75 @@ THE SOFTWARE.
-       prop = pcf_find_property( face, "FAMILY_NAME" );
-       if ( prop && prop->isString )
-       {
--        /* Prepend the foundry name plus a space to the family name.      */
--        /* There are many fonts just called `Fixed' which look completely */
--        /* different, and which have nothing to do with each other.  When */
--        /* selecting `Fixed' in KDE or Gnome one gets results that appear */
--        /* rather random, the style changes often if one changes the size */
--        /* and one cannot select some fonts at all.                       */
--        /*                                                                */
--        /* We also check whether we have `wide' characters; all put       */
--        /* together, we get family names like `Sony Fixed' or `Misc Fixed */
--        /* Wide'.                                                         */
--        PCF_Property  foundry_prop, point_size_prop, average_width_prop;
--
--        int  l    = ft_strlen( prop->value.atom ) + 1;
--        int  wide = 0;
--
--
--        foundry_prop       = pcf_find_property( face, "FOUNDRY" );
--        point_size_prop    = pcf_find_property( face, "POINT_SIZE" );
--        average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
--
--        if ( point_size_prop && average_width_prop )
-+
-+#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+
-+        PCF_Driver  driver = (PCF_Driver)FT_FACE_DRIVER( face );
-+
-+
-+        if ( !driver->no_long_family_names )
-         {
--          if ( average_width_prop->value.l >= point_size_prop->value.l )
-+          /* Prepend the foundry name plus a space to the family name.     */
-+          /* There are many fonts just called `Fixed' which look           */
-+          /* completely different, and which have nothing to do with each  */
-+          /* other.  When selecting `Fixed' in KDE or Gnome one gets       */
-+          /* results that appear rather random, the style changes often if */
-+          /* one changes the size and one cannot select some fonts at all. */
-+          /*                                                               */
-+          /* We also check whether we have `wide' characters; all put      */
-+          /* together, we get family names like `Sony Fixed' or `Misc      */
-+          /* Fixed Wide'.                                                  */
-+
-+          PCF_Property  foundry_prop, point_size_prop, average_width_prop;
-+
-+          int  l    = ft_strlen( prop->value.atom ) + 1;
-+          int  wide = 0;
-+
-+
-+          foundry_prop       = pcf_find_property( face, "FOUNDRY" );
-+          point_size_prop    = pcf_find_property( face, "POINT_SIZE" );
-+          average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" );
-+
-+          if ( point_size_prop && average_width_prop )
-           {
--            /* This font is at least square shaped or even wider */
--            wide = 1;
--            l   += ft_strlen( " Wide" );
-+            if ( average_width_prop->value.l >= point_size_prop->value.l )
-+            {
-+              /* This font is at least square shaped or even wider */
-+              wide = 1;
-+              l   += ft_strlen( " Wide" );
-+            }
-           }
--        }
- 
--        if ( foundry_prop && foundry_prop->isString )
--        {
--          l += ft_strlen( foundry_prop->value.atom ) + 1;
-+          if ( foundry_prop && foundry_prop->isString )
-+          {
-+            l += ft_strlen( foundry_prop->value.atom ) + 1;
- 
--          if ( FT_NEW_ARRAY( root->family_name, l ) )
--            goto Exit;
-+            if ( FT_NEW_ARRAY( root->family_name, l ) )
-+              goto Exit;
-+
-+            ft_strcpy( root->family_name, foundry_prop->value.atom );
-+            ft_strcat( root->family_name, " " );
-+            ft_strcat( root->family_name, prop->value.atom );
-+          }
-+          else
-+          {
-+            if ( FT_NEW_ARRAY( root->family_name, l ) )
-+              goto Exit;
- 
--          ft_strcpy( root->family_name, foundry_prop->value.atom );
--          ft_strcat( root->family_name, " " );
--          ft_strcat( root->family_name, prop->value.atom );
-+            ft_strcpy( root->family_name, prop->value.atom );
-+          }
-+
-+          if ( wide )
-+            ft_strcat( root->family_name, " Wide" );
-         }
-         else
-+
-+#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
-+
-         {
--          if ( FT_NEW_ARRAY( root->family_name, l ) )
-+          if ( FT_STRDUP( root->family_name, prop->value.atom ) )
-             goto Exit;
--
--          ft_strcpy( root->family_name, prop->value.atom );
-         }
--
--        if ( wide )
--          ft_strcat( root->family_name, " Wide" );
-       }
-       else
-         root->family_name = NULL;
--- 
-cgit v1.0
-
-From 7ccca6aec167c2c30c569765ece808f0eee023a6 Mon Sep 17 00:00:00 2001
-From: Werner Lemberg <wl@gnu.org>
-Date: Mon, 9 Jan 2017 19:54:44 +0100
-Subject: [pcf] Disable long family names by default.
-
-* include/freetype/config/ftoption.h
-(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out.
----
- include/freetype/config/ftoption.h | 2 +-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
-index 5676074..37a0d00 100644
---- a/include/freetype/config/ftoption.h
-+++ b/include/freetype/config/ftoption.h
-@@ -856,7 +856,7 @@ FT_BEGIN_HEADER
-   /* If this option is activated, it can be controlled with the            */
-   /* `no-long-family-names' property of the pcf driver module.             */
-   /*                                                                       */
--#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
-+/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
- 
- 
-   /*************************************************************************/
--- 
-cgit v1.0
-

diff --git a/media-libs/freetype/freetype-2.7.1-r2.ebuild b/media-libs/freetype/freetype-2.7.1-r2.ebuild
deleted file mode 100644
index 5afefe4915d..00000000000
--- a/media-libs/freetype/freetype-2.7.1-r2.ebuild
+++ /dev/null
@@ -1,179 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs
-
-INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch"
-
-DESCRIPTION="A high-quality and portable font engine"
-HOMEPAGE="http://www.freetype.org/"
-SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2
-	mirror://nongnu/freetype/${P/_/}.tar.bz2
-	utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2
-		mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 )
-	doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2
-		mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )"
-
-LICENSE="|| ( FTL GPL-2+ )"
-SLOT="2"
-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="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz
-	infinality png static-libs utils"
-RESTRICT="!bindist? ( bindist )" # bug 541408
-
-CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
-	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
-	harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] )
-	png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] )
-	utils? (
-		X? (
-			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
-			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
-			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
-		)
-	)"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig"
-RDEPEND="${CDEPEND}
-	abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )"
-PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
-
-PATCHES=(
-	# This is the same as the 01 patch from infinality
-	"${FILESDIR}"/${PN}-2.7-enable-valid.patch
-
-	"${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966
-
-	# patches from upstream (can be removed with the next version bump)
-	"${FILESDIR}"/${P}-pcf_fix.patch #606688
-	"${FILESDIR}"/${P}-glyph_name.patch #612192
-)
-
-src_prepare() {
-	enable_option() {
-		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to enable option $1"
-	}
-
-	disable_option() {
-		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
-			include/${PN}/config/ftoption.h \
-			|| die "unable to disable option $1"
-	}
-
-	default
-
-	# Will be the new default for >=freetype-2.7.0
-	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
-
-	if use infinality && use cleartype_hinting; then
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
-	elif use infinality; then
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
-	elif use cleartype_hinting; then
-		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
-	fi
-
-	if ! use bindist; then
-		# See http://freetype.org/patents.html
-		# ClearType is covered by several Microsoft patents in the US
-		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-	fi
-
-	if ! use adobe-cff; then
-		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
-	fi
-
-	if use debug; then
-		enable_option FT_DEBUG_LEVEL_TRACE
-		enable_option FT_DEBUG_MEMORY
-	fi
-
-	if use utils; then
-		cd "${WORKDIR}/ft2demos-${PV}" || die
-		# Disable tests needing X11 when USE="-X". (bug #177597)
-		if ! use X; then
-			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
-		fi
-		cd "${S}" || die
-	fi
-
-	# we need non-/bin/sh to run configure
-	if [[ -n ${CONFIG_SHELL} ]] ; then
-		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \
-			"${S}"/builds/unix/configure || die
-	fi
-
-	elibtoolize --patch-only
-}
-
-multilib_src_configure() {
-	append-flags -fno-strict-aliasing
-	type -P gmake &> /dev/null && export GNUMAKE=gmake
-
-	local myeconfargs=(
-		--enable-biarch-config
-		--enable-shared
-		$(use_with bzip2)
-		$(use_with harfbuzz)
-		$(use_with png)
-		$(use_enable static-libs static)
-
-		# avoid using libpng-config
-		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
-		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
-	)
-
-	ECONF_SOURCE="${S}" \
-		econf "${myeconfargs[@]}"
-}
-
-multilib_src_compile() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Building utils"
-		# fix for Prefix, bug #339334
-		emake \
-			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
-			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
-	fi
-}
-
-multilib_src_install() {
-	default
-
-	if multilib_is_native_abi && use utils; then
-		einfo "Installing utils"
-		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
-		local ft2demo
-		for ft2demo in ../ft2demos-${PV}/bin/*; do
-			./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \
-				"${ED}"/usr/bin || die
-		done
-	fi
-}
-
-multilib_src_install_all() {
-	if use fontforge; then
-		# Probably fontforge needs less but this way makes things simplier...
-		einfo "Installing internal headers required for fontforge"
-		local header
-		find src/truetype include/freetype/internal -name '*.h' | \
-		while read header; do
-			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
-		done
-	fi
-
-	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
-	if use doc ; then
-		docinto html
-		dodoc -r docs/*
-	fi
-
-	prune_libtool_files --all
-}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2020-10-20  1:37 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2020-10-20  1:37 UTC (permalink / raw
  To: gentoo-commits

commit:     220bae77e549123e9a257f40ba3db9e0f6ccabc0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 20 01:36:42 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 20 01:37:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=220bae77

media-libs/freetype: security bump for CVE-2020-15999

This vulnerability is being exploited in the wild;
this fix is identical to that being used in Chromium
as a band-aid for now (also in upstream git).

See upstream bug for more information.

Bug: https://bugs.gentoo.org/750275
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/freetype-2.10.3-CVE-2020-15999.patch     |  51 +++++
 media-libs/freetype/freetype-2.10.3-r1.ebuild      | 243 +++++++++++++++++++++
 2 files changed, 294 insertions(+)

diff --git a/media-libs/freetype/files/freetype-2.10.3-CVE-2020-15999.patch b/media-libs/freetype/files/freetype-2.10.3-CVE-2020-15999.patch
new file mode 100644
index 00000000000..215b03b2d3d
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.10.3-CVE-2020-15999.patch
@@ -0,0 +1,51 @@
+http://git.savannah.nongnu.org/cgit/freetype/freetype2.git/commit/?id=a3bab162b2ae616074c8877a04556932998aeacd
+https://bugs.gentoo.org/750275
+----
+From a3bab162b2ae616074c8877a04556932998aeacd Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Mon, 19 Oct 2020 23:45:28 +0200
+Subject: [sfnt] Fix heap buffer overflow (#59308).
+
+This is CVE-2020-15999.
+
+* src/sfnt/pngshim.c (Load_SBit_Png): Test bitmap size earlier.
+---
+ ChangeLog          |  8 ++++++++
+ src/sfnt/pngshim.c | 14 +++++++-------
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/src/sfnt/pngshim.c b/src/sfnt/pngshim.c
+index 2e64e5846..f55016122 100644
+--- a/src/sfnt/pngshim.c
++++ b/src/sfnt/pngshim.c
+@@ -332,6 +332,13 @@
+ 
+     if ( populate_map_and_metrics )
+     {
++      /* reject too large bitmaps similarly to the rasterizer */
++      if ( imgHeight > 0x7FFF || imgWidth > 0x7FFF )
++      {
++        error = FT_THROW( Array_Too_Large );
++        goto DestroyExit;
++      }
++
+       metrics->width  = (FT_UShort)imgWidth;
+       metrics->height = (FT_UShort)imgHeight;
+ 
+@@ -340,13 +347,6 @@
+       map->pixel_mode = FT_PIXEL_MODE_BGRA;
+       map->pitch      = (int)( map->width * 4 );
+       map->num_grays  = 256;
+-
+-      /* reject too large bitmaps similarly to the rasterizer */
+-      if ( map->rows > 0x7FFF || map->width > 0x7FFF )
+-      {
+-        error = FT_THROW( Array_Too_Large );
+-        goto DestroyExit;
+-      }
+     }
+ 
+     /* convert palette/gray image to rgb */
+-- 
+cgit v1.2.1
+

diff --git a/media-libs/freetype/freetype-2.10.3-r1.ebuild b/media-libs/freetype/freetype-2.10.3-r1.ebuild
new file mode 100644
index 00000000000..1f0bb65321a
--- /dev/null
+++ b/media-libs/freetype/freetype-2.10.3-r1.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
+
+DESCRIPTION="A high-quality and portable font engine"
+HOMEPAGE="https://www.freetype.org/"
+IUSE="X +adobe-cff bindist brotli bzip2 +cleartype_hinting debug fontforge harfbuzz infinality png static-libs utils"
+
+if [[ "${PV}" != 9999 ]] ; then
+	SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
+		mirror://nongnu/freetype/${P/_/}.tar.xz
+		utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
+			mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
+		doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
+			mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+	IUSE+=" doc"
+else
+	inherit autotools git-r3
+fi
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+RESTRICT="!bindist? ( bindist )" # bug 541408
+
+RDEPEND="
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
+	utils? (
+		X? (
+			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+		)
+	)"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+"
+PDEPEND="infinality? ( media-libs/fontconfig-infinality )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.10.3-sizeof-types.patch # 459966
+	"${FILESDIR}"/${PN}-2.10.3-CVE-2020-15999.patch # 750275
+)
+
+_egit_repo_handler() {
+	if [[ "${PV}" == 9999 ]] ; then
+		local phase="${1}"
+		case ${phase} in
+			fetch|unpack)
+				:;
+			;;
+			*)
+				die "Please use this function with either \"fetch\" or \"unpack\""
+			;;
+		esac
+
+		local EGIT_REPO_URI
+		EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2.git"
+		git-r3_src_${phase}
+		if use utils ; then
+			EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2-demos.git"
+			local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
+			git-r3_src_${phase}
+		fi
+	else
+		default
+	fi
+}
+
+src_fetch() {
+	_egit_repo_handler ${EBUILD_PHASE}
+}
+
+src_unpack() {
+	_egit_repo_handler ${EBUILD_PHASE}
+}
+
+src_prepare() {
+	if [[ "${PV}" == 9999 ]] ; then
+		# inspired by shipped autogen.sh script
+		eval $(sed -nf version.sed include/freetype/freetype.h)
+		pushd builds/unix &>/dev/null || die
+		sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
+			< configure.raw > configure.ac || die
+		# eautoheader produces broken ftconfig.in
+		eautoheader() { return 0 ; }
+		AT_M4DIR="." eautoreconf
+		unset freetype_major freetype_minor freetype_patch
+		popd &>/dev/null || die
+	fi
+
+	default
+
+	# This is the same as the 01 patch from infinality
+	sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
+
+	enable_option() {
+		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to enable option $1"
+	}
+
+	disable_option() {
+		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to disable option $1"
+	}
+
+	# Will be the new default for >=freetype-2.7.0
+	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+
+	if use infinality && use cleartype_hinting; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
+	elif use infinality; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
+	elif use cleartype_hinting; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+	fi
+
+	# Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
+	# via environment (new since v2.8)
+	enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+	if ! use bindist; then
+		# See http://freetype.org/patents.html
+		# ClearType is covered by several Microsoft patents in the US
+		enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+	fi
+
+	if ! use adobe-cff; then
+		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+	fi
+
+	if use debug; then
+		enable_option FT_DEBUG_LEVEL_TRACE
+		enable_option FT_DEBUG_MEMORY
+	fi
+
+	if use utils; then
+		cd "${WORKDIR}/ft2demos-${PV}" || die
+		# Disable tests needing X11 when USE="-X". (bug #177597)
+		if ! use X; then
+			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+		fi
+		cd "${S}" || die
+	fi
+
+	# we need non-/bin/sh to run configure
+	if [[ -n ${CONFIG_SHELL} ]] ; then
+		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
+			"${S}"/builds/unix/configure || die
+	fi
+
+	elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+	append-flags -fno-strict-aliasing
+	type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+	local myeconfargs=(
+		--disable-freetype-config
+		--enable-biarch-config
+		--enable-shared
+		$(use_with brotli)
+		$(use_with bzip2)
+		$(use_with harfbuzz)
+		$(use_with png)
+		$(use_enable static-libs static)
+
+		# avoid using libpng-config
+		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+	)
+
+	case ${CHOST} in
+		mingw*|*-mingw*) ;;
+		# Workaround windows mis-detection: bug #654712
+		# Have to do it for both ${CHOST}-windres and windres
+		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
+	esac
+
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use utils; then
+		einfo "Building utils"
+		# fix for Prefix, bug #339334
+		emake \
+			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use utils; then
+		einfo "Installing utils"
+		rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die
+		dodir /usr/bin #654780
+		local ft2demo
+		for ft2demo in ../ft2demos-${PV}/bin/*; do
+			./libtool --mode=install $(type -P install) -m 755 "${ft2demo}" \
+				"${ED}"/usr/bin || die
+		done
+	fi
+}
+
+multilib_src_install_all() {
+	if use fontforge; then
+		# Probably fontforge needs less but this way makes things simplier...
+		einfo "Installing internal headers required for fontforge"
+		local header
+		find src/truetype include/freetype/internal -name '*.h' | \
+		while read header; do
+			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+		done
+	fi
+
+	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+	if [[ "${PV}" != 9999 ]] && use doc ; then
+		docinto html
+		dodoc -r docs/*
+	fi
+
+	find "${ED}" -name '*.la' -delete || die
+	if ! use static-libs ; then
+		find "${ED}" -name '*.a' -delete || die
+	fi
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2021-08-11 21:08 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2021-08-11 21:08 UTC (permalink / raw
  To: gentoo-commits

commit:     142cebeeb4c33f01dfc646ef4c2aaeacbe80a9b2
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 11 21:03:01 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Aug 11 21:08:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=142cebee

media-libs/freetype: Revbump with some feature backports

required for latest chromium. Committed without keywords for testing.

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-libs/freetype/Manifest                       |   1 +
 ...freetype-2.11.0-COLR_v1_clipbox_minor_fix.patch |  26 +++
 media-libs/freetype/freetype-2.11.0-r1.ebuild      | 249 +++++++++++++++++++++
 3 files changed, 276 insertions(+)

diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
index 383d9c255f0..a5b0d55df12 100644
--- a/media-libs/freetype/Manifest
+++ b/media-libs/freetype/Manifest
@@ -1,4 +1,5 @@
 DIST freetype-2.10.4.tar.xz 2416620 BLAKE2B 9852378536e873514baae3c024b9b30dcd78a36c2189dcbdb0562c56ccf871a5795896950ea129f2e0f12181095c92715216747e8a8396d6d03efac82a5a10ea SHA512 827cda734aa6b537a8bcb247549b72bc1e082a5b32ab8d3cccb7cc26d5f6ee087c19ce34544fa388a1eb4ecaf97600dbabc3e10e950f2ba692617fee7081518f
+DIST freetype-2.11.0-COLR_v1_clipbox.patch.xz 3940 BLAKE2B 45b84b1070a9a9e1e13058ce7200555f4f9e26df4fe25eab4a644869df86f267cc91bfcf2ab10a9f0673be51504f05eec730300dee13ca34bb6f8afdc32ee354 SHA512 bf0cc00b3f27cb3408881cec46654be57b96b099cfd3df06e33b94aa47f35a7c9499a9935837be0f652d4f17ab2b6c78bc1fcef328754cde64f0b139d00ceb29
 DIST freetype-2.11.0.tar.xz 2256640 BLAKE2B ed14b566b8ac31a85dde4c8d26dd8b001f6a2cb506cfafd550b31bb90a3f592376d6f9f6bbe1b6c21e27e4ad23d0eafa7ea886211174b978e101fb6a77261324 SHA512 bf1991f3c382832586be1d21ae73c20840ee8546807ba60d0eb0215134545656c0c8de488f27357d4a4f6497d7cb540998cda98ec59061a3e640036fb209147d
 DIST freetype-doc-2.10.4.tar.xz 2079084 BLAKE2B a051c425250f8af1cd0e83b15d6e5692b1ee5ff00317467cef648dcc7ea1f88ad6cde0fe2d53e5c45220723bb935e6527dbba124ef8739e6ebe372bc06ec78b7 SHA512 171da6c6a172869e9bec0da67cb1abdb0fdb124870f13b751b4e9b1b5e342fb2af38cb606db1c3dcf18076a077e694b7b8dd055dd7f4ab49afe7e1d61b4f9ba8
 DIST freetype-doc-2.11.0.tar.xz 2070604 BLAKE2B a45fa2e97574868fc4f08c646cb815152dde462538a32fddfc5ddccb32343286765f3952b9fc8b66204dfeb62470d4fada1a2338c377efa1c716ab9c5885fd60 SHA512 5bddaec4f237a9f6e63dbed5f65d0b5ffe0a414ea2d6e1c3bb1142baf5535cee7e7c282b6af8c630e772ffc196b8c4bf8e18bc21a72749a09b6af388287c7301

diff --git a/media-libs/freetype/files/freetype-2.11.0-COLR_v1_clipbox_minor_fix.patch b/media-libs/freetype/files/freetype-2.11.0-COLR_v1_clipbox_minor_fix.patch
new file mode 100644
index 00000000000..f602866f591
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.11.0-COLR_v1_clipbox_minor_fix.patch
@@ -0,0 +1,26 @@
+From fed5521016227bf8cc4475f66450a9963568d162 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Mon, 9 Aug 2021 19:27:34 +0200
+Subject: [PATCH] * src/sfnt/ttcolr.c (tt_face_get_color_glyph_clipbox): Minor
+ fix.
+
+---
+ src/sfnt/ttcolr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
+index 2f3e8846d..68807127f 100644
+--- a/src/sfnt/ttcolr.c
++++ b/src/sfnt/ttcolr.c
+@@ -863,7 +863,7 @@
+ 
+         format = FT_NEXT_BYTE( p1 );
+ 
+-        if ( format < 0 || format > 1 )
++        if ( format > 1 )
+           return 0;
+ 
+         /* `face->root.size->metrics.x_scale` and `y_scale` are factors   */
+-- 
+GitLab
+

diff --git a/media-libs/freetype/freetype-2.11.0-r1.ebuild b/media-libs/freetype/freetype-2.11.0-r1.ebuild
new file mode 100644
index 00000000000..818649d695a
--- /dev/null
+++ b/media-libs/freetype/freetype-2.11.0-r1.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
+
+DESCRIPTION="High-quality and portable font engine"
+HOMEPAGE="https://www.freetype.org/"
+IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs utils"
+
+if [[ "${PV}" != 9999 ]] ; then
+	SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
+		mirror://nongnu/freetype/${P/_/}.tar.xz
+		utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
+			mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
+		doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
+			mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
+	SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${P}-COLR_v1_clipbox.patch.xz"
+	#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+	IUSE+=" doc"
+else
+	inherit autotools git-r3
+fi
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+
+RDEPEND="
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
+	utils? (
+		X? (
+			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+		)
+	)"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.10.3-sizeof-types.patch # 459966
+	"${WORKDIR}"/${P}-COLR_v1_clipbox.patch
+	"${FILESDIR}"/${P}-COLR_v1_clipbox_minor_fix.patch
+)
+
+_egit_repo_handler() {
+	if [[ "${PV}" == 9999 ]] ; then
+		local phase="${1}"
+		case ${phase} in
+			fetch|unpack)
+				:;
+			;;
+			*)
+				die "Please use this function with either \"fetch\" or \"unpack\""
+			;;
+		esac
+
+		local EGIT_REPO_URI
+		EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2.git"
+		git-r3_src_${phase}
+		if use utils ; then
+			EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2-demos.git"
+			local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
+			git-r3_src_${phase}
+		fi
+	else
+		default
+	fi
+}
+
+src_fetch() {
+	_egit_repo_handler ${EBUILD_PHASE}
+}
+
+src_unpack() {
+	_egit_repo_handler ${EBUILD_PHASE}
+
+	if [[ "${PV}" == 9999 ]] ; then
+		# Need to copy stuff from dlg subproject (#758902)
+		local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
+		local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
+		local dlg_dest_dir="${S}/include"
+		mkdir -p "${dlg_dest_dir}/dlg" || die
+		cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die
+		cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die
+	fi
+}
+
+src_prepare() {
+	if [[ "${PV}" == 9999 ]] ; then
+		# Do NOT automagically mess with submodules!!!
+		sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
+		# inspired by shipped autogen.sh script
+		eval $(sed -n \
+			-e 's/^#define  *\(FREETYPE_MAJOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			-e 's/^#define  *\(FREETYPE_MINOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			-e 's/^#define  *\(FREETYPE_PATCH\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			include/freetype/freetype.h || die)
+		FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
+		[[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
+		pushd builds/unix &>/dev/null || die
+		sed -e "s;@VERSION@;${FREETYPE};" \
+			< configure.raw > configure.ac || die
+		# eautoheader produces broken ftconfig.in
+		AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
+		unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
+		popd &>/dev/null || die
+	fi
+
+	default
+
+	# This is the same as the 01 patch from infinality
+	sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
+
+	enable_option() {
+		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to enable option $1"
+	}
+
+	disable_option() {
+		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to disable option $1"
+	}
+
+	# Will be the new default for >=freetype-2.7.0
+	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+
+	if use infinality && use cleartype-hinting ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
+	elif use infinality ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
+	elif use cleartype-hinting ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+	fi
+
+	# Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
+	# via environment (new since v2.8)
+	enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+	# See https://freetype.org/patents.html (expired!)
+	enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+	if ! use adobe-cff ; then
+		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+	fi
+
+	if use debug ; then
+		enable_option FT_DEBUG_LEVEL_TRACE
+		enable_option FT_DEBUG_MEMORY
+	fi
+
+	if use utils ; then
+		cd "${WORKDIR}/ft2demos-${PV}" || die
+		# Disable tests needing X11 when USE="-X". (bug #177597)
+		if ! use X ; then
+			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+		fi
+		cd "${S}" || die
+	fi
+
+	# we need non-/bin/sh to run configure
+	if [[ -n ${CONFIG_SHELL} ]] ; then
+		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
+			"${S}"/builds/unix/configure || die
+	fi
+
+	elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+	append-flags -fno-strict-aliasing
+	type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+	local myeconfargs=(
+		--disable-freetype-config
+		--enable-biarch-config
+		--enable-shared
+		$(use_with brotli)
+		$(use_with bzip2)
+		$(use_with harfbuzz)
+		$(use_with png)
+		$(use_enable static-libs static)
+
+		# avoid using libpng-config
+		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+	)
+
+	case ${CHOST} in
+		mingw*|*-mingw*) ;;
+		# Workaround windows mis-detection: bug #654712
+		# Have to do it for both ${CHOST}-windres and windres
+		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
+	esac
+
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use utils ; then
+		einfo "Building utils"
+		# fix for Prefix, bug #339334
+		emake \
+			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use utils ; then
+		einfo "Installing utils"
+		emake DESTDIR="${D}" FT2DEMOS=1 \
+			TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install
+	fi
+}
+
+multilib_src_install_all() {
+	if use fontforge ; then
+		# Probably fontforge needs less but this way makes things simplier...
+		einfo "Installing internal headers required for fontforge"
+		local header
+		find src/truetype include/freetype/internal -name '*.h' | \
+		while read header ; do
+			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+		done
+	fi
+
+	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+	if [[ "${PV}" != 9999 ]] && use doc ; then
+		docinto html
+		dodoc -r docs/*
+	fi
+
+	find "${ED}" -type f -name '*.la' -delete || die
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2021-10-28  8:22 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2021-10-28  8:22 UTC (permalink / raw
  To: gentoo-commits

commit:     f4c30e9ff0a179845f987526ca42d3de706e709c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 28 08:21:28 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Oct 28 08:22:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4c30e9f

media-libs/freetype: Revbump to fix bitmap font rendering

Closes: https://bugs.gentoo.org/820500
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../files/freetype-2.11.0-quiet_noop.patch         |  41 ++++
 media-libs/freetype/freetype-2.11.0-r2.ebuild      | 251 +++++++++++++++++++++
 2 files changed, 292 insertions(+)

diff --git a/media-libs/freetype/files/freetype-2.11.0-quiet_noop.patch b/media-libs/freetype/files/freetype-2.11.0-quiet_noop.patch
new file mode 100644
index 00000000000..46206465ffa
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.11.0-quiet_noop.patch
@@ -0,0 +1,41 @@
+From 6e9d8d314ff6ab23177b9162c0b96616460bb84e Mon Sep 17 00:00:00 2001
+From: Alexei Podtelezhnikov <apodtele@gmail.com>
+Date: Fri, 20 Aug 2021 16:01:32 -0400
+Subject: [PATCH] [base] Restore quiet no-op rendering of bitmap glyphs.
+
+Fixes #1076.
+
+* src/base/ftobjs.c (FT_Render_Glyph_Internal): Discard an error when
+rendering a bitmap glyph.
+---
+ src/base/ftobjs.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
+index 342ac4a27..7b40c6421 100644
+--- a/src/base/ftobjs.c
++++ b/src/base/ftobjs.c
+@@ -4703,7 +4703,7 @@
+         else
+           renderer = FT_Lookup_Renderer( library, slot->format, &node );
+ 
+-        error = FT_ERR( Unimplemented_Feature );
++        error = FT_ERR( Cannot_Render_Glyph );
+         while ( renderer )
+         {
+           error = renderer->render( renderer, slot, render_mode, NULL );
+@@ -4719,6 +4719,11 @@
+           /* format.                                               */
+           renderer = FT_Lookup_Renderer( library, slot->format, &node );
+         }
++
++        /* it is not an error if we cannot render a bitmat glyph */
++        if ( FT_ERR_EQ( error, Cannot_Render_Glyph ) &&
++             slot->format == FT_GLYPH_FORMAT_BITMAP  )
++          error = FT_Err_Ok;
+       }
+     }
+ 
+-- 
+GitLab
+

diff --git a/media-libs/freetype/freetype-2.11.0-r2.ebuild b/media-libs/freetype/freetype-2.11.0-r2.ebuild
new file mode 100644
index 00000000000..658322e92af
--- /dev/null
+++ b/media-libs/freetype/freetype-2.11.0-r2.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
+
+DESCRIPTION="High-quality and portable font engine"
+HOMEPAGE="https://www.freetype.org/"
+IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs utils"
+
+if [[ "${PV}" != 9999 ]] ; then
+	SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
+		mirror://nongnu/freetype/${P/_/}.tar.xz
+		utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
+			mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
+		doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
+			mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
+	SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${P}-COLR_v1_clipbox.patch.xz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+	IUSE+=" doc"
+else
+	inherit autotools git-r3
+fi
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+
+RDEPEND="
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
+	utils? (
+		X? (
+			>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+			>=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}]
+			>=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}]
+		)
+	)"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.10.3-sizeof-types.patch # 459966
+	"${WORKDIR}"/${P}-COLR_v1_clipbox.patch
+	"${FILESDIR}"/${P}-COLR_v1_clipbox_minor_fix.patch
+	"${FILESDIR}"/${P}-COLR_missing_blend_mode.patch
+	"${FILESDIR}"/${P}-quiet_noop.patch #820500
+)
+
+_egit_repo_handler() {
+	if [[ "${PV}" == 9999 ]] ; then
+		local phase="${1}"
+		case ${phase} in
+			fetch|unpack)
+				:;
+			;;
+			*)
+				die "Please use this function with either \"fetch\" or \"unpack\""
+			;;
+		esac
+
+		local EGIT_REPO_URI
+		EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2.git"
+		git-r3_src_${phase}
+		if use utils ; then
+			EGIT_REPO_URI="https://git.sv.nongnu.org/r/freetype/freetype2-demos.git"
+			local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
+			git-r3_src_${phase}
+		fi
+	else
+		default
+	fi
+}
+
+src_fetch() {
+	_egit_repo_handler ${EBUILD_PHASE}
+}
+
+src_unpack() {
+	_egit_repo_handler ${EBUILD_PHASE}
+
+	if [[ "${PV}" == 9999 ]] ; then
+		# Need to copy stuff from dlg subproject (#758902)
+		local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
+		local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
+		local dlg_dest_dir="${S}/include"
+		mkdir -p "${dlg_dest_dir}/dlg" || die
+		cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die
+		cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die
+	fi
+}
+
+src_prepare() {
+	if [[ "${PV}" == 9999 ]] ; then
+		# Do NOT automagically mess with submodules!!!
+		sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
+		# inspired by shipped autogen.sh script
+		eval $(sed -n \
+			-e 's/^#define  *\(FREETYPE_MAJOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			-e 's/^#define  *\(FREETYPE_MINOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			-e 's/^#define  *\(FREETYPE_PATCH\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			include/freetype/freetype.h || die)
+		FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
+		[[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
+		pushd builds/unix &>/dev/null || die
+		sed -e "s;@VERSION@;${FREETYPE};" \
+			< configure.raw > configure.ac || die
+		# eautoheader produces broken ftconfig.in
+		AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
+		unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
+		popd &>/dev/null || die
+	fi
+
+	default
+
+	# This is the same as the 01 patch from infinality
+	sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
+
+	enable_option() {
+		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to enable option $1"
+	}
+
+	disable_option() {
+		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to disable option $1"
+	}
+
+	# Will be the new default for >=freetype-2.7.0
+	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+
+	if use infinality && use cleartype-hinting ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
+	elif use infinality ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
+	elif use cleartype-hinting ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+	fi
+
+	# Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
+	# via environment (new since v2.8)
+	enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+	# See https://freetype.org/patents.html (expired!)
+	enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+	if ! use adobe-cff ; then
+		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+	fi
+
+	if use debug ; then
+		enable_option FT_DEBUG_LEVEL_TRACE
+		enable_option FT_DEBUG_MEMORY
+	fi
+
+	if use utils ; then
+		cd "${WORKDIR}/ft2demos-${PV}" || die
+		# Disable tests needing X11 when USE="-X". (bug #177597)
+		if ! use X ; then
+			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+		fi
+		cd "${S}" || die
+	fi
+
+	# we need non-/bin/sh to run configure
+	if [[ -n ${CONFIG_SHELL} ]] ; then
+		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
+			"${S}"/builds/unix/configure || die
+	fi
+
+	elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+	append-flags -fno-strict-aliasing
+	type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+	local myeconfargs=(
+		--disable-freetype-config
+		--enable-biarch-config
+		--enable-shared
+		$(use_with brotli)
+		$(use_with bzip2)
+		$(use_with harfbuzz)
+		$(use_with png)
+		$(use_enable static-libs static)
+
+		# avoid using libpng-config
+		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+	)
+
+	case ${CHOST} in
+		mingw*|*-mingw*) ;;
+		# Workaround windows mis-detection: bug #654712
+		# Have to do it for both ${CHOST}-windres and windres
+		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
+	esac
+
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use utils ; then
+		einfo "Building utils"
+		# fix for Prefix, bug #339334
+		emake \
+			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use utils ; then
+		einfo "Installing utils"
+		emake DESTDIR="${D}" FT2DEMOS=1 \
+			TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install
+	fi
+}
+
+multilib_src_install_all() {
+	if use fontforge ; then
+		# Probably fontforge needs less but this way makes things simplier...
+		einfo "Installing internal headers required for fontforge"
+		local header
+		find src/truetype include/freetype/internal -name '*.h' | \
+		while read header ; do
+			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+		done
+	fi
+
+	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+	if [[ "${PV}" != 9999 ]] && use doc ; then
+		docinto html
+		dodoc -r docs/*
+	fi
+
+	find "${ED}" -type f -name '*.la' -delete || die
+}


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

* [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/
@ 2022-04-16 15:19 Lars Wendler
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Wendler @ 2022-04-16 15:19 UTC (permalink / raw
  To: gentoo-commits

commit:     d6e7b3645177076453227365354f37fab7f53c55
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 16 15:17:31 2022 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Apr 16 15:19:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6e7b364

media-libs/freetype: Revbump to fix segfault

Closes: https://bugs.gentoo.org/836898
Thanks-to: Georg Brandl <g.brandl <AT> gmx.net>
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 .../freetype-2.12.0-cffgload_segfault_fix.patch    |  31 +++
 media-libs/freetype/freetype-2.12.0-r1.ebuild      | 261 +++++++++++++++++++++
 2 files changed, 292 insertions(+)

diff --git a/media-libs/freetype/files/freetype-2.12.0-cffgload_segfault_fix.patch b/media-libs/freetype/files/freetype-2.12.0-cffgload_segfault_fix.patch
new file mode 100644
index 000000000000..6578475f4d7f
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.12.0-cffgload_segfault_fix.patch
@@ -0,0 +1,31 @@
+From 978eefee5401abee6bf702c6bcde9afb47893145 Mon Sep 17 00:00:00 2001
+From: Georg Brandl <georg@python.org>
+Date: Tue, 12 Apr 2022 11:43:37 +0000
+Subject: [PATCH] * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_SVG]:
+ Fix segfault.
+
+This can happen if the function is called with `size` being `NULL`.
+
+Fixes #1147.
+---
+ src/cff/cffgload.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
+index 5c15c804b..7586b886f 100644
+--- a/src/cff/cffgload.c
++++ b/src/cff/cffgload.c
+@@ -370,8 +370,8 @@
+       SFNT_Service  sfnt;
+ 
+ 
+-      if ( size->root.metrics.x_ppem < 1 ||
+-           size->root.metrics.y_ppem < 1 )
++      if ( size && (size->root.metrics.x_ppem < 1 ||
++                    size->root.metrics.y_ppem < 1 ) )
+       {
+         error = FT_THROW( Invalid_Size_Handle );
+         return error;
+-- 
+GitLab
+

diff --git a/media-libs/freetype/freetype-2.12.0-r1.ebuild b/media-libs/freetype/freetype-2.12.0-r1.ebuild
new file mode 100644
index 000000000000..f45d9b340749
--- /dev/null
+++ b/media-libs/freetype/freetype-2.12.0-r1.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic libtool multilib-build multilib-minimal toolchain-funcs
+
+DESCRIPTION="High-quality and portable font engine"
+HOMEPAGE="https://www.freetype.org/"
+IUSE="X +adobe-cff brotli bzip2 +cleartype-hinting debug fontforge harfbuzz infinality +png static-libs svg utils"
+
+if [[ "${PV}" != 9999 ]] ; then
+	SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.xz
+		mirror://nongnu/freetype/${P/_/}.tar.xz
+		utils?	( mirror://sourceforge/freetype/ft2demos-${PV}.tar.xz
+			mirror://nongnu/freetype/ft2demos-${PV}.tar.xz )
+		doc?	( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.xz
+			mirror://nongnu/freetype/${PN}-doc-${PV}.tar.xz )"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+	IUSE+=" doc"
+else
+	inherit git-r3
+fi
+
+LICENSE="|| ( FTL GPL-2+ )"
+SLOT="2"
+
+RDEPEND="
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] )
+	bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+	harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] )
+	utils? (
+		svg? ( >=gnome-base/librsvg-2.46.0[${MULTILIB_USEDEP}] )
+		X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] )
+	)
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.12.0-librsvg_automagic.patch"
+
+	# https://bugs.gentoo.org/836898
+	"${FILESDIR}/${P}-cffgload_segfault_fix.patch"
+)
+
+_egit_repo_handler() {
+	if [[ "${PV}" == 9999 ]] ; then
+		local phase="${1}"
+		case ${phase} in
+			fetch|unpack)
+				:;
+			;;
+			*)
+				die "Please use this function with either \"fetch\" or \"unpack\""
+			;;
+		esac
+
+		local EGIT_REPO_URI
+		EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype.git"
+		git-r3_src_${phase}
+		if use utils ; then
+			EGIT_REPO_URI="https://gitlab.freedesktop.org/freetype/freetype-demos.git"
+			local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}"
+			git-r3_src_${phase}
+		fi
+	else
+		default
+	fi
+}
+
+pkg_pretend() {
+	if use svg && ! use utils ; then
+		einfo "The \"svg\" USE flag only has effect when the \"utils\" USE flag is also enabled."
+	fi
+}
+
+src_fetch() {
+	_egit_repo_handler ${EBUILD_PHASE}
+}
+
+src_unpack() {
+	_egit_repo_handler ${EBUILD_PHASE}
+
+	if [[ "${PV}" == 9999 ]] ; then
+		# Need to copy stuff from dlg subproject (#758902)
+		local dlg_inc_dir="${S}/subprojects/dlg/include/dlg"
+		local dlg_src_dir="${S}/subprojects/dlg/src/dlg"
+		local dlg_dest_dir="${S}/include"
+		mkdir -p "${dlg_dest_dir}/dlg" || die
+		cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die
+		cp "${dlg_src_dir}"/* "${dlg_dest_dir}" || die
+	fi
+}
+
+src_prepare() {
+	if [[ "${PV}" == 9999 ]] ; then
+		# Do NOT automagically mess with submodules!!!
+		sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die
+		# inspired by shipped autogen.sh script
+		eval $(sed -n \
+			-e 's/^#define  *\(FREETYPE_MAJOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			-e 's/^#define  *\(FREETYPE_MINOR\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			-e 's/^#define  *\(FREETYPE_PATCH\)  *\([0-9][0-9]*\).*/\1=\2/p' \
+			include/freetype/freetype.h || die)
+		FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}"
+		[[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}"
+		pushd builds/unix &>/dev/null || die
+		sed -e "s;@VERSION@;${FREETYPE};" \
+			< configure.raw > configure.ac || die
+		# eautoheader produces broken ftconfig.in
+		AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
+		unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE
+		popd &>/dev/null || die
+	fi
+
+	default
+
+	pushd builds/unix &>/dev/null || die
+	# eautoheader produces broken ftconfig.in
+	AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf
+	popd &>/dev/null || die
+
+	# This is the same as the 01 patch from infinality
+	sed '/AUX_MODULES += \(gx\|ot\)valid/s@^# @@' -i modules.cfg || die
+
+	enable_option() {
+		sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to enable option $1"
+	}
+
+	disable_option() {
+		sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \
+			include/${PN}/config/ftoption.h \
+			|| die "unable to disable option $1"
+	}
+
+	# Will be the new default for >=freetype-2.7.0
+	disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+
+	if use infinality && use cleartype-hinting ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  ( 1 | 2 )"
+	elif use infinality ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  1"
+	elif use cleartype-hinting ; then
+		enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING  2"
+	fi
+
+	# Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1"
+	# via environment (new since v2.8)
+	enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
+
+	# See https://freetype.org/patents.html (expired!)
+	enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+	if ! use adobe-cff ; then
+		enable_option CFF_CONFIG_OPTION_OLD_ENGINE
+	fi
+
+	if use debug ; then
+		enable_option FT_DEBUG_LEVEL_TRACE
+		enable_option FT_DEBUG_MEMORY
+	fi
+
+	if use utils ; then
+		cd "${WORKDIR}/ft2demos-${PV}" || die
+		# Disable tests needing X11 when USE="-X". (bug #177597)
+		if ! use X ; then
+			sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die
+		fi
+		cd "${S}" || die
+	fi
+
+	# we need non-/bin/sh to run configure
+	if [[ -n ${CONFIG_SHELL} ]] ; then
+		sed -i -e "1s:^#![[:space:]]*/bin/sh:#!${CONFIG_SHELL}:" \
+			"${S}"/builds/unix/configure || die
+	fi
+
+	elibtoolize --patch-only
+}
+
+multilib_src_configure() {
+	append-flags -fno-strict-aliasing
+	type -P gmake &> /dev/null && export GNUMAKE=gmake
+
+	local myeconfargs=(
+		--disable-freetype-config
+		--enable-shared
+		--with-zlib
+		$(use_with brotli)
+		$(use_with bzip2)
+		$(use_with harfbuzz)
+		$(use_with png)
+		$(use_enable static-libs static)
+		$(usex utils $(use_with svg librsvg) --without-librsvg)
+
+		# avoid using libpng-config
+		LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)"
+		LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)"
+	)
+
+	case ${CHOST} in
+		mingw*|*-mingw*) ;;
+		# Workaround windows mis-detection: bug #654712
+		# Have to do it for both ${CHOST}-windres and windres
+		*) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;;
+	esac
+
+	export CC_BUILD="$(tc-getBUILD_CC)"
+
+	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+	default
+
+	if multilib_is_native_abi && use utils ; then
+		einfo "Building utils"
+		# fix for Prefix, bug #339334
+		emake \
+			X11_PATH="${EPREFIX}/usr/$(get_libdir)" \
+			FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}"
+	fi
+}
+
+multilib_src_install() {
+	default
+
+	if multilib_is_native_abi && use utils ; then
+		einfo "Installing utils"
+		emake DESTDIR="${D}" FT2DEMOS=1 \
+			TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install
+	fi
+}
+
+multilib_src_install_all() {
+	if use fontforge ; then
+		# Probably fontforge needs less but this way makes things simplier...
+		einfo "Installing internal headers required for fontforge"
+		local header
+		find src/truetype include/freetype/internal -name '*.h' | \
+		while read header ; do
+			mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+			cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die
+		done
+	fi
+
+	dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO}
+	if [[ "${PV}" != 9999 ]] && use doc ; then
+		docinto html
+		dodoc -r docs/*
+	fi
+
+	find "${ED}" -type f -name '*.la' -delete || die
+}


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

end of thread, other threads:[~2022-04-16 15:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-10 11:40 [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/files/, media-libs/freetype/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2022-04-16 15:19 Lars Wendler
2021-10-28  8:22 Lars Wendler
2021-08-11 21:08 Lars Wendler
2020-10-20  1:37 Sam James
2017-12-08 20:54 Lars Wendler
2017-05-13 21:39 Lars Wendler
2017-01-21 16:56 Lars Wendler
2016-02-11  9:17 Lars Wendler

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