Author: viric
Date: Mon Mar 28 16:08:17 2011
New Revision: 26574
URL: https://svn.nixos.org/websvn/nix/?rev=26574&sc=1

Log:
Making SDL_gfx and SDL_image find the SDL headers, by a postInstall patch.
They expected to sit in the same directory as the SDL headers.

Modified:
   nixpkgs/trunk/pkgs/development/libraries/SDL_gfx/default.nix
   nixpkgs/trunk/pkgs/development/libraries/SDL_image/default.nix

Modified: nixpkgs/trunk/pkgs/development/libraries/SDL_gfx/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/SDL_gfx/default.nix        Mon Mar 
28 15:47:50 2011        (r26573)
+++ nixpkgs/trunk/pkgs/development/libraries/SDL_gfx/default.nix        Mon Mar 
28 16:08:17 2011        (r26574)
@@ -12,7 +12,12 @@
 
   configureFlags = "--disable-mmx";
 
-  postInstall = "ln -s $out/include/SDL/*.h $out/include/";
+  postInstall = ''
+    sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \
+      $out/include/SDL/*.h
+    
+    ln -s $out/include/SDL/*.h $out/include/;
+  '';
 
   meta = {
     description = "SDL graphics drawing primitives and support functions";

Modified: nixpkgs/trunk/pkgs/development/libraries/SDL_image/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/libraries/SDL_image/default.nix      Mon Mar 
28 15:47:50 2011        (r26573)
+++ nixpkgs/trunk/pkgs/development/libraries/SDL_image/default.nix      Mon Mar 
28 16:08:17 2011        (r26574)
@@ -13,7 +13,15 @@
 
   buildInputs = [SDL libpng libjpeg libtiff libungif libXpm];
 
-  postInstall = "ln -sv $out/include/SDL/SDL_image.h $out/include/";
+  postInstall = ''
+    sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \
+    -e 's,"SDL_version.h",<SDL/SDL_version.h>,' \
+    -e 's,"begin_code.h",<SDL/begin_code.h>,' \
+    -e 's,"close_code.h",<SDL/close_code.h>,' \
+      $out/include/SDL/SDL_image.h
+
+    ln -sv $out/include/SDL/SDL_image.h $out/include/
+  '';
 
   meta = {
     description = "SDL image library";
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to