Arun Raghavan pushed to branch master at PulseAudio / pulseaudio


Commits:
9eab29c1 by Rosen Penev at 2025-11-04T01:13:27+00:00
meson: fix usage as subproject

the non project versions of these functions evaluate to global_ variants
not project_.

Signed-off-by: Rosen Penev <[email protected]>

- - - - -
7a35b808 by Rosen Penev at 2025-11-04T01:13:27+00:00
meson: doxygen and tests to feature options

Allows build to continue without passing extra options.

Signed-off-by: Rosen Penev <[email protected]>

- - - - -
249b2fb4 by Rosen Penev at 2025-11-04T01:13:27+00:00
meson: avoid deprecated get_pkgconfig_variable

Signed-off-by: Rosen Penev <[email protected]>

- - - - -
be2efb69 by Rosen Penev at 2025-11-04T01:13:27+00:00
meson: add native to add_languages

Fixes warning.

Signed-off-by: Rosen Penev <[email protected]>

- - - - -


6 changed files:

- doxygen/meson.build
- meson.build
- meson_options.txt
- src/meson.build
- src/pulse/meson.build
- src/tests/meson.build


Changes:

=====================================
doxygen/meson.build
=====================================
@@ -1,3 +1,8 @@
+doxygen = find_program('doxygen', required: get_option('doxygen'))
+if not doxygen.found()
+  subdir_done()
+endif
+
 cdata.set('DOXYGEN_OUTPUT_DIRECTORY', meson.current_build_dir())
 
 doxygen_conf = configure_file(
@@ -7,4 +12,4 @@ doxygen_conf = configure_file(
 )
 
 run_target('doxygen',
-  command : ['doxygen', doxygen_conf])
+  command : [doxygen, doxygen_conf])


=====================================
meson.build
=====================================
@@ -1,6 +1,6 @@
 project('pulseaudio', 'c',
         version : run_command(find_program('git-version-gen'), 
join_paths(meson.current_source_dir(), '.tarball-version'), check : 
false).stdout().strip(),
-        meson_version : '>= 0.50.0',
+        meson_version : '>= 0.56.0',
         default_options : [ 'c_std=gnu11', 'cpp_std=c++17' ]
         )
 
@@ -123,7 +123,7 @@ bashcompletiondir = get_option('bashcompletiondir')
 if bashcompletiondir == ''
   bash_completion_dep = dependency('bash-completion', required : false)
   if bash_completion_dep.found()
-    bashcompletiondir = 
bash_completion_dep.get_pkgconfig_variable('completionsdir')
+    bashcompletiondir = bash_completion_dep.get_variable(pkgconfig : 
'completionsdir')
   else
     bashcompletiondir = join_paths(datadir, 'bash-completion', 'completions')
   endif
@@ -171,7 +171,7 @@ cdata.set_quoted('DESKTOPFILEDIR', join_paths(datadir, 
'applications'))
 cdata.set_quoted('PULSE_LOCALEDIR', localedir)
 cdata.set_quoted('GETTEXT_PACKAGE', 'pulseaudio')
 cdata.set('ENABLE_NLS', 1)
-cdata.set('top_srcdir', meson.source_root())
+cdata.set('top_srcdir', meson.project_source_root())
 
 # Platform specifics
 # First some defaults to keep config file generation happy
@@ -439,7 +439,7 @@ endif
 # Code coverage
 
 if get_option('gcov')
-  add_languages('cpp')
+  add_languages('cpp', native: false)
   add_project_arguments('--coverage', language: ['c', 'cpp'])
   add_project_link_arguments('--coverage', language: ['c', 'cpp'])
 endif
@@ -733,7 +733,7 @@ if get_option('daemon')
 
   systemd_dep = dependency('systemd', required : get_option('systemd'))
   if systemd_dep.found() and systemduserunitdir == ''
-    systemduserunitdir = 
systemd_dep.get_pkgconfig_variable('systemduserunitdir')
+    systemduserunitdir = systemd_dep.get_variable(pkgconfig: 
'systemduserunitdir')
   endif
 
   libelogind_dep = dependency('libelogind', required : get_option('elogind'))
@@ -840,9 +840,7 @@ check_dep = dependency('check', version : '>= 0.9.10', 
required : get_option('te
 
 # Subdirs
 
-if get_option('doxygen')
-  subdir('doxygen')
-endif
+subdir('doxygen')
 if get_option('client')
   subdir('po')
 endif


=====================================
meson_options.txt
=====================================
@@ -5,7 +5,7 @@ option('client',
        type : 'boolean', value : true,
        description : 'Build and install pulseaudio client libraries and 
utilities')
 option('doxygen',
-       type : 'boolean', value : true,
+       type : 'feature',
        description : 'Enable building and installation of documentation 
generated with doxygen')
 option('gcov',
        type : 'boolean', value : false,
@@ -14,7 +14,7 @@ option('man',
        type : 'boolean',
        description : 'Enable building and installation of man pages')
 option('tests',
-       type : 'boolean',
+       type : 'feature',
        description : 'Enable unit tests')
 
 option('system_user',


=====================================
src/meson.build
=====================================
@@ -224,7 +224,5 @@ if get_option('daemon')
   subdir('daemon')
   subdir('modules')
 endif
-if get_option('tests')
-  subdir('tests')
-endif
+subdir('tests')
 subdir('utils')


=====================================
src/pulse/meson.build
=====================================
@@ -72,10 +72,10 @@ endif
 
 if host_machine.system() != 'windows' and host_machine.system() != 'darwin'
   run_target('update-map-file',
-    command : [ join_paths(meson.source_root(), 
'scripts/generate-map-file.sh'), 'map-file', 'libpulse.def',
-                [ libpulse_headers, 'simple.h', join_paths(meson.build_root(), 
'src', 'pulse', 'version.h') ] ])
+    command : [ join_paths(meson.project_source_root(), 
'scripts/generate-map-file.sh'), 'map-file', 'libpulse.def',
+                [ libpulse_headers, 'simple.h', 
join_paths(meson.project_build_root(), 'src', 'pulse', 'version.h') ] ])
 
-  versioning_link_args = ['-Wl,-version-script=' + 
join_paths(meson.source_root(), 'src', 'pulse', 'map-file')]
+  versioning_link_args = ['-Wl,-version-script=' + 
join_paths(meson.project_source_root(), 'src', 'pulse', 'map-file')]
 else
   versioning_link_args = []
 endif


=====================================
src/tests/meson.build
=====================================
@@ -1,3 +1,7 @@
+if not check_dep.found()
+  subdir_done()
+endif
+
 # Note that a few tests have dependencies on src/modules.
 #
 # The syntax for tests declaration is:



View it on GitLab: 
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/098300373f28024fd66f4b07c5d5b95a1bdc77e2...be2efb69b97ee49ba81094d49a1b8d7be0c588c2

-- 
View it on GitLab: 
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/098300373f28024fd66f4b07c5d5b95a1bdc77e2...be2efb69b97ee49ba81094d49a1b8d7be0c588c2
You're receiving this email because of your account on gitlab.freedesktop.org.


Reply via email to