Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/languages
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv5092

Modified Files:
        python25.info python26.info 
Added Files:
        python25-10.6.info python25-10.6.patch python26-10.6.info 
        python26-10.6.patch 
Log Message:
10.6-specific fix for getgroups support
https://sourceforge.net/tracker/?func=detail&aid=2881899&group_id=17203&atid=117203


--- NEW FILE: python25-10.6.patch ---
diff -Nurd -x'*~' Python-2.5.4.orig/Lib/pydoc.py Python-2.5.4/Lib/pydoc.py
--- Python-2.5.4.orig/Lib/pydoc.py      2008-12-10 21:09:36.000000000 -0500
+++ Python-2.5.4/Lib/pydoc.py   2009-03-17 01:53:23.000000000 -0400
@@ -1621,19 +1621,7 @@
     def __init__(self, input, output):
         self.input = input
         self.output = output
-        self.docdir = None
-        execdir = os.path.dirname(sys.executable)
-        homedir = os.environ.get('PYTHONHOME')
-        for dir in [os.environ.get('PYTHONDOCS'),
-                    homedir and os.path.join(homedir, 'doc'),
-                    os.path.join(execdir, 'doc'),
-                    '/usr/doc/python-docs-' + split(sys.version)[0],
-                    '/usr/doc/python-' + split(sys.version)[0],
-                    '/usr/doc/python-docs-' + sys.version[:3],
-                    '/usr/doc/python-' + sys.version[:3],
-                    os.path.join(sys.prefix, 
'Resources/English.lproj/Documentation')]:
-            if dir and os.path.isdir(os.path.join(dir, 'lib')):
-                self.docdir = dir
+        self.docdir = os.path.join(sys.prefix, 
'share','doc','python'+sys.version[0]+sys.version[2],'html')
 
     def __repr__(self):
         if inspect.stack()[1][3] == '?':
diff -Nurd -x'*~' Python-2.5.4.orig/Modules/posixmodule.c 
Python-2.5.4/Modules/posixmodule.c
--- Python-2.5.4.orig/Modules/posixmodule.c     2008-12-13 10:14:30.000000000 
-0500
+++ Python-2.5.4/Modules/posixmodule.c  2009-10-31 15:47:35.000000000 -0400
@@ -339,7 +339,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().
 */
@@ -357,7 +357,7 @@
        d = PyDict_New();
        if (d == NULL)
                return NULL;
-#ifdef WITH_NEXT_FRAMEWORK
+#ifdef __APPLE__
        if (environ == NULL)
                environ = *_NSGetEnviron();
 #endif
@@ -3638,6 +3638,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)
 {
@@ -3649,13 +3652,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;
@@ -3671,6 +3681,7 @@
             }
         }
 
+    if (grouplist) free(grouplist);
     return result;
 }
 #endif
@@ -5453,15 +5464,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++) {
@@ -5507,6 +5518,7 @@
 
        if (setgroups(len, grouplist) < 0)
                return posix_error();
+       free(grouplist);
        Py_INCREF(Py_None);
        return Py_None;
 }
@@ -7199,6 +7211,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 -Nurd -x'*~' Python-2.5.4.orig/configure Python-2.5.4/configure
--- Python-2.5.4.orig/configure 2008-12-13 09:13:52.000000000 -0500
+++ Python-2.5.4/configure      2009-03-17 01:53:23.000000000 -0400
@@ -4534,7 +4534,7 @@
            ;;
        # is there any other compiler on Darwin besides gcc?
        Darwin*)
-           BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp 
-mno-fused-madd"
+           BASECFLAGS="$BASECFLAGS -Wno-long-double -mno-fused-madd 
-fno-common"
            if test "${enable_universalsdk}"; then
                BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} 
${BASECFLAGS}"
            fi
@@ -11491,7 +11491,7 @@
                        LDSHARED="$LDSHARED 
"'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
                else
                        # No framework. Ignore undefined symbols, assuming they 
come from Python
-                       LDSHARED="$LDSHARED -undefined suppress"
+                       LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
                fi ;;
        Darwin/1.4*|Darwin/5.*|Darwin/6.*)
                LDSHARED='$(CC) $(LDFLAGS) -bundle'
