fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / python3 / python-3.3.3-aix.patch.1
blobf510a81da840280f881b72bd8ab39f00f6eb4b2c
1 build with GCC on AIX
3 --- Python-3.3.3/configure      2012-11-28 09:05:45.990529603 +0000
4 +++ Python-3.3.3/configure      2012-11-28 09:06:23.037963934 +0000
5 @@ -3426,8 +3426,6 @@
6  else
7  
8         case $ac_sys_system in
9 -       AIX*)   CC=${CC:-xlc_r}
10 -               without_gcc=;;
11         *)      without_gcc=no;;
12         esac
13  fi
14 @@ -5541,10 +5539,18 @@
15               PY3LIBRARY=libpython3.so
16           fi
17            ;;
18 -    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
19 +    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
20           LDLIBRARY='libpython$(LDVERSION).so'
21 -         BLDLIBRARY='-L. -lpython$(LDVERSION)'
22 -         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
23 +         case $ac_sys_system in
24 +           AIX*)
25 +             BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
26 +             RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
27 +             ;;
28 +           *)
29 +             BLDLIBRARY='-L. -lpython$(LDVERSION)'
30 +             RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
31 +             ;;
32 +         esac
33           INSTSONAME="$LDLIBRARY".$SOVERSION
34           if test "$with_pydebug" != yes
35            then
36 @@ -8301,8 +8307,13 @@
37  then
38         case $ac_sys_system/$ac_sys_release in
39         AIX*)
40 -               BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
41 -               LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
42 +               if test "$GCC" = "yes"; then
43 +                 LDSHARED='$(CC) -shared'
44 +                 BLDSHARED='$(CC) -Wl,-brtl -shared'
45 +               else
46 +                 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
47 +                 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
48 +               fi
49                 ;;
50         IRIX/5*) LDSHARED="ld -shared";;
51         IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
52 --- Python-3.3.3/configure.ac   2012-11-28 09:05:45.990529603 +0000
53 +++ Python-3.3.3/configure.ac   2012-11-28 09:06:23.038963946 +0000
54 @@ -545,8 +545,6 @@
55                 without_gcc=$withval;;
56         esac], [
57         case $ac_sys_system in
58 -       AIX*)   CC=${CC:-xlc_r}
59 -               without_gcc=;;
60         *)      without_gcc=no;;
61         esac])
62  AC_MSG_RESULT($without_gcc)
63 @@ -910,10 +908,18 @@
64               PY3LIBRARY=libpython3.so
65           fi
66            ;;
67 -    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
68 +    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
69           LDLIBRARY='libpython$(LDVERSION).so'
70 -         BLDLIBRARY='-L. -lpython$(LDVERSION)'
71 -         RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
72 +         case $ac_sys_system in
73 +           AIX*)
74 +             BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
75 +             RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
76 +             ;;
77 +           *)
78 +             BLDLIBRARY='-L. -lpython$(LDVERSION)'
79 +             RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
80 +             ;;
81 +         esac
82           case $ac_sys_system in
83               FreeBSD*)
84                 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
85 @@ -1866,8 +1872,13 @@
86  then
87         case $ac_sys_system/$ac_sys_release in
88         AIX*)
89 -               BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
90 -               LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
91 +               if test "$GCC" = "yes"; then
92 +                       LDSHARED='$(CC) -shared'
93 +                       BLDSHARED='$(CC) -Wl,-brtl -shared'
94 +               else
95 +                       BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
96 +                       LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
97 +               fi
98                 ;;
99         IRIX/5*) LDSHARED="ld -shared";;
100         IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
101 --- Python-3.3.3/Makefile.pre.in        2012-11-28 09:05:45.861528086 +0000
102 +++ Python-3.3.3/Makefile.pre.in        2012-11-28 09:06:23.046964040 +0000
103 @@ -493,14 +493,20 @@
105  libpython$(LDVERSION).so: $(LIBRARY_OBJS)
106         if test $(INSTSONAME) != $(LDLIBRARY); then \
107 -               $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
108 +               if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
109 +                       SONAME="-Wl,-h$(INSTSONAME)"; \
110 +               fi; \
111 +               $(BLDSHARED) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
112                 $(LN) -f $(INSTSONAME) $@; \
113         else \
114                 $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
115         fi
117  libpython3.so: libpython$(LDVERSION).so
118 -       $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
119 +       if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
120 +               SONAME="-Wl,-h$@"; \
121 +       fi; \
122 +       $(BLDSHARED) $(NO_AS_NEEDED) -o $@ $(SONAME) $^
124  libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
125          $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
126 @@ -1106,6 +1112,8 @@
127         export PATH; PATH="`pwd`:$$PATH"; \
128         export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
129         export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
130 +       export LD_LIBRARY_PATH; LD_LIBRARY_PATH="`pwd`${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; \
131 +       export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
132         export EXE; EXE="$(BUILDEXE)"; \
133         if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
134         export PYTHON_FOR_BUILD; \
135 --- Python-3.3.3/Modules/Setup.dist     2012-11-28 09:05:45.935528957 +0000
136 +++ Python-3.3.3/Modules/Setup.dist     2012-11-28 09:06:23.052964111 +0000
137 @@ -177,7 +177,7 @@
138  #_bisect _bisectmodule.c       # Bisection algorithms
139  #_heapq _heapqmodule.c # Heap queue algorithm
141 -#unicodedata unicodedata.c    # static Unicode character database
142 +unicodedata unicodedata.c    # static Unicode character database
145  # Modules with some UNIX dependencies -- on by default: