The attached patch for the python.spec file from CURRENT allows it to build
on OS X/Darwin, Panther release.  It shouldn't have any effect on
non-darwin systems.

The configure file is modified to remove a couple of options which gcc
doesn't like.  The ``-no-cpp-precomp'' is ignored with a warning, but the
``-Wno-long-double'' causes fatal errors (using gcc-3.4.3-20050125).

I added two options to the ./configure command, ``--disable-framework'',
and ``--disable-toolbox-glue'', to disable the fancy Apple GUI stuff which
I don't understand well enough to make work.

These changes shouldn't affect builds on non-darwin systems.

BTW:  I've got some notes on my experiences with OpenPKG on OS\ X:

        http://www.libertysoft.org/openpkg/osx/

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``If the future navigation system [for interactive networked services on
the NII] looks like something from Microsoft, it will never work.''
(Chairman of Walt Disney Television & Telecommunications)
--- /tmp/python.spec    Wed Feb 23 15:10:06 2005
+++ python.spec Tue Feb 22 16:11:19 2005
@@ -34,7 +34,7 @@
 Group:        Language
 License:      GPL
 Version:      2.4
-Release:      20050213
+Release:      20050222
 
 #   list of sources
 Source0:      
ftp://ftp.python.org/pub/python/%{version}/Python-%{version}.tar.bz2
@@ -70,10 +70,16 @@
 %prep
     %setup -q -n Python-%{version}
     %patch -p0
+
+       # The OpenPKG gcc on darwin doesn't like no-cpp-precomp or
+       # -Wno-long-double.
+
     %{l_shtool} subst \
         -e 's;-O3;-O2;g' \
         -e 's;\(SunOS.*case \)\$CC\( in\);\1gcc\2;' \
+               -e 's;-Wno-long-double -no-cpp-precomp ;;' \
         configure
+
     %{l_shtool} subst \
         -e 's;add_dir_to_list(self\.compiler\.library_dirs, 
./usr/local/lib.);;' \
         -e 's;add_dir_to_list(self\.compiler\.include_dirs, 
./usr/local/include.);;' \
@@ -105,7 +111,10 @@
     CFLAGS="%{l_cflags -O}" \
     CXXFLAGS="%{l_cxxflags -O}" \
     ./configure \
-        --prefix=%{l_prefix}
+        --prefix=%{l_prefix} \
+               --disable-framework \
+               --disable-toolbox-glue
+
     %{l_make} %{l_mflags}
 
 %install

Reply via email to