@@ -11501,8 +11501,8 @@
                        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 -flat_namespace -undefined 
suppress"
+                       LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
                fi ;;
        Darwin/*)
                # Use -undefined dynamic_lookup whenever possible (10.3 and 
later).
@@ -11536,8 +11536,8 @@
                                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 -flat_namespace -undefined 
suppress"
+                               LDSHARED="$LDSHARED -flat_namespace -undefined 
suppress"
                        fi
                fi
                ;;
diff -Nurd -x'*~' Python-2.5.4.orig/setup.py Python-2.5.4/setup.py
--- Python-2.5.4.orig/setup.py  2008-10-16 14:58:19.000000000 -0400
+++ Python-2.5.4/setup.py       2009-03-17 01:53:23.000000000 -0400
@@ -244,8 +244,8 @@
 
     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.
@@ -295,11 +295,11 @@
         # lib_dirs and inc_dirs are used to search for files;
         # if a file is found in one of those directories, it can
         # be assumed that no additional -I,-L directives are needed.
-        lib_dirs = self.compiler.library_dirs + [
+        lib_dirs = self.compiler.library_dirs + ['@PREFIX@/lib',
             '/lib64', '/usr/lib64',
             '/lib', '/usr/lib',
             ]
-        inc_dirs = self.compiler.include_dirs + ['/usr/include']
+        inc_dirs = self.compiler.include_dirs + 
['@PREFIX@/include','/usr/include']
         exts = []
 
         config_h = sysconfig.get_config_h_filename()
@@ -522,10 +522,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:
@@ -533,9 +532,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
@@ -550,7 +548,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:
@@ -619,47 +617,8 @@
         # construct a list of paths to look for the header file in on
         # top of the normal inc_dirs.
         db_inc_paths = [
-            '/usr/include/db4',
-            '/usr/local/include/db4',
-            '/opt/sfw/include/db4',
-            '/sw/include/db4',
-            '/usr/include/db3',
-            '/usr/local/include/db3',
-            '/opt/sfw/include/db3',
-            '/sw/include/db3',
+            '@PREFIX@/include/db4'
         ]
-        # 4.x minor number specific paths
-        for x in range(max_db_ver[1]+1):
-            db_inc_paths.append('/usr/include/db4%d' % x)
-            db_inc_paths.append('/usr/include/db4.%d' % x)
-            db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
-            db_inc_paths.append('/usr/local/include/db4%d' % x)
-            db_inc_paths.append('/pkg/db-4.%d/include' % x)
-            db_inc_paths.append('/opt/db-4.%d/include' % x)
-        # 3.x minor number specific paths
-        for x in (3,):
-            db_inc_paths.append('/usr/include/db3%d' % x)
-            db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
-            db_inc_paths.append('/usr/local/include/db3%d' % x)
-            db_inc_paths.append('/pkg/db-3.%d/include' % x)
-            db_inc_paths.append('/opt/db-3.%d/include' % x)
-
-        # Add some common subdirectories for Sleepycat DB to the list,
-        # based on the standard include directories. This way DB3/4 gets
-        # picked up when it is installed in a non-standard prefix and
-        # the user has added that prefix into inc_dirs.
-        std_variants = []
-        for dn in inc_dirs:
-            std_variants.append(os.path.join(dn, 'db3'))
-            std_variants.append(os.path.join(dn, 'db4'))
-            for x in range(max_db_ver[1]+1):
-                std_variants.append(os.path.join(dn, "db4%d"%x))
-                std_variants.append(os.path.join(dn, "db4.%d"%x))
-            for x in (2,3):
-                std_variants.append(os.path.join(dn, "db3%d"%x))
-                std_variants.append(os.path.join(dn, "db3.%d"%x))
-
-        db_inc_paths = std_variants + db_inc_paths
 
 
         db_ver_inc_map = {}
@@ -761,12 +720,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)
@@ -1216,15 +1170,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',
+        for version in ['8.4', '84', '8.3', '83', '8.2',
                         '82', '8.1', '81', '8.0', '80']:
             tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
             tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)

--- NEW FILE: python26-10.6.patch ---
diff -Nurd -x'*~' Python-2.6.2.orig/Makefile.pre.in Python-2.6.2/Makefile.pre.in
--- Python-2.6.2.orig/Makefile.pre.in   2009-02-24 06:07:44.000000000 -0500
+++ Python-2.6.2/Makefile.pre.in        2009-04-24 02:47:01.000000000 -0400
@@ -419,8 +419,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 @LIBTOOL_CRUFT@ -o $@ 
$(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LDLAST)
 
 libpython$(VERSION).sl: $(LIBRARY_OBJS)
        $(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) 
$(LIBC) $(LIBM) $(LDLAST)
@@ -760,14 +759,14 @@
        then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
        else true; \
        fi
-       (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
+       (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) $(PYTHON))
        -rm -f $(DESTDIR)$(BINDIR)/python-config
        (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
 
 # 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"; \
@@ -780,9 +779,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; \
diff -Nurd -x'*~' Python-2.6.2.orig/Misc/python-config.in 
Python-2.6.2/Misc/python-config.in
--- Python-2.6.2.orig/Misc/python-config.in     2007-03-31 14:56:11.000000000 
-0400
+++ Python-2.6.2/Misc/python-config.in  2009-04-23 22:25:42.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 -Nurd -x'*~' Python-2.6.2.orig/Modules/posixmodule.c 
Python-2.6.2/Modules/posixmodule.c
--- Python-2.6.2.orig/Modules/posixmodule.c     2009-04-06 02:47:37.000000000 
-0400
+++ Python-2.6.2/Modules/posixmodule.c  2009-10-31 15:39:36.000000000 -0400
@@ -344,7 +344,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().
 */
