In this email, I have attached a diff to update audio/cmus from version
2.10.0 to version 2.12.0 [1].
I have updated the necessary patches. Additionally, I would like to
note—since I am unsure how to reflect this in a CVS diff—that the patch for
ip/ffmpeg.c should be removed, as it was implemented upstream in 2023 [2].
cvs rm
cvs diff -uNp
Thank you for the tip, I have attached the updated diff.
Tested on amd64 and it builds and runs fine.
OKs? Comments?
References:
[1]: https://github.com/cmus/cmus/releases/tag/v2.12.0
[2]:
https://github.com/cmus/cmus/commit/07ce2dc7082a1ed8704c21fd3f2877c8ba6b12f9
Index: ports/audio/cmus/Makefile
===================================================================
RCS file: /cvs/ports/audio/cmus/Makefile,v
retrieving revision 1.32
diff -u -p -u -p -r1.32 Makefile
--- ports/audio/cmus/Makefile 28 Jan 2025 11:22:02 -0000 1.32
+++ ports/audio/cmus/Makefile 22 Feb 2025 22:03:47 -0000
@@ -1,12 +1,11 @@
COMMENT-main= ncurses-based music player
COMMENT-ffmpeg= ffmpeg input plugin for cmus (.aac, .mp4...)
-V= 2.10.0
+V= 2.12.0
GH_ACCOUNT= cmus
GH_PROJECT= cmus
GH_TAGNAME= v${V}
-REVISION= 2
CATEGORIES= audio
HOMEPAGE= https://cmus.github.io/
Index: ports/audio/cmus/distinfo
===================================================================
RCS file: /cvs/ports/audio/cmus/distinfo,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 distinfo
--- ports/audio/cmus/distinfo 9 Aug 2022 15:08:44 -0000 1.7
+++ ports/audio/cmus/distinfo 22 Feb 2025 22:03:56 -0000
@@ -1,2 +1,2 @@
-SHA256 (cmus-2.10.0.tar.gz) = /0AGhXSBCn3jmQ9PacnEfvSeN70x0pjTcui82vuXP/8=
-SIZE (cmus-2.10.0.tar.gz) = 324121
+SHA256 (cmus-2.12.0.tar.gz) = RLls1fhLDYTDMJfEhFQjLV5qGc0zubZQO6nBO2aGv8c=
+SIZE (cmus-2.12.0.tar.gz) = 348685
Index: ports/audio/cmus/patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/audio/cmus/patches/patch-Makefile,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 patch-Makefile
--- ports/audio/cmus/patches/patch-Makefile 11 Mar 2022 18:20:07 -0000 1.4
+++ ports/audio/cmus/patches/patch-Makefile 22 Feb 2025 22:04:41 -0000
@@ -3,7 +3,7 @@ Fix install(1) usage.
Index: Makefile
--- Makefile.orig
+++ Makefile
-@@ -272,17 +272,21 @@ plugins: $(ip-y) $(op-y)
+@@ -275,17 +275,21 @@ plugins: $(ip-y) $(op-y)
man: $(man1) $(man7)
install-main: main
Index: ports/audio/cmus/patches/patch-configure
===================================================================
RCS file: /cvs/ports/audio/cmus/patches/patch-configure,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 patch-configure
--- ports/audio/cmus/patches/patch-configure 11 Mar 2022 18:20:07 -0000 1.7
+++ ports/audio/cmus/patches/patch-configure 22 Feb 2025 22:04:53 -0000
@@ -9,12 +9,12 @@ final build.
Index: configure
--- configure.orig
+++ configure
-@@ -439,7 +439,7 @@ check_ffmpeg()
- fi
+@@ -478,7 +478,7 @@ check_ffmpeg()
+ check_header "libswresample/swresample.h" $FFMPEG_CFLAGS || return $?
# ffmpeg api changes so frequently that it is best to compile the module
libs="$LDDLFLAGS $FFMPEG_LIBS"
- cflags="$SOFLAGS $FFMPEG_CFLAGS"
+ cflags="-std=gnu99 $SOFLAGS $FFMPEG_CFLAGS"
- if test "$HAVE_FFMPEG_AVCODEC_H" = y
- then
- cflags="$cflags -DHAVE_FFMPEG_AVCODEC_H"
+ topdir=`dirname "$0"`
+ ffmpeg_code=`cat "$topdir"/ip/ffmpeg.c | sed 's/\\\n//g'`
+ msg_checking "for successful build of ffmpeg.c"
Index: ports/audio/cmus/patches/patch-ip_ffmpeg_c
===================================================================
RCS file: ports/audio/cmus/patches/patch-ip_ffmpeg_c
diff -N ports/audio/cmus/patches/patch-ip_ffmpeg_c
--- ports/audio/cmus/patches/patch-ip_ffmpeg_c 23 Mar 2024 13:35:52 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-Remove AV_CODEC_{CAP,FLAG}_TRUNCATED for FFmpeg 6 compatibility
-https://github.com/cmus/cmus/commit/07ce2dc7082a1ed8704c21fd3f2877c8ba6b12f9
-
-Index: ip/ffmpeg.c
---- ip/ffmpeg.c.orig
-+++ ip/ffmpeg.c
-@@ -202,9 +202,6 @@ static int ffmpeg_open(struct input_plugin_data *ip_da
- break;
- }
-
-- if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
-- cc->flags |= AV_CODEC_FLAG_TRUNCATED;
--
- if (avcodec_open2(cc, codec, NULL) < 0) {
- d_print("could not open codec: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id));
- err = -IP_ERROR_UNSUPPORTED_FILE_TYPE;