From a5f897d4640c6475ecff444a81d9114ff41ed689 Mon Sep 17 00:00:00 2001 From: Reno Dakota Date: Fri, 3 Jan 2025 14:48:55 +0000 Subject: [PATCH 1/2] Revert "libfishsound: fix build with gcc14" This reverts commit fdd1a8c1e02a2e9784ff73979c9e881e784578d9. reverting in to apply a more comprehensive fix --- .../li/libfishsound/fix-callbacks.patch | 20 ------------------- pkgs/by-name/li/libfishsound/package.nix | 4 ---- 2 files changed, 24 deletions(-) delete mode 100644 pkgs/by-name/li/libfishsound/fix-callbacks.patch diff --git a/pkgs/by-name/li/libfishsound/fix-callbacks.patch b/pkgs/by-name/li/libfishsound/fix-callbacks.patch deleted file mode 100644 index 992efcf23ec86..0000000000000 --- a/pkgs/by-name/li/libfishsound/fix-callbacks.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/libfishsound/flac.c -+++ b/src/libfishsound/flac.c -@@ -106,7 +106,7 @@ fs_flac_command (FishSound * fsound, int command, void * data, int datasize) - #if FS_DECODE - static FLAC__StreamDecoderReadStatus - fs_flac_read_callback(const FLAC__StreamDecoder *decoder, -- FLAC__byte buffer[], unsigned int *bytes, -+ FLAC__byte buffer[], size_t *bytes, - void *client_data) - { - FishSound* fsound = (FishSound*)client_data; -@@ -346,7 +346,7 @@ dec_err: - #if FS_ENCODE - static FLAC__StreamEncoderWriteStatus - fs_flac_enc_write_callback(const FLAC__StreamEncoder *encoder, -- const FLAC__byte buffer[], unsigned bytes, -+ const FLAC__byte buffer[], size_t bytes, - unsigned samples, unsigned current_frame, - void *client_data) - { diff --git a/pkgs/by-name/li/libfishsound/package.nix b/pkgs/by-name/li/libfishsound/package.nix index 63b0838b4b01e..0c5ea9c4c023a 100644 --- a/pkgs/by-name/li/libfishsound/package.nix +++ b/pkgs/by-name/li/libfishsound/package.nix @@ -17,10 +17,6 @@ stdenv.mkDerivation rec { sha256 = "1iz7mn6hw2wg8ljaw74f4g2zdj68ib88x4vjxxg3gjgc5z75f2rf"; }; - patches = [ - ./fix-callbacks.patch - ]; - propagatedBuildInputs = [ libvorbis speex From 765cd09de5a910235e1c16a0e480f5f28832f0bf Mon Sep 17 00:00:00 2001 From: Ross Nomann Date: Mon, 30 Dec 2024 00:19:40 +0100 Subject: [PATCH 2/2] libfishsound: add debian patches --- pkgs/by-name/li/libfishsound/package.nix | 31 +++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libfishsound/package.nix b/pkgs/by-name/li/libfishsound/package.nix index 0c5ea9c4c023a..59ceeccfd2f33 100644 --- a/pkgs/by-name/li/libfishsound/package.nix +++ b/pkgs/by-name/li/libfishsound/package.nix @@ -2,6 +2,8 @@ lib, stdenv, fetchurl, + fetchpatch, + autoreconfHook, libvorbis, speex, flac, @@ -17,13 +19,40 @@ stdenv.mkDerivation rec { sha256 = "1iz7mn6hw2wg8ljaw74f4g2zdj68ib88x4vjxxg3gjgc5z75f2rf"; }; + patches = + let + fetchDebPatch = + { name, hash }: + fetchpatch { + inherit name hash; + url = "https://salsa.debian.org/multimedia-team/libfishsound/-/raw/f25f31a13dd2ce008614427889b08e6f2222898f/debian/patches/${name}"; + }; + in + map fetchDebPatch [ + { + name = "0001-Patch-configure.ac-to-specify-config-macro-dir.patch"; + hash = "sha256-3cijMhgxqwFisc5nt8826QUwOqPI7H425QkDcjnD4iM="; + } + { + name = "0002-flac-set-vendor_string.length-0.patch"; + hash = "sha256-8195rU9IAhFL3MgB4jLwtJv6BWgz22A38+RmIymIQoo="; + } + { + name = "0003-Fix-incompatible-flac-callback-types.patch"; + hash = "sha256-BxG1hlThzhJ6VeGcsNpDEtVyKSJTLGFKeHFpFoXW54A="; + } + ]; + propagatedBuildInputs = [ libvorbis speex flac ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + autoreconfHook + ]; meta = with lib; { homepage = "https://xiph.org/fishsound/";