diff options
Diffstat (limited to 'pkgs/misc/emulators/zsnes/default.nix')
-rw-r--r-- | pkgs/misc/emulators/zsnes/default.nix | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/pkgs/misc/emulators/zsnes/default.nix b/pkgs/misc/emulators/zsnes/default.nix index a2896e70d174..6ee57e0cddfe 100644 --- a/pkgs/misc/emulators/zsnes/default.nix +++ b/pkgs/misc/emulators/zsnes/default.nix @@ -15,11 +15,29 @@ stdenv.mkDerivation { patch -p0 < ${./zsnes-1.51-libpng15.patch} ''; + buildInputs = [ nasm SDL zlib libpng ncurses mesa ]; + preConfigure = '' cd src - ''; - buildInputs = [ nasm SDL zlib libpng ncurses mesa ]; + sed -i "/^STRIP/d" configure + + # Fix for undefined strncasecmp() + echo '#include <strings.h>' > tmp.cpp + cat tmp.cpp tools/strutil.h > tools/strutil.h.new + mv tools/strutil.h.new tools/strutil.h + + # Fix for undefined system() + echo '#include <stdlib.h>' > tmp.cpp + cat tmp.cpp tools/depbuild.cpp > tools/depbuild.cpp.new + mv tools/depbuild.cpp.new tools/depbuild.cpp + + # Fix for lots of undefined strcmp, strncmp etc. + echo '#include <string.h>' > tmp.cpp + cat tmp.cpp parsegen.cpp > parsegen.cpp.new + mv parsegen.cpp.new parsegen.cpp + ''; + configureFlags = "--enable-release"; @@ -29,4 +47,4 @@ stdenv.mkDerivation { maintainers = [ stdenv.lib.maintainers.sander ]; homepage = http://www.zsnes.com; }; -} \ No newline at end of file +} |