diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2016-12-28 15:50:13 +0000 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2016-12-28 15:50:13 +0000 |
commit | 713804ff08e9f108647114430c004ed2b1f5c7dc (patch) | |
tree | 0779111a3df4f34659019a803c4b4913979b3723 /audio/spek | |
parent | finance/rubygem-money: update to 6.7.1 (diff) |
- Unbreak fetch (project has moved to Github) [1]
- Fix LICENSE
- Sort and remove duplicate desktop-file-utils from USES
- Remove deprecated WX_UNICODE
- Add patch to fix build with ffmpeg 3.x
PR: 212750 (based on) [1]
Submitted by: shun <shun.fbsd.pr@dropcut.net> [1]
Approved by: maintainer timeout (3 months)
Notes
Notes:
svn path=/head/; revision=429785
Diffstat (limited to 'audio/spek')
-rw-r--r-- | audio/spek/Makefile | 11 | ||||
-rw-r--r-- | audio/spek/files/patch-src_spek-audio.cc | 58 |
2 files changed, 62 insertions, 7 deletions
diff --git a/audio/spek/Makefile b/audio/spek/Makefile index 3d71b4bae4b8..6c22fd9f8c9d 100644 --- a/audio/spek/Makefile +++ b/audio/spek/Makefile @@ -5,21 +5,18 @@ PORTNAME= spek PORTVERSION= 0.8.2 PORTREVISION= 5 CATEGORIES= audio -MASTER_SITES= GOOGLE_CODE +MASTER_SITES= https://github.com/alexkay/${PORTNAME}/releases/download/v${PORTVERSION}/ MAINTAINER= alexander@kojevnikov.com COMMENT= Acoustic spectrum analyser -LICENSE= GPLv3 - -BROKEN= Unfetchable (google code has gone away) +LICENSE= GPLv3+ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg -USES= tar:xz gmake pkgconfig desktop-file-utils compiler:c++11-lib desktop-file-utils +USES= compiler:c++11-lib desktop-file-utils gmake pkgconfig tar:xz USE_GNOME= intltool -USE_WX= 3.0 -WX_UNICODE= yes +USE_WX= 3.0 WX_CONF_ARGS= absolute GNU_CONFIGURE= yes INSTALLS_ICONS= yes diff --git a/audio/spek/files/patch-src_spek-audio.cc b/audio/spek/files/patch-src_spek-audio.cc new file mode 100644 index 000000000000..b2fa0fad9051 --- /dev/null +++ b/audio/spek/files/patch-src_spek-audio.cc @@ -0,0 +1,58 @@ +Fix build with ffmpeg 3.x. + +--- src/spek-audio.cc.orig 2016-12-28 01:32:07 UTC ++++ 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. |