You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2024/11/03 07:11:10 UTC

(openoffice) branch AOO41X updated (d2bdf2d6a5 -> a7f9e8b9cc)

This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a change to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


    from d2bdf2d6a5 Graphics for StartCenter - new revision
     new 7ccb0d530a Switch to icu 4.2.1
     new efb68f0c56 Pick file icu-format-security.patch from 851abcd
     new a7f9e8b9cc Allow compilation under MacOS

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 main/external_deps.lst                   |   6 +-
 main/icu/createmak.cfg                   |  43 +++++-
 main/icu/createmak.pl                    |  65 +++++++--
 main/icu/icu-darwin.patch                |  48 ++-----
 main/icu/icu-format-security.patch       |  12 ++
 main/icu/icu-win-icutu-dll-version.patch |  40 ++++++
 main/icu/icu-win-layout.patch            |  11 ++
 main/icu/icu4c-4_2_1-src.patch           | 230 +++++++++++++++++++++++++++++++
 main/icu/icuversion.mk                   |   2 +-
 main/icu/makefile.mk                     |   7 +-
 main/icu/prj/d.lst                       |  10 +-
 11 files changed, 417 insertions(+), 57 deletions(-)
 create mode 100644 main/icu/icu-format-security.patch
 create mode 100644 main/icu/icu-win-icutu-dll-version.patch
 create mode 100644 main/icu/icu-win-layout.patch
 create mode 100644 main/icu/icu4c-4_2_1-src.patch


(openoffice) 03/03: Allow compilation under MacOS

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit a7f9e8b9cc2047281ee7b12dc8708d28597a2805
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Sun Oct 27 09:09:36 2024 +0100

    Allow compilation under MacOS
    
    (cherry picked from commit 0774725aa1f8e85bfb763e54c8ea5a3057c0d040)
---
 main/icu/icu-darwin.patch      | 48 ++++++++++++------------------------------
 main/icu/icu4c-4_2_1-src.patch | 25 ++++++++++++++++++++++
 2 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/main/icu/icu-darwin.patch b/main/icu/icu-darwin.patch
