about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2014-03-23 23:32:00 -0500
committerBjørn Forsman <bjorn.forsman@gmail.com>2014-03-26 22:41:39 +0100
commit62793a007db2911cadebfc738d5415d7cc2cacbf (patch)
tree4ada2ec0bc6ec52f30667f8597aaa2985ca598c1 /pkgs
parentb60f8810b214d2b2b5a8257c446ce89419f964f7 (diff)
fmod: adopt, and upgrade 4.22.04 -> 4.44.32
This installs the headers in a fashion which matches Gentoo, and it also
changes the version numbering scheme as well to match, so hopefully
Nixpkgs Monitor can provide security tracking updates or anything
(although technically Gentoo is outdated!)

[Bjørn: add github pull-request cover letter to commit message; it
contains useful info.]

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/fmod/default.nix44
1 files changed, 24 insertions, 20 deletions
diff --git a/pkgs/development/libraries/fmod/default.nix b/pkgs/development/libraries/fmod/default.nix
index d85a24fa63ad2..ba9bb286cdfa5 100644
--- a/pkgs/development/libraries/fmod/default.nix
+++ b/pkgs/development/libraries/fmod/default.nix
@@ -1,28 +1,32 @@
-{stdenv, fetchurl }:
+{ stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  name = "fmod-42204";
-  src = if stdenv.system == "i686-linux" then
-    fetchurl {
-      url = http://www.fmod.org/index.php/release/version/fmodapi42204linux.tar.gz;
-      sha256 = "64eedc5b37c597eb925de446106d75cab0b5a79697d5ec048d34702812c08563";
-    } else if stdenv.system == "x86_64-linux" then
-    fetchurl {
-      url = http://www.fmod.org/index.php/release/version/fmodapi42204linux64.tar.gz;
-      sha256 = "3f2eec8265838a1005febe07c4971660e85010e4622911890642dc438746edf3";
-    } else throw "unsupported platform ${stdenv.system} (only i686-linux and x86_64 linux supported yet)";
+assert (stdenv.system == "x86_64-linux") || (stdenv.system == "i686-linux");
+let
+  bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
+in
+stdenv.mkDerivation rec {
+  name    = "fmod-${version}";
+  version = "4.44.32";
 
-  preInstall = ''
-    sed -e /ldconfig/d -i Makefile
-    sed -e s@/usr/local@$out@ -i Makefile
-    sed -e s@/include/fmodex@/include@ -i Makefile
-    mkdir -p $out/lib
-    mkdir -p $out/include
+  src = fetchurl {
+    url = "http://www.fmod.org/download/fmodex/api/Linux/fmodapi44432linux.tar.gz";
+    sha256 = "071m2snzz5vc5ca7dvsf6w31nrgk5k9xb6mp7yzqdj4bkjad2hyd";
+  };
+
+  buildPhase = "true";
+  installPhase = ''
+    mkdir -p $out/lib $out/include/fmodex
+
+    cd api/inc && cp * $out/include/fmodex && cd ../lib
+    cp libfmodex${bits}-${version}.so  $out/lib/libfmodex.so
+    cp libfmodexL${bits}-${version}.so $out/lib/libfmodexL.so
   '';
 
   meta = {
-    homepage = http://www.fmod.org/;
     description = "Programming library and toolkit for the creation and playback of interactive audio";
-    license = "unfree";
+    homepage    = "http://www.fmod.org/";
+    license     = stdenv.lib.licenses.unfreeRedistributable;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
   };
 }