@@ -362,7 +362,7 @@
        d = PyDict_New();
        if (d == NULL)
                return NULL;
-#ifdef WITH_NEXT_FRAMEWORK
+#ifdef __APPLE__
        if (environ == NULL)
                environ = *_NSGetEnviron();
 #endif
@@ -1293,8 +1293,8 @@
         PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong((long)st->st_dev));
 #endif
         PyStructSequence_SET_ITEM(v, 3, PyInt_FromLong((long)st->st_nlink));
-        PyStructSequence_SET_ITEM(v, 4, PyInt_FromLong((long)st->st_uid));
-        PyStructSequence_SET_ITEM(v, 5, PyInt_FromLong((long)st->st_gid));
+        PyStructSequence_SET_ITEM(v, 4, PyInt_FromLong((long)(int)st->st_uid));
+        PyStructSequence_SET_ITEM(v, 5, PyInt_FromLong((long)(int)st->st_gid));
 #ifdef HAVE_LARGEFILE_SUPPORT
         PyStructSequence_SET_ITEM(v, 6,
                                  
PyLong_FromLongLong((PY_LONG_LONG)st->st_size));
@@ -1880,9 +1880,9 @@
 posix_chown(PyObject *self, PyObject *args)
 {
        char *path = NULL;
-       long uid, gid;
+       int uid, gid;
        int res;
-       if (!PyArg_ParseTuple(args, "etll:chown",
+       if (!PyArg_ParseTuple(args, "etii:chown",
                              Py_FileSystemDefaultEncoding, &path,
                              &uid, &gid))
                return NULL;
@@ -3759,7 +3759,7 @@
 static PyObject *
 posix_getegid(PyObject *self, PyObject *noargs)
 {
-       return PyInt_FromLong((long)getegid());
+       return PyInt_FromLong((long)(int)getegid());
 }
 #endif
 
@@ -3772,7 +3772,7 @@
 static PyObject *
 posix_geteuid(PyObject *self, PyObject *noargs)
 {
-       return PyInt_FromLong((long)geteuid());
+       return PyInt_FromLong((long)(int)geteuid());
 }
 #endif
 
@@ -3785,7 +3785,7 @@
 static PyObject *
 posix_getgid(PyObject *self, PyObject *noargs)
 {
-       return PyInt_FromLong((long)getgid());
+       return PyInt_FromLong((long)(int)getgid());
 }
 #endif
 
@@ -3806,6 +3806,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)
 {
@@ -3817,18 +3820,25 @@
         /* 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;
                 for (i = 0; i < n; ++i) {
-                    PyObject *o = PyInt_FromLong((long)grouplist[i]);
+                    PyObject *o = PyInt_FromLong((long)(int)grouplist[i]);
                     if (o == NULL) {
                         Py_DECREF(result);
                         result = NULL;
@@ -3839,6 +3849,7 @@
             }
         }
 
+    if (grouplist) free(grouplist);
     return result;
 }
 #endif
@@ -3949,7 +3960,7 @@
 static PyObject *
 posix_getuid(PyObject *self, PyObject *noargs)
 {
-       return PyInt_FromLong((long)getuid());
+       return PyInt_FromLong((long)(int)getuid());
 }
 #endif
 
@@ -5661,15 +5672,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++) {
@@ -5693,7 +5704,7 @@
                                }
                                grouplist[i] = x;
                                /* read back to see if it fits in gid_t */
-                               if (grouplist[i] != x) {
+                               if ((int)grouplist[i] != x) {
                                        PyErr_SetString(PyExc_TypeError,
                                                        "group id too big");
                                        Py_DECREF(elem);
@@ -5703,7 +5714,7 @@
                } else {
                        long x  = PyInt_AsLong(elem);
                        grouplist[i] = x;
-                       if (grouplist[i] != x) {
+                       if ((int)grouplist[i] != x) {
                                PyErr_SetString(PyExc_TypeError,
                                                "group id too big");
                                Py_DECREF(elem);
@@ -5715,6 +5726,7 @@
 
        if (setgroups(len, grouplist) < 0)
                return posix_error();
+       free(grouplist);
        Py_INCREF(Py_None);
        return Py_None;
 }
@@ -7470,6 +7482,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 -Nurd -x'*~' Python-2.6.2.orig/configure Python-2.6.2/configure
--- Python-2.6.2.orig/configure 2009-03-30 13:56:14.000000000 -0400
+++ Python-2.6.2/configure      2009-04-25 13:30:08.000000000 -0400
@@ -4143,7 +4143,7 @@
          ;;
     Darwin*)
        LDLIBRARY='libpython$(VERSION).dylib'
-       BLDLIBRARY='-L. -lpython$(VERSION)'
+       BLDLIBRARY="$LDLIBRARY"
        RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
        ;;
 
@@ -12933,7 +12933,7 @@
             LIBTOOL_CRUFT=""
     fi
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
-    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
+    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(BINLIBDEST)/config/$(INSTSONAME)'
     LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) 
-current_version $(VERSION)';;
 esac
 
@@ -13071,14 +13071,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.
@@ -13086,10 +13078,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";;
diff -Nurd -x'*~' Python-2.6.2.orig/setup.py Python-2.6.2/setup.py
--- Python-2.6.2.orig/setup.py  2009-03-31 14:20:48.000000000 -0400
+++ Python-2.6.2/setup.py       2009-04-23 22:25:43.000000000 -0400
@@ -214,12 +214,16 @@
                                               longest, g)
 
         if missing:
+            num_missing=len(missing)
             print
             print "Failed to find the necessary bits to build these modules:"
             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 5 missing)")
             print
+            if num_missing != 5:
+                sys.exit(1)
 
         if self.failed:
             failed = self.failed[:]
@@ -227,6 +231,7 @@
             print "Failed to build these modules:"
             print_three_column(failed)
             print
+            sys.exit(1)
 
     def build_extension(self, ext):
 
@@ -309,9 +314,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.
@@ -614,10 +618,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:
@@ -625,9 +628,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
@@ -644,7 +646,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:
@@ -741,50 +743,9 @@
         # construct a list of paths to look for the header file in on
         # top of the normal inc_dirs.
         db_inc_paths = [
-            '/usr/include/db4',
-            '/usr/local/include/db4',
-            '/opt/sfw/include/db4',
-            '/usr/include/db3',
-            '/usr/local/include/db3',
-            '/opt/sfw/include/db3',
-            # Fink defaults (http://fink.sourceforge.net/)
-            '/sw/include/db4',
-            '/sw/include/db3',
+            '@PREFIX@/include/db4'
         ]
-        # 4.x minor number specific paths
-        for x in gen_db_minor_ver_nums(4):
-            db_inc_paths.append('/usr/include/db4%d' % x)
-            db_inc_paths.append('/usr/include/db4.%d' % x)
-            db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
-            db_inc_paths.append('/usr/local/include/db4%d' % x)
-            db_inc_paths.append('/pkg/db-4.%d/include' % x)
-            db_inc_paths.append('/opt/db-4.%d/include' % x)
-            # MacPorts default (http://www.macports.org/)
-            db_inc_paths.append('/opt/local/include/db4%d' % x)
-        # 3.x minor number specific paths
-        for x in gen_db_minor_ver_nums(3):
-            db_inc_paths.append('/usr/include/db3%d' % x)
-            db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
-            db_inc_paths.append('/usr/local/include/db3%d' % x)
-            db_inc_paths.append('/pkg/db-3.%d/include' % x)
-            db_inc_paths.append('/opt/db-3.%d/include' % x)
-
-        # Add some common subdirectories for Sleepycat DB to the list,
-        # based on the standard include directories. This way DB3/4 gets
-        # picked up when it is installed in a non-standard prefix and
-        # the user has added that prefix into inc_dirs.
-        std_variants = []
-        for dn in inc_dirs:
-            std_variants.append(os.path.join(dn, 'db3'))
-            std_variants.append(os.path.join(dn, 'db4'))
-            for x in gen_db_minor_ver_nums(4):
-                std_variants.append(os.path.join(dn, "db4%d"%x))
-                std_variants.append(os.path.join(dn, "db4.%d"%x))
-            for x in gen_db_minor_ver_nums(3):
-                std_variants.append(os.path.join(dn, "db3%d"%x))
-                std_variants.append(os.path.join(dn, "db3.%d"%x))
 
-        db_inc_paths = std_variants + db_inc_paths
         db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)]
 
         db_ver_inc_map = {}
