commit:     09600e1de936bdf51f9c9d4ace1593d740d65e45
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 11 07:03:28 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Oct 11 07:24:38 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09600e1d

media-libs/freetype: Bump to version 2.10.3

Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-libs/freetype/Manifest                       |   3 +
 .../files/freetype-2.10.3-sizeof-types.patch       |  31 +++
 media-libs/freetype/freetype-2.10.3.ebuild         | 242 +++++++++++++++++++++
 3 files changed, 276 insertions(+)

diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest
index 4b09ea03443..873a0ecf616 100644
--- a/media-libs/freetype/Manifest
+++ b/media-libs/freetype/Manifest
@@ -1,9 +1,12 @@
 DIST freetype-2.10.1.tar.xz 2378784 BLAKE2B 
7c177d3ca9ad923dc9534719529686c4242d87d85bfbc32fa8a12d0be87aceb4960ec84b84e433413312de17ac24a8ed2a9d092efa25a39108d28e2051ada574
 SHA512 
c7a565b0ab3dce81927008a6965d5c7540f0dc973fcefdc1677c2e65add8668b4701c2958d25593cb41f706f4488765365d40b93da71dbfa72907394f28b2650
 DIST freetype-2.10.2.tar.xz 2404456 BLAKE2B 
866bd83c460f83fba93f58d0ae2270ac3833d6eb0b087f7eb860bd6e08f40ece1982b70bbd065b8978e47ff6fb2b46398307d461170cd10285d11f74a9fbadaa
 SHA512 
cf45089bd8893d7de2cdcb59d91bbb300e13dd0f0a9ef80ed697464ba7aeaf46a5a81b82b59638e6b21691754d8f300f23e1f0d11683604541d77f0f581affaa
+DIST freetype-2.10.3.tar.xz 2416752 BLAKE2B 
8ce360c07777ad5b031ff7a840ef0cec95f358e764897f1aea9e8fd40a21e8bada3610943dc70b279856116396e6703b5127a4d672fb6e0dc8e5fe7f9233265e
 SHA512 
3f9d1a44cdae51ec4b13116aba5af1730e6be46132ddd9e49486e8d681b61756baa9897daaf0f06e79f00f2db0e57e0fa66d27f44d65735da1167d5b3c170373
 DIST freetype-2.9.1.tar.bz2 1926385 BLAKE2B 
f165d638e0f49749a2640aabba96aca20441c76028cc18bb2482fd620a29dd368bc55ea020c1e74fa6effe9fed3c59a53c7fdf2dd6021f445032b7007201948e
 SHA512 
856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708
 DIST freetype-doc-2.10.1.tar.xz 2079092 BLAKE2B 
7d2b8ccdfeba71f1dab57f31cfb96a21afbf628ad329f798e9ac25f6e57cc662db67040a9f7c63df2d43b1c0a169c37ca0cd82bfa2d95ef382b16066859dc5b3
 SHA512 
7260d0d6b1bd04f9940b456b20d8d8157fc528f5b6a5c2028fe57008bee3e8d0434bdf89589e2e521b04e3e2c43627155549091d3aaf06384b654f795458991e
 DIST freetype-doc-2.10.2.tar.xz 2078712 BLAKE2B 
9d78d5d7c3806d83f5cb91daa88284445d36a75ce7b598177c83a9efc62faf5d8a0003f8cadee37eb6792711c87dc61d937fcb03f3c450c94276dfdf410c0aa1
 SHA512 
c54956a56920e651102b75c0efa07212e1d95f3bec219b8364b61d9a71171b11da492170cc861c36f3305f32ad1dee46d0d5a561ccdc6ca36591ae3f619a1d67
+DIST freetype-doc-2.10.3.tar.xz 2079036 BLAKE2B 
fca0915a5f268ce4d5205822d712b451f73d891e00518b3db0dd7c431fd7bd6544fa36fc374344c94f43d731fe7a1076724c3fdd42c8143647aa5763b4736556
 SHA512 
135ae51706197d1bd208cb48d8d1881c14aeee5283dbdab88a7fa6864aed888613df43bd3deb24ff530fa767f94fe997f97dee10bf2be7763231211bf7d5225f
 DIST freetype-doc-2.9.1.tar.bz2 2130292 BLAKE2B 
667032fa447fbc28c0f753df3ade7a07a4f8d4d26cdd00fed2fa0e8098e9d6a083572608b7d06446ea91baa932e3c6d18beb1f86f6b549a8cd2c07a2df567da0
 SHA512 
