build: Switch to GTK4 and libadwaita

Switch the build system to GTK4 and libadwaita, instead of GTK3
and libhandy.

This commit breaks the build.
This commit is contained in:
Georges Basile Stavracas Neto 2022-07-07 21:20:30 -03:00
parent 52b4b490f3
commit c31640fa12
7 changed files with 19 additions and 14 deletions

View File

@ -7,7 +7,7 @@ cache:
- _ccache/
variables:
DEBIAN_IMAGE: "registry.freedesktop.org/pwithnall/malcontent/debian-unstable:v2"
DEBIAN_IMAGE: "registry.freedesktop.org/pwithnall/malcontent/debian-unstable:v3"
MESON_TEST_TIMEOUT_MULTIPLIER: 2
G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload"

View File

@ -5,14 +5,14 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
git \
gtk-doc-tools \
lcov \
libadwaita-1-dev \
libaccountsservice-dev \
libappstream-dev \
libflatpak-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libglib-testing-0-dev \
libgtk-3-dev \
libhandy-1-dev \
libgtk-4-dev \
libpam0g-dev \
libpolkit-gobject-1-dev \
libxml2-utils \

View File

@ -28,8 +28,8 @@ libmalcontent_ui_public_deps = [
dependency('gio-2.0', version: '>= 2.44'),
dependency('glib-2.0', version: '>= 2.54.2'),
dependency('gobject-2.0', version: '>= 2.54'),
dependency('gtk+-3.0', version: '>= 3.24'),
libhandy_dep,
dependency('gtk4', version: '>= 4.6'),
libadwaita_dep,
libmalcontent_dep,
]
libmalcontent_ui_private_deps = [
@ -87,7 +87,7 @@ if xmllint.found()
'validate-ui', xmllint,
args: [
'--nonet', '--noblanks', '--noout',
'--relaxng', join_paths(gtk_prefix, 'share', 'gtk-3.0', 'gtkbuilder.rng'),
'--relaxng', join_paths(gtk_prefix, 'share', 'gtk-4.0', 'gtk4builder.rng'),
files(
'restrict-applications-dialog.ui',
'restrict-applications-selector.ui',

View File

@ -27,9 +27,9 @@ malcontent_control = executable('malcontent-control',
dependency('gio-2.0', version: '>= 2.44'),
dependency('glib-2.0', version: '>= 2.54.2'),
dependency('gobject-2.0', version: '>= 2.54'),
dependency('gtk+-3.0'),
dependency('gtk4', version: '>= 4.6'),
dependency('polkit-gobject-1'),
libhandy_dep,
libadwaita_dep,
libmalcontent_dep,
libmalcontent_ui_dep,
],
@ -84,7 +84,7 @@ if xmllint.found()
'validate-ui', xmllint,
args: [
'--nonet', '--noblanks', '--noout',
'--relaxng', join_paths(gtk_prefix, 'share', 'gtk-3.0', 'gtkbuilder.rng'),
'--relaxng', join_paths(gtk_prefix, 'share', 'gtk-4.0', 'gtk4builder.rng'),
files(
'carousel.ui',
'main.ui',

View File

@ -134,7 +134,12 @@ else
'Malcontent-' + libmalcontent_api_version + '.typelib']
endif
if get_option('ui').enabled()
libhandy_dep = dependency('libhandy-1', version: '>=1.1.0', fallback: ['libhandy', 'libhandy_dep'])
libadwaita_dep = dependency(
'libadwaita-1',
version: '>= 1.1',
fallback: ['libadwaita', 'libadwaita_dep'],
default_options: ['examples=false', 'introspection=disabled', 'tests=false', 'vapi=false'],
)
subdir('libmalcontent-ui')
endif
subdir('malcontent-client')

View File

@ -0,0 +1,4 @@
[wrap-git]
url = https://gitlab.gnome.org/GNOME/libadwaita.git
revision = 1.1.0
depth = 1

View File

@ -1,4 +0,0 @@
[wrap-git]
directory = libhandy
url = https://gitlab.gnome.org/GNOME/libhandy.git
revision = origin/main