vorbis-tools: fix build with clang 16 and on Darwin
* Use iconv on Darwin to eliminate a call to undeclared function `charset_convert`; and * Applies a patch to fix a call to undeclared function `utf8_decode`.
This commit is contained in:
parent
f409f152d2
commit
7ba619345c
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetchurl, libogg, libvorbis, libao, pkg-config, curl
|
||||
{ lib, stdenv, fetchurl, fetchpatch, libogg, libvorbis, libao, pkg-config, curl, libiconv
|
||||
, speex, flac
|
||||
, autoreconfHook }:
|
||||
|
||||
@ -11,12 +11,18 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1c7h4ivgfdyygz2hyh6nfibxlkz8kdk868a576qkkjgj5gn78xyv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ libogg libvorbis libao curl speex flac ];
|
||||
patches = lib.optionals stdenv.cc.isClang [
|
||||
# Fixes a call to undeclared function `utf8_decode`.
|
||||
# https://github.com/xiph/vorbis-tools/pull/33
|
||||
(fetchpatch {
|
||||
url = "https://github.com/xiph/vorbis-tools/commit/8a645f78b45ae7e370c0dc2a52d0f2612aa6110b.patch";
|
||||
hash = "sha256-RkT9Xa0pRu/oO9E9qhDa17L0luWgYHI2yINIkPZanmI=";
|
||||
})
|
||||
];
|
||||
|
||||
env = lib.optionalAttrs stdenv.cc.isClang {
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
||||
};
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ libogg libvorbis libao curl speex flac ]
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extra tools for Ogg-Vorbis audio codec";
|
||||
|
Loading…
Reference in New Issue
Block a user