Added media-libs/fontconfig-2.15.0-r1.
This commit is contained in:
parent
37576598ea
commit
501d6f30b9
7
media-libs/fontconfig/Manifest
Normal file
7
media-libs/fontconfig/Manifest
Normal file
|
@ -0,0 +1,7 @@
|
|||
AUX fontconfig-2.14.0-latin-update.patch 1889 BLAKE2B 42a5faab884bb47e645a8ee6f052577bfd8f9becb4b3d0e22e28ee4ba9a03458dd54a4becf9e0e3c728f18db68f3a115be619469fee7dfb2a20e508ef320b14b SHA512 c96c6ba0b2ebf24d0669bb982672ac03b45e1413f68f50f2ad6556ef87014d3c42875d6094426e1b89e108b5f165a0040a3740fc37d94902224549e56bb3642a
|
||||
AUX fontconfig-2.14.0-skip-bubblewrap-tests.patch 408 BLAKE2B 911a87e91dcdf49088e9a684a9af753464211f18fd471989410a57363dd71b7cc0940c9a8e61095d901b4d7ee804536262ebc6afb1af3f470d8cd164d2fd2113 SHA512 8302a3ccf5918c8a4c3af3ab3601752c005c0361003281996eba469195127fab0e99c8d225dcb674a1bc198f2c15b982cce49c6bb3234307cf58e47c9206ff5a
|
||||
AUX fontconfig-2.14.2-math-fabs.patch 3159 BLAKE2B e3472ed44efdc2ffff81410864c7c25f6e1403464b6bec98b84662522c760ff7cc372dbc886cea2a0108bada1ca1ed923c6646cede70b050a8eb87a7c28d9eb4 SHA512 4fc401a980ec63ba0de40de044408063fd0949f0022dfa4333e5aaaff78ba03f2c18ea369af16e4cc952703d25a1c3d1821047e194c4776e00bb90f7ec8cbcc1
|
||||
AUX fontconfig-2.15.0-aliasing.patch 1667 BLAKE2B a3881ac359d90de1d3738fcc0bb4ebf9a9deaed1ad3d95445e4d1a77a0d077b20f24b1e9e4a1fcf724d21bd02b62b2903d284ace3915f6943416222f23975377 SHA512 00171483e4a0ec5bdb2a191e3fe49b33499dc1bf58f3896d3ab5d1eae8190eee96d3b680756d195ecb50ac4c767fafe15bbd54460ec455173871ae304638ada9
|
||||
DIST fontconfig-2.15.0.tar.xz 1447820 BLAKE2B 17c85fddc4ab84111c4f50afb89ecd8792c3aeaa2690b38fd39fca6f6cece69e9ce0cd3af8a2e54968c79ad1f9bee1e444699a13c068d9dfd3dfe1212ff37533 SHA512 754cd5fffa198fc07a39cf7df683e9adfa7f54ab41fdff8c0eacc078fd35d3e01069ba343f2b045e0b40df88d9f1fc1ee0f7565799f9cb194a59cf95b64c4417
|
||||
EBUILD fontconfig-2.15.0-r1.ebuild 7220 BLAKE2B 3c292bef5fca175f461aada71ca946066d6864935379d7db6b8bfd126025811041ef9d37603af7c5b5c14521c59ed9f45db679b9d63c527d2601ccd84d2610d3 SHA512 fbb79298372e9de3ddedd41f15600fa5fe849c475026926ab3af1308ed84cef64e711f0a23cd42aa55bc42deb16018915da981f273a3e36b20f5cf23e366eb9b
|
||||
MISC metadata.xml 672 BLAKE2B d23112b5d408aed97ad68bc9a141a570c22fd6bbf0022e979b7006817ae27bcba21be43558cb42df06f3c280cbed5570c62805bb69be8a64b1f41bd90b200bc0 SHA512 1ff9c1f22b9766127692eec4824ce966f7a7305ddfae0dd1d8b0e5b432926508dd7a898eada6c182e02c985e11c2f9a22f13eac195333ed32952af0e89015e9a
|
|
@ -0,0 +1,66 @@
|
|||
https://bugs.gentoo.org/130466
|
||||
--- a/conf.d/60-latin.conf
|
||||
+++ b/conf.d/60-latin.conf
|
||||
@@ -5,47 +5,50 @@
|
||||
<alias>
|
||||
<family>serif</family>
|
||||
<prefer>
|
||||
+ <family>Liberation Serif</family>
|
||||
<family>Noto 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>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>sans-serif</family>
|
||||
<prefer>
|
||||
+ <family>Liberation Sans</family>
|
||||
<family>Noto 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>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
+ <family>Liberation Mono</family>
|
||||
<family>Noto Sans 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>
|
||||
</prefer>
|
||||
</alias>
|
||||
<!--
|
||||
@@ -66,6 +69,7 @@
|
||||
<alias>
|
||||
<family>cursive</family>
|
||||
<prefer>
|
||||
+ <family>Comic Neue</family>
|
||||
<family>ITC Zapf Chancery Std</family>
|
||||
<family>Zapfino</family>
|
||||
<family>Comic Sans MS</family>
|
|
@ -0,0 +1,14 @@
|
|||
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/320
|
||||
--- a/test/run-test.sh
|
||||
+++ b/test/run-test.sh
|
||||
@@ -40,9 +40,7 @@ EXPECTED=${EXPECTED-"out.expected"}
|
||||
FCLIST="$LOG_COMPILER ../fc-list/fc-list$EXEEXT"
|
||||
FCCACHE="$LOG_COMPILER ../fc-cache/fc-cache$EXEEXT"
|
||||
|
||||
-if [ -x "$(command -v bwrap)" ]; then
|
||||
- BWRAP="$(command -v bwrap)"
|
||||
-fi
|
||||
+BWRAP=""
|
||||
|
||||
FONT1=$TESTDIR/4x6.pcf
|
||||
FONT2=$TESTDIR/8x16.pcf
|
|
@ -0,0 +1,42 @@
|
|||
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/309
|
||||
|
||||
From 81d410310ffee8761819e72151ec25efde2f5b24 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Wed, 14 Feb 2024 18:12:46 +0000
|
||||
Subject: [PATCH] meson: detect-and-use `-lm` for `fabs` in fcmatch
|
||||
|
||||
We had a bug report in Gentoo of a sparc64 build failure with -O0:
|
||||
```
|
||||
FAILED: src/libfontconfig.so.1.13.0
|
||||
sparc64-unknown-linux-gnu-gcc -o src/libfontconfig.so.1.13.0 src/libfontconfig.so.1.13.0.p/fcatomic.c.o src/libfontconfig.so.1.13.0.p/fccache.c.o src/libfontconfig.so.1.13.0.p/fccfg.c.o src/libfontconfig.so.1.13.0.p/fccharset.c.o src/libfontconfig.so.1.13.0.p/fccompat.c.o src/libfontconfig.so.1.13.0.p/fcdbg.c.o src/libfontconfig.so.1.13.0.p/fcdefault.c.o src/libfontconfig.so.1.13.0.p/fcdir.c.o src/libfontconfig.so.1.13.0.p/fcformat.c.o src/libfontconfig.so.1.13.0.p/fcfreetype.c.o src/libfontconfig.so.1.13.0.p/fcfs.c.o src/libfontconfig.so.1.13.0.p/fcptrlist.c.o src/libfontconfig.so.1.13.0.p/fchash.c.o src/libfontconfig.so.1.13.0.p/fcinit.c.o src/libfontconfig.so.1.13.0.p/fclang.c.o src/libfontconfig.so.1.13.0.p/fclist.c.o src/libfontconfig.so.1.13.0.p/fcmatch.c.o src/libfontconfig.so.1.13.0.p/fcmatrix.c.o src/libfontconfig.so.1.13.0.p/fcname.c.o src/libfontconfig.so.1.13.0.p/fcobjs.c.o src/libfontconfig.so.1.13.0.p/fcpat.c.o src/libfontconfig.so.1.13.0.p/fcrange.c.o src/libfontconfig.so.1.13.0.p/fcserialize.c.o src/libfontconfig.so.1.13.0.p/fcstat.c.o src/libfontconfig.so.1.13.0.p/fcstr.c.o src/libfontconfig.so.1.13.0.p/fcweight.c.o src/libfontconfig.so.1.13.0.p/fcxml.c.o src/libfontconfig.so.1.13.0.p/ftglue.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libfontconfig.so.1 -m64 -g -O0 -mno-app-regs -mcpu=ultrasparc -mtune=ultrasparc -mno-vis -mno-vis2 -mno-vis3 -mno-vis4 -mno-vis4b -mno-cbcond -mno-fmaf -mno-fsmuld -mno-popc -mno-subxc -fno-builtin -fno-fast-math -Wl,-O1 -Wl,--as-needed -Wl,--no-keep-memory /usr/lib64/libfreetype.so /usr/lib64/libexpat.so -Wl,--end-group -pthread
|
||||
/usr/lib/gcc/sparc64-unknown-linux-gnu/12/../../../../sparc64-unknown-linux-gnu/bin/ld: src/libfontconfig.so.1.13.0.p/fcmatch.c.o: in function `FcCompareRange':
|
||||
/var/tmp/portage/media-libs/fontconfig-2.14.2-r3/work/fontconfig-2.14.2-.sparc64/../fontconfig-2.14.2/src/fcmatch.c:220: undefined reference to `fabs'
|
||||
```
|
||||
|
||||
Ask Meson to detect `-lm` and add the missing `-lm` for `fabs` usage.
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -23,7 +23,7 @@ freetype_req = '>= 21.0.15'
|
||||
freetype_req_cmake = '>= 2.8.1'
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
-
|
||||
+math_dep = cc.find_library('m', required: false)
|
||||
|
||||
freetype_dep = dependency('freetype2', method: 'pkg-config', version: freetype_req, required: false)
|
||||
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -65,7 +65,7 @@ libfontconfig = library('fontconfig',
|
||||
fc_sources, alias_headers, ft_alias_headers, fclang_h, fccase_h, fcobjshash_h,
|
||||
c_args: c_args + fc_extra_c_args,
|
||||
include_directories: incbase,
|
||||
- dependencies: deps,
|
||||
+ dependencies: [deps, math_dep],
|
||||
install: true,
|
||||
soversion: soversion,
|
||||
version: libversion,
|
||||
--
|
||||
GitLab
|
53
media-libs/fontconfig/files/fontconfig-2.15.0-aliasing.patch
Normal file
53
media-libs/fontconfig/files/fontconfig-2.15.0-aliasing.patch
Normal file
|
@ -0,0 +1,53 @@
|
|||
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/merge_requests/333
|
||||
|
||||
From 8db62f5a77fd53543dd58e12da7bd96082228893 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Tue, 8 Oct 2024 16:48:19 +0100
|
||||
Subject: [PATCH] fontconfig: mark _FcPatternIter as may_alias
|
||||
|
||||
We had a report of GCC 14 with -O3 -flto causing wrong font
|
||||
sizes with fontconfig (showing up in qalculate-gtk).
|
||||
|
||||
It turns out to be because _FcPatternIter and _FcPatternPrivateIter
|
||||
are punned between which violates strict-aliasing rules, which
|
||||
manifested in FcDefaultSubstitute getting a bogus value from
|
||||
FcValueCanonicalize for size.
|
||||
|
||||
void* isn't allowed to alias anything -- you can pass addresses
|
||||
around provided you cast back to the original type, but if you
|
||||
access through the wrong type, you've violated aliasing rules.
|
||||
|
||||
Bug: https://bugs.gentoo.org/940923
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/fontconfig/fontconfig.h
|
||||
+++ b/fontconfig/fontconfig.h
|
||||
@@ -32,8 +32,10 @@
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4)
|
||||
#define FC_ATTRIBUTE_SENTINEL(x) __attribute__((__sentinel__(0)))
|
||||
+#define FC_ATTRIBUTE_MAY_ALIAS __attribute__((may_alias))
|
||||
#else
|
||||
#define FC_ATTRIBUTE_SENTINEL(x)
|
||||
+#define FC_ATTRIBUTE_MAY_ALIAS
|
||||
#endif
|
||||
|
||||
#ifndef FcPublic
|
||||
@@ -253,7 +255,7 @@ typedef enum _FcValueBinding {
|
||||
|
||||
typedef struct _FcPattern FcPattern;
|
||||
|
||||
-typedef struct _FcPatternIter {
|
||||
+typedef struct FC_ATTRIBUTE_MAY_ALIAS _FcPatternIter {
|
||||
void *dummy1;
|
||||
void *dummy2;
|
||||
} FcPatternIter;
|
||||
@@ -1160,6 +1162,7 @@ FcConfigParseAndLoadFromMemory (FcConfig *config,
|
||||
_FCFUNCPROTOEND
|
||||
|
||||
#undef FC_ATTRIBUTE_SENTINEL
|
||||
+#undef FC_ATTRIBUTE_MAY_ALIAS
|
||||
|
||||
|
||||
#ifndef _FCINT_H_
|
||||
--
|
||||
GitLab
|
234
media-libs/fontconfig/fontconfig-2.15.0-r1.ebuild
Normal file
234
media-libs/fontconfig/fontconfig-2.15.0-r1.ebuild
Normal file
|
@ -0,0 +1,234 @@
|
|||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..13} )
|
||||
inherit multilib meson-multilib python-any-r1 readme.gentoo-r1
|
||||
|
||||
DESCRIPTION="A library for configuring and customizing font access"
|
||||
HOMEPAGE="https://fontconfig.org/"
|
||||
SRC_URI="https://fontconfig.org/release/${P}.tar.xz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="1.0"
|
||||
if ! [[ $(ver_cut 3) -ge 90 ]] ; then
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
|
||||
fi
|
||||
IUSE="doc nls test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# - Check minimum freetype & other deps on bumps. See
|
||||
# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/configure.ac#L314.
|
||||
# Note that FT versioning is confusing, need to map it using
|
||||
# https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT
|
||||
# But sometimes it's actually greater than that, e.g. see Fedora's spec file
|
||||
# https://src.fedoraproject.org/rpms/fontconfig/blob/rawhide/f/fontconfig.spec#_1
|
||||
#
|
||||
# - Purposefully dropped the xml USE flag and libxml2 support. Expat is the
|
||||
# default and used by every distro. See bug #283191.
|
||||
#
|
||||
# - There's a test-only dep on json-c.
|
||||
# It might become an optional(?) runtime dep in future though. Who knows.
|
||||
# Keep an eye on it.
|
||||
RDEPEND="
|
||||
>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
|
||||
>=media-libs/freetype-2.9.1[${MULTILIB_USEDEP}]
|
||||
virtual/libintl[${MULTILIB_USEDEP}]
|
||||
!elibc_Darwin? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) )
|
||||
elibc_Darwin? ( sys-libs/native-uuid )
|
||||
elibc_SunOS? ( sys-libs/libuuid )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
test? ( dev-libs/json-c )
|
||||
"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
dev-util/gperf
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
=app-text/docbook-sgml-dtd-3.1*
|
||||
app-text/docbook-sgml-utils[jadetex]
|
||||
)
|
||||
nls? ( >=sys-devel/gettext-0.19.8 )
|
||||
"
|
||||
PDEPEND="virtual/ttf-fonts"
|
||||
# We need app-eselect/eselect-fontconfig in IDEPEND to update ROOT
|
||||
# when cross-compiling.
|
||||
IDEPEND="app-eselect/eselect-fontconfig"
|
||||
|
||||
PATCHES=(
|
||||
# bug #130466 + make liberation default
|
||||
"${FILESDIR}"/${PN}-2.14.0-latin-update.patch
|
||||
# Avoid test failure (bubblewrap doesn't work within sandbox)
|
||||
"${FILESDIR}"/${PN}-2.14.0-skip-bubblewrap-tests.patch
|
||||
# Fix aliasing (bug #940923)
|
||||
"${FILESDIR}"/${PN}-2.15.0-aliasing.patch
|
||||
|
||||
# Patches from upstream (can usually be removed with next version bump)
|
||||
"${FILESDIR}"/${PN}-2.14.2-math-fabs.patch
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
# Test needs network access
|
||||
# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/319
|
||||
# On bumps, please check to see if this has been fixed
|
||||
# to allow local access!
|
||||
sed -i -e '/test-crbug1004254/d' test/meson.build || die
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local addfonts=(
|
||||
"${EPREFIX}"/usr/local/share/fonts
|
||||
)
|
||||
|
||||
# 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+=( /usr/X/lib/X11/fonts/Type1 )
|
||||
;;
|
||||
|
||||
*-linux-gnu)
|
||||
use prefix && [[ -d /usr/share/fonts ]] && \
|
||||
addfonts+=( /usr/share/fonts )
|
||||
;;
|
||||
esac
|
||||
|
||||
local emesonargs=(
|
||||
# USE=doc only controls the additional bits like html/pdf
|
||||
# and regeneration of man pages from source. We always install
|
||||
# the prebuilt man pages.
|
||||
$(meson_native_use_feature doc)
|
||||
$(meson_native_use_feature doc doc-txt)
|
||||
$(meson_native_use_feature doc doc-html)
|
||||
$(meson_native_use_feature doc doc-man)
|
||||
$(meson_native_use_feature doc doc-pdf)
|
||||
|
||||
$(meson_native_use_feature nls)
|
||||
$(meson_feature test tests)
|
||||
|
||||
-Dcache-build=disabled
|
||||
-Dcache-dir="${EPREFIX}"/var/cache/fontconfig
|
||||
-Ddefault-fonts-dirs="${EPREFIX}"/usr/share/fonts
|
||||
-Dadditional-fonts-dirs=$(IFS=, ; echo "${addfonts[*]}" )
|
||||
-Dtemplate-dir="${EPREFIX}"/etc/fonts/conf.avail
|
||||
|
||||
# Let users choose via eselect-fontconfig. See bug #900681
|
||||
# and https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/356.
|
||||
-Ddefault-sub-pixel-rendering=none
|
||||
)
|
||||
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
|
||||
|
||||
meson_src_install
|
||||
|
||||
# Avoid calling this multiple times, bug #459210
|
||||
if multilib_is_native_abi; then
|
||||
insinto /etc/fonts
|
||||
doins fonts.conf
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
einstalldocs
|
||||
|
||||
# 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 ! use doc ; then
|
||||
find "${S}" -name "*.[[:digit:]]" -type f -exec doman '{}' + || die
|
||||
fi
|
||||
|
||||
if [[ -e ${ED}/usr/share/doc/fontconfig/ ]] ; then
|
||||
mv "${ED}"/usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${PF} || die
|
||||
rm -rf "${ED}"/usr/share/doc/fontconfig || die
|
||||
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 || die
|
||||
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 || die
|
||||
|
||||
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
|
||||
local file f
|
||||
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
|
||||
|
||||
local ver
|
||||
for ver in ${REPLACING_VERSIONS} ; do
|
||||
# 2.14.2 and 2.14.2-r1 included the bad 10-sub-pixel-none.conf
|
||||
if ver_test ${ver} -lt 2.14.2-r2 && ver_test ${ver} -ge 2.14.2 ; then
|
||||
if [[ -e "${EROOT}"/etc/fonts/conf.d/10-sub-pixel-none.conf ]] ; then
|
||||
einfo "Deleting 10-sub-pixel-none.conf from bad fontconfig-2.14.2 (bug #900681)"
|
||||
rm "${EROOT}"/etc/fonts/conf.d/10-sub-pixel-none.conf || die
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -z ${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
|
||||
}
|
13
media-libs/fontconfig/metadata.xml
Normal file
13
media-libs/fontconfig/metadata.xml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>fonts@gentoo.org</email>
|
||||
<name>Fonts</name>
|
||||
</maintainer>
|
||||
<longdescription>Fontconfig is a font configuration and customization library, which does not depend on the X Window System. It is designed to locate fonts within the system and select them according to requirements specified by applications.</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:fontconfig_project:fontconfig</remote-id>
|
||||
<remote-id type="freedesktop-gitlab">fontconfig/fontconfig</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
Loading…
Reference in a new issue