index 3255ab3130..8ee7976878 100644
--- a/main/icu/icu-darwin.patch
+++ b/main/icu/icu-darwin.patch
@@ -1,34 +1,14 @@
---- misc/build/icu/source/configure	2009-01-15 02:46:50.000000000 -0500
-+++ misc/build/icu/source/configure	2021-07-10 16:01:04.000000000 -0400
-@@ -2326,6 +2326,7 @@
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
-+#include <stdlib.h>
- $ac_declaration
- int
- main ()
-@@ -2687,6 +2688,7 @@
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
-+#include <stdlib.h>
- $ac_declaration
- int
- main ()
-@@ -4988,6 +4990,7 @@
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
- #include <ctype.h>
-+#include <stdlib.h>
- #if ((' ' & 0x0FF) == 0x020)
- # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-@@ -5635,6 +5638,7 @@
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h.  */
-+#include <stdlib.h>
- int
- main ()
- {
+diff -ru misc/icu/source/data/pkgdataMakefile.in misc/build/icu/source/data/pkgdataMakefile.in
+--- misc/icu/source/data/pkgdataMakefile.in	2024-10-21 16:00:26.000000000 -0400
++++ misc/build/icu/source/data/pkgdataMakefile.in	2024-10-21 16:00:35.000000000 -0400
+@@ -14,6 +14,10 @@
+ 
+ OUTPUTFILE=icupkg.inc
+ MIDDLE_SO_TARGET=
++# LD_SONAME must end with a path, but on Darwin this does not happen, because
++# file source/config/mh-darwin makes it end with FINAL_SO_TARGET, instead of
++# MIDDLE_SO_TARGET like other Unixes.
++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/
+ 
+ all : clean 
+ 	@echo GENCCODE_ASSEMBLY_TYPE=$(GENCCODE_ASSEMBLY) >> $(OUTPUTFILE)
diff --git a/main/icu/icu4c-4_2_1-src.patch b/main/icu/icu4c-4_2_1-src.patch
index 0cc5b58b4b..77fc719528 100644
--- a/main/icu/icu4c-4_2_1-src.patch
+++ b/main/icu/icu4c-4_2_1-src.patch
@@ -203,3 +203,28 @@ diff -ru misc/icu/source/tools/genuca/genuca.cpp misc/build/icu/source/tools/gen
        //{0x3400, 0x4DB6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24)    },  //3 CJK_IMPLICIT_TAG,   /* 0x3400-0x4DB5*/
        //{0x4E00, 0x9FA6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24)    },  //4 CJK_IMPLICIT_TAG,   /* 0x4E00-0x9FA5*/
 
+--- misc/icu/source/configure	2009-07-01 14:51:26.000000000 -0400
++++ misc/build/icu/source/configure	2024-10-19 16:35:02.000000000 -0400
+@@ -7061,8 +7061,10 @@
+ 	# Check for potential -arch flags.  It is not universal unless
+ 	# there are some -arch flags.  Note that *ppc* also matches
+ 	# ppc64.  This check is also rather less than ideal.
++	echo "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+ 	case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in  #(
+-	  *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
++	  *-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=no;;
++	  *-arch*ppc*) ac_cv_c_bigendian=yes;;
+ 	esac
+ else
+   $as_echo "$as_me: failed program was:" >&5
+--- misc/icu/source/i18n/uspoof.cpp	2009-07-01 14:50:10.000000000 -0400
++++ misc/build/icu/source/i18n/uspoof.cpp	2024-10-19 16:36:44.000000000 -0400
+@@ -366,7 +366,7 @@
+         // u_strToUTF8() in preflight mode is an easy way to do it.
+         U_ASSERT(position16 <= len16);
+         u_strToUTF8(NULL, 0, position, text16, position16, status);
+-        if (position > 0) {
++        if (position) {
+             // position is the required buffer length from u_strToUTF8, which includes
+             // space for a terminating NULL, which we don't want, hence the -1.
+             *position -= 1;


(openoffice) 02/03: Pick file icu-format-security.patch from 851abcd

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit efb68f0c56faab0a34cd40b8b5340ed090950373
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Fri Nov 1 08:47:42 2024 +0100

    Pick file icu-format-security.patch from 851abcd
---
 main/icu/icu-format-security.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/main/icu/icu-format-security.patch b/main/icu/icu-format-security.patch
new file mode 100644
index 0000000000..938e5d1518
--- /dev/null
+++ b/main/icu/icu-format-security.patch
@@ -0,0 +1,12 @@
+diff -ur misc/icu/source/tools/ctestfw/uperf.cpp misc/build/icu/source/tools/ctestfw/uperf.cpp
+--- misc/icu/source/tools/ctestfw/uperf.cpp	2009-01-14 23:46:00.000000000 -0800
++++ misc/build/icu/source/tools/ctestfw/uperf.cpp	2016-08-30 22:19:11.917367000 -0700
+@@ -486,7 +486,7 @@
+         this->runIndexedTest( index, FALSE, name );
+         if (!name)
+             break;
+-        fprintf(stdout,name);
++        fprintf(stdout,"%s",name);
+         fprintf(stdout,"\n");
+         index++;
+     }while (name && (name[0] != 0));


(openoffice) 01/03: Switch to icu 4.2.1

Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 7ccb0d530a82b7ad7d024d7230ef1f4a7f5faac3
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Fri Jun 14 21:43:10 2024 +0200

    Switch to icu 4.2.1
    
    Update createmak.pl to adjust paths.
    Update createmak.cfg to the new sources.
    
    (adapted from commit b0de321897d0795c98972c112b1134c6a4cb160d)
---
 main/external_deps.lst                   |   6 +-
 main/icu/createmak.cfg                   |  43 ++++++-
 main/icu/createmak.pl                    |  65 ++++++++--
 main/icu/icu-win-icutu-dll-version.patch |  40 ++++++
 main/icu/icu-win-layout.patch            |  11 ++
 main/icu/icu4c-4_2_1-src.patch           | 205 +++++++++++++++++++++++++++++++
 main/icu/icuversion.mk                   |   2 +-
 main/icu/makefile.mk                     |   7 +-
 main/icu/prj/d.lst                       |  10 +-
 9 files changed, 366 insertions(+), 23 deletions(-)

diff --git a/main/external_deps.lst b/main/external_deps.lst
index f22e757d7f..15cf3e27f6 100644
--- a/main/external_deps.lst
+++ b/main/external_deps.lst
@@ -118,9 +118,9 @@ if (SOLAR_JAVA==TRUE && ENABLE_MEDIAWIKI==YES)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if ( true )
-    MD5 = 2f6ecca935948f7db92d925d88d0d078
-    name = icu4c-4_0_1-src.tgz
-    URL1 = https://sourceforge.net/projects/icu/files/ICU4C/4.0.1/$(name)
+    MD5 = e3738abd0d3ce1870dc1fd1f22bba5b1
+    name = icu4c-4_2_1-src.tgz
+    URL1 = https://sourceforge.net/projects/icu/files/ICU4C/4.2.1/$(name)
     URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
 
 if ( true )
diff --git a/main/icu/createmak.cfg b/main/icu/createmak.cfg
index be5130740f..4fe20cb059 100644
--- a/main/icu/createmak.cfg
+++ b/main/icu/createmak.cfg
@@ -1,3 +1,6 @@
+[Architecture]
+x86
+
 [Copy]
 SOURCE=<HEADER>
 InputPath=<INPUTPATH>
@@ -32,6 +35,12 @@ CDEF1FLAGS= -D "_WINDOWS" -D "_MBCS"
 [CFlags_common]
 CPP_PROJ=-nologo -MD -Za -Zi -W3 -GF -O2 -Ob2 $(EXCEPTIONSWITCH) $(CPP_PROJ_INCLUDES) $(CDEFS) $(CPDBOBJ) -c
 
+[CFlags_samples_cal]
+CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
+
+[CFlags_samples_date]
+CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
+
 [CFlags_i18n]
 CPP_PROJ=-MD -W3 -Oi -Op -GF -FD -GS -Gy -Za -Zi $(EXCEPTIONSWITCH) $(COPT) $(CPP_PROJ_INCLUDES) $(CDEFS) -Fp".\Release/i18n.pch" $(CPDBOBJ) -c
 
@@ -74,6 +83,9 @@ CPP_PROJ=-nologo -MD -GF -Za -Zi -W3 $(EXCEPTIONSWITCH) $(COPT) $(CPDBOBJ) -c
 [CFlags_tools_genccode]
 CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
 
+[CFlags_tools_gencfu]
+CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
+
 [CFlags_tools_gencmn]
 CPP_PROJ=-O2 -Za $(CTOOLSFLAGS)
 
@@ -132,14 +144,24 @@ CPP_PROJ=-Za -O2 $(CTOOLSFLAGS)
 CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
 
 [CommonLinkFlags]
-PDBOUT=/pdb:"<PDBFILE>" /out:"<OUTFILE>"
+PDBOUT_NOPDB=/out:"<OUTFILE>"
+PDBOUT=/pdb:"<PDBFILE>" $(PDBOUT_NOPDB)
+COMMONLINKFLAGS_NOPDB=/incremental:no /machine:I386 /nologo $(PDBOUT_NOPDB) /SAFESEH /NXCOMPAT /DYNAMICBASE
 COMMONLINKFLAGS=/incremental:no /machine:I386 /nologo $(PDBOUT) /SAFESEH /NXCOMPAT /DYNAMICBASE
+COMMONLINKFLAGS_CONSOLE_NOPDB=$(COMMONLINKFLAGS_NOPDB) /subsystem:console
 COMMONLINKFLAGS_CONSOLE=$(COMMONLINKFLAGS) /subsystem:console
+COMMONLINKFLAGS_DLL_NOPDB=$(COMMONLINKFLAGS_NOPDB) /dll
 COMMONLINKFLAGS_DLL=$(COMMONLINKFLAGS) /dll
 
 [LinkFlags_common]
 LINK32_FLAGS=icudata.lib kernel32.lib user32.lib advapi32.lib shell32.lib $(COMMONLINKFLAGS_DLL) /base:"0x4a800000" /implib:"$(OUTDIR)\icuuc.lib" /libpath:"..\..\lib"
 
+[LinkFlags_samples_cal]
+LINK32_FLAGS=..\..\..\lib\icuuc.lib ..\..\..\lib\icuin.lib $(COMMONLINKFLAGS_DLL) /implib:"$(OUTDIR)\icule.lib"
+
+[LinkFlags_samples_date]
+LINK32_FLAGS=..\..\..\lib\icuuc.lib ..\..\..\lib\icuin.lib $(COMMONLINKFLAGS_DLL) /implib:"$(OUTDIR)\icule.lib"
+
 [LinkFlags_i18n]
 LINK32_FLAGS=icuuc.lib  $(COMMONLINKFLAGS_DLL) /base:"0x4a900000" /implib:"$(OUTDIR)\icuin.lib" /libpath:"..\..\lib"
 
@@ -188,6 +210,9 @@ LINK32_FLAGS=icuuc.lib icutu.lib $(COMMONLINKFLAGS_CONSOLE) /libpath:"..\tooluti
 [LinkFlags_tools_genccode]
 LINK32_FLAGS=icuuc.lib icutu.lib $(COMMONLINKFLAGS_CONSOLE) /libpath:"..\toolutil\Release" /libpath:"..\..\..\lib"
 
+[LinkFlags_tools_gencfu]
+LINK32_FLAGS=icuuc.lib icutu.lib icuin.lib $(COMMONLINKFLAGS_CONSOLE_NOPDB) /libpath:"..\..\..\lib"
+
 [LinkFlags_tools_gennames]
 LINK32_FLAGS=icuuc.lib icutu.lib $(COMMONLINKFLAGS_CONSOLE) /libpath:"..\toolutil\Release" /libpath:"..\..\..\lib\Release" /libpath:"..\..\..\lib"
 
@@ -255,7 +280,16 @@ LINK32_FLAGS=kernel32.lib ..\..\..\lib\icuin.lib $(COMMONLINKFLAGS_DLL) /NODEFAU
 	"..\..\..\lib\icuin.lib"
 
 [AdditionalLinkObjects_layout]
-	"$(OUTDIR)\icuuc.lib"
+	"..\..\lib\icuuc.lib" \
+	"..\..\lib\icuin.lib"
+
+[AdditionalLinkObjects_samples_cal]
+	"..\..\..\lib\icuuc.lib" \
+	"..\..\..\lib\icuin.lib"
+
+[AdditionalLinkObjects_samples_date]
+	"..\..\..\lib\icuuc.lib" \
+	"..\..\..\lib\icuin.lib"
 
 [AdditionalLinkObjects_io]
 	"$(OUTDIR)\icuuc.lib"
@@ -293,6 +327,11 @@ LINK32_FLAGS=kernel32.lib ..\..\..\lib\icuin.lib $(COMMONLINKFLAGS_DLL) /NODEFAU
     "..\..\..\lib\icuuc.lib" \
 	"..\..\..\lib\icutu.lib"
 
+[AdditionalLinkObjects_tools_gencfu]
+	"..\..\..\lib\icuuc.lib" \
+	"..\..\..\lib\icutu.lib" \
+	"..\..\..\lib\icuin.lib" \
+
 [AdditionalLinkObjects_tools_gencmn]
     "..\..\..\lib\icuuc.lib" \
 	"..\..\..\lib\icutu.lib"
diff --git a/main/icu/createmak.pl b/main/icu/createmak.pl
index 6a59db6771..159587e31a 100644
--- a/main/icu/createmak.pl
+++ b/main/icu/createmak.pl
@@ -31,6 +31,7 @@ $is_debug=0;
 my $path = $ENV{'INPATH'} . "/";
 my $quot = '"';
 my %template_hash=();
+my $architecture = "x86";
 my %vcproj_hash=();
 # ------------------------------------------------------------------------
 # Global stuff for parsing the *.vcproj files (XML::Parser)
@@ -72,6 +73,10 @@ $sep = "\\\\";
 my @builddeps = prepare_allinone_all_mak(\%project_by_id,\%project_by_name,\%project_dependencies,$sourcePath);
 
 fillTemplateHash($configfile);
+# The architecture is indicated in the configuration file
+$architecture=${$template_hash{"Architecture"}}[0];
+chomp $architecture;
+print "Architecture: $architecture\n" if ($is_debug);
 
 create_allinone_all_mak(\@builddeps,\%project_by_id,$sourcePath);
 my @dirs = ();
@@ -558,7 +563,7 @@ sub print_all_target        #26.06.2008 13:27
     {
         if ( $target =~ /\.exe/ ) {
             my $out = $target;
-            $out =~ s/.\\Release/\.\.\\\.\.\\\.\.\\bin/;
+            $out =~ s/\.\\((x64|x86)\\)?Release/\.\.\\\.\.\\\.\.\\$1bin/;
             $out =~ s/\$\(OutDir\)/\.\.\\\.\.\\\.\.\\bin/;
             $out =~ s/\//\\/; # convert / to \
             $target = $out;
@@ -637,18 +642,24 @@ sub print_link_template       #18.04.2008 13:39
 
     # for *.exe files an additional
     # copy section is required to get
-    # the stuff into the global bin directory
+    # the stuff into the per-arch bin directory
     my %dummy = ();
     my @mak = ();
+    my $arch = "";
+    if ( $out =~ /x64/ ) {
+	$arch = "x64\\";
+    } elsif ( $out =~ /x86/ ) {
+	$arch = "x86\\";
+    }
     if( $manifest ==1 )
     {
         # source,inputpath,target,action
         my $out = $outfile;
-        $out =~ s/.\\.*Release/\.\.\\\.\.\\\.\.\\bin/;
+        $out =~ s/\.\\((x64|x86)\\)?Release/\.\.\\\.\.\\\.\.\\$1bin/;
         $out =~ s/\$\(OutDir\)/\.\.\\\.\.\\\.\.\\bin/;
         $out =~ s/\//\\/;       # subst / with \
         $outfile =~ s/\//\\/;   # subst / with \
-        createCopySection($outfile,$outfile,$out,"copy \"\$(InputPath)\" .\\..\\..\\..\\bin",\@mak,\%dummy);
+        createCopySection($outfile,$outfile,$out,"copy \"\$(InputPath)\" .\\..\\..\\..\\${arch}bin",\@mak,\%dummy);
         foreach $line(@mak)
         {
             print MAKFILE $line;
@@ -965,7 +976,7 @@ sub create_allinone_all_mak     #09.02.2009 09:22
             #special code snippet
             print ALLMAK "makedata : \n";
             print ALLMAK "     cd \"..\\data\"\n";
-            print ALLMAK "     nmake /f makedata.mak icumake=\$(MAKEDIR)\\..\\data cfg=Release\n";
+            print ALLMAK "     nmake /f makedata.mak icumake=\$(MAKEDIR)\\..\\data cfg=$architecture/Release\n";
             print ALLMAK "     cd \"..\\allinone\"\n\n";
         }
     }
@@ -1007,12 +1018,44 @@ sub start_handler
             $special_file="";
         }
         if ( $ConfigSection && $att eq "Name" && $val eq "Release|Win32" ) {
-            $Release = 1;
-            $config = "Release";                                                             # Release
+	    if ( $architecture eq "x86" ) {
+		$Release = 1;
+		$config = "Release";                                                             # Release
+	    } else {
+		print "Ignoring Configuration $val\n" if ($is_debug);
+		$Release = 2;
+		$config = "Ignored";
+	    }
         }
         if ( $ConfigSection && $att eq "Name" && $val eq "Debug|Win32" ) {
-            $Release = 0;                                                             # Debug
-            $config = "Debug";
+	    if ( $architecture eq "x86" ) {
+		$Release = 0;                                                                    # Debug
+		$config = "Debug";
+	    } else {
+                print "Ignoring Configuration $val\n" if ($is_debug);
+		$Release = 2;
+		$config = "Ignored";
+	    }
+        }
+        if ( $ConfigSection && $att eq "Name" && $val eq "Release|x64" ) {
+	    if ( $architecture eq "x64" ) {
+		$Release = 1;
+		$config = "Release";                                                             # Release
+	    } else {
+                print "Ignoring Configuration $val\n" if ($is_debug);
+		$Release = 2;
+		$config = "Ignored";
+	    }
+        }
+        if ( $ConfigSection && $att eq "Name" && $val eq "Debug|x64" ) {
+	    if ( $architecture eq "x64" ) {
+		$Release = 0;                                                             # Debug
+		$config = "Debug";
+	    } else {
+                print "Ignoring Configuration $val\n" if ($is_debug);
+		$Release = 2;
+		$config = "Ignored";
+	    }
         }
         if ( $att eq "Name" && $val eq "VCCLCompilerTool" ) {
             $CompilerSection = 1;
@@ -1055,6 +1098,10 @@ sub start_handler
            $configelements{$config}{$att} = $val;
         }
         if ( $att eq "OutputFile" && $LinkerSection ) {
+           if ($architecture eq "x64") {
+              # We want the /bin/ subdirectory on all architectures
+              $val =~ s/\\bin64\\/\\bin\\/;
+           }
            $configelements{$config}{$att} = $val;
         }
         if ( $att eq "ProgramDatabaseFile" ) {
diff --git a/main/icu/icu-win-icutu-dll-version.patch b/main/icu/icu-win-icutu-dll-version.patch
new file mode 100644
index 0000000000..887b34db76
--- /dev/null
+++ b/main/icu/icu-win-icutu-dll-version.patch
@@ -0,0 +1,40 @@
+diff -ru misc/icu/source/tools/toolutil/toolutil.vcproj misc/build/icu/source/tools/toolutil/toolutil.vcproj
+--- misc/icu/source/tools/toolutil/toolutil.vcproj	2024-08-27 22:18:58.482995900 +0200
++++ misc/build/icu/source/tools/toolutil/toolutil.vcproj	2024-08-27 22:19:50.449784700 +0200
+@@ -78,7 +78,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				OutputFile="..\..\..\bin\icutu41.dll"
++				OutputFile="..\..\..\bin\icutu42.dll"
+ 				LinkIncremental="1"
+ 				SuppressStartupBanner="true"
+ 				AdditionalLibraryDirectories="..\..\..\lib"
+@@ -174,7 +174,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				OutputFile="..\..\..\bin\icutu41d.dll"
++				OutputFile="..\..\..\bin\icutu42d.dll"
+ 				LinkIncremental="2"
+ 				SuppressStartupBanner="true"
+ 				AdditionalLibraryDirectories="..\..\..\lib"
+@@ -269,7 +269,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				OutputFile="..\..\..\bin64\icutu41.dll"
++				OutputFile="..\..\..\bin64\icutu42.dll"
+ 				LinkIncremental="1"
+ 				SuppressStartupBanner="true"
+ 				AdditionalLibraryDirectories="..\..\..\lib64"
+@@ -367,7 +367,7 @@
+ 			/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+-				OutputFile="..\..\..\bin64\icutu41d.dll"
++				OutputFile="..\..\..\bin64\icutu42d.dll"
+ 				LinkIncremental="2"
+ 				SuppressStartupBanner="true"
+ 				AdditionalLibraryDirectories="..\..\..\lib64"
+Only in misc/build/icu/source/tools/toolutil: toolutil.vcproj~
diff --git a/main/icu/icu-win-layout.patch b/main/icu/icu-win-layout.patch
new file mode 100644
index 0000000000..f755f2c1ec
--- /dev/null
+++ b/main/icu/icu-win-layout.patch
@@ -0,0 +1,11 @@
+diff -ru misc/icu/source/allinone/allinone.sln misc/build/icu/source/allinone/allinone.sln
+--- misc/icu/source/allinone/allinone.sln	2024-09-01 18:02:01.258473600 +0200
++++ misc/build/icu/source/allinone/allinone.sln	2024-09-01 18:02:11.274816100 +0200
+@@ -122,6 +122,7 @@
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "layout", "..\layout\layout.vcproj", "{C920062A-0647-4553-A3B2-37C58065664B}"
+ 	ProjectSection(ProjectDependencies) = postProject
+ 		{73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D} = {73C0A65B-D1F2-4DE1-B3A6-15DAD2C23F3D}
++		{0178B127-6269-407D-B112-93877BB62776} = {0178B127-6269-407D-B112-93877BB62776}
+ 	EndProjectSection
+ EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "layoutex", "..\layoutex\layoutex.vcproj", "{37FC2C7F-1904-4811-8955-2F478830EAD1}"
diff --git a/main/icu/icu4c-4_2_1-src.patch b/main/icu/icu4c-4_2_1-src.patch
new file mode 100644
index 0000000000..0cc5b58b4b
--- /dev/null
+++ b/main/icu/icu4c-4_2_1-src.patch
@@ -0,0 +1,205 @@
+diff -ru misc/icu/source/common/putil.c misc/build/icu/source/common/putil.c
+--- misc/icu/source/common/putil.c	2009-07-01 20:50:38.000000000 +0200
++++ misc/build/icu/source/common/putil.c	2024-06-14 21:17:04.184218726 +0200
+@@ -52,7 +52,7 @@
+ Poorly upgraded Solaris machines can't have this defined.
+ Cleanly installed Solaris can use this #define.
+ */
+-#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L)
++#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #endif
+ 
+diff -ru misc/icu/source/common/uloc.c misc/build/icu/source/common/uloc.c
+--- misc/icu/source/common/uloc.c	2009-07-01 20:50:38.000000000 +0200
++++ misc/build/icu/source/common/uloc.c	2024-06-14 21:25:59.612644465 +0200
+@@ -1736,7 +1736,7 @@
+                 int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n);
+                 len -= variantLen;
+                 if (variantLen > 0) {
+-                    if (name[len-1] == '_') { /* delete trailing '_' */
++                    if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */
+                         --len;
+                     }
+                     addKeyword = VARIANT_MAP[j].keyword;
+@@ -1744,7 +1744,7 @@
+                     break;
+                 }
+             }
+-            if (name[len-1] == '_') { /* delete trailing '_' */
++            if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */
+                 --len;
+             }
+         }
+diff -ru misc/icu/source/config/mh-bsd-gcc misc/build/icu/source/config/mh-bsd-gcc
+--- misc/icu/source/config/mh-bsd-gcc	2009-07-01 20:50:48.000000000 +0200
++++ misc/build/icu/source/config/mh-bsd-gcc	2024-06-14 21:16:18.187059931 +0200
+@@ -18,8 +18,12 @@
+ 
+ ## Compiler switch to embed a runtime search path
+ LD_RPATH=	
+-LD_RPATH_PRE=	-Wl,-rpath,
++LD_RPATH_PRE=	-Wl,-z,origin -Wl,-rpath,
+ 
++## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH
++## (incl. the C++ runtime libs potentially found in the URE lib dir):
++ENABLE_RPATH=YES
++RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'
+ ## Compiler switch to embed a library name
+ LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
+ 
+diff -ru misc/icu/source/config/mh-darwin misc/build/icu/source/config/mh-darwin
+--- misc/icu/source/config/mh-darwin	2009-07-01 20:50:48.000000000 +0200
++++ misc/build/icu/source/config/mh-darwin	2024-06-14 21:19:02.155170814 +0200
+@@ -25,7 +25,7 @@
+ SHLIB.cc=	$(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS)
+ 
+ ## Compiler switches to embed a library name and version information
+-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
++LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(FINAL_SO_TARGET))
+ 
+ ## Compiler switch to embed a runtime search path
+ LD_RPATH=
+@@ -41,10 +41,6 @@
+ ## Non-shared intermediate object suffix
+ STATIC_O = ao
+ 
+-## Override Versioned target for a shared library.
+-FINAL_SO_TARGET=  $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO)
+-MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO)
+-
+ ## Compilation rules
+ %.$(STATIC_O): $(srcdir)/%.c
+ 	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $<
+@@ -76,15 +72,9 @@
+ 
+ ## Versioned libraries rules
+ 
+-%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO)
++%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
+ 	$(RM) $@ && ln -s ${<F} $@
+-%.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO)
+-	$(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@
+-
+-# tzcode option
+-TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED
+-
+-# genren opts
+-GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt'
++%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
++	$(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
+ 
+ ## End Darwin-specific setup
+diff -ru misc/icu/source/config/mh-linux misc/build/icu/source/config/mh-linux
+--- misc/icu/source/config/mh-linux	2009-07-01 20:50:48.000000000 +0200
++++ misc/build/icu/source/config/mh-linux	2024-06-14 21:19:31.827909846 +0200
+@@ -20,6 +20,11 @@
+ LD_RPATH=
+ LD_RPATH_PRE = -Wl,-rpath,
+ 
++## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH
++## (incl. the C++ runtime libs potentially found in the URE lib dir):
++ENABLE_RPATH=YES
++RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'
++
+ ## These are the library specific LDFLAGS
+ LDFLAGSICUDT=-nodefaultlibs -nostdlib
+ 
+diff -ru misc/icu/source/config/mh-mingw misc/build/icu/source/config/mh-mingw
+--- misc/icu/source/config/mh-mingw	2009-07-01 20:50:48.000000000 +0200
++++ misc/build/icu/source/config/mh-mingw	2024-06-14 21:20:44.741721341 +0200
+@@ -76,6 +76,8 @@
+ # Current full path directory for use in source code in a -D compiler option.
+ #CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS
+ CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
++SRCDIR_DEPEND=$(shell cd $(SRCDIR) && pwd)
++DATAFILEPATHS_DEPEND=$(foreach p,$(DATAFILEPATHS),$(shell cd $(dir $(p)) && pwd)/$(notdir $(p)))
+ 
+ ## Compilation rules
+ %.$(STATIC_O): $(srcdir)/%.c
+diff -ru misc/icu/source/config/mh-solaris misc/build/icu/source/config/mh-solaris
+--- misc/icu/source/config/mh-solaris	2009-07-01 20:50:48.000000000 +0200
++++ misc/build/icu/source/config/mh-solaris	2024-06-14 21:22:01.599625394 +0200
+@@ -18,17 +18,21 @@
+ 
+ ## Commands to link
+ ## For Sun Workshop, use CC to link to bring in C++ runtime
+-LINK.c=		$(CXX) $(CXXFLAGS) $(LDFLAGS)
+-LINK.cc=	$(CXX) $(CXXFLAGS) $(LDFLAGS)
++LINK.c=		$(CXX) $(CXXFLAGS) $(LDFLAGS) -norunpath
++LINK.cc=	$(CXX) $(CXXFLAGS) $(LDFLAGS) -norunpath
+ 
+ ## Commands to make a shared library
+ SHLIB.c=	$(CC) $(CFLAGS) $(LDFLAGS) -G
+-SHLIB.cc=	$(CXX) $(CXXFLAGS) $(LDFLAGS) -G
++SHLIB.cc=	$(CXX) $(CXXFLAGS) $(LDFLAGS) -G -norunpath
+ 
+ ## Compiler switch to embed a runtime search path
+ LD_RPATH=	-R
+ LD_RPATH_PRE=	
+ 
++## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH
++ENABLE_RPATH=YES
++RPATHLDFLAGS=${LD_RPATH}'$$ORIGIN'
++
+ #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
+ 
+ ## Compiler switch to embed a library name
+diff -ru misc/icu/source/layout/ArabicShaping.cpp misc/build/icu/source/layout/ArabicShaping.cpp
+--- misc/icu/source/layout/ArabicShaping.cpp	2009-07-01 20:51:24.000000000 +0200
++++ misc/build/icu/source/layout/ArabicShaping.cpp	2024-06-14 21:23:05.557119301 +0200
+@@ -79,7 +79,6 @@
+ #define markFeatureMask 0x00040000UL
+ #define mkmkFeatureMask 0x00020000UL
+ 
+-#define NO_FEATURES   0
+ #define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
+ 
+ #define SHAPE_MASK 0xF0000000UL
+@@ -174,11 +173,7 @@
+         LEUnicode c = chars[in];
+         ShapeType t = getShapeType(c);
+ 
+-        if (t == ST_NOSHAPE_NONE) {
+-            glyphStorage.setAuxData(out, NO_FEATURES, success);
+-        } else {
+-            glyphStorage.setAuxData(out, ISOL_FEATURES, success);
+-        }
++        glyphStorage.setAuxData(out, ISOL_FEATURES, success);
+ 
+         if ((t & MASK_TRANSPARENT) != 0) {
+             continue;
+diff -ru misc/icu/source/tools/genuca/genuca.cpp misc/build/icu/source/tools/genuca/genuca.cpp
+--- misc/icu/source/tools/genuca/genuca.cpp	2009-07-01 20:50:40.000000000 +0200
++++ misc/build/icu/source/tools/genuca/genuca.cpp	2024-06-14 21:27:57.031211233 +0200
+@@ -395,7 +395,7 @@
+                        copyright, status);
+ 
+     if(U_FAILURE(*status)) {
+-        fprintf(stderr, "Error: unable to create %s"INVC_DATA_NAME", error %s\n", outputDir, u_errorName(*status));
++        fprintf(stderr, "Error: unable to create %s" INVC_DATA_NAME ", error %s\n", outputDir, u_errorName(*status));
+         return;
+     }
+ 
+@@ -757,7 +757,7 @@
+                        copyright, status);
+ 
+     if(U_FAILURE(*status)) {
+-        fprintf(stderr, "Error: unable to create %s"UCA_DATA_NAME", error %s\n", outputDir, u_errorName(*status));
++        fprintf(stderr, "Error: unable to create %s" UCA_DATA_NAME ", error %s\n", outputDir, u_errorName(*status));
+         return;
+     }
+ 
+@@ -904,9 +904,9 @@
+       {0x20000, 0x2A6D6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24)  },  //6 CJK_IMPLICIT_TAG,   /* 0x20000-0x2A6D6*/
+       {0x2F800, 0x2FA1D, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24)  },  //7 CJK_IMPLICIT_TAG,   /* 0x2F800-0x2FA1D*/
+ #endif
+-      {0xAC00, 0xD7B0, UCOL_SPECIAL_FLAG | (HANGUL_SYLLABLE_TAG << 24) },  //0 HANGUL_SYLLABLE_TAG,/* AC00-D7AF*/
++      {0xAC00, 0xD7B0, static_cast<int32_t>(UCOL_SPECIAL_FLAG | (HANGUL_SYLLABLE_TAG << 24)) },  //0 HANGUL_SYLLABLE_TAG,/* AC00-D7AF*/
+       //{0xD800, 0xDC00, UCOL_SPECIAL_FLAG | (LEAD_SURROGATE_TAG << 24)  },  //1 LEAD_SURROGATE_TAG,  /* D800-DBFF*/
+-      {0xDC00, 0xE000, UCOL_SPECIAL_FLAG | (TRAIL_SURROGATE_TAG << 24) },  //2 TRAIL_SURROGATE DC00-DFFF
++      {0xDC00, 0xE000, static_cast<int32_t>(UCOL_SPECIAL_FLAG | (TRAIL_SURROGATE_TAG << 24)) },  //2 TRAIL_SURROGATE DC00-DFFF
+       // Now directly handled in the collation code by the swapCJK function. 
+       //{0x3400, 0x4DB6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24)    },  //3 CJK_IMPLICIT_TAG,   /* 0x3400-0x4DB5*/
+       //{0x4E00, 0x9FA6, UCOL_SPECIAL_FLAG | (CJK_IMPLICIT_TAG << 24)    },  //4 CJK_IMPLICIT_TAG,   /* 0x4E00-0x9FA5*/
+
diff --git a/main/icu/icuversion.mk b/main/icu/icuversion.mk
index 43f700d39f..e7ea88296d 100644
--- a/main/icu/icuversion.mk
+++ b/main/icu/icuversion.mk
@@ -23,7 +23,7 @@
 # major 
 ICU_MAJOR*=4
 # minor 
