pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python25 Apply patch by Brian de Alwis to fix bui...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1f13478b3da7
branches:  trunk
changeset: 543940:1f13478b3da7
user:      tron <tron%pkgsrc.org@localhost>
date:      Fri Jun 27 19:57:49 2008 +0000

description:
Apply patch by Brian de Alwis to fix build problems under Mac OS X Leopard.
Tested under Leopard and NetBSD-i386 4.0_STABLE.

This fixes PR pkg/39042 by myself.

diffstat:

 lang/python25/Makefile         |  16 +++-------------
 lang/python25/PLIST.Darwin     |  10 ++--------
 lang/python25/distinfo         |   8 ++++----
 lang/python25/patches/patch-ab |   7 ++++---
 lang/python25/patches/patch-al |  35 ++++++++++++++++++++++++++---------
 lang/python25/patches/patch-au |  29 ++++++++++++++++++++++++++---
 6 files changed, 65 insertions(+), 40 deletions(-)

diffs (253 lines):

diff -r 38d38bd3350d -r 1f13478b3da7 lang/python25/Makefile
--- a/lang/python25/Makefile    Fri Jun 27 18:07:02 2008 +0000
+++ b/lang/python25/Makefile    Fri Jun 27 19:57:49 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2008/04/25 12:04:44 tnn Exp $
+# $NetBSD: Makefile,v 1.6 2008/06/27 19:57:49 tron Exp $
 
 DISTNAME=      Python-2.5.2
 PKGNAME=       python25-2.5.2
@@ -72,9 +72,9 @@
 IS_64BIT_PLATFORM?=    no
 .endif
 
-# the dl module isn't built for 64 bit archs and Darwin
+# the dl module isn't built for 64 bit archs
 PLIST_VARS+=   dl
-.if empty(IS_64BIT_PLATFORM:M[yY][eE][sS]) && (${OPSYS} != "Darwin")
+.if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
 PLIST.dl=      yes
 .endif
 
@@ -150,16 +150,6 @@
        ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py
        ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
 
-.if ${OPSYS} == "Darwin"
-post-build:
-       cd ${WRKSRC} && \
-       ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} libpython2.5.2.dylib
-
-post-install:
-       ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.5.2.dylib  \
-               ${DESTDIR}${PREFIX}/lib/libpython2.5.dylib
-.endif
-
 .if ${OPSYS} == "HPUX"
 post-install:
        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.5.sl \
diff -r 38d38bd3350d -r 1f13478b3da7 lang/python25/PLIST.Darwin
--- a/lang/python25/PLIST.Darwin        Fri Jun 27 18:07:02 2008 +0000
+++ b/lang/python25/PLIST.Darwin        Fri Jun 27 19:57:49 2008 +0000
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST.Darwin,v 1.1.1.1 2008/04/24 01:50:58 tnn Exp $
-lib/libpython2.5.2.dylib
+@comment $NetBSD: PLIST.Darwin,v 1.2 2008/06/27 19:57:49 tron Exp $
+lib/libpython${PY_VER_SUFFIX}.dylib
 lib/python${PY_VER_SUFFIX}/lib-dynload/ColorPicker.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/MacOS.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/Nav.so
@@ -235,9 +235,6 @@
 lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/TextEdit.py
 lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/TextEdit.pyc
 lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/TextEdit.pyo
-lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/WASTEconst.py
-lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/WASTEconst.pyc
-lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/WASTEconst.pyo
 lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Win.py
 lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Win.pyc
 lib/python${PY_VER_SUFFIX}/plat-mac/Carbon/Win.pyo
@@ -259,9 +256,6 @@
 lib/python${PY_VER_SUFFIX}/plat-mac/PixMapWrapper.py
 lib/python${PY_VER_SUFFIX}/plat-mac/PixMapWrapper.pyc
 lib/python${PY_VER_SUFFIX}/plat-mac/PixMapWrapper.pyo
-lib/python${PY_VER_SUFFIX}/plat-mac/WASTEconst.py
-lib/python${PY_VER_SUFFIX}/plat-mac/WASTEconst.pyc
-lib/python${PY_VER_SUFFIX}/plat-mac/WASTEconst.pyo
 lib/python${PY_VER_SUFFIX}/plat-mac/aepack.py
 lib/python${PY_VER_SUFFIX}/plat-mac/aepack.pyc
 lib/python${PY_VER_SUFFIX}/plat-mac/aepack.pyo
diff -r 38d38bd3350d -r 1f13478b3da7 lang/python25/distinfo
--- a/lang/python25/distinfo    Fri Jun 27 18:07:02 2008 +0000
+++ b/lang/python25/distinfo    Fri Jun 27 19:57:49 2008 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.3 2008/05/09 10:03:16 tnn Exp $
+$NetBSD: distinfo,v 1.4 2008/06/27 19:57:49 tron Exp $
 
 SHA1 (Python-2.5.2.tar.bz2) = 4755d212f50af704c20224a6966e23acc5aea60f
 RMD160 (Python-2.5.2.tar.bz2) = b23b02739833e6730799c5866e2b77aae884b63f
 Size (Python-2.5.2.tar.bz2) = 9807597 bytes
 SHA1 (patch-aa) = d44e67645dc86ff14f5daf5705de02c6f330cc48
