* [gentoo-commits] repo/gentoo:master commit in: media-sound/spek/files/, media-sound/spek/
@ 2016-12-05 11:02 Alexis Ballier
0 siblings, 0 replies; 2+ messages in thread
From: Alexis Ballier @ 2016-12-05 11:02 UTC (permalink / raw
To: gentoo-commits
commit: 80ba3a79d1639271ad0d3931e59c19bb2836abba
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 5 11:01:55 2016 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Mon Dec 5 11:02:06 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80ba3a79
media-sound/spek: backport upstream patches to build with ffmpeg3; bug #575060
Package-Manager: portage-2.3.2
media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch | 33 ++++++++++++++++++++
media-sound/spek/files/spek-0.8.3-ffmpeg3.patch | 37 +++++++++++++++++++++++
media-sound/spek/spek-0.8.3-r1.ebuild | 6 ++--
3 files changed, 74 insertions(+), 2 deletions(-)
diff --git a/media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch b/media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch
new file mode 100644
index 00000000..dee0e3c
--- /dev/null
+++ b/media-sound/spek/files/spek-0.8.3-ffmpeg3-1.patch
@@ -0,0 +1,33 @@
+https://github.com/alexkay/spek/commit/ee8bc49ed4a93a14a933ecb0eebfe424111f8413
+
+Index: spek-0.8.3/src/spek-audio.cc
+===================================================================
+--- spek-0.8.3.orig/src/spek-audio.cc
++++ spek-0.8.3/src/spek-audio.cc
+@@ -202,7 +202,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;
+@@ -218,7 +218,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
+@@ -258,7 +258,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);
diff --git a/media-sound/spek/files/spek-0.8.3-ffmpeg3.patch b/media-sound/spek/files/spek-0.8.3-ffmpeg3.patch
new file mode 100644
index 00000000..ad82a38
--- /dev/null
+++ b/media-sound/spek/files/spek-0.8.3-ffmpeg3.patch
@@ -0,0 +1,37 @@
+commit 1ef950dcbf89dd8adf816009b54009f487828a45
+Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
+Date: Sun Mar 27 14:19:42 2016 -0700
+
+ Replace deprecated FFmpeg API
+
+diff --git a/src/spek-audio.cc b/src/spek-audio.cc
+index b7633bc..21ea7a4 100644
+--- a/src/spek-audio.cc
++++ b/src/spek-audio.cc
+@@ -222,7 +222,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) {
+@@ -326,7 +326,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;
+@@ -334,7 +334,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.
diff --git a/media-sound/spek/spek-0.8.3-r1.ebuild b/media-sound/spek/spek-0.8.3-r1.ebuild
index 8a90995..4becb5f 100644
--- a/media-sound/spek/spek-0.8.3-r1.ebuild
+++ b/media-sound/spek/spek-0.8.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -41,6 +41,8 @@ src_prepare() {
epatch \
"${FILESDIR}"/${PN}-0.8.1-disable-updates.patch \
"${FILESDIR}"/${P}-replace-gnu+11-with-c++11.patch \
- "${FILESDIR}"/${P}-stdlib.patch
+ "${FILESDIR}"/${P}-stdlib.patch \
+ "${FILESDIR}"/${P}-ffmpeg3.patch \
+ "${FILESDIR}"/${P}-ffmpeg3-1.patch
eautoreconf
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-sound/spek/files/, media-sound/spek/
@ 2023-11-24 13:54 Pacho Ramos
0 siblings, 0 replies; 2+ messages in thread
From: Pacho Ramos @ 2023-11-24 13:54 UTC (permalink / raw
To: gentoo-commits
commit: 8b7c576f77c71d547730e6338b5716d05a8f3cb9
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 24 13:39:15 2023 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Fri Nov 24 13:54:04 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b7c576f
media-sound/spek: Port to wxGTK 3.2
And other fixes from Debian
Closes: https://bugs.gentoo.org/889622
Closes: https://bugs.gentoo.org/899768
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
media-sound/spek/files/00_dfsg.patch | 19 ++++++++
media-sound/spek/files/01_arm64-mips64el.patch | 15 ++++++
media-sound/spek/files/02_ftbfs-gcc13.patch | 10 ++++
media-sound/spek/files/03_metainfo.patch | 66 ++++++++++++++++++++++++++
media-sound/spek/spek-0.8.5-r1.ebuild | 40 ++++++++++++++++
5 files changed, 150 insertions(+)
diff --git a/media-sound/spek/files/00_dfsg.patch b/media-sound/spek/files/00_dfsg.patch
new file mode 100644
index 000000000000..4384fc1f326d
--- /dev/null
+++ b/media-sound/spek/files/00_dfsg.patch
@@ -0,0 +1,19 @@
+Author: Matteo Bini <matteobin@tiepi.it>
+Description: Remove DFSG excluded files for Autoconf
+Forwarded: not-needed
+--- a/configure.ac
++++ b/configure.ac
+@@ -81,13 +81,10 @@ AC_CONFIG_FILES([
+ data/icons/32x32/Makefile
+ data/icons/48x48/Makefile
+ data/icons/scalable/Makefile
+- dist/osx/Info.plist
+- dist/win/spek.wxs
+ man/Makefile
+ po/Makefile.in
+ src/Makefile
+ tests/Makefile
+- web/version
+ ])
+ AC_OUTPUT
+
diff --git a/media-sound/spek/files/01_arm64-mips64el.patch b/media-sound/spek/files/01_arm64-mips64el.patch
new file mode 100644
index 000000000000..8d14a48b3b29
--- /dev/null
+++ b/media-sound/spek/files/01_arm64-mips64el.patch
@@ -0,0 +1,15 @@
+Author: Mike Wang <mikewang000000@gmail.com>
+Bug: https://github.com/alexkay/spek/issues/262
+Description: Fix FFT unit tests
+Forwarded: https://github.com/alexkay/spek/commit/0998df9a7ac99d509ddd10fb76d883f24efc0179
+--- a/tests/test-fft.cc
++++ b/tests/test-fft.cc
+@@ -62,7 +62,7 @@ static void test_sine()
+ if (i == k) {
+ continue;
+ }
+- if (plan->get_output(i) > -150.0f) {
++ if (plan->get_output(i) > -149.0f) {
+ silence = false;
+ break;
+ }
diff --git a/media-sound/spek/files/02_ftbfs-gcc13.patch b/media-sound/spek/files/02_ftbfs-gcc13.patch
new file mode 100644
index 000000000000..3271d2eb3947
--- /dev/null
+++ b/media-sound/spek/files/02_ftbfs-gcc13.patch
@@ -0,0 +1,10 @@
+Author: Matteo Bini <matteobin@tiepi.it>
+Description: Fix ftbfs with GCC-13
+Forwarded: https://github.com/alexkay/spek/commit/b1600d9926fa434330171cbebb407d2d0ccdcf03
+--- a/tests/perf.cc
++++ b/tests/perf.cc
+@@ -1,3 +1,4 @@
++#include <cstdint>
+ #include <cstdlib>
+ #include <iostream>
+ #include <fstream>
diff --git a/media-sound/spek/files/03_metainfo.patch b/media-sound/spek/files/03_metainfo.patch
new file mode 100644
index 000000000000..f4e57657f36a
--- /dev/null
+++ b/media-sound/spek/files/03_metainfo.patch
@@ -0,0 +1,66 @@
+Author: Nils Fürniß <contact@nalsai.de>
+Description: Add metainfo file
+Forwarded: https://github.com/alexkay/spek/commit/03d7fb6a1a01e7a0adffd0b083fa4c026efb8f84
+--- a/data/Makefile.am
++++ b/data/Makefile.am
+@@ -6,8 +6,15 @@ desktopdir = $(datadir)/applications
+ desktop_in_files = spek.desktop.in
+ desktop_DATA = spek.desktop
+
+-EXTRA_DIST = spek.desktop.in
+-CLEANFILES = spek.desktop
++appdatadir = $(datadir)/metainfo
++appdata_in_files = spek.metainfo.xml.in
++appdata_DATA = spek.metainfo.xml
++
++EXTRA_DIST = spek.desktop.in spek.metainfo.xml.in
++CLEANFILES = spek.desktop spek.metainfo.xml
+
+ spek.desktop: spek.desktop.in $(wildcard $(top_srcdir)/po/*po)
+ $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
++
++spek.metainfo.xml: spek.metainfo.xml.in $(wildcard $(top_srcdir)/po/*po)
++ $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+--- a/data/spek.metainfo.xml.in
++++ b/data/spek.metainfo.xml.in
+@@ -0,0 +1,40 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<component type="desktop-application">
++ <id>cc.spek.Spek</id>
++ <metadata_license>CC0-1.0</metadata_license>
++ <project_license>GPL-3.0</project_license>
++ <name>Spek</name>
++ <summary>View spectrograms of your audio files</summary>
++ <description>
++ <p>Spek is an acoustic spectrum analyser written in C and C++. It uses FFmpeg libraries for audio decoding and wxWidgets for the GUI.</p>
++ <ul>
++ <li>Supports all popular lossy and lossless audio file formats thanks to the FFmpeg libraries.</li>
++ <li>Ultra-fast signal processing, uses multiple threads to further speed up the analysis.</li>
++ <li>Shows the codec name and the audio signal parameters.</li>
++ <li>Allows to save the spectrogram as an image file.</li>
++ <li>Drag-and-drop support; associates with common audio file formats.</li>
++ <li>Auto-fitting time, frequency and spectral density rulers.</li>
++ <li>Adjustable spectral density range.</li>
++ <li>Translated into 19 languages.</li>
++ </ul>
++ </description>
++ <screenshots>
++ <screenshot type="default">
++ <image>https://raw.githubusercontent.com/alexkay/spek/b3759bbb7d1108b3193394b941eeee982f15b739/web/flac.png</image>
++ </screenshot>
++ </screenshots>
++ <categories>
++ <category>Audio</category>
++ <category>AudioVideo</category>
++ </categories>
++ <url type="homepage">https://www.spek.cc/</url>
++ <url type="bugtracker">https://github.com/alexkay/spek/issues</url>
++ <developer_name>alexkay</developer_name>
++ <content_rating type="oars-1.1" />
++ <launchable type="desktop-id">spek.desktop</launchable>
++ <releases>
++ <release version="0.8.5" date="2023-01-10"/>
++ <release version="0.8.4" date="2022-07-11"/>
++ <release version="0.8.2" date="2016-01-19"/>
++ </releases>
++</component>
diff --git a/media-sound/spek/spek-0.8.5-r1.ebuild b/media-sound/spek/spek-0.8.5-r1.ebuild
new file mode 100644
index 000000000000..f40e5769fa0b
--- /dev/null
+++ b/media-sound/spek/spek-0.8.5-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+WX_GTK_VER="3.2-gtk3"
+
+inherit autotools wxwidgets xdg
+
+DESCRIPTION="Analyse your audio files by showing their spectrogram"
+HOMEPAGE="http://spek.cc/"
+SRC_URI="https://github.com/alexkay/spek/releases/download/v${PV}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ >=media-video/ffmpeg-5:=
+ x11-libs/wxGTK:${WX_GTK_VER}[X]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.8.4-disable-updates.patch
+ # Debian patches
+ "${FILESDIR}"/00_dfsg.patch
+ "${FILESDIR}"/01_arm64-mips64el.patch
+ "${FILESDIR}"/02_ftbfs-gcc13.patch
+ "${FILESDIR}"/03_metainfo.patch
+)
+
+src_prepare() {
+ setup-wxwidgets unicode
+ default
+ eautoreconf
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-24 13:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 11:02 [gentoo-commits] repo/gentoo:master commit in: media-sound/spek/files/, media-sound/spek/ Alexis Ballier
-- strict thread matches above, loose matches on Subject: below --
2023-11-24 13:54 Pacho Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox