Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Dec 2016 15:50:14 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r429785 - in head/audio/spek: . files
Message-ID:  <201612281550.uBSFoEdZ070581@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Wed Dec 28 15:50:13 2016
New Revision: 429785
URL: https://svnweb.freebsd.org/changeset/ports/429785

Log:
  - 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)

Added:
  head/audio/spek/files/
  head/audio/spek/files/patch-src_spek-audio.cc   (contents, props changed)
Modified:
  head/audio/spek/Makefile

Modified: head/audio/spek/Makefile
==============================================================================
--- head/audio/spek/Makefile	Wed Dec 28 15:46:52 2016	(r429784)
+++ head/audio/spek/Makefile	Wed Dec 28 15:50:13 2016	(r429785)
@@ -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

Added: head/audio/spek/files/patch-src_spek-audio.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/spek/files/patch-src_spek-audio.cc	Wed Dec 28 15:50:13 2016	(r429785)
@@ -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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612281550.uBSFoEdZ070581>