From 4bfce3b6e2ea095ea3d9f5d2d1018cc0a1e5ce09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C3=BChling?= Date: Sat, 18 Sep 2010 20:47:21 +0200 Subject: Major overhaul and cleanup. Support for .ubi image file installations. Only compile&install a minimum host Gforth for bootstrapping the target Gforth, removing strange emacs-dependencies that cropped up earlier. Image file can now be built on the nanonote using 'gforth-update-image' command. Also, Gforth is now run through a wrapper that calls 'gforth-update-image' automatically, if necessary. Also first attempts at supporting libcc C-interface libraries pre-compiled on the host. Tested to compile on amd64 and i386. --- pygame/patches/010-fix-paths.patch | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 pygame/patches/010-fix-paths.patch (limited to 'pygame/patches/010-fix-paths.patch') diff --git a/pygame/patches/010-fix-paths.patch b/pygame/patches/010-fix-paths.patch new file mode 100644 index 0000000..ac1bc49 --- /dev/null +++ b/pygame/patches/010-fix-paths.patch @@ -0,0 +1,106 @@ +diff --git a/config_unix.py b/config_unix.py +index 1cece2a..0fec7e0 100644 +--- a/config_unix.py ++++ b/config_unix.py +@@ -69,6 +69,39 @@ class DependencyProg: + else: + print (self.name + ' '[len(self.name):] + ': not found') + ++class DependencyPkgConfig: ++ def __init__(self, name, lib): ++ self.name = name ++ self.lib_dir = '' ++ self.inc_dir = '' ++ self.libs = [] ++ self.cflags = '' ++ command = os.environ.get('PKG_CONFIG', 'pkg-config') ++ try: ++ version = os.popen('%s %s --modversion 2> /dev/null' % (command, lib)).readline() ++ if not version.strip(): ++ self.found = 0 ++ return ++ ++ cflags = os.popen('%s %s --cflags 2> /dev/null' % (command, lib)).readline().strip() ++ libs = os.popen('%s %s --libs 2> /dev/null' % (command, lib)).readline().strip() ++ ++ self.ver = version ++ self.found = 1 ++ ++ self.cflags = '%s %s' % (cflags, libs) ++ except Exception, e: ++ print e ++ print ('WARNING: "pkg-config" failed!') ++ self.found = 0 ++ self.ver = '0' ++ ++ def configure(self, incdirs, libdir): ++ if self.found: ++ print (self.name + ' '[len(self.name):] + ': found ' + self.ver) ++ else: ++ print (self.name + ' '[len(self.name):] + ': not found') ++ + class Dependency: + def __init__(self, name, checkhead, checklib, libs): + self.name = name +@@ -137,18 +170,22 @@ sdl_lib_name = 'SDL' + def main(): + print ('\nHunting dependencies...') + DEPS = [ +- DependencyProg('SDL', 'SDL_CONFIG', 'sdl-config', '1.2', ['sdl']), ++ DependencyPkgConfig('SDL', 'sdl'), + Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', ['SDL_ttf']), +- Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', ['SDL_image']), ++ DependencyPkgConfig('IMAGE', 'SDL_image'), + Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', ['SDL_mixer']), + DependencyProg('SMPEG', 'SMPEG_CONFIG', 'smpeg-config', '0.4.3', ['smpeg']), +- Dependency('PNG', 'png.h', 'libpng', ['png']), ++ DependencyPkgConfig('PNG', 'libpng'), + Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']), +- Dependency('SCRAP', '', 'libX11', ['X11']), + Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']), + Dependency('PORTTIME', 'porttime.h', 'libporttime.so', ['porttime']), + #Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']), + ] ++ if not os.environ.get('NO_SCRAP', None): ++ DEPS += Dependency('SCRAP', '', 'libX11', ['X11']), ++ else: ++ DEPS += Dependency('SCRAP', '', '', []), ++ + if not DEPS[0].found: + print ('Unable to run "sdl-config". Please make sure a development version of SDL is installed.') + raise SystemExit +@@ -159,10 +186,10 @@ def main(): + 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] ++# 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 DEPS[0].cflags.split(): + if arg[:2] == '-I': + + +--- a/config_unix.py ++++ b/config_unix.py +@@ -182,15 +209,6 @@ def main(): + for d in DEPS: + d.configure(incdirs, libdirs) + +- for d in DEPS[1:]: +- if not d.found: +- if not confirm(""" +-Warning, some of the pygame dependencies were not found. Pygame can still +-compile and install, but games that depend on those missing dependencies +-will not run. Would you like to continue the configuration?"""): +- raise SystemExit +- break +- + return DEPS + + if __name__ == '__main__': -- cgit v1.2.3