@@ -889,12 +850,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)
@@ -903,7 +859,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
@@ -931,11 +887,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))]
 
@@ -1533,16 +1487,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: python25-10.6.info ---
Package: python25
Version: 2.5.4
Revision: 102
Epoch: 1
Distribution: 10.6
Maintainer: Daniel Macks <[email protected]>
Conflicts: <<
        python-nox (<= 2.2.1-8)
<<
Replaces: <<
        python (<= 2.2.1-8),
        python-nox (<= 2.2.1-8),
        python25-socket, python25-socket-ssl
<<
Depends: <<
        %N-shlibs (= %e:%v-%r),
        blt-shlibs,
        bzip2-shlibs,
        db44-aes-shlibs | db44-shlibs,
        gdbm3-shlibs,
        libgettext3-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,
        db44-aes | db44,
        fink (>= 0.24.12-1), 
        gdbm3,
        gettext-bin,
        gettext-tools,
        libgettext3-dev,
        libjpeg,
        libncurses5 (>= 5.4-20041023-1006),
        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.tgz
Source2: http://www.python.org/ftp/python/doc/%v/html-%v.zip
Source-MD5: ad47b23778f64edadaaa8b5534986eed
Source2-MD5: 64b4db34805109fcfd4ff528859c5a1b
PatchFile: %n-10.6.patch
PatchFile-MD5: a9e4521dcee89e2090efd3d5adb43c70
PatchScript: <<
 sed 's|@PREFIX@|%p|g' < %{PatchFile} | patch -p1
 perl -pi -e 's|-Wno-long-double||' configure
 perl -pi -e 's|#include "Python.h"|#define _DARWIN_C_SOURCE\n#include 
