From 62d3e8fc323e539cc82d257a039abb0995b019e3 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 14 Jul 2023 08:28:10 +0530 Subject: [PATCH] meson: Ensure that soup plugin is built on Windows The libpsl subproject wasn't building successfully and CI didn't notice because: 1. The plugin wasn't explicitly enabled 2. Even when the plugin is explicitly enabled, the dep is not required at build time when not building a static plugin So fix all of these issues. Part-of: --- .gitlab-ci.yml | 5 +++++ subprojects/gst-plugins-good/ext/soup/meson.build | 2 +- subprojects/gst-plugins-good/meson_options.txt | 6 +++++- subprojects/libpsl.wrap | 2 +- ...-meson-Don-t-use-paths-with-backslashes-in-defines.patch | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67eed2a79b..09dcbf02b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -427,6 +427,8 @@ build fedora clang: -Dvaapi=disabled -Dgst-plugins-base:pango=enabled -Dgst-plugins-good:cairo=enabled + -Dgst-plugins-good:soup=enabled + -Dgst-plugins-good:soup-lookup-dep=true -Dgst-plugins-bad:d3d11-wgc=enabled rules: # If this matches, it means the pipeline is running against either the main @@ -490,9 +492,12 @@ build vs2022 arm64: ARCH: 'arm64' # pango pulls in cairo which pulls in pixman which doesn't build because of # https://github.com/mesonbuild/meson/issues/9889 + # libsoup requires glib-compile-resources, which isn't available in a cross + # build MESON_CROSS_ARGS: >- -Dgst-plugins-base:pango=disabled -Dgst-plugins-good:cairo=disabled + -Dgst-plugins-good:soup-lookup-dep=false -Dgst-devtools:cairo=disabled --cross-file ci/meson/vs2022-paths.ini --cross-file ci/meson/vs2022-arm64-cross.ini diff --git a/subprojects/gst-plugins-good/ext/soup/meson.build b/subprojects/gst-plugins-good/ext/soup/meson.build index ea169bf31c..f542fc2127 100644 --- a/subprojects/gst-plugins-good/ext/soup/meson.build +++ b/subprojects/gst-plugins-good/ext/soup/meson.build @@ -17,7 +17,7 @@ libdl_dep = cc.find_library('dl', required: false) static_args = [] static_deps = [] default_library = get_option('default_library') -if default_library in ['static', 'both'] +if default_library in ['static', 'both'] or get_option('soup-lookup-dep') libsoup2_dep = dependency('libsoup-2.4', version : '>=2.48', required : false, fallback : ['libsoup', 'libsoup_dep'], default_options: ['sysprof=disabled']) diff --git a/subprojects/gst-plugins-good/meson_options.txt b/subprojects/gst-plugins-good/meson_options.txt index 696e88652c..030aa6186f 100644 --- a/subprojects/gst-plugins-good/meson_options.txt +++ b/subprojects/gst-plugins-good/meson_options.txt @@ -69,7 +69,6 @@ option('osxvideo', type : 'feature', value : 'auto', description : 'macOS Cocoa option('png', type : 'feature', value : 'auto', description : 'PNG image codec plugin') option('pulse', type : 'feature', value : 'auto', description : 'Pulseaudio audio source/sink plugin') option('shout2', type : 'feature', value : 'auto', description : 'Shout-casting network sink plugin based on libshout2') -option('soup', type : 'feature', value : 'auto', description : 'libsoup HTTP client source/sink plugin') option('speex', type : 'feature', value : 'auto', description : 'Speex audio codec plugin') option('taglib', type : 'feature', value : 'auto', description : 'Tag-writing plugin based on taglib') option('twolame', type : 'feature', value : 'auto', description : 'twolame mp2 audio encoder plugin') @@ -86,6 +85,11 @@ option('rpicamsrc', type : 'feature', value : 'auto', description : 'Raspberry P option('rpi-header-dir', type : 'string', value : '/opt/vc/include', description : 'Directory where VideoCore/MMAL headers and bcm_host.h can be found') option('rpi-lib-dir', type : 'string', value : '/opt/vc/lib', description : 'Directory where VideoCore/MMAL libraries can be found') +# soup plugin options +option('soup', type : 'feature', value : 'auto', description : 'libsoup HTTP client source/sink plugin') +option('soup-lookup-dep', type : 'boolean', value : 'false', + description : 'Lookup libsoup dep at build time even when building a shared plugin') + # Qt plugin options option('qt-method', type: 'combo', value: 'auto', choices: ['auto', 'pkg-config', 'qmake'], description: 'Method to use to find Qt') diff --git a/subprojects/libpsl.wrap b/subprojects/libpsl.wrap index 4538483984..b487b206cb 100644 --- a/subprojects/libpsl.wrap +++ b/subprojects/libpsl.wrap @@ -3,4 +3,4 @@ directory = libpsl-0.21.2 source_url = https://github.com/rockdaboot/libpsl/releases/download/0.21.2/libpsl-0.21.2.tar.gz source_filename = libpsl-0.21.2.tar.gz source_hash = e35991b6e17001afa2c0ca3b10c357650602b92596209b7492802f3768a6285f -diff_files = libpsl-0.21.2/0001-tools-psl.c-Fix-build-on-Windows.patch, libpsl-0.21.2/0002-tools-psl.c-Fix-logic-fallout-and-warning.patch, libps-0.21.2/0001-meson-Don-t-use-paths-with-backslashes-in-defines.patch +diff_files = libpsl-0.21.2/0001-tools-psl.c-Fix-build-on-Windows.patch, libpsl-0.21.2/0002-tools-psl.c-Fix-logic-fallout-and-warning.patch, libpsl-0.21.2/0001-meson-Don-t-use-paths-with-backslashes-in-defines.patch diff --git a/subprojects/packagefiles/libpsl-0.21.2/0001-meson-Don-t-use-paths-with-backslashes-in-defines.patch b/subprojects/packagefiles/libpsl-0.21.2/0001-meson-Don-t-use-paths-with-backslashes-in-defines.patch index 3252a4efc5..5a8ef3c212 100644 --- a/subprojects/packagefiles/libpsl-0.21.2/0001-meson-Don-t-use-paths-with-backslashes-in-defines.patch +++ b/subprojects/packagefiles/libpsl-0.21.2/0001-meson-Don-t-use-paths-with-backslashes-in-defines.patch @@ -34,7 +34,7 @@ index c2381af..d8c266d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -10,13 +10,14 @@ psl_ascii_dafsa = custom_target('psl_ascii.dafsa', - build_by_default: false, + output : 'psl_ascii.dafsa', command : [python, psl_make_dafsa, '--output-format=binary', '--encoding=ascii', '@INPUT@', '@OUTPUT@']) +fsmod = import('fs')