Update of /cvsroot/fink/dists/10.4/stable/main/finkinfo/languages
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv13460

Added Files:
        python31-10.6.info python31-10.6.patch python31.info 
        python31.patch 
Log Message:
Move to stable.


--- NEW FILE: python31-10.6.info ---
Info2: <<
Package: python%type_pkg[python]
Version: 3.1.2
Revision: 102
Distribution: 10.6
Type: python 3.1
Maintainer: Daniel Johnson <[email protected]>
Depends: <<
        %N-shlibs (= %v-%r),
        blt-shlibs,
        bzip2-shlibs,
        gdbm3-shlibs,
        libgettext8-shlibs,
        libncursesw5-shlibs,
        readline5-shlibs,
        sqlite3-shlibs  (>= 3.2.8-1001),
        tcltk (>= 8.4.1-1),
        x11
<<
BuildConflicts: libquicktime0
BuildDepends: <<
        blt-dev (>= 2.4z-15),
        bzip2-dev,
        fink (>= 0.24.12-1), 
        gdbm3,
        gettext-bin,
        gettext-tools,
        libgettext8-dev,
        libncursesw5,
        readline5,
        sqlite3-dev (>= 3.2.8-1001),
        system-openssl-dev,
        tcltk-dev (>= 8.4.1-1),
        x11-dev
<<
Source: http://python.org/ftp/python/%v/Python-%v.tar.bz2
Source-MD5: 45350b51b58a46b029fb06c61257e350
Source2: http://www.python.org/ftp/python/doc/%v/python-%v-docs-html.tar.bz2
Source2-MD5: c9ccf8e9fc4d046c168af313706f159b
PatchFile: %n-10.6.patch
PatchFile-MD5: e3c50dcbb1970477b9a74bd82717f35c
PatchScript: sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --enable-shared
#GCC: 4.0
CompileScript: <<
#!/bin/sh -ex
        if [ "%m" = "x86_64" ]; then
                #perl -pi.bak -e 's|num_missing != 2:|num_missing != 2:|g' 
./setup.py
                # Architecture:x86_64 has tcltk-8.5.x, other arch have 8.4.x
        perl -pi.bak -e "s/8.4\'/8.5\'/" ./setup.py
        fi
        %{default_script}
<<
InfoTest: TestScript: ./runtests.sh || exit 2
InstallScript: <<
#!/bin/sh -ex
        make install DESTDIR=%d

        # don't propagate our hackery
        perl -pi -e 's|-L%p/lib/system-openssl/lib||' 
%i/lib/python%type_raw[python]/config/Makefile

        # fix all main things to be python-versioned filenames with
        # unversioned symlinks to them
        pushd %i/bin
                for f in 2to3 idle3 pydoc3; do
                        mv ${f} ${f}-%type_raw[python]
                        ln -s ${f}-%type_raw[python] %i/bin/${f}
                done
                #Remove this for now to avoid conflicting with 'python' package.
                rm 2to3
        popd
        
        ln -s python%type_raw[python].1 %i/share/man/man1/python3.1

        # install some docs and other useful tidbits
        rm -rf Misc/RPM
        /bin/cp -R Misc Tools %i/lib/python%type_raw[python]
        mkdir -p %i/share/doc/%n
        /bin/cp -R Demo Doc %i/share/doc/%n
        mkdir -p %i/share/doc/%n/html
        /bin/cp -R ../python-%v-docs-html/ %i/share/doc/%n/html
<<
SplitOff: <<
 Package: %N-shlibs
 Depends: libgettext8-shlibs
 Files: lib/python%type_raw[python]/config/libpython%type_raw[python].dylib
 Shlibs: %p/lib/python3.1/config/libpython3.1.dylib 3.1.0 %n (>= 3.1-1)
 DocFiles: README LICENSE 
<<
SplitOff2: <<
 Package: python3
 Depends: %N (>= %v-%r)
 Files: <<
                bin/idle3
                bin/pydoc3
                bin/python3
                bin/python3-config
                lib/pkgconfig/python3.pc
                share/man/man1/python3.1
        <<
 DocFiles: README LICENSE
 Description: Generic "python3" command that invokes python%type_pkg[python]
<<
DocFiles: README LICENSE 
Description: Interpreted, object-oriented language
DescDetail: <<
 Python is often compared to Tcl, Perl, Scheme or Java. 
 This package installs unix python - not the OSX Framework version.
 Builds a two-level namespace dynamic libpython (needed for koffice).

 The interpretter is installed as "python%type_raw[python]", and all associated
 commands are similarly named with the python-version in them. To get
 the simple "python3" command, install the fink package "python3" (note:
 the "python3" command there is not guaranteed to be python%type_raw[python]!).
<<
DescUsage: <<
        python%type_raw[python] changes the compiler options used to compile
        third-party python modules. Please do not add %type_raw[python] variants
        to them without actually testing that they build cleanly.
<<

DescPackaging: <<
        Patch a lot of things to impliment shared-lib support for
        non-Framework build on Darwin.

        Static libpython is installed in lib/pythonX.X/config/ but
        shared goes in %p/lib by default. Fink's packaging has always
        placed manually-built shared lib in config/ along side static,
        This gives consistency regardless of -search_paths_first.
        Continue this practice so that -pyXX varianted packages don't
        need special-casing for certain variants.

        Make sure all compiled modules link against libpython%type_raw[python] 
(and
        propagate this to third-party compiled modules) to ensure that
        all symbols resolved at compile-time to avoid packager
        mistakes and user runtime surprises.

        Should use --with-pth (fink's pth package)?

        Play lots of games to make sure we get expected support
        libraries. Also make sure -L/sw/lib/system-openssl is passed
        before -L/sw (build system seems to confuse standard meanings
        and uses of CFLAGS vs CPPFLAGS vs LDFLAGS) but avoid
        propagating into modules that compile using distutils.

        Adjust "python3" unversioned link to be a symlink not a hard link.

        Shared lib is buried next to static one instead of being in
        %p/lib because that's where it's always been in the fink
        package series. Why would they be in different places? Patch
        -config script to continue this tradition (bug in previous
        versions accidentally did the Right Thing here).
<<
DescPort: <<
        libpython needs to link to CF because that lib has the parent
        thread that load modules that need to have CF available. See:
        http://bugs.python.org/issue7085

        Import apple's patch to fix 10.6 getgroups implementaion.
        
http://www.opensource.apple.com/source/python/python-44/2.6/fix/posixmodule.c.ed
        Not broken on 10.[45] so not bothering to see if can be
        backported to give unified %n pkg.
        
        bsddb is gone so drop db* patch and dep.
        Patch setup.py to find ncursesw headers and drop libncurses5 dep.
        Ensure $(LDFLAGS) is used linking libpython or else it can't find 
libintl.
<<
License: OSI-Approved
Homepage: http://www.python.org
<<

--- NEW FILE: python31.info ---
Info2: <<
Package: python%type_pkg[python]
Version: 3.1.2
Revision: 2
Distribution: 10.4, 10.5
Type: python 3.1
Maintainer: Daniel Johnson <[email protected]>
Depends: <<
        %N-shlibs (= %v-%r),
        blt-shlibs,
        bzip2-shlibs,
        gdbm3-shlibs,
        libgettext8-shlibs,
        libncursesw5-shlibs,
        readline5-shlibs,
        sqlite3-shlibs  (>= 3.2.8-1001),
        tcltk (>= 8.4.1-1),
        x11
<<
BuildConflicts: libquicktime0
BuildDepends: <<
        blt-dev (>= 2.4z-15),
        bzip2-dev,
        fink (>= 0.24.12-1), 
        gdbm3,
        gettext-bin,
        gettext-tools,
        libgettext8-dev,
        libncursesw5,
        readline5,
        sqlite3-dev (>= 3.2.8-1001),
        system-openssl-dev,
        tcltk-dev (>= 8.4.1-1),
        x11-dev
<<
Source: http://python.org/ftp/python/%v/Python-%v.tar.bz2
Source-MD5: 45350b51b58a46b029fb06c61257e350
Source2: http://www.python.org/ftp/python/doc/%v/python-%v-docs-html.tar.bz2
Source2-MD5: c9ccf8e9fc4d046c168af313706f159b
PatchFile: %n.patch
PatchFile-MD5: 41b8c7b49f7a9d8e889e234d99697e8b
PatchScript: sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --enable-shared
#GCC: 4.0
CompileScript: <<
#!/bin/sh -ex
        if [ "%m" = "x86_64" ]; then
                #perl -pi.bak -e 's|num_missing != 2:|num_missing != 2:|g' 
./setup.py
                # Architecture:x86_64 has tcltk-8.5.x, other arch have 8.4.x
        perl -pi.bak -e "s/8.4\'/8.5\'/" ./setup.py
        fi
        %{default_script}
<<
InfoTest: TestScript: ./runtests.sh || exit 2
InstallScript: <<
#!/bin/sh -ex
        make install DESTDIR=%d

        # don't propagate our hackery
        perl -pi -e 's|-L%p/lib/system-openssl/lib||' 
%i/lib/python%type_raw[python]/config/Makefile

        # fix all main things to be python-versioned filenames with
        # unversioned symlinks to them
        pushd %i/bin
                for f in 2to3 idle3 pydoc3; do
                        mv ${f} ${f}-%type_raw[python]
                        ln -s ${f}-%type_raw[python] %i/bin/${f}
                done
                #Remove this for now to avoid conflicting with 'python' package.
                rm 2to3
        popd
        
        ln -s python%type_raw[python].1 %i/share/man/man1/python3.1

        # install some docs and other useful tidbits
        rm -rf Misc/RPM
        /bin/cp -R Misc Tools %i/lib/python%type_raw[python]
        mkdir -p %i/share/doc/%n
        /bin/cp -R Demo Doc %i/share/doc/%n
        mkdir -p %i/share/doc/%n/html
        /bin/cp -R ../python-%v-docs-html/ %i/share/doc/%n/html
<<
SplitOff: <<
 Package: %N-shlibs
 Depends: libgettext8-shlibs
 Files: lib/python%type_raw[python]/config/libpython%type_raw[python].dylib
 Shlibs: %p/lib/python3.1/config/libpython3.1.dylib 3.1.0 %n (>= 3.1-1)
 DocFiles: README LICENSE 
<<
SplitOff2: <<
 Package: python3
 Depends: %N (>= %v-%r)
 Files: <<
                bin/idle3
                bin/pydoc3
                bin/python3
                bin/python3-config
                lib/pkgconfig/python3.pc
                share/man/man1/python3.1
        <<
 DocFiles: README LICENSE
 Description: Generic "python3" command that invokes python%type_pkg[python]
<<
DocFiles: README LICENSE 
Description: Interpreted, object-oriented language
DescDetail: <<
 Python is often compared to Tcl, Perl, Scheme or Java. 
 This package installs unix python - not the OSX Framework version.
 Builds a two-level namespace dynamic libpython (needed for koffice).

 The interpretter is installed as "python%type_raw[python]", and all associated
 commands are similarly named with the python-version in them. To get
 the simple "python3" command, install the fink package "python3" (note:
 the "python3" command there is not guaranteed to be python%type_raw[python]!).
<<
DescUsage: <<
        python%type_raw[python] changes the compiler options used to compile
        third-party python modules. Please do not add %type_raw[python] variants
        to them without actually testing that they build cleanly.
<<

DescPackaging: <<
        Patch a lot of things to impliment shared-lib support for
        non-Framework build on Darwin.

        Static libpython is installed in lib/pythonX.X/config/ but
        shared goes in %p/lib by default. Fink's packaging has always
        placed manually-built shared lib in config/ along side static,
        This gives consistency regardless of -search_paths_first.
        Continue this practice so that -pyXX varianted packages don't
        need special-casing for certain variants.

        Make sure all compiled modules link against libpython%type_raw[python] 
(and
        propagate this to third-party compiled modules) to ensure that
        all symbols resolved at compile-time to avoid packager
        mistakes and user runtime surprises.

        Should use --with-pth (fink's pth package)?

        Play lots of games to make sure we get expected support
        libraries. Also make sure -L/sw/lib/system-openssl is passed
        before -L/sw (build system seems to confuse standard meanings
        and uses of CFLAGS vs CPPFLAGS vs LDFLAGS) but avoid
        propagating into modules that compile using distutils.

        Adjust "python3" unversioned link to be a symlink not a hard link.

        Shared lib is buried next to static one instead of being in
        %p/lib because that's where it's always been in the fink
        package series. Why would they be in different places? Patch
        -config script to continue this tradition (bug in previous
        versions accidentally did the Right Thing here).
<<
DescPort: <<
        libpython needs to link to CF because that lib has the parent
        thread that load modules that need to have CF available. See:
        http://bugs.python.org/issue7085

        bsddb is gone so drop db* patch and dep.
        Patch setup.py to find ncursesw headers and drop libncurses5 dep.
        Ensure $(LDFLAGS) is used linking libpython or else it can't find 
libintl.
<<
License: OSI-Approved
Homepage: http://www.python.org
<<

--- NEW FILE: python31.patch ---
diff -ru Python-3.1.2.orig/Makefile.pre.in Python-3.1.2/Makefile.pre.in
--- Python-3.1.2.orig/Makefile.pre.in   2010-03-18 19:01:29.000000000 -0400
+++ Python-3.1.2/Makefile.pre.in        2010-07-06 14:11:41.000000000 -0400
@@ -442,8 +442,7 @@
        fi
 
 libpython$(VERSION).dylib: $(LIBRARY_OBJS)
-        $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined 
dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib 
-Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
-                
+       $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) @LIBTOOL_CRUFT@ -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LDLAST)
 
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
        $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) 
$(LIBC) $(LIBM) $(LDLAST)
@@ -784,7 +783,7 @@
 # Install the interpreter with $(VERSION) affixed
 # This goes into $(exec_prefix)
 altbininstall: $(BUILDPYTHON)
-       @for i in $(BINDIR) $(LIBDIR); \
+       @for i in $(BINDIR) $(LIBDIR) $(LIBPL); \
        do \
                if test ! -d $(DESTDIR)$$i; then \
                        echo "Creating directory $$i"; \
@@ -797,9 +796,9 @@
                if test -n "$(DLLLIBRARY)" ; then \
                        $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
                else \
-                       $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
+                       $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBPL)/$(INSTSONAME); \
                        if test $(LDLIBRARY) != $(INSTSONAME); then \
-                               (cd $(DESTDIR)$(LIBDIR); $(LN) -sf 
$(INSTSONAME) $(LDLIBRARY)) \
+                               (cd $(DESTDIR)$(LIBPL); $(LN) -sf $(INSTSONAME) 
$(LDLIBRARY)) \
                        fi \
                fi; \
        else    true; \
@@ -810,7 +809,7 @@
        then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
        else true; \
        fi
-       (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE))
+       (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) 
$(PYTHON)3$(EXE))
        -rm -f $(DESTDIR)$(BINDIR)/python3-config
        (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config 
python3-config)
        -rm -f $(DESTDIR)$(LIBPC)/python3.pc
