commit:     9dba4210d815224e9179b3776061d77be738ad81
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  1 15:04:52 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Jun  2 20:30:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dba4210

media-libs/fontconfig: Bump to version 2.12.3

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 media-libs/fontconfig/Manifest                     |   1 +
 .../files/fontconfig-2.12.2-gperf31.patch          |  61 ++++++++
 .../files/fontconfig-2.12.3-latin-update.patch     |  68 +++++++++
 media-libs/fontconfig/fontconfig-2.12.3.ebuild     | 161 +++++++++++++++++++++
 4 files changed, 291 insertions(+)

diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
index cc0fe6a3d07..fc77b7e3da0 100644
--- a/media-libs/fontconfig/Manifest
+++ b/media-libs/fontconfig/Manifest
@@ -1,3 +1,4 @@
 DIST fontconfig-2.11.1.tar.bz2 1516095 SHA256 
dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99 SHA512 
acf4e6293e0e5521e4b8f29f4b48860ecd1d39744d0eab21c7332e56bfc3ccc63548e459243c5e425b8e5ef265f2cf065eece02460725e794041219d41188149
 WHIRLPOOL 
45009a1e0fcbbe2f532c6f642a0d57af35af3f6abfb50098c89fe39c71da96597078eb4babdd80a713ef4456e07481d70def7c1c18b7314452136d5b30a4858b
 DIST fontconfig-2.12.0.tar.bz2 1605355 SHA256 
b433e4efff1f68fdd8aac221ed1df3ff1e580ffedbada020a703fe64017d8224 SHA512 
b8f005d56aa9fe6a756be1cb4d843c69c746915c10fe968393527bd3469e4df0401a10edf5b0a69b0e2732cc07f71ad001c19a07726e5dfa881b9d94bb6935f9
 WHIRLPOOL 
e43670c00b21760fdfdb2e03d7d4a2e49b7300572de81ea8716160a1abf8e63aa7d05d95d53f5e24b8e148eeef88d375bd67edff956224571725b3bd77263ab4
 DIST fontconfig-2.12.1.tar.bz2 1608901 SHA256 
b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 SHA512 
a5ba2c1a52272b39aad20394dcc85c202159af0d3d2c1b34b24cbdbc8babb3157005a79d25c21a9bf6ec0459681b1ab05af102b2c0594f485c49e3b3b531067e
 WHIRLPOOL 
1900e3a48fdf65f762a7e9c138a3ffe716f6db96d808f8b10ebf99e7e20d8b32a042406f3ac43ca947b9710f97b31c5caae0609986b1e41ec8604050d2b37955
+DIST fontconfig-2.12.3.tar.bz2 1600509 SHA256 
bd24bf6602731a11295c025909d918180e98385625182d3b999fd6f1ab34f8bd SHA512 
311a3c98a05afbe35c1215b41edb2bbcfe3069f85814c882ef0e40f0404cca4bb59a544b14eee9430ea902fd8bc3bfeccb37e42b9fe3bb3a6c71bb0c5332f2c7
 WHIRLPOOL 
7b3ec6f364d1b701ae1eb676b3f4cffef91af2d0b3f78719119449dfc6d679d1da20224e9148aa970d60c0d531ee5dfbb3c256ffc18edb142648fa06c0704c93

diff --git a/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch 
b/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch
new file mode 100644
index 00000000000..ce90c450b36
--- /dev/null
+++ b/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch
@@ -0,0 +1,61 @@
+From 9878b306f6c673d3d6cd9db487f67eb426cc03df Mon Sep 17 00:00:00 2001
+From: Akira TAGOH <[email protected]>
+Date: Thu, 23 Feb 2017 21:39:10 +0900
+Subject: Fix the build issue with gperf 3.1
+
+To support the one of changes in gperf 3.1:
+* The 'len' parameter of the hash function and of the lookup function is now
+  of type 'size_t' instead of 'unsigned int'. This makes it safe to call these
+  functions with strings of length > 4 GB, on 64-bit machines.
+
+diff --git a/configure.ac b/configure.ac
+index 4948816..8fbf3d3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -193,6 +193,26 @@ fi
+ AC_CHECK_MEMBERS([struct dirent.d_type],,,
+       [#include <dirent.h>])
+ 
++# Check the argument type of the gperf hash/lookup function
++AC_MSG_CHECKING([The type of len parameter of gperf hash/lookup function])
++fc_gperf_test="$(echo 'foo' | gperf -L ANSI-C)"
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++      #include <string.h>
++
++      const char *in_word_set(register const char *, register size_t);
++      $fc_gperf_test
++      ]])], [FC_GPERF_SIZE_T=size_t],
++      [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++              #include <string.h>
++
++              const char *in_word_set(register const char *, register 
unsigned int);
++              $fc_gperf_test
++      ]])], [FC_GPERF_SIZE_T="unsigned int"],
++      [AC_MSG_ERROR([Unable to determine the type of the len parameter of the 
gperf hash/lookup function])]
++)])
++AC_DEFINE_UNQUOTED(FC_GPERF_SIZE_T, $FC_GPERF_SIZE_T, [The type of len 
parameter of the gperf hash/lookup function])
++AC_MSG_RESULT($FC_GPERF_SIZE_T)
++
+ #
+ # Checks for iconv
+ #
+diff --git a/src/fcobjs.c b/src/fcobjs.c
+index 16ff31c..33bba8d 100644
+--- a/src/fcobjs.c
++++ b/src/fcobjs.c
+@@ -25,10 +25,10 @@
+ #include "fcint.h"
+ 
+ static unsigned int
+-FcObjectTypeHash (register const char *str, register unsigned int len);
++FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len);
+ 
+ static const struct FcObjectTypeInfo *
+-FcObjectTypeLookup (register const char *str, register unsigned int len);
++FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len);
+ 
+ #include "fcobjshash.h"
+ 
+-- 
+cgit v0.10.2
+

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