-SHA1 (patch-ab) = c573f73a2509a63fc269302015a7ff6eaa8fe6ff
+SHA1 (patch-ab) = d35025df83e70d129f9fbcd277652b0eea83b026
 SHA1 (patch-ac) = 4de5b8dc20b41dc3bb4acd38011ef59570318d3f
 SHA1 (patch-ad) = 069c2fd6fc0e2e754486941fd9e5743c94668787
 SHA1 (patch-ae) = 5425515c6bf130eee204ca2749386f6447eaa35b
@@ -13,7 +13,7 @@
 SHA1 (patch-ai) = a89bee00860910f53a23b1c670d9c091846a03c1
 SHA1 (patch-aj) = a75d680a6b8b1ad3c9222dcb841f4fb10db6d16d
 SHA1 (patch-ak) = 948362c15ad59abeef46971f9b870b70655a62c7
-SHA1 (patch-al) = 80b7eab63b7a638674446f297adafdb7f3a44dc9
+SHA1 (patch-al) = b56bebd10ed66a6149aa55ad1ccd997cf51f7f0d
 SHA1 (patch-am) = 8968853066d2d1a4f76a7ee4ce328ba372d19666
 SHA1 (patch-an) = 17b4e17b3b562c29a050e9bb20447084ce82b8ab
 SHA1 (patch-ao) = 9bbd5561c010e0a1ab8e0a70d27a5f77fd2089d2
@@ -21,5 +21,5 @@
 SHA1 (patch-aq) = e1fb02560e95ce4d37e2894b4299c3eb3a1167d8
 SHA1 (patch-ar) = 2a0c3f9a798afdfda7af4823e67579b2e000c072
 SHA1 (patch-at) = 200646b0b0292fd3c3517f10eda24b4e94dca7c4
-SHA1 (patch-au) = c51d25c6def18c7ef0de2122b807de4cc1e3f729
+SHA1 (patch-au) = e3babf3537ed8cbed1720f1afe964914f4ae289f
 SHA1 (patch-av) = a1d41cb3a93879d54f0964ff84a63a297c333156
diff -r 38d38bd3350d -r 1f13478b3da7 lang/python25/patches/patch-ab
--- a/lang/python25/patches/patch-ab    Fri Jun 27 18:07:02 2008 +0000
+++ b/lang/python25/patches/patch-ab    Fri Jun 27 19:57:49 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2008/04/24 01:50:58 tnn Exp $
+$NetBSD: patch-ab,v 1.2 2008/06/27 19:57:49 tron Exp $
 
---- Lib/distutils/command/build_ext.py.orig    2007-03-13 06:19:35.000000000 -0400
+--- Lib/distutils/command/build_ext.py.orig    2007-04-24 09:27:25.000000000 -0600
 +++ Lib/distutils/command/build_ext.py
-@@ -496,8 +496,18 @@ class build_ext (Command):
+@@ -496,8 +496,19 @@ class build_ext (Command):
          # that go into the mix.
          if ext.extra_objects:
              objects.extend(ext.extra_objects)
@@ -16,6 +16,7 @@
          extra_args = ext.extra_link_args or []
  
 +        if os.environ.has_key('LDFLAGS'):
++            extra_args = list(extra_args)
 +            extra_args.extend(string.split(os.environ['LDFLAGS']))
 +
          # Detect target language, if not provided
diff -r 38d38bd3350d -r 1f13478b3da7 lang/python25/patches/patch-al
--- a/lang/python25/patches/patch-al    Fri Jun 27 18:07:02 2008 +0000
+++ b/lang/python25/patches/patch-al    Fri Jun 27 19:57:49 2008 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-al,v 1.1.1.1 2008/04/24 01:50:58 tnn Exp $
+$NetBSD: patch-al,v 1.2 2008/06/27 19:57:49 tron Exp $
 
---- configure.orig     2007-03-12 06:50:51.000000000 -0400
+--- configure.orig     2008-02-13 13:17:17.000000000 -0600
 +++ configure
-@@ -1560,6 +1560,8 @@ case $ac_sys_system/$ac_sys_release in
+@@ -2019,6 +2019,8 @@ _ACEOF
    # Marc Recht
    NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
      define_xopen_source=no;;
@@ -11,7 +11,7 @@
    # On Solaris 2.6, sys/wait.h is inconsistent in the usage
    # of union __?sigval. Reported by Stuart Bishop.
    SunOS/5.6)
-@@ -3412,15 +3414,10 @@ _ACEOF
+@@ -4018,17 +4020,18 @@ _ACEOF
          RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
          INSTSONAME="$LDLIBRARY".$SOVERSION
            ;;
