From d90dd6d17bc5a116ef9875b6900305c2bd367887 Mon Sep 17 00:00:00 2001 From: C0DEHERO Date: Sat, 16 May 2015 22:48:43 -0400 Subject: [PATCH] irrlicht: update rev 3843 (1.8) -> rev 5104 (1.8); fixed awkward naming; use svn release branch --- .../libraries/irrlicht/default.nix | 22 +++------ .../libraries/irrlicht/irrlicht3843.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/libraries/irrlicht/irrlicht3843.nix diff --git a/pkgs/development/libraries/irrlicht/default.nix b/pkgs/development/libraries/irrlicht/default.nix index a682b3a6b829..8acd872fcb39 100644 --- a/pkgs/development/libraries/irrlicht/default.nix +++ b/pkgs/development/libraries/irrlicht/default.nix @@ -2,21 +2,16 @@ stdenv.mkDerivation rec { - # Version 3843 is required for supertuxkart - name = "irrlicht-1.8-svn-3843"; + name = "irrlicht-${version}-svn-${revision}"; + version = "1.8"; + revision = "5104"; # newest revision as of 05-16-15 src = fetchsvn { - url = https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk; - rev = 3843; - sha256 = "0v31l3k0fzy7isdsx2sh0baaixzlml1m7vgz6cd0015d9f5n99vl"; + url = "https://svn.code.sf.net/p/irrlicht/code/branches/releases/${version}"; # get 1.8 release (same regardless of rev) + rev = "${revision}"; + sha256 = "18xvlrjf113mphf29iy24hmrkh7xff6j9cz0chrxjqbr9xk9h1yq"; }; - patches = [ ./irrlicht-1.8.1-mesa-10.x.patch ]; - - postPatch = '' - sed -i /stdcall-alias/d source/Irrlicht/Makefile - ''; - preConfigure = '' cd source/Irrlicht ''; @@ -30,11 +25,6 @@ stdenv.mkDerivation rec { mkdir -p $out/lib ''; - postInstall = '' - ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so.1.8 - ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so - ''; - buildInputs = [ unzip mesa libXrandr libX11 libXxf86vm ]; meta = { diff --git a/pkgs/development/libraries/irrlicht/irrlicht3843.nix b/pkgs/development/libraries/irrlicht/irrlicht3843.nix new file mode 100644 index 000000000000..a682b3a6b829 --- /dev/null +++ b/pkgs/development/libraries/irrlicht/irrlicht3843.nix @@ -0,0 +1,45 @@ +{ fetchsvn, stdenv, mesa, unzip, libXrandr, libX11, libXxf86vm }: + + +stdenv.mkDerivation rec { + # Version 3843 is required for supertuxkart + name = "irrlicht-1.8-svn-3843"; + + src = fetchsvn { + url = https://irrlicht.svn.sourceforge.net/svnroot/irrlicht/trunk; + rev = 3843; + sha256 = "0v31l3k0fzy7isdsx2sh0baaixzlml1m7vgz6cd0015d9f5n99vl"; + }; + + patches = [ ./irrlicht-1.8.1-mesa-10.x.patch ]; + + postPatch = '' + sed -i /stdcall-alias/d source/Irrlicht/Makefile + ''; + + preConfigure = '' + cd source/Irrlicht + ''; + + buildPhase = '' + make sharedlib NDEBUG=1 + ''; + + preInstall = '' + sed -i s,/usr/local/lib,$out/lib, Makefile + mkdir -p $out/lib + ''; + + postInstall = '' + ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so.1.8 + ln -s libIrrlicht.so.1.8.0-SVN $out/lib/libIrrlicht.so + ''; + + buildInputs = [ unzip mesa libXrandr libX11 libXxf86vm ]; + + meta = { + homepage = http://irrlicht.sourceforge.net/; + license = stdenv.lib.licenses.zlib; + description = "Open source high performance realtime 3D engine written in C++"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 00737083a7b3..046398c6de75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6212,7 +6212,8 @@ let intltool = callPackage ../development/tools/misc/intltool { }; - irrlicht3843 = callPackage ../development/libraries/irrlicht { }; + irrlicht = callPackage ../development/libraries/irrlicht { }; + irrlicht3843 = callPackage ../development/libraries/irrlicht/irrlicht3843.nix { }; isocodes = callPackage ../development/libraries/iso-codes { };