Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / python27 / patches / patch-al
blob9d6849f1dfff5df858e2a9049f24854ef9378cc7
1 $NetBSD: patch-al,v 1.9 2012/12/21 20:26:42 dholland Exp $
3 - recognize MirBSD, Interix
4 - remove special-case library version hack for FreeBSD
5 - honor pkgsrc LDFLAGS
6 - other stuff not previously commented (XXX)
8 --- configure.orig      2013-04-06 14:02:41.000000000 +0000
9 +++ configure
10 @@ -3243,7 +3243,7 @@ case $ac_sys_system/$ac_sys_release in
11    # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
12    # In addition, Stefan Krah confirms that issue #1244610 exists through
13    # OpenBSD 4.6, but is fixed in 4.7.
14 -  OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
15 +  OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456] | MirBSD/*)
16      define_xopen_source=no
17      # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
18      # also defined. This can be overridden by defining _BSD_SOURCE
19 @@ -5342,15 +5342,10 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
20           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
21           INSTSONAME="$LDLIBRARY".$SOVERSION
22            ;;
23 -    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
24 +    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|Interix*|MirBSD*)
25           LDLIBRARY='libpython$(VERSION).so'
26           BLDLIBRARY='-L. -lpython$(VERSION)'
27           RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
28 -         case $ac_sys_system in
29 -             FreeBSD*)
30 -               SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
31 -               ;;
32 -         esac
33           INSTSONAME="$LDLIBRARY".$SOVERSION
34           ;;
35      hp*|HP*)
36 @@ -8214,9 +8209,9 @@ then
37                         LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
38                 else
39                         # No framework, use the Python app as bundle-loader
40 -                       BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
41 -                       LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
42 -                       LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
43 +                       BLDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BUILDPYTHON)'
44 +                       LDSHARED="$LDSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
45 +                       LDCXXSHARED="$LDCXXSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
46                 fi ;;
47         Darwin/*)
48                 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
49 @@ -8240,15 +8235,15 @@ then
50                                 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
51                         else
52                                 # No framework, use the Python app as bundle-loader
53 -                               BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
54 -                               LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
55 -                               LDCXXSHARED="$LDCXXSHARED "'-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 +                               LDCXXSHARED="$LDCXXSHARED "'-flat_namespace -undefined suppress -bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
59                         fi
60                 fi
61                 ;;
62         Linux*|GNU*|QNX*)
63                 LDSHARED='$(CC) -shared'
64 -               LDCXXSHARED='$(CXX) -shared';;
65 +               LDCXXSHARED='$(CXX) -shared'" ${LDFLAGS}";;
66         BSD/OS*/4*)
67                 LDSHARED="gcc -shared"
68                 LDCXXSHARED="g++ -shared";;
69 @@ -8276,9 +8271,15 @@ then
70                                    ;;
71                                 esac
72                 fi;;
73 +       MirBSD*)
74 +               LDSHARED='$(CC) -shared $(CCSHARED)'
75 +               LDCXXSHARED='$(CXX) -shared $(CCSHARED)';;
76         NetBSD*|DragonFly*)
77                 LDSHARED='$(CC) -shared'
78                 LDCXXSHARED='$(CXX) -shared';;
79 +       Interix*)
80 +               LDSHARED='$(CC) -shared'" ${LDFLAGS}"
81 +               LDCXXSHARED='$(CXX) -shared'" ${LDFLAGS}";; # XXX tv needs image-base hack
82         OpenUNIX*|UnixWare*)
83                 if test "$GCC" = "yes" ; then
84                         LDSHARED='$(CC) -shared'
85 @@ -8322,7 +8323,8 @@ then
86                  fi;;
87         Linux*|GNU*) CCSHARED="-fPIC";;
88         BSD/OS*/4*) CCSHARED="-fpic";;
89 -       FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
90 +       FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*) CCSHARED="-fPIC";;
91 +       Interix*) CCSHARED="";;
92         OpenUNIX*|UnixWare*)
93                 if test "$GCC" = "yes"
94                 then CCSHARED="-fPIC"
95 @@ -8374,11 +8376,12 @@ then
96         OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
97         SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
98         ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
99 -       FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
100 +       FreeBSD*|NetBSD*|OpenBSD*|MirBSD*|DragonFly*)
101                 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
102                 then
103                         LINKFORSHARED="-Wl,--export-dynamic"
104                 fi;;
105 +       Interix*) LINKFORSHARED="-Wl,-E";;
106         SunOS/5*) case $CC in
107                   *gcc*)
108                     if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null