View | Details | Raw Unified | Return to bug 216325 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-7 / +10 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	cmus
4
PORTNAME=	cmus
5
PORTVERSION=	2.7.1
5
PORTVERSION=	2.8.0
6
DISTVERSIONPREFIX=	v
6
DISTVERSIONPREFIX=	v
7
PORTREVISION=	1
7
DISTVERSIONSUFFIX=	-rc0
8
CATEGORIES=	audio
8
CATEGORIES=	audio
9
9
10
MAINTAINER=	t@tobik.me
10
MAINTAINER=	t@tobik.me
Lines 31-40 Link Here
31
# follow shell value semantics i.e. later assignments overwrite
31
# follow shell value semantics i.e. later assignments overwrite
32
# previous assignments.  The options here appear in the same order as
32
# previous assignments.  The options here appear in the same order as
33
# ${WRKSRC}/configure --help.  Please keep it that way.
33
# ${WRKSRC}/configure --help.  Please keep it that way.
34
_CMUS_CONFIGURE_OPTS=	CDDB CDIO DISCID FLAC MAD MODPLUG MIKMOD MPC	\
34
_CMUS_CONFIGURE_OPTS= AAC ALSA AO ARTS CDDB CDIO COREAUDIO CUE DISCID	\
35
			VORBIS TREMOR OPUS WAV WAVPACK MP4 AAC FFMPEG	\
35
	FFMPEG FLAC JACK MAD MIKMOD MODPLUG MP4 MPC MPRIS OPUS OSS	\
36
			VTX CUE ROAR PULSE ALSA JACK SAMPLERATE AO	\
36
	PULSE ROAR SAMPLERATE SNDIO SUN TREMOR VORBIS VTX WAVEOUT	\
37
			ARTS OSS SNDIO SUN WAVEOUT
37
	WAVPACK WAV
38
.for opt in ${_CMUS_CONFIGURE_OPTS}
38
.for opt in ${_CMUS_CONFIGURE_OPTS}
39
CONFIGURE_ARGS+=	CONFIG_${opt}=n
39
CONFIGURE_ARGS+=	CONFIG_${opt}=n
40
.endfor
40
.endfor
Lines 131-139 Link Here
131
WAVPACK_CONFIGURE_ON=	CONFIG_WAVPACK=y
131
WAVPACK_CONFIGURE_ON=	CONFIG_WAVPACK=y
132
WAVPACK_LIB_DEPENDS=	libwavpack.so:audio/wavpack
132
WAVPACK_LIB_DEPENDS=	libwavpack.so:audio/wavpack
133
133
134
post-patch:
135
# From DPorts: prevent passing -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600
136
	@${REINPLACE_CMD} -e 's@\(NCURSES_CFLAGS=\).*@\1""@g' \
137
	 	${WRKSRC}/configure
134
# Doc/cmus.txt is used to generate the man pages.  Fix paths to point
138
# Doc/cmus.txt is used to generate the man pages.  Fix paths to point
135
# to the correct directories.
139
# to the correct directories.
136
post-patch:
137
	@${REINPLACE_CMD} \
140
	@${REINPLACE_CMD} \
138
		-e 's,/usr/share/doc/cmus/examples,${EXAMPLESDIR},g' \
141
		-e 's,/usr/share/doc/cmus/examples,${EXAMPLESDIR},g' \
139
		-e 's,/usr/share/cmus,${DATADIR},g' \
142
		-e 's,/usr/share/cmus,${DATADIR},g' \
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1469160686
1
TIMESTAMP = 1484928514
2
SHA256 (cmus-cmus-v2.7.1_GH0.tar.gz) = 8179a7a843d257ddb585f4c65599844bc0e516fe85e97f6f87a7ceade4eb5165
2
SHA256 (cmus-cmus-v2.8.0-rc0_GH0.tar.gz) = b594087f16053f4db49e89d72b1c6dbb12e221373e806e62b3e97c327de1dac9
3
SIZE (cmus-cmus-v2.7.1_GH0.tar.gz) = 296818
3
SIZE (cmus-cmus-v2.8.0-rc0_GH0.tar.gz) = 315613
(-)files/patch-Makefile (+13 lines)
Line 0 Link Here
1
Don't run git during the build
2
3
--- Makefile.orig	2016-11-20 12:29:46 UTC
4
+++ Makefile
5
@@ -9,7 +9,7 @@ _ver2	= $(shell git rev-parse --verify -
6
 # hand-made
7
 _ver3	= v2.8.0-rc0
8
 
9
-VERSION	= $(or $(_ver0),$(_ver1),$(_ver2),$(_ver3))
10
+VERSION	= $(_ver3)
11
 
12
 all: main plugins man
13
 
(-)files/patch-configure (-12 lines)
Lines 1-12 Link Here
1
Upstreamed in https://github.com/cmus/cmus/commit/37f4daaea4d2724cd2b4d66984cf72b012ef5d48 
2
--- configure.orig	2016-08-03 15:18:16 UTC
3
+++ configure
4
@@ -21,7 +21,7 @@ check_cflags()
5
 check_sndio()
6
 {
7
 	case `uname -s` in
8
-	OpenBSD)
9
+	OpenBSD|FreeBSD)
10
 		check_library SNDIO "" "-lsndio"
