1 |
commit: 1b664ed0a515f87fee504d984a3dfd4b0d3bcd4e |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 29 09:03:42 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 09:03:42 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b664ed0 |
7 |
|
8 |
media-libs/fontconfig: add 2.14.2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
media-libs/fontconfig/Manifest | 1 + |
13 |
media-libs/fontconfig/fontconfig-2.14.2.ebuild | 216 +++++++++++++++++++++++++ |
14 |
2 files changed, 217 insertions(+) |
15 |
|
16 |
diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest |
17 |
index cba7bf04f021..1577f159cec8 100644 |
18 |
--- a/media-libs/fontconfig/Manifest |
19 |
+++ b/media-libs/fontconfig/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST fontconfig-2.14.0.tar.xz 1431056 BLAKE2B 880f34d33ac30158ea61e922f6635900c5b244c2eb5d259f7947a364df86ee13f6190f651471b0a28bcd3c13f19c970783517903df374839e474921611dff1ff SHA512 a5257249d031b3cd1a7b1521cd58f48d235a970020da4136a727db5407ec98e74a3776bc467d7e39f30ec664f56ff9fe39068317744a5e737a65109f7a005bfc |
22 |
DIST fontconfig-2.14.1.tar.xz 1447044 BLAKE2B 4bee654f4196922fb07673f588b4bf8a651bbcc8b882b20712814ff253adf6457c3c4b4c2f5549bac37ed3f152e9993988f00d04e2516c911eb13747fc4a1c73 SHA512 ba42e6f90ec92914895d2157c872c373adfc17be791b92253bcc40e85674a84e43c08ab2b37c3ae85b53b2e7bd2a7847abb479043f303b732c08eeac3ee733db |
23 |
+DIST fontconfig-2.14.2.tar.xz 1440844 BLAKE2B 4efeeb7f9a6705d493128d00b60e681a20a47556f4c0d7787a5c7a6d2cbbc22f150cad7988a9836a9e72aeb61e2b6a196c00a071c7042c62283c7720cdbb743d SHA512 23483e0ae6aa7589fd37f9949a4cf951c5bff981739dbb446881e4cea86a208c0ab31e2358666eac724af1dc6a689a42733a7ce91cd3e76d8d91eacedb318085 |
24 |
|
25 |
diff --git a/media-libs/fontconfig/fontconfig-2.14.2.ebuild b/media-libs/fontconfig/fontconfig-2.14.2.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..a7eb1fcf0c0c |
28 |
--- /dev/null |
29 |
+++ b/media-libs/fontconfig/fontconfig-2.14.2.ebuild |
30 |
@@ -0,0 +1,216 @@ |
31 |
+# Copyright 1999-2023 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python3_{9..11} ) |
37 |
+inherit multilib meson-multilib python-any-r1 readme.gentoo-r1 |
38 |
+ |
39 |
+DESCRIPTION="A library for configuring and customizing font access" |
40 |
+HOMEPAGE="https://fontconfig.org/" |
41 |
+SRC_URI="https://fontconfig.org/release/${P}.tar.xz" |
42 |
+ |
43 |
+LICENSE="MIT" |
44 |
+SLOT="1.0" |
45 |
+if ! [[ $(ver_cut 3) -ge 90 ]] ; then |
46 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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" |
47 |
+fi |
48 |
+IUSE="doc nls test" |
49 |
+RESTRICT="!test? ( test )" |
50 |
+ |
51 |
+# - Check minimum freetype & other deps on bumps. See |
52 |
+# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/configure.ac#L314. |
53 |
+# Note that FT versioning is confusing, need to map it using |
54 |
+# https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT |
55 |
+# But sometimes it's actually greater than that, e.g. see Fedora's spec file |
56 |
+# https://src.fedoraproject.org/rpms/fontconfig/blob/rawhide/f/fontconfig.spec#_1 |
57 |
+# |
58 |
+# - Purposefully dropped the xml USE flag and libxml2 support. Expat is the |
59 |
+# default and used by every distro. See bug #283191. |
60 |
+# |
61 |
+# - There's a test-only dep on json-c. |
62 |
+# It might become an optional(?) runtime dep in future though. Who knows. |
63 |
+# Keep an eye on it. |
64 |
+RDEPEND=" |
65 |
+ >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] |
66 |
+ >=media-libs/freetype-2.9.1[${MULTILIB_USEDEP}] |
67 |
+ virtual/libintl[${MULTILIB_USEDEP}] |
68 |
+ !elibc_Darwin? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) ) |
69 |
+ elibc_Darwin? ( sys-libs/native-uuid ) |
70 |
+ elibc_SunOS? ( sys-libs/libuuid ) |
71 |
+" |
72 |
+DEPEND=" |
73 |
+ ${RDEPEND} |
74 |
+ test? ( dev-libs/json-c ) |
75 |
+" |
76 |
+BDEPEND=" |
77 |
+ ${PYTHON_DEPS} |
78 |
+ dev-util/gperf |
79 |
+ virtual/pkgconfig |
80 |
+ doc? ( |
81 |
+ =app-text/docbook-sgml-dtd-3.1* |
82 |
+ app-text/docbook-sgml-utils[jadetex] |
83 |
+ ) |
84 |
+ nls? ( >=sys-devel/gettext-0.19.8 ) |
85 |
+" |
86 |
+PDEPEND="virtual/ttf-fonts" |
87 |
+# We need app-eselect/eselect-fontconfig in IDEPEND to update ROOT |
88 |
+# when cross-compiling. |
89 |
+IDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )" |
90 |
+ |
91 |
+PATCHES=( |
92 |
+ # bug #130466 + make liberation default |
93 |
+ "${FILESDIR}"/${PN}-2.14.0-latin-update.patch |
94 |
+ # Avoid test failure (bubblewrap doesn't work within sandbox) |
95 |
+ "${FILESDIR}"/${PN}-2.14.0-skip-bubblewrap-tests.patch |
96 |
+ |
97 |
+ # Patches from upstream (can usually be removed with next version bump) |
98 |
+) |
99 |
+ |
100 |
+DOC_CONTENTS="Please make fontconfig configuration changes using |
101 |
+\`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be |
102 |
+overwritten. If you need to reset your configuration to upstream defaults, |
103 |
+delete the directory ${EROOT}/etc/fonts/conf.d/ and re-emerge fontconfig." |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ |
108 |
+ # Test needs network access |
109 |
+ # https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/319 |
110 |
+ # On bumps, please check to see if this has been fixed |
111 |
+ # to allow local access! |
112 |
+ sed -i -e '/test-crbug1004254/d' test/meson.build || die |
113 |
+} |
114 |
+ |
115 |
+multilib_src_configure() { |
116 |
+ local addfonts=( |
117 |
+ "${EPREFIX}"/usr/local/share/fonts |
118 |
+ ) |
119 |
+ |
120 |
+ # Harvest some font locations, such that users can benefit from the |
121 |
+ # host OS's installed fonts |
122 |
+ case ${CHOST} in |
123 |
+ *-darwin*) |
124 |
+ addfonts+=( |
125 |
+ /Library/Fonts |
126 |
+ /System/Library/Fonts |
127 |
+ ) |
128 |
+ ;; |
129 |
+ |
130 |
+ *-solaris*) |
131 |
+ [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \ |
132 |
+ addfonts+=( /usr/X/lib/X11/fonts/TrueType ) |
133 |
+ [[ -d /usr/X/lib/X11/fonts/Type1 ]] && |
134 |
+ addfonts+=( /usr/X/lib/X11/fonts/Type1 ) |
135 |
+ ;; |
136 |
+ |
137 |
+ *-linux-gnu) |
138 |
+ use prefix && [[ -d /usr/share/fonts ]] && \ |
139 |
+ addfonts+=( /usr/share/fonts ) |
140 |
+ ;; |
141 |
+ esac |
142 |
+ |
143 |
+ local emesonargs=( |
144 |
+ # USE=doc only controls the additional bits like html/pdf |
145 |
+ # and regeneration of man pages from source. We always install |
146 |
+ # the prebuilt man pages. |
147 |
+ $(meson_native_use_feature doc) |
148 |
+ $(meson_native_use_feature doc doc-txt) |
149 |
+ $(meson_native_use_feature doc doc-html) |
150 |
+ $(meson_native_use_feature doc doc-man) |
151 |
+ $(meson_native_use_feature doc doc-pdf) |
152 |
+ |
153 |
+ $(meson_native_use_feature nls) |
154 |
+ $(meson_feature test tests) |
155 |
+ |
156 |
+ -Dcache-build=disabled |
157 |
+ -Dcache-dir="${EPREFIX}"/var/cache/fontconfig |
158 |
+ -Ddefault-fonts-dirs="${EPREFIX}"/usr/share/fonts |
159 |
+ -Dadditional-fonts-dirs=$(IFS=, ; echo "${addfonts[*]}" ) |
160 |
+ -Dtemplate-dir="${EPREFIX}"/etc/fonts/conf.avail |
161 |
+ ) |
162 |
+ |
163 |
+ meson_src_configure |
164 |
+} |
165 |
+ |
166 |
+multilib_src_install() { |
167 |
+ MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) ) |
168 |
+ |
169 |
+ meson_src_install |
170 |
+ |
171 |
+ # Avoid calling this multiple times, bug #459210 |
172 |
+ if multilib_is_native_abi; then |
173 |
+ insinto /etc/fonts |
174 |
+ doins fonts.conf |
175 |
+ fi |
176 |
+} |
177 |
+ |
178 |
+multilib_src_install_all() { |
179 |
+ einstalldocs |
180 |
+ |
181 |
+ # fc-lang directory contains language coverage datafiles |
182 |
+ # which are needed to test the coverage of fonts. |
183 |
+ insinto /usr/share/fc-lang |
184 |
+ doins fc-lang/*.orth |
185 |
+ |
186 |
+ dodoc doc/fontconfig-user.{txt,pdf} |
187 |
+ |
188 |
+ if ! use doc ; then |
189 |
+ find "${S}" -name "*.[[:digit:]]" -type f -exec doman '{}' + || die |
190 |
+ fi |
191 |
+ |
192 |
+ if [[ -e ${ED}/usr/share/doc/fontconfig/ ]] ; then |
193 |
+ mv "${ED}"/usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${PF} || die |
194 |
+ rm -rf "${ED}"/usr/share/doc/fontconfig || die |
195 |
+ fi |
196 |
+ |
197 |
+ # Changes should be made to /etc/fonts/local.conf, and as we had |
198 |
+ # too much problems with broken fonts.conf we force update it ... |
199 |
+ echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig || die |
200 |
+ doenvd "${T}"/37fontconfig |
201 |
+ |
202 |
+ # As of fontconfig 2.7, everything sticks their noses in here. |
203 |
+ dodir /etc/sandbox.d |
204 |
+ echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig || die |
205 |
+ |
206 |
+ readme.gentoo_create_doc |
207 |
+} |
208 |
+ |
209 |
+pkg_preinst() { |
210 |
+ # bug #193476 |
211 |
+ # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various |
212 |
+ # config files. If we install as-is, we'll blow away user settings. |
213 |
+ ebegin "Syncing fontconfig configuration to system" |
214 |
+ if [[ -e ${EROOT}/etc/fonts/conf.d ]] ; then |
215 |
+ local file f |
216 |
+ for file in "${EROOT}"/etc/fonts/conf.avail/* ; do |
217 |
+ f=${file##*/} |
218 |
+ if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]] ; then |
219 |
+ [[ -f ${ED}/etc/fonts/conf.avail/${f} ]] \ |
220 |
+ && ln -sf ../conf.avail/"${f}" \ |
221 |
+ "${ED}"/etc/fonts/conf.d/ &>/dev/null |
222 |
+ else |
223 |
+ [[ -f ${ED}/etc/fonts/conf.avail/${f} ]] \ |
224 |
+ && rm "${ED}"/etc/fonts/conf.d/"${f}" &>/dev/null |
225 |
+ fi |
226 |
+ done |
227 |
+ fi |
228 |
+ eend $? |
229 |
+} |
230 |
+ |
231 |
+pkg_postinst() { |
232 |
+ einfo "Cleaning broken symlinks in ${EROOT}/etc/fonts/conf.d/" |
233 |
+ find -L "${EROOT}"/etc/fonts/conf.d/ -type l -delete |
234 |
+ |
235 |
+ readme.gentoo_print_elog |
236 |
+ |
237 |
+ if [[ -z ${ROOT} ]] ; then |
238 |
+ multilib_pkg_postinst() { |
239 |
+ ebegin "Creating global font cache for ${ABI}" |
240 |
+ "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf |
241 |
+ eend $? |
242 |
+ } |
243 |
+ |
244 |
+ multilib_parallel_foreach_abi multilib_pkg_postinst |
245 |
+ fi |
246 |
+} |