Merge #288092: pulseaudio: 16.1 -> 17.0

...into staging

+6 -237
-26
pkgs/servers/pulseaudio/0001-Make-gio-2.0-optional-16.patch
··· 1 - From 72f3fe059f031f24c5ad026cb2fc16318f227c09 Mon Sep 17 00:00:00 2001 2 - From: Andrew Childs <andrew.childs@bibo.com.ph> 3 - Date: Tue, 19 Apr 2022 16:29:58 +0900 4 - Subject: [PATCH 1/8] Make gio-2.0 optional when gsettings is disabled 5 - 6 - Derived from https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/654 7 - --- 8 - meson.build | 2 +- 9 - 1 file changed, 1 insertion(+), 1 deletion(-) 10 - 11 - diff --git a/meson.build b/meson.build 12 - index c5135330f..340f58e17 100644 13 - --- a/meson.build 14 - +++ b/meson.build 15 - @@ -683,7 +683,7 @@ if get_option('daemon') 16 - cdata.set('HAVE_ALSA_UCM', 1) 17 - endif 18 - 19 - - gio_dep = dependency('gio-2.0', version : '>= 2.26.0') 20 - + gio_dep = dependency('gio-2.0', version : '>= 2.26.0', required : false) 21 - if get_option('gsettings').enabled() 22 - assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)') 23 - cdata.set('HAVE_GSETTINGS', 1) 24 - -- 25 - 2.35.1 26 -
-27
pkgs/servers/pulseaudio/0002-Ignore-SCM_CREDS-on-darwin.patch
··· 1 - From 39bef695f783614e6175477417298ddf37e2ac13 Mon Sep 17 00:00:00 2001 2 - From: Andrew Childs <andrew.childs@bibo.com.ph> 3 - Date: Tue, 19 Apr 2022 16:58:43 +0900 4 - Subject: [PATCH 2/8] Ignore SCM_CREDS on macOS 5 - 6 - It was added for FreeBSD support, but also enables the 7 - unsupported[citation needed] feature on macOS. 8 - --- 9 - src/pulsecore/creds.h | 2 +- 10 - 1 file changed, 1 insertion(+), 1 deletion(-) 11 - 12 - diff --git a/src/pulsecore/creds.h b/src/pulsecore/creds.h 13 - index b599b569c..b5b1c9f37 100644 14 - --- a/src/pulsecore/creds.h 15 - +++ b/src/pulsecore/creds.h 16 - @@ -34,7 +34,7 @@ 17 - typedef struct pa_creds pa_creds; 18 - typedef struct pa_cmsg_ancil_data pa_cmsg_ancil_data; 19 - 20 - -#if defined(SCM_CREDENTIALS) || defined(SCM_CREDS) 21 - +#if defined(SCM_CREDENTIALS) || (defined(SCM_CREDS) && !defined(__APPLE__)) 22 - 23 - #define HAVE_CREDS 1 24 - 25 - -- 26 - 2.35.1 27 -
-26
pkgs/servers/pulseaudio/0003-Ignore-HAVE_CPUID_H-on-aarch64-darwin.patch
··· 1 - diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c 2 - index c383a61c0..3d0a68c2e 100644 3 - --- a/src/pulsecore/core-util.c 4 - +++ b/src/pulsecore/core-util.c 5 - @@ -110,7 +110,7 @@ 6 - #include <sys/personality.h> 7 - #endif 8 - 9 - -#ifdef HAVE_CPUID_H 10 - +#if defined(HAVE_CPUID_H) && !(defined(__APPLE__) && defined(__aarch64__)) 11 - #include <cpuid.h> 12 - #endif 13 - 14 - diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c 15 - index 317a0101e..d1eb95d2b 100644 16 - --- a/src/pulsecore/cpu-x86.c 17 - +++ b/src/pulsecore/cpu-x86.c 18 - @@ -24,7 +24,7 @@ 19 - 20 - #include <stdint.h> 21 - 22 - -#ifdef HAVE_CPUID_H 23 - +#if defined(HAVE_CPUID_H) && !(defined(__APPLE__) && defined(__aarch64__)) 24 - #include <cpuid.h> 25 - #endif 26 -
-13
pkgs/servers/pulseaudio/0004-Prefer-HAVE_CLOCK_GETTIME-on-darwin.patch
··· 1 - diff --git a/src/pulsecore/core-rtclock.c b/src/pulsecore/core-rtclock.c 2 - index 2c2e28631..b946a3fb1 100644 3 - --- a/src/pulsecore/core-rtclock.c 4 - +++ b/src/pulsecore/core-rtclock.c 5 - @@ -65,7 +65,7 @@ pa_usec_t pa_rtclock_age(const struct timeval *tv) { 6 - 7 - struct timeval *pa_rtclock_get(struct timeval *tv) { 8 - 9 - -#if defined(OS_IS_DARWIN) 10 - +#if defined(OS_IS_DARWIN) && !defined(HAVE_CLOCK_GETTIME) 11 - uint64_t val, abs_time = mach_absolute_time(); 12 - Nanoseconds nanos; 13 -
-31
pkgs/servers/pulseaudio/0005-Enable-CoreAudio-on-darwin.patch
··· 1 - diff --git a/meson.build b/meson.build 2 - index c5135330f..055567479 100644 3 - --- a/meson.build 4 - +++ b/meson.build 5 - @@ -185,6 +185,7 @@ endif 6 - # rather than ending up in the config.h file? 7 - if host_machine.system() == 'darwin' 8 - cdata.set('OS_IS_DARWIN', 1) 9 - + cdata.set('HAVE_COREAUDIO', 1) 10 - cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS 11 - elif host_machine.system() == 'windows' 12 - cdata.set('OS_IS_WIN32', 1) 13 - diff --git a/src/modules/meson.build b/src/modules/meson.build 14 - index 1e12569dc..53a800927 100644 15 - --- a/src/modules/meson.build 16 - +++ b/src/modules/meson.build 17 - @@ -63,6 +63,14 @@ all_modules = [ 18 - [ 'module-volume-restore', 'module-volume-restore.c' ], 19 - ] 20 - 21 - +if host_machine.system() == 'darwin' 22 - + coreaudio_dep = dependency('appleframeworks', modules : ['AudioUnit', 'Cocoa', 'CoreServices', 'CoreAudio']) 23 - + all_modules += [ 24 - + [ 'module-coreaudio-detect', 'macosx/module-coreaudio-detect.c', [], [], [coreaudio_dep] ], 25 - + [ 'module-coreaudio-device', 'macosx/module-coreaudio-device.c', [], [], [coreaudio_dep] ], 26 - + ] 27 - +endif 28 - + 29 - if host_machine.system() == 'windows' 30 - winmm_dep = meson.get_compiler('c').find_library('winmm') 31 - ksuser_dep = meson.get_compiler('c').find_library('ksuser')
-18
pkgs/servers/pulseaudio/0006-Fix-libpulsecommon-sources-on-darwin.patch
··· 1 - diff --git a/src/meson.build b/src/meson.build 2 - index 9efb561d8..d181f4867 100644 3 - --- a/src/meson.build 4 - +++ b/src/meson.build 5 - @@ -179,6 +179,13 @@ if host_machine.system() == 'windows' 6 - 'pulsecore/semaphore-win32.c', 7 - 'pulsecore/thread-win32.c', 8 - ] 9 - +elif host_machine.system() == 'darwin' 10 - + libpulsecommon_sources += [ 11 - + 'pulsecore/mutex-posix.c', 12 - + 'pulsecore/poll-posix.c', 13 - + 'pulsecore/semaphore-osx.c', 14 - + 'pulsecore/thread-posix.c' 15 - + ] 16 - else 17 - libpulsecommon_sources += [ 18 - 'pulsecore/mutex-posix.c',
+1 -8
pkgs/servers/pulseaudio/add-option-for-installation-sysconfdir.patch
··· 74 74 ) 75 75 76 76 system_conf = configuration_data() 77 - @@ -136,12 +136,12 @@ custom_target('system.pa', 77 + @@ -136,6 +136,6 @@ custom_target('system.pa', 78 78 command : [m4, '@INPUT@'], 79 79 build_by_default : true, 80 80 install : true, 81 81 - install_dir : pulsesysconfdir, 82 82 + install_dir : pulsesysconfdir_install, 83 83 ) 84 - 85 - if dbus_dep.found() 86 - install_data('pulseaudio-system.conf', 87 - - install_dir : join_paths(sysconfdir, 'dbus-1', 'system.d') 88 - + install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d') 89 - ) 90 - endif 91 84 92 85 --- a/src/pulse/meson.build 93 86 +++ b/src/pulse/meson.build
+5 -13
pkgs/servers/pulseaudio/default.nix
··· 3 3 , xorg, libcap, alsa-lib, glib, dconf 4 4 , avahi, libjack2, libasyncns, lirc, dbus 5 5 , sbc, bluez5, udev, openssl, fftwFloat 6 - , soxr, speexdsp, systemd, webrtc-audio-processing 6 + , soxr, speexdsp, systemd, webrtc-audio-processing_1 7 7 , gst_all_1 8 8 , check, libintl, meson, ninja, m4, wrapGAppsHook 9 9 ··· 37 37 38 38 stdenv.mkDerivation rec { 39 39 pname = "${lib.optionalString libOnly "lib"}pulseaudio"; 40 - version = "16.1"; 40 + version = "17.0"; 41 41 42 42 src = fetchurl { 43 43 url = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-${version}.tar.xz"; 44 - sha256 = "sha256-ju8yzpHUeXn5X9mpNec4zX63RjQw2rxyhjJRdR5QSuQ="; 44 + hash = "sha256-BTeU1mcaPjl9hJ5HioC4KmPLnYyilr01tzMXu1zrh7U="; 45 45 }; 46 46 47 47 patches = [ 48 48 # Install sysconfdir files inside of the nix store, 49 49 # but use a conventional runtime sysconfdir outside the store 50 50 ./add-option-for-installation-sysconfdir.patch 51 - # https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/654 (merged) 52 - ./0001-Make-gio-2.0-optional-16.patch 53 - # https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/746 (merged) 54 - ./0002-Ignore-SCM_CREDS-on-darwin.patch 55 - ./0003-Ignore-HAVE_CPUID_H-on-aarch64-darwin.patch 56 - ./0004-Prefer-HAVE_CLOCK_GETTIME-on-darwin.patch 57 - ./0005-Enable-CoreAudio-on-darwin.patch 58 - ./0006-Fix-libpulsecommon-sources-on-darwin.patch 59 - ./0007-Fix-link-args-on-darwin.patch 60 51 ]; 61 52 62 53 outputs = [ "out" "dev" ]; ··· 74 65 ++ lib.optionals stdenv.isLinux [ glib dbus ] 75 66 ++ lib.optionals stdenv.isDarwin [ AudioUnit Cocoa CoreServices CoreAudio libintl ] 76 67 ++ lib.optionals (!libOnly) ( 77 - [ libasyncns webrtc-audio-processing ] 68 + [ libasyncns webrtc-audio-processing_1 ] 78 69 ++ lib.optional jackaudioSupport libjack2 79 70 ++ lib.optionals x11Support [ xorg.libICE xorg.libSM xorg.libX11 xorg.libXi xorg.libXtst ] 80 71 ++ lib.optional useSystemd systemd ··· 126 117 (lib.mesonOption "systemduserunitdir" "${placeholder "out"}/lib/systemd/user") 127 118 ] 128 119 ++ lib.optionals stdenv.isDarwin [ 120 + (lib.mesonEnable "consolekit" false) 129 121 (lib.mesonEnable "dbus" false) 130 122 (lib.mesonEnable "glib" false) 131 123 (lib.mesonEnable "oss-output" false)