1668f02f67e6e047df04e5e2fccb564cd9af780ec9b3c4878109868302a83eaec7b627390ff82c3e875122400e6f20fc690936a1e4964dfa65143e5309fa22d4
 DIST ft2demos-2.10.1.tar.xz 229228 BLAKE2B 
015448f3f246fc7772b10f55037450866323e1b7410cf840fa15fa1da3e6a1c980167bfedbe197b6e6637a8e1dcef1f4fd83174e47f33f090d554fab2c40380c
 SHA512 
f1c06fae3d5653d6d8f8d630e531d47b7be4429b122dc826c80791953e61df7374dfc151f90519fe110f78fcbf592d9dbd9e96c83200730a6f04e42760cc3142
 DIST ft2demos-2.10.2.tar.xz 230672 BLAKE2B 
dd81e72bb1360f6a952874c183598fffe3eddb4bed4d07715a75810d2e81623b94082b1274f916bf7550615a66ba7a327c5413fca9d470111aeb1fa31ce4dd73
 SHA512 
912e3c3cbcdfd30fd918897d28240e04eb7248d130fc519e7d1613873a11d275d658ff247c6d517ebecf7a09de0d05f3dc10631411226015e1b147cba9a8a438
+DIST ft2demos-2.10.3.tar.xz 235388 BLAKE2B 
c1c7e9d61fde441b2cc107a3ad8f1499c03ce8219a54b2bdc4ab7168a0d61a6c83c7e6e3d2de6a8ed0f09b29c398708618e4683d5ed24d6e8ae7505b8920770f
 SHA512 
860fbeefd70caa4aa9483d90df5c3376ee2bef8fe93ab26010c4ca4f95cfd281870da461e2f335f42d3e6d2007f8e46c99d7834d2177b7806a2d92422ed08b41
 DIST ft2demos-2.9.1.tar.bz2 233462 BLAKE2B 
c689942b222b2c600b5ec3963791621ae87acefb9b01caa5dc35af52525d03e3a1094e48c0789d5eaabbce787bddd7c3055e12454e54ea3c7fae92bca47614de
 SHA512 
38bee59184b20c2eb983deaa5c1f241e31c1b4793e47dc06b1b419601489cfece3b11fde4cf4fb6c5af12254ad0c1ce9a1547885c208e8e715655e9c48f22a46

diff --git a/media-libs/freetype/files/freetype-2.10.3-sizeof-types.patch 
b/media-libs/freetype/files/freetype-2.10.3-sizeof-types.patch
new file mode 100644
index 00000000000..ea02a15df11
--- /dev/null
+++ b/media-libs/freetype/files/freetype-2.10.3-sizeof-types.patch
@@ -0,0 +1,31 @@
+From 56e6ee69d298c0d150e2b76d2cfa2306e901df40 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org>
+Date: Sun, 11 Oct 2020 08:59:08 +0200
+Subject: [PATCH] Prevent apps from using the autoconf sizeof branch.
+
+Use #error to make sure that any app trying to enable that branch fails
+miserably. This guarantees the code to be multilib-friendly and also
+removes the header differences triggering QA errors.
+---
+ builds/unix/ftconfig.h.in | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/builds/unix/ftconfig.h.in b/builds/unix/ftconfig.h.in
+index 00b5a8226..020593a95 100644
+--- a/builds/unix/ftconfig.h.in
++++ b/builds/unix/ftconfig.h.in
+@@ -45,10 +45,7 @@
+ #undef FT_USE_AUTOCONF_SIZEOF_TYPES
+ #ifdef FT_USE_AUTOCONF_SIZEOF_TYPES
+ 
+-#undef SIZEOF_INT
+-#undef SIZEOF_LONG
+-#define FT_SIZEOF_INT  SIZEOF_INT
+-#define FT_SIZEOF_LONG SIZEOF_LONG
++#error "Unsupported code branch enabled. Please report a bug to 
bugs.gentoo.org."
+ 
+ #endif /* FT_USE_AUTOCONF_SIZEOF_TYPES */
+ 
+-- 
+2.28.0
+

diff --git a/media-libs/freetype/freetype-2.10.3.ebuild 
b/media-libs/freetype/freetype-2.10.3.ebuild
new file mode 100644
index 00000000000..b8b52e17acc
--- /dev/null
+++ b/media-libs/freetype/freetype-2.10.3.ebuild
@@ -0,0 +1,242 @@
+# 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
+)
+
+_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
+}

Reply via email to