Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/, media-libs/fontconfig/files/
Date: Fri, 02 Jun 2017 20:49:20
Message-Id: 1496435438.9dba4210d815224e9179b3776061d77be738ad81.polynomial-c@gentoo
1 commit: 9dba4210d815224e9179b3776061d77be738ad81
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 1 15:04:52 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 2 20:30:38 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dba4210
7
8 media-libs/fontconfig: Bump to version 2.12.3
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 media-libs/fontconfig/Manifest | 1 +
13 .../files/fontconfig-2.12.2-gperf31.patch | 61 ++++++++
14 .../files/fontconfig-2.12.3-latin-update.patch | 68 +++++++++
15 media-libs/fontconfig/fontconfig-2.12.3.ebuild | 161 +++++++++++++++++++++
16 4 files changed, 291 insertions(+)
17
18 diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
19 index cc0fe6a3d07..fc77b7e3da0 100644
20 --- a/media-libs/fontconfig/Manifest
21 +++ b/media-libs/fontconfig/Manifest
22 @@ -1,3 +1,4 @@
23 DIST fontconfig-2.11.1.tar.bz2 1516095 SHA256 dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99 SHA512 acf4e6293e0e5521e4b8f29f4b48860ecd1d39744d0eab21c7332e56bfc3ccc63548e459243c5e425b8e5ef265f2cf065eece02460725e794041219d41188149 WHIRLPOOL 45009a1e0fcbbe2f532c6f642a0d57af35af3f6abfb50098c89fe39c71da96597078eb4babdd80a713ef4456e07481d70def7c1c18b7314452136d5b30a4858b
24 DIST fontconfig-2.12.0.tar.bz2 1605355 SHA256 b433e4efff1f68fdd8aac221ed1df3ff1e580ffedbada020a703fe64017d8224 SHA512 b8f005d56aa9fe6a756be1cb4d843c69c746915c10fe968393527bd3469e4df0401a10edf5b0a69b0e2732cc07f71ad001c19a07726e5dfa881b9d94bb6935f9 WHIRLPOOL e43670c00b21760fdfdb2e03d7d4a2e49b7300572de81ea8716160a1abf8e63aa7d05d95d53f5e24b8e148eeef88d375bd67edff956224571725b3bd77263ab4
25 DIST fontconfig-2.12.1.tar.bz2 1608901 SHA256 b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 SHA512 a5ba2c1a52272b39aad20394dcc85c202159af0d3d2c1b34b24cbdbc8babb3157005a79d25c21a9bf6ec0459681b1ab05af102b2c0594f485c49e3b3b531067e WHIRLPOOL 1900e3a48fdf65f762a7e9c138a3ffe716f6db96d808f8b10ebf99e7e20d8b32a042406f3ac43ca947b9710f97b31c5caae0609986b1e41ec8604050d2b37955
26 +DIST fontconfig-2.12.3.tar.bz2 1600509 SHA256 bd24bf6602731a11295c025909d918180e98385625182d3b999fd6f1ab34f8bd SHA512 311a3c98a05afbe35c1215b41edb2bbcfe3069f85814c882ef0e40f0404cca4bb59a544b14eee9430ea902fd8bc3bfeccb37e42b9fe3bb3a6c71bb0c5332f2c7 WHIRLPOOL 7b3ec6f364d1b701ae1eb676b3f4cffef91af2d0b3f78719119449dfc6d679d1da20224e9148aa970d60c0d531ee5dfbb3c256ffc18edb142648fa06c0704c93
27
28 diff --git a/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch b/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch
29 new file mode 100644
30 index 00000000000..ce90c450b36
31 --- /dev/null
32 +++ b/media-libs/fontconfig/files/fontconfig-2.12.2-gperf31.patch
33 @@ -0,0 +1,61 @@
34 +From 9878b306f6c673d3d6cd9db487f67eb426cc03df Mon Sep 17 00:00:00 2001
35 +From: Akira TAGOH <akira@×××××.org>
36 +Date: Thu, 23 Feb 2017 21:39:10 +0900
37 +Subject: Fix the build issue with gperf 3.1
38 +
39 +To support the one of changes in gperf 3.1:
40 +* The 'len' parameter of the hash function and of the lookup function is now
41 + of type 'size_t' instead of 'unsigned int'. This makes it safe to call these
42 + functions with strings of length > 4 GB, on 64-bit machines.
43 +
44 +diff --git a/configure.ac b/configure.ac
45 +index 4948816..8fbf3d3 100644
46 +--- a/configure.ac
47 ++++ b/configure.ac
48 +@@ -193,6 +193,26 @@ fi
49 + AC_CHECK_MEMBERS([struct dirent.d_type],,,
50 + [#include <dirent.h>])
51 +
52 ++# Check the argument type of the gperf hash/lookup function
53 ++AC_MSG_CHECKING([The type of len parameter of gperf hash/lookup function])
54 ++fc_gperf_test="$(echo 'foo' | gperf -L ANSI-C)"
55 ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
56 ++ #include <string.h>
57 ++
58 ++ const char *in_word_set(register const char *, register size_t);
59 ++ $fc_gperf_test
60 ++ ]])], [FC_GPERF_SIZE_T=size_t],
61 ++ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
62 ++ #include <string.h>
63 ++
64 ++ const char *in_word_set(register const char *, register unsigned int);
65 ++ $fc_gperf_test
66 ++ ]])], [FC_GPERF_SIZE_T="unsigned int"],
67 ++ [AC_MSG_ERROR([Unable to determine the type of the len parameter of the gperf hash/lookup function])]
68 ++)])
69 ++AC_DEFINE_UNQUOTED(FC_GPERF_SIZE_T, $FC_GPERF_SIZE_T, [The type of len parameter of the gperf hash/lookup function])
70 ++AC_MSG_RESULT($FC_GPERF_SIZE_T)
71 ++
72 + #
73 + # Checks for iconv
74 + #
75 +diff --git a/src/fcobjs.c b/src/fcobjs.c
76 +index 16ff31c..33bba8d 100644
77 +--- a/src/fcobjs.c
78 ++++ b/src/fcobjs.c
79 +@@ -25,10 +25,10 @@
80 + #include "fcint.h"
81 +
82 + static unsigned int
83 +-FcObjectTypeHash (register const char *str, register unsigned int len);
84 ++FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len);
85 +
86 + static const struct FcObjectTypeInfo *
87 +-FcObjectTypeLookup (register const char *str, register unsigned int len);
88 ++FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len);
89 +
90 + #include "fcobjshash.h"
91 +
92 +--
93 +cgit v0.10.2
94 +
95
96 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
97 new file mode 100644
98 index 00000000000..397781e87ac
99 --- /dev/null
100 +++ b/media-libs/fontconfig/files/fontconfig-2.12.3-latin-update.patch
101 @@ -0,0 +1,68 @@
102 +--- fontconfig-2.12.3/conf.d/60-latin.conf
103 ++++ fontconfig-2.12.3/conf.d/60-latin.conf
104 +@@ -4,47 +4,50 @@
105 + <alias>
106 + <family>serif</family>
107 + <prefer>
108 +- <family>Bitstream Vera Serif</family>
109 ++ <family>Liberation Serif</family>
110 + <family>DejaVu Serif</family>
111 + <family>Times New Roman</family>
112 +- <family>Thorndale AMT</family>
113 + <family>Luxi Serif</family>
114 + <family>Nimbus Roman No9 L</family>
115 + <family>Nimbus Roman</family>
116 + <family>Times</family>
117 ++ <family>Thorndale AMT</family>
118 ++ <family>Bitstream Vera Serif</family>
119 + </prefer>
120 + </alias>
121 + <alias>
122 + <family>sans-serif</family>
123 + <prefer>
124 +- <family>Bitstream Vera Sans</family>
125 ++ <family>Liberation Sans</family>
126 + <family>DejaVu Sans</family>
127 +- <family>Verdana</family>
128 + <family>Arial</family>
129 +- <family>Albany AMT</family>
130 + <family>Luxi Sans</family>
131 + <family>Nimbus Sans L</family>
132 + <family>Nimbus Sans</family>
133 + <family>Helvetica</family>
134 + <family>Lucida Sans Unicode</family>
135 + <family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
136 ++ <family>Verdana</family>
137 + <family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
138 ++ <family>Albany AMT</family>
139 ++ <family>Bitstream Vera Sans</family>
140 + </prefer>
141 + </alias>
142 + <alias>
143 + <family>monospace</family>
144 + <prefer>
145 +- <family>Bitstream Vera Sans Mono</family>
146 ++ <family>Liberation Mono</family>
147 + <family>DejaVu Sans Mono</family>
148 + <family>Inconsolata</family>
149 + <family>Andale Mono</family>
150 + <family>Courier New</family>
151 +- <family>Cumberland AMT</family>
152 + <family>Luxi Mono</family>
153 + <family>Nimbus Mono L</family>
154 + <family>Nimbus Mono</family>
155 + <family>Nimbus Mono PS</family>
156 + <family>Courier</family>
157 ++ <family>Cumberland AMT</family>
158 ++ <family>Bitstream Vera Sans Mono</family>
159 + </prefer>
160 + </alias>
161 + <!--
162 +@@ -65,6 +68,7 @@
163 + <alias>
164 + <family>cursive</family>
165 + <prefer>
166 ++ <family>Comic Neue</family>
167 + <family>ITC Zapf Chancery Std</family>
168 + <family>Zapfino</family>
169 + <family>Comic Sans MS</family>
170
171 diff --git a/media-libs/fontconfig/fontconfig-2.12.3.ebuild b/media-libs/fontconfig/fontconfig-2.12.3.ebuild
172 new file mode 100644
173 index 00000000000..e0156b44467
174 --- /dev/null
175 +++ b/media-libs/fontconfig/fontconfig-2.12.3.ebuild
176 @@ -0,0 +1,161 @@
177 +# Copyright 1999-2017 Gentoo Foundation
178 +# Distributed under the terms of the GNU General Public License v2
179 +
180 +EAPI=6
181 +
182 +inherit autotools multilib-minimal readme.gentoo-r1
183 +
184 +DESCRIPTION="A library for configuring and customizing font access"
185 +HOMEPAGE="http://fontconfig.org/"
186 +SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
187 +
188 +LICENSE="MIT"
189 +SLOT="1.0"
190 +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"
191 +IUSE="doc static-libs"
192 +
193 +# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
194 +# default and used by every distro. See bug #283191.
195 +RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
196 + >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}]
197 + abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
198 +DEPEND="${RDEPEND}
199 + virtual/pkgconfig
200 + doc? ( =app-text/docbook-sgml-dtd-3.1*
201 + app-text/docbook-sgml-utils[jadetex] )"
202 +PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
203 + virtual/ttf-fonts"
204 +
205 +PATCHES=(
206 + "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
207 + "${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make liberation default
208 +)
209 +
210 +MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
211 +
212 +pkg_setup() {
213 + DOC_CONTENTS="Please make fontconfig configuration changes using
214 + \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
215 + overwritten. If you need to reset your configuration to upstream defaults,
216 + delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
217 +}
218 +
219 +src_prepare() {
220 + default
221 +
222 + # Revert gperf-3.1 fix as it breaks compilation
223 + eapply -R "${FILESDIR}"/${PN}-2.12.2-gperf31.patch
224 +
225 + eautoreconf
226 +}
227 +
228 +multilib_src_configure() {
229 + local addfonts
230 + # harvest some font locations, such that users can benefit from the
231 + # host OS's installed fonts
232 + case ${CHOST} in
233 + *-darwin*)
234 + addfonts=",/Library/Fonts,/System/Library/Fonts"
235 + ;;
236 + *-solaris*)
237 + [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
238 + addfonts=",/usr/X/lib/X11/fonts/TrueType"
239 + [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
240 + addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
241 + ;;
242 + *-linux-gnu)
243 + use prefix && [[ -d /usr/share/fonts ]] && \
244 + addfonts=",/usr/share/fonts"
245 + ;;
246 + esac
247 +
248 + local myeconfargs=(
249 + $(use_enable doc docbook)
250 + --enable-docs
251 + --localstatedir="${EPREFIX}"/var
252 + --with-default-fonts="${EPREFIX}"/usr/share/fonts
253 + --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}"
254 + --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
255 + )
256 +
257 + ECONF_SOURCE="${S}" \
258 + econf "${myeconfargs[@]}"
259 +}
260 +
261 +multilib_src_install() {
262 + default
263 +
264 + # avoid calling this multiple times, bug #459210
265 + if multilib_is_native_abi; then
266 + # stuff installed from build-dir
267 + emake -C doc DESTDIR="${D}" install-man
268 +
269 + insinto /etc/fonts
270 + doins fonts.conf
271 + fi
272 +}
273 +
274 +multilib_src_install_all() {
275 + einstalldocs
276 + find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
277 +
278 + # fc-lang directory contains language coverage datafiles
279 + # which are needed to test the coverage of fonts.
280 + insinto /usr/share/fc-lang
281 + doins fc-lang/*.orth
282 +
283 + dodoc doc/fontconfig-user.{txt,pdf}
284 +
285 + if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then
286 + mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die
287 + rm -rf "${ED}"usr/share/doc/fontconfig
288 + fi
289 +
290 + # Changes should be made to /etc/fonts/local.conf, and as we had
291 + # too much problems with broken fonts.conf we force update it ...
292 + echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
293 + doenvd "${T}"/37fontconfig
294 +
295 + # As of fontconfig 2.7, everything sticks their noses in here.
296 + dodir /etc/sandbox.d
297 + echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig
298 +
299 + readme.gentoo_create_doc
300 +}
301 +
302 +pkg_preinst() {
303 + # Bug #193476
304 + # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
305 + # config files. If we install as-is, we'll blow away user settings.
306 + ebegin "Syncing fontconfig configuration to system"
307 + if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
308 + for file in "${EROOT}"/etc/fonts/conf.avail/*; do
309 + f=${file##*/}
310 + if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
311 + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
312 + && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null
313 + else
314 + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
315 + && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null
316 + fi
317 + done
318 + fi
319 + eend $?
320 +}
321 +
322 +pkg_postinst() {
323 + einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/"
324 + find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete
325 +
326 + readme.gentoo_print_elog
327 +
328 + if [[ ${ROOT} = / ]]; then
329 + multilib_pkg_postinst() {
330 + ebegin "Creating global font cache for ${ABI}"
331 + "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
332 + eend $?
333 + }
334 +
335 + multilib_parallel_foreach_abi multilib_pkg_postinst
336 + fi
337 +}