--- Python-2.3/Lib/distutils/util.py.orig Thu Feb 20 06:07:01 2003 +++ Python-2.3/Lib/distutils/util.py Thu Feb 20 06:07:37 2003 @@ -39,6 +39,12 @@ # Try to distinguish various flavours of Unix (osname, host, release, version, machine) = os.uname() + + # On MacOS X, remove space from machine name + + if machine == "Power Macintosh": + machine = "PowerMacintosh" + # Convert the OS name to lowercase, remove '/' characters # (to accommodate BSD/OS), and translate spaces (for "Power Macintosh") --- Python-2.3/Makefile.pre.in.orig Thu Feb 20 06:07:50 2003 +++ Python-2.3/Makefile.pre.in Thu Feb 20 06:08:33 2003 @@ -56,7 +56,7 @@ OPT= @OPT@ BASECFLAGS= @BASECFLAGS@ CFLAGS= $(BASECFLAGS) $(OPT) -CPPFLAGS= -I. -I$(srcdir)/Include +CPPFLAGS= -I. -I$(srcdir)/Include -I@PREFIX@/include LDFLAGS= @LDFLAGS@ LDLAST= @LDLAST@ SGI_ABI= @SGI_ABI@ --- Python-2.3/Misc/setuid-prog.c.orig Thu Feb 20 06:08:53 2003 +++ Python-2.3/Misc/setuid-prog.c Thu Feb 20 06:09:50 2003 @@ -70,6 +70,12 @@ #define environ _environ #endif +#if defined(__APPLE__) +# include +# include +# define environ (*_NSGetEnviron()) +#endif /* __APPLE__ */ + /* don't change def_IFS */ char def_IFS[] = "IFS= \t\n"; /* you may want to change def_PATH, but you should really change it in */ --- Python-2.3/Modules/posixmodule.c.orig Thu Feb 20 06:10:18 2003 +++ Python-2.3/Modules/posixmodule.c Thu Feb 20 06:10:39 2003 @@ -325,7 +325,7 @@ #endif /* Return a dictionary corresponding to the POSIX environment table */ -#ifdef WITH_NEXT_FRAMEWORK +#ifdef __APPLE__ /* On Darwin/MacOSX a shared library or framework has no access to ** environ directly, we must obtain it with _NSGetEnviron(). */ @@ -535,7 +535,7 @@ d = PyDict_New(); if (d == NULL) return NULL; -#ifdef WITH_NEXT_FRAMEWORK +#ifdef __APPLE__ if (environ == NULL) environ = *_NSGetEnviron(); #endif --- Python-2.3/setup.py.orig Thu Feb 20 06:11:12 2003 +++ Python-2.3/setup.py Thu Feb 20 06:12:47 2003 @@ -244,11 +244,11 @@ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - # fink installs lots of goodies in /sw/... - make sure we + # fink installs lots of goodies in @PREFIX@/... - make sure we # check there if sys.platform == "darwin": - add_dir_to_list(self.compiler.library_dirs, '/sw/lib') - add_dir_to_list(self.compiler.include_dirs, '/sw/include') + add_dir_to_list(self.compiler.library_dirs, '@PREFIX@/lib') + add_dir_to_list(self.compiler.include_dirs, '@PREFIX@/include') if os.path.normpath(sys.prefix) != '/usr': add_dir_to_list(self.compiler.library_dirs, @@ -449,7 +449,7 @@ ['/usr/local/ssl/lib', '/usr/contrib/ssl/lib/' ] ) - + ssl_incs = None if (ssl_incs is not None and ssl_libs is not None): exts.append( Extension('_ssl', ['_ssl.c'], @@ -495,7 +495,7 @@ '/usr/local/BerkeleyDB.4.0/include', '/usr/local/include/db4', '/opt/sfw/include/db4', - '/sw/include/db4', + '@PREFIX@/include/db4', '/usr/include/db4', )}, 'db3': {'libs': ('db-3.3', 'db-3.2', 'db-3.1', 'db3',), @@ -497,14 +497,14 @@ '/usr/local/BerkeleyDB.3.1/lib', '/usr/local/lib', '/opt/sfw/lib', - '/sw/lib', + '@PREFIX@/lib', ), 'incdirs': ('/usr/local/BerkeleyDB.3.3/include', '/usr/local/BerkeleyDB.3.2/include', '/usr/local/BerkeleyDB.3.1/include', '/usr/local/include/db3', '/opt/sfw/include/db3', - '/sw/include/db3', + '@PREFIX@/include/db3', '/usr/include/db3', )}, } @@ -930,9 +930,9 @@ # AquaTk is a separate method. Only one Tkinter will be built on # Darwin - either AquaTk, if it is found, or X11 based Tk. platform = self.get_platform() - if platform == 'darwin' and \ - self.detect_tkinter_darwin(inc_dirs, lib_dirs): - return +# if platform == 'darwin' and \ +# self.detect_tkinter_darwin(inc_dirs, lib_dirs): +# return # Assume we haven't found any of the libraries or include files # The versions with dots are used on Unix, and the versions without --- Python-2.3/configure.orig Thu Feb 20 06:13:05 2003 +++ Python-2.3/configure Thu Feb 20 06:13:59 2003 @@ -3695,7 +3695,7 @@ ;; # is there any other compiler on Darwin besides gcc? Darwin*) - BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd" + BASECFLAGS="$BASECFLAGS -fno-common -Wno-long-double -no-cpp-precomp -mno-fused-madd" ;; esac ;; @@ -9627,7 +9627,7 @@ LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' else # No framework. Ignore undefined symbols, assuming they come from Python - LDSHARED="$LDSHARED -undefined suppress" + LDSHARED="$LDSHARED -flat_namespace -undefined suppress" fi ;; Darwin/*) LDSHARED='$(CC) $(LDFLAGS) -bundle' @@ -9636,8 +9636,8 @@ LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)' else # No framework, use the Python app as bundle-loader - BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' - LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' + BLDSHARED="$LDSHARED -flat_namespace -undefined suppress" + LDSHARED="$LDSHARED -flat_namespace -undefined suppress" fi ;; Linux*|GNU*) LDSHARED='$(CC) -shared';; dgux*) LDSHARED="ld -G";;