diff -ru Python-3.1.2.orig/Misc/python-config.in 
Python-3.1.2/Misc/python-config.in
--- Python-3.1.2.orig/Misc/python-config.in     2007-09-01 03:27:37.000000000 
-0400
+++ Python-3.1.2/Misc/python-config.in  2010-07-06 14:11:41.000000000 -0400
@@ -45,9 +45,9 @@
 elif opt in ('--libs', '--ldflags'):
     libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
     libs.append('-lpython'+pyver)
-    # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-    # shared library in prefix/lib/.
-    if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
+    # add the prefix/lib/pythonX.Y/config dir (fink keeps shared
+    # library there too)
+    if opt == '--ldflags':
         libs.insert(0, '-L' + getvar('LIBPL'))
     print(' '.join(libs))
 
diff -ru Python-3.1.2.orig/Misc/python.pc.in Python-3.1.2/Misc/python.pc.in
--- Python-3.1.2.orig/Misc/python.pc.in 2009-05-24 16:39:11.000000000 -0400
+++ Python-3.1.2/Misc/python.pc.in      2010-07-06 14:12:06.000000000 -0400
@@ -1,6 +1,6 @@
 pref...@prefix@
 exec_pref...@exec_prefix@
-libd...@libdir@
+libd...@libdir@/pyt...@version@/config
 included...@includedir@
 
 Name: Python
diff -ru Python-3.1.2.orig/Modules/posixmodule.c 
Python-3.1.2/Modules/posixmodule.c
--- Python-3.1.2.orig/Modules/posixmodule.c     2010-03-01 00:56:53.000000000 
-0500
+++ Python-3.1.2/Modules/posixmodule.c  2010-07-06 14:11:41.000000000 -0400
@@ -443,7 +443,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().
 */
@@ -465,7 +465,7 @@
        d = PyDict_New();
        if (d == NULL)
                return NULL;
-#ifdef WITH_NEXT_FRAMEWORK
+#ifdef __APPLE__
        if (environ == NULL)
                environ = *_NSGetEnviron();
 #endif
diff -ru Python-3.1.2.orig/configure Python-3.1.2/configure
--- Python-3.1.2.orig/configure 2010-03-10 17:28:52.000000000 -0500
+++ Python-3.1.2/configure      2010-07-06 14:11:41.000000000 -0400
@@ -4150,7 +4150,7 @@
          ;;
     Darwin*)
        LDLIBRARY='libpython$(VERSION).dylib'
-       BLDLIBRARY='-L. -lpython$(VERSION)'
+       BLDLIBRARY="$LDLIBRARY"
        RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
        ;;
 
@@ -13405,8 +13405,8 @@
        #ARCH_RUN_32BIT="true"
     fi
 
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only 
${MACOSX_DEFAULT_ARCH}"
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(BINLIBDEST)/config/$(INSTSONAME)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) 
-current_version $(VERSION)';;
 esac
 
@@ -13546,14 +13546,6 @@
                # Use -undefined dynamic_lookup whenever possible (10.3 and 
later).
                # This allows an extension to be used in any Python
 
-               if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
-               then
-                       if test "${enable_universalsdk}"; then
-                               LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot 
${UNIVERSALSDK} ${LDFLAGS}"
-                       fi
-                       LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined 
dynamic_lookup'
-                       BLDSHARED="$LDSHARED"
-               else
                        LDSHARED='$(CC) $(LDFLAGS) -bundle'
                        if test "$enable_framework" ; then
                                # Link against the framework. All externals 
should be defined.
@@ -13561,10 +13553,9 @@
                                LDSHARED="$LDSHARED 
"'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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 "'$(BLDLIBRARY)'
+                               LDSHARED="$LDSHARED "'-L$(BINLIBDEST)/config 
-lpython$(VERSION)'
                        fi
-               fi
                ;;
        Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
        BSD/OS*/4*) LDSHARED="gcc -shared";;
@@ -25823,7 +25814,7 @@
 
 if test $ac_sys_system = Darwin
 then
-       LIBS="$LIBS -framework CoreFoundation"
+       LIBS="$LIBS -Wl,-framework,CoreFoundation"
 fi
 
 
diff -ru Python-3.1.2.orig/setup.py Python-3.1.2/setup.py
--- Python-3.1.2.orig/setup.py  2010-01-01 11:29:51.000000000 -0500
+++ Python-3.1.2/setup.py       2010-07-06 14:11:41.000000000 -0400
@@ -192,13 +192,17 @@
                                               longest, g))
 
         if missing:
+            num_missing=len(missing)
             print()
             print("Python build finished, but the necessary bits to build "
                    "these modules were not found:")
             print_three_column(missing)
             print("To find the necessary bits, look in setup.py in"
                   " detect_modules() for the module's name.")
+            print ("(Fink package build should have 2 missing)")
             print()
+            if num_missing != 2:
+                sys.exit(1)
 
         if self.failed:
             failed = self.failed[:]
