[pulseaudio-commits] [Git][pulseaudio/webrtc-audio-processing][master] meson: Fix generation of pkgconfig files
Arun Raghavan (@arun)
gitlab at gitlab.freedesktop.org
Mon Sep 4 23:37:58 UTC 2023
Arun Raghavan pushed to branch master at PulseAudio / webrtc-audio-processing
Commits:
0691ae20 by Nirbheek Chauhan at 2023-09-05T01:50:51+05:30
meson: Fix generation of pkgconfig files
Too much information was specified manually. All this is deduced
automatically if you specify the library as the first positional
argument.
Only absl_base needs to be in Requires: because absl_optional's header
file is needed at build time.
Also add a check in the CI for the pc files being usable.
- - - - -
2 changed files:
- .gitlab-ci.yml
- meson.build
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -83,8 +83,12 @@ build-container-aarch64:
extends:
- .fdo.distribution-image at ubuntu
script:
- - meson setup --wrap-mode=nofallback builddir
+ - meson setup --wrap-mode=nofallback --prefix=/usr --libdir=lib builddir
- ninja -C builddir
+ - DESTDIR=$PWD/_install ninja install -C builddir
+ # Test that the pc files are usable
+ - PKG_CONFIG_PATH=$PWD/_install/usr/lib/pkgconfig pkg-config --cflags --libs webrtc-audio-processing-1
+ - PKG_CONFIG_PATH=$PWD/_install/usr/lib/pkgconfig pkg-config --cflags --libs webrtc-audio-coding-1
artifacts:
expire_in: '5 days'
when: 'always'
@@ -96,8 +100,12 @@ build-container-aarch64:
extends:
- .fdo.distribution-image at ubuntu
script:
- - meson setup --force-fallback-for=abseil-cpp builddir
+ - meson setup --force-fallback-for=abseil-cpp --prefix=/usr --libdir=lib builddir
- ninja -C builddir
+ - DESTDIR=$PWD/_install ninja install -C builddir
+ # Test that the pc files are usable
+ - PKG_CONFIG_LIBDIR=$PWD/_install/usr/lib/pkgconfig pkg-config --cflags --libs webrtc-audio-processing-1
+ - PKG_CONFIG_LIBDIR=$PWD/_install/usr/lib/pkgconfig pkg-config --cflags --libs webrtc-audio-coding-1
artifacts:
expire_in: '5 days'
when: 'always'
=====================================
meson.build
=====================================
@@ -19,12 +19,10 @@ minor_version = version_split[1]
apm_major_version = major_version
apm_minor_version = minor_version
-apm_version = apm_major_version + '.' + apm_minor_version
apm_project_name = 'webrtc-audio-processing-' + apm_major_version
ac_major_version = major_version
ac_minor_version = minor_version
-ac_version = ac_major_version + '.' + ac_minor_version
ac_project_name = 'webrtc-audio-coding-' + ac_major_version
include_subdir = apm_project_name
@@ -72,6 +70,9 @@ if absl_dep[0].type_name() == 'internal'
absl_subproj.get_variable('absl_types_headers'),
]
install_headers(headers, preserve_path: true)
+ pc_requires = []
+else
+ pc_requires = [absl_dep[0]]
endif
if ['darwin', 'ios'].contains(host_system)
@@ -176,21 +177,13 @@ subdir('webrtc')
pkgconfig = import('pkgconfig')
pkgconfig.generate(
- name: apm_project_name,
- description: 'WebRTC Audio Processing library',
- version: apm_major_version + '.' + apm_minor_version,
- filebase: apm_project_name,
- subdirs: include_subdir,
- extra_cflags: [
- '-DWEBRTC_LIBRARY_IMPL',
- ] + platform_cflags,
- libraries: [
- libwebrtc_audio_processing,
- ],
- requires: [
- # the audio processing header references absl's optional.h
- 'absl_base',
- ]
+ libwebrtc_audio_processing,
+ description: 'WebRTC Audio Processing library',
+ subdirs: include_subdir,
+ requires: pc_requires,
+ extra_cflags: [
+ '-DWEBRTC_LIBRARY_IMPL',
+ ] + platform_cflags,
)
audio_processing_dep = declare_dependency(
@@ -202,15 +195,12 @@ audio_processing_dep = declare_dependency(
meson.override_dependency(apm_project_name, audio_processing_dep)
pkgconfig.generate(
- name: ac_project_name,
- description: 'WebRTC Audio Coding library',
- version: ac_major_version + '.' + ac_minor_version,
- filebase: ac_project_name,
- subdirs: include_subdir,
- extra_cflags: [
- '-DWEBRTC_LIBRARY_IMPL',
- ] + platform_cflags,
- libraries: libwebrtc_audio_coding,
+ libwebrtc_audio_coding,
+ description: 'WebRTC Audio Coding library',
+ subdirs: include_subdir,
+ extra_cflags: [
+ '-DWEBRTC_LIBRARY_IMPL',
+ ] + platform_cflags,
)
audio_coding_dep = declare_dependency(
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/commit/0691ae20d8014c01ed5b0b0b057d2bd98478ff37
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/commit/0691ae20d8014c01ed5b0b0b057d2bd98478ff37
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20230904/248bda2e/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list