Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / external / icu / icu4c-windows-cygwin-cross.patch.1
blobdd6b47c172115f47f888ed2695818cb2ea29989a
1 diff -ur icu.org/source/acinclude.m4 icu/source/acinclude.m4
2 --- icu.org/source/acinclude.m4     2020-04-10 16:22:16.000000000 +0200
3 +++ icu/source/acinclude.m4 2020-04-21 22:14:09.940217733 +0200
4 @@ -52,6 +52,12 @@
5         else
6                 icu_cv_host_frag=mh-cygwin-msvc
7         fi ;;
8 +aarch64-*-cygwin)
9 +       if test "$GCC" = yes; then
10 +               icu_cv_host_frag=mh-cygwin64
11 +       else
12 +               icu_cv_host_frag=mh-cygwin-msvc
13 +       fi ;;
14  *-*-mingw*)
15         if test "$GCC" = yes; then
16                  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
17 --- icu/source/configure.ac.orig        2020-04-22 22:04:20.000000000 +0200
18 +++ icu/source/configure.ac     2020-10-01 09:39:05.570900400 +0200
19 @@ -213,23 +213,33 @@
20         [cross_buildroot="${withval}"],
21          [cross_buildroot=""])
23 +cross_mixed_buildroot="$cross_buildroot"
24 +cross_unix_buildroot="$cross_buildroot"
25  if test "X$cross_buildroot" = "X"; then
26      if test "$cross_compiling" = "yes"; then
27          AC_MSG_ERROR([Error! Cross compiling but no --with-cross-build option specified - please supply the path to an executable ICU's build root])
28         dnl '
29      fi
30  else
31 -    if test -f "${cross_buildroot}/config/icucross.mk"; then
32 +    case "${host}" in
33 +    *-*-cygwin*)
34 +        #M# -m isn't used because it doesn't work on Win98
35 +        cross_mixed_buildroot=$(cygpath -ad "$cross_buildroot" | tr '\\' '/')
36 +        cross_unix_buildroot=$(cygpath -au "$cross_buildroot")
37 +       ;;
38 +    esac
39 +    if test -f "${cross_mixed_buildroot}/config/icucross.mk"; then
40          AC_MSG_RESULT([Using cross buildroot: $cross_buildroot])
41      else
42 -        if test -d "${cross_buildroot}"; then
43 -            AC_MSG_ERROR([${cross_buildroot}/config/icucross.mk not found. Please build ICU in ${cross_buildroot} first.])
44 +        if test -d "${cross_mixed_buildroot}"; then
45 +            AC_MSG_ERROR([${cross_mixed_buildroot}/config/icucross.mk not found. Please build ICU in ${cross_mixed_buildroot} first.])
46          else
47 -            AC_MSG_ERROR([No such directory ${cross_buildroot} supplied as the argument to --with-cross-build. Use an absolute path.])
48 +            AC_MSG_ERROR([No such directory ${cross_mixed_buildroot} supplied as the argument to --with-cross-build. Use an absolute path.])
49          fi
50      fi
51  fi
52 -AC_SUBST(cross_buildroot)
53 +AC_SUBST(cross_mixed_buildroot)
54 +AC_SUBST(cross_unix_buildroot)
56  # Check for doxygen to generate documentation
57  AC_PATH_PROG(DOXYGEN,doxygen,,$PATH:/usr/local/bin:/usr/bin)
58 --- icu/source/test/testdata/Makefile.in.orig   2020-10-01 09:37:25.847888900 +0200
59 +++ icu/source/test/testdata/Makefile.in        2020-10-01 09:36:41.859996500 +0200
60 @@ -82,7 +82,7 @@
61  # relative lib links from pkgdata are the same as for tmp
62  GENRBOPTS=-k
63  # use the cross root, in case we are cross compiling. Otherwise it is equal to top_builddir
64 -TOOLDIR=$(cross_buildroot)/tools
65 +TOOLDIR=$(cross_mixed_buildroot)/tools
66  SRCDATADIR=$(top_srcdir)/data
67  UNICODEDATADIR=$(SRCDATADIR)/unidata
68  OUTDIR=$(top_builddir)/data/out
69 --- icu/source/Makefile.in.orig 2020-04-22 22:04:20.000000000 +0200
70 +++ icu/source/Makefile.in      2020-10-01 09:29:36.642364000 +0200
71 @@ -255,16 +255,16 @@
72         @(echo "CROSS_ICU_VERSION=$(VERSION)" ;\
73           echo "TOOLEXEEXT=$(EXEEXT)" \
74            ) > $@
75 -       @(echo 'TOOLBINDIR=$$(cross_buildroot)/bin' ;\
76 -         echo 'TOOLLIBDIR=$$(cross_buildroot)/lib' ;\
77 -         echo "INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(TOOLLIBDIR):$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$$$'"$(LDLIBRARYPATH_ENVVAR)" ;\
78 -         echo "PKGDATA_INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$(TOOLLIBDIR):$$$$'"$(LDLIBRARYPATH_ENVVAR) " ;\
79 +       @(echo 'TOOLBINDIR=$$(cross_mixed_buildroot)/bin' ;\
80 +         echo 'TOOLLIBDIR=$$(cross_mixed_buildroot)/lib' ;\
81 +         echo "INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(cross_unix_buildroot)/lib:$$(cross_unix_buildroot)/stubdata:$$(cross_unix_buildroot)/tools/ctestfw:$$$$'"$(LDLIBRARYPATH_ENVVAR)" ;\
82 +         echo "PKGDATA_INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(cross_unix_buildroot)/stubdata:$$(cross_unix_buildroot)/tools/ctestfw:$$(cross_unix_buildroot)/lib:$$$$'"$(LDLIBRARYPATH_ENVVAR) " ;\
83           echo ) >> $@
85  config/icucross.inc: $(top_builddir)/icudefs.mk  $(top_builddir)/Makefile @platform_make_fragment@
86         @echo rebuilding $@
87 -       @(grep '^CURR_FULL_DIR' $(top_builddir)/icudefs.mk ; \
88 -         grep '^CURR_FULL_DIR' @platform_make_fragment@ || echo ""; \
89 +       @(grep '^CURR_FULL_DIR' @platform_make_fragment@ || echo ""; \
90 +         grep '^CURR_FULL_DIR' $(top_builddir)/icudefs.mk ; \
91            ) > $@
93  config/icu.pc: $(srcdir)/config/icu.pc.in
94 --- icu/source/icudefs.mk.in.orig       2020-04-22 22:04:20.000000000 +0200
95 +++ icu/source/icudefs.mk.in    2020-10-01 09:35:54.418128800 +0200
96 @@ -35,7 +35,8 @@
97  sysconfdir = @sysconfdir@
98  # controls the include of $(top_builddir)/icucross.mk at bottom of file
99  cross_compiling = @cross_compiling@
100 -cross_buildroot = @cross_buildroot@
101 +cross_mixed_buildroot = @cross_mixed_buildroot@
102 +cross_unix_buildroot = @cross_unix_buildroot@
104  # Package information
106 @@ -303,8 +304,8 @@
107  INSTALLED_INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(libdir):$$$(LDLIBRARYPATH_ENVVAR)
109  # Current full path directory for cross compilation
110 -ifneq ($(strip $(cross_buildroot)),)
111 -include $(cross_buildroot)/config/icucross.inc
112 +ifneq ($(strip $(cross_mixed_buildroot)),)
113 +include $(cross_mixed_buildroot)/config/icucross.inc
114  endif
116  # Platform-specific setup
117 @@ -323,10 +324,11 @@
119  # some imported things from the cross env
120  TOOLEXEEXT = $(EXEEXT)
121 -ifneq ($(strip $(cross_buildroot)),)
122 -include $(cross_buildroot)/config/icucross.mk
123 +ifneq ($(strip $(cross_mixed_buildroot)),)
124 +include $(cross_mixed_buildroot)/config/icucross.mk
125  else
126 -cross_buildroot = $(top_builddir)
127 +cross_mixed_buildroot = $(top_builddir)
128 +cross_unix_buildroot = $(top_builddir)
129  endif
131  # for tests