@@ -206,6 +210,7 @@
             print("Failed to build these modules:")
             print_three_column(failed)
             print()
+            sys.exit(1)
 
     def build_extension(self, ext):
 
@@ -294,9 +299,8 @@
         return sys.platform
 
     def detect_modules(self):
-        # Ensure that /usr/local is always used
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+        add_dir_to_list(self.compiler.library_dirs, '@PREFIX@/lib')
+        add_dir_to_list(self.compiler.include_dirs, '@PREFIX@/include')
 
         # Add paths specified in the environment variables LDFLAGS and
         # CPPFLAGS for header and library files.
@@ -551,10 +555,9 @@
                                depends = ['socketmodule.h']) )
         # Detect SSL support for the socket module (via _ssl)
         search_for_ssl_incs_in = [
-                              '/usr/local/ssl/include',
-                              '/usr/contrib/ssl/include/'
+                              '@PREFIX@/lib/system-openssl/include'
                              ]
-        ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+        ssl_incs = find_file('openssl/ssl.h', [],
                              search_for_ssl_incs_in
                              )
         if ssl_incs is not None:
@@ -562,9 +565,8 @@
                                ['/usr/kerberos/include'])
             if krb5_h:
                 ssl_incs += krb5_h
-        ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
-                                     ['/usr/local/ssl/lib',
-                                      '/usr/contrib/ssl/lib/'
+        ssl_libs = find_library_file(self.compiler, 'ssl', [],
+                                     ['@PREFIX@/lib/system-openssl/lib'
                                      ] )
 
         if (ssl_incs is not None and
@@ -581,7 +583,7 @@
         openssl_ver = 0
         openssl_ver_re = re.compile(
             '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' )
-        for ssl_inc_dir in inc_dirs + search_for_ssl_incs_in:
+        for ssl_inc_dir in search_for_ssl_incs_in:
             name = os.path.join(ssl_inc_dir, 'openssl', 'opensslv.h')
             if os.path.isfile(name):
                 try:
@@ -804,12 +806,7 @@
         # We hunt for #define SQLITE_VERSION "n.n.n"
         # We need to find >= sqlite version 3.0.8
         sqlite_incdir = sqlite_libdir = None
-        sqlite_inc_paths = [ '/usr/include',
-                             '/usr/include/sqlite',
-                             '/usr/include/sqlite3',
-                             '/usr/local/include',
-                             '/usr/local/include/sqlite',
-                             '/usr/local/include/sqlite3',
+        sqlite_inc_paths = [ '@PREFIX@/include'
                            ]
         MIN_SQLITE_VERSION_NUMBER = (3, 0, 8)
         MIN_SQLITE_VERSION = ".".join([str(x)
@@ -818,7 +815,7 @@
         # Scan the default include directories before the SQLite specific
         # ones. This allows one to override the copy of sqlite on OSX,
         # where /usr/include contains an old version of sqlite.
-        for d in inc_dirs + sqlite_inc_paths:
+        for d in sqlite_inc_paths:
             f = os.path.join(d, "sqlite3.h")
             if os.path.exists(f):
                 if sqlite_setup_debug: print("sqlite: found %s"%f)
@@ -846,11 +843,9 @@
             sqlite_dirs_to_check = [
                 os.path.join(sqlite_incdir, '..', 'lib64'),
                 os.path.join(sqlite_incdir, '..', 'lib'),
-                os.path.join(sqlite_incdir, '..', '..', 'lib64'),
-                os.path.join(sqlite_incdir, '..', '..', 'lib'),
             ]
             sqlite_libfile = self.compiler.find_library_file(
-                                sqlite_dirs_to_check + lib_dirs, 'sqlite3')
+                                sqlite_dirs_to_check, 'sqlite3')
             if sqlite_libfile:
                 sqlite_libdir = 
[os.path.abspath(os.path.dirname(sqlite_libfile))]
 
@@ -1003,6 +998,7 @@
             # _curses_panel.so must link with panelw.
             panel_library = 'panelw'
             exts.append( Extension('_curses', ['_cursesmodule.c'],
+                                   include_dirs=["@PREFIX@/include/ncursesw"],
                                    libraries = curses_libs) )
         elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
             curses_libs = ['ncurses']
@@ -1028,6 +1024,7 @@
         if (module_enabled(exts, '_curses') and
             self.compiler.find_library_file(lib_dirs, panel_library)):
             exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+                                   include_dirs=["@PREFIX@/include/ncursesw"],
                                    libraries = [panel_library] + curses_libs) )
         else:
             missing.append('_curses_panel')
@@ -1315,16 +1312,12 @@
         # 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
 
         # Assume we haven't found any of the libraries or include files
         # The versions with dots are used on Unix, and the versions without
         # dots on Windows, for detection by cygwin.
         tcllib = tklib = tcl_includes = tk_includes = None
-        for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
-                        '82', '8.1', '81', '8.0', '80']:
+        for version in ['8.4']:
             tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
             tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
             if tklib and tcllib:

--- NEW FILE: python31-10.6.patch ---
diff -ru Python-3.1.2.orig/Makefile.pre.in Python-3.1.2/Makefile.pre.in
--- Python-3.1.2.orig/Makefile.pre.in   2010-03-18 19:01:29.000000000 -0400
+++ Python-3.1.2/Makefile.pre.in        2010-07-06 14:11:41.000000000 -0400
@@ -442,8 +442,7 @@
        fi
 
 libpython$(VERSION).dylib: $(LIBRARY_OBJS)
-        $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined 
dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib 
-Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
-                
+       $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) @LIBTOOL_CRUFT@ -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LDLAST)
 
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
        $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) 
