Update of /cvsroot/fink/dists/10.4-transitional/unstable/main/finkinfo/games
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23814

Added Files:
        pygame-py.info pygame-py.patch 
Log Message:
new package from tracker 1251580

--- NEW FILE: pygame-py.patch ---
diff -u -ruN pygame-cvs-20050803.orig/config_darwin.py 
pygame-cvs-20050803/config_darwin.py
--- pygame-cvs-20050803.orig/config_darwin.py   2005-08-04 17:34:37.000000000 
-0700
+++ pygame-cvs-20050803/config_darwin.py        2005-08-04 17:37:12.000000000 
-0700
@@ -3,6 +3,12 @@
 import os, sys, string
 from glob import glob
 from distutils.sysconfig import get_python_inc
+localbase = os.environ.get('LOCALBASE', '')
+
+#these get prefixes with '/usr' and '/usr/local' or the $LOCALBASE
+origincdirs = ['/include', '/include/SDL', '/include/SDL11',
+               '/include/smpeg' ]
+origlibdirs = ['/lib']
 
 class Dependency:
     libext = '.dylib'
@@ -72,22 +78,26 @@
             except ImportError:
                 self.found = 0
         if self.found and self.header:
-            fullpath = os.path.join(get_python_inc(0), self.header)
+            if localbase:
+                basepath = get_python_inc(0,prefix=localbase)
+            else:
+                basepath = get_python_inc(0)
+            fullpath = os.path.join(basepath, self.header)
             if not os.path.isfile(fullpath):
                 found = 0
             else:
-                self.inc_dir = os.path.split(fullpath)[0]
+                self.inc_dir = basepath
         if self.found:
             print self.name + '        '[len(self.name):] + ': found', self.ver
         else:
             print self.name + '        '[len(self.name):] + ': not found'
 
 DEPS = [
-    FrameworkDependency('SDL', 'SDL.h', 'libSDL', 'SDL'),
-    FrameworkDependency('FONT', 'SDL_ttf.h', 'libSDL_ttf', 'SDL_ttf'),
-    FrameworkDependency('IMAGE', 'SDL_image.h', 'libSDL_image', 'SDL_image'),
-    FrameworkDependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer', 'SDL_mixer'),
-    FrameworkDependency('SMPEG', 'smpeg.h', 'libsmpeg', 'smpeg'),
+    Dependency('SDL', 'SDL.h', 'libSDL', 'SDL'),
+    Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf', 'SDL_ttf'),
+    Dependency('IMAGE', 'SDL_image.h', 'libSDL_image', 'SDL_image'),
+    Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer', 'SDL_mixer'),
+    Dependency('SMPEG', 'smpeg.h', 'libsmpeg', 'smpeg'),
     DependencyPython('NUMERIC', 'Numeric', 'Numeric/arrayobject.h')
 ]
 
@@ -97,11 +107,25 @@
     global DEPS
 
     print 'Hunting dependencies...'
-    incdirs = []
-    libdirs = []
+    if localbase:
+        incdirs = [localbase+d for d in origincdirs]
+        libdirs = [localbase+d for d in origlibdirs]
+    else:
+        incdirs = []
+        libdirs = []
+    incdirs += ["/usr"+d for d in origincdirs]
+    libdirs += ["/usr"+d for d in origlibdirs]
+    incdirs += ["/usr/local"+d for d in origincdirs]
+    libdirs += ["/usr/local"+d for d in origlibdirs]
+    for arg in string.split(DEPS[0].cflags):
+        if arg[:2] == '-I':
+            incdirs.append(arg[2:])
+        elif arg[:2] == '-L':
+            libdirs.append(arg[2:])
     newconfig = []
     for d in DEPS:
       d.configure(incdirs, libdirs)
+
     DEPS[0].cflags = '-Ddarwin '+ DEPS[0].cflags
     try:
         import objc

--- NEW FILE: pygame-py.info ---
Info2: <<
Package: pygame-py%type_pkg[python]
Version: 1.7.1pre-cvs20050805
Revision: 1
Type: python (2.3 2.4)
BuildDepends: sdl (>= 1.2.4), sdl-image (>= 1.2.3), sdl-mixer (>= 1.2.5), 
sdl-ttf (>= 2.0.6), smpeg (>= 0.4.4)
Depends: python%type_pkg[python], sdl-shlibs (>= 1.2.4), sdl-image-shlibs (>= 
1.2.3), sdl-mixer-shlibs (>= 1.2.5), sdl-ttf-shlibs (>= 2.0.6), smpeg-shlibs 
(>= 0.4.4), pil-py%type_pkg[python] (>= 1.1.4), pyobjc-py%type_pkg[python] (>= 
1.3.0), numeric-py%type_pkg[python] (>= 23.8)
Maintainer: Ben Willmore <[EMAIL PROTECTED]>
Source: mirror:sourceforge:fink/pygame-cvs20050805.tgz
HomePage: http://www.pygame.org
License: LGPL
Description: Python modules for writing games
Source-MD5: 87dd2c391a59d023d79d9a10196d9408
Patch: %{ni}.patch
CompileScript: <<
 LOCALBASE=%p %p/bin/python%type_raw[python] config.py
 %p/bin/python%type_raw[python] setup.py build
<<
InstallScript: <<
 %p/bin/python%type_raw[python] setup.py install --root=%d
 install -d %i/share/doc/%n
 find docs -name CVS | xargs rm -rf
 cp -R docs/* %i/share/doc/%n/
<<
<<



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to