1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

audio/spek: Update to 0.8.5

Fixes build with FFmpeg 6

Changelog: https://github.com/alexkay/spek/releases/tag/v0.8.5

PR:		270193
Approved by:	portmgr (maintainer timeout, 1+ month)
This commit is contained in:
Daniel Engberg 2023-04-27 12:34:36 +02:00
parent 5e7e1a2211
commit 947cc0959e
4 changed files with 22 additions and 70 deletions

View File

@ -1,8 +1,7 @@
PORTNAME= spek
PORTVERSION= 0.8.2
PORTREVISION= 18
DISTVERSION= 0.8.5
CATEGORIES= audio
MASTER_SITES= https://github.com/alexkay/${PORTNAME}/releases/download/v${PORTVERSION}/
MASTER_SITES= https://github.com/alexkay/${PORTNAME}/releases/download/v${DISTVERSION}/
MAINTAINER= alexander@kojevnikov.com
COMMENT= Acoustic spectrum analyser
@ -12,10 +11,10 @@ LICENSE= GPLv3+
LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
USES= compiler:c++11-lib desktop-file-utils gmake gnome pkgconfig \
tar:xz
USES= compiler:c++11-lib desktop-file-utils gmake gnome \
localbase:ldflags pkgconfig tar:xz
USE_GNOME= intltool
USE_WX= 3.0
USE_WX= 3.2+
WX_CONF_ARGS= absolute
GNU_CONFIGURE= yes
@ -24,8 +23,4 @@ OPTIONS_SUB= yes
NLS_USES= gettext
NLS_CONFIGURE_ENABLE= nls
post-patch:
@${REINPLACE_CMD} -e "s,^itlocaledir =.*$$,itlocaledir = ${PREFIX}/share/locale,g" \
${WRKSRC}/po/Makefile.in.in
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (spek-0.8.2.tar.xz) = 59f69b41155ee1a4552eb9f66b602fc059de8f31e3f05889f24d362b3e6c78ae
SIZE (spek-0.8.2.tar.xz) = 171628
TIMESTAMP = 1678742866
SHA256 (spek-0.8.5.tar.xz) = 1bccf85a14a01af8f2f30476cbad004e8bf6031f500e562bbe5bbd1e5eb16c59
SIZE (spek-0.8.5.tar.xz) = 430464

View File

@ -1,58 +0,0 @@
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.

View File

@ -7,21 +7,35 @@ share/icons/hicolor/24x24/apps/spek.png
share/icons/hicolor/32x32/apps/spek.png
share/icons/hicolor/48x48/apps/spek.png
share/icons/hicolor/scalable/apps/spek.svg
%%NLS%%share/locale/bs/LC_MESSAGES/spek.mo
%%NLS%%share/locale/ca/LC_MESSAGES/spek.mo
%%NLS%%share/locale/cs/LC_MESSAGES/spek.mo
%%NLS%%share/locale/da/LC_MESSAGES/spek.mo
%%NLS%%share/locale/de/LC_MESSAGES/spek.mo
%%NLS%%share/locale/el/LC_MESSAGES/spek.mo
%%NLS%%share/locale/eo/LC_MESSAGES/spek.mo
%%NLS%%share/locale/es/LC_MESSAGES/spek.mo
%%NLS%%share/locale/fi/LC_MESSAGES/spek.mo
%%NLS%%share/locale/fr/LC_MESSAGES/spek.mo
%%NLS%%share/locale/gl/LC_MESSAGES/spek.mo
%%NLS%%share/locale/he/LC_MESSAGES/spek.mo
%%NLS%%share/locale/hr/LC_MESSAGES/spek.mo
%%NLS%%share/locale/hu/LC_MESSAGES/spek.mo
%%NLS%%share/locale/it/LC_MESSAGES/spek.mo
%%NLS%%share/locale/ja/LC_MESSAGES/spek.mo
%%NLS%%share/locale/ko/LC_MESSAGES/spek.mo
%%NLS%%share/locale/lv/LC_MESSAGES/spek.mo
%%NLS%%share/locale/nb/LC_MESSAGES/spek.mo
%%NLS%%share/locale/nn/LC_MESSAGES/spek.mo
%%NLS%%share/locale/nl/LC_MESSAGES/spek.mo
%%NLS%%share/locale/pl/LC_MESSAGES/spek.mo
%%NLS%%share/locale/pt_BR/LC_MESSAGES/spek.mo
%%NLS%%share/locale/ru/LC_MESSAGES/spek.mo
%%NLS%%share/locale/sk/LC_MESSAGES/spek.mo
%%NLS%%share/locale/sr@latin/LC_MESSAGES/spek.mo
%%NLS%%share/locale/sv/LC_MESSAGES/spek.mo
%%NLS%%share/locale/tr/LC_MESSAGES/spek.mo
%%NLS%%share/locale/th/LC_MESSAGES/spek.mo
%%NLS%%share/locale/uk/LC_MESSAGES/spek.mo
%%NLS%%share/locale/vi/LC_MESSAGES/spek.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/spek.mo