$(LIBC) $(LIBM) $(LDLAST)
@@ -784,7 +783,7 @@
 # Install the interpreter with $(VERSION) affixed
 # This goes into $(exec_prefix)
 altbininstall: $(BUILDPYTHON)
-       @for i in $(BINDIR) $(LIBDIR); \
+       @for i in $(BINDIR) $(LIBDIR) $(LIBPL); \
        do \
                if test ! -d $(DESTDIR)$$i; then \
                        echo "Creating directory $$i"; \
@@ -797,9 +796,9 @@
                if test -n "$(DLLLIBRARY)" ; then \
                        $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
                else \
-                       $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBDIR)/$(INSTSONAME); \
+                       $(INSTALL_SHARED) $(LDLIBRARY) 
$(DESTDIR)$(LIBPL)/$(INSTSONAME); \
                        if test $(LDLIBRARY) != $(INSTSONAME); then \
-                               (cd $(DESTDIR)$(LIBDIR); $(LN) -sf 
$(INSTSONAME) $(LDLIBRARY)) \
+                               (cd $(DESTDIR)$(LIBPL); $(LN) -sf $(INSTSONAME) 
$(LDLIBRARY)) \
                        fi \
                fi; \
        else    true; \
@@ -810,7 +809,7 @@
        then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
        else true; \
        fi
-       (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE))
+       (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) 
$(PYTHON)3$(EXE))
        -rm -f $(DESTDIR)$(BINDIR)/python3-config
        (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config 
python3-config)
        -rm -f $(DESTDIR)$(LIBPC)/python3.pc
diff -ru Python-3.1.2.orig/Misc/python-config.in 
Python-3.1.2/Misc/python-config.in
--- Python-3.1.2.orig/Misc/python-config.in     2007-09-01 03:27:37.000000000 
-0400
+++ Python-3.1.2/Misc/python-config.in  2010-07-06 14:11:41.000000000 -0400
@@ -45,9 +45,9 @@
 elif opt in ('--libs', '--ldflags'):
     libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
     libs.append('-lpython'+pyver)
-    # add the prefix/lib/pythonX.Y/config dir, but only if there is no
-    # shared library in prefix/lib/.
-    if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
+    # add the prefix/lib/pythonX.Y/config dir (fink keeps shared
+    # library there too)
+    if opt == '--ldflags':
         libs.insert(0, '-L' + getvar('LIBPL'))
     print(' '.join(libs))
 
diff -ru Python-3.1.2.orig/Misc/python.pc.in Python-3.1.2/Misc/python.pc.in
--- Python-3.1.2.orig/Misc/python.pc.in 2009-05-24 16:39:11.000000000 -0400
+++ Python-3.1.2/Misc/python.pc.in      2010-07-06 14:12:06.000000000 -0400
@@ -1,6 +1,6 @@
 pref...@prefix@
 exec_pref...@exec_prefix@
-libd...@libdir@
+libd...@libdir@/pyt...@version@/config
 included...@includedir@
 
 Name: Python
diff -ru Python-3.1.2.orig/Modules/posixmodule.c 
Python-3.1.2/Modules/posixmodule.c
--- Python-3.1.2.orig/Modules/posixmodule.c     2010-03-01 00:56:53.000000000 
-0500
+++ Python-3.1.2/Modules/posixmodule.c  2010-07-06 14:11:41.000000000 -0400
@@ -443,7 +443,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().
 */
@@ -465,7 +465,7 @@
        d = PyDict_New();
        if (d == NULL)
                return NULL;
-#ifdef WITH_NEXT_FRAMEWORK
+#ifdef __APPLE__
        if (environ == NULL)
                environ = *_NSGetEnviron();
 #endif
@@ -4053,6 +4053,9 @@
 "getgroups() -> list of group IDs\n\n\
 Return list of supplemental group IDs for the process.");
 
