diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2016-04-01 11:16:02 +0200 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2016-04-01 11:16:02 +0200 |
commit | f07b934c8a9f9bde57efc14eaa348f777220cec3 (patch) | |
tree | a89362cbcd3bce2a10a13ee8e6749975d108e5bc /pkgs/games/trigger | |
parent | 635c99ce878d5009eaf21da80319d5426a534cee (diff) |
Updating trigger-rally to 0.6.3
Diffstat (limited to 'pkgs/games/trigger')
-rw-r--r-- | pkgs/games/trigger/default.nix | 40 | ||||
-rw-r--r-- | pkgs/games/trigger/search.patch | 14 |
2 files changed, 33 insertions, 21 deletions
diff --git a/pkgs/games/trigger/default.nix b/pkgs/games/trigger/default.nix index ad65b54ddcda9..382edb6908b43 100644 --- a/pkgs/games/trigger/default.nix +++ b/pkgs/games/trigger/default.nix @@ -1,38 +1,36 @@ -{ fetchurl, stdenv, SDL, freealut, SDL_image, openal, physfs, zlib, mesa, jam }: +{ fetchurl, stdenv, SDL, freealut, SDL_image, openal, physfs, zlib, mesa, glew }: stdenv.mkDerivation rec { - name = "trigger-rally-0.6.1"; + name = "trigger-rally-0.6.3"; src = fetchurl { - url = "mirror://sourceforge/trigger-rally/${name}-src.tar.bz2"; - sha256 = "1fvb6dl5bwclmx0y8ygyrfn8jczc5kxawxlyv6mp592smb5x5hjs"; + url = "mirror://sourceforge/trigger-rally/${name}.tar.gz"; + sha256 = "103mv4vpq335mrmgzlhahrfncq7ds3b5ip5a52967rv2j6hhzpvy"; }; - srcData = fetchurl { - url = "mirror://sourceforge/trigger-rally/${name}-data.tar.bz2"; - sha256 = "04f9d74gz5xvfx6pnmbfxqhp0kd1p16j5lrgcq12wxvla6py4qaw"; - }; - - buildInputs = [ SDL freealut SDL_image openal physfs zlib mesa jam ]; + buildInputs = [ SDL freealut SDL_image openal physfs zlib mesa glew ]; preConfigure = '' - configureFlags="$configureFlags --datadir=$out/share/${name}-data" - ''; + sed s,/usr/local,$out, -i bin/*defs - # It has some problems installing the README file, so... out. - patchPhase = '' - sed -i /README/d Jamfile + cd src + export makeFlags="$makeFlags prefix=$out" ''; - buildPhase = "jam"; + enableParallelBuilding = true; - installPhase = '' - jam install - mkdir -p $out/share - pushd $out/share - tar xf $srcData + postInstall = '' + mkdir -p $out/bin + cat <<EOF > $out/bin/trigger-rally + #!/bin/sh + exec $out/games/trigger-rally "$@" + EOF + chmod +x $out/bin/trigger-rally ''; + # search.patch : fix c++ error. + patches = [ ./search.patch ]; + meta = { description = "Rally"; homepage = http://trigger-rally.sourceforge.net/; diff --git a/pkgs/games/trigger/search.patch b/pkgs/games/trigger/search.patch new file mode 100644 index 0000000000000..60a69b159b5bd --- /dev/null +++ b/pkgs/games/trigger/search.patch @@ -0,0 +1,14 @@ +diff --git a/src/Trigger/main.cpp b/src/Trigger/main.cpp +index 39539e1..680c12c 100644 +--- a/src/Trigger/main.cpp ++++ b/src/Trigger/main.cpp +@@ -890,7 +890,8 @@ bool MainApp::loadAll() + std::smatch mr; // Match Results + std::regex pat(R"(^(\w+)(\..+)$)"); // Pattern + +- if (!std::regex_search(std::string(*fname), mr, pat)) ++ std::string search(*fname); ++ if (!std::regex_search(search, mr, pat)) + continue; + + std::string basefname = mr[1]; |