soundtracker: Fix on Darwin
(cherry picked from commit ade48138df8b77c1d76f4b5f016be5ebee06565e)
This commit is contained in:
parent
9cd2c7a627
commit
f6f4c4ac26
|
@ -1,7 +1,7 @@
|
||||||
{ lib, stdenv
|
{ lib, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, autoconf
|
, autoreconfHook
|
||||||
, gtk2
|
, gtk2
|
||||||
, alsaLib
|
, alsaLib
|
||||||
, SDL
|
, SDL
|
||||||
|
@ -23,10 +23,32 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0nh0dwz8nldc040q6n06vlazhss8ms42r2dffhjcrqj3hbrvfx82";
|
sha256 = "0nh0dwz8nldc040q6n06vlazhss8ms42r2dffhjcrqj3hbrvfx82";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
|
# Darwin binutils don't support D option for ar
|
||||||
|
# ALSA macros are missing on Darwin, causing error
|
||||||
|
substituteInPlace configure.ac \
|
||||||
|
--replace ARFLAGS=crD ARFLAGS=cru \
|
||||||
|
--replace AM_PATH_ALSA '#AM_PATH_ALSA'
|
||||||
|
# Avoid X11-specific workaround code on more than just Windows
|
||||||
|
substituteInPlace app/keys.c \
|
||||||
|
--replace '!defined(_WIN32)' '!defined(_WIN32) && !defined(__APPLE__)'
|
||||||
|
# "The application with bundle ID (null) is running setugid(), which is not allowed."
|
||||||
|
sed -i -e '/seteuid/d' -e '/setegid/d' app/main.c
|
||||||
|
'';
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-graphics-backend=gdk"
|
||||||
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
|
"--disable-alsa"
|
||||||
|
];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
autoconf
|
autoreconfHook
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gtk2
|
gtk2
|
||||||
SDL
|
SDL
|
||||||
|
@ -49,7 +71,5 @@ stdenv.mkDerivation rec {
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ fgaz ];
|
maintainers = with maintainers; [ fgaz ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
# gdk/gdkx.h not found
|
|
||||||
broken = stdenv.isDarwin;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue