Higan: 094 -> 095

In order to increase portability and flexibility, now the build phase
explicitly sets "compiler=c++" as a make parameter.
Further, there is a link "higan" for backwards compatibility; higan was
split in icarus (the game ROMS database manager) and tomoko (the
emulator itself).
This commit is contained in:
AndersonTorres
2015-12-18 07:45:04 -02:00
parent 12b64621fd
commit 7070c2d900
3 changed files with 61 additions and 30 deletions
+24 -28
View File
@@ -1,56 +1,51 @@
{ stdenv, fetchurl
, pkgconfig
, p7zip, pkgconfig
, libX11, libXv
, udev
, mesa, SDL
, libao, openal, libpulseaudio
, profile ? "performance" # Options: accuracy, balanced, performance
, guiToolkit ? "gtk" # can be gtk or qt4
, gtk ? null, qt4 ? null }:
assert guiToolkit == "gtk" || guiToolkit == "qt4";
assert (guiToolkit == "gtk" -> gtk != null) || (guiToolkit == "qt4" -> qt4 != null);
, gtk, gtksourceview
, profile ? "balanced" # Options: accuracy, balanced, performance
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "higan-${version}";
version = "094";
sourceName = "higan_v${version}-source";
name = "higan-${meta.version}";
sourceName = "higan_v${meta.version}-source";
src = fetchurl {
urls = [ "http://files.byuu.org/download/${sourceName}.tar.xz" ];
sha256 = "06qm271pzf3qf2labfw2lx6k0xcd89jndmn0jzmnc40cspwrs52y";
urls = [ "http://download.byuu.org/${sourceName}.7z" ];
sha256 = "0xsgyijcf4psi3mlahr5iq7vbbw3jby1if5pkhg8c5xqckpi2fj4";
curlOpts = "--user-agent 'Mozilla/5.0'"; # the good old user-agent trick...
};
patches = [ ./0001-change-flags.diff ];
buildInputs =
[ pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio ]
++ optionals (guiToolkit == "gtk") [ gtk ]
++ optionals (guiToolkit == "qt4") [ qt4 ];
[ p7zip pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio gtk gtksourceview ];
unpackPhase = ''
7z x $src
sourceRoot=${sourceName}
'';
buildPhase = ''
make phoenix=${guiToolkit} profile=${profile} -C ananke
make phoenix=${guiToolkit} profile=${profile}
make compiler=c++ profile=${profile} -C icarus
make compiler=c++ profile=${profile}
'';
installPhase = ''
install -dm 755 $out/share/applications $out/share/pixmaps $out/share/higan/Video\ Shaders $out/bin $out/lib
install -dm 755 $out/bin $out/share/applications $out/share/higan $out/share/pixmaps
install -m 755 icarus/icarus $out/bin/
install -m 755 out/tomoko $out/bin/
(cd $out/bin; ln -Ts tomoko higan) #backwards compatibility
install -m 644 data/higan.desktop $out/share/applications/
install -m 644 data/higan.png $out/share/pixmaps/
cp -dr --no-preserve=ownership profile/* data/cheats.bml $out/share/higan/
cp -dr --no-preserve=ownership shaders/*.shader $out/share/higan/Video\ Shaders/
install -m 755 out/higan $out/bin/higan
install -m 644 ananke/libananke.so $out/lib/libananke.so.1
(cd $out/lib && ln -s libananke.so.1 libananke.so)
cp -dr --no-preserve='ownership' profile/* data/cheats.bml $out/share/higan/
'';
fixupPhase = ''
oldRPath=$(patchelf --print-rpath $out/bin/higan)
patchelf --set-rpath $oldRPath:$out/lib $out/bin/higan
# A dirty workaround, suggested by @cpages:
# we create a first-run script to populate
# the local $HOME with all the auxiliary
@@ -67,6 +62,7 @@ stdenv.mkDerivation rec {
'';
meta = {
version = "095";
description = "An open-source, cycle-accurate Nintendo multi-system emulator";
longDescription = ''
Higan (formerly bsnes) is a Nintendo multi-system emulator.