Avoid syntax error if $OXYGENOFFICE_PACK is undefined
[LibreOffice.git] / icu / icu4c-build.patch
blob46830be3946a23539c0724d6ae116beceecfcb00
1 --- misc/icu/source/config.sub 2010-09-29 20:38:38.000000000 +0200
2 +++ misc/build/icu/source/config.sub 2011-09-26 22:51:02.000000000 +0200
3 @@ -120,7 +120,7 @@
4 # Here we must recognize all the valid KERNEL-OS combinations.
5 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
6 case $maybe_os in
7 - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
8 + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
9 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
10 storm-chaos* | os2-emx* | rtmk-nova*)
11 os=-$maybe_os
12 @@ -1250,7 +1250,7 @@
13 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
14 | -chorusos* | -chorusrdb* \
15 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
16 - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
17 + | -mingw32* | -linux-gnu* | -linux-androideabi* | -linux-newlib* | -linux-uclibc* \
18 | -uxpv* | -beos* | -mpeix* | -udk* \
19 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
20 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
21 --- misc/icu/source/configure
22 +++ misc/build/icu/source/configure
23 @@ -5438,7 +5438,7 @@
24 else
25 icu_cv_host_frag=mh-linux-va
26 fi ;;
27 -*-*-linux*|*-pc-gnu) icu_cv_host_frag=mh-linux ;;
28 +*-*-linux*|*-pc-gnu|*-*-*-androideabi*) icu_cv_host_frag=mh-linux ;;
29 *-*-cygwin|*-*-mingw32)
30 if test "$GCC" = yes; then
31 cat >conftest.$ac_ext <<_ACEOF
32 @@ -7429,6 +7429,9 @@
33 # Check to see if genccode can generate simple assembly.
34 GENCCODE_ASSEMBLY=
35 case "${host}" in
36 +*-*-linux-androideabi)
37 + GENCCODE_ASSEMBLY="-a gcc-android"
38 + ;;
39 *-linux*|i*86-*-*bsd*|i*86-pc-gnu)
40 if test "$GCC" = yes; then
41 # We're using gcc, and the simple -a gcc command line works for genccode
42 @@ -8001,8 +8001,9 @@
43 # Check for potential -arch flags. It is not universal unless
44 # there are some -arch flags. Note that *ppc* also matches
45 # ppc64. This check is also rather less than ideal.
46 + # Huh? This breaks the ICU build on MacOSX 10.6 at least --tml@iki.fi
47 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
48 - *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
49 + # *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
50 esac
51 else
52 $as_echo "$as_me: failed program was:" >&5
53 @@ -11115,6 +1115,10 @@
54 # wchar_t can be used
55 CHECK_UTF16_STRING_RESULT="available"
57 +*-*-*-androideabi*)
58 + # no UTF-16 strings thanks, I think, this is to avoid the -std=c++0x which causes trouble with uint64_t
59 + CHECK_UTF16_STRING_RESULT="nope"
60 + ;;
63 esac
64 --- misc/icu/source/tools/toolutil/pkg_genc.c
65 +++ misc/build/icu/source/tools/toolutil/pkg_genc.c
66 @@ -145,6 +145,28 @@
68 ".long ","",HEX_0X
70 + {"gcc-android",
71 + "\t.arch armv5te\n"
72 + "\t.fpu softvfp\n"
73 + "\t.eabi_attribute 20, 1\n"
74 + "\t.eabi_attribute 21, 1\n"
75 + "\t.eabi_attribute 23, 3\n"
76 + "\t.eabi_attribute 24, 1\n"
77 + "\t.eabi_attribute 25, 1\n"
78 + "\t.eabi_attribute 26, 2\n"
79 + "\t.eabi_attribute 30, 6\n"
80 + "\t.eabi_attribute 18, 4\n"
81 + "\t.file \"%s.s\"\n"
82 + "\t.global %s\n"
83 + "\t.section .rodata\n"
84 + "\t.align 2\n"
85 + "\t.type %s, %%object\n"
86 + "%s:\n",
88 + "\t.word ",
89 + "\t.section .note.GNU-stack,\"\",%%progbits\n",
90 + HEX_0X
91 + },
92 {"sun",
93 "\t.section \".rodata\"\n"
94 "\t.align 8\n"
95 --- misc/icu/source/tools/pkgdata/pkgdata.cpp
96 +++ misc/build/icu/source/tools/pkgdata/pkgdata.cpp
97 @@ -97,7 +97,7 @@
98 #endif
100 #define LARGE_BUFFER_MAX_SIZE 2048
101 -#define SMALL_BUFFER_MAX_SIZE 512
102 +#define SMALL_BUFFER_MAX_SIZE 2048
104 static void loadLists(UPKGOptions *o, UErrorCode *status);
106 --- misc/icu/source/common/putil.c 2010-09-29 20:37:22.000000000 +0200
107 +++ misc/build/icu/source/common/putil.c 2011-03-15 10:58:44.054592942 +0100
108 @@ -52,7 +52,7 @@
109 Poorly upgraded Solaris machines can't have this defined.
110 Cleanly installed Solaris can use this #define.
112 -#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L)
113 +#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)
114 #define _XOPEN_SOURCE_EXTENDED 1
115 #endif
117 --- misc/icu/source/common/stringpiece.cpp 2010-09-29 20:37:20.000000000 +0200
118 +++ misc/build/icu/source/common/stringpiece.cpp 2011-03-15 10:57:24.722045561 +0100
119 @@ -71,7 +71,7 @@
120 * Visual Studios 9.0.
121 * Cygwin with MSVC 9.0 also complains here about redefinition.
123 -#if (!defined(_MSC_VER) || (_MSC_VER >= 1500)) && !defined(CYGWINMSVC)
124 +#if (!defined(_MSC_VER) && !defined(CYGWINMSVC))
125 const int32_t StringPiece::npos;
126 #endif
128 --- misc/icu/source/config/mh-darwin 2010-09-29 20:37:36.000000000 +0200
129 +++ misc/build/icu/source/config/mh-darwin 2011-03-15 10:56:26.653056004 +0100
130 @@ -25,7 +25,7 @@
131 SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
133 ## Compiler switches to embed a library name and version information
134 -LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
135 +LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(MIDDLE_SO_TARGET))
137 ## Compiler switch to embed a runtime search path
138 LD_RPATH=
139 @@ -41,10 +41,6 @@
140 ## Non-shared intermediate object suffix
141 STATIC_O = ao
143 -## Override Versioned target for a shared library.
144 -FINAL_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO)
145 -MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO)
147 ## Compilation rules
148 %.$(STATIC_O): $(srcdir)/%.c
149 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
150 @@ -76,16 +72,10 @@
152 ## Versioned libraries rules
154 -%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO)
155 +%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
156 $(RM) $@ && ln -s ${<F} $@
157 -%.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO)
158 - $(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@
160 -# tzcode option
161 -TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED
163 -# genren opts
164 -GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt'
165 +%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
166 + $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
168 ## Remove shared library 's'
169 STATIC_PREFIX_WHEN_USED =
170 --- misc/icu/source/config/mh-linux 2010-09-29 20:37:36.000000000 +0200
171 +++ misc/build/icu/source/config/mh-linux 2011-03-15 10:56:26.653056004 +0100
172 @@ -20,6 +20,11 @@
173 LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
174 LD_RPATH_PRE = -Wl,-rpath,
176 +## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH
177 +## (incl. the C++ runtime libs potentially found in the URE lib dir):
178 +ENABLE_RPATH=YES
179 +RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'
181 ## These are the library specific LDFLAGS
182 LDFLAGSICUDT=-nodefaultlibs -nostdlib
184 --- misc/icu/source/config/mh-solaris 2010-09-29 20:37:36.000000000 +0200
185 +++ misc/build/icu/source/config/mh-solaris 2011-03-15 11:01:04.370475053 +0100
186 @@ -36,17 +36,21 @@
188 ## Commands to link
189 ## For Sun Workshop, use CC to link to bring in C++ runtime
190 -LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS)
191 -LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS)
192 +LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -norunpath
193 +LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -norunpath
195 ## Commands to make a shared library
196 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G
197 -SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G
198 +SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G -norunpath
200 ## Compiler switch to embed a runtime search path
201 LD_RPATH= -R'$$'ORIGIN
202 LD_RPATH_PRE= -R
204 +## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH
205 +ENABLE_RPATH=YES
206 +RPATHLDFLAGS=${LD_RPATH}'$$ORIGIN'
208 #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
210 ## Compiler switch to embed a library name
211 --- misc/icu/source/layout/ArabicShaping.cpp 2010-09-29 20:38:38.000000000 +0200
212 +++ misc/build/icu/source/layout/ArabicShaping.cpp 2011-03-15 10:56:26.655056238 +0100
213 @@ -79,7 +79,6 @@
214 #define markFeatureMask 0x00040000UL
215 #define mkmkFeatureMask 0x00020000UL
217 -#define NO_FEATURES 0
218 #define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
220 #define SHAPE_MASK 0xF0000000UL
221 @@ -174,11 +173,7 @@
222 LEUnicode c = chars[in];
223 ShapeType t = getShapeType(c);
225 - if (t == ST_NOSHAPE_NONE) {
226 - glyphStorage.setAuxData(out, NO_FEATURES, success);
227 - } else {
228 glyphStorage.setAuxData(out, ISOL_FEATURES, success);
231 if ((t & MASK_TRANSPARENT) != 0) {
232 continue;