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/
Date: Thu, 20 Jul 2017 10:23:48
Message-Id: 1500546217.69c42290c857ab834c3bad82aed136a52504d529.polynomial-c@gentoo
1 commit: 69c42290c857ab834c3bad82aed136a52504d529
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 20 10:22:26 2017 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 20 10:23:37 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69c42290
7
8 media-libs/fontconfig: Bump to version 2.12.4
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 media-libs/fontconfig/Manifest | 1 +
13 media-libs/fontconfig/fontconfig-2.12.4.ebuild | 162 +++++++++++++++++++++++++
14 2 files changed, 163 insertions(+)
15
16 diff --git a/media-libs/fontconfig/Manifest b/media-libs/fontconfig/Manifest
17 index 98b93dd7e45..eb1b0749253 100644
18 --- a/media-libs/fontconfig/Manifest
19 +++ b/media-libs/fontconfig/Manifest
20 @@ -1,3 +1,4 @@
21 DIST fontconfig-2.11.1.tar.bz2 1516095 SHA256 dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99 SHA512 acf4e6293e0e5521e4b8f29f4b48860ecd1d39744d0eab21c7332e56bfc3ccc63548e459243c5e425b8e5ef265f2cf065eece02460725e794041219d41188149 WHIRLPOOL 45009a1e0fcbbe2f532c6f642a0d57af35af3f6abfb50098c89fe39c71da96597078eb4babdd80a713ef4456e07481d70def7c1c18b7314452136d5b30a4858b
22 DIST fontconfig-2.12.1.tar.bz2 1608901 SHA256 b449a3e10c47e1d1c7a6ec6e2016cca73d3bd68fbbd4f0ae5cc6b573f7d6c7f3 SHA512 a5ba2c1a52272b39aad20394dcc85c202159af0d3d2c1b34b24cbdbc8babb3157005a79d25c21a9bf6ec0459681b1ab05af102b2c0594f485c49e3b3b531067e WHIRLPOOL 1900e3a48fdf65f762a7e9c138a3ffe716f6db96d808f8b10ebf99e7e20d8b32a042406f3ac43ca947b9710f97b31c5caae0609986b1e41ec8604050d2b37955
23 DIST fontconfig-2.12.3.tar.bz2 1600509 SHA256 bd24bf6602731a11295c025909d918180e98385625182d3b999fd6f1ab34f8bd SHA512 311a3c98a05afbe35c1215b41edb2bbcfe3069f85814c882ef0e40f0404cca4bb59a544b14eee9430ea902fd8bc3bfeccb37e42b9fe3bb3a6c71bb0c5332f2c7 WHIRLPOOL 7b3ec6f364d1b701ae1eb676b3f4cffef91af2d0b3f78719119449dfc6d679d1da20224e9148aa970d60c0d531ee5dfbb3c256ffc18edb142648fa06c0704c93
24 +DIST fontconfig-2.12.4.tar.bz2 1613580 SHA256 668293fcc4b3c59765cdee5cee05941091c0879edcc24dfec5455ef83912e45c SHA512 f336e9220afe738e0bf7186d87a5eb09842342ad99ca2102c69820a1f0b232e15c61ef72ae3f5d56503f5be32557d09180a80e05690e85b4eb13ed88f5cece81 WHIRLPOOL 6f0b98e80bdbe5077047b42c7b998a7879e8cd1a7d53598ed6d1cc7110e7ba99b4d3cac6c14875744f7d43e05f338eec1588934e5511e3b1cd8d28d7292fcd72
25
26 diff --git a/media-libs/fontconfig/fontconfig-2.12.4.ebuild b/media-libs/fontconfig/fontconfig-2.12.4.ebuild
27 new file mode 100644
28 index 00000000000..4cc3c4cad21
29 --- /dev/null
30 +++ b/media-libs/fontconfig/fontconfig-2.12.4.ebuild
31 @@ -0,0 +1,162 @@
32 +# Copyright 1999-2017 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +inherit autotools multilib-minimal readme.gentoo-r1
38 +
39 +DESCRIPTION="A library for configuring and customizing font access"
40 +HOMEPAGE="http://fontconfig.org/"
41 +SRC_URI="http://fontconfig.org/release/${P}.tar.bz2"
42 +
43 +LICENSE="MIT"
44 +SLOT="1.0"
45 +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"
46 +IUSE="doc static-libs"
47 +
48 +# Purposefully dropped the xml USE flag and libxml2 support. Expat is the
49 +# default and used by every distro. See bug #283191.
50 +RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
51 + >=media-libs/freetype-2.5.3-r1[${MULTILIB_USEDEP}]
52 + abi_x86_32? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] )"
53 +DEPEND="${RDEPEND}
54 + virtual/pkgconfig
55 + doc? ( =app-text/docbook-sgml-dtd-3.1*
56 + app-text/docbook-sgml-utils[jadetex] )"
57 +PDEPEND="!x86-winnt? ( app-eselect/eselect-fontconfig )
58 + virtual/ttf-fonts"
59 +
60 +PATCHES=(
61 + "${FILESDIR}"/${PN}-2.10.2-docbook.patch # 310157
62 + "${FILESDIR}"/${PN}-2.12.3-latin-update.patch # 130466 + make liberation default
63 +)
64 +
65 +MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
66 +
67 +pkg_setup() {
68 + DOC_CONTENTS="Please make fontconfig configuration changes using
69 + \`eselect fontconfig\`. Any changes made to /etc/fonts/fonts.conf will be
70 + overwritten. If you need to reset your configuration to upstream defaults,
71 + delete the directory ${EROOT}etc/fonts/conf.d/ and re-emerge fontconfig."
72 +}
73 +
74 +src_prepare() {
75 + default
76 +
77 + # Revert gperf-3.1 fix as it breaks compilation
78 + eapply -R "${FILESDIR}"/${PN}-2.12.2-gperf31.patch
79 +
80 + eautoreconf
81 +}
82 +
83 +multilib_src_configure() {
84 + local addfonts
85 + # harvest some font locations, such that users can benefit from the
86 + # host OS's installed fonts
87 + case ${CHOST} in
88 + *-darwin*)
89 + addfonts=",/Library/Fonts,/System/Library/Fonts"
90 + ;;
91 + *-solaris*)
92 + [[ -d /usr/X/lib/X11/fonts/TrueType ]] && \
93 + addfonts=",/usr/X/lib/X11/fonts/TrueType"
94 + [[ -d /usr/X/lib/X11/fonts/Type1 ]] && \
95 + addfonts="${addfonts},/usr/X/lib/X11/fonts/Type1"
96 + ;;
97 + *-linux-gnu)
98 + use prefix && [[ -d /usr/share/fonts ]] && \
99 + addfonts=",/usr/share/fonts"
100 + ;;
101 + esac
102 +
103 + local myeconfargs=(
104 + $(use_enable doc docbook)
105 + $(use_enable static-libs static)
106 + --enable-docs
107 + --localstatedir="${EPREFIX}"/var
108 + --with-default-fonts="${EPREFIX}"/usr/share/fonts
109 + --with-add-fonts="${EPREFIX}/usr/local/share/fonts${addfonts}"
110 + --with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
111 + )
112 +
113 + ECONF_SOURCE="${S}" \
114 + econf "${myeconfargs[@]}"
115 +}
116 +
117 +multilib_src_install() {
118 + default
119 +
120 + # avoid calling this multiple times, bug #459210
121 + if multilib_is_native_abi; then
122 + # stuff installed from build-dir
123 + emake -C doc DESTDIR="${D}" install-man
124 +
125 + insinto /etc/fonts
126 + doins fonts.conf
127 + fi
128 +}
129 +
130 +multilib_src_install_all() {
131 + einstalldocs
132 + find "${ED}" -name "*.la" -delete || die
133 +
134 + # fc-lang directory contains language coverage datafiles
135 + # which are needed to test the coverage of fonts.
136 + insinto /usr/share/fc-lang
137 + doins fc-lang/*.orth
138 +
139 + dodoc doc/fontconfig-user.{txt,pdf}
140 +
141 + if [[ -e ${ED}usr/share/doc/fontconfig/ ]]; then
142 + mv "${ED}"usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${P} || die
143 + rm -rf "${ED}"usr/share/doc/fontconfig
144 + fi
145 +
146 + # Changes should be made to /etc/fonts/local.conf, and as we had
147 + # too much problems with broken fonts.conf we force update it ...
148 + echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig
149 + doenvd "${T}"/37fontconfig
150 +
151 + # As of fontconfig 2.7, everything sticks their noses in here.
152 + dodir /etc/sandbox.d
153 + echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig
154 +
155 + readme.gentoo_create_doc
156 +}
157 +
158 +pkg_preinst() {
159 + # Bug #193476
160 + # /etc/fonts/conf.d/ contains symlinks to ../conf.avail/ to include various
161 + # config files. If we install as-is, we'll blow away user settings.
162 + ebegin "Syncing fontconfig configuration to system"
163 + if [[ -e ${EROOT}/etc/fonts/conf.d ]]; then
164 + for file in "${EROOT}"/etc/fonts/conf.avail/*; do
165 + f=${file##*/}
166 + if [[ -L ${EROOT}/etc/fonts/conf.d/${f} ]]; then
167 + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
168 + && ln -sf ../conf.avail/"${f}" "${ED}"etc/fonts/conf.d/ &>/dev/null
169 + else
170 + [[ -f ${ED}etc/fonts/conf.avail/${f} ]] \
171 + && rm "${ED}"etc/fonts/conf.d/"${f}" &>/dev/null
172 + fi
173 + done
174 + fi
175 + eend $?
176 +}
177 +
178 +pkg_postinst() {
179 + einfo "Cleaning broken symlinks in "${EROOT}"etc/fonts/conf.d/"
180 + find -L "${EROOT}"etc/fonts/conf.d/ -type l -delete
181 +
182 + readme.gentoo_print_elog
183 +
184 + if [[ ${ROOT} = / ]]; then
185 + multilib_pkg_postinst() {
186 + ebegin "Creating global font cache for ${ABI}"
187 + "${EPREFIX}"/usr/bin/${CHOST}-fc-cache -srf
188 + eend $?
189 + }
190 +
191 + multilib_parallel_foreach_abi multilib_pkg_postinst
192 + fi
193 +}