[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
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258362

            Bug ID: 258362
           Summary: audio/libsndfile: Failed to build due to duplicated
                    case value in programs/sndfile-play.c / Unnecessary
                    uses of CMake
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: multimedia@FreeBSD.org
          Reporter: msl0000023508@gmail.com
          Assignee: multimedia@FreeBSD.org
             Flags: maintainer-feedback?(multimedia@FreeBSD.org)
 Attachment #227754 text/plain
         mime type:

Created attachment 227754
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=227754&action=edit
audio/libsndfile/files/patch-programs_sndfile-play.c

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.