Package Details: spek 0.8.5-2

Git Clone URL: https://aur.archlinux.org/spek.git (read-only, click to copy)
Package Base: spek
Description: An acoustic spectrum analyser
Upstream URL: http://spek.cc/
Licenses: GPL3
Submitter: sushidude
Maintainer: petronny (AutoUpdateBot)
Last Packager: petronny
Votes: 58
Popularity: 1.33
First Submitted: 2015-08-12 05:45 (UTC)
Last Updated: 2025-05-28 11:44 (UTC)

Latest Comments

1 2 3 4 Next › Last »

giantplaceholder commented on 2025-10-10 07:23 (UTC)

This patch file should help to fix libavcodec/avfft.h build error

It does. Thanks!

alstruit commented on 2025-10-08 18:05 (UTC) (edited on 2025-10-08 18:06 (UTC) by alstruit)

This patch file should help to fix libavcodec/avfft.h build error.

From ac42a857038f91c3b796cdbf0f7213b33d70e1b4 Mon Sep 17 00:00:00 2001
From: Mike Wang <mikewang000000@gmail.com>
Date: Thu, 6 Feb 2025 03:14:57 +0800
Subject: [PATCH] fix: Replace deprecated FFmpeg avfft.h APIs

---
 src/spek-fft.cc | 28 +++++++++++++++++++++++++++-
 src/spek-fft.h  |  2 +-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/src/spek-fft.cc b/src/spek-fft.cc
index 3105213..fca30b0 100644
--- a/src/spek-fft.cc
+++ b/src/spek-fft.cc
@@ -2,7 +2,13 @@

 #define __STDC_CONSTANT_MACROS
 extern "C" {
+#include <libavutil/version.h>
+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(58, 18, 100)
+#define USE_LIBAVUTIL_TX_API
+#include <libavutil/tx.h>
+#else
 #include <libavcodec/avfft.h>
+#endif
 }

 #include "spek-fft.h"
@@ -16,7 +22,12 @@ public:
     void execute() override;

 private:
+#ifdef USE_LIBAVUTIL_TX_API
+    struct AVTXContext *cx;
+    av_tx_fn tx_func;
+#else
     struct RDFTContext *cx;
+#endif
 };

 std::unique_ptr<FFTPlan> FFT::create(int nbits)
@@ -24,18 +35,33 @@ std::unique_ptr<FFTPlan> FFT::create(int nbits)
     return std::unique_ptr<FFTPlan>(new FFTPlanImpl(nbits));
 }

