Diff gtk+-3.24.35 with a gtk+-3.24.38

/usr/portage/x11-libs/gtk+/gtk+-3.24.38.ebuild 2023-10-09 14:52:35.916368512 +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=7
5
GNOME2_EAUTORECONF="yes"
4
EAPI=8
6 5

  
7
inherit gnome2 multilib multilib-minimal virtualx
6
inherit gnome2 meson-multilib multilib toolchain-funcs virtualx
8 7

  
9 8
DESCRIPTION="Gimp ToolKit +"
10 9
HOMEPAGE="https://www.gtk.org/"
11 10

  
12 11
LICENSE="LGPL-2+"
13 12
SLOT="3"
14
IUSE="aqua broadway colord cups examples gtk-doc +introspection sysprof test vim-syntax wayland +X xinerama"
13
IUSE="aqua broadway cloudproviders colord cups examples gtk-doc +introspection sysprof test vim-syntax wayland +X xinerama"
15 14
REQUIRED_USE="
16 15
	|| ( aqua wayland X )
16
	test? ( X )
17 17
	xinerama? ( X )
18 18
"
19
RESTRICT="!test? ( test )"
19 20

  
20
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
21
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
21 22

  
22
# Upstream wants us to do their job:
23
# https://bugzilla.gnome.org/show_bug.cgi?id=768662#c1
24
RESTRICT="test"
25

  
26
# FIXME: introspection data is built against system installation of gtk+:3,
27
# bug #????
28 23
COMMON_DEPEND="
29 24
	>=app-accessibility/at-spi2-core-2.46.0[introspection?,${MULTILIB_USEDEP}]
30 25
	>=dev-libs/fribidi-0.19.7[${MULTILIB_USEDEP}]
31 26
	>=dev-libs/glib-2.57.2:2[${MULTILIB_USEDEP}]
32 27
	media-libs/fontconfig[${MULTILIB_USEDEP}]
33 28
	>=media-libs/harfbuzz-2.2.0:=
34
	>=media-libs/libepoxy-1.4[X(+)?,${MULTILIB_USEDEP}]
29
	>=media-libs/libepoxy-1.4[X(+)?,egl(+),${MULTILIB_USEDEP}]
35 30
	virtual/libintl[${MULTILIB_USEDEP}]
36 31
	>=x11-libs/cairo-1.14[aqua?,glib,svg(+),X?,${MULTILIB_USEDEP}]
37 32
	>=x11-libs/gdk-pixbuf-2.30:2[introspection?,${MULTILIB_USEDEP}]
38 33
	>=x11-libs/pango-1.44.0[introspection?,${MULTILIB_USEDEP}]
39 34
	x11-misc/shared-mime-info
40 35

  
36
	cloudproviders? ( net-libs/libcloudproviders[${MULTILIB_USEDEP}] )
41 37
	colord? ( >=x11-misc/colord-0.1.9:0=[${MULTILIB_USEDEP}] )
42 38
	cups? ( >=net-print/cups-2.0[${MULTILIB_USEDEP}] )
43 39
	introspection? ( >=dev-libs/gobject-introspection-1.39:= )
......
93 89
		app-text/docbook-xml-dtd:4.3
94 90
		>=dev-util/gtk-doc-1.20
95 91
	)
92
	test? ( sys-apps/dbus )