@@ -27,8 +27,16 @@
 -        esac
          INSTSONAME="$LDLIBRARY".$SOVERSION
          ;;
++    Darwin*)
++        LDLIBRARY='libpython$(VERSION).dylib'
++        BLDLIBRARY='-L. -lpython$(VERSION)'
++        RUNSHARED=DYLD_FALLBACK_LIBRARY_PATH=`pwd`:${DYLD_FALLBACK_LIBRARY_PATH}
++        INSTSONAME="$LDLIBRARY"
++        ;;
      hp*|HP*)
-@@ -3890,7 +3887,12 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing
+         case `uname -m` in
+               ia64)
+@@ -4538,7 +4541,12 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing
            ;;
        # is there any other compiler on Darwin besides gcc?
        Darwin*)
@@ -42,7 +50,7 @@
            if test "${enable_universalsdk}"; then
                BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
            fi
-@@ -11033,12 +11035,12 @@ then
+@@ -11540,12 +11548,12 @@ then
                                LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
                        else
                                # No framework, use the Python app as bundle-loader
@@ -58,7 +66,7 @@
        BSD/OS*/4*) LDSHARED="gcc -shared";;
        FreeBSD*)
                if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
-@@ -11062,6 +11064,7 @@ then
+@@ -11569,6 +11577,7 @@ then
                                esac
                fi;;
        NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
@@ -66,7 +74,7 @@
        OpenUNIX*|UnixWare*)
                if test "$GCC" = "yes"
                then LDSHARED='$(CC) -shared'
-@@ -11097,6 +11100,7 @@ then
+@@ -11604,6 +11613,7 @@ then
        Linux*|GNU*) CCSHARED="-fPIC";;
        BSD/OS*/4*) CCSHARED="-fpic";;
        FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
@@ -74,7 +82,7 @@
        OpenUNIX*|UnixWare*)
                if test "$GCC" = "yes"
                then CCSHARED="-fPIC"
-@@ -11154,6 +11158,7 @@ then
+@@ -11661,6 +11671,7 @@ then
                then
                        LINKFORSHARED="-Wl,--export-dynamic"
                fi;;
@@ -82,3 +90,12 @@
        SunOS/5*) case $CC in
                  *gcc*)
                    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
+@@ -23158,6 +23169,8 @@ do
+   case $ac_option in
+   # Handling of the options.
+   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
++      : Avoid regenerating within pkgsrc
++      exit 0
+     ac_cs_recheck=: ;;
+   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+     echo "$ac_cs_version"; exit ;;
diff -r 38d38bd3350d -r 1f13478b3da7 lang/python25/patches/patch-au
--- a/lang/python25/patches/patch-au    Fri Jun 27 18:07:02 2008 +0000
+++ b/lang/python25/patches/patch-au    Fri Jun 27 19:57:49 2008 +0000
@@ -1,8 +1,31 @@
-$NetBSD: patch-au,v 1.1.1.1 2008/04/24 01:50:58 tnn Exp $
+$NetBSD: patch-au,v 1.2 2008/06/27 19:57:49 tron Exp $
 
---- Makefile.pre.in.orig       2007-12-05 21:43:57.000000000 +0100
+--- Makefile.pre.in.orig       2007-12-05 14:43:57.000000000 -0600
 +++ Makefile.pre.in
-@@ -806,7 +806,7 @@ $(srcdir)/Lib/$(PLATDIR):
+@@ -376,6 +376,12 @@ libpython$(VERSION).so: $(LIBRARY_OBJS)
+ libpython$(VERSION).sl: $(LIBRARY_OBJS)
+       $(LDSHARED) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
+ 
++libpython$(VERSION).dylib: $(LIBRARY_OBJS)
++      $(LINKCC) -dynamiclib -install_name $(LIBDIR)/$@ \
++          -current_version 2.5.2 -compatibility_version $(VERSION) \
++          -o $@ -flat_namespace -undefined suppress $(LDFLAGS) \
++          $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM)
++
+ # This rule is here for OPENSTEP/Rhapsody/MacOSX. It builds a temporary
+ # minimal framework (not including the Lib directory and such) in the current
+ # directory.
+@@ -683,7 +689,8 @@ altbininstall:     $(BUILDPYTHON)
+                               (cd $(DESTDIR)$(LIBDIR); $(LN) -sf $(INSTSONAME) libpython$(VERSION)$(SO)); \
+                       fi \
+               fi; \
+-      else    true; \
++      elif test -f $(INSTSONAME); then \
++              $(INSTALL_SHARED) $(INSTSONAME) $(DESTDIR)$(LIBDIR); \
+       fi
+ 
+ # Install the manual page
+@@ -806,7 +813,7 @@ $(srcdir)/Lib/$(PLATDIR):
        export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
        export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
        export EXE; EXE="$(BUILDEXE)"; \



Home | Main Index | Thread Index | Old Index