Diff pango-1.42.4-r2 with a pango-1.50.14

/usr/portage/x11-libs/pango/pango-1.50.14.ebuild 2023-10-09 14:52:35.924368512 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=6
5
GNOME2_LA_PUNT="yes"
4
EAPI=8
6 5

  
7
inherit gnome2 multilib-minimal toolchain-funcs
6
inherit flag-o-matic gnome2-utils meson-multilib xdg
8 7

  
9 8
DESCRIPTION="Internationalized text layout and rendering library"
10
HOMEPAGE="https://www.pango.org/"
11
SRC_URI+=" https://dev.gentoo.org/~leio/distfiles/${P}-patchset.tar.xz"
9
HOMEPAGE="https://www.pango.org/ https://gitlab.gnome.org/GNOME/pango"
10
SRC_URI="http://ftp.gnome.org/pub/GNOME/sources/pango/$(ver_cut 1-2)/${P}.tar.xz"
12 11

  
13
LICENSE="LGPL-2+ FTL"
12
LICENSE="LGPL-2+"
14 13
SLOT="0"
15
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
14
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
16 15

  
17
IUSE="X +introspection test"
16
IUSE="debug +introspection sysprof test X"
18 17
RESTRICT="!test? ( test )"
19 18

  
20 19
RDEPEND="
21
	>=media-libs/harfbuzz-1.4.2:=[glib(+),truetype(+),${MULTILIB_USEDEP}]
22
	>=dev-libs/glib-2.50.2:2[${MULTILIB_USEDEP}]
23
	>=media-libs/fontconfig-2.12.92:1.0=[${MULTILIB_USEDEP}]
20
	>=dev-libs/glib-2.62.2:2[${MULTILIB_USEDEP}]
21
	>=dev-libs/fribidi-1.0.6[${MULTILIB_USEDEP}]
22
	>=media-libs/harfbuzz-2.6.0:=[glib(+),introspection?,truetype(+),${MULTILIB_USEDEP}]
23
	>=media-libs/fontconfig-2.13.0:1.0=[${MULTILIB_USEDEP}]
24
	>=x11-libs/cairo-1.12.10:=[X?,${MULTILIB_USEDEP}]
24 25
	>=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}]
25
	>=x11-libs/cairo-1.12.14-r4:=[X?,${MULTILIB_USEDEP}]
26
	>=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}]
27 26
	introspection? ( >=dev-libs/gobject-introspection-0.9.5:= )
28 27
	X? (
29
		>=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}]
30 28
		>=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
31 29
		>=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}]
30
		>=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}]
32 31
	)
33 32
"
34 33
DEPEND="${RDEPEND}
34
	sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
35
	X? ( x11-base/xorg-proto )
36
"
37
BDEPEND="
35 38
	dev-util/glib-utils
36
	>=dev-util/gtk-doc-am-1.20
39
	sys-apps/help2man
37 40
	virtual/pkgconfig
38 41
	test? ( media-fonts/cantarell )
39
	X? ( x11-base/xorg-proto )
40
	!<=sys-devel/autoconf-2.63:2.5
41 42
"
42 43

  
43
PATCHES=(
44
	"${WORKDIR}"/patches/ # bug fix cherry-picks from master by 20190216; each patch has commit id of origin/master included and will be part of 1.43.1/1.44
45
	"${FILESDIR}"/${PV}-CVE-2019-1010238.patch
46
)
47

  
48 44
src_prepare() {
49
	gnome2_src_prepare
50
	# This should be updated if next release fails to pre-generate the manpage as well, or src_prepare removed if is properly generated
51
	# https://gitlab.gnome.org/GNOME/pango/issues/270
52
	cp -v "${FILESDIR}"/${PV}-pango-view.1.in "${S}/utils/pango-view.1.in" || die
45
	default
46
	xdg_environment_reset
47
	gnome2_environment_reset
48

  
49
	# False positive with GCC 13 and -O3 at least, see bug #903259
50
	# https://gitlab.gnome.org/GNOME/pango/-/issues/740
51
	sed -i -e '/\-Werror=array-bounds/d' meson.build || die
53 52
}
54 53

  
55 54
multilib_src_configure() {
56
	tc-export CXX
55
	if use debug; then
56
		append-cflags -DPANGO_ENABLE_DEBUG
57
	else
58
		append-cflags -DG_DISABLE_CAST_CHECKS
59
	fi
57 60

  
58
	ECONF_SOURCE=${S} \
59
	gnome2_src_configure \
60
		--with-cairo \
61
		$(multilib_native_use_enable introspection) \
62
		$(use_with X xft) \
63
		"$(usex X --x-includes="${EPREFIX}/usr/include" "")" \
64
		"$(usex X --x-libraries="${EPREFIX}/usr/$(get_libdir)" "")"
61
	local emesonargs=(
62
		# Never use gi-docgen subproject
63
		--wrap-mode nofallback
64

  
65
		-Dgtk_doc=false # we ship pregenerated docs
66
		$(meson_native_use_feature introspection)
67
		-Dinstall-tests=false
68
		-Dfontconfig=enabled
69
		$(meson_feature sysprof)
70
		-Dlibthai=disabled
71
		-Dcairo=enabled
72
		$(meson_feature X xft)
73
		-Dfreetype=enabled
74
	)
75
	meson_src_configure
76
}
65 77

  
66
	if multilib_is_native_abi; then
67
		ln -s "${S}"/docs/html docs/html || die
68
	fi
78
multilib_src_install_all() {
79
	insinto /usr/share/gtk-doc/html
80
	# This will install PangoXft API docs regardless of USE=-X, but this is intentional
81
	doins -r "${S}"/docs/Pango*
69 82
}
70 83

  
71
multilib_src_install() {
72
	gnome2_src_install
84
pkg_postinst() {
85
	xdg_pkg_postinst
86

  
87
	if has_version 'media-libs/freetype[-harfbuzz]' ; then
88
		ewarn "media-libs/freetype is installed without harfbuzz support. This may"
89
		ewarn "lead to minor font rendering problems, see bug 712374."
90
	fi
73 91
}
Thank you!