libfishsound: add debian patches (#370633)

Emily 0d2230e8 f691e52e

Changed files
+29 -24
pkgs
by-name
-20
pkgs/by-name/li/libfishsound/fix-callbacks.patch
···
-
--- 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)
-
{
+29 -4
pkgs/by-name/li/libfishsound/package.nix
···
lib,
stdenv,
fetchurl,
+
fetchpatch,
+
autoreconfHook,
libvorbis,
speex,
flac,
···
sha256 = "1iz7mn6hw2wg8ljaw74f4g2zdj68ib88x4vjxxg3gjgc5z75f2rf";
};
-
patches = [
-
./fix-callbacks.patch
-
];
+
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
···
flac
];
-
nativeBuildInputs = [ pkg-config ];
+
nativeBuildInputs = [
+
pkg-config
+
autoreconfHook
+
];
meta = with lib; {
homepage = "https://xiph.org/fishsound/";