+#include <pwd.h>
+int getgrouplist_2(const char *name, gid_t basegid, gid_t **groups);
+
 static PyObject *
 posix_getgroups(PyObject *self, PyObject *noargs)
 {
@@ -4064,13 +4067,20 @@
         /* defined to be 16 on Solaris7, so this should be a small number */
 #define MAX_GROUPS 64
 #endif
-        gid_t grouplist[MAX_GROUPS];
+        gid_t *grouplist = NULL;
+        struct passwd *pw;
         int n;
 
-        n = getgroups(MAX_GROUPS, grouplist);
-        if (n < 0)
+        if ((pw = getpwuid(getuid())) == NULL) {
+            errno = EINVAL;
             posix_error();
-        else {
+            return NULL;
+        }
+        n = getgrouplist_2(pw->pw_name, pw->pw_gid, &grouplist);
+        if (n < 0) {
+            errno = EINVAL;
+            posix_error();
+        } else {
             result = PyList_New(n);
             if (result != NULL) {
                 int i;
@@ -4086,6 +4096,7 @@
             }
         }
 
+    if (grouplist) free(grouplist);
     return result;
 }
 #endif
@@ -4459,15 +4470,15 @@
 posix_setgroups(PyObject *self, PyObject *groups)
 {
        int i, len;
-        gid_t grouplist[MAX_GROUPS];
+        gid_t *grouplist;
 
        if (!PySequence_Check(groups)) {
                PyErr_SetString(PyExc_TypeError, "setgroups argument must be a 
sequence");
                return NULL;
        }
        len = PySequence_Size(groups);
-       if (len > MAX_GROUPS) {
-               PyErr_SetString(PyExc_ValueError, "too many groups");
+       if ((grouplist = (gid_t *)malloc(len * sizeof(gid_t))) == NULL) {
+               PyErr_NoMemory();
                return NULL;
        }
        for(i = 0; i < len; i++) {
@@ -4502,6 +4513,7 @@
 
        if (setgroups(len, grouplist) < 0)
                return posix_error();
+       free(grouplist);
        Py_INCREF(Py_None);
        return Py_None;
 }
@@ -6164,6 +6176,15 @@
 #ifdef _MIPS_CS_VENDOR
     {"MIPS_CS_VENDOR", _MIPS_CS_VENDOR},
 #endif
+#ifdef _CS_DARWIN_USER_DIR
+    {"CS_DARWIN_USER_DIR", _CS_DARWIN_USER_DIR},
+#endif
+#ifdef _CS_DARWIN_USER_TEMP_DIR
+    {"CS_DARWIN_USER_TEMP_DIR", _CS_DARWIN_USER_TEMP_DIR},
+#endif
+#ifdef _CS_DARWIN_USER_CACHE_DIR
+    {"CS_DARWIN_USER_CACHE_DIR", _CS_DARWIN_USER_CACHE_DIR},
+#endif
 };
 
 static int
diff -ru Python-3.1.2.orig/configure Python-3.1.2/configure
--- Python-3.1.2.orig/configure 2010-03-10 17:28:52.000000000 -0500
+++ Python-3.1.2/configure      2010-07-06 14:11:41.000000000 -0400
@@ -4150,7 +4150,7 @@
          ;;
     Darwin*)
        LDLIBRARY='libpython$(VERSION).dylib'
-       BLDLIBRARY='-L. -lpython$(VERSION)'
+       BLDLIBRARY="$LDLIBRARY"
        RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
        ;;
 
@@ -13405,8 +13405,8 @@
        #ARCH_RUN_32BIT="true"
     fi
 
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only 
${MACOSX_DEFAULT_ARCH}"
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs"
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(BINLIBDEST)/config/$(INSTSONAME)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) 
-current_version $(VERSION)';;
 esac
 
@@ -13546,14 +13546,6 @@
                # Use -undefined dynamic_lookup whenever possible (10.3 and 
later).
                # This allows an extension to be used in any Python
 
-               if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
-               then
-                       if test "${enable_universalsdk}"; then
-                               LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot 
${UNIVERSALSDK} ${LDFLAGS}"
-                       fi
-                       LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined 
dynamic_lookup'
-                       BLDSHARED="$LDSHARED"
-               else
                        LDSHARED='$(CC) $(LDFLAGS) -bundle'
                        if test "$enable_framework" ; then
                                # Link against the framework. All externals 
should be defined.
@@ -13561,10 +13553,9 @@
                                LDSHARED="$LDSHARED 
"'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(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 "'$(BLDLIBRARY)'
+                               LDSHARED="$LDSHARED "'-L$(BINLIBDEST)/config 
-lpython$(VERSION)'
                        fi
-               fi
                ;;
        Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
        BSD/OS*/4*) LDSHARED="gcc -shared";;
@@ -25823,7 +25814,7 @@
 
 if test $ac_sys_system = Darwin
 then
-       LIBS="$LIBS -framework CoreFoundation"
+       LIBS="$LIBS -Wl,-framework,CoreFoundation"
 fi
 
 
diff -ru Python-3.1.2.orig/setup.py Python-3.1.2/setup.py
--- Python-3.1.2.orig/setup.py  2010-01-01 11:29:51.000000000 -0500
+++ Python-3.1.2/setup.py       2010-07-06 14:11:41.000000000 -0400
@@ -192,13 +192,17 @@
                                               longest, g))
 
         if missing:
+            num_missing=len(missing)
             print()
             print("Python build finished, but the necessary bits to build "
                    "these modules were not found:")
             print_three_column(missing)
             print("To find the necessary bits, look in setup.py in"
                   " detect_modules() for the module's name.")
+            print ("(Fink package build should have 2 missing)")
             print()
+            if num_missing != 2:
+                sys.exit(1)
 
         if self.failed:
             failed = self.failed[:]
