Diff fontconfig-2.14.0-r1 with a fontconfig-2.14.1-r1

/usr/portage/media-libs/fontconfig/fontconfig-2.14.1-r1.ebuild 2023-10-09 14:52:31.664368405 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
# Cannot yet migrate to Meson as of 2.14.0:
7
# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/244
8
inherit autotools multilib-minimal readme.gentoo-r1
6
PYTHON_COMPAT=( python3_{9..11} )
7
inherit multilib meson-multilib python-any-r1 readme.gentoo-r1
9 8

  
10 9
DESCRIPTION="A library for configuring and customizing font access"
11 10
HOMEPAGE="https://fontconfig.org/"
......
14 13
LICENSE="MIT"
15 14
SLOT="1.0"
16 15
if ! [[ $(ver_cut 3) -ge 90 ]] ; then
17
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
16
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
18 17
fi
19
IUSE="doc static-libs test"
18
IUSE="doc nls test"
20 19
RESTRICT="!test? ( test )"
21 20

  
22 21
# - Check minimum freetype & other deps on bumps. See
......
32 31
# - There's a test-only dep on json-c.
33 32
#   It might become an optional(?) runtime dep in future though. Who knows.
34 33
#   Keep an eye on it.
35
RDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
34
RDEPEND="
35
	>=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
36 36
	>=media-libs/freetype-2.9.1[${MULTILIB_USEDEP}]
37
	virtual/libintl[${MULTILIB_USEDEP}]
37 38
	!elibc_Darwin? ( !elibc_SunOS? ( sys-apps/util-linux[${MULTILIB_USEDEP}] ) )
38 39
	elibc_Darwin? ( sys-libs/native-uuid )
39 40
	elibc_SunOS? ( sys-libs/libuuid )
40
	virtual/libintl[${MULTILIB_USEDEP}]"
41
DEPEND="${RDEPEND}
42
	test? ( dev-libs/json-c )"
43
BDEPEND="dev-util/gperf
44
	>=sys-devel/gettext-0.19.8
41
"
42
DEPEND="
43
	${RDEPEND}
44
	test? ( dev-libs/json-c )
45
"
46
BDEPEND="
47
	${PYTHON_DEPS}
48
	dev-util/gperf
45 49
	virtual/pkgconfig
46 50
	doc? (
47 51
		=app-text/docbook-sgml-dtd-3.1*
48 52
		app-text/docbook-sgml-utils[jadetex]
49
	)"
53
	)
54
	nls? ( >=sys-devel/gettext-0.19.8 )