96 93
"
97 94

  
98 95
MULTILIB_CHOST_TOOLS=(
......
101 98

  
102 99
PATCHES=(
103 100
	# gtk-update-icon-cache is installed by dev-util/gtk-update-icon-cache
104
	"${FILESDIR}"/${PN}-3.24.25-update-icon-cache.patch
105

  
106
	# Fix broken autotools logic
107
	"${FILESDIR}"/${PN}-3.22.20-libcloudproviders-automagic.patch
101
	"${FILESDIR}"/${PN}-3.24.36-update-icon-cache.patch
108 102
)
109 103

  
110
strip_builddir() {
111
	local rule=$1
112
	shift
113
	local directory=$1
114
	shift
115
	sed -e "s/^\(${rule} =.*\)${directory}\(.*\)$/\1\2/" -i $@ \
116
		|| die "Could not strip director ${directory} from build."
117
}
118

  
119 104
src_prepare() {
120
	if ! use test ; then
121
		# don't waste time building tests
122
		strip_builddir SRC_SUBDIRS testsuite Makefile.{am,in}
123

  
124
		# the tests dir needs to be build now because since commit
125
		# 7ff3c6df80185e165e3bf6aa31bd014d1f8bf224 tests/gtkgears.o needs to be there
126
		# strip_builddir SRC_SUBDIRS tests Makefile.{am,in}
127
	fi
105
	default
128 106

  
129
	if ! use examples; then
130
		# don't waste time building demos
131
		strip_builddir SRC_SUBDIRS demos Makefile.{am,in}
132
		strip_builddir SRC_SUBDIRS examples Makefile.{am,in}
107
	# The border-image-excess-size.ui test is known to fail on big-endian platforms
108
	# See https://gitlab.gnome.org/GNOME/gtk/-/issues/5904
109
	if [[ $(tc-endian) == big ]]; then
110
		sed -i \
111
			-e "/border-image-excess-size.ui/d" \
112
			-e "/^xfails =/a 'border-image-excess-size.ui'," \
113
			testsuite/reftests/meson.build || die
133 114
	fi
134

  
135
	gnome2_src_prepare
136 115
}
137 116

  
138 117
multilib_src_configure() {
139
	local myconf=(
140
		$(use_enable aqua quartz-backend)
141
		$(use_enable broadway broadway-backend)
142
		$(use_enable colord)
143
		$(use_enable cups cups auto)
144
		$(multilib_native_use_enable gtk-doc)
145
		$(multilib_native_use_enable introspection)
146
		$(use_enable sysprof profiler)
147
		$(use_enable wayland wayland-backend)
148
		$(use_enable X x11-backend)
149
		$(use_enable X xcomposite)
150
		$(use_enable X xdamage)
151
		$(use_enable X xfixes)
152
		$(use_enable X xkb)
153
		$(use_enable X xrandr)
154
		$(use_enable xinerama)
155
		# cloudprovider is not packaged in Gentoo yet
156
		--disable-cloudproviders
157
		--disable-papi
158
		--enable-man
159
		--with-xml-catalog="${EPREFIX}"/etc/xml/catalog
160
		# need libdir here to avoid a double slash in a path that libtool doesn't
161
		# grok so well during install (// between $EPREFIX and usr ...)
162
		# TODO: Is this still the case?
163
		--libdir="${EPREFIX}"/usr/$(get_libdir)
164
		CUPS_CONFIG="${EPREFIX}/usr/bin/${CHOST}-cups-config"
118
	local emesonargs=(
119
		$(meson_use aqua quartz_backend)
120
		$(meson_use broadway broadway_backend)
121
		$(meson_use cloudproviders)
122
		$(meson_use examples demos)
123
		$(meson_use examples)
124
		$(meson_native_use_bool gtk-doc gtk_doc)
125
		$(meson_native_use_bool introspection)
126
		$(meson_use sysprof profiler)
127
		$(meson_use wayland wayland_backend)
128
		$(meson_use X x11_backend)
129
		-Dcolord=$(usex colord yes no)
130
		-Dprint_backends=$(usex cups cups,file,lpr file,lpr)
131
		-Dxinerama=$(usex xinerama yes no)
132
		# Include backend immodules into gtk itself, to avoid problems like
133
		# https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a
134
		# user overridden GTK_IM_MODULE envvar
135
		-Dbuiltin_immodules=backend
136
		-Dman=true
137
		$(meson_use test tests)
138
		-Dtracker3=false
165 139
	)
140
	meson_src_configure
141
}
166 142

  
167
	if use wayland; then
168
		myconf+=(
169
			# Include wayland immodule into gtk itself, to avoid problems like
170
			# https://gitlab.gnome.org/GNOME/gnome-shell/issues/109 from a
171
			# user overridden GTK_IM_MODULE envvar
172
			--with-included-immodules=wayland
173
		)
174
	fi;
175

  
176
	ECONF_SOURCE=${S} gnome2_src_configure "${myconf[@]}"
177

  
178
	# work-around gtk-doc out-of-source brokedness
179
	if multilib_is_native_abi; then
180
		local d
181
		for d in gdk gtk libgail-util; do
182
			ln -s "${S}"/docs/reference/${d}/html docs/reference/${d}/html || die
183
		done
184
	fi
143
multilib_src_compile() {
144
	meson_src_compile
185 145
}
186 146

  
187 147
multilib_src_test() {
188
	"${EROOT}${GLIB_COMPILE_SCHEMAS}" --allow-any-name "${S}/gtk" || die
189
	GSETTINGS_SCHEMA_DIR="${S}/gtk" virtx emake check
148
	virtx dbus-run-session meson test -C "${BUILD_DIR}" || die
190 149
}
191 150

  
192 151
multilib_src_install() {
193
	gnome2_src_install
152
	meson_src_install
194 153
}
195 154

  
196 155
multilib_src_install_all() {
197 156
	insinto /etc/gtk-3.0
198 157
	doins "${FILESDIR}"/settings.ini
199
	# Skip README.{in,commits,win32} that would get installed by default
200
	DOCS=( AUTHORS ChangeLog NEWS README )
158
	# Skip README.win32.md that would get installed by default
159
	DOCS=( NEWS README.md )
201 160
	einstalldocs
202 161
}
203 162

  
Thank you!