Support libsoup-2.4 in meson
This commit is contained in:
parent
17c451652d
commit
583a381c74
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
@ -22,9 +22,10 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get remove libunwind-14-dev
|
||||
- run: sudo apt-get install -y build-essential gettext libadwaita-1-dev libcanberra-dev libgcrypt20-dev libgee-0.8-dev libgpgme-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgtk-4-dev libnice-dev libnotify-dev libqrencode-dev libsignal-protocol-c-dev libsoup-3.0-dev libsqlite3-dev libsrtp2-dev libwebrtc-audio-processing-dev meson valac
|
||||
- run: meson setup build
|
||||
- run: sudo apt-get install -y build-essential gettext libadwaita-1-dev libcanberra-dev libgcrypt20-dev libgee-0.8-dev libgpgme-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgtk-4-dev libnice-dev libnotify-dev libqrencode-dev libsignal-protocol-c-dev libsoup2.4-dev libsqlite3-dev libsrtp2-dev libwebrtc-audio-processing-dev meson valac
|
||||
- run: meson setup build -Dcrypto-backend=auto -Dplugin-ice=enabled -Duse-soup2=true
|
||||
- run: meson compile -C build
|
||||
- run: build/plugins/omemo/test_omemo
|
||||
build-flatpak:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
|
|
|
@ -71,6 +71,14 @@ Make sure to install all [dependencies](https://github.com/dino/dino/wiki/Build#
|
|||
make
|
||||
build/dino
|
||||
|
||||
If you want to use `meson` build system, follow the next instructions:
|
||||
|
||||
meson setup build -Duse-soup2=true -Dcrypto-backend=gnutls -Dplugin-ice=enabled
|
||||
meson compile -C build
|
||||
build/main/dino
|
||||
|
||||
If your `nice` library depends on `libsoup-3.0`, you can omit `-Duse-soup2=true` option.
|
||||
|
||||
Build on Windows (x86_64)
|
||||
------------
|
||||
- Install and configure the [MSYS2](https://www.msys2.org/) package;
|
||||
|
|
|
@ -52,6 +52,12 @@ elif get_option('crypto-backend') == 'gnutls'
|
|||
crypto_backend = 'gnutls'
|
||||
endif
|
||||
|
||||
if get_option('use-soup2')
|
||||
libsoup_version = '2.4'
|
||||
else
|
||||
libsoup_version = '3.0'
|
||||
endif
|
||||
|
||||
dep_gdk_pixbuf = dependency('gdk-pixbuf-2.0')
|
||||
dep_gee = dependency('gee-0.8')
|
||||
dep_gio = dependency('gio-2.0')
|
||||
|
@ -73,7 +79,7 @@ dep_libsrtp2 = dependency('libsrtp2', disabler: true, required: plugin_crypto)
|
|||
# we'll have to check compatibility for every new release
|
||||
# distro maintainers may update this dependency after compatibility tests
|
||||
dep_libsignal_protocol_c = dependency('libsignal-protocol-c', version: ['>=2.3.2', '<2.3.4'], disabler: true, required: get_option('plugin-omemo'))
|
||||
dep_libsoup = dependency('libsoup-3.0', disabler: true, required: get_option('plugin-http-files'))
|
||||
dep_libsoup = dependency('libsoup-@0@'.format(libsoup_version), disabler: true, required: get_option('plugin-http-files'))
|
||||
dep_nice = dependency('nice', version: '>=0.1.15', disabler: true, required: get_option('plugin-ice'))
|
||||
dep_m = meson.get_compiler('c').find_library('m', required: false)
|
||||
dep_sqlite3 = dependency('sqlite3', version: '>=3.24')
|
||||
|
|
|
@ -14,3 +14,5 @@ option('plugin-rtp-msdk', type: 'feature', value: 'disabled', description: 'Inte
|
|||
option('plugin-rtp-vaapi', type: 'feature', value: 'disabled', description: 'Video Acceleration API')
|
||||
option('plugin-rtp-vp9', type: 'feature', value: 'disabled', description: 'VP9 codec')
|
||||
option('plugin-rtp-webrtc-audio-processing', type: 'feature', description: 'Voice preprocessing')
|
||||
|
||||
option('use-soup2', type: 'boolean', value: false, description: 'Use libsoup version 2 instead of 3')
|
||||
|
|
|
@ -15,8 +15,10 @@ sources = files(
|
|||
'src/register_plugin.vala',
|
||||
)
|
||||
|
||||
vala_args = [
|
||||
'--define=SOUP_3_0',
|
||||
]
|
||||
vala_args = []
|
||||
if dep_libsoup.version().version_compare('>=3.0')
|
||||
vala_args += ['--define=SOUP_3_0']
|
||||
endif
|
||||
|
||||
lib_http_files = shared_library('http-files', sources, name_prefix: '', vala_args: vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins')
|
||||
dep_http_files = declare_dependency(link_with: lib_http_files, include_directories: include_directories('.'))
|
||||
|
|
Loading…
Reference in a new issue