-ICU_MINOR*=0
+ICU_MINOR*=2
 # micro 
 ICU_MICRO*=1
 
diff --git a/main/icu/makefile.mk b/main/icu/makefile.mk
index e8f164caa5..d136e4989c 100644
--- a/main/icu/makefile.mk
+++ b/main/icu/makefile.mk
@@ -35,15 +35,16 @@ TARGET=so_icu
 
 .IF "$(ICU_MICRO)"!="0"
 TARFILE_NAME=icu4c-$(ICU_MAJOR)_$(ICU_MINOR)_$(ICU_MICRO)-src
-TARFILE_MD5=2f6ecca935948f7db92d925d88d0d078
+TARFILE_MD5=e3738abd0d3ce1870dc1fd1f22bba5b1
 .ELSE
 TARFILE_NAME=icu4c-$(ICU_MAJOR)_$(ICU_MINOR)-src
 TARFILE_MD5=
 .ENDIF
 TARFILE_ROOTDIR=icu
 
-PATCH_FILES=${TARFILE_NAME}.patch icu-mp.patch icu-win-layoutex.patch
-
+# TODO file icu-mp.patch does not seem to be required
+PATCH_FILES=${TARFILE_NAME}.patch icu-win-layout.patch \
+	icu-format-security.patch icu-win-icutu-dll-version.patch
 .IF "$(OS)"=="MACOSX"
 PATCH_FILES+=icu-darwin.patch
 .ENDIF
