summaryrefslogtreecommitdiffstats
path: root/devel/py-game/files/patch-aa
blob: 42477ad761a1face878015724c7ac03da23fbb2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

$FreeBSD$

--- config_unix.py.orig	Sat Jan  6 19:18:37 2001
+++ config_unix.py	Tue Feb 20 14:26:38 2001
@@ -4,8 +4,12 @@
 import os, sys, shutil
 from glob import glob
 
-configcommand = 'sdl-config --version --cflags --libs'
+try: configcommand = os.environ['SDL_CONFIG']
+except KeyError: configcommand = 'sdl-config'
+configcommand = configcommand + ' --version --cflags --libs'
 
+try: localbase = os.environ['LOCALBASE']
+except KeyError: localbase = ''
 
 class Dependency:
     def __init__(self, name, checkhead, checklib, lib):
@@ -29,7 +33,7 @@
 
 
 DEPS = [
-    Dependency('SDL', 'SDL.h', 'libSDL.so', 'SDL'),
+    Dependency('SDL', 'SDL.h', 'libSDL-1.1.so', 'SDL-1.1'),
     Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', 'SDL_ttf'),
     Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', 'SDL_image'),
     Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', 'SDL_mixer'),
@@ -57,12 +61,16 @@
 flags have been used, which will likely require a little editing."""
 
     print 'Hunting dependencies...'
-    incdir = libdir = ''
-    for arg in configinfo.split():
-        if arg.startswith('-I'):
-            incdir = arg[2:]
-        elif arg.startswith('-L'):
-            libdir = arg[2:]
+    if localbase != '':
+        incdir = localbase + '/include/SDL11'
+        libdir = localbase + '/lib'
+    else:
+        incdir = libdir = ''
+        for arg in configinfo.split():
+            if arg.startswith('-I'):
+                incdir = arg[2:]
+            elif arg.startswith('-L'):
+                libdir = arg[2:]
     #print 'INCDIR', incdir
     #print 'LIBDIR', libdir
     for d in DEPS:
OpenPOWER on IntegriCloud