summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-09 16:08:58 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-11-09 16:08:58 +0000
commit2c92c64be5afdf033f8d21178b02950a379c1fb4 (patch)
treea2a0365e0fc42c4b7a1a854da9d4074643a7ff1b /Build/source/libs
parentbfbe81796df41ce30c05a1dc88bb3147f28837b5 (diff)
update build system
git-svn-id: svn://tug.org/texlive/trunk@15951 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/graphite/engine-2.3.1-PATCHES/ChangeLog16
-rw-r--r--Build/source/libs/graphite/engine-2.3.1-PATCHES/TL-Changes19
-rw-r--r--Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings282
-rw-r--r--Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-02-virtual21
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/ChangeLog132
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/MakeShapingTypeData.pl90
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/TL-Changes15
-rwxr-xr-xBuild/source/libs/icu/icu-4.2.1-PATCHES/fix-case-insensitive25
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-05-auxParam389
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-07-cygwin16
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-08-avoid-rebuild79
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-09-cross22
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-20-fix-gt_ge12
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-21-fix-not_aligned21
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-22-fix-JK-adjust_for_marks31
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos56
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-50-Vertical245
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-60-KernPair61
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-70-Arabic204
-rw-r--r--Build/source/libs/icu/icu-4.2.1-PATCHES/patch-80-Indic28
-rw-r--r--Build/source/libs/teckit/TECkit-2.5.1-PATCHES/ChangeLog23
-rw-r--r--Build/source/libs/teckit/TECkit-2.5.1-PATCHES/TL-Changes51
-rw-r--r--Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-01-debian-50569323
-rw-r--r--Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-02-warning14
-rw-r--r--Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-03-warnings163
25 files changed, 2038 insertions, 0 deletions
diff --git a/Build/source/libs/graphite/engine-2.3.1-PATCHES/ChangeLog b/Build/source/libs/graphite/engine-2.3.1-PATCHES/ChangeLog
new file mode 100644
index 00000000000..a7dc9945a3d
--- /dev/null
+++ b/Build/source/libs/graphite/engine-2.3.1-PATCHES/ChangeLog
@@ -0,0 +1,16 @@
+2009-10-20 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-02-virtual (new): Declare destructors as virtual to
+ avoid compiler warnings.
+
+2009-10-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * TL-changes (new): Modifications applied to the distribution.
+ * patch-[0-9][0-9]-*: Patches applied to the distribution.
+
+2009-10-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-01-warnings (new): Avoid maximal compiler warnings.
+ * src/segment/GrEngine.{cpp,h}, src/segment/FileInput.{cpp,h},
+ src/segment/FontFace.cpp, src/font/TtfUtil.cpp: Constify.
+
diff --git a/Build/source/libs/graphite/engine-2.3.1-PATCHES/TL-Changes b/Build/source/libs/graphite/engine-2.3.1-PATCHES/TL-Changes
new file mode 100644
index 00000000000..c257ea84d64
--- /dev/null
+++ b/Build/source/libs/graphite/engine-2.3.1-PATCHES/TL-Changes
@@ -0,0 +1,19 @@
+Changes applied to the silgraphite-2.3.1/engine/ tree obtained from:
+ http://sourceforge.net/projects/silgraphite/files/silgraphite/
+ 2.3.1/silgraphite-2.3.1.tar.gz/download
+
+Removed:
+ config/
+
+Executed the command:
+ find -type f -perm /111 ! -name configure -exec chmod -c a-x {} \;
+i.e., removed execute permissions from all files except configure.
+
+Converted Dos/Win line ends to native:
+ makefile.vc8
+ test/RegressionTest/RtTextSrc.h
+
+Added newline at end of file:
+ build.bat
+ build_d.bat
+
diff --git a/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings b/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings
new file mode 100644
index 00000000000..79eb38fcdda
--- /dev/null
+++ b/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings
@@ -0,0 +1,282 @@
+diff -ur -N engine-2.3.1.orig/src/font/TtfUtil.cpp engine-2.3.1/src/font/TtfUtil.cpp
+--- engine-2.3.1.orig/src/font/TtfUtil.cpp 2009-01-29 09:33:19.000000000 +0100
++++ engine-2.3.1/src/font/TtfUtil.cpp 2009-10-01 22:48:21.000000000 +0200
+@@ -1223,7 +1223,7 @@
+ (&pGlyph->end_pts_of_contours[cContours]);
+
+ // skip over hints & point to first flag
+- int cbHints = read(*(uint16 *)pbGlyph);
++ int cbHints = read(*(const uint16 *)pbGlyph);
+ pbGlyph += sizeof(uint16);
+ pbGlyph += cbHints;
+
+@@ -1277,7 +1277,7 @@
+ }
+ else
+ {
+- prgnX[iFlag] = read(*(int16 *)pbGlyph);
++ prgnX[iFlag] = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+ }
+ }
+@@ -1306,7 +1306,7 @@
+ }
+ else
+ {
+- prgnY[iFlag] = read(*(int16 *)pbGlyph);
++ prgnY[iFlag] = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+ }
+ }
+@@ -1342,9 +1342,9 @@
+ size_t iCurrentComp = 0;
+ do
+ {
+- GlyphFlags = read(*((uint16 *)pbGlyph));
++ GlyphFlags = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- prgnCompId[iCurrentComp++] = read(*((uint16 *)pbGlyph));
++ prgnCompId[iCurrentComp++] = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ if (iCurrentComp >= cnCompIdTotal)
+ return false;
+@@ -1386,18 +1386,18 @@
+ uint16 GlyphFlags;
+ do
+ {
+- GlyphFlags = read(*((uint16 *)pbGlyph));
++ GlyphFlags = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- if (read(*((uint16 *)pbGlyph)) == nCompId)
++ if (read(*((const uint16 *)pbGlyph)) == nCompId)
+ {
+ pbGlyph += sizeof(uint16); // skip over glyph id of component
+ fOffset = (GlyphFlags & CompoundGlyph::ArgsAreXYValues) == CompoundGlyph::ArgsAreXYValues;
+
+ if (GlyphFlags & CompoundGlyph::Arg1Arg2Words )
+ {
+- a = read(*(int16 *)pbGlyph);
++ a = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+- b = read(*(int16 *)pbGlyph);
++ b = read(*(const int16 *)pbGlyph);
+ pbGlyph += sizeof(int16);
+ }
+ else
+@@ -1451,9 +1451,9 @@
+ uint16 GlyphFlags;
+ do
+ {
+- GlyphFlags = read(*((uint16 *)pbGlyph));
++ GlyphFlags = read(*((const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- if (read(*((uint16 *)pbGlyph)) == nCompId)
++ if (read(*((const uint16 *)pbGlyph)) == nCompId)
+ {
+ pbGlyph += sizeof(uint16); // skip over glyph id of component
+ pbGlyph += GlyphFlags & CompoundGlyph::Arg1Arg2Words ? 4 : 2; // skip over placement data
+@@ -1465,7 +1465,7 @@
+
+ if (GlyphFlags & CompoundGlyph::HaveScale)
+ {
+- flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt11 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ flt12 = 0;
+ flt21 = 0;
+@@ -1473,22 +1473,22 @@
+ }
+ else if (GlyphFlags & CompoundGlyph::HaveXAndYScale)
+ {
+- flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt11 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ flt12 = 0;
+ flt21 = 0;
+- flt22 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt22 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ }
+ else if (GlyphFlags & CompoundGlyph::HaveTwoByTwo)
+ {
+- flt11 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt11 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- flt12 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt12 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- flt21 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt21 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+- flt22 = fixed_to_float<14>(read(*(uint16 *)pbGlyph));
++ flt22 = fixed_to_float<14>(read(*(const uint16 *)pbGlyph));
+ pbGlyph += sizeof(uint16);
+ }
+ else
+diff -ur -N engine-2.3.1.orig/src/segment/FileInput.cpp engine-2.3.1/src/segment/FileInput.cpp
+--- engine-2.3.1.orig/src/segment/FileInput.cpp 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/FileInput.cpp 2009-10-01 23:08:51.000000000 +0200
+@@ -90,7 +90,7 @@
+ /*----------------------------------------------------------------------------------------------
+ Initialize the stream to a buffer.
+ ----------------------------------------------------------------------------------------------*/
+-bool GrBufferIStream::OpenBuffer(byte * pbBuffer, int cb)
++bool GrBufferIStream::OpenBuffer(const byte * pbBuffer, int cb)
+ {
+ Assert(m_pbStart == NULL);
+ Assert(m_pbNext == NULL);
+@@ -133,7 +133,7 @@
+ ----------------------------------------------------------------------------------------------*/
+ short GrBufferIStream::ReadShortFromFont()
+ {
+- short snInput = *(short *)m_pbNext;
++ short snInput = *(const short *)m_pbNext;
+ m_pbNext += isizeof(short);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+@@ -147,7 +147,7 @@
+ ----------------------------------------------------------------------------------------------*/
+ utf16 GrBufferIStream::ReadUShortFromFont()
+ {
+- utf16 chwInput = *(utf16 *)m_pbNext;
++ utf16 chwInput = *(const utf16 *)m_pbNext;
+ m_pbNext += isizeof(utf16);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+@@ -161,7 +161,7 @@
+ ----------------------------------------------------------------------------------------------*/
+ int GrBufferIStream::ReadIntFromFont()
+ {
+- int nInput = *(int *)m_pbNext;
++ int nInput = *(const int *)m_pbNext;
+ m_pbNext += isizeof(int);
+ if (m_pbLim && m_pbNext > m_pbLim)
+ THROW(kresReadFault);
+diff -ur -N engine-2.3.1.orig/src/segment/FileInput.h engine-2.3.1/src/segment/FileInput.h
+--- engine-2.3.1.orig/src/segment/FileInput.h 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/FileInput.h 2009-10-01 23:02:12.000000000 +0200
+@@ -54,7 +54,7 @@
+ virtual void GetPositionInFont(long * plPos) = 0;
+ virtual void SetPositionInFont(long lPos) = 0;
+
+- virtual bool OpenBuffer(byte * pbBuffer, int cb) = 0;
++ virtual bool OpenBuffer(const byte * pbBuffer, int cb) = 0;
+ virtual void CloseBuffer() = 0;
+
+ protected:
+@@ -87,16 +87,16 @@
+ virtual void GetPositionInFont(long * plPos);
+ virtual void SetPositionInFont(long lPos);
+
+- virtual bool OpenBuffer(byte * pbBuffer, int cb);
++ virtual bool OpenBuffer(const byte * pbBuffer, int cb);
+ virtual void CloseBuffer()
+ {
+ Close();
+ }
+
+ protected:
+- byte * m_pbStart;
+- byte * m_pbNext;
+- byte * m_pbLim;
++ const byte * m_pbStart;
++ const byte * m_pbNext;
++ const byte * m_pbLim;
+ };
+
+ } // namespace gr
+diff -ur -N engine-2.3.1.orig/src/segment/FontFace.cpp engine-2.3.1/src/segment/FontFace.cpp
+--- engine-2.3.1.orig/src/segment/FontFace.cpp 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/FontFace.cpp 2009-10-01 23:05:26.000000000 +0200
+@@ -340,9 +340,9 @@
+
+ // ibGlocStart = cbGlatTbl;
+ fOk = CheckTableVersions(&grstrm,
+- (byte *)pSilfTbl, 0,
+- (byte *)pGlocTbl, 0,
+- (byte *)pFeatTbl, 0,
++ (const byte *)pSilfTbl, 0,
++ (const byte *)pGlocTbl, 0,
++ (const byte *)pFeatTbl, 0,
+ &m_fxdBadVersion);
+ if (!fOk)
+ {
+@@ -376,7 +376,7 @@
+ try
+ {
+ // Parse the "Silf" table.
+- grstrm.OpenBuffer((byte*)pSilfTbl, cbSilfSz);
++ grstrm.OpenBuffer((const byte*)pSilfTbl, cbSilfSz);
+ int chwGlyphIDMax, fxdVersion;
+ bool f = ReadSilfTable(grstrm, 0, 0, &chwGlyphIDMax, &fxdVersion);
+ grstrm.Close();
+@@ -391,8 +391,8 @@
+ {
+ GrBufferIStream grstrmGlat;
+
+- grstrm.OpenBuffer((byte *)pGlocTbl, cbGlocSz);
+- grstrmGlat.OpenBuffer((byte *)pGlatTbl, cbGlatSz);
++ grstrm.OpenBuffer((const byte *)pGlocTbl, cbGlocSz);
++ grstrmGlat.OpenBuffer((const byte *)pGlatTbl, cbGlatSz);
+ f = ReadGlocAndGlatTables(grstrm, 0, grstrmGlat, 0, chwGlyphIDMax, fxdVersion);
+ grstrm.Close();
+ grstrmGlat.Close();
+@@ -405,7 +405,7 @@
+ }
+
+ // Parse the "Feat" table.
+- grstrm.OpenBuffer((byte *)pFeatTbl, cbFeatSz);
++ grstrm.OpenBuffer((const byte *)pFeatTbl, cbFeatSz);
+ f = ReadFeatTable(grstrm, 0);
+ grstrm.Close();
+ if (!f)
+@@ -418,7 +418,7 @@
+ // Parse the "Sill" table.
+ if (pSillTbl)
+ {
+- grstrm.OpenBuffer((byte *)pSillTbl, cbFeatSz);
++ grstrm.OpenBuffer((const byte *)pSillTbl, cbFeatSz);
+ f = ReadSillTable(grstrm, 0);
+ grstrm.Close();
+ if (!f)
+@@ -551,7 +551,7 @@
+
+ if (!m_fNameTblCopy)
+ {
+- res = (pNameTbl = (byte *)pfont->getTable(TtfUtil::TableIdTag(ktiName), &cbNameSz)) ? kresOk : kresFail;
++ res = (pNameTbl = (const byte *)pfont->getTable(TtfUtil::TableIdTag(ktiName), &cbNameSz)) ? kresOk : kresFail;
+ fOk = pNameTbl && (cbNameSz == 0 || TtfUtil::CheckTable(ktiName, pNameTbl, cbNameSz));
+ if (!fOk)
+ {
+diff -ur -N engine-2.3.1.orig/src/segment/GrEngine.cpp engine-2.3.1/src/segment/GrEngine.cpp
+--- engine-2.3.1.orig/src/segment/GrEngine.cpp 2009-01-28 03:01:29.000000000 +0100
++++ engine-2.3.1/src/segment/GrEngine.cpp 2009-10-01 23:05:27.000000000 +0200
+@@ -891,9 +891,9 @@
+ implementation of the engine can't handle.
+ ----------------------------------------------------------------------------------------------*/
+ bool GrEngine::CheckTableVersions(GrIStream * pgrstrm,
+- byte *pSilfTbl, int lSilfStart,
+- byte *pGlobTbl, int lGlocStart,
+- byte *pFeatTbl, int lFeatStart,
++ const byte *pSilfTbl, int lSilfStart,
++ const byte *pGlobTbl, int lGlocStart,
++ const byte *pFeatTbl, int lFeatStart,
+ int * pfxdBadVersion)
+ {
+ pgrstrm->OpenBuffer(pSilfTbl, isizeof(int));
+diff -ur -N engine-2.3.1.orig/src/segment/GrEngine.h engine-2.3.1/src/segment/GrEngine.h
+--- engine-2.3.1.orig/src/segment/GrEngine.h 2009-01-21 23:36:42.000000000 +0100
++++ engine-2.3.1/src/segment/GrEngine.h 2009-10-01 23:05:29.000000000 +0200
+@@ -541,9 +541,9 @@
+ void DestroyEverything();
+
+ bool CheckTableVersions(GrIStream * pgrstrm,
+- byte *silf_tbl, int lSilfStart,
+- byte *gloc_tbl, int lGlocStart,
+- byte *feat_tbl, int lFeatStart,
++ const byte *silf_tbl, int lSilfStart,
++ const byte *gloc_tbl, int lGlocStart,
++ const byte *feat_tbl, int lFeatStart,
+ int * pfxdBadVersion);
+ //bool ReadSileTable(GrIStream & grstrm, long lTableSTart,
+ // int * pmFontEmUnits, bool * pfMismatchedBase);
diff --git a/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-02-virtual b/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-02-virtual
new file mode 100644
index 00000000000..9be87c6697c
--- /dev/null
+++ b/Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-02-virtual
@@ -0,0 +1,21 @@
+diff -ur engine-2.3.1.orig/src/segment/GrSlotState.h engine-2.3.1/src/segment/GrSlotState.h
+--- engine-2.3.1.orig/src/segment/GrSlotState.h 2009-01-28 03:01:29.000000000 +0100
++++ engine-2.3.1/src/segment/GrSlotState.h 2009-10-20 01:11:50.000000000 +0200
+@@ -48,7 +48,7 @@
+ {
+ }
+
+- ~GrSlotAbstract()
++ virtual ~GrSlotAbstract()
+ {
+ // the table manager is responsible for destroying the contents of m_prgnVarLenBuf
+ }
+@@ -231,7 +231,7 @@
+ ZapCompositeMetrics();
+ }
+
+- ~GrSlotState()
++ virtual ~GrSlotState()
+ {
+ }
+
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/ChangeLog b/Build/source/libs/icu/icu-4.2.1-PATCHES/ChangeLog
new file mode 100644
index 00000000000..359bd8c440a
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/ChangeLog
@@ -0,0 +1,132 @@
+2009-10-28 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-09-cross (new): Modify AC_CHECK_64BIT_LIBS in aclocal.m4
+ to allow cross compilation.
+
+2009-10-26 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-08-avoid-rebuild (new): Modify data/Makefile.in such
+ that libsicudata.a is not rebuilt again and again.
+
+2009-10-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Imported icu-4.2.1 source tree (icu4c-4_2_1-src.tgz) from:
+ http://download.icu-project.org/files/icu4c/4.2.1/
+
+ * patch-02-syntax, patch-40-Shaping (both removed): Obsolete.
+
+ * TL-Changes, patch-80-Indic: Adapted.
+
+2009-10-24 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Imported icu-4.0.1 source tree (icu4c-4_0_1-src.tgz) from:
+ http://download.icu-project.org/files/icu4c/4.0.1/
+
+ * patch-01-backport-4.0.1, patch-01-too_much-4.0.1,
+ patch-06-build-fix, patch-06-partial-4.0.1,
+ patch-10-backport-4.0.1, patch-11-partial-4.0.1,
+ patch-99-test (all removed): Obsolete.
+
+ * TL-Changes, patch-40-Shaping, patch-80-Indic: Adapted.
+
+2009-10-23 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Imported icu-3.8.1 source tree (icu4c-3_8_1-src.tgz) from:
+ http://download.icu-project.org/files/icu4c/3.8.1/
+
+ * TL-Changes (new): Description of modifications of source tree.
+
+ * fix-case-insensitive (new): Shell script used to rename
+ source/layout/Features.h => ICUFeatures.h (required for Cygwin)
+ and modify references to that file accordingly.
+
+ * patch-01-backport-4.0.1 (new): Replace layout/CanonData.cpp,
+ layout/GlyphPositionAdjustments.cpp,
+ layout/IndicReordering.{cpp,h}, layout/LELanguages.h,
+ layout/LESwaps.h, layout/OpenTypeLayoutEngine.cpp,
+ layout/ScriptAndLanguage.cpp, layout/ThaiLayoutEngine.{cpp,h},
+ layoutex/ParagraphLayout.cpp, and test/letest/sfnt.h by their
+ 4.0.1 versions.
+ * patch-01-too_much-4.0.1 (new): Undo one change in
+ layoutex/ParagraphLayout.cpp.
+
+ * patch-02-syntax (new): Fix some dubious syntax in
+ layoutex/ParagraphLayout.cpp.
+
+ * patch-05-auxParam (new): Handling of extension for XeTeX in
+ layout/AlternateSubstSubtables.cpp,
+ layout/GlyphIterator.{cpp,h},
+ layout/LEGlyphStorage.{cpp,h},
+ and layout/OpenTypeLayoutEngine.{cpp,h}.
+
+ * patch-06-build-fix (new): Build fix in common/ubidi.c.
+ * patch-06-partial-4.0.1 (new): Partial backport of common/putil.c
+ from 4.0.1.
+ * patch-07-cygwin (new): Changes in config/mh-cygwin (libraries
+ named as for everyone else).
+
+ * patch-10-backport-4.0.1 (new): Replace
+ layout/ScriptAndLanguageTags.{cpp,h} by their 4.0.1 versions.
+ * patch-11-partial-4.0.1 (new): Backport of some changes in
+ layout/LayoutEngine.cpp from 4.0.1.
+
+ Bug fixes originally by: Jonathan Kew <jfkthame@googlemail.com>
+ * patch-20-fix-gt_ge (new): In layout/ClassDefinitionTables.cpp.
+ * patch-21-fix-not_aligned (new): In layout/ExtensionSubtables.cpp.
+ * patch-22-fix-JK-adjust_for_marks (new): In
+ layout/MarkToBasePosnSubtables.cpp.
+ * patch-23-fix-JK-GlyphPos (new): In
+ layout/OpenTypeLayoutEngine.cpp.
+
+ * patch-40-Shaping (new): Update shaping type data in
+ layout/ShapingTypeData.cpp to Unicode 5.1.
+
+ * patch-50-Vertical (new): Handling vertical writing in
+ layout/LEFontInstance.h and layout/ValueRecords.cpp.
+
+ * patch-60-KernPair (new): Modified handling of kerns in
+ layout/LEFontInstance.{cpp,h} and layout/LayoutEngine.cpp.
+
+ * patch-70-Arabic (new): Add Draft Mongolian shaping classes
+ in layout/ArabicShaping.{cpp,h} and LayoutEngine.cpp.
+
+ * patch-80-Indic (new): Backport of some changes in
+ layout/IndicClassTables.cpp from 4.0.1 and in
+ layout/IndicReordering.cpp from 4.2.1.
+
+ * patch-99-test (new): Changes from TeX Live icu-xetex in
+ test/letest/PortableFontInstance.{cpp,h},
+ test/letest/gendata.{cpp,xml}, test/letest/letest.{cpp,xml}.
+
+ These modifications and patches of icu-3.8.1/ reproduce the
+ previous icu-xetex/ source tree (except for test data).
+
+2009-10-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Slightly rearranged the icu-xetex/ source tree.
+
+ * layout/LELanguages.h: Changed some comments, from 4.0.1.
+
+ * layout/LEGlyphStorage.{cpp,h},
+ layout/OpenTypeLayoutEngine.cpp: Renamed adoptAuxDataArrays
+ back to adoptAuxDataArray as it was in 3.8.1.
+
+ * layout/LEGlyphStorage.h: The XeTeX modifications have added
+ an additional parameter for setAuxData, however, in most cases
+ the corresponding argument is NULL. Added an inline definition
+ of the original method.
+ layout/ArabicShaping.cpp, layout/HanLayoutEngine.cpp,
+ layout/HangulLayoutEngine.cpp, layout/IndicReordering.cpp,
+ layout/KhmerReordering.cpp, layout/LayoutEngine.cpp,
+ layout/TibetanReordering.cpp: Restored the original 3.8.1 use of
+ setAuxData without the additional argument NULL.
+
+ * data/Makefile.in: Restored 3.8.1 version, Autoconf >=2.61 ensures
+ a posix shell making, these changes obsolete.
+
+ * layout/ScriptAndLanguageTags.{cpp,h}: Backport from 4.0.1,
+ additional tags and changed comments.
+
+ * layout/OpenTypeLayoutEngine.cpp: Removed some obsolete code,
+ surrounded by #if 0...#endif.
+
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/MakeShapingTypeData.pl b/Build/source/libs/icu/icu-4.2.1-PATCHES/MakeShapingTypeData.pl
new file mode 100644
index 00000000000..e8e5a105082
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/MakeShapingTypeData.pl
@@ -0,0 +1,90 @@
+#! /usr/bin/perl
+
+# script to create ShapingTypeData.cpp from UCD file DerivedJoiningType.txt
+# written by JK, 2007-01-16
+# This script may be distributed and used freely
+
+%types = (
+ 'C' => 1,
+ 'D' => 2,
+ 'R' => 4,
+ 'T' => 5
+);
+
+@ranges = ();
+
+sub addRange
+{
+ my ($s, $e, $t) = @_;
+
+ if ((scalar @ranges > 0)
+ && ($ranges[$#ranges]->[2] == $t)
+ && ($ranges[$#ranges]->[1] == $s - 1)) {
+ $ranges[$#ranges]->[1] = $e;
+ return;
+ }
+
+ push @ranges, [ $s, $e, $t ];
+}
+
+# read the DerivedJoiningType.txt file and remember all the ranges
+while (<>) {
+ if (m/^([0-9A-F]{4})\s+; ([CDRT]) \#/) {
+ # single codepoint
+ $start = hex $1;
+ $end = $start;
+ $type = $types{$2};
+ addRange($start, $end, $type);
+ next;
+ }
+ if (m/^([0-9A-F]{4})\.\.([0-9A-F]{4})\s+; ([CDRT]) \#/) {
+ # range of codes
+ $start = hex $1;
+ $end = hex $2;
+ $type = $types{$3};
+ addRange($start, $end, $type);
+ next;
+ }
+}
+
+# write the ShapingTypeData.cpp file
+
+$date = `date +"%F %T %Z"`;
+print <<__EOT__;
+/*
+ *
+ * (C) Copyright SIL International. 2007-2008.
+ * (C) Copyright IBM Corp. 1998-2005.
+ * Based on code distributed with ICU 3.6
+ * and the Unicode Character Database, version 5.1.0d10
+ *
+ * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS
+ * YOU REALLY KNOW WHAT YOU'RE DOING.
+ *
+ * Generated on: $date
+ */
+
+#include "LETypes.h"
+#include "ArabicShaping.h"
+
+U_NAMESPACE_BEGIN
+
+const le_uint8 ArabicShaping::shapingTypeTable[] = {
+__EOT__
+
+printf " 0x%02X, 0x%02X, /* classFormat */\n", 0, 2;
+printf " 0x%02X, 0x%02X, /* classRangeCount */\n",
+ (scalar @ranges) / 256, (scalar @ranges) % 256;
+print join(",\n", map {
+ sprintf " 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X, 0x%02X",
+ $_->[0] / 256, $_->[0] % 256,
+ $_->[1] / 256, $_->[1] % 256,
+ $_->[2] / 256, $_->[2] % 256,
+ } sort { $a->[0] <=> $b->[0] } @ranges);
+
+print <<__EOT__;
+
+};
+
+U_NAMESPACE_END
+__EOT__
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/TL-Changes b/Build/source/libs/icu/icu-4.2.1-PATCHES/TL-Changes
new file mode 100644
index 00000000000..b5affa2e3b6
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/TL-Changes
@@ -0,0 +1,15 @@
+Changes applied to the icu-4.2.1/ tree as obtained from:
+ http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz
+
+Rebuilt source/configure with Autoconf 2.63.
+
+Updated:
+ source/config.guess
+ source/config.sub
+ source/install-sh
+ source/mkinstalldirs
+
+Run the shell script fix-case-insensitive to rename
+ source/layout/Features.h => ICUFeatures.h
+and modify references to that file accordingly.
+
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/fix-case-insensitive b/Build/source/libs/icu/icu-4.2.1-PATCHES/fix-case-insensitive
new file mode 100755
index 00000000000..da968babade
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/fix-case-insensitive
@@ -0,0 +1,25 @@
+#! /bin/sh
+#
+# On a case insensitive filesystem, e.g., in cygwin on a Win host, the
+# header name "Features.h" conflicts with "features.h" of GNU libc.
+#
+# A logical replacement would be "LEFeatures.h", however, that would
+# imply to install this header.
+#
+# Thus, this srcipt renames Features.h=>ICUFeatures.h and modifies
+# all occurences of that filename accordingly.
+
+file=`find -name Features.h`
+test -n "$file" || exit
+
+sed 's/__FEATURES_H/__ICUFEATURES_H/' $file >$file.tmp
+touch -r $file $file.tmp
+mv -f $file.tmp `echo $file | sed 's/Features.h/ICUFeatures.h/'`
+rm -f $file
+
+
+for file in `grep -rl 'Features\.h' .`; do
+ sed 's/\([\\"]\)Features\.h/\1ICUFeatures.h/' $file >$file.tmp
+ touch -r $file $file.tmp
+ mv -f $file.tmp $file
+done
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-05-auxParam b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-05-auxParam
new file mode 100644
index 00000000000..c68d525e3e3
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-05-auxParam
@@ -0,0 +1,389 @@
+diff -ur icu-4.2.1.orig/source/layout/AlternateSubstSubtables.cpp icu-4.2.1/source/layout/AlternateSubstSubtables.cpp
+--- icu-4.2.1.orig/source/layout/AlternateSubstSubtables.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/AlternateSubstSubtables.cpp 2009-10-23 00:00:56.000000000 +0200
+@@ -27,13 +27,20 @@
+ Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]);
+ const AlternateSetTable *alternateSetTable =
+ (const AlternateSetTable *) ((char *) this + alternateSetTableOffset);
+- TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]);
++ le_int32 altIndex = glyphIterator->getFeatureParam();
+
+- if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) {
+- glyphIterator->setCurrGlyphID(SWAPW(alternateSetTable->alternateArray[0]));
++ if (altIndex < SWAPW(alternateSetTable->glyphCount)) {
++ TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[altIndex]);
++
++ if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) {
++ glyphIterator->setCurrGlyphID(alternate);
++ }
++
++ return 1;
+ }
+-
+- return 1;
++
++ // feature param was out of range for the glyph
++ return 0;
+ }
+
+ // XXXX If we get here, the table's mal-formed...
+diff -ur icu-4.2.1.orig/source/layout/GlyphIterator.cpp icu-4.2.1/source/layout/GlyphIterator.cpp
+--- icu-4.2.1.orig/source/layout/GlyphIterator.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/GlyphIterator.cpp 2009-10-23 00:00:56.000000000 +0200
+@@ -19,7 +19,7 @@
+ FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader)
+ : direction(1), position(-1), nextLimit(-1), prevLimit(-1),
+ glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments),
+- srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), glyphGroup(0),
++ srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), featureParam(0), glyphGroup(0),
+ glyphClassDefinitionTable(NULL), markAttachClassDefinitionTable(NULL)
+
+ {
+@@ -53,12 +53,13 @@
+ destIndex = that.destIndex;
+ lookupFlags = that.lookupFlags;
+ featureMask = that.featureMask;
++ featureParam = that.featureParam;
+ glyphGroup = that.glyphGroup;
+ glyphClassDefinitionTable = that.glyphClassDefinitionTable;
+ markAttachClassDefinitionTable = that.markAttachClassDefinitionTable;
+ }
+
+-GlyphIterator::GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask)
++GlyphIterator::GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask, le_int32 newFeatureParam)
+ : glyphStorage(that.glyphStorage)
+ {
+ direction = that.direction;
+@@ -71,6 +72,7 @@
+ destIndex = that.destIndex;
+ lookupFlags = that.lookupFlags;
+ featureMask = newFeatureMask;
++ featureParam = newFeatureParam;
+ glyphGroup = 0;
+ glyphClassDefinitionTable = that.glyphClassDefinitionTable;
+ markAttachClassDefinitionTable = that.markAttachClassDefinitionTable;
+@@ -89,6 +91,7 @@
+ destIndex = that.destIndex;
+ lookupFlags = newLookupFlags;
+ featureMask = that.featureMask;
++ featureParam = that.featureParam;
+ glyphGroup = that.glyphGroup;
+ glyphClassDefinitionTable = that.glyphClassDefinitionTable;
+ markAttachClassDefinitionTable = that.markAttachClassDefinitionTable;
+@@ -103,6 +106,7 @@
+ {
+ position = prevLimit;
+ featureMask = newFeatureMask;
++ featureParam = 0;
+ glyphGroup = 0;
+ lookupFlags = newLookupFlags;
+ }
+@@ -130,6 +134,11 @@
+ return position;
+ }
+
++le_int32 GlyphIterator::getFeatureParam() const
++{
++ return featureParam;
++}
++
+ le_bool GlyphIterator::isRightToLeft() const
+ {
+ return direction < 0;
+@@ -400,8 +409,10 @@
+ }
+ }
+
+-le_bool GlyphIterator::hasFeatureTag(le_bool matchGroup) const
++le_bool GlyphIterator::hasFeatureTag(le_bool matchGroup)
+ {
++ featureParam = 0;
++
+ if (featureMask == 0) {
+ return TRUE;
+ }
+@@ -409,7 +420,20 @@
+ LEErrorCode success = LE_NO_ERROR;
+ FeatureMask fm = glyphStorage.getAuxData(position, success);
+
+- return ((fm & featureMask) == featureMask) && (!matchGroup || (le_int32)(fm & LE_GLYPH_GROUP_MASK) == glyphGroup);
++ if (((fm & featureMask) == featureMask) && (!matchGroup || (le_int32)(fm & LE_GLYPH_GROUP_MASK) == glyphGroup)) {
++ const le_int32 *paramList = (const le_int32 *) glyphStorage.getAuxParam(position, success);
++ if (paramList != NULL) {
++ fm = featureMask;
++ while ((fm & 0x80000000UL) == 0) {
++ ++paramList;
++ fm <<= 1;
++ }
++ featureParam = *paramList;
++ }
++ return TRUE;
++ }
++
++ return FALSE;
+ }
+
+ le_bool GlyphIterator::findFeatureTag()
+diff -ur icu-4.2.1.orig/source/layout/GlyphIterator.h icu-4.2.1/source/layout/GlyphIterator.h
+--- icu-4.2.1.orig/source/layout/GlyphIterator.h 2009-07-01 20:51:26.000000000 +0200
++++ icu-4.2.1/source/layout/GlyphIterator.h 2009-10-23 00:00:56.000000000 +0200
+@@ -28,7 +28,7 @@
+
+ GlyphIterator(GlyphIterator &that);
+
+- GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask);
++ GlyphIterator(GlyphIterator &that, FeatureMask newFeatureMask, le_int32 featureParam = 0);
+
+ GlyphIterator(GlyphIterator &that, le_uint16 newLookupFlags);
+
+@@ -51,6 +51,8 @@
+ le_int32 getMarkComponent(le_int32 markPosition) const;
+ le_bool findMark2Glyph();
+
++ le_int32 getFeatureParam() const;
++
+ void getCursiveEntryPoint(LEPoint &entryPoint) const;
+ void getCursiveExitPoint(LEPoint &exitPoint) const;
+
+@@ -74,7 +76,7 @@
+
+ private:
+ le_bool filterGlyph(le_uint32 index) const;
+- le_bool hasFeatureTag(le_bool matchGroup) const;
++ le_bool hasFeatureTag(le_bool matchGroup); /* not const because it updates the featureParam field */
+ le_bool nextInternal(le_uint32 delta = 1);
+ le_bool prevInternal(le_uint32 delta = 1);
+
+@@ -92,6 +94,7 @@
+ FeatureMask featureMask;
+ le_int32 glyphGroup;
+
++ le_int32 featureParam;
+ const GlyphClassDefinitionTable *glyphClassDefinitionTable;
+ const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable;
+
+diff -ur icu-4.2.1.orig/source/layout/LEGlyphStorage.cpp icu-4.2.1/source/layout/LEGlyphStorage.cpp
+--- icu-4.2.1.orig/source/layout/LEGlyphStorage.cpp 2009-07-01 20:51:26.000000000 +0200
++++ icu-4.2.1/source/layout/LEGlyphStorage.cpp 2009-10-23 00:00:56.000000000 +0200
+@@ -20,7 +20,7 @@
+
+ LEGlyphStorage::LEGlyphStorage()
+ : fGlyphCount(0), fGlyphs(NULL), fCharIndices(NULL), fPositions(NULL),
+- fAuxData(NULL), fInsertionList(NULL), fSrcIndex(0), fDestIndex(0)
++ fAuxData(NULL), fAuxParam(NULL), fInsertionList(NULL), fSrcIndex(0), fDestIndex(0)
+ {
+ // nothing else to do!
+ }
+@@ -44,6 +44,11 @@
+ fAuxData = NULL;
+ }
+
++ if (fAuxParam != NULL) {
++ LE_DELETE_ARRAY(fAuxParam);
++ fAuxParam = NULL;
++ }
++
+ if (fInsertionList != NULL) {
+ delete fInsertionList;
+ fInsertionList = NULL;
+@@ -151,14 +156,15 @@
+ return -1;
+ }
+
+- if (fAuxData != NULL) {
++ if (fAuxData != NULL || fAuxParam != NULL) {
+ success = LE_INTERNAL_ERROR;
+ return -1;
+ }
+
+ fAuxData = LE_NEW_ARRAY(le_uint32, fGlyphCount);
++ fAuxParam = LE_NEW_ARRAY(void *, fGlyphCount);
+
+- if (fAuxData == NULL) {
++ if (fAuxData == NULL || fAuxParam == NULL) {
+ success = LE_MEMORY_ALLOCATION_ERROR;
+ return -1;
+ }
+@@ -365,13 +371,32 @@
+ return fAuxData[glyphIndex];
+ }
+
+-void LEGlyphStorage::setAuxData(le_int32 glyphIndex, le_uint32 auxData, LEErrorCode &success)
++void *LEGlyphStorage::getAuxParam(le_int32 glyphIndex, LEErrorCode &success) const
++{
++ if (LE_FAILURE(success)) {
++ return NULL;
++ }
++
++ if (fAuxParam == NULL) {
++ success = LE_NO_LAYOUT_ERROR;
++ return NULL;
++ }
++
++ if (glyphIndex < 0 || glyphIndex >= fGlyphCount) {
++ success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
++ return NULL;
++ }
++
++ return fAuxParam[glyphIndex];
++}
++
++void LEGlyphStorage::setAuxData(le_int32 glyphIndex, le_uint32 auxData, void *auxParam, LEErrorCode &success)
+ {
+ if (LE_FAILURE(success)) {
+ return;
+ }
+
+- if (fAuxData == NULL) {
++ if (fAuxData == NULL || fAuxParam == NULL) {
+ success = LE_NO_LAYOUT_ERROR;
+ return;
+ }
+@@ -382,6 +407,7 @@
+ }
+
+ fAuxData[glyphIndex] = auxData;
++ fAuxParam[glyphIndex] = auxParam;
+ }
+
+ void LEGlyphStorage::getGlyphPositions(float positions[], LEErrorCode &success) const
+@@ -496,8 +522,14 @@
+ LE_DELETE_ARRAY(fAuxData);
+ }
+
++ if (fAuxParam != NULL) {
++ LE_DELETE_ARRAY(fAuxParam);
++ }
++
+ fAuxData = from.fAuxData;
+ from.fAuxData = NULL;
++ fAuxParam = from.fAuxParam;
++ from.fAuxParam = NULL;
+ }
+
+ void LEGlyphStorage::adoptGlyphCount(LEGlyphStorage &from)
+@@ -590,6 +622,10 @@
+ fGlyphs = newGlyphs;
+ fCharIndices = newCharIndices;
+
++ if (fAuxParam != NULL) {
++ fAuxParam = (void **) LE_GROW_ARRAY(fAuxParam, newGlyphCount);
++ }
++
+ fSrcIndex = fGlyphCount - 1;
+ fDestIndex = newGlyphCount - 1;
+
+@@ -642,6 +678,18 @@
+ }
+ }
+
++ if (fAuxParam != NULL) {
++ le_int32 src = fSrcIndex, dest = fDestIndex;
++
++ while (src > atPosition) {
++ fAuxParam[dest--] = fAuxParam[src--];
++ }
++
++ for (le_int32 i = count - 1; i >= 0; i -= 1) {
++ fAuxParam[dest--] = fAuxParam[atPosition];
++ }
++ }
++
+ while (fSrcIndex > atPosition) {
+ fGlyphs[fDestIndex] = fGlyphs[fSrcIndex];
+ fCharIndices[fDestIndex] = fCharIndices[fSrcIndex];
+diff -ur icu-4.2.1.orig/source/layout/LEGlyphStorage.h icu-4.2.1/source/layout/LEGlyphStorage.h
+--- icu-4.2.1.orig/source/layout/LEGlyphStorage.h 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/LEGlyphStorage.h 2009-10-23 00:00:56.000000000 +0200
+@@ -63,12 +63,12 @@
+ float *fPositions;
+
+ /**
+- * The auxillary data array.
++ * The auxiliary data arrays.
+ *
+ * @internal
+ */
+ le_uint32 *fAuxData;
+-
++ void **fAuxParam;
+
+ /**
+ * The insertion list, used to grow the above arrays.
+@@ -299,6 +299,7 @@
+ * @stable ICU 3.6
+ */
+ le_uint32 getAuxData(le_int32 glyphIndex, LEErrorCode &success) const;
++ void *getAuxParam(le_int32 glyphIndex, LEErrorCode &success) const;
+
+ /**
+ * This operator allows direct access to the glyph array
+@@ -428,15 +429,20 @@
+ void adjustPosition(le_int32 glyphIndex, float xAdjust, float yAdjust, LEErrorCode &success);
+
+ /**
+- * Set the auxillary data for a particular glyph.
++ * Set the auxiliary data for a particular glyph.
+ *
+ * @param glyphIndex the index of the glyph
+- * @param auxData the new auxillary data
+- * @param success will be set to an error code if the auxillary data cannot be set.
++ * @param auxData the new auxiliary data
++ * @param auxParam the new secondary auxiliary data (parameter)
++ * @param success will be set to an error code if the auxiliary data cannot be set.
+ *
+- * @stable ICU 3.6
++ * @stable ICU 3.6 - mod for XeTeX
++ */
++ void setAuxData(le_int32 glyphIndex, le_uint32 auxData, void *auxParam, LEErrorCode &success);
++ /**
++ * The common case when @param auxParam is <code>NULL</code>.
+ */
+- void setAuxData(le_int32 glyphIndex, le_uint32 auxData, LEErrorCode &success);
++ inline void setAuxData(le_int32 glyphIndex, le_uint32 auxData, LEErrorCode &success);
+
+ /**
+ * Delete the glyph array and replace it with the one
+@@ -541,6 +547,10 @@
+ return fGlyphs[glyphIndex];
+ }
+
++inline void LEGlyphStorage::setAuxData(le_int32 glyphIndex, le_uint32 auxData, LEErrorCode &success)
++{
++ setAuxData(glyphIndex, auxData, NULL, success);
++}
+
+ U_NAMESPACE_END
+ #endif
+diff -ur icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.cpp icu-4.2.1/source/layout/OpenTypeLayoutEngine.cpp
+--- icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/OpenTypeLayoutEngine.cpp 2009-10-23 00:04:31.000000000 +0200
+@@ -73,7 +73,7 @@
+ OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode,
+ le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success)
+ : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fFeatureMask(minimalFeatures),
+- fFeatureMap(featureMap), fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
++ fFeatureMap(featureMap), fFeatureParamList(NULL), fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE),
+ fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL)
+ {
+ static const le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG;
+@@ -200,7 +200,7 @@
+ glyphStorage.allocateAuxData(success);
+
+ for (le_int32 i = 0; i < count; i += 1) {
+- glyphStorage.setAuxData(i, fFeatureMask, success);
++ glyphStorage.setAuxData(i, fFeatureMask, (void *) fFeatureParamList, success);
+ }
+
+ return count;
+diff -ur icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.h icu-4.2.1/source/layout/OpenTypeLayoutEngine.h
+--- icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.h 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/OpenTypeLayoutEngine.h 2009-10-23 00:00:56.000000000 +0200
+@@ -176,6 +176,7 @@
+ * @internal
+ */
+ const FeatureMap *fFeatureMap;
++ const le_int32 *fFeatureParamList;
+
+ /**
+ * The length of the feature map.
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-07-cygwin b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-07-cygwin
new file mode 100644
index 00000000000..540b413dc18
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-07-cygwin
@@ -0,0 +1,16 @@
+ We don't want this for TeX Live.
+
+diff -ur icu-4.2.1.orig/source/config/mh-cygwin icu-4.2.1/source/config/mh-cygwin
+--- icu-4.2.1.orig/source/config/mh-cygwin 2009-07-01 20:50:48.000000000 +0200
++++ icu-4.2.1/source/config/mh-cygwin 2009-10-22 23:26:13.000000000 +0200
+@@ -55,10 +55,6 @@
+ ## To have an import library is better on Cygwin
+ IMPORT_LIB_EXT = .dll.a
+
+-# Change the stubnames so that poorly working FAT disks and installation programs can work.
+-# This is also for backwards compatibility.
+-DATA_STUBNAME = dt
+-I18N_STUBNAME = in
+
+ ## Compilation rules
+ %.$(STATIC_O): $(srcdir)/%.c
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-08-avoid-rebuild b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-08-avoid-rebuild
new file mode 100644
index 00000000000..9c722e2081e
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-08-avoid-rebuild
@@ -0,0 +1,79 @@
+ Avoid to rebuild libsicudata.a again and again.
+
+diff -ur icu-4.2.1.orig/source/data/Makefile.in icu-4.2.1/source/data/Makefile.in
+--- icu-4.2.1.orig/source/data/Makefile.in 2009-07-01 20:51:20.000000000 +0200
++++ icu-4.2.1/source/data/Makefile.in 2009-10-26 12:10:19.000000000 +0100
+@@ -90,7 +90,7 @@
+ .PHONY : all all-local all-recursive install install-local install-files \
+ install-recursive clean clean-local clean-recursive distclean \
+ distclean-local distclean-recursive dist dist-local dist-recursive \
+-check check-local check-recursive build-local clean-resindex build-dir
++check check-local check-recursive clean-resindex
+
+ ## Clear suffix list
+ .SUFFIXES :
+@@ -115,6 +115,7 @@
+ -test -z *.map || $(RMV) *.map
+
+ clean-local: cleanpackage cleanfiles clean-map
++ $(RMV) build-dir* build-local packagedata uni-core-data
+
+ cleanfiles:
+ test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
+@@ -159,6 +160,7 @@
+ else
+ $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR)
+ endif
++ echo timestamp > $@
+
+ ## Install ICU data.
+ install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata $(OS390INSTALL)
+@@ -345,6 +347,7 @@
+ ifneq ($(INCLUDE_UNI_CORE_DATA),)
+ ALL_FILES_LIST+=$(UNI_CORE_DATA)
+ build-local: uni-core-data
++ echo timestamp > $@
+ endif
+
+ #####################################################
+@@ -355,6 +358,7 @@
+
+ ifeq ($(ICUDATA_SOURCE_ARCHIVE),)
+ build-local: build-dir $(SO_VERSION_DATA) $(ALL_FILES) $(PKGDATA_LIST) $(OS390LIST)
++ echo timestamp > $@
+ $(PKGDATA_LIST): $(SRCLISTDEPS)
+ @echo "generating $@ (list of data files)"
+ @-$(RMV) $@
+@@ -363,6 +367,7 @@
+ done;
+ else
+ build-local: build-dir $(SO_VERSION_DATA) $(PKGDATA_LIST) $(OS390LIST)
++ echo timestamp > $@
+ $(PKGDATA_LIST): $(SRCLISTDEPS) $(ICUDATA_SOURCE_ARCHIVE)
+ ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
+ @echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)"
+@@ -377,6 +382,8 @@
+ $(BUILD_DIRS): build-dir
+
+ build-dir:
++ @-$(RMV) $@
++ echo timestamp > $@.tmp
+ @list='$(BUILD_DIRS)'; \
+ for dir in $$list; do \
+ if ! test -d $$dir; then \
+@@ -384,6 +391,7 @@
+ $(MKINSTALLDIRS) $(BUILD_DIRS); \
+ fi; \
+ done
++ mv $@.tmp $@
+
+ # The | is an order-only prerequisite. This helps when the -j option is used,
+ # and we don't want the files to be built before the directories are built.
+@@ -599,6 +607,7 @@
+ uni-core-data: build-dir $(UNI_CORE_TARGET_DATA)
+ @echo Unicode .icu files built to $(BUILDDIR)
+ @echo Unicode .c source files built to $(OUTTMPDIR)
++ echo timestamp > $@
+
+ build-icu4j: all
+ $(MAKE) -C ../tools/genrb $@
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-09-cross b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-09-cross
new file mode 100644
index 00000000000..db9d037a273
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-09-cross
@@ -0,0 +1,22 @@
+ Replace AC_RUN_IFELSE by AC_CHECK_SIZEOF for cross compilation.
+
+diff -ur icu-4.2.1.orig/source/aclocal.m4 icu-4.2.1/source/aclocal.m4
+--- icu-4.2.1.orig/source/aclocal.m4 2009-07-01 20:51:26.000000000 +0200
++++ icu-4.2.1/source/aclocal.m4 2009-10-28 20:38:09.000000000 +0100
+@@ -149,10 +149,13 @@
+ if test "$cross_compiling" = "yes" -a "${BITS_REQ}" != "nochange"; then
+ AC_MSG_ERROR([Don't specify bitness when cross compiling. See readme.html for help with cross compilation., and set compiler options manually.])
+ fi
+- DEFAULT_64BIT=no
++ AC_CHECK_SIZEOF([void *])
+ AC_MSG_CHECKING([whether runnable 64 bit binaries are built by default])
+- AC_RUN_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
+- DEFAULT_64BIT=yes, DEFAULT_64BIT=no, DEFAULT_64BIT=unknown)
++ case $ac_cv_sizeof_void_p in
++ 8) DEFAULT_64BIT=yes ;;
++ 4) DEFAULT_64BIT=no ;;
++ *) DEFAULT_64BIT=unknown
++ esac
+ BITS_GOT=unknown
+
+ # 'OK' here means, we can exit any further checking, everything's copa
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-20-fix-gt_ge b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-20-fix-gt_ge
new file mode 100644
index 00000000000..445aa07d7e5
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-20-fix-gt_ge
@@ -0,0 +1,12 @@
+diff -ur icu-4.2.1.orig/source/layout/ClassDefinitionTables.cpp icu-4.2.1/source/layout/ClassDefinitionTables.cpp
+--- icu-4.2.1.orig/source/layout/ClassDefinitionTables.cpp 2009-07-01 20:51:26.000000000 +0200
++++ icu-4.2.1/source/layout/ClassDefinitionTables.cpp 2009-10-22 23:15:27.000000000 +0200
+@@ -68,7 +68,7 @@
+ TTGlyphID firstGlyph = SWAPW(startGlyph);
+ TTGlyphID lastGlyph = firstGlyph + SWAPW(glyphCount);
+
+- if (ttGlyphID > firstGlyph && ttGlyphID < lastGlyph) {
++ if (ttGlyphID >= firstGlyph && ttGlyphID < lastGlyph) {
+ return SWAPW(classValueArray[ttGlyphID - firstGlyph]);
+ }
+
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-21-fix-not_aligned b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-21-fix-not_aligned
new file mode 100644
index 00000000000..9842c6d92d9
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-21-fix-not_aligned
@@ -0,0 +1,21 @@
+diff -ur icu-4.2.1.orig/source/layout/ExtensionSubtables.cpp icu-4.2.1/source/layout/ExtensionSubtables.cpp
+--- icu-4.2.1.orig/source/layout/ExtensionSubtables.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/ExtensionSubtables.cpp 2009-10-22 23:17:59.000000000 +0200
+@@ -15,6 +15,8 @@
+
+ U_NAMESPACE_BEGIN
+
++// read a 32-bit value that might only be 16-bit-aligned in memory
++#define READ_LONG(code) (le_uint32)((SWAPW(*(le_uint16*)&code) << 16) + SWAPW(*(((le_uint16*)&code) + 1)))
+
+ // FIXME: should look at the format too... maybe have a sub-class for it?
+ le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType,
+@@ -27,7 +29,7 @@
+ le_uint16 elt = SWAPW(extensionLookupType);
+
+ if (elt != lookupType) {
+- le_uint32 extOffset = SWAPL(extensionOffset);
++ le_uint32 extOffset = READ_LONG(extensionOffset);
+ LookupSubtable *subtable = (LookupSubtable *) ((char *) this + extOffset);
+
+ return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success);
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-22-fix-JK-adjust_for_marks b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-22-fix-JK-adjust_for_marks
new file mode 100644
index 00000000000..4c4119de776
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-22-fix-JK-adjust_for_marks
@@ -0,0 +1,31 @@
+diff -ur icu-4.2.1.orig/source/layout/MarkToBasePosnSubtables.cpp icu-4.2.1/source/layout/MarkToBasePosnSubtables.cpp
+--- icu-4.2.1.orig/source/layout/MarkToBasePosnSubtables.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/MarkToBasePosnSubtables.cpp 2009-10-22 23:46:21.000000000 +0200
+@@ -83,11 +83,27 @@
+ glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
+
+ if (glyphIterator->isRightToLeft()) {
++ ///// FIXME: need similar patch to below; also in MarkToLigature and MarkToMark
++ ///// (is there a better way to approach this for all the cases?)
+ glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY);
+ } else {
+ LEPoint baseAdvance;
+
+ fontInstance->getGlyphAdvance(baseGlyph, pixels);
++
++ ///// JK: adjustment needs to account for non-zero advance of any marks between base glyph and current mark
++ GlyphIterator gi(baseIterator, (le_uint16)0); // copy of baseIterator that won't ignore marks
++ gi.next(); // point beyond the base glyph
++ while (gi.getCurrStreamPosition() < glyphIterator->getCurrStreamPosition()) { // for all intervening glyphs (marks)...
++ LEGlyphID otherMark = gi.getCurrGlyphID();
++ LEPoint px;
++ fontInstance->getGlyphAdvance(otherMark, px); // get advance, in case it's non-zero
++ pixels.fX += px.fX; // and add that to the base glyph's advance
++ pixels.fY += px.fY;
++ gi.next();
++ }
++ ///// end of JK patch
++
+ fontInstance->pixelsToUnits(pixels, baseAdvance);
+
+ glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY);
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos
new file mode 100644
index 00000000000..192e6f84627
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos
@@ -0,0 +1,56 @@
+diff -ur icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.cpp icu-4.2.1/source/layout/OpenTypeLayoutEngine.cpp
+--- icu-4.2.1.orig/source/layout/OpenTypeLayoutEngine.cpp 2009-10-23 00:04:31.000000000 +0200
++++ icu-4.2.1/source/layout/OpenTypeLayoutEngine.cpp 2009-10-23 00:09:47.000000000 +0200
+@@ -96,8 +96,10 @@
+ setScriptAndLanguageTags();
+
+ fGDEFTable = (const GlyphDefinitionTableHeader *) getFontTable(gdefTableTag);
+-
+- if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) {
++
++// JK patch, 2008-05-30 - see Sinhala bug report and LKLUG font
++// if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) {
++ if (gposTable != NULL && gposTable->coversScript(fScriptTag)) {
+ fGPOSTable = gposTable;
+ }
+ }
+@@ -193,8 +195,16 @@
+ return 0;
+ }
+
++ if (LE_FAILURE(success)) {
++ LE_DELETE_ARRAY(outChars);
++ return 0;
++ }
++
+ CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, outChars, glyphStorage);
+ }
++ if (LE_FAILURE(success)) {
++ return 0;
++ }
+
+ glyphStorage.allocateGlyphArray(count, rightToLeft, success);
+ glyphStorage.allocateAuxData(success);
+@@ -333,8 +343,10 @@
+ }
+
+ le_int32 glyphCount = glyphStorage.getGlyphCount();
++ if (glyphCount == 0)
++ return;
+
+- if (glyphCount > 0 && fGPOSTable != NULL) {
++ if (fGPOSTable != NULL) {
+ GlyphPositionAdjustments *adjustments = new GlyphPositionAdjustments(glyphCount);
+ le_int32 i;
+
+@@ -401,6 +413,10 @@
+
+ delete adjustments;
+ }
++ else {
++ // if there was no GPOS table, maybe there's non-OpenType kerning we can use
++ LayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success);
++ }
+
+ LEGlyphID zwnj = fFontInstance->mapCharToGlyph(0x200C);
+
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-50-Vertical b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-50-Vertical
new file mode 100644
index 00000000000..ea362d76cf0
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-50-Vertical
@@ -0,0 +1,245 @@
+diff -ur icu-4.2.1.orig/source/layout/LEFontInstance.h icu-4.2.1/source/layout/LEFontInstance.h
+--- icu-4.2.1.orig/source/layout/LEFontInstance.h 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/LEFontInstance.h 2009-10-23 00:14:44.000000000 +0200
+@@ -509,6 +509,10 @@
+ */
+ static UClassID getStaticClassID();
+
++ /**
++ * Returns true if writing direction is vertical.
++ */
++ virtual inline bool getLayoutDirVertical() const;
+ };
+
+ inline float LEFontInstance::fixedToFloat(le_int32 fixed)
+@@ -521,6 +525,11 @@
+ return (le_int32) (theFloat * 65536.0);
+ }
+
++inline bool LEFontInstance::getLayoutDirVertical() const
++{
++ return false;
++}
++
+ U_NAMESPACE_END
+ #endif
+
+diff -ur icu-4.2.1.orig/source/layout/ValueRecords.cpp icu-4.2.1/source/layout/ValueRecords.cpp
+--- icu-4.2.1.orig/source/layout/ValueRecords.cpp 2009-07-01 20:51:26.000000000 +0200
++++ icu-4.2.1/source/layout/ValueRecords.cpp 2009-10-23 00:14:44.000000000 +0200
+@@ -48,8 +48,12 @@
+
+ fontInstance->transformFunits(value, 0, pixels);
+
+- xPlacementAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yPlacementAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ if ((valueFormat & vfbYPlacement) != 0) {
+@@ -58,8 +62,12 @@
+
+ fontInstance->transformFunits(0, value, pixels);
+
+- xPlacementAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yPlacementAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ if ((valueFormat & vfbXAdvance) != 0) {
+@@ -68,8 +76,12 @@
+
+ fontInstance->transformFunits(value, 0, pixels);
+
+- xAdvanceAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yAdvanceAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ if ((valueFormat & vfbYAdvance) != 0) {
+@@ -78,8 +90,12 @@
+
+ fontInstance->transformFunits(0, value, pixels);
+
+- xAdvanceAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yAdvanceAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ // FIXME: The device adjustments should really be transformed, but
+@@ -96,7 +112,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 xAdj = dt->getAdjustment(xppem);
+
+- xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj);
++ if (fontInstance->getLayoutDirVertical())
++ yPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj);
++ else
++ xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj);
+ }
+ }
+
+@@ -107,7 +126,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 yAdj = dt->getAdjustment(yppem);
+
+- yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj);
++ if (fontInstance->getLayoutDirVertical())
++ xPlacementAdjustment -= fontInstance->yPixelsToUnits(yAdj);
++ else
++ yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj);
+ }
+ }
+
+@@ -118,7 +140,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 xAdj = dt->getAdjustment(xppem);
+
+- xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj);
++ if (fontInstance->getLayoutDirVertical())
++ yAdvanceAdjustment -= fontInstance->xPixelsToUnits(xAdj);
++ else
++ xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj);
+ }
+ }
+
+@@ -129,7 +154,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 yAdj = dt->getAdjustment(yppem);
+
+- yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj);
++ if (fontInstance->getLayoutDirVertical())
++ xAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj);
++ else
++ yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj);
+ }
+ }
+ }
+@@ -152,8 +180,12 @@
+
+ fontInstance->transformFunits(value, 0, pixels);
+
+- xPlacementAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yPlacementAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ if ((valueFormat & vfbYPlacement) != 0) {
+@@ -162,8 +194,12 @@
+
+ fontInstance->transformFunits(0, value, pixels);
+
+- xPlacementAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yPlacementAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yPlacementAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ if ((valueFormat & vfbXAdvance) != 0) {
+@@ -172,8 +208,12 @@
+
+ fontInstance->transformFunits(value, 0, pixels);
+
+- xAdvanceAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yAdvanceAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ if ((valueFormat & vfbYAdvance) != 0) {
+@@ -182,8 +222,12 @@
+
+ fontInstance->transformFunits(0, value, pixels);
+
+- xAdvanceAdjustment += fontInstance->xPixelsToUnits(pixels.fX);
+- yAdvanceAdjustment += fontInstance->yPixelsToUnits(pixels.fY);
++ xAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? fontInstance->yPixelsToUnits(pixels.fY)
++ : fontInstance->xPixelsToUnits(pixels.fX);
++ yAdvanceAdjustment += fontInstance->getLayoutDirVertical()
++ ? -fontInstance->xPixelsToUnits(pixels.fX)
++ : fontInstance->yPixelsToUnits(pixels.fY);
+ }
+
+ // FIXME: The device adjustments should really be transformed, but
+@@ -200,7 +244,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 xAdj = dt->getAdjustment(xppem);
+
+- xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj);
++ if (fontInstance->getLayoutDirVertical())
++ yPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj);
++ else
++ xPlacementAdjustment += fontInstance->xPixelsToUnits(xAdj);
+ }
+ }
+
+@@ -211,7 +258,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 yAdj = dt->getAdjustment(yppem);
+
+- yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj);
++ if (fontInstance->getLayoutDirVertical())
++ xPlacementAdjustment -= fontInstance->yPixelsToUnits(yAdj);
++ else
++ yPlacementAdjustment += fontInstance->yPixelsToUnits(yAdj);
+ }
+ }
+
+@@ -222,7 +272,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 xAdj = dt->getAdjustment(xppem);
+
+- xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj);
++ if (fontInstance->getLayoutDirVertical())
++ yAdvanceAdjustment -= fontInstance->xPixelsToUnits(xAdj);
++ else
++ xAdvanceAdjustment += fontInstance->xPixelsToUnits(xAdj);
+ }
+ }
+
+@@ -233,7 +286,10 @@
+ const DeviceTable *dt = (const DeviceTable *) (base + dtOffset);
+ le_int16 yAdj = dt->getAdjustment(yppem);
+
+- yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj);
++ if (fontInstance->getLayoutDirVertical())
++ xAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj);
++ else
++ yAdvanceAdjustment += fontInstance->yPixelsToUnits(yAdj);
+ }
+ }
+ }
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-60-KernPair b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-60-KernPair
new file mode 100644
index 00000000000..983f0d685cf
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-60-KernPair
@@ -0,0 +1,61 @@
+diff -ur icu-4.2.1.orig/source/layout/LEFontInstance.cpp icu-4.2.1/source/layout/LEFontInstance.cpp
+--- icu-4.2.1.orig/source/layout/LEFontInstance.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/LEFontInstance.cpp 2009-10-23 00:16:48.000000000 +0200
+@@ -145,5 +145,10 @@
+ return getAscent() + getDescent() + getLeading();
+ }
+
++void LEFontInstance::getKernPair(LEGlyphID leftGlyph, LEGlyphID rightGlyph, LEPoint &kern) const
++{
++ kern.fX = kern.fY = 0;
++}
++
+ U_NAMESPACE_END
+
+diff -ur icu-4.2.1.orig/source/layout/LEFontInstance.h icu-4.2.1/source/layout/LEFontInstance.h
+--- icu-4.2.1.orig/source/layout/LEFontInstance.h 2009-10-23 00:14:44.000000000 +0200
++++ icu-4.2.1/source/layout/LEFontInstance.h 2009-10-23 00:16:48.000000000 +0200
+@@ -510,6 +510,11 @@
+ static UClassID getStaticClassID();
+
+ /**
++ * Returns kern value for a glyph pair, if the font has a kern pair list.
++ */
++ virtual void getKernPair(LEGlyphID leftGlyph, LEGlyphID rightGlyph, LEPoint &kern) const;
++
++ /**
+ * Returns true if writing direction is vertical.
+ */
+ virtual inline bool getLayoutDirVertical() const;
+diff -ur icu-4.2.1.orig/source/layout/LayoutEngine.cpp icu-4.2.1/source/layout/LayoutEngine.cpp
+--- icu-4.2.1.orig/source/layout/LayoutEngine.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/LayoutEngine.cpp 2009-10-23 00:16:48.000000000 +0200
+@@ -369,9 +369,25 @@
+
+ if (fTypoFlags & 0x1) { /* kerning enabled */
+ static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG;
+-
+- KernTable kt(fFontInstance, getFontTable(kernTableTag));
+- kt.process(glyphStorage);
++ const void* kernTableData = getFontTable(kernTableTag);
++ if (kernTableData != NULL) {
++ KernTable kt(fFontInstance, kernTableData);
++ kt.process(glyphStorage);
++ }
++ else { /* no 'kern' table, but the font might know kern pairs from an AFM file, for instance */
++ float xAdjust = 0.0, yAdjust = 0.0;
++ LEGlyphID leftGlyph = glyphStorage.getGlyphID(0, success);
++ for (le_int32 i = 1; i < glyphStorage.getGlyphCount(); ++i) {
++ LEGlyphID rightGlyph = glyphStorage.getGlyphID(i, success);
++ LEPoint kern;
++ fFontInstance->getKernPair(leftGlyph, rightGlyph, kern);
++ xAdjust += fFontInstance->xUnitsToPoints(kern.fX);
++ yAdjust += fFontInstance->yUnitsToPoints(kern.fY);
++ glyphStorage.adjustPosition(i, xAdjust, yAdjust, success);
++ leftGlyph = rightGlyph;
++ }
++ glyphStorage.adjustPosition(glyphStorage.getGlyphCount(), xAdjust, yAdjust, success);
++ }
+ }
+
+ // default is no adjustments
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-70-Arabic b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-70-Arabic
new file mode 100644
index 00000000000..0046f27b065
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-70-Arabic
@@ -0,0 +1,204 @@
+diff -ur icu-4.2.1.orig/source/layout/ArabicShaping.cpp icu-4.2.1/source/layout/ArabicShaping.cpp
+--- icu-4.2.1.orig/source/layout/ArabicShaping.cpp 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/ArabicShaping.cpp 2009-10-23 14:00:28.000000000 +0200
+@@ -24,6 +24,31 @@
+ ArabicShaping::ST_TRANSPARENT // [T]
+ };
+
++// Draft Mongolian shaping classes, not provided by the Unicode data files at this time
++enum {
++ _c_ = ArabicShaping::ST_NOSHAPE_DUAL,
++ _d_ = ArabicShaping::ST_DUAL,
++ _n_ = ArabicShaping::ST_NONE,
++ _r_ = ArabicShaping::ST_RIGHT,
++ _t_ = ArabicShaping::ST_TRANSPARENT,
++ _x_ = ArabicShaping::ST_NOSHAPE_NONE
++};
++
++const ArabicShaping::ShapeType ArabicShaping::mongolianTypes[] =
++{
++ _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _t_, _t_, _t_, _t_, _n_, // 0x1800 - 0x180f
++ _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, // 0x1810 - 0x181f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1820 - 0x182f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1830 - 0x183f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1840 - 0x184f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1850 - 0x185f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1860 - 0x186f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, _n_, // 0x1870 - 0x187f
++ _n_, _n_, _n_, _n_, _n_, _n_, _n_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1880 - 0x188f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, // 0x1890 - 0x189f
++ _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _d_, _t_, _n_, _n_, _n_, _n_, _n_, _n_ // 0x18a0 - 0x18af
++};
++
+ /*
+ shaping array holds types for Arabic chars between 0610 and 0700
+ other values are either unshaped, or transparent if a mark or format
+@@ -36,17 +61,32 @@
+ const ClassDefinitionTable *joiningTypes = (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable;
+ le_int32 joiningType = joiningTypes->getGlyphClass(c);
+
+- if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT) {
+- return ArabicShaping::shapeTypes[joiningType];
++ if (joiningType == JT_RIGHT_JOINING) { // check for Syriac exceptions ALAPH, DALATH, RISH
++ if (c == 0x0710)
++ return ST_ALAPH;
++ if (c == 0x0715 || c == 0x0716 || c == 0x072A || c == 0x072F)
++ return ST_DALATH_RISH;
+ }
+
+- return ArabicShaping::ST_NOSHAPE_NONE;
++ if (joiningType == 0) { // check for Mongolian range, not supported by ArabicShaping::shapingTypeTable
++ if (c >= 0x1800 && c <= 0x18af)
++ return mongolianTypes[c - 0x1800];
++ }
++
++ if (joiningType >= 0 && joiningType < JT_COUNT) {
++ return shapeTypes[joiningType];
++ }
++
++ return ST_NOSHAPE_NONE;
+ }
+
+ #define isolFeatureTag LE_ISOL_FEATURE_TAG
+ #define initFeatureTag LE_INIT_FEATURE_TAG
+ #define mediFeatureTag LE_MEDI_FEATURE_TAG
++#define med2FeatureTag LE_MED2_FEATURE_TAG
+ #define finaFeatureTag LE_FINA_FEATURE_TAG
++#define fin2FeatureTag LE_FIN2_FEATURE_TAG
++#define fin3FeatureTag LE_FIN3_FEATURE_TAG
+ #define ligaFeatureTag LE_LIGA_FEATURE_TAG
+ #define msetFeatureTag LE_MSET_FEATURE_TAG
+ #define markFeatureTag LE_MARK_FEATURE_TAG
+@@ -62,33 +102,40 @@
+ // NOTE:
+ // The isol, fina, init and medi features must be
+ // defined in the above order, and have masks that
+-// are all in the same nibble.
++// are all in the same byte.
+ #define isolFeatureMask 0x80000000UL
+ #define finaFeatureMask 0x40000000UL
+ #define initFeatureMask 0x20000000UL
+ #define mediFeatureMask 0x10000000UL
+-#define ccmpFeatureMask 0x08000000UL
+-#define rligFeatureMask 0x04000000UL
+-#define caltFeatureMask 0x02000000UL
+-#define ligaFeatureMask 0x01000000UL
+-#define dligFeatureMask 0x00800000UL
+-#define cswhFeatureMask 0x00400000UL
+-#define msetFeatureMask 0x00200000UL
+-#define cursFeatureMask 0x00100000UL
+-#define kernFeatureMask 0x00080000UL
+-#define markFeatureMask 0x00040000UL
+-#define mkmkFeatureMask 0x00020000UL
++#define fin2FeatureMask 0x08000000UL
++#define fin3FeatureMask 0x04000000UL
++#define med2FeatureMask 0x03000000UL /* two bits, from shifting either fin2 or fin3 */
++
++#define ccmpFeatureMask 0x00800000UL
++#define rligFeatureMask 0x00400000UL
++#define caltFeatureMask 0x00200000UL
++#define ligaFeatureMask 0x00100000UL
++#define dligFeatureMask 0x00080000UL
++#define cswhFeatureMask 0x00040000UL
++#define msetFeatureMask 0x00020000UL
++#define cursFeatureMask 0x00010000UL
++#define kernFeatureMask 0x00008000UL
++#define markFeatureMask 0x00004000UL
++#define mkmkFeatureMask 0x00002000UL
+
+ #define NO_FEATURES 0
+ #define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
+
+-#define SHAPE_MASK 0xF0000000UL
++#define SHAPE_MASK 0xFF000000UL
+
+ static const FeatureMap featureMap[] = {
+ {ccmpFeatureTag, ccmpFeatureMask},
+ {isolFeatureTag, isolFeatureMask},
+ {finaFeatureTag, finaFeatureMask},
++ {fin2FeatureTag, fin2FeatureMask},
++ {fin3FeatureTag, fin3FeatureMask},
+ {mediFeatureTag, mediFeatureMask},
++ {med2FeatureTag, med2FeatureMask},
+ {initFeatureTag, initFeatureMask},
+ {rligFeatureTag, rligFeatureMask},
+ {caltFeatureTag, caltFeatureMask},
+@@ -138,6 +185,14 @@
+ // shaper.shape(errout, 2) (isolate to initial, or final to medial)
+ // shaper.shape(out, 1) (isolate to final)
+
++ // special cases for Syriac ALAPH:
++ // final ALAPH is fin2 when effective right char shapes but does not cause left shaping, and is not DALATH/RISH
++ // final ALAPH is fin3 when effective right char is DALATH/RISH
++ // medial ALAPH is med2 when effective right char shapes but does not cause left shaping
++ // using one of:
++ // shaper.shape(out, 4) (isolate to fin2)
++ // shaper.shape(out, 5) (isolate to fin3)
++
+ ShapeType rightType = ST_NOSHAPE_NONE, leftType = ST_NOSHAPE_NONE;
+ LEErrorCode success = LE_NO_ERROR;
+ le_int32 i;
+@@ -195,10 +250,17 @@
+ if (curShapes) {
+ adjustTags(out, 1, glyphStorage);
+ }
++ } else if (t == ST_ALAPH) {
++ if (rightType == ST_DALATH_RISH) {
++ adjustTags(out, 5, glyphStorage);
++ } else if (rightShapes && !rightCauses) {
++ adjustTags(out, 4, glyphStorage);
++ }
+ }
+
+ rightShapes = curShapes;
+ rightCauses = (t & MASK_SHAPE_LEFT) != 0;
++ rightType = t; // remember this; might need to know if it was DALATH/RISH
+ erout = out;
+ }
+
+diff -ur icu-4.2.1.orig/source/layout/ArabicShaping.h icu-4.2.1/source/layout/ArabicShaping.h
+--- icu-4.2.1.orig/source/layout/ArabicShaping.h 2009-07-01 20:51:24.000000000 +0200
++++ icu-4.2.1/source/layout/ArabicShaping.h 2009-10-23 14:00:28.000000000 +0200
+@@ -39,7 +39,10 @@
+ MASK_SHAPE_RIGHT = 1, // if this bit set, shapes to right
+ MASK_SHAPE_LEFT = 2, // if this bit set, shapes to left
+ MASK_TRANSPARENT = 4, // if this bit set, is transparent (ignore other bits)
+- MASK_NOSHAPE = 8 // if this bit set, don't shape this char, i.e. tatweel
++ MASK_NOSHAPE = 8, // if this bit set, don't shape this char, i.e. tatweel
++
++ MASK_ALAPH = 16, // if this bit set, char is Syriac ALAPH
++ MASK_DALATH_RISH = 32 // if this bit set, char is Syriac DALATH/RISH
+ };
+
+ // shaping values
+@@ -51,7 +54,9 @@
+ ST_DUAL = MASK_SHAPE_RIGHT | MASK_SHAPE_LEFT,
+ ST_TRANSPARENT = MASK_TRANSPARENT,
+ ST_NOSHAPE_DUAL = MASK_NOSHAPE | ST_DUAL,
+- ST_NOSHAPE_NONE = MASK_NOSHAPE
++ ST_NOSHAPE_NONE = MASK_NOSHAPE,
++ ST_ALAPH = MASK_ALAPH | MASK_SHAPE_RIGHT,
++ ST_DALATH_RISH = MASK_DALATH_RISH | MASK_SHAPE_RIGHT
+ };
+
+ typedef le_int32 ShapeType;
+@@ -69,6 +74,7 @@
+
+ static const le_uint8 shapingTypeTable[];
+ static const ShapeType shapeTypes[];
++ static const ShapeType mongolianTypes[];
+
+ static void adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage);
+ };
+diff -ur icu-4.2.1.orig/source/layout/LayoutEngine.cpp icu-4.2.1/source/layout/LayoutEngine.cpp
+--- icu-4.2.1.orig/source/layout/LayoutEngine.cpp 2009-10-23 00:16:48.000000000 +0200
++++ icu-4.2.1/source/layout/LayoutEngine.cpp 2009-10-23 14:05:00.000000000 +0200
+@@ -567,6 +567,8 @@
+ break;
+
+ case arabScriptCode:
++ case syrcScriptCode:
++ case mongScriptCode:
+ result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success);
+ break;
+
diff --git a/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-80-Indic b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-80-Indic
new file mode 100644
index 00000000000..689679e2a7f
--- /dev/null
+++ b/Build/source/libs/icu/icu-4.2.1-PATCHES/patch-80-Indic
@@ -0,0 +1,28 @@
+diff -ur icu-4.2.1.orig/source/layout/IndicClassTables.cpp icu-4.2.1/source/layout/IndicClassTables.cpp
+--- icu-4.2.1.orig/source/layout/IndicClassTables.cpp 2009-07-01 20:51:26.000000000 +0200
++++ icu-4.2.1/source/layout/IndicClassTables.cpp 2009-10-22 23:10:23.000000000 +0200
+@@ -256,7 +256,7 @@
+ //
+ static const IndicClassTable devaClassTable = {0x0900, 0x0970, 2, DEVA_SCRIPT_FLAGS, devaCharClasses, NULL};
+
+-static const IndicClassTable bengClassTable = {0x0980, 0x09FA, 3, BENG_SCRIPT_FLAGS, bengCharClasses, bengSplitTable};
++static const IndicClassTable bengClassTable = {0x0980, 0x09FA, 4, BENG_SCRIPT_FLAGS, bengCharClasses, bengSplitTable};
+
+ static const IndicClassTable punjClassTable = {0x0A00, 0x0A74, 2, PUNJ_SCRIPT_FLAGS, punjCharClasses, NULL};
+
+@@ -264,13 +264,13 @@
+
+ static const IndicClassTable oryaClassTable = {0x0B00, 0x0B71, 3, ORYA_SCRIPT_FLAGS, oryaCharClasses, oryaSplitTable};
+
+-static const IndicClassTable tamlClassTable = {0x0B80, 0x0BF2, 3, TAML_SCRIPT_FLAGS, tamlCharClasses, tamlSplitTable};
++static const IndicClassTable tamlClassTable = {0x0B80, 0x0BF2, 4, TAML_SCRIPT_FLAGS, tamlCharClasses, tamlSplitTable};
+
+ static const IndicClassTable teluClassTable = {0x0C00, 0x0C6F, 3, TELU_SCRIPT_FLAGS, teluCharClasses, teluSplitTable};
+
+ static const IndicClassTable kndaClassTable = {0x0C80, 0x0CEF, 4, KNDA_SCRIPT_FLAGS, kndaCharClasses, kndaSplitTable};
+
+-static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 3, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
++static const IndicClassTable mlymClassTable = {0x0D00, 0x0D6F, 4, MLYM_SCRIPT_FLAGS, mlymCharClasses, mlymSplitTable};
+
+ static const IndicClassTable sinhClassTable = {0x0D80, 0x0DF4, 4, SINH_SCRIPT_FLAGS, sinhCharClasses, sinhSplitTable};
+
diff --git a/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/ChangeLog b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/ChangeLog
new file mode 100644
index 00000000000..027432f275e
--- /dev/null
+++ b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/ChangeLog
@@ -0,0 +1,23 @@
+2009-10-18 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Reconstruct TL TECkit sources from distributed tarball.
+ * TL-changes (new): Modifications applied to the distribution.
+ * patch-[0-9][0-9]-*: Patches applied to the distribution.
+
+2009-10-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-03-warnings (new): Avoid maximal compiler warnings.
+ source/Sample-tools/TECkit_Compile.cpp, source/Engine.{cpp,h},
+ source/Public-headers/TECkit_Compiler.h, source/Compiler.cpp:
+ Constify.
+
+2009-06-25 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * patch-02-warning (new): Avoid compiler warning.
+ source/Compiler.h: change type of Compiler::Pass.passType
+ long -> UInt32.
+
+2008-11-17 Jonathan Kew <jonathan_kew@sil.org>
+
+ * patch-01-debian-505693 (new): Bug fix.
+
diff --git a/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/TL-Changes b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/TL-Changes
new file mode 100644
index 00000000000..e04349d07df
--- /dev/null
+++ b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/TL-Changes
@@ -0,0 +1,51 @@
+Changes applied to the TECkit-2.5.1/ tree as obtained from:
+ http://scripts.sil.org/svn-view/teckit/TAGS/TECkit_2_5_1.tar.gz
+
+Removed:
+ SFconv/expat/xmlparse/CVS/
+ SFconv/expat/xmlparse/.cvsignore
+ SFconv/expat/xmltok/CVS/
+ SFconv/expat/xmltok/.cvsignore
+ SFconv/expat/xmlwf/CVS/
+ TECkit.mcp
+ build-mac-binaries.sh
+ build-windows-binaries.sh
+ compile
+ config.guess
+ config.sub
+ depcomp
+ install-sh
+ ltmain.sh
+ missing
+ mkinstalldirs
+ perl_binaries/
+ source/DropTEC icons.rsrc
+ source/carb.rsrc
+ source/teckitjni/
+ zlib-1.2.3/
+
+Renamed:
+ docs/Calling TECkit from VB.doc => docs/Calling_TECkit_from_VB.doc
+
+Converted Dos/Win line ends to native:
+ source/Perl/TECkit.xs
+ source/Perl/lib/Encode/TECkit.pm
+ source/Perl/test.pl
+ source/Perl/typemap
+ test/GNT-map.xml
+ test/ISO-8859-1.map
+ test/Mrk-GNT.sf
+ test/mrk.sf.legacy.txt.orig
+
+Converted Mac line ends to native:
+ source/Carbon.r
+ source/REALplugin.cp
+ source/TECkit_Compiler.cmd
+ source/TECkit_Compiler.exp
+ source/TECkit_Engine.cmd
+ source/TECkit_Engine.exp
+ test/SILGreek2004-04-27.map
+
+Added newline at end of file:
+ source/Carbon.r
+
diff --git a/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-01-debian-505693 b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-01-debian-505693
new file mode 100644
index 00000000000..43dee6095d7
--- /dev/null
+++ b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-01-debian-505693
@@ -0,0 +1,23 @@
+ Fix Debian bug #505693.
+
+ from: Jonathan Kew <jonathan_kew@sil.org>
+
+diff -ur TECkit-2.5.1/source/Compiler.cpp teckit/source/Compiler.cpp
+--- TECkit-2.5.1,orig/source/Compiler.cpp 2008-04-07 16:21:12.000000000 +0200
++++ TECkit-2.5.1/source/Compiler.cpp 2008-11-17 22:06:09.000000000 +0200
+@@ -13,6 +13,7 @@
+ -------------------------------------------------------------------------*/
+
+ /*
++ 2008-11-17 jk include <cstdio> (Debian bug 505693)
+ 2006-06-19 jk added new APIs to look up Unicode names
+ 2006-01-12 jk removed multi-char constants, use FOUR_CHAR_CODE to define UInt32 values instead
+ (no functional change, just to avoid compiler warnings)
+@@ -29,6 +30,7 @@
+
+ #include "Compiler.h"
+
++#include <cstdio>
+ #include <iostream>
+ #include <iomanip>
+ #include <algorithm>
diff --git a/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-02-warning b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-02-warning
new file mode 100644
index 00000000000..05ca43a6a92
--- /dev/null
+++ b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-02-warning
@@ -0,0 +1,14 @@
+ Avoid compiler warning.
+
+diff -ur TECkit-2.5.1.orig/source/Compiler.h TECkit-2.5.1/source/Compiler.h
+--- TECkit-2.5.1.orig/source/Compiler.h 2008-04-07 16:21:12.000000000 +0200
++++ TECkit-2.5.1/source/Compiler.h 2009-06-25 20:36:24.000000000 +0200
+@@ -230,7 +230,7 @@
+ vector<UInt32> byteClassLines;
+ vector<UInt32> uniClassLines;
+
+- long passType;
++ UInt32 passType;
+ UInt32 uniDefault;
+ UInt8 byteDefault;
+ bool supplementaryChars;
diff --git a/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-03-warnings b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-03-warnings
new file mode 100644
index 00000000000..c2c8b0ddb89
--- /dev/null
+++ b/Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-03-warnings
@@ -0,0 +1,163 @@
+ Avoid more compiler warnings.
+
+diff -ur TECkit-2.5.1.orig/source/Compiler.cpp TECkit-2.5.1/source/Compiler.cpp
+--- TECkit-2.5.1.orig/source/Compiler.cpp 2008-11-17 21:06:09.000000000 +0100
++++ TECkit-2.5.1/source/Compiler.cpp 2009-10-01 22:06:09.000000000 +0200
+@@ -191,14 +191,14 @@
+ free(table);
+ }
+
+-char*
++const char*
+ WINAPI
+ TECkit_GetUnicodeName(UInt32 usv)
+ {
+ const CharName *c = &gUnicodeNames[0];
+ while (c->name != 0)
+ if (c->usv == usv)
+- return (char*)c->name;
++ return c->name;
+ else
+ ++c;
+ return NULL;
+@@ -263,13 +263,13 @@
+ return -1;
+ }
+
+-static inline UInt8
++inline UInt8
+ READ(const UInt8 p)
+ {
+ return p;
+ }
+
+-static inline UInt16
++inline UInt16
+ READ(const UInt16 p)
+ {
+ #ifdef WORDS_BIGENDIAN
+@@ -279,7 +279,7 @@
+ #endif
+ }
+
+-static inline UInt32
++inline UInt32
+ READ(const UInt32 p)
+ {
+ #ifdef WORDS_BIGENDIAN
+@@ -290,7 +290,7 @@
+ }
+
+ template<class T>
+-inline static void
++inline void
+ WRITE(T& t, UInt32 v)
+ {
+ t = READ(T(v));
+@@ -2133,7 +2133,7 @@
+ cout << " at line " << line << endl;
+ }
+ else
+- (*errorFunction)(errFuncUserData, (char*)msg, (char*)s, line);
++ (*errorFunction)(errFuncUserData, msg, s, line);
+ errorState = true;
+ ++errorCount;
+ }
+diff -ur TECkit-2.5.1.orig/source/Engine.cpp TECkit-2.5.1/source/Engine.cpp
+--- TECkit-2.5.1.orig/source/Engine.cpp 2008-04-07 16:21:12.000000000 +0200
++++ TECkit-2.5.1/source/Engine.cpp 2009-10-01 22:17:12.000000000 +0200
+@@ -76,13 +76,13 @@
+ using namespace std;
+
+ /* we apply READ to values read from the compiled table, to provide byte-swapping where needed */
+-static inline UInt8
++inline UInt8
+ READ(const UInt8 p)
+ {
+ return p;
+ }
+
+-static inline UInt16
++inline UInt16
+ READ(const UInt16 p)
+ {
+ #ifdef WORDS_BIGENDIAN
+@@ -92,7 +92,7 @@
+ #endif
+ }
+
+-static inline UInt32
++inline UInt32
+ READ(const UInt32 p)
+ {
+ #ifdef WORDS_BIGENDIAN
+@@ -1087,7 +1087,7 @@
+ if (matchElems == 0 && allowInsertion == false)
+ continue;
+ patternLength = matchElems + READ(rule->postLength);
+- pattern = (MatchElem*)(rule + 1); // point past the defined struct for the rule header
++ pattern = (const MatchElem*)(rule + 1); // point past the defined struct for the rule header
+ direction = 1;
+ infoLimit = matchElems;
+
+@@ -2185,7 +2185,7 @@
+ status = kStatus_BadMappingVersion;
+ else {
+ const Byte* namePtr;
+- if (getNamePtrFromTable((Byte*)fh, nameID, namePtr, *nameLength)) {
++ if (getNamePtrFromTable((const Byte*)fh, nameID, namePtr, *nameLength)) {
+ UInt16 copyBytes = *nameLength < bufferSize ? *nameLength : bufferSize;
+ if (copyBytes > 0)
+ memcpy(nameBuffer, namePtr, copyBytes);
+diff -ur TECkit-2.5.1.orig/source/Engine.h TECkit-2.5.1/source/Engine.h
+--- TECkit-2.5.1.orig/source/Engine.h 2008-04-07 16:21:12.000000000 +0200
++++ TECkit-2.5.1/source/Engine.h 2009-10-01 22:16:40.000000000 +0200
+@@ -117,7 +117,7 @@
+
+ UInt32 match(int index, int repeats, int textLoc);
+ // returns 0 for no match, 1 for match, or kNeedMoreInput/kInvalidChar
+- MatchElem* pattern;
++ const MatchElem* pattern;
+ int patternLength;
+ int direction;
+ MatchInfo info[256];
+diff -ur TECkit-2.5.1.orig/source/Public-headers/TECkit_Compiler.h TECkit-2.5.1/source/Public-headers/TECkit_Compiler.h
+--- TECkit-2.5.1.orig/source/Public-headers/TECkit_Compiler.h 2008-04-07 16:21:12.000000000 +0200
++++ TECkit-2.5.1/source/Public-headers/TECkit_Compiler.h 2009-10-01 22:03:59.000000000 +0200
+@@ -56,7 +56,7 @@
+ #define kCompilerOpts_Compress 0x00000010 /* generate compressed mapping table */
+ #define kCompilerOpts_XML 0x00000020 /* instead of a compiled binary table, generate an XML representation of the mapping */
+
+-typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, char* msg, char* param, UInt32 line);
++typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, const char* msg, const char* param, UInt32 line);
+
+ TECkit_Status
+ WINAPI EXPORTED
+@@ -75,7 +75,7 @@
+ TECkit_GetCompilerVersion();
+
+ /* new APIs for looking up Unicode names (as NUL-terminated C strings) */
+-char*
++const char*
+ WINAPI EXPORTED
+ TECkit_GetUnicodeName(UInt32 usv);
+ /* returns the Unicode name of usv, if available, else NULL */
+diff -ur TECkit-2.5.1.orig/source/Sample-tools/TECkit_Compile.cpp TECkit-2.5.1/source/Sample-tools/TECkit_Compile.cpp
+--- TECkit-2.5.1.orig/source/Sample-tools/TECkit_Compile.cpp 2008-04-07 16:21:12.000000000 +0200
++++ TECkit-2.5.1/source/Sample-tools/TECkit_Compile.cpp 2009-10-01 22:00:14.000000000 +0200
+@@ -24,13 +24,13 @@
+ #endif
+
+ extern "C" {
+- static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line);
++ static void CALLBACK errFunc(void* userData, const char* msg, const char* param, UInt32 line);
+ };
+
+ static
+ void
+ CALLBACK
+-errFunc(void* userData, char* msg, char* param, UInt32 line)
++errFunc(void* userData, const char* msg, const char* param, UInt32 line)
+ {
+ #pragma unused(userData)
+