Thursday, May 02, 2019

Re: Update: audio/cmus

Hi,

On Wed, 17 Apr 2019 12:14:42 +0200 (CEST)
Paco Esteban <paco@onna.be> wrote:

> Here's a diff for cmus port 2.7.1 --> 2.8.0
> According to changelog:
>
> [...]
> I basically removed some patches that seem to be now integrated
> upstream related to ffmpeg plugin and sndio. Configure patch has been
> also tweaked to apply cleanly. I've left the rest untouched.
>
> Works fine for me on amd64.

I tried your diff on macppc, it needs tweaks, but it fixes cmus'
runtime (a double-free error) when playing audio CDs with the
libcdio diff i'm trying at the moment (Edd: it's a regression).
Thanks a lot :)

I'm proposing 3 tweaks to the Makefile:

- don't use REVISION, as you're bumping the version it's not needed
- It's C11, so it will require ports-gcc on !base-clang archs
- It wants atomics for macppc and probably hppa


There are extra WANTLIBs but it's needed by the *.so files in
cmus,-main according to 'readelf -d'

I've modified only the Makefile in that diff.

Charlène.


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/cmus/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile 16 Apr 2019 20:19:01 -0000 1.20
+++ Makefile 2 May 2019 18:54:39 -0000
@@ -3,11 +3,10 @@
COMMENT-main= ncurses-based music player
COMMENT-ffmpeg= ffmpeg input plugin for cmus (.aac, .mp4...)

-V= 2.7.1
+V= 2.8.0
DISTNAME= cmus-${V}
PKGNAME-main= ${PKGNAME}
PKGNAME-ffmpeg= cmus-ffmpeg-${V}
-REVISION= 6

GH_ACCOUNT= cmus
GH_PROJECT= cmus
@@ -21,12 +20,13 @@ PERMIT_PACKAGE_CDROM= Yes

MULTI_PACKAGES= -main -ffmpeg

-WANTLIB-main+= c cdio cdio_cdda cue curses discid FLAC iconv m mad
+WANTLIB-main+= c cdio cdio_cdda curses discid FLAC iconv m mad
WANTLIB-main+= ogg opusfile pthread sndio vorbis vorbisfile wavpack

+# C11
+COMPILER= base-clang ports-gcc
LIB_DEPENDS-main= audio/flac \
audio/libcdio \
- audio/libcue \
audio/libdiscid \
audio/libmad \
audio/libogg \
@@ -42,7 +42,7 @@ RUN_DEPENDS-ffmpeg= audio/cmus
USE_GMAKE= Yes

CONFIGURE_STYLE= simple
-CONFIGURE_ENV= HOSTCC="${CC}" HOSTLD="${CC}" HOST_CFLAGS="${CFLAGS}"
+CONFIGURE_ENV= HOSTCC="${CC}" HOSTLD="${CC}" HOST_CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
CFLAGS+= -Wno-system-headers
# Note: We're explicitly disabling CONFIG_CDDB as it gets undef'd in cdio.c
CONFIGURE_ARGS= prefix=${PREFIX} \
@@ -68,6 +68,12 @@ CONFIGURE_ARGS= prefix=${PREFIX} \
CONFIG_VTX=n

NO_TEST= Yes
+
+# undefined reference to `__atomic_fetch_add_8'
+.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "hppa"
+WANTLIB += atomic
+LDFLAGS += -latomic
+.endif

pre-build:
sed -i s,/usr,${LOCALBASE}, ${WRKSRC}/Doc/cmus.txt
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/cmus/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 17 Jan 2016 01:16:38 -0000 1.4
+++ distinfo 17 Apr 2019 09:58:49 -0000
@@ -1,2 +1,2 @@
-SHA256 (cmus-2.7.1.tar.gz) = gXmnqEPSV921hfTGVZmES8DlFv6F6X9vh6fOreTrUWU=
-SIZE (cmus-2.7.1.tar.gz) = 296818
+SHA256 (cmus-2.8.0.tar.gz) = dWzixiQbIQTcGQl0iCJd5VmsGAKhdb4CM8+2+8AvO9I=
+SIZE (cmus-2.8.0.tar.gz) = 317243
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/audio/cmus/patches/patch-Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 patch-Makefile
--- patches/patch-Makefile 17 Jan 2016 01:16:38 -0000 1.2
+++ patches/patch-Makefile 17 Apr 2019 09:58:49 -0000
@@ -2,9 +2,10 @@ $OpenBSD: patch-Makefile,v 1.2 2016/01/1

Fix install(1) usage.

---- Makefile.orig Mon Jul 13 12:00:56 2015
-+++ Makefile Tue Jul 28 14:05:50 2015
-@@ -262,17 +262,21 @@ plugins: $(ip-y) $(op-y)
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -272,17 +272,21 @@ plugins: $(ip-y) $(op-y)
man: $(man1) $(man7)

install-main: main
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/audio/cmus/patches/patch-configure,v
retrieving revision 1.5
diff -u -p -r1.5 patch-configure
--- patches/patch-configure 6 Jun 2018 12:14:44 -0000 1.5
+++ patches/patch-configure 17 Apr 2019 09:58:49 -0000
@@ -11,16 +11,7 @@ final build.
Index: configure
--- configure.orig
+++ configure
-@@ -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
-@@ -387,7 +387,7 @@ check_ffmpeg()
+@@ -439,7 +439,7 @@ check_ffmpeg()
fi
# ffmpeg api changes so frequently that it is best to compile the module
libs="$LDDLFLAGS $FFMPEG_LIBS"
Index: patches/patch-ffmpeg_c
===================================================================
RCS file: patches/patch-ffmpeg_c
diff -N patches/patch-ffmpeg_c
--- patches/patch-ffmpeg_c 6 Jun 2018 12:14:44 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,493 +0,0 @@
-$OpenBSD: patch-ffmpeg_c,v 1.1 2018/06/06 12:14:44 kn Exp $
-
-Various updates from upstream for newer ffmpeg versions.
-
-among other things:
-
-903282c: Fix ffmpeg segfault
-98ab2a6: Replace deprecated FFmpeg API
-ef65f69: remove dead code for ancient ffmpeg versions
-b595b8c: Fix ffmpeg plugin build
-
-Index: ffmpeg.c
---- ffmpeg.c.orig
-+++ ffmpeg.c
-@@ -26,49 +26,16 @@
-

No comments:

Post a Comment