55
"
50 56
PDEPEND="virtual/ttf-fonts"
51 57
# We need app-eselect/eselect-fontconfig in IDEPEND to update ROOT
52 58
# when cross-compiling.
53 59
IDEPEND="app-eselect/eselect-fontconfig"
54 60

  
55 61
PATCHES=(
56
	# bug #310157
57
	"${FILESDIR}"/${PN}-2.14.0-docbook.patch
58 62
	# bug #130466 + make liberation default
59 63
	"${FILESDIR}"/${PN}-2.14.0-latin-update.patch
60 64
	# Avoid test failure (bubblewrap doesn't work within sandbox)
61 65
	"${FILESDIR}"/${PN}-2.14.0-skip-bubblewrap-tests.patch
62 66

  
63 67
	# Patches from upstream (can usually be removed with next version bump)
68
	"${FILESDIR}"/${P}-gperf-meson.patch
69
	"${FILESDIR}"/${P}-gperf-meson-debugging.patch
64 70
)
65 71

  
66 72
DOC_CONTENTS="Please make fontconfig configuration changes using
......
71 77
src_prepare() {
72 78
	default
73 79

  
74
	# Needed for docbook patch
75
	eautoreconf
80
	# Test needs network access
81
	# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/319
82
	# On bumps, please check to see if this has been fixed
83
	# to allow local access!
84
	sed -i -e '/test-crbug1004254/d' test/meson.build || die
76 85
}
77 86

  
78 87
multilib_src_configure() {
......
103 112
		;;
104 113
	esac
105 114

  
106
	local myeconfargs=(
107
		$(multilib_native_use_enable doc docbook)
108
		$(use_enable static-libs static)
109

  
110
		# man pages. We split out the docbook parts into its own flag.
111
		$(multilib_native_enable docs)
112
		# We handle this ourselves.
113
		--disable-cache-build
114
		# See comment above *DEPEND. We use Expat instead.
115
		--disable-libxml2
116

  
117
		--localstatedir="${EPREFIX}"/var
118
		--with-default-fonts="${EPREFIX}"/usr/share/fonts
119
		--with-add-fonts=$(IFS=, ; echo "${addfonts[*]}" )
120
		--with-templatedir="${EPREFIX}"/etc/fonts/conf.avail
115
	local emesonargs=(
116
		# USE=doc only controls the additional bits like html/pdf
117
		# and regeneration of man pages from source. We always install
118
		# the prebuilt man pages.
119
		$(meson_native_use_feature doc)
120
		$(meson_native_use_feature doc doc-txt)
121
		$(meson_native_use_feature doc doc-html)
122
		$(meson_native_use_feature doc doc-man)
123
		$(meson_native_use_feature doc doc-pdf)
124

  
125
		$(meson_native_use_feature nls)
126
		$(meson_feature test tests)
127

  
128
		-Dcache-build=disabled
129
		-Dcache-dir="${EPREFIX}"/var/cache/fontconfig
130
		-Ddefault-fonts-dirs="${EPREFIX}"/usr/share/fonts
131
		-Dadditional-fonts-dirs=$(IFS=, ; echo "${addfonts[*]}" )
132
		-Dtemplate-dir="${EPREFIX}"/etc/fonts/conf.avail
121 133
	)
122 134

  
123
	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
124
}
125

  
126
multilib_src_test() {
127
	# Test needs network access
128
	# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/319
129
	# On bumps after 2.14.0, please check to see if this has been fixed
130
	# to allow local access!
131
	chmod -x test/test-crbug1004254 || die
132

  
133
	default
135
	meson_src_configure
134 136
}
135 137

  
136 138
multilib_src_install() {
137 139
	MULTILIB_CHOST_TOOLS=( /usr/bin/fc-cache$(get_exeext) )
138 140

  
139
	default
141
	meson_src_install
140 142

  
141 143
	# Avoid calling this multiple times, bug #459210
142 144
	if multilib_is_native_abi; then
143
		# Stuff installed from build-dir
144
		emake -C doc DESTDIR="${D}" install-man
145

  
146 145
		insinto /etc/fonts
147 146
		doins fonts.conf
148 147
	fi
......
151 150
multilib_src_install_all() {
152 151
	einstalldocs
153 152

  
154
	find "${ED}" -name "*.la" -delete || die
155

  
156 153
	# fc-lang directory contains language coverage datafiles
157 154
	# which are needed to test the coverage of fonts.
158 155
	insinto /usr/share/fc-lang
......
160 157

  
161 158
	dodoc doc/fontconfig-user.{txt,pdf}
162 159

  
160
	if ! use doc ; then
161
		find "${S}" -name "*.[[:digit:]]" -type f -exec doman '{}' + || die
162
	fi
163

  
163 164
	if [[ -e ${ED}/usr/share/doc/fontconfig/ ]] ;  then
164
		mv "${ED}"/usr/share/doc/fontconfig/* \
165
			"${ED}"/usr/share/doc/${P} || die
165
		mv "${ED}"/usr/share/doc/fontconfig/* "${ED}"/usr/share/doc/${PF} || die
166 166
		rm -rf "${ED}"/usr/share/doc/fontconfig || die
167 167
	fi
168 168

  
169 169
	# Changes should be made to /etc/fonts/local.conf, and as we had
170 170
	# too much problems with broken fonts.conf we force update it ...
171
	echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' \
172
		> "${T}"/37fontconfig || die
171
	echo 'CONFIG_PROTECT_MASK="/etc/fonts/fonts.conf"' > "${T}"/37fontconfig || die
173 172
	doenvd "${T}"/37fontconfig
174 173

  
175 174
	# As of fontconfig 2.7, everything sticks their noses in here.
176 175
	dodir /etc/sandbox.d
177
	echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' \
178
		> "${ED}"/etc/sandbox.d/37fontconfig || die
176
	echo 'SANDBOX_PREDICT="/var/cache/fontconfig"' > "${ED}"/etc/sandbox.d/37fontconfig || die
179 177

  
180 178
	readme.gentoo_create_doc
181

  
182
	# We allow the cache generation to make this later
183
	# bug #587492
184
	rm -r "${ED}"/var/cache/ || die
185 179
}
186 180

  
187 181
pkg_preinst() {
Thank you!