diff --git a/main/icu/prj/d.lst b/main/icu/prj/d.lst
index c5d777277e..f8de4612f6 100644
--- a/main/icu/prj/d.lst
+++ b/main/icu/prj/d.lst
@@ -9,11 +9,11 @@ mkdir: %_DEST%\inc%_EXT%\external\unicode
 ..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a
 ..\%__SRC%\lib\*.lib %_DEST%\lib%_EXT%\*.lib
 
-..\%__SRC%\bin\icudt40.dll %_DEST%\bin%_EXT%\icudt40.dll
-..\%__SRC%\bin\icuin40.dll %_DEST%\bin%_EXT%\icuin40.dll
-..\%__SRC%\bin\icule40.dll %_DEST%\bin%_EXT%\icule40.dll
-..\%__SRC%\bin\icutu40.dll %_DEST%\bin%_EXT%\icutu40.dll
-..\%__SRC%\bin\icuuc40.dll %_DEST%\bin%_EXT%\icuuc40.dll
+..\%__SRC%\bin\icudt42.dll %_DEST%\bin%_EXT%\icudt42.dll
+..\%__SRC%\bin\icuin42.dll %_DEST%\bin%_EXT%\icuin42.dll
+..\%__SRC%\bin\icule42.dll %_DEST%\bin%_EXT%\icule42.dll
+..\%__SRC%\bin\icutu42.dll %_DEST%\bin%_EXT%\icutu42.dll
+..\%__SRC%\bin\icuuc42.dll %_DEST%\bin%_EXT%\icuuc42.dll
 
 ..\%__SRC%\bin\genccode     %_DEST%\bin%_EXT%\genccode
 ..\%__SRC%\bin\genccode.exe %_DEST%\bin%_EXT%\genccode.exe