Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/fontconfig/, media-libs/fontconfig/files/
Date: Sat, 02 Apr 2022 03:07:54
Message-Id: 1648868851.7ad7b980f0cc6497bed201469ce0d5949260d558.sam@gentoo
1 commit: 7ad7b980f0cc6497bed201469ce0d5949260d558
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 1 23:20:01 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 2 03:07:31 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ad7b980
7
8 media-libs/fontconfig: add 2.14.0
9
10 - Clean up ebuild
11 - Rebased patches (and submitted our docbook one upstream)
12 - Add json-c test-only dependency
13 - Scrub patches
14 - Drop global scope usage from 2.13.93 while at it (fixes previous cleanup)
15 - Rely on cache generation to create /var/cache/fontconfig
16
17 Closes: https://bugs.gentoo.org/587492
18 Closes: https://bugs.gentoo.org/710184
19 Closes: https://bugs.gentoo.org/785100
20 Fixes: 35ac56d0683de8ad8ab4316b109ef77a88a77300
21 Signed-off-by: Sam James <sam <AT> gentoo.org>
22
23 media-libs/fontconfig/Manifest | 1 +
24 .../files/fontconfig-2.10.2-docbook.patch | 6 +-
25 .../files/fontconfig-2.13.1-proper_homedir.patch | 10 --
26 .../files/fontconfig-2.13.1-static_build.patch | 10 --
27 .../files/fontconfig-2.14.0-docbook.patch | 29 +++++
28 .../files/fontconfig-2.14.0-latin-update.patch | 66 ++++++++++
29 .../fontconfig-2.14.0-skip-bubblewrap-tests.patch | 14 ++
30 media-libs/fontconfig/fontconfig-2.13.93.ebuild | 2 -
31 ...fig-2.13.93.ebuild => fontconfig-2.14.0.ebuild} | 141 ++++++++++++---------
32 9 files changed, 196 insertions(+), 83 deletions(-)
33
34 diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
35 index 21aef1e5b150..a42cf3ac9874 100644
36 --- a/media-libs/fontconfig/Manifest
37 +++ b/media-libs/fontconfig/Manifest
38 @@ -1,2 +1,3 @@
39 DIST fontconfig-2.13.1.tar.bz2 1723639 BLAKE2B 08b9a522a9d89bc5e5ed0f0898182359efb110f22b6b7010f6bdda0d6d516957ea74ebe0703d684d4724fd9f44a2eaf50d8329d4e0f4e45e79f50466d808b9e1 SHA512 f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100
40 DIST fontconfig-2.13.93.tar.xz 1418288 BLAKE2B 2be273c21c16f9bb2dfe618177eaf2de48610a145d402ba53becc1c4c2d0417a9cd0ce969d4521ff00c8c71e4b1d65e4bf945da56e140434244b81e7e24ecb7a SHA512 1ba119ea3faba662e108df6fce22f242eb2b7c5ec087159ca0cb76944991b19563f744c181263343941c50547bc0c73c6437d5380df09b5029facaab80465b58
41 +DIST fontconfig-2.14.0.tar.xz 1431056 BLAKE2B 880f34d33ac30158ea61e922f6635900c5b244c2eb5d259f7947a364df86ee13f6190f651471b0a28bcd3c13f19c970783517903df374839e474921611dff1ff SHA512 a5257249d031b3cd1a7b1521cd58f48d235a970020da4136a727db5407ec98e74a3776bc467d7e39f30ec664f56ff9fe39068317744a5e737a65109f7a005bfc
42
43 diff --git a/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch
44 index 33d6549c8147..94bea6327148 100644
45 --- a/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch
46 +++ b/media-libs/fontconfig/files/fontconfig-2.10.2-docbook.patch
47 @@ -1,6 +1,6 @@
48 -diff --unified -uNrp fontconfig-2.10.2-orig/configure.ac fontconfig-2.10.2/configure.ac
49 ---- fontconfig-2.10.2-orig/configure.ac 2012-11-26 09:21:13.000000000 +0100
50 -+++ fontconfig-2.10.2/configure.ac 2013-01-05 15:40:54.541682239 +0100
51 +https://bugs.gentoo.org/310157
52 +--- fontconfig-2.10.2-orig/configure.ac
53 ++++ fontconfig-2.10.2/configure.ac
54 @@ -570,7 +570,11 @@ AC_SUBST(XMLDIR)
55 # Let people not build/install docs if they don't have docbook
56 #
57
58 diff --git a/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch b/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch
59 index 19aee94ba988..71c27f56f644 100644
60 --- a/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch
61 +++ b/media-libs/fontconfig/files/fontconfig-2.13.1-proper_homedir.patch
62 @@ -7,8 +7,6 @@ Subject: [PATCH] Fix the issue that '~' wasn't extracted to the proper homedir
63 this behavior was broken by d1f48f11. this change fixes it back to the correct behavior.
64
65 https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/110
66 -diff --git a/src/fccfg.c b/src/fccfg.c
67 -index d7c48e8..4a53581 100644
68 --- a/src/fccfg.c
69 +++ b/src/fccfg.c
70 @@ -2207,17 +2207,19 @@ FcConfigFilename (const FcChar8 *url)
71 @@ -40,8 +38,6 @@ index d7c48e8..4a53581 100644
72 return file;
73 }
74
75 -diff --git a/test/Makefile.am b/test/Makefile.am
76 -index 79bcede..9f4d48a 100644
77 --- a/test/Makefile.am
78 +++ b/test/Makefile.am
79 @@ -91,6 +91,22 @@ test_bz106632_CFLAGS = \
80 @@ -67,9 +63,6 @@ index 79bcede..9f4d48a 100644
81 EXTRA_DIST=run-test.sh run-test-conf.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
82
83 CLEANFILES=out out1 out2 fonts.conf out.expected
84 -diff --git a/test/test-issue110.c b/test/test-issue110.c
85 -new file mode 100644
86 -index 0000000..28a3bd2
87 --- /dev/null
88 +++ b/test/test-issue110.c
89 @@ -0,0 +1,245 @@
90 @@ -318,6 +311,3 @@ index 0000000..28a3bd2
91 + return retval;
92 +}
93 +
94 ---
95 -2.18.0
96 -
97
98 diff --git a/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch b/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
99 index 7a0edfd849ab..d78317da0b3c 100644
100 --- a/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
101 +++ b/media-libs/fontconfig/files/fontconfig-2.13.1-static_build.patch
102 @@ -4,9 +4,6 @@ Date: Mon, 3 Sep 2018 04:56:16 +0000
103 Subject: [PATCH] Fix the build issue with --enable-static
104
105 Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/109
106 ----
107 -diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
108 -index bac1dda..af870d0 100644
109 --- a/fontconfig/fontconfig.h
110 +++ b/fontconfig/fontconfig.h
111 @@ -1076,6 +1076,10 @@ FcUtf16Len (const FcChar8 *string,
112 @@ -20,8 +17,6 @@ index bac1dda..af870d0 100644
113 FcPublic FcChar8 *
114 FcStrDirname (const FcChar8 *file);
115
116 -diff --git a/src/fcint.h b/src/fcint.h
117 -index de78cd8..a9d075a 100644
118 --- a/src/fcint.h
119 +++ b/src/fcint.h
120 @@ -1282,10 +1282,6 @@ FcStrUsesHome (const FcChar8 *s);
121 @@ -35,8 +30,6 @@ index de78cd8..a9d075a 100644
122 FcPrivate FcChar8 *
123 FcStrLastSlash (const FcChar8 *path);
124
125 -diff --git a/test/test-bz106632.c b/test/test-bz106632.c
126 -index daa0c1e..2d67c2e 100644
127 --- a/test/test-bz106632.c
128 +++ b/test/test-bz106632.c
129 @@ -25,25 +25,26 @@
130 @@ -96,6 +89,3 @@ index daa0c1e..2d67c2e 100644
131 int
132 main (void)
133 {
134 ---
135 -2.18.0
136 -
137
138 diff --git a/media-libs/fontconfig/files/fontconfig-2.14.0-docbook.patch b/media-libs/fontconfig/files/fontconfig-2.14.0-docbook.patch
139 new file mode 100644
140 index 000000000000..b9d5e8e5b5e2
141 --- /dev/null
142 +++ b/media-libs/fontconfig/files/fontconfig-2.14.0-docbook.patch
143 @@ -0,0 +1,29 @@
144 +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/223
145 +
146 +From d4a8381169984246dbb14b7a810abd170d7d0afd Mon Sep 17 00:00:00 2001
147 +From: Sam James <sam@g.o>
148 +Date: Sat, 2 Apr 2022 02:36:24 +0100
149 +Subject: [PATCH] configure.ac: allow disabling docbook
150 +
151 +Sometimes we might want to build docs (install man pages, etc)
152 +but allow disabling use of docbook.
153 +
154 +Bug: https://bugs.gentoo.org/310157
155 +Signed-off-by: Sam James <sam@g.o>
156 +--- a/configure.ac
157 ++++ b/configure.ac
158 +@@ -736,7 +736,13 @@ dnl ===========================================================================
159 + # Let people not build/install docs if they don't have docbook
160 + #
161 +
162 +-AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
163 ++AC_ARG_ENABLE(docbook,
164 ++ [AS_HELP_STRING([--disable-docbook],
165 ++ [Disable building docs with docbook2html (default: no)])],,)
166 ++
167 ++if test x$enable_docbook != xno; then
168 ++ AC_CHECK_PROG(HASDOCBOOK, docbook2html, yes, no)
169 ++fi
170 +
171 + AM_CONDITIONAL(USEDOCBOOK, test "x$HASDOCBOOK" = xyes)
172 +
173
174 diff --git a/media-libs/fontconfig/files/fontconfig-2.14.0-latin-update.patch b/media-libs/fontconfig/files/fontconfig-2.14.0-latin-update.patch
175 new file mode 100644
176 index 000000000000..2ae36f4ae4d6
177 --- /dev/null
178 +++ b/media-libs/fontconfig/files/fontconfig-2.14.0-latin-update.patch
179 @@ -0,0 +1,66 @@
180 +https://bugs.gentoo.org/130466
181 +--- a/conf.d/60-latin.conf
182 ++++ b/conf.d/60-latin.conf
183 +@@ -5,47 +5,50 @@
184 + <alias>
185 + <family>serif</family>
186 + <prefer>
187 ++ <family>Liberation Serif</family>
188 + <family>Noto Serif</family>
189 + <family>DejaVu Serif</family>
190 + <family>Times New Roman</family>
191 +- <family>Thorndale AMT</family>
192 + <family>Luxi Serif</family>
193 + <family>Nimbus Roman No9 L</family>
194 + <family>Nimbus Roman</family>
195 + <family>Times</family>
196 ++ <family>Thorndale AMT</family>
197 + </prefer>
198 + </alias>
199 + <alias>
200 + <family>sans-serif</family>
201 + <prefer>
202 ++ <family>Liberation Sans</family>
203 + <family>Noto Sans</family>
204 + <family>DejaVu Sans</family>
205 +- <family>Verdana</family>
206 + <family>Arial</family>
207 +- <family>Albany AMT</family>
208 + <family>Luxi Sans</family>
209 + <family>Nimbus Sans L</family>
210 + <family>Nimbus Sans</family>
211 + <family>Helvetica</family>
212 + <family>Lucida Sans Unicode</family>
213 + <family>BPG Glaho International</family> <!-- lat,cyr,arab,geor -->
214 ++ <family>Verdana</family>
215 + <family>Tahoma</family> <!-- lat,cyr,greek,heb,arab,thai -->
216 ++ <family>Albany AMT</family>
217 + </prefer>
218 + </alias>
219 + <alias>
220 + <family>monospace</family>
221 + <prefer>
222 ++ <family>Liberation Mono</family>
223 + <family>Noto Sans Mono</family>
224 + <family>DejaVu Sans Mono</family>
225 + <family>Inconsolata</family>
226 + <family>Andale Mono</family>
227 + <family>Courier New</family>
228 +- <family>Cumberland AMT</family>
229 + <family>Luxi Mono</family>
230 + <family>Nimbus Mono L</family>
231 + <family>Nimbus Mono</family>
232 + <family>Nimbus Mono PS</family>
233 + <family>Courier</family>
234 ++ <family>Cumberland AMT</family>
235 + </prefer>
236 + </alias>
237 + <!--
238 +@@ -66,6 +69,7 @@
239 + <alias>
240 + <family>cursive</family>
241 + <prefer>
242 ++ <family>Comic Neue</family>
243 + <family>ITC Zapf Chancery Std</family>
244 + <family>Zapfino</family>
245 + <family>Comic Sans MS</family>
246
247 diff --git a/media-libs/fontconfig/files/fontconfig-2.14.0-skip-bubblewrap-tests.patch b/media-libs/fontconfig/files/fontconfig-2.14.0-skip-bubblewrap-tests.patch
248 new file mode 100644
249 index 000000000000..7d0041ad9765
250 --- /dev/null
251 +++ b/media-libs/fontconfig/files/fontconfig-2.14.0-skip-bubblewrap-tests.patch
252 @@ -0,0 +1,14 @@
253 +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/320
254 +--- a/test/run-test.sh
255 ++++ b/test/run-test.sh
256 +@@ -40,9 +40,7 @@ EXPECTED=${EXPECTED-"out.expected"}
257 + FCLIST="$LOG_COMPILER ../fc-list/fc-list$EXEEXT"
258 + FCCACHE="$LOG_COMPILER ../fc-cache/fc-cache$EXEEXT"
259 +
260 +-if [ -x "$(command -v bwrap)" ]; then
261 +- BWRAP="$(command -v bwrap)"
262 +-fi
263 ++BWRAP=""
264 +
265 + FONT1=$TESTDIR/4x6.pcf
266 + FONT2=$TESTDIR/8x16.pcf
267
268 diff --git a/media-libs/fontconfig/fontconfig-2.13.93.ebuild b/media-libs/fontconfig/fontconfig-2.13.93.ebuild
269 index a88e04398db3..72b70d969b41 100644
270 --- a/media-libs/fontconfig/fontconfig-2.13.93.ebuild
271 +++ b/media-libs/fontconfig/fontconfig-2.13.93.ebuild
272 @@ -51,8 +51,6 @@ PATCHES=(
273 # Patches from upstream (can usually be removed with next version bump)
274 )
275
276 -MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
277 -
278 pkg_setup() {
279 DOC_CONTENTS="Please make fontconfig configuration changes using
280 \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
281
282 diff --git a/media-libs/fontconfig/fontconfig-2.13.93.ebuild b/media-libs/fontconfig/fontconfig-2.14.0.ebuild
283 similarity index 56%
284 copy from media-libs/fontconfig/fontconfig-2.13.93.ebuild
285 copy to media-libs/fontconfig/fontconfig-2.14.0.ebuild
286 index a88e04398db3..64af2b159179 100644
287 --- a/media-libs/fontconfig/fontconfig-2.13.93.ebuild
288 +++ b/media-libs/fontconfig/fontconfig-2.14.0.ebuild
289 @@ -1,8 +1,10 @@
290 # Copyright 1999-2022 Gentoo Authors
291 # Distributed under the terms of the GNU General Public License v2
292
293 -EAPI=7
294 +EAPI=8
295
296 +# Cannot yet migrate to Meson as of 2.14.0:
297 +# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/244
298 inherit autotools multilib-minimal readme.gentoo-r1
299
300 DESCRIPTION="A library for configuring and customizing font access"
301 @@ -11,20 +13,33 @@ SRC_URI="https://fontconfig.org/release/${P}.tar.xz"
302
303 LICENSE="MIT"
304 SLOT="1.0"
305 -[[ $(ver_cut 3) -ge 90 ]] || \
306 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
307 -IUSE="doc static-libs"
308 -
309 -# Test test-bz106632 is known to be broken, see bug #751232
310 -# and would require several backports. It will be fixed in
311 -# next version.
312 -# check-missing-doc is known to be broken, see bug #733608
313 -# because fontconfig-2.13.1-static_build.patch introduces a
314 -# function FcStrBuildFilename which is lacking documentation.
315 -# However, backporting isn't worth it. Will be fixed in
316 -# next version.
317 -RESTRICT="test"
318 -
319 +if ! [[ $(ver_cut 3) -ge 90 ]] ; then
320 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
321 +fi
322 +IUSE="doc static-libs test"
323 +RESTRICT="!test? ( test )"
324 +
325 +# - Check minimum freetype & other deps on bumps. See
326 +# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/configure.ac#L314.
327 +# Note that FT versioning is confusing, need to map it using
328 +# https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT
329 +# But sometimes it's actually greater than that, e.g. see Fedora's spec file
330 +# https://src.fedoraproject.org/rpms/fontconfig/blob/rawhide/f/fontconfig.spec#_1
331 +#
332 +# - Purposefully dropped the xml USE flag and libxml2 support. Expat is the
333 +# default and used by every distro. See bug #283191.
334 +#
335 +# - There's a test-only dep on json-c.
336 +# It might become an optional(?) runtime dep in future though. Who knows.
337 +# Keep an eye on it.
338 +RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
339 + >=media-libs/freetype-2.9.1[${MULTILIB_USEDEP}]
340 + !elibc_Darwin? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) )
341 + elibc_Darwin? ( sys-libs/native-uuid )
342 + elibc_SunOS? ( sys-libs/libuuid )
343 + virtual/libintl[${MULTILIB_USEDEP}]"
344 +DEPEND="${RDEPEND}
345 + test? ( dev-libs/json-c )"
346 BDEPEND="dev-util/gperf
347 >=sys-devel/gettext-0.19.8
348 virtual/pkgconfig
349 @@ -32,91 +47,98 @@ BDEPEND="dev-util/gperf
350 =app-text/docbook-sgml-dtd-3.1*
351 app-text/docbook-sgml-utils[jadetex]
352 )"
353 -# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
354 -# default and used by every distro. See bug #283191.
355 -RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
356 - >=media-libs/freetype-2.9[${MULTILIB_USEDEP}]
357 - !elibc_Darwin? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) )
358 - elibc_Darwin? ( sys-libs/native-uuid )
359 - elibc_SunOS? ( sys-libs/libuuid )
360 - virtual/libintl[${MULTILIB_USEDEP}]"
361 -DEPEND="${RDEPEND}"
362 PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
363 virtual/ttf-fonts"
364
365 PATCHES=(
366 - "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
367 - "${FILESDIR}"/${PN}-2.13.93-latin-update.patch # 130466 + make liberation default
368 + # bug #310157
369 + "${FILESDIR}"/${PN}-2.14.0-docbook.patch
370 + # bug #130466 + make liberation default
371 + "${FILESDIR}"/${PN}-2.14.0-latin-update.patch
372 + # Avoid test failure (bubblewrap doesn't work within sandbox)
373 + "${FILESDIR}"/${PN}-2.14.0-skip-bubblewrap-tests.patch
374
375 # Patches from upstream (can usually be removed with next version bump)
376 )
377
378 -MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
379 -
380 -pkg_setup() {
381 - DOC_CONTENTS="Please make fontconfig configuration changes using
382 - \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
383 - overwritten. If you need to reset your configuration to upstream defaults,
384 - delete the directory ${EROOT}/etc/fonts/conf.d/ and re-emerge fontconfig."
385 -}
386 +DOC_CONTENTS="Please make fontconfig configuration changes using
387 +\`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
388 +overwritten. If you need to reset your configuration to upstream defaults,
389 +delete the directory ${EROOT}/etc/fonts/conf.d/ and re-emerge fontconfig."
390
391 src_prepare() {
392 default
393 - eautoreconf
394
395 - # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/272
396 - # Please remove on next version bump!
397 - if [[ "${PV}" == 2.13.93 ]] ; then
398 - local sgmlfile
399 - for sgmlfile in doc/*.fncs ; do
400 - touch -r ${sgmlfile} ${sgmlfile//.fncs/.sgml} || die
401 - done
402 - else
403 - die "Forgot to clean up src_prepare()"
404 - fi
405 + # Needed for docbook patch
406 + eautoreconf
407 }
408
409 multilib_src_configure() {
410 - local addfonts
411 - # harvest some font locations, such that users can benefit from the
412 + local addfonts=(
413 + "${EPREFIX}"/usr/local/share/fonts
414 + )
415 +
416 + # Harvest some font locations, such that users can benefit from the
417 # host OS's installed fonts
418 case ${CHOST} in
419 *-darwin*)
420 - addfonts=",/Library/Fonts,/System/Library/Fonts"
421 + addfonts+=(
422 + /Library/Fonts
423 + /System/Library/Fonts
424 + )
425 ;;
426 +
427 *-solaris*)
428 [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
429 - addfonts=",/usr/X/lib/X11/fonts/TrueType"
430 - [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
431 - addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
432 + addfonts+=( /usr/X/lib/X11/fonts/TrueType )
433 + [[ -d /usr/X/lib/X11/fonts/Type1 ]] &&
434 + addfonts+=( /usr/X/lib/X11/fonts/Type1 )
435 ;;
436 +
437 *-linux-gnu)
438 use prefix && [[ -d /usr/share/fonts ]] && \
439 - addfonts=",/usr/share/fonts"
440 + addfonts+=( /usr/share/fonts )
441 ;;
442 esac
443
444 local myeconfargs=(
445 $(use_enable doc docbook)
446 $(use_enable static-libs static)
447 +
448 + # man pages. We split out the docbook parts into its own flag.
449 --enable-docs
450 + # We handle this ourselves.
451 + --disable-cache-build
452 + # See comment above *DEPEND. We use Expat instead.
453 + --disable-libxml2
454 +
455 --localstatedir="${EPREFIX}"/var
456 --with-default-fonts="${EPREFIX}"/usr/share/fonts
457 - --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}"
458 + --with-add-fonts=$(IFS=, ; echo "${addfonts[*]}" )
459 --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
460 )
461
462 ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
463 }
464
465 +multilib_src_test() {
466 + # Test needs network access
467 + # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/319
468 + # On bumps after 2.14.0, please check to see if this has been fixed
469 + # to allow local access!
470 + chmod -x test/test-crbug1004254 || die
471 +
472 + default
473 +}
474 +
475 multilib_src_install() {
476 MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
477
478 default
479
480 - # avoid calling this multiple times, bug #459210
481 + # Avoid calling this multiple times, bug #459210
482 if multilib_is_native_abi; then
483 - # stuff installed from build-dir
484 + # Stuff installed from build-dir
485 emake -C doc DESTDIR="${D}" install-man
486
487 insinto /etc/fonts
488 @@ -126,6 +148,7 @@ multilib_src_install() {
489
490 multilib_src_install_all() {
491 einstalldocs
492 +
493 find "${ED}" -name "*.la" -delete || die
494
495 # fc-lang directory contains language coverage datafiles
496 @@ -154,11 +177,13 @@ multilib_src_install_all() {
497
498 readme.gentoo_create_doc
499
500 - keepdir /var/cache/${PN}
501 + # We allow the cache generation to make this later
502 + # bug #587492
503 + rm -r "${ED}"/var/cache/fontconfig || die
504 }
505
506 pkg_preinst() {
507 - # Bug #193476
508 + # bug #193476
509 # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
510 # config files. If we install as-is, we'll blow away user settings.
511 ebegin "Syncing fontconfig configuration to system"
512 @@ -185,7 +210,7 @@ pkg_postinst() {
513
514 readme.gentoo_print_elog
515
516 - if [[ ${ROOT} == "" ]] ; then
517 + if [[ -z ${ROOT} ]] ; then
518 multilib_pkg_postinst() {
519 ebegin "Creating global font cache for ${ABI}"
520 "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf