From bcfa32841ae902ab6705d30322719ab5ebc50c39 Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Wed, 18 May 2022 14:57:36 -0500 Subject: [PATCH] gtk+3: 3.24.34, switch to meson --- extra/gtk+3/build | 84 +++++++++------------------- extra/gtk+3/checksums | 6 +- extra/gtk+3/patches/no-fribidi.patch | 64 +++++++++++++++++++++ extra/gtk+3/sources | 2 +- extra/gtk+3/version | 2 +- 5 files changed, 94 insertions(+), 64 deletions(-) diff --git a/extra/gtk+3/build b/extra/gtk+3/build index 62c26562..29063fa3 100755 --- a/extra/gtk+3/build +++ b/extra/gtk+3/build @@ -3,67 +3,33 @@ patch -p1 < no-fribidi.patch patch -p1 < fix-firefox.patch -# Remove configure check for atk-bridge and fribidi. Funny enough, atk-bridge -# is not required under wayland and there are ifdefs in place to ensure this. -# The build system forces the dependency anyway so we must remove it. -sed -e 's/\(ATK_PACKAGES="atk\) atk-bridge-2.0"/\1"/' \ - -e 's/fribidi >= 0\.19\.7//g' \ - configure > _ -mv -f _ configure +# Don't enable native language support and don't compile schemas. +sed -e '/compile_schemas/s/true/false/' \ + -e '/ENABLE_NLS/s/1/0/' \ + -e "/subdir('po/d" \ + meson.build > _ +mv -f _ meson.build -# Don't build GTK examples/demos/testsuite. -sed 's/demos tests testsuite examples//;s/docs \(m4macros\)/\1/' Makefile.in > _ -mv -f _ Makefile.in +meson setup \ + -Dprefix=/usr \ + -Dx11_backend=false \ + -Dwayland_backend=true \ + -Dprint_backends=file,lpr \ + -Dcolord=no \ + -Dintrospection=false \ + -Ddemos=false \ + -Dexamples=false \ + -Dtests=false \ + -Dlibepoxy:default_library=static \ + -Dlibepoxy:egl=yes \ + -Dlibepoxy:tests=false \ + -Dlibepoxy:glx=no \ + -Dlibepoxy:x11=false \ + --force-fallback-for=libepoxy \ + output -# Build libepoxy for gtk+3's sole use. This is the only package that requires -# the library. While the build system supports building this as a subproject, -# it is broken so we must do it ourselves. -( - cd libepoxy - - meson \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - -Ddefault_library=static \ - -Degl=yes \ - -Dtests=false \ - -Dglx=no \ - -Dx11=false \ - . output - - ninja -C output - - DESTDIR=$PWD ninja -C output install -) - -# Point gtk+3 to the vendored libepoxy. -export PKG_CONFIG_PATH=$PWD/libepoxy/usr/lib/pkgconfig -export CFLAGS="$CFLAGS -L$PWD/libepoxy/usr/lib" -export CFLAGS="$CFLAGS -I$PWD/libepoxy/usr/include" - -# While gtk+3 supports meson, the meson build is strictly speaking broken. -# It forces X11 in various places and the usage of -Werror causes various build -# failures (which according to upstream should not occur on x86_64). -sh ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --enable-wayland-backend \ - --disable-x11-backend \ - --disable-schemas-compile \ - --disable-cups \ - --disable-papi \ - --disable-cloudprint \ - --disable-glibtest \ - --disable-nls \ - --disable-installed-tests \ - --enable-introspection=no \ - --enable-colord=no \ - --enable-gtk-doc-html=no - -make -make install +ninja -C output +ninja -C output install # GTK+3 on Wayland requires gsettings-desktop-schemas for gsettings to work # correctly. Under X11 it made use of xsettings but this is no longer the case. diff --git a/extra/gtk+3/checksums b/extra/gtk+3/checksums index d7cffb22..cffe0ed0 100644 --- a/extra/gtk+3/checksums +++ b/extra/gtk+3/checksums @@ -1,5 +1,5 @@ -588b06522e25d1579e989b6f9d8a1bdbf2fe13cde01a04e904ff346a225e7801 -69643e9bc1a0b794b0e8eb4dad2ae141bc5860b53689e4310dc4aaea15c2a888 +dbc69f90ddc821b8d1441f00374dc1da4323a2eafa9078e61edbe5eeefa852ec a7ced37f4102b745ac86d6a70a9da399cc139ff168ba6b8002b4d8d43c900c15 -e44b643a9ec01ea153817602241d6d7e6fd2d121b3ce4e29f99a87d8836a3ff0 +69643e9bc1a0b794b0e8eb4dad2ae141bc5860b53689e4310dc4aaea15c2a888 +893f84833bf5b87a1b2f7d0a373f16037f5e2be6b4d030d8c4b7f9ff48cc993f 8fbb449d4396cacba8c12b3e7461e1e940af8467e421a8011b3fa0bab0564426 diff --git a/extra/gtk+3/patches/no-fribidi.patch b/extra/gtk+3/patches/no-fribidi.patch index 360c3780..92846e0c 100644 --- a/extra/gtk+3/patches/no-fribidi.patch +++ b/extra/gtk+3/patches/no-fribidi.patch @@ -28,6 +28,18 @@ index f0869a6..2f3c039 100644 return PANGO_DIRECTION_LTR; } +diff --git a/gdk/meson.build b/gdk/meson.build +index 4bb1bf2..9270c97 100644 +--- a/gdk/meson.build ++++ b/gdk/meson.build +@@ -202,7 +202,6 @@ gdk_deps = [ + pixbuf_dep, + cairo_dep, + pango_dep, +- fribidi_dep, + cairogobj_dep, + glib_dep, + epoxy_dep, diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index aaac4cc..a76ad57 100644 --- a/gtk/gtkpango.c @@ -58,3 +70,55 @@ index aaac4cc..a76ad57 100644 return PANGO_DIRECTION_LTR; } +diff --git a/gtk/meson.build b/gtk/meson.build +index 79f4f0d..be51997 100644 +--- a/gtk/meson.build ++++ b/gtk/meson.build +@@ -836,7 +836,6 @@ gtk_deps = [ + pango_dep, + pangoft_dep, + harfbuzz_dep, +- fribidi_dep, + cairogobj_dep, + cairo_dep, + fontconfig_dep, +diff --git a/meson.build b/meson.build +index c599843..967a022 100644 +--- a/meson.build ++++ b/meson.build +@@ -25,7 +25,6 @@ endif + + glib_req = '>= @0@.@1@.@2@'.format(glib_major_req, glib_minor_req, glib_micro_req) + pango_req = '>= 1.41.0' +-fribidi_req = '>= 0.19.7' + atk_req = '>= 2.35.1' + at_spi2_atk_req = '>= 2.15.1' + cairo_req = '>= 1.14.0' +@@ -404,8 +403,6 @@ endif + + pango_dep = dependency('pango', version: pango_req, + fallback : ['pango', 'libpango_dep']) +-fribidi_dep = dependency('fribidi', version: fribidi_req, +- fallback : ['fribidi', 'libfribidi_dep']) + + # Require PangoFT2 if on X11 or wayland + require_pangoft2 = wayland_enabled or x11_enabled +@@ -927,8 +924,7 @@ endif + + pkgconf.set('GDK_PRIVATE_PACKAGES', + ' '.join(gio_packages + x11_pkgs + wayland_pkgs + cairo_backends + +- ['epoxy', epoxy_req] + cloudproviders_packages + +- ['fribidi', fribidi_req])) ++ ['epoxy', epoxy_req] + cloudproviders_packages)) + + gtk_packages = ' '.join([ + atk_dep.name(), atk_req, +@@ -941,7 +937,7 @@ pkgconf.set('GTK_PACKAGES', gtk_packages) + # Requires.private + pc_gdk_extra_libs += cairo_libs + +-gtk_private_packages = atk_pkgs + wayland_pkgs + ['epoxy', epoxy_req, 'fribidi', fribidi_req] ++gtk_private_packages = atk_pkgs + wayland_pkgs + ['epoxy', epoxy_req] + if wayland_enabled or x11_enabled + gtk_private_packages += ['pangoft2'] + endif diff --git a/extra/gtk+3/sources b/extra/gtk+3/sources index ed4bd53c..0e4467f1 100644 --- a/extra/gtk+3/sources +++ b/extra/gtk+3/sources @@ -1,5 +1,5 @@ https://download.gnome.org/sources/gtk+/MAJOR.MINOR/gtk+-VERSION.tar.xz +https://github.com/anholt/libepoxy/archive/1.5.10.tar.gz subprojects/libepoxy https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/archive/42.0/gsettings-desktop-schemas-42.0.tar.gz schemas -https://github.com/anholt/libepoxy/archive/refs/tags/1.5.10.tar.gz libepoxy patches/no-fribidi.patch patches/fix-firefox.patch diff --git a/extra/gtk+3/version b/extra/gtk+3/version index 7d62168c..2d1bc36b 100644 --- a/extra/gtk+3/version +++ b/extra/gtk+3/version @@ -1 +1 @@ -3.24.33 1 +3.24.34 1