diff mbox series

[bug#46322,staging,2/2] gnu: pulseaudio: Use meson build system.

Message ID 20210205080029.3433-2-brice@waegenei.re
State Accepted
Headers show
Series Update pulseaudio to 14.2 and move to meson build system | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Brice Waegeneire Feb. 5, 2021, 8 a.m. UTC
* gnu/packages/pulseaudio.scm (pulseaudio)[build-system]: Switch from
gnu to meson.
[arguments]: Migrate configure flags for meson.
[propagated-inputs]: Replace 'gdbm' with 'tdb', upstream default.
---
 gnu/packages/pulseaudio.scm | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

Comments

Leo Famulari Feb. 14, 2021, 8:33 p.m. UTC | #1
On Fri, Feb 05, 2021 at 09:00:29AM +0100, Brice Waegeneire wrote:
> * gnu/packages/pulseaudio.scm (pulseaudio)[build-system]: Switch from
> gnu to meson.
> [arguments]: Migrate configure flags for meson.
> [propagated-inputs]: Replace 'gdbm' with 'tdb', upstream default.

> +     `(#:configure-flags
> +       (let ((out (assoc-ref %outputs "out")))
> +         (list "-Doss-output=disable"
> +               "-Dbluez5=true"
> +               "-Dlocalstatedir=/var"
> +               (string-append "-Dudevrulesdir="
> +                              out "/lib/udev/rules.d")
> +               ;; Ensure the RUNPATH contains all installed library locations.
> +               (string-append "-Dc_link_args=-Wl,-rpath="
> +                              out "/lib/pulseaudio:"
> +                              out "/lib:"
> +                              out "/lib/pulse-14.2/modules")))

We should avoid hard-coding the version string with something like
"/lib/pulse-" ,version "/modules"

Overall LGTM for staging. Maybe you already did this but I recommend
comparing the built outputs of the old and new versions to make sure we
don't accidentally lose any components by using the new build system.
Brice Waegeneire Feb. 16, 2021, 8:01 a.m. UTC | #2
Hello Leo,

Leo Famulari <leo@famulari.name> writes:

> On Fri, Feb 05, 2021 at 09:00:29AM +0100, Brice Waegeneire wrote:
>> * gnu/packages/pulseaudio.scm (pulseaudio)[build-system]: Switch from
>> gnu to meson.
>> [arguments]: Migrate configure flags for meson.
>> [propagated-inputs]: Replace 'gdbm' with 'tdb', upstream default.
>
>> +     `(#:configure-flags
>> +       (let ((out (assoc-ref %outputs "out")))
>> +         (list "-Doss-output=disable"
>> +               "-Dbluez5=true"
>> +               "-Dlocalstatedir=/var"
>> +               (string-append "-Dudevrulesdir="
>> +                              out "/lib/udev/rules.d")
>> +               ;; Ensure the RUNPATH contains all installed library locations.
>> +               (string-append "-Dc_link_args=-Wl,-rpath="
>> +                              out "/lib/pulseaudio:"
>> +                              out "/lib:"
>> +                              out "/lib/pulse-14.2/modules")))
>
> We should avoid hard-coding the version string with something like
> "/lib/pulse-" ,version "/modules"

Done.

> Overall LGTM for staging. Maybe you already did this but I recommend
> comparing the built outputs of the old and new versions to make sure we
> don't accidentally lose any components by using the new build system.

No, I hadn't so thank you for the heads up.  Esound support isn't
availaible with the new build system but that software isn't maintained
anymore and pulseaudio devs are looking to drop support for it¹.

Pushed as 0c25529c6c4d1da7483db3db8bdc4a10b580c85b.

¹ https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/b1f599dcd992e61c5ce2ed870bd913a43bb32deb/NEWS#L73

Cheers,
- Brice
Brice Waegeneire Feb. 16, 2021, 8:01 a.m. UTC | #3
Hello Leo,

Leo Famulari <leo@famulari.name> writes:

> On Fri, Feb 05, 2021 at 09:00:29AM +0100, Brice Waegeneire wrote:
>> * gnu/packages/pulseaudio.scm (pulseaudio)[build-system]: Switch from
>> gnu to meson.
>> [arguments]: Migrate configure flags for meson.
>> [propagated-inputs]: Replace 'gdbm' with 'tdb', upstream default.
>
>> +     `(#:configure-flags
>> +       (let ((out (assoc-ref %outputs "out")))
>> +         (list "-Doss-output=disable"
>> +               "-Dbluez5=true"
>> +               "-Dlocalstatedir=/var"
>> +               (string-append "-Dudevrulesdir="
>> +                              out "/lib/udev/rules.d")
>> +               ;; Ensure the RUNPATH contains all installed library locations.
>> +               (string-append "-Dc_link_args=-Wl,-rpath="
>> +                              out "/lib/pulseaudio:"
>> +                              out "/lib:"
>> +                              out "/lib/pulse-14.2/modules")))
>
> We should avoid hard-coding the version string with something like
> "/lib/pulse-" ,version "/modules"

Done.

> Overall LGTM for staging. Maybe you already did this but I recommend
> comparing the built outputs of the old and new versions to make sure we
> don't accidentally lose any components by using the new build system.

No, I hadn't so thank you for the heads up.  Esound support isn't
availaible with the new build system but that software isn't maintained
anymore and pulseaudio devs are looking to drop support for it¹.

Pushed as 0c25529c6c4d1da7483db3db8bdc4a10b580c85b.

¹ https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/b1f599dcd992e61c5ce2ed870bd913a43bb32deb/NEWS#L73

Cheers,
- Brice
Leo Famulari Feb. 16, 2021, 5:59 p.m. UTC | #4
On Tue, Feb 16, 2021 at 09:01:52AM +0100, Brice Waegeneire wrote:
> No, I hadn't so thank you for the heads up.  Esound support isn't
> availaible with the new build system but that software isn't maintained
> anymore and pulseaudio devs are looking to drop support for it¹.

Alright, thanks for finding that and letting us know.
diff mbox series

Patch

diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index 0589d86529..b636e23d24 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -50,7 +50,7 @@ 
   #:use-module (gnu packages avahi)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
-  #:use-module (gnu packages dbm)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gnome)
@@ -202,14 +202,20 @@  rates.")
              (patches (search-patches
                        "pulseaudio-fix-mult-test.patch"
                        "pulseaudio-longer-test-timeout.patch"))))
-    (build-system gnu-build-system)
+    (build-system meson-build-system)
     (arguments
-     `(#:configure-flags (list "--localstatedir=/var" ;"--sysconfdir=/etc"
-                               "--disable-oss-output"
-                               "--enable-bluez5"
-                               (string-append "--with-udev-rules-dir="
-                                              (assoc-ref %outputs "out")
-                                              "/lib/udev/rules.d"))
+     `(#:configure-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list "-Doss-output=disable"
+               "-Dbluez5=true"
+               "-Dlocalstatedir=/var"
+               (string-append "-Dudevrulesdir="
+                              out "/lib/udev/rules.d")
+               ;; Ensure the RUNPATH contains all installed library locations.
+               (string-append "-Dc_link_args=-Wl,-rpath="
+                              out "/lib/pulseaudio:"
+                              out "/lib:"
+                              out "/lib/pulse-14.2/modules")))
        #:phases (modify-phases %standard-phases
                  (add-before 'check 'pre-check
                    (lambda _
@@ -221,7 +227,6 @@  rates.")
                      (setenv "CK_DEFAULT_TIMEOUT" "120")
                      #t)))))
     (inputs
-     ;; TODO: Add optional inputs (GTK+?).
      `(("alsa-lib" ,alsa-lib)
        ("bluez" ,bluez)
        ("sbc" ,sbc)
@@ -250,9 +255,9 @@  rates.")
        ("perl-xml-parser" ,perl-xml-parser)
        ("pkg-config" ,pkg-config)))
     (propagated-inputs
-     ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
+     ;; 'libpulse*.la' contain `-ltdb' and `-lcap', so propagate them.
      `(("libcap" ,libcap)
-       ("gdbm" ,gdbm)))
+       ("tdb" ,tdb)))
     (home-page "http://www.pulseaudio.org/")
     (synopsis "Sound server")
     (description