maintainer-feedback requested: [Bug 258362] audio/libsndfile: Failed to build due to duplicated case value in programs/sndfile-play.c / Unnecessary uses of CMake

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 08 Sep 2021 09:37:56 UTC
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-multimedia
(Nobody) <multimedia@FreeBSD.org> for maintainer-feedback:
Bug 258362: audio/libsndfile: Failed to build due to duplicated case value in
programs/sndfile-play.c / Unnecessary uses of CMake
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258362



--- Description ---
The build fails with following messages (I uses GCC 9):

programs/sndfile-play.c: In function 'alsa_write_float':
programs/sndfile-play.c:331:4: error: duplicate case value
  331 |    case -ESTRPIPE :
      |    ^~~~
programs/sndfile-play.c:293:4: note: previously used here
  293 |    case -EPIPE :
      |    ^~~~

This is due to tho following file used by libsndfile has defined `ESTRPIPE` as
`EPIPE`:
> /usr/local/include/alsa/pcm.h:#define ESTRPIPE EPIPE

Since the error is in ALSA-specific code (inside '#if HAVE_ALSA_ASOUNDLIB_H'),
it won't happen if ALSA library isn't installed.


Another issue in this port is it uses CMake, despite the source itself also
supporting GNU autotools as bulid system: the released source tarball contains
pregenerated GNU build scripts ready for use. For me it is terrible to have to
install the huge crap CMake just to build this port; please consider supporting
building this port without CMake.