Hi,

The following diff fixes a missing avcodec dependency for cmus;
it also fixes some possible 24-bit problems, as reported here:
https://github.com/cmus/cmus/pull/613

Tested on loongson.

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/cmus/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile    23 Sep 2016 23:08:36 -0000      1.13
+++ Makefile    9 Feb 2017 11:31:06 -0000
@@ -7,14 +7,14 @@ V=                    2.7.1
 DISTNAME=              cmus-${V}
 PKGNAME-main=          ${PKGNAME}
 PKGNAME-ffmpeg=                cmus-ffmpeg-${V}
-REVISION=              0
+REVISION=              1
 
 GH_ACCOUNT=            cmus
 GH_PROJECT=            cmus
 GH_TAGNAME=            v${V}
 
 CATEGORIES=            audio
-HOMEPAGE=              http://cmus.sourceforge.net/
+HOMEPAGE=              https://cmus.github.io/
 
 MAINTAINER=            Donovan Watteau <[email protected]>
 
@@ -36,7 +36,7 @@ LIB_DEPENDS-main=     audio/flac \
                        audio/wavpack \
                        converters/libiconv
 
-WANTLIB-ffmpeg=                avformat swresample
+WANTLIB-ffmpeg=                avcodec avformat swresample
 LIB_DEPENDS-ffmpeg=    graphics/ffmpeg
 RUN_DEPENDS-ffmpeg=    audio/cmus
 
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure     9 Feb 2017 11:31:06 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+The ffmpeg plugin uses functions from libavcodec, so ensure that it is linked
+against libavcodec.
+
+Commit 9bde48f1b59d upstream.
+
+--- configure.orig     Mon Jul 13 12:00:56 2015
++++ configure  Thu Feb  9 12:11:12 2017
+@@ -378,7 +378,7 @@ check_aac()
+ check_ffmpeg()
+ {
+       HAVE_FFMPEG_AVCODEC_H=y
+-      pkg_config FFMPEG "libavformat" || return $?
++      pkg_config FFMPEG "libavformat libavcodec" || return $?
+       if check_header "libavcodec/avcodec.h" $FFMPEG_CFLAGS
+       then
+               HAVE_FFMPEG_AVCODEC_H=n
Index: patches/patch-sndio_c
===================================================================
RCS file: /cvs/ports/audio/cmus/patches/patch-sndio_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-sndio_c
--- patches/patch-sndio_c       23 Sep 2016 23:08:36 -0000      1.1
+++ patches/patch-sndio_c       9 Feb 2017 11:31:06 -0000
@@ -1,11 +1,11 @@
 $OpenBSD: patch-sndio_c,v 1.1 2016/09/23 23:08:36 juanfra Exp $
 
-Support 32-bit/24-bit encoding
+Support 32-bit/24-bit encoding.
 
-84f33584be91 upstream
+Commits 84f33584be91 and bf87f0d76f87 upstream.
 
 --- sndio.c.orig       Mon Jul 13 12:00:56 2015
-+++ sndio.c    Thu Sep 22 18:54:45 2016
++++ sndio.c    Thu Feb  9 12:11:30 2017
 @@ -20,7 +20,6 @@
  
  #include <sys/types.h>
@@ -14,7 +14,7 @@ Support 32-bit/24-bit encoding
  #include <sys/stat.h>
  #include <errno.h>
  #include <fcntl.h>
-@@ -82,6 +81,12 @@ static int sndio_set_sf(sample_format_t sf)
+@@ -82,6 +81,13 @@ static int sndio_set_sf(sample_format_t sf)
                par.le = 1;
  
        switch (sf_get_bits(sndio_sf)) {
@@ -23,6 +23,7 @@ Support 32-bit/24-bit encoding
 +              break;
 +      case 24:
 +              par.bits = 24;
++              par.bps = 3;
 +              break;
        case 16:
                par.bits = 16;

Reply via email to