"Python.h"|' Modules/posixmodule.c
<<
SetLDFLAGS: -L%p/lib/system-openssl/lib
ConfigureParams: --mandir=%p/share/man
GCC: 4.0
CompileScript: <<
#!/bin/sh -ex
        if [ "%m" = "x86_64" ]; then
                perl -pi.bak -e 's|num_missing != 5:|num_missing != 7:|g' 
./setup.py
                perl -pi.bak -e "s/8.4\'/8.5\'/" ./setup.py
                ./configure %c --disable-toolbox-glue
        else
                ./configure %c
        fi
        make
<<
InstallScript: <<
#!/bin/sh -ex
        make install DESTDIR=%d

        # build a shared lib (why doesn't build system do this for us?)
        cc -dynamiclib -single_module -all_load -undefined dynamic_lookup 
-framework System -framework CoreServices -framework Foundation 
%i/lib/python2.5/config/libpython2.5.a -o 
%i/lib/python2.5/config/libpython2.5.dylib -install_name 
%p/lib/python2.5/config/libpython2.5.dylib -current_version 2.5 
-compatibility_version 2.5

        # remove flag that isn't required and may cause link problems
        # because we don't use -bundle-loader for some reason
        perl -pi -e 's|-fno-common||g' %i/lib/python2.5/config/Makefile

        # don't propagate our hackery
        perl -pi -e 's|-L%p/lib/system-openssl/lib||' 