diff --git a/media-libs/fontconfig/fontconfig-2.12.3.ebuild 
b/media-libs/fontconfig/fontconfig-2.12.3.ebuild
new file mode 100644
index 00000000000..e0156b44467
--- /dev/null
+++ b/media-libs/fontconfig/fontconfig-2.12.3.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multilib-minimal readme.gentoo-r1
+
+DESCRIPTION="A library for configuring and customizing font access"
+HOMEPAGE="http://fontconfig.org/";
+SRC_URI="http://fontconfig.org/release/${P}.tar.bz2";
+
+LICENSE="MIT"
+SLOT="1.0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd 
~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint 
~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc static-libs"
+
+# Purposefully dropped the xml USE flag and libxml2 support.  Expat is the
+# default and used by every distro.  See bug #283191.
+RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
+       >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}]
+       abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       doc? ( =app-text/docbook-sgml-dtd-3.1*
+               app-text/docbook-sgml-utils[jadetex] )"
+PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
+       virtual/ttf-fonts"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
+       "${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make 
liberation default
+)
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
+
+pkg_setup() {
+       DOC_CONTENTS="Please make fontconfig configuration changes using
+       \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will 
be
+       overwritten. If you need to reset your configuration to upstream 
defaults,
+       delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge 
fontconfig."
+}
+
+src_prepare() {
+       default
+
+       # Revert gperf-3.1 fix as it breaks compilation
+       eapply -R "${FILESDIR}"/${PN}-2.12.2-gperf31.patch
+
+       eautoreconf
+}
+
+multilib_src_configure() {
+       local addfonts
+       # harvest some font locations, such that users can benefit from the
+       # host OS's installed fonts
+       case ${CHOST} in
+               *-darwin*)
+                       addfonts=",/Library/Fonts,/System/Library/Fonts"
+               ;;
+               *-solaris*)
+                       [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
+                               addfonts=",/usr/X/lib/X11/fonts/TrueType"
+                       [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
+                               
addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
+               ;;
+               *-linux-gnu)
+                       use prefix && [[ -d /usr/share/fonts ]] && \
+                               addfonts=",/usr/share/fonts"
+               ;;
+       esac
+
+       local myeconfargs=(
+               $(use_enable doc docbook)
+               --enable-docs
+               --localstatedir="${EPREFIX}"/var
+               --with-default-fonts="${EPREFIX}"/usr/share/fonts
+               --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}"
+               --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
+       )
+
+       ECONF_SOURCE="${S}" \
+       econf "${myeconfargs[@]}"
+}
+
+multilib_src_install() {
+       default
+
+       # avoid calling this multiple times, bug #459210
+       if multilib_is_native_abi; then
+               # stuff installed from build-dir
+               emake -C doc DESTDIR="${D}" install-man
+
+               insinto /etc/fonts
+               doins fonts.conf
+       fi
+}
+
+multilib_src_install_all() {
+       einstalldocs
+       find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
+
+       # fc-lang directory contains language coverage datafiles
+       # which are needed to test the coverage of fonts.
+       insinto /usr/share/fc-lang
+       doins fc-lang/*.orth
+
+       dodoc doc/fontconfig-user.{txt,pdf}
+
+       if [[ -e ${ED}usr/share/doc/fontconfig/ ]];  then
+               mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} 
|| die
+               rm -rf "${ED}"usr/share/doc/fontconfig
+       fi
+
+       # Changes should be made to /etc/fonts/local.conf, and as we had
+       # too much problems with broken fonts.conf we force update it ...
+       echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
+       doenvd "${T}"/37fontconfig
+
+       # As of fontconfig 2.7, everything sticks their noses in here.
+       dodir /etc/sandbox.d
+       echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > 
"${ED}"/etc/sandbox.d/37fontconfig
+
+       readme.gentoo_create_doc
+}
+
+pkg_preinst() {
+       # Bug #193476
+       # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include 
various
+       # config files.  If we install as-is, we'll blow away user settings.
+       ebegin "Syncing fontconfig configuration to system"
+       if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
+               for file in "${EROOT}"/etc/fonts/conf.avail/*; do
+                       f=${file##*/}
+                       if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
+                               [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+                                       && ln -sf ../conf.avail/"${f}" 
"${ED}"etc/fonts/conf.d/ &>/dev/null
+                       else
+                               [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
+                                       && rm "${ED}"etc/fonts/conf.d/"${f}" 
&>/dev/null
+                       fi
+               done
+       fi
+       eend $?
+}
+
+pkg_postinst() {
+       einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/"
+       find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete
+
+       readme.gentoo_print_elog
+
+       if [[ ${ROOT} = / ]]; then
+               multilib_pkg_postinst() {
+                       ebegin "Creating global font cache for ${ABI}"
+                       "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
+                       eend $?
+               }
+
+               multilib_parallel_foreach_abi multilib_pkg_postinst
+       fi
+}

Reply via email to