@@ -206,6 +210,7 @@
             print("Failed to build these modules:")
             print_three_column(failed)
             print()
+            sys.exit(1)
 
     def build_extension(self, ext):
 
@@ -294,9 +299,8 @@
         return sys.platform
 
     def detect_modules(self):
-        # Ensure that /usr/local is always used
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-        add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+        add_dir_to_list(self.compiler.library_dirs, '@PREFIX@/lib')
+        add_dir_to_list(self.compiler.include_dirs, '@PREFIX@/include')
 
         # Add paths specified in the environment variables LDFLAGS and
         # CPPFLAGS for header and library files.
@@ -551,10 +555,9 @@
                                depends = ['socketmodule.h']) )
         # Detect SSL support for the socket module (via _ssl)
         search_for_ssl_incs_in = [
-                              '/usr/local/ssl/include',
-                              '/usr/contrib/ssl/include/'
+                              '@PREFIX@/lib/system-openssl/include'
                              ]
-        ssl_incs = find_file('openssl/ssl.h', inc_dirs,
+        ssl_incs = find_file('openssl/ssl.h', [],
                              search_for_ssl_incs_in
                              )
         if ssl_incs is not None:
@@ -562,9 +565,8 @@
                                ['/usr/kerberos/include'])
             if krb5_h:
                 ssl_incs += krb5_h
-        ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
-                                     ['/usr/local/ssl/lib',
-                                      '/usr/contrib/ssl/lib/'
+        ssl_libs = find_library_file(self.compiler, 'ssl', [],
+                                     ['@PREFIX@/lib/system-openssl/lib'
                                      ] )
 
         if (ssl_incs is not None and
@@ -581,7 +583,7 @@
         openssl_ver = 0
         openssl_ver_re = re.compile(
             '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' )
-        for ssl_inc_dir in inc_dirs + search_for_ssl_incs_in:
+        for ssl_inc_dir in search_for_ssl_incs_in:
             name = os.path.join(ssl_inc_dir, 'openssl', 'opensslv.h')
             if os.path.isfile(name):
                 try:
@@ -804,12 +806,7 @@
         # We hunt for #define SQLITE_VERSION "n.n.n"
         # We need to find >= sqlite version 3.0.8
         sqlite_incdir = sqlite_libdir = None
-        sqlite_inc_paths = [ '/usr/include',
-                             '/usr/include/sqlite',
-                             '/usr/include/sqlite3',
-                             '/usr/local/include',
-                             '/usr/local/include/sqlite',
-                             '/usr/local/include/sqlite3',
+        sqlite_inc_paths = [ '@PREFIX@/include'
                            ]
         MIN_SQLITE_VERSION_NUMBER = (3, 0, 8)
         MIN_SQLITE_VERSION = ".".join([str(x)
@@ -818,7 +815,7 @@
         # Scan the default include directories before the SQLite specific
         # ones. This allows one to override the copy of sqlite on OSX,
         # where /usr/include contains an old version of sqlite.
-        for d in inc_dirs + sqlite_inc_paths:
+        for d in sqlite_inc_paths:
             f = os.path.join(d, "sqlite3.h")
             if os.path.exists(f):
                 if sqlite_setup_debug: print("sqlite: found %s"%f)
@@ -846,11 +843,9 @@
             sqlite_dirs_to_check = [
                 os.path.join(sqlite_incdir, '..', 'lib64'),
                 os.path.join(sqlite_incdir, '..', 'lib'),
-                os.path.join(sqlite_incdir, '..', '..', 'lib64'),
-                os.path.join(sqlite_incdir, '..', '..', 'lib'),
             ]
             sqlite_libfile = self.compiler.find_library_file(
-                                sqlite_dirs_to_check + lib_dirs, 'sqlite3')
+                                sqlite_dirs_to_check, 'sqlite3')
             if sqlite_libfile:
                 sqlite_libdir = 
[os.path.abspath(os.path.dirname(sqlite_libfile))]
 
@@ -1003,6 +998,7 @@
             # _curses_panel.so must link with panelw.
             panel_library = 'panelw'
             exts.append( Extension('_curses', ['_cursesmodule.c'],
+                                   include_dirs=["@PREFIX@/include/ncursesw"],
                                    libraries = curses_libs) )
         elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
             curses_libs = ['ncurses']
@@ -1028,6 +1024,7 @@
         if (module_enabled(exts, '_curses') and
             self.compiler.find_library_file(lib_dirs, panel_library)):
             exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+                                   include_dirs=["@PREFIX@/include/ncursesw"],
                                    libraries = [panel_library] + curses_libs) )
         else:
             missing.append('_curses_panel')
@@ -1315,16 +1312,12 @@
         # 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
 
         # Assume we haven't found any of the libraries or include files
         # The versions with dots are used on Unix, and the versions without
         # dots on Windows, for detection by cygwin.
         tcllib = tklib = tcl_includes = tk_includes = None
-        for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
-                        '82', '8.1', '81', '8.0', '80']:
+        for version in ['8.4']:
             tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
             tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
             if tklib and tcllib:


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to