%i/lib/python2.5/config/Makefile

        # fix all main things to be python-versioned filenames with
        # unversioned symlinks to them
        pushd %i/bin
                sed 's|%p/bin/python|%p/bin/python2.5|g' < idle     > idle2.5
                rm idle
                chmod 755 idle2.5
                ln -s idle2.5 %i/bin/idle

                sed 's|%p/bin/python|%p/bin/python2.5|g' < pydoc    > pydoc2.5
                rm pydoc
                chmod 755 pydoc2.5
                ln -s pydoc2.5 %i/bin/pydoc

                sed 's|%p/bin/python|%p/bin/python2.5|g' < smtpd.py > 
smtpd.py2.5
                rm smtpd.py
                chmod 755 smtpd.py2.5
                ln -s smtpd.py2.5 %i/bin/smtpd.py
                
                # was created as hard-link...why do they do that?
                rm python
                ln -s python2.5 python
        popd
        /bin/mv %i/share/man/man1/python.1 %i/share/man/man1/python25.1
        ln -s python25.1 %i/share/man/man1/python.1

        # install some docs and other useful tidbits
        rm -rf Misc/RPM
        /bin/cp -R Misc Tools %i/lib/python2.5
        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-Docs-%v/ %i/share/doc/%n/html
<<
SplitOff: <<
 Package: %N-shlibs
 Replaces: python (<= 2.2.1-8), python-nox (<= 2.2.1-8)
 Files: lib/python2.5/config/libpython2.5.dylib
 Shlibs: %p/lib/python2.5/config/libpython2.5.dylib 2.5.0 %n (>= 2.5-1)
 DocFiles: README LICENSE 
<<
SplitOff2: <<
 Package: python
 Depends: python25 (>= %e:%v-%r)
 Conflicts: python-nox
 Replaces: python-nox, python25 (<< 1:2.5.1-3)
 Files: <<
                bin/python
                bin/pydoc
                bin/idle
                bin/smtpd.py
                bin/python-config
                share/man/man1/python.1
        <<
 DocFiles: README LICENSE
 Description: Generic "python" command that invokes python25
<<
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 "python2.5", and all associated
 commands are similarly named with the python-version in them. To get
 the simple "python" command, install the fink package "python" (note:
 the "python" command there is not guaranteed to be python2.5!).
<<

DescPackaging: <<
        Originally packaged by Jeffrey Whitaker with much help from
        Dave Morrison and Peter O'Gorman

        As of 1:2.5.1-3, the socket modules, with ssl support, are in
        python25 itself and python25-socket and python25-socket-ssl
        are dummy packages that are no longer needed.

        Adjusts linker flags to ignore undefined symbols instead of
        using bundle-loader for libpython. Why? Should revert to
        default behavior (easier to detect other missing lib linkages)
        but wait for new pythonXX version to avoid propagating a
        different linking scheme into all existing *-py25 compiled
        modules.

        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.

        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?

        Cannot use db47 (or higher)
<<
DescPort: <<
        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.
<<
License: OSI-Approved
Homepage: http://www.python.org

