beret: Fix build on darwin (close #923)
This commit is contained in:
parent
38d54cfc21
commit
834cd6c886
@ -23,7 +23,8 @@ let
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "SDL-1.2.15";
|
||||
version = "1.2.15";
|
||||
name = "SDL-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.libsdl.org/release/${name}.tar.gz";
|
||||
@ -49,8 +50,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru = {inherit openglSupport;};
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "A cross-platform multimedia library";
|
||||
homepage = http://www.libsdl.org/;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b";
|
||||
};
|
||||
|
||||
buildInputs = [SDL libpng libjpeg libtiff libungif libXpm];
|
||||
buildInputs = [ SDL libpng libjpeg libtiff libungif libXpm ];
|
||||
|
||||
postInstall = ''
|
||||
sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \
|
||||
@ -19,9 +19,10 @@ stdenv.mkDerivation rec {
|
||||
ln -sv SDL/SDL_image.h $out/include/SDL_image.h
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "SDL image library";
|
||||
homepage = "http://www.libsdl.org/projects/SDL_image/";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
homepage = http://www.libsdl.org/projects/SDL_image/;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -2,13 +2,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "SDL_mixer";
|
||||
version = "1.2.8";
|
||||
|
||||
version = "1.2.12";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.libsdl.org/projects/${pname}/release/${name}.tar.gz";
|
||||
sha256 = "a8222a274778ff16d0e3ee49a30db27a48a4d357169a915fc599a764e405e0b6";
|
||||
sha256 = "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n";
|
||||
};
|
||||
|
||||
buildInputs = [SDL libogg libvorbis];
|
||||
@ -17,7 +16,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = "ln -s $out/include/SDL/SDL_mixer.h $out/include/";
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "SDL multi-channel audio mixer library";
|
||||
homepage = http://www.libsdl.org/projects/SDL_mixer/;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
@ -6,8 +6,9 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ SDL SDL_image SDL_ttf SDL_mixer ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-I${SDL}/include/SDL";
|
||||
|
||||
NIX_CFLAGS_LINK = "-lgcc_s";
|
||||
NIX_CFLAGS_LINK = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
|
||||
"-framework CoreFoundation -framework OpenGL -framework Cocoa";
|
||||
|
||||
patches = [ ./use-home-dir.patch ];
|
||||
|
||||
@ -28,11 +29,12 @@ stdenv.mkDerivation {
|
||||
cp -av tahoma.ttf images music rooms sfx $out/share
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "A 2D puzzle-platformer game about a scientist with telekinetic abilities";
|
||||
homepage = http://kiwisauce.com/beret/;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
license = stdenv.lib.licenses.lgpl2;
|
||||
license = licenses.lgpl2;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi
|
||||
, gconf, gtk, intltool, gettext
|
||||
, alsaLib, libsamplerate, libsndfile, speex, bluez, sbc, udev, libcap
|
||||
, gconf, gtk, intltool, gettext, alsaLib, libsamplerate, libsndfile, speex
|
||||
, bluez, sbc, udev, libcap, json_c
|
||||
, jackaudioSupport ? false, jackaudio ? null
|
||||
, x11Support ? false, xlibs
|
||||
, json_c
|
||||
, useSystemd ? false, systemd ? null
|
||||
}:
|
||||
, useSystemd ? false, systemd ? null }:
|
||||
|
||||
assert jackaudioSupport -> jackaudio != null;
|
||||
|
||||
@ -18,20 +16,18 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated.
|
||||
propagatedBuildInputs = [ gdbm libcap ];
|
||||
propagatedBuildInputs
|
||||
= [ gdbm ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libcap ];
|
||||
|
||||
buildInputs =
|
||||
[ pkgconfig gnum4 libtool intltool glib dbus avahi
|
||||
libsamplerate libsndfile speex alsaLib bluez sbc udev
|
||||
json_c
|
||||
#gtk gconf
|
||||
]
|
||||
[ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile
|
||||
speex json_c ]
|
||||
++ stdenv.lib.optional jackaudioSupport jackaudio
|
||||
++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
|
||||
++ stdenv.lib.optional useSystemd systemd;
|
||||
++ stdenv.lib.optional useSystemd systemd
|
||||
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib bluez sbc udev ];
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
# Move the udev rules under $(prefix).
|
||||
sed -i "src/Makefile.in" \
|
||||
-e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g"
|
||||
@ -42,19 +38,32 @@ stdenv.mkDerivation rec {
|
||||
-e "s|chmod r+s |true |"
|
||||
'';
|
||||
|
||||
configureFlags = ''
|
||||
--disable-solaris --disable-hal --disable-jack
|
||||
--disable-oss-output --disable-oss-wrapper
|
||||
--localstatedir=/var --sysconfdir=/etc
|
||||
${if jackaudioSupport then "--enable-jack" else ""}
|
||||
'';
|
||||
|
||||
installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse";
|
||||
configureFlags =
|
||||
[ "--disable-solaris" "--disable-jack" "--disable-oss-output"
|
||||
"--disable-oss-wrapper" "--localstatedir=/var" "--sysconfdir=/etc" ]
|
||||
++ stdenv.lib.optional jackaudioSupport "--enable-jack"
|
||||
++ stdenv.lib.optional stdenv.isDarwin "--with-mac-sysroot=/";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
# not sure what the best practices are here -- can't seem to find a way
|
||||
# for the compiler to bring in stdlib and stdio (etc.) properly
|
||||
# the alternative is to copy the files from /usr/include to src, but there are
|
||||
# probably a large number of files that would need to be copied (I stopped
|
||||
# after the seventh)
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin
|
||||
"-I/usr/include";
|
||||
|
||||
installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "PulseAudio, a sound server for POSIX and Win32 systems";
|
||||
homepage = http://www.pulseaudio.org/;
|
||||
# Note: Practically, the server is under the GPL due to the
|
||||
# dependency on `libsamplerate'. See `LICENSE' for details.
|
||||
licenses = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
platforms = platforms.unix;
|
||||
|
||||
longDescription = ''
|
||||
PulseAudio is a sound server for POSIX and Win32 systems. A
|
||||
@ -65,14 +74,5 @@ stdenv.mkDerivation rec {
|
||||
sample format or channel count and mixing several sounds into
|
||||
one are easily achieved using a sound server.
|
||||
'';
|
||||
|
||||
homepage = http://www.pulseaudio.org/;
|
||||
|
||||
# Note: Practically, the server is under the GPL due to the
|
||||
# dependency on `libsamplerate'. See `LICENSE' for details.
|
||||
licenses = "LGPLv2+";
|
||||
|
||||
maintainers = [ ];
|
||||
platforms = stdenv.lib.platforms.gnu;
|
||||
};
|
||||
}
|
||||
|
@ -5402,14 +5402,24 @@ let
|
||||
|
||||
SDL = callPackage ../development/libraries/SDL {
|
||||
openglSupport = mesaSupported;
|
||||
alsaSupport = true;
|
||||
alsaSupport = (!stdenv.isDarwin);
|
||||
x11Support = true;
|
||||
pulseaudioSupport = false; # better go through ALSA
|
||||
pulseaudioSupport = stdenv.isDarwin; # better go through ALSA
|
||||
|
||||
# resolve the unrecognized -fpascal-strings option error
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
SDL_gfx = callPackage ../development/libraries/SDL_gfx { };
|
||||
|
||||
SDL_image = callPackage ../development/libraries/SDL_image { };
|
||||
SDL_image = callPackage ../development/libraries/SDL_image {
|
||||
# provide an Objective-C compiler
|
||||
stdenv = if stdenv.isDarwin
|
||||
then clangStdenv
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
SDL_mixer = callPackage ../development/libraries/SDL_mixer { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user