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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4890>
This commit is contained in:
Nirbheek Chauhan 2023-07-14 08:28:10 +05:30 committed by Tim-Philipp Müller
parent 8585319898
commit b4f137e2ba
5 changed files with 13 additions and 4 deletions

View file

@ -347,6 +347,8 @@ build clang fedora x86_64:
-Dvaapi=disabled
-Dgst-plugins-base:pango=enabled
-Dgst-plugins-good:cairo=enabled
-Dgst-plugins-good:soup=enabled
-Dgst-plugins-good:soup-lookup-dep=true
# Needs to not be empty otherwise the newline -> space replace command in
# `script:` will fail
MESON_CROSS_ARGS: ' '
@ -408,9 +410,12 @@ build vs2019 arm64 uwp:
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/vs2019-arm64-cross-file.txt
--native-file ci/meson/vs2019-x64-native-file.txt

View file

@ -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'])

View file

@ -67,7 +67,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')
@ -84,6 +83,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')

View file

@ -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

View file

@ -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')