From 62b54fc4f31fb837b479c352a7583abb8e26f8a1 Mon Sep 17 00:00:00 2001 From: m3tav3rse Date: Tue, 29 Jan 2019 20:42:37 +0100 Subject: [PATCH] cmus: update to 2.8.0. closes #7967 --- srcpkgs/cmus/patches/ffmpeg4.patch | 126 ----------------------------- srcpkgs/cmus/patches/sndio.diff | 27 ------- srcpkgs/cmus/template | 16 +++- 3 files changed, 12 insertions(+), 157 deletions(-) delete mode 100644 srcpkgs/cmus/patches/ffmpeg4.patch delete mode 100644 srcpkgs/cmus/patches/sndio.diff diff --git a/srcpkgs/cmus/patches/ffmpeg4.patch b/srcpkgs/cmus/patches/ffmpeg4.patch deleted file mode 100644 index 1d7d21f0c4b..00000000000 --- a/srcpkgs/cmus/patches/ffmpeg4.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- ffmpeg.c.orig 2018-05-09 21:56:02.949627655 +0200 -+++ ffmpeg.c 2018-05-09 21:58:59.749022102 +0200 -@@ -39,7 +39,11 @@ - #include - #include - #include -+#if LIBAVUTIL_VERSION_MAJOR >= 53 -+#include -+#else - #include -+#endif - #ifndef AVUTIL_MATHEMATICS_H - #include - #endif -@@ -115,7 +119,11 @@ - - static void ffmpeg_input_free(struct ffmpeg_input *input) - { -+#if LIBAVCODEC_VERSION_MAJOR >= 56 -+ av_packet_unref(&input->pkt); -+#else - av_free_packet(&input->pkt); -+#endif - free(input); - } - -@@ -235,20 +243,33 @@ - - codec = avcodec_find_decoder(cc->codec_id); - if (!codec) { -+#if LIBAVCODEC_VERSION_MAJOR >= 54 -+ d_print("codec not found: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id)); -+#else - d_print("codec not found: %d, %s\n", cc->codec_id, cc->codec_name); -+#endif - err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; - break; - } - -+#if LIBAVCODEC_VERSION_MAJOR >= 58 -+ if (codec->capabilities & AV_CODEC_CAP_TRUNCATED) -+ cc->flags |= AV_CODEC_FLAG_TRUNCATED; -+#else - if (codec->capabilities & CODEC_CAP_TRUNCATED) - cc->flags |= CODEC_FLAG_TRUNCATED; -+#endif - - #if (LIBAVCODEC_VERSION_INT < ((53<<16)+(8<<8)+0)) - if (avcodec_open(cc, codec) < 0) { - #else - if (avcodec_open2(cc, codec, NULL) < 0) { - #endif -+#if LIBAVCODEC_VERSION_MAJOR >= 54 -+ d_print("could not open codec: %d, %s\n", cc->codec_id, avcodec_get_name(cc->codec_id)); -+#else - d_print("could not open codec: %d, %s\n", cc->codec_id, cc->codec_name); -+#endif - err = -IP_ERROR_UNSUPPORTED_FILE_TYPE; - break; - } -@@ -347,7 +368,11 @@ - struct ffmpeg_output *output, SwrContext *swr) - { - #if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) -+#if LIBAVCODEC_VERSION_MAJOR >= 56 -+ AVFrame *frame = av_frame_alloc(); -+#else - AVFrame *frame = avcodec_alloc_frame(); -+#endif - int got_frame; - #endif - while (1) { -@@ -359,10 +384,16 @@ - int len; - - if (input->curr_pkt_size <= 0) { -+#if LIBAVCODEC_VERSION_MAJOR >= 56 -+ av_packet_unref(&input->pkt); -+#else - av_free_packet(&input->pkt); -+#endif - if (av_read_frame(ic, &input->pkt) < 0) { - /* Force EOF once we can read no longer. */ --#if (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) -+#if LIBAVCODEC_VERSION_MAJOR >= 56 -+ av_frame_free(&frame); -+#elif (LIBAVCODEC_VERSION_INT >= ((53<<16) + (25<<8) + 0)) - avcodec_free_frame(&frame); - #endif - return 0; -@@ -399,7 +430,11 @@ - av_new_packet(&avpkt, input->curr_pkt_size); - memcpy(avpkt.data, input->curr_pkt_buf, input->curr_pkt_size); - len = avcodec_decode_audio4(cc, frame, &got_frame, &avpkt); -+#if LIBAVCODEC_VERSION_MAJOR >= 56 -+ av_packet_unref(&avpkt); -+#else - av_free_packet(&avpkt); -+#endif - } - #endif - if (len < 0) { -@@ -426,7 +461,11 @@ - res = 0; - output->buffer_pos = output->buffer; - output->buffer_used_len = res * cc->channels * sizeof(int16_t); -+#if LIBAVCODEC_VERSION_MAJOR >= 56 -+ av_frame_free(&frame); -+#else - avcodec_free_frame(&frame); -+#endif - return output->buffer_used_len; - } - #endif -@@ -566,7 +605,11 @@ - long bitrate = -1; - #if (LIBAVFORMAT_VERSION_INT > ((51<<16)+(43<<8)+0)) - /* ape codec returns silly numbers */ -+#if LIBAVCODEC_VERSION_MAJOR >= 55 -+ if (priv->codec->id == AV_CODEC_ID_APE) -+#else - if (priv->codec->id == CODEC_ID_APE) -+#endif - return -1; - #endif - if (priv->input->curr_duration > 0) { diff --git a/srcpkgs/cmus/patches/sndio.diff b/srcpkgs/cmus/patches/sndio.diff deleted file mode 100644 index 5e0a30502df..00000000000 --- a/srcpkgs/cmus/patches/sndio.diff +++ /dev/null @@ -1,27 +0,0 @@ ---- configure.orig 2018-05-02 14:46:09.900968269 +0200 -+++ configure 2018-05-02 14:46:30.935113630 +0200 -@@ -20,12 +20,8 @@ - - check_sndio() - { -- case `uname -s` in -- OpenBSD) -- check_library SNDIO "" "-lsndio" -- return $? -- esac -- return 1 -+ check_library SNDIO "" "-lsndio" -+ return $? - } - - check_compat() ---- sndio.c.orig 2018-05-02 14:52:24.031553732 +0200 -+++ sndio.c 2018-05-02 14:52:32.410611635 +0200 -@@ -20,7 +20,6 @@ - - #include - #include --#include - #include - #include - #include diff --git a/srcpkgs/cmus/template b/srcpkgs/cmus/template index d3484d32977..9982fadd4de 100644 --- a/srcpkgs/cmus/template +++ b/srcpkgs/cmus/template @@ -1,7 +1,7 @@ # Template file for 'cmus' pkgname=cmus -version=2.7.1 -revision=5 +version=2.8.0 +revision=1 hostmakedepends="pkg-config" makedepends="ncurses-devel faad2-devel libflac-devel libao-devel libmad-devel libmodplug-devel libmp4v2-devel libmpcdec-devel pulseaudio-devel @@ -12,13 +12,21 @@ maintainer="Juan RP " license="GPL-2.0-or-later" homepage="https://cmus.github.io" distfiles="https://github.com/cmus/cmus/archive/v${version}.tar.gz" -checksum=8179a7a843d257ddb585f4c65599844bc0e516fe85e97f6f87a7ceade4eb5165 +checksum=756ce2c6241b2104dc19097488225de559ac1802a175be0233cfb6fbc02f3bd2 + +case $XBPS_TARGET_MACHINE in + armv6*) + broken="needs libatomic workaround" + makedepends+=" libatomic-devel" + LDFLAGS+=" -latomic" + ;; +esac do_configure() { ./configure prefix=/usr } do_build() { - make GCC=$CC CC=$CC LD=$CC ${makejobs} + make GCC=$CC CC=$CC LD=$CC LDFLAGS="$LDFLAGS" ${makejobs} } do_install() { make DESTDIR=${DESTDIR} install