From 84d4fbaa852ee46917a7fa8fc17fea5a7c6844fc Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 16 Oct 2024 01:16:30 +0200 Subject: [PATCH 1/7] build: require meson 1.2 Update the requirement in meson.build and the CI runners to meson 1.2 This keeps things in line with glib and avoids unexpected suprises from using meson versions that are way too old. --- .gitlab-ci/test-msvc.bat | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index ff6b085366..4d54a0881a 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -5,7 +5,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliar @echo on :: FIXME: make warnings fatal -pip3 install --upgrade --user meson~=0.64 || goto :error +pip3 install --upgrade --user meson~=1.2 || goto :error meson setup -Dbackend_max_links=1 -Ddebug=false -Dmedia-gstreamer=disabled -Dvulkan=disabled _build || goto :error ninja -C _build || goto :error diff --git a/meson.build b/meson.build index 4ff564f598..badfd2cb86 100644 --- a/meson.build +++ b/meson.build @@ -7,7 +7,7 @@ project('gtk', 'c', # https://github.com/mesonbuild/meson/issues/2289 'c_std=gnu99', ], - meson_version : '>= 0.63.0', + meson_version : '>= 1.2.0', license: 'LGPL-2.1-or-later') # keep these numbers in sync with wrap files where there exist From 06532e583a259612501017363a8aff9cd28db732 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 15 Oct 2024 23:12:38 +0200 Subject: [PATCH 2/7] build: Add devenv with GTK_PATH For meson devenv - which is used by the meson vscode plugin to run applications - setting GTK_PATH is necessary to get uninstalled modules working. --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index badfd2cb86..766d6fb71c 100644 --- a/meson.build +++ b/meson.build @@ -923,6 +923,10 @@ subdir('po') subdir('docs/reference') +devenv = environment() +devenv.set('GTK_PATH', meson.current_build_dir() / 'modules') +meson.add_devenv(devenv) + if not meson.is_cross_build() gnome.post_install( glib_compile_schemas: true, From 60d46ccc6c25af13787cb55a72702f9dc27d6093 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 15 Oct 2024 23:14:25 +0200 Subject: [PATCH 3/7] build: Add wrap file for GStreamer We require 1.24.0 so lets use that for now. This is necessary to get working media support. --- subprojects/gstreamer-full.wrap | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 subprojects/gstreamer-full.wrap diff --git a/subprojects/gstreamer-full.wrap b/subprojects/gstreamer-full.wrap new file mode 100644 index 0000000000..1ca3757900 --- /dev/null +++ b/subprojects/gstreamer-full.wrap @@ -0,0 +1,8 @@ +[wrap-git] +directory=gstreamer +url=https://gitlab.freedesktop.org/gstreamer/gstreamer.git +revision=1.24 +depth=1 + +[provide] +dependency_names = gstreamer-1.0, gstreamer-player-1.0, gstreamer-gl-1.0 \ No newline at end of file From cc03f04380cda589313c97d63f465cb52226fe9d Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 16 Oct 2024 20:56:15 +0200 Subject: [PATCH 4/7] build: Configure GStreamer subproject without Python Our plugin doesn't use gst-python, so build without it. --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 766d6fb71c..cc7bb83718 100644 --- a/meson.build +++ b/meson.build @@ -428,7 +428,10 @@ gi_dep = dependency('gobject-introspection-1.0', version: introspecti required: get_option('introspection').enabled() and get_option('build-tests')) gstplayer_dep = dependency('gstreamer-player-1.0', version: gstreamer_req, - required: get_option('media-gstreamer')) + required: get_option('media-gstreamer'), + default_options: [ + 'python=disabled', + ]) gstgl_dep = dependency('gstreamer-gl-1.0', version: gstreamer_req, required: get_option('media-gstreamer')) gstallocators_dep = dependency('gstreamer-allocators-1.0', version: gstreamer_req, From 036f481753452c06888cc00f9e247db140fb36ea Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 16 Oct 2024 00:29:21 +0200 Subject: [PATCH 5/7] gitignore: Add all wrap files meson has a tendency to dump wrap files of subprojects into this directory. So we have to ignore them when using wrap files. I think meson should put them into its builddir, but oh well... --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 050320de0e..32d417094c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /subprojects/*/ .flatpak-builder/ +subprojects/*.wrap From 0876ad62129d08c6f504fe13e1049a00021d6940 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 16 Oct 2024 00:31:10 +0200 Subject: [PATCH 6/7] gitignore: Add .vscode directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 32d417094c..b3db515eab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /subprojects/*/ .flatpak-builder/ +.vscode/ subprojects/*.wrap From 11671c0537c0768277a941cde968c1d1864fbae4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 16 Oct 2024 17:26:45 +0200 Subject: [PATCH 7/7] Remove accidentally committed file --- .gitlab-ci/.lock | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitlab-ci/.lock diff --git a/.gitlab-ci/.lock b/.gitlab-ci/.lock deleted file mode 100644 index e69de29bb2..0000000000