-FFTPlanImpl::FFTPlanImpl(int nbits) : FFTPlan(nbits), cx(av_rdft_init(nbits, DFT_R2C))
+FFTPlanImpl::FFTPlanImpl(int nbits) : FFTPlan(nbits)
 {
+#ifdef USE_LIBAVUTIL_TX_API
+    const float scale = 1.f;
+    av_tx_init(&this->cx, &this->tx_func, AV_TX_FLOAT_RDFT, 0, 1 << nbits, &scale, AV_TX_INPLACE);
+#else
+    this->cx = av_rdft_init(nbits, DFT_R2C);
+#endif
 }

 FFTPlanImpl::~FFTPlanImpl()
 {
+#ifdef USE_LIBAVUTIL_TX_API
+    av_tx_uninit(&this->cx);
+#else
     av_rdft_end(this->cx);
+#endif
 }

 void FFTPlanImpl::execute()
 {
+#ifdef USE_LIBAVUTIL_TX_API
+    float *input = this->get_input();
+    this->tx_func(this->cx, input, input, sizeof(float));
+#else
     av_rdft_calc(this->cx, this->get_input());
+#endif

     // Calculate magnitudes.
     int n = this->get_input_size();
diff --git a/src/spek-fft.h b/src/spek-fft.h
index 409263e..9a16c87 100644
--- a/src/spek-fft.h
+++ b/src/spek-fft.h
@@ -26,7 +26,7 @@ public:
     {
         // FFmpeg uses various assembly optimizations which expect
         // input data to be aligned by up to 32 bytes (e.g. AVX)
-        this->input = (float*) av_malloc(sizeof(float) * input_size);
+        this->input = (float*) av_malloc(sizeof(float) * (input_size + 2));
     }

     virtual ~FFTPlan()
-- 
2.51.0

bemxio commented on 2025-10-07 11:25 (UTC)

@lodger In that case, the best approach would be to create a spek-x AUR package. Someone has already made spek-x-git, and the current version 0.9.4 seems to be up-to-date with the most recent commit.

lodger commented on 2025-10-07 11:20 (UTC)

@bemxio

spek-x, a fork of spek, seems to be alive https://aur.archlinux.org/packages/spek-x-git

bemxio commented on 2025-10-06 19:15 (UTC)

@lodger Replacing ffmpeg inside the dependencies to ffmpeg7.1 and adding LDFLAGS="-L/usr/lib/ffmpeg7.1" CPPFLAGS="-I/usr/include/ffmpeg7.1" at the beginning of line 15 makes it work. It would probably be better to just update the project to FFmpeg 8.0, however upstream seems to be dead, as the last commit was pushed in 2023.

lodger commented on 2025-10-06 11:20 (UTC) (edited on 2025-10-06 11:21 (UTC) by lodger)

Can't build

spek-fft.cc:5:10: fatal error: libavcodec/avfft.h: No such file or directory
    5 | #include <libavcodec/avfft.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:610: libspek_a-spek-fft.o] Error 1
make[2]: Leaving directory '/tmp/makepkg/spek/src/spek-0.8.5/src'
make[1]: *** [Makefile:473: all-recursive] Error 1
make[1]: Leaving directory '/tmp/makepkg/spek/src/spek-0.8.5'
make: *** [Makefile:399: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Kyuunex commented on 2025-05-27 15:19 (UTC)

working pkgbuild

# Maintainer: Michał Przybyś <michal@przybys.eu>
pkgname=spek
pkgver=0.8.5
pkgrel=3
pkgdesc='An acoustic spectrum analyser'
arch=(x86_64)
url='http://spek.cc/'
license=(GPL3)
depends=(ffmpeg wxwidgets-gtk3)
source=("https://github.com/alexkay/spek/releases/download/v${pkgver}/spek-${pkgver}.tar.xz")
sha256sums=('1bccf85a14a01af8f2f30476cbad004e8bf6031f500e562bbe5bbd1e5eb16c59')

build() {
    cd "spek-${pkgver}"
    ./configure --prefix=/usr --mandir=/usr/share/man
    make
}

package() {
    cd "spek-${pkgver}"
    make DESTDIR="${pkgdir}" install
}

dakataca commented on 2025-03-03 21:58 (UTC)

Update PKGBUID please:

# Mantainer: Michał Przybyś <michal@przybys.eu>
pkgname=spek
pkgver=0.8.5
pkgrel=1
pkgdesc='An acoustic spectrum analyser'
arch=(x86_64)
url='http://spek.cc/'
license=(GPL3)
depends=(ffmpeg wxwidgets-gtk3)
makedepends=(autoconf automake libtool gettext)
source=("https://github.com/alexkay/spek/archive/v${pkgver}.tar.gz")
sha256sums=('9053d2dec452dcde421daa0f5f59a9dee47927540f41d9c0c66800cb6dbf6996')

prepare() {
    cd "spek-${pkgver}"
    # Obtener la versión actual de gettext usando tu método mejorado
    GETTEXT_VERSION=$(gettext --version | sed -En '/gettext/ s/^.*runtime\) //p')
    # Actualizar la versión en configure.ac
    sed -i "s/AM_GNU_GETTEXT_VERSION(\[[0-9]\+\.[0-9]\+\])/AM_GNU_GETTEXT_VERSION([$GETTEXT_VERSION])/" configure.ac
}

build() {
    cd "spek-${pkgver}"
    export CXXFLAGS="$(pkg-config --cflags-only-I libavutil)"
    ./autogen.sh --with-wx-config=/usr/bin/wx-config --prefix=/usr
    make
}

package() {
    cd "spek-${pkgver}"
    make DESTDIR="${pkgdir}" install
}

d2a2 commented on 2025-02-14 20:36 (UTC) (edited on 2025-02-23 09:50 (UTC) by d2a2)

I have the same problem as hippieben. I modified the PKGBUILD to build from the release tarball, using the provided configure script instead of generating one with autogen:

https://0x0.st/8NAd.txt

It builds and runs in a clean chroot for me. There's a missing icon assertion when running the binary but otherwise appears to function as normal.

EDIT: I bumped the version of gettext to 0.23 in configure.ac and the build succeeded. Run this before running autogen.sh in the PKGBUILD:

sed -i 's/AM_GNU_GETTEXT_VERSION(\[0.21\])/AM_GNU_GETTEXT_VERSION([0.23])/' configure.ac

Still getting those wxWidgets assertion errors though.