Author: raskin Date: Tue Apr 19 16:02:29 2011 New Revision: 26892 URL: https://svn.nixos.org/websvn/nix/?rev=26892&sc=1
Log: Adding globulation Added: nixpkgs/trunk/pkgs/games/globulation/ nixpkgs/trunk/pkgs/games/globulation/default.nix nixpkgs/trunk/pkgs/games/globulation/header-order.patch Modified: nixpkgs/trunk/pkgs/build-support/builder-defs/builder-defs.nix nixpkgs/trunk/pkgs/top-level/all-packages.nix Modified: nixpkgs/trunk/pkgs/build-support/builder-defs/builder-defs.nix ============================================================================== --- nixpkgs/trunk/pkgs/build-support/builder-defs/builder-defs.nix Tue Apr 19 15:29:50 2011 (r26891) +++ nixpkgs/trunk/pkgs/build-support/builder-defs/builder-defs.nix Tue Apr 19 16:02:29 2011 (r26892) @@ -403,8 +403,8 @@ sed -e 's/env *= *Environment *.*/&; env['"'"'ENV'"'"']=os.environ;/' -i SConstruct '' } - scons PREFIX=$out - scons PREFIX=$out install + scons ${toString (attrByPath ["sconsFlags"] [] args)} PREFIX=$out + scons ${toString (attrByPath ["sconsFlags"] [] args)} PREFIX=$out install '') ["minInit" "doUnpack" "addInputs" "defEnsureDir"]; /*debug = x:(trace x x); Added: nixpkgs/trunk/pkgs/games/globulation/default.nix ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ nixpkgs/trunk/pkgs/games/globulation/default.nix Tue Apr 19 16:02:29 2011 (r26892) @@ -0,0 +1,68 @@ +x@{builderDefsPackage + , mesa, SDL, scons, SDL_ttf, SDL_image, zlib, SDL_net, speex, libvorbis + , libogg, boost, fribidi + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="glob2"; + version="0.9.4"; + patchlevel="4"; + name="${baseName}-${version}.${patchlevel}"; + url="http://dl.sv.nongnu.org/releases/glob2/${version}/${name}.tar.gz"; + hash="1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doUnpack" "doPatch" "workaroundScons" "doScons"]; + + patches = [./header-order.patch]; + + # FIXME + # I officially fail to understand what goes on, but that seems to work + # too well not to use. Yes, it is ugly, I know... + workaroundScons = a.fullDepEntry '' + echo '#! ${a.stdenv.shell}' >> o + echo 'g++ -o "$@"' >> o + chmod a+x o + export PATH="$PATH:$PWD" + '' ["minInit"]; + + sconsFlags = [ + "DATADIR=$out/share/globulation2/glob2" + "BINDIR=$out/bin" + "INSTALLDIR=$out/share/globulation2" + ]; + + meta = { + description = "RTS without micromanagement"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = a.lib.licenses.gpl3; + }; + passthru = { + updateInfo = { + downloadPage = "http://globulation2.org/wiki/Download_and_Install"; + }; + }; +}) x + Added: nixpkgs/trunk/pkgs/games/globulation/header-order.patch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ nixpkgs/trunk/pkgs/games/globulation/header-order.patch Tue Apr 19 16:02:29 2011 (r26892) @@ -0,0 +1,23 @@ +With gcc 4.4, compilation of libgag/src/TextStream.cpp fails with the error: +'class GAGCore::StreamBackend' has no member named 'getc'. Reordering +#include's solves the problem. + +Patch from Debian. + +Index: glob2-0.9.4.1/libgag/src/TextStream.cpp +=================================================================== +--- glob2-0.9.4.1.orig/libgag/src/TextStream.cpp 2009-06-27 20:19:38.000000000 +0400 ++++ glob2-0.9.4.1/libgag/src/TextStream.cpp 2009-06-27 20:20:22.000000000 +0400 +@@ -17,11 +17,11 @@ + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +-#include <TextStream.h> + #include <assert.h> + #include <fstream> + #include <iostream> + #include <stack> ++#include <TextStream.h> + #ifdef WIN32 + #define snprintf _snprintf + #define vsnprintf _vsnprintf Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix ============================================================================== --- nixpkgs/trunk/pkgs/top-level/all-packages.nix Tue Apr 19 15:29:50 2011 (r26891) +++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Tue Apr 19 16:02:29 2011 (r26892) @@ -7167,6 +7167,8 @@ gl117 = callPackage ../games/gl-117 {}; + globulation2 = callPackage ../games/globulation {}; + gltron = callPackage ../games/gltron { }; gnuchess = callPackage ../games/gnuchess { }; _______________________________________________ nix-commits mailing list nix-comm...@cs.uu.nl http://mail.cs.uu.nl/mailman/listinfo/nix-commits