update Sun May 2 06:37:03 PDT 2010
[pkgsrc.git] / lang / python26 / patches / patch-al
1 $NetBSD: patch-al,v 1.4 2010/05/02 14:09:11 wiz Exp $
2
3 --- configure.orig      2010-03-09 21:47:28.000000000 +0000
4 +++ configure
5 @@ -4166,17 +4166,18 @@ _ACEOF
6           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
7           INSTSONAME="$LDLIBRARY".$SOVERSION
8            ;;
9 -    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
10 +    Linux*|GNU*|NetBSD*|FreeBSD*|Interix*|DragonFly*)
11           LDLIBRARY='libpython$(VERSION).so'
12           BLDLIBRARY='-L. -lpython$(VERSION)'
13           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
14 -         case $ac_sys_system in
15 -             FreeBSD*)
16 -               SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
17 -               ;;
18 -         esac
19           INSTSONAME="$LDLIBRARY".$SOVERSION
20           ;;
21 +    Darwin*)
22 +         LDLIBRARY='libpython$(VERSION).dylib'
23 +         BLDLIBRARY='-L. -lpython$(VERSION)'
24 +         RUNSHARED=DYLD_FALLBACK_LIBRARY_PATH=`pwd`:${DYLD_FALLBACK_LIBRARY_PATH}
25 +         INSTSONAME="$LDLIBRARY"
26 +         ;;
27      hp*|HP*)
28           case `uname -m` in
29                 ia64)
30 @@ -4578,7 +4579,7 @@ fi
31  # tweak OPT based on compiler and platform, only if the user didn't set
32  # it on the command line
33  
34 -if test "${OPT-unset}" == "unset"
35 +if test "${OPT-unset}" = "unset"
36  then
37      case $GCC in
38      yes)
39 @@ -13261,8 +13262,8 @@ then
40                         LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
41                 else
42                         # No framework, use the Python app as bundle-loader
43 -                       BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
44 -                       LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
45 +                       BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
46 +                       LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
47                 fi ;;
48         Darwin/*)
49                 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
50 @@ -13283,12 +13284,12 @@ then
51                                 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
52                         else
53                                 # No framework, use the Python app as bundle-loader
54 -                               BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
55 -                               LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
56 +                               BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
57 +                               LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
58                         fi
59                 fi
60                 ;;
61 -       Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
62 +       Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared'" ${LDFLAGS}";;
63         BSD/OS*/4*) LDSHARED="gcc -shared";;
64         FreeBSD*)
65                 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
66 @@ -13312,6 +13313,7 @@ then
67                                 esac
68                 fi;;
69         NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
70 +       Interix*) LDSHARED='$(CC) -shared'" ${LDFLAGS}";; # XXX tv needs image-base hack
71         OpenUNIX*|UnixWare*)
72                 if test "$GCC" = "yes"
73                 then LDSHARED='$(CC) -shared'
74 @@ -13347,6 +13349,7 @@ then
75         Linux*|GNU*) CCSHARED="-fPIC";;
76         BSD/OS*/4*) CCSHARED="-fpic";;
77         FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
78 +       Interix*) CCSHARED="";;
79         OpenUNIX*|UnixWare*)
80                 if test "$GCC" = "yes"
81                 then CCSHARED="-fPIC"
82 @@ -13404,6 +13407,7 @@ then
83                 then
84                         LINKFORSHARED="-Wl,--export-dynamic"
85                 fi;;
86 +       Interix*) LINKFORSHARED="-Wl,-E";;
87         SunOS/5*) case $CC in
88                   *gcc*)
89                     if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null