about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pygame
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-10-06 22:07:53 +0000
committerLudovic Courtès <ludo@gnu.org>2008-10-06 22:07:53 +0000
commitc82c0b17f18c468d8517f2dac47b92640d56f089 (patch)
tree8614d4fa04fda1da39feec5a6d698d13c864e315 /pkgs/development/python-modules/pygame
parentd77f3177fe70f2f50d41f251853472971c78e0b5 (diff)
downloadnixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.tar
nixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.tar.gz
nixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.tar.bz2
nixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.tar.lz
nixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.tar.xz
nixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.tar.zst
nixlib-c82c0b17f18c468d8517f2dac47b92640d56f089.zip
PyGame: Use Numeric.
svn path=/nixpkgs/trunk/; revision=12976
Diffstat (limited to 'pkgs/development/python-modules/pygame')
-rw-r--r--pkgs/development/python-modules/pygame/default.nix34
1 files changed, 24 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/pygame/default.nix b/pkgs/development/python-modules/pygame/default.nix
index cad9b17ebad2..85f93506c506 100644
--- a/pkgs/development/python-modules/pygame/default.nix
+++ b/pkgs/development/python-modules/pygame/default.nix
@@ -1,4 +1,5 @@
-args: with args;
+{ fetchurl, stdenv, python, pkgconfig, SDL, SDL_image, SDL_ttf, numeric }:
+
 stdenv.mkDerivation {
   name = "pygame-1.7";
 
@@ -7,16 +8,29 @@ stdenv.mkDerivation {
     sha256 = "0hl0rmgjcqj217fibwyilz7w9jpg0kh7hsa7vyzd4cgqyliskpqi";
   };
 
-  buildInputs = [python pkgconfig SDL SDL_image SDL_ttf];
+  buildInputs = [python pkgconfig SDL SDL_image SDL_ttf numeric];
  
-  configurePhase =
-	 "
-	export LOCALBASE=///
-	sed -e \"/origincdirs =/a'${SDL_image}/include/SDL','${SDL_image}/include',\" -i config_unix.py
-	sed -e \"/origlibdirs =/aoriglibdirs += '${SDL_image}/lib',\" -i config_unix.py
-	sed -e \"/origincdirs =/a'${SDL_ttf}/include/SDL','${SDL_ttf}/include',\" -i config_unix.py
-	sed -e \"/origlibdirs =/aoriglibdirs += '${SDL_ttf}/lib',\" -i config_unix.py
-	yes Y | python config.py ";
+  configurePhase = ''
+    export LOCALBASE=///
+    sed -e "/origincdirs =/a'${SDL_image}/include/SDL','${SDL_image}/include'," -i config_unix.py
+    sed -e "/origlibdirs =/aoriglibdirs += '${SDL_image}/lib'," -i config_unix.py
+    sed -e "/origincdirs =/a'${SDL_ttf}/include/SDL','${SDL_ttf}/include'," -i config_unix.py
+    sed -e "/origlibdirs =/aoriglibdirs += '${SDL_ttf}/lib'," -i config_unix.py
+    sed -e "/origincdirs =/a'${numeric}/include/python2.5'," -i config_unix.py
+
+    sed -e "s|get_python_inc(0)|\"${numeric}/include/python2.5\"|g" -i config_unix.py
+
+    # XXX: `Numeric.pth' should be found by Python but it's not, hence the
+    # $PYTHONPATH setting below.  Gobolinux has the same problem:
+    # http://bugs.python.org/issue1431 .
+    yes Y | \
+      PYTHONPATH="${numeric}/lib/python2.5/site-packages/Numeric:$PYTHONPATH" \
+      python config.py
+
+    # That `config.py' is really deeply broken.
+    sed -i Setup \
+        -e "s|^NUMERIC *=.*$|NUMERIC = -I${numeric}/include/python2.5|g"
+  '';
 
   buildPhase = "yes Y | python setup.py build";