11
 		return $?
12
 	esac
(-)files/patch-ffmpeg.c (-47 lines)
Lines 1-47 Link Here
1
--- ffmpeg.c.orig	2015-07-13 10:00:56 UTC
2
+++ ffmpeg.c
3
@@ -39,7 +39,7 @@
4
 #include <libavformat/avio.h>
5
 #include <libswresample/swresample.h>
6
 #include <libavutil/opt.h>
7
-#include <libavutil/audioconvert.h>
8
+#include <libavutil/channel_layout.h>
9
 #ifndef AVUTIL_MATHEMATICS_H
10
 #include <libavutil/mathematics.h>
11
 #endif
12
@@ -347,7 +347,7 @@ static int ffmpeg_fill_buffer(AVFormatCo
13
 			      struct ffmpeg_output *output, SwrContext *swr)
14
 {
15
 #if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0))
16
-	AVFrame *frame = avcodec_alloc_frame();
17
+	AVFrame *frame = av_frame_alloc();
18
 	int got_frame;
19
 #endif
20
 	while (1) {
21
@@ -363,7 +363,7 @@ static int ffmpeg_fill_buffer(AVFormatCo
22
 			if (av_read_frame(ic, &input->pkt) < 0) {
23
 				/* Force EOF once we can read no longer. */
24
 #if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0))
25
-				avcodec_free_frame(&frame);
26
+				av_frame_free(&frame);
27
 #endif
28
 				return 0;
29
 			}
30
@@ -426,7 +426,7 @@ static int ffmpeg_fill_buffer(AVFormatCo
31
 				res = 0;
32
 			output->buffer_pos = output->buffer;
33
 			output->buffer_used_len = res * cc->channels * sizeof(int16_t);
34
-			avcodec_free_frame(&frame);
35
+			av_frame_free(&frame);
36
 			return output->buffer_used_len;
37
 		}
38
 #endif
39
@@ -566,7 +566,7 @@ static long ffmpeg_current_bitrate(struc
40
 	long bitrate = -1;
41
 #if (LIBAVFORMAT_VERSION_INT > ((51<<16)+(43<<8)+0))
42
 	/* ape codec returns silly numbers */
43
-	if (priv->codec->id == CODEC_ID_APE)
44
+	if (priv->codec->id == AV_CODEC_ID_APE)
45
 		return -1;
46
 #endif
47
 	if (priv->input->curr_duration > 0) {
(-)files/patch-ip_mp4.c (-6 / +7 lines)
Lines 1-14 Link Here
1
This patch is needed because multimedia/mp4v2 doesn't currently have
1
This patch is needed because multimedia/mp4v2 doesn't currently have
2
MP4LogSetLevel.  It requires mp4v2 >= 2.0.0.
2
MP4LogSetLevel.  It requires mp4v2 >= 2.0.0.
3
3
4
--- mp4.c.orig	2015-07-13 10:00:56 UTC
4
--- ip/mp4.c.orig	2016-11-20 12:29:46 UTC
5
+++ mp4.c
5
+++ ip/mp4.c
6
@@ -155,7 +155,7 @@ static int mp4_open(struct input_plugin_
6
@@ -154,9 +154,6 @@ static int mp4_open(struct input_plugin_
7
 	if (ip_data->remote)
7
 		return -IP_ERROR_FUNCTION_NOT_SUPPORTED;
8
 		return -IP_ERROR_FUNCTION_NOT_SUPPORTED;
8
 
9
 
9
 	/* kindly ask mp4v2 to not spam stderr */
10
-	/* kindly ask mp4v2 to not spam stderr */
10
-	MP4LogSetLevel(MP4_LOG_NONE);
11
-	MP4LogSetLevel(MP4_LOG_NONE);
11
+	//MP4LogSetLevel(MP4_LOG_NONE);
12
-
12
 
13
 	/* init private struct */
13
 	/* init private struct */
14
 	priv = xnew(struct mp4_private, 1);
14
 	priv = xnew(struct mp4_private, 1);
15
 	*priv = priv_init;
(-)files/patch-mp4.c (-14 lines)
Lines 1-14 Link Here
1
This patch is needed because multimedia/mp4v2 doesn't currently have
2
MP4LogSetLevel.  It requires mp4v2 >= 2.0.0.
3
4
--- mp4.c.orig	2015-07-13 10:00:56 UTC
5
+++ mp4.c
6
@@ -155,7 +155,7 @@ static int mp4_open(struct input_plugin_
7
 		return -IP_ERROR_FUNCTION_NOT_SUPPORTED;
8
 
9
 	/* kindly ask mp4v2 to not spam stderr */
10
-	MP4LogSetLevel(MP4_LOG_NONE);
11
+	//MP4LogSetLevel(MP4_LOG_NONE);
12
 
13
 	/* init private struct */
14
 	priv = xnew(struct mp4_private, 1);
(-)files/patch-op_oss.c (+107 lines)
Line 0 Link Here
1
https://github.com/cmus/cmus/pull/614
2
--- op/oss.c.orig	2016-11-20 12:29:46 UTC
3
+++ op/oss.c
4
@@ -48,20 +48,49 @@ static int oss_reset(void)
5
 	return 0;
6
 }
7
 
8
-/* defined only in OSSv4, but seem to work in OSSv3 (Linux) */
9
-#ifndef AFMT_S32_LE
10
-#define AFMT_S32_LE	0x00001000
11
+struct oss_fmt {
12
+	int fmt, bits, sig, be;
13
+};
14
+static struct oss_fmt oss_fmts[] = {
15
+	{ AFMT_S16_BE, 16, 1, 1 },
16
+	{ AFMT_S16_LE, 16, 1, 0 },
17
+#ifdef AFMT_S24_BE
18
+	{ AFMT_S24_BE, 24, 1, 1 },
19
 #endif
20
-#ifndef AFMT_S32_BE
21
-#define AFMT_S32_BE	0x00002000
22
+#ifdef AFMT_S24_LE
23
+	{ AFMT_S24_LE, 24, 1, 0 },
24
 #endif
25
-#ifndef AFMT_S24_PACKED
26
-#define AFMT_S24_PACKED	0x00040000
27
+#ifdef AFMT_S32_BE
28
+	{ AFMT_S32_BE, 32, 1, 1 },
29
+#endif
30
+#ifdef AFMT_S32_LE
31
+	{ AFMT_S32_LE, 32, 1, 0 },
32
 #endif
33
 
34
+	{ AFMT_U16_BE, 16, 0, 1 },
35
+	{ AFMT_U16_LE, 16, 0, 0 },
36
+#ifdef AFMT_U24_BE
37
+	{ AFMT_U24_BE, 24, 0, 1 },
38
+#endif
39
+#ifdef AFMT_U24_LE
40
+	{ AFMT_U24_LE, 24, 0, 0 },
41
+#endif
42
+#ifdef AFMT_U32_BE
43
+	{ AFMT_U32_BE, 32, 0, 1 },
44
+#endif
45
+#ifdef AFMT_U32_LE
46
+	{ AFMT_U32_LE, 32, 0, 0 },
47
+#endif
48
+	{ AFMT_S8, 8, 1, 0 },
49
+	{ AFMT_S8, 8, 1, 1 },
50
+	{ AFMT_U8, 8, 0, 0 },
51
+	{ AFMT_U8, 8, 0, 1 },
52
+};
53
+
54
 static int oss_set_sf(sample_format_t sf)
55
 {
56
-	int tmp, log2_fragment_size, nr_fragments, bytes_per_second;
57
+	int found, tmp, log2_fragment_size, nr_fragments, bytes_per_second;
58
+	size_t i;
59
 
60
 	oss_reset();
61
 	oss_sf = sf;
62
@@ -76,35 +105,17 @@ static int oss_set_sf(sample_format_t sf
63
 		return -1;
64
 #endif
65
 
66
-	if (sf_get_bits(oss_sf) == 16) {
67
-		if (sf_get_signed(oss_sf)) {
68
-			if (sf_get_bigendian(oss_sf)) {
69
-				tmp = AFMT_S16_BE;
70
-			} else {
71
-				tmp = AFMT_S16_LE;
72
-			}
73
-		} else {
74
-			if (sf_get_bigendian(oss_sf)) {
75
-				tmp = AFMT_U16_BE;
76
-			} else {
77
-				tmp = AFMT_U16_LE;
78
-			}
79
-		}
80
-	} else if (sf_get_bits(oss_sf) == 8) {
81
-		if (sf_get_signed(oss_sf)) {
82
-			tmp = AFMT_S8;
83
-		} else {
84
-			tmp = AFMT_U8;
85
-		}
86
-	} else if (sf_get_bits(oss_sf) == 32 && sf_get_signed(oss_sf)) {
87
-		if (sf_get_bigendian(oss_sf)) {
88
-			tmp = AFMT_S32_BE;
89
-		} else {
90
-			tmp = AFMT_S32_LE;
91
+	found = 0;
92
+	for (i = 0; i < sizeof(oss_fmts)/sizeof(oss_fmts[0]); i++) {
93
+		if (sf_get_bits(oss_sf) == oss_fmts[i].bits &&
94
+		    sf_get_signed(oss_sf) == oss_fmts[i].sig &&
95
+		    sf_get_bigendian(oss_sf) == oss_fmts[i].be) {
96
+			found = 1;
97
+			tmp = oss_fmts[i].fmt;
98
+			break;
99
 		}
100
-	} else if (sf_get_bits(oss_sf) == 24 && sf_get_signed(oss_sf) && !sf_get_bigendian(oss_sf)) {
101
-		tmp = AFMT_S24_PACKED;
102
-	} else {
103
+	}
104
+	if (!found) {
105
 		d_print("unsupported sample format: %c%u_%s\n",
106
 			sf_get_signed(oss_sf) ? 'S' : 'U', sf_get_bits(oss_sf),
107
 			sf_get_bigendian(oss_sf) ? "BE" : "LE");
(-)files/patch-op_sndio.c (+11 lines)
Line 0 Link Here
1
https://github.com/cmus/cmus/pull/613
2
--- op/sndio.c.orig	2016-11-20 12:29:46 UTC
3
+++ op/sndio.c
4
@@ -86,6 +86,7 @@ static int sndio_set_sf(sample_format_t 
5
 		break;
6
 	case 24:
7
 		par.bits = 24;
8
+		par.bps = 3;
9
 		break;
10
 	case 16:
11
 		par.bits = 16;
(-)files/patch-sndio.c (-24 lines)
Lines 1-24 Link Here
1
Upstreamed in https://github.com/cmus/cmus/commit/37f4daaea4d2724cd2b4d66984cf72b012ef5d48 
2
--- sndio.c.orig	2015-07-13 10:00:56 UTC
3
+++ sndio.c
4
@@ -20,7 +20,6 @@
5
 
6
 #include <sys/types.h>
7
 #include <sys/ioctl.h>
8
-#include <sys/audioio.h>
9
 #include <sys/stat.h>
10
 #include <errno.h>
11
 #include <fcntl.h>
12
@@ -82,6 +81,12 @@ static int sndio_set_sf(sample_format_t 
13
 		par.le = 1;
14
 
15
 	switch (sf_get_bits(sndio_sf)) {
16
+	case 32:
17
+		par.bits = 32;
18
+		break;
19
+	case 24:
20
+		par.bits = 24;
21
+		break;
22
 	case 16:
23
 		par.bits = 16;
24
 		break;
(-)pkg-plist (+3 lines)
Lines 7-12 Link Here
7
%%DATADIR%%/gray-88.theme
7
%%DATADIR%%/gray-88.theme
8
%%DATADIR%%/green-mono-88.theme
8
%%DATADIR%%/green-mono-88.theme
9
%%DATADIR%%/green.theme
9
%%DATADIR%%/green.theme
10
%%DATADIR%%/gruvbox-alt.theme
11
%%DATADIR%%/gruvbox.theme
12
%%DATADIR%%/jellybeans.theme
10
%%DATADIR%%/night.theme
13
%%DATADIR%%/night.theme
11
%%DATADIR%%/rc
14
%%DATADIR%%/rc
12
%%DATADIR%%/solarized-dark.theme
15
%%DATADIR%%/solarized-dark.theme

Return to bug 216325