Bug 240585 - audio/pulseaudio: Update to 13.0
Summary: audio/pulseaudio: Update to 13.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
Keywords: patch
Depends on:
Reported: 2019-09-14 23:25 UTC by lightside
Modified: 2019-09-15 19:55 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)

Proposed patch (since 507372 revision) (5.26 KB, patch)
2019-09-14 23:25 UTC, lightside
lightside: maintainer-approval? (gnome)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2019-09-14 23:25:37 UTC
Created attachment 207491 [details]
Proposed patch (since 507372 revision)

Patch to update audio/pulseaudio port from 12.2 to 13.0 version.

Look following links for changes:

- Remove intltool from USE_GNOME variable [1]
- Add src/utils/pa-info to SHEBANG_FILES variable
- Add fix for src/pulsecore/atomic.h [2]
- Add fix for src/tests/atomic-test.c [3]
- Update pkg-plist

For reference:
1. Use upstream gettext instead intltool

2. Fixes following error, when using WEBRTC_AEC port's option and Clang compiler:
In file included from modules/echo-cancel/webrtc.cc:31:
In file included from ./pulsecore/modargs.h:29:
In file included from ./pulsecore/resampler.h:25:
In file included from ./pulsecore/memblock.h:31:
./pulsecore/atomic.h:120:33: error: cannot initialize a parameter of type 'volatile unsigned long' with an lvalue of
      type 'void *'
    __atomic_store_n(&a->value, p, __ATOMIC_SEQ_CST);

The GCC compiler doesn't report about this (and probably not affected).

This is because of following commit:
atomic: fix load and store for armv7 and higher

Alternative approach is to define "pulseaudio_cv_atomic_store_n" variable:
CONFIGURE_ENV+=	pulseaudio_cv_atomic_store_n=""

The "uintptr_t" type was used because of:
"Integer type capable of holding a value converted from a void pointer and then be converted back to that type with a value that compares equal to the original pointer."

3. Fixes following error (or similar errors):
tests/atomic-test.c:58:4: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'?
   cpu_set_t cpuset;

Related to [2], but possible to use "--disable-default-build-tests" configure option instead:
CONFIGURE_ARGS+=	--disable-default-build-tests
% ./configure --help | grep -h1 disable-default-build-tests | tail -2
                          Build test programs only during make check
Comment 1 lightside 2019-09-14 23:27:49 UTC
The "PulseAudio 13.0 release notes":
mentions about following bug report:
With latest update on pulseaudio from 12.2-7 --> 12.99.1 makes qt compile impossible

With references to following bug reports:
pulseaudio-12.99.1 breaks qtwebengine build

Some suggestion in following comment is to use CONFIG+=link_pulseaudio (e.g., for www/qt5-webengine port, when using PULSEAUDIO port's option):
Comment 2 Jan Beich freebsd_committer 2019-09-15 16:15:29 UTC
Thanks for providing rationale for each change. I've added a few of mine:

- Add missing dependency to build tests and confirm files/patch-src_tests_atomic-test.c
- Move tests into a separate option as it has extra dependency
- Allow running tests via "make test"
- Auto-run "make test" if TEST=on to simplify testing on every release/architecture via poudriere;
  To be revisited after https://github.com/freebsd/poudriere/pull/355 lands
- Add missing dependency for building manpages:

  perl ./xmltoman pulseaudio.1.xml > pulseaudio.1 || rm -f pulseaudio.1
  /bin/sh: perl: not found
  Can't locate XML/Parser.pm in @INC (you may need to install the XML::Parser module) (@INC contains: /usr/local/lib/perl5/site_perl/mach/5.30 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.30/mach /usr/local/lib/perl5/5.30 .) at ./xmltoman line 20.
   /bin/mkdir -p '/wrkdirs/usr/ports/audio/pulseaudio/work/stage/usr/local/man/man1'
   install  -m 0644 ./pulseaudio.1 ./pax11publish.1 ./pacat.1 ./pacmd.1 ./pactl.1 ./pasuspender.1 ./padsp.1 ./start-pulseaudio-x11.1 '/wrkdirs/usr/ports/audio/pulseaudio/work/stage/usr/local/man/man1'
  install: ./pulseaudio.1: No such file or directory

- Fix some errors in pa-info script:

  > cat /etc/pulse/daemon.conf
  cat: /etc/pulse/daemon.conf: No such file or directory
  > cat /etc/pulse/client.conf
  cat: /etc/pulse/client.conf: No such file or directory
  > cat /etc/pulse/default.pa
  cat: /etc/pulse/default.pa: No such file or directory
  > cat /etc/pulse/system.pa
  cat: /etc/pulse/system.pa: No such file or directory
  > jacks_do
  ls: illegal option -- -
  usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [-D format] [file ...]

- Adjust RUN_DEPENDS in net/xrdp:
  ===>   xrdp-0.9.11,1 depends on file: /usr/local/lib/pulse-12.2/modules/module-xrdp-sink.so - not found
  *** Error code 1

- Fix Blink-based consumers by adding "const" to lazy bindings:

  [992/17036] python ../../tools/generate_stubs/generate_stubs.py -i gen/media/audio/pulse -o gen/media/audio/pulse -t posix_stubs -e ../../media/audio/pulse/pulse_stub_header.fragment -s pulse_stubs -p media/audio/pulse ../../media/audio/pulse/pulse.sigs
  gen/media/audio/pulse/pulse_stubs.cc:155:27: error: conflicting types for 'pa_context_get_state'
  extern pa_context_state_t pa_context_get_state(pa_context* c) __attribute__((weak));
  ../../../../../../../../../../usr/local/include/pulse/context.h:199:20: note: previous declaration is here
  pa_context_state_t pa_context_get_state(const pa_context *c);
Comment 3 commit-hook freebsd_committer 2019-09-15 16:16:04 UTC
A commit references this bug:

Author: jbeich
Date: Sun Sep 15 16:15:05 UTC 2019
New revision: 512113
URL: https://svnweb.freebsd.org/changeset/ports/512113

  audio/pulseaudio: update to 13.0

  - Connect tests to the framework

  Changes:	https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/13.0/
  ABI:		https://abi-laboratory.pro/tracker/timeline/pulseaudio/
  PR:		240585
  Submitted by:	lightside@gmx.com

Comment 4 lightside 2019-09-15 19:55:17 UTC
(In reply to Jan Beich from comment #2)
Thanks for your attention and work on this PR.