summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2020-04-23 16:12:57 +0000
committernia <nia@pkgsrc.org>2020-04-23 16:12:57 +0000
commitf952ccb3098b8500abbd41c9c151636dc18bd2e4 (patch)
tree624fe75ed2f245067177dd83e997b22cc69ae0f1 /audio
parent094ea4856606919517e00cf0f4bc628e1eeb1a52 (diff)
downloadpkgsrc-f952ccb3098b8500abbd41c9c151636dc18bd2e4.tar.gz
spek: Switch to ffmpeg4. Patch from FreeBSD Ports.
Diffstat (limited to 'audio')
-rw-r--r--audio/spek/Makefile8
-rw-r--r--audio/spek/distinfo3
-rw-r--r--audio/spek/patches/patch-src_spek-audio.cc62
3 files changed, 68 insertions, 5 deletions
diff --git a/audio/spek/Makefile b/audio/spek/Makefile
index 6a7ab6dc7b8..0fc87aa2098 100644
--- a/audio/spek/Makefile
+++ b/audio/spek/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2020/03/10 22:09:25 wiz Exp $
+# $NetBSD: Makefile,v 1.23 2020/04/23 16:12:57 nia Exp $
DISTNAME= spek-0.8.2
-PKGREVISION= 17
+PKGREVISION= 18
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_GITHUB:=alexkay/}
EXTRACT_SUFX= .tar.xz
@@ -12,12 +12,12 @@ COMMENT= Acoustic Spectrum Analyzer
LICENSE= gnu-gpl-v3
GNU_CONFIGURE= yes
-USE_LANGUAGES= c++
+USE_LANGUAGES= c c++
USE_TOOLS+= gmake intltool xgettext msgmerge msgfmt pkg-config
MAKE_FLAGS+= DATADIRNAME=${PKGLOCALEDIR}
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
-.include "../../multimedia/ffmpeg2/buildlink3.mk"
+.include "../../multimedia/ffmpeg4/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../x11/wxGTK30/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/spek/distinfo b/audio/spek/distinfo
index 962ac5fb5b5..f95adc0ab91 100644
--- a/audio/spek/distinfo
+++ b/audio/spek/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 01:12:51 agc Exp $
+$NetBSD: distinfo,v 1.3 2020/04/23 16:12:57 nia Exp $
SHA1 (spek-0.8.2.tar.xz) = 54226094ade52761349869f6e2f72a2af7a41be5
RMD160 (spek-0.8.2.tar.xz) = 20532e9682e5d5bc9bcfeddb1db0b65d7e5b07f8
SHA512 (spek-0.8.2.tar.xz) = 166cc2b058a9113497ca562a15b11c44fc47f33f87d1ee3d307adeb64c68940dc4f4323a7c1381541279eb1cbdda614555d0aff18993d99d90f8650018f5be69
Size (spek-0.8.2.tar.xz) = 171628 bytes
+SHA1 (patch-src_spek-audio.cc) = c0ce3601ecc3855d5688536faa457491fe8f5e6d
diff --git a/audio/spek/patches/patch-src_spek-audio.cc b/audio/spek/patches/patch-src_spek-audio.cc
new file mode 100644
index 00000000000..9349e711aea
--- /dev/null
+++ b/audio/spek/patches/patch-src_spek-audio.cc
@@ -0,0 +1,62 @@
+$NetBSD: patch-src_spek-audio.cc,v 1.1 2020/04/23 16:12:57 nia Exp $
+
+Fix build with ffmpeg>3.
+
+From FreeBSD Ports.
+
+--- src/spek-audio.cc.orig 2013-02-23 02:58:12.000000000 +0000
++++ src/spek-audio.cc
+@@ -199,7 +199,7 @@ AudioFileImpl::AudioFileImpl(
+ this->packet.data = nullptr;
+ this->packet.size = 0;
+ this->offset = 0;
+- this->frame = avcodec_alloc_frame();
++ this->frame = av_frame_alloc();
+ this->buffer_size = 0;
+ this->buffer = nullptr;
+ this->frames_per_interval = 0;
+@@ -215,7 +215,7 @@ AudioFileImpl::~AudioFileImpl()
+ if (this->frame) {
+ // TODO: Remove this check after Debian switches to libav 9.
+ #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0)
+- avcodec_free_frame(&this->frame);
++ av_frame_free(&this->frame);
+ #else
+ av_freep(&this->frame);
+ #endif
+@@ -224,7 +224,7 @@ AudioFileImpl::~AudioFileImpl()
+ this->packet.data -= this->offset;
+ this->packet.size += this->offset;
+ this->offset = 0;
+- av_free_packet(&this->packet);
++ av_packet_unref(&this->packet);
+ }
+ if (this->format_context) {
+ if (this->audio_stream >= 0) {
+@@ -255,7 +255,7 @@ int AudioFileImpl::read()
+
+ for (;;) {
+ while (this->packet.size > 0) {
+- avcodec_get_frame_defaults(this->frame);
++ av_frame_unref(this->frame);
+ auto codec_context = this->format_context->streams[this->audio_stream]->codec;
+ int got_frame = 0;
+ int len = avcodec_decode_audio4(codec_context, this->frame, &got_frame, &this->packet);
+@@ -299,7 +299,7 @@ int AudioFileImpl::read()
+ this->packet.data -= this->offset;
+ this->packet.size += this->offset;
+ this->offset = 0;
+- av_free_packet(&this->packet);
++ av_packet_unref(&this->packet);
+ }
+
+ int res = 0;
+@@ -307,7 +307,7 @@ int AudioFileImpl::read()
+ if (this->packet.stream_index == this->audio_stream) {
+ break;
+ }
+- av_free_packet(&this->packet);
++ av_packet_unref(&this->packet);
+ }
+ if (res < 0) {
+ // End of file or error.