Index: python25.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4/unstable/main/finkinfo/languages/python25.info,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- python25.info       15 Apr 2009 03:32:47 -0000      1.14
+++ python25.info       31 Oct 2009 19:51:30 -0000      1.15
@@ -2,6 +2,7 @@
 Version: 2.5.4
 Revision: 1
 Epoch: 1
+Distribution: 10.4, 10.5
 Maintainer: Daniel Macks <[email protected]>
 Conflicts: <<
        python-nox (<= 2.2.1-8)

--- NEW FILE: python26-10.6.info ---
Package: python26
Version: 2.6.2
Revision: 103
Epoch: 1
Distribution: 10.6
Maintainer: Daniel Macks <[email protected]>
Depends: <<
        %N-shlibs (= %e:%v-%r),
        blt-shlibs,
        bzip2-shlibs,
        db47-aes-shlibs | db47-shlibs,
        gdbm3-shlibs,
        libgettext3-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,
        db47-aes | db47,
        fink (>= 0.24.12-1), 
        gdbm3,
        gettext-bin,
        gettext-tools,
        libgettext3-dev,
        libncurses5 (>= 5.4-20041023-1006),
        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.tgz
Source-MD5: 60e64fe55eb4e23abdd4d77fdad08c3d
Source2: http://www.python.org/ftp/python/doc/%v/python-%v-docs-html.tar.bz2
Source2-MD5: 15a2dac727692e4ff8fe92958d4e633c
PatchFile: %n-10.6.patch
PatchFile-MD5: 14b6f9b78b47c775539375fdda3bcbb7
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 != 5:|num_missing != 7:|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
                # Architecture:x86_64 can't build with toolbox-glue
                ./configure %c --disable-toolbox-glue
        else
                ./configure %c
        fi
        make
<<
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/python2.6/config/Makefile

        # fix all main things to be python-versioned filenames with
        # unversioned symlinks to them
        pushd %i/bin
                for f in 2to3 idle pydoc smtpd.py; do
                        mv ${f} ${f}2.6
                        ln -s ${f}2.6 %i/bin/${f}
                done
        popd
        /bin/mv %i/share/man/man1/python.1 %i/share/man/man1/python26.1
        ln -s python26.1 %i/share/man/man1/python.1

        # install some docs and other useful tidbits
        rm -rf Misc/RPM
        /bin/cp -R Misc Tools %i/lib/python2.6
        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
 Files: lib/python2.6/config/libpython2.6.dylib
 Shlibs: %p/lib/python2.6/config/libpython2.6.dylib 2.6.0 %n (>= 1:2.6-1)
 DocFiles: README LICENSE 
<<
SplitOff2: <<
 Package: python
 Depends: %N (>= %e:%v-%r)
 Conflicts: python-nox
 Replaces: python-nox, python25 (<< 1:2.5.1-3)
 Files: <<
                bin/2to3
                bin/idle
                bin/pydoc
                bin/python
                bin/python-config
                bin/smtpd.py
                share/man/man1/python.1
        <<
 DocFiles: README LICENSE
 Description: Generic "python" command that invokes python26
<<
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 "python2.6", and all associated
 commands are similarly named with the python-version in them. To get
 the simple "python" command, install the fink package "python" (note:
 the "python" command there is not guaranteed to be python2.6!).
<<
DescUsage: <<
        python2.6 changes the compiler options used to compile
        third-party python modules. Please do not add 2.6 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 libpython2.6 (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 "python" unversioned link to be a symlink not a hard link.

        Must remain Epoch'ed so that this "python" pkg to be newer
        than the one from lower %v pkgs.

        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).

        Cannot use higher than db47
<<
DescPort: <<
        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.
<<
License: OSI-Approved
Homepage: http://www.python.org

Index: python26.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.4/unstable/main/finkinfo/languages/python26.info,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- python26.info       13 May 2009 21:18:11 -0000      1.8
+++ python26.info       31 Oct 2009 19:51:30 -0000      1.9
@@ -2,6 +2,7 @@
 Version: 2.6.2
 Revision: 2
 Epoch: 1
+Distribution: 10.4, 10.5
 Maintainer: Daniel Macks <[email protected]>
 Depends: <<
        %N-shlibs (= %e:%v-%r),


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Fink-commits mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to