From 2c92c64be5afdf033f8d21178b02950a379c1fb4 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 9 Nov 2009 16:08:58 +0000 Subject: update build system git-svn-id: svn://tug.org/texlive/trunk@15951 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/configure | 20 +- Build/source/configure.ac | 2 +- .../libs/graphite/engine-2.3.1-PATCHES/ChangeLog | 16 + .../libs/graphite/engine-2.3.1-PATCHES/TL-Changes | 19 + .../engine-2.3.1-PATCHES/patch-01-warnings | 282 +++++++++++++++ .../graphite/engine-2.3.1-PATCHES/patch-02-virtual | 21 ++ Build/source/libs/icu/icu-4.2.1-PATCHES/ChangeLog | 132 +++++++ .../icu/icu-4.2.1-PATCHES/MakeShapingTypeData.pl | 90 +++++ Build/source/libs/icu/icu-4.2.1-PATCHES/TL-Changes | 15 + .../icu/icu-4.2.1-PATCHES/fix-case-insensitive | 25 ++ .../libs/icu/icu-4.2.1-PATCHES/patch-05-auxParam | 389 +++++++++++++++++++++ .../libs/icu/icu-4.2.1-PATCHES/patch-07-cygwin | 16 + .../icu/icu-4.2.1-PATCHES/patch-08-avoid-rebuild | 79 +++++ .../libs/icu/icu-4.2.1-PATCHES/patch-09-cross | 22 ++ .../libs/icu/icu-4.2.1-PATCHES/patch-20-fix-gt_ge | 12 + .../icu/icu-4.2.1-PATCHES/patch-21-fix-not_aligned | 21 ++ .../patch-22-fix-JK-adjust_for_marks | 31 ++ .../icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos | 56 +++ .../libs/icu/icu-4.2.1-PATCHES/patch-50-Vertical | 245 +++++++++++++ .../libs/icu/icu-4.2.1-PATCHES/patch-60-KernPair | 61 ++++ .../libs/icu/icu-4.2.1-PATCHES/patch-70-Arabic | 204 +++++++++++ .../libs/icu/icu-4.2.1-PATCHES/patch-80-Indic | 28 ++ .../libs/teckit/TECkit-2.5.1-PATCHES/ChangeLog | 23 ++ .../libs/teckit/TECkit-2.5.1-PATCHES/TL-Changes | 51 +++ .../TECkit-2.5.1-PATCHES/patch-01-debian-505693 | 23 ++ .../teckit/TECkit-2.5.1-PATCHES/patch-02-warning | 14 + .../teckit/TECkit-2.5.1-PATCHES/patch-03-warnings | 163 +++++++++ .../texk/dvipng/dvipng-1.12-PATCHES/ChangeLog | 24 ++ .../texk/dvipng/dvipng-1.12-PATCHES/TL-Changes | 16 + .../dvipng-1.12-PATCHES/patch-01-portability | 16 + .../dvipng/dvipng-1.12-PATCHES/patch-02-use-ifdef | 159 +++++++++ .../dvipng/dvipng-1.12-PATCHES/patch-03-have-ft2 | 21 ++ .../dvipng/dvipng-1.12-PATCHES/patch-04-static | 341 ++++++++++++++++++ .../dvipng/dvipng-1.12-PATCHES/patch-05-warnings | 382 ++++++++++++++++++++ .../utils/t1utils/t1utils-1.34-PATCHES/ChangeLog | 13 + .../utils/t1utils/t1utils-1.34-PATCHES/TL-Changes | 13 + .../t1utils/t1utils-1.34-PATCHES/patch-01-getline | 32 ++ .../t1utils/t1utils-1.34-PATCHES/patch-02-static | 176 ++++++++++ .../t1utils/t1utils-1.34-PATCHES/patch-03-warnings | 122 +++++++ 39 files changed, 3364 insertions(+), 11 deletions(-) create mode 100644 Build/source/libs/graphite/engine-2.3.1-PATCHES/ChangeLog create mode 100644 Build/source/libs/graphite/engine-2.3.1-PATCHES/TL-Changes create mode 100644 Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-01-warnings create mode 100644 Build/source/libs/graphite/engine-2.3.1-PATCHES/patch-02-virtual create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/ChangeLog create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/MakeShapingTypeData.pl create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/TL-Changes create mode 100755 Build/source/libs/icu/icu-4.2.1-PATCHES/fix-case-insensitive create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-05-auxParam create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-07-cygwin create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-08-avoid-rebuild create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-09-cross create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-20-fix-gt_ge create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-21-fix-not_aligned create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-22-fix-JK-adjust_for_marks create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-23-fix-JK-GlyphPos create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-50-Vertical create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-60-KernPair create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-70-Arabic create mode 100644 Build/source/libs/icu/icu-4.2.1-PATCHES/patch-80-Indic create mode 100644 Build/source/libs/teckit/TECkit-2.5.1-PATCHES/ChangeLog create mode 100644 Build/source/libs/teckit/TECkit-2.5.1-PATCHES/TL-Changes create mode 100644 Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-01-debian-505693 create mode 100644 Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-02-warning create mode 100644 Build/source/libs/teckit/TECkit-2.5.1-PATCHES/patch-03-warnings create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/ChangeLog create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/TL-Changes create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-01-portability create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-02-use-ifdef create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-03-have-ft2 create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-04-static create mode 100644 Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-05-warnings create mode 100644 Build/source/utils/t1utils/t1utils-1.34-PATCHES/ChangeLog create mode 100644 Build/source/utils/t1utils/t1utils-1.34-PATCHES/TL-Changes create mode 100644 Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-01-getline create mode 100644 Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-02-static create mode 100644 Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-03-warnings (limited to 'Build') diff --git a/Build/source/configure b/Build/source/configure index 8a14b9a2e0c..69f63cd95b6 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for TeX Live 2009-10-10. +# Generated by GNU Autoconf 2.63 for TeX Live 2009-11-09. # # Report bugs to . # @@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='TeX Live' PACKAGE_TARNAME='tex-live' -PACKAGE_VERSION='2009-10-10' -PACKAGE_STRING='TeX Live 2009-10-10' +PACKAGE_VERSION='2009-11-09' +PACKAGE_STRING='TeX Live 2009-11-09' PACKAGE_BUGREPORT='tex-k@tug.org' ac_unique_file="m4/kpse-pkgs.m4" @@ -1619,7 +1619,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live 2009-10-10 to adapt to many kinds of systems. +\`configure' configures TeX Live 2009-11-09 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1693,7 +1693,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live 2009-10-10:";; + short | recursive ) echo "Configuration of TeX Live 2009-11-09:";; esac cat <<\_ACEOF @@ -1953,7 +1953,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live configure 2009-10-10 +TeX Live configure 2009-11-09 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1967,7 +1967,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live $as_me 2009-10-10, which was +It was created by TeX Live $as_me 2009-11-09, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -8810,7 +8810,7 @@ fi # Define the identity of the package. PACKAGE='tex-live' - VERSION='2009-10-10' + VERSION='2009-11-09' cat >>confdefs.h <<_ACEOF @@ -23943,7 +23943,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live $as_me 2009-10-10, which was +This file was extended by TeX Live $as_me 2009-11-09, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23997,7 +23997,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -TeX Live config.status 2009-10-10 +TeX Live config.status 2009-11-09 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Build/source/configure.ac b/Build/source/configure.ac index 5f1598f202a..99387bc5894 100644 --- a/Build/source/configure.ac +++ b/Build/source/configure.ac @@ -6,7 +6,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([TeX Live], [2009-10-10], [tex-k@tug.org]) +AC_INIT([TeX Live], [2009-11-09], [tex-k@tug.org]) AC_PREREQ([2.63]) AC_CONFIG_SRCDIR([m4/kpse-pkgs.m4]) AC_CONFIG_AUX_DIR([build-aux]) 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 + + * patch-02-virtual (new): Declare destructors as virtual to + avoid compiler warnings. + +2009-10-19 Peter Breitenlohner + + * TL-changes (new): Modifications applied to the distribution. + * patch-[0-9][0-9]-*: Patches applied to the distribution. + +2009-10-01 Peter Breitenlohner + + * 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 + + * patch-09-cross (new): Modify AC_CHECK_64BIT_LIBS in aclocal.m4 + to allow cross compilation. + +2009-10-26 Peter Breitenlohner + + * patch-08-avoid-rebuild (new): Modify data/Makefile.in such + that libsicudata.a is not rebuilt again and again. + +2009-10-25 Peter Breitenlohner + + 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 + + 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 + + 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 + * 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 + + 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 NULL. + */ +- 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 + + 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 + + * 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 + + * patch-02-warning (new): Avoid compiler warning. + source/Compiler.h: change type of Compiler::Pass.passType + long -> UInt32. + +2008-11-17 Jonathan Kew + + * 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 + +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 (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 + #include + #include + #include 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 byteClassLines; + vector 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 +-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) + diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/ChangeLog b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/ChangeLog new file mode 100644 index 00000000000..7dd3700d32c --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/ChangeLog @@ -0,0 +1,24 @@ +2009-06-12 Peter Breitenlohner + + * patch-05-warnings (new): Avoid more compiler warnings. + +2009-06-09 Peter Breitenlohner + + * patch-04-static (new): Avoid warnings when compiling with + 'gcc --Wmissing-prototypes'. + +2009-02-22 Peter Breitenlohner + + * patch-03-have-ft2 (new): Bug fix - skip FT2 code when + compiling without FT2 library. + +2009-03-25 Peter Breitenlohner + + * patch-02-use-ifdef (new): Use #ifdef instead of #if to avoid + preprocessor warnings. + +2009-03-24 Peter Breitenlohner + + * patch-01-portability (new): Portability fix - put variable + declarations at the beginning of the block. + diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/TL-Changes b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/TL-Changes new file mode 100644 index 00000000000..ae2e8817223 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/TL-Changes @@ -0,0 +1,16 @@ +Changes applied to the dvipng-1.12 tree as obtained from: + http://mirror.cinquix.com/pub/savannah/dvipng/dvipng-1.12.tar.gz + +Removed: + install-sh + mkinstalldirs + +Created Autoconf macro files ../m4/gs-device.m4 and ../m4/makeinfo.m4 + adapting code in aclocal.m4. + +Moved these files to ../doc/: + dvipng.texi + install.texi + macros.texi + readme.texi + diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-01-portability b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-01-portability new file mode 100644 index 00000000000..3b789c9d4a4 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-01-portability @@ -0,0 +1,16 @@ + Avoid declaration after statement. + +diff -ur dvipng-1.12.orig/special.c dvipng-1.12/special.c +--- dvipng-1.12.orig/special.c 2009-02-23 14:48:50.000000000 +0100 ++++ dvipng-1.12/special.c 2009-03-24 15:03:27.000000000 +0100 +@@ -632,9 +632,9 @@ + + if (dvi->flags & DVI_PREVIEW_BOP_HOOK && ~page_flags & PAGE_PREVIEW_BOP + && strncmp(special,"ps::",4)==0) { ++ dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; + page_flags |= PAGE_PREVIEW_BOP; + /* Hokay, decode bounding box */ +- dviunits adj_llx,adj_lly,adj_urx,adj_ury,ht,dp,wd; + adj_llx = strtol(special+4,&special,10); + adj_lly = strtol(special,&special,10); + adj_urx = strtol(special,&special,10); diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-02-use-ifdef b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-02-use-ifdef new file mode 100644 index 00000000000..4729518dc5c --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-02-use-ifdef @@ -0,0 +1,159 @@ + Use "#if HAVE_ALLOCA_H" instead of "#ifdef HAVE_ALLOCA_H" + and similar, to avoid preprocessor warnings. + +diff -ur dvipng-1.12.orig/color.c dvipng-1.12/color.c +--- dvipng-1.12.orig/color.c 2008-06-03 19:29:31.000000000 +0200 ++++ dvipng-1.12/color.c 2009-03-25 14:06:21.000000000 +0100 +@@ -23,7 +23,7 @@ + ************************************************************************/ + + #include "dvipng.h" +-#if HAVE_ALLOCA_H ++#ifdef HAVE_ALLOCA_H + # include + #endif + +diff -ur dvipng-1.12.orig/dvipng.h dvipng-1.12/dvipng.h +--- dvipng-1.12.orig/dvipng.h 2008-06-03 19:30:18.000000000 +0200 ++++ dvipng-1.12/dvipng.h 2009-03-25 14:04:41.000000000 +0100 +@@ -478,11 +478,11 @@ + + /************************timing stuff*********************/ + #ifdef TIMING +-#if TIME_WITH_SYS_TIME ++#ifdef TIME_WITH_SYS_TIME + # include + # include + #else +-# if HAVE_SYS_TIME_H ++# ifdef HAVE_SYS_TIME_H + # include + # else + # include +diff -ur dvipng-1.12.orig/fontmap.c dvipng-1.12/fontmap.c +--- dvipng-1.12.orig/fontmap.c 2008-05-05 20:58:00.000000000 +0200 ++++ dvipng-1.12/fontmap.c 2009-03-25 14:04:41.000000000 +0100 +@@ -25,7 +25,7 @@ + #include "dvipng.h" + + static struct filemmap psfont_mmap; +-#if HAVE_FT2 ++#ifdef HAVE_FT2 + static struct filemmap ttfont_mmap; + #endif + static struct psfontmap *psfontmap=NULL; +@@ -106,10 +106,10 @@ + newentry->psfile = copyword(copyfrom->psfile); + newentry->encname = copyword(copyfrom->encname); + newentry->encoding = copyfrom->encoding; +-#if HAVE_LIBT1 ++#ifdef HAVE_LIBT1 + newentry->t1_transformp = copyfrom->t1_transformp; + #endif +-#if HAVE_FT2 ++#ifdef HAVE_FT2 + newentry->ft_transformp = copyfrom->ft_transformp; + newentry->subfont = copyfrom->subfont; + #endif +@@ -120,10 +120,10 @@ + newentry->psfile = NULL; + newentry->encname = NULL; + newentry->encoding = NULL; +-#if HAVE_LIBT1 ++#ifdef HAVE_LIBT1 + newentry->t1_transformp = NULL; + #endif +-#if HAVE_FT2 ++#ifdef HAVE_FT2 + newentry->ft_transformp = NULL; + newentry->subfont = NULL; + #endif +@@ -249,14 +249,14 @@ + } + free(word); + } +-#if HAVE_FT2 ++#ifdef HAVE_FT2 + entry->ft_transformp=&(entry->ft_transform); + entry->ft_transform.xx=(FT_Fixed)(cxx*0x10000); + entry->ft_transform.xy=(FT_Fixed)(cxy*0x10000); + entry->ft_transform.yx=0; + entry->ft_transform.yy=0x10000; + #endif +-#if HAVE_LIBT1 ++#ifdef HAVE_LIBT1 + entry->t1_transformp=&(entry->t1_transform); + entry->t1_transform.cxx=cxx; + entry->t1_transform.cxy=cxy; +diff -ur dvipng-1.12.orig/ft.c dvipng-1.12/ft.c +--- dvipng-1.12.orig/ft.c 2008-02-08 14:45:24.000000000 +0100 ++++ dvipng-1.12/ft.c 2009-03-25 14:04:41.000000000 +0100 +@@ -23,7 +23,7 @@ + ************************************************************************/ + + #include "dvipng.h" +-#if HAVE_ALLOCA_H ++#ifdef HAVE_ALLOCA_H + # include + #endif + +diff -ur dvipng-1.12.orig/misc.c dvipng-1.12/misc.c +--- dvipng-1.12.orig/misc.c 2008-06-02 21:29:33.000000000 +0200 ++++ dvipng-1.12/misc.c 2009-03-25 14:05:54.000000000 +0100 +@@ -195,7 +195,7 @@ + } + break ; + case 't': /* specify paper format, only for cropmarks */ +-#if HAVE_GDIMAGECREATETRUECOLOR ++#ifdef HAVE_GDIMAGECREATETRUECOLOR + /* Truecolor */ + if (strncmp(p,"ruecolor",8)==0) { + if (p[8] != '0') { +diff -ur dvipng-1.12.orig/pk.c dvipng-1.12/pk.c +--- dvipng-1.12.orig/pk.c 2008-05-05 20:58:00.000000000 +0200 ++++ dvipng-1.12/pk.c 2009-03-25 14:05:54.000000000 +0100 +@@ -23,7 +23,7 @@ + ************************************************************************/ + + #include "dvipng.h" +-#if HAVE_ALLOCA_H ++#ifdef HAVE_ALLOCA_H + # include + #endif + +diff -ur dvipng-1.12.orig/set.c dvipng-1.12/set.c +--- dvipng-1.12.orig/set.c 2008-02-08 14:45:23.000000000 +0100 ++++ dvipng-1.12/set.c 2009-03-25 14:06:04.000000000 +0100 +@@ -23,7 +23,7 @@ + ************************************************************************/ + + #include "dvipng.h" +-#if HAVE_ALLOCA_H ++#ifdef HAVE_ALLOCA_H + # include + #endif + #include +diff -ur dvipng-1.12.orig/t1.c dvipng-1.12/t1.c +--- dvipng-1.12.orig/t1.c 2008-02-08 14:45:23.000000000 +0100 ++++ dvipng-1.12/t1.c 2009-03-25 14:06:12.000000000 +0100 +@@ -23,7 +23,7 @@ + ************************************************************************/ + + #include "dvipng.h" +-#if HAVE_ALLOCA_H ++#ifdef HAVE_ALLOCA_H + # include + #endif + +diff -ur dvipng-1.12.orig/tfm.c dvipng-1.12/tfm.c +--- dvipng-1.12.orig/tfm.c 2008-05-05 20:58:00.000000000 +0200 ++++ dvipng-1.12/tfm.c 2009-03-25 14:06:21.000000000 +0100 +@@ -23,7 +23,7 @@ + ************************************************************************/ + + #include "dvipng.h" +-#if HAVE_ALLOCA_H ++#ifdef HAVE_ALLOCA_H + # include + #endif + diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-03-have-ft2 b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-03-have-ft2 new file mode 100644 index 00000000000..20f7a451802 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-03-have-ft2 @@ -0,0 +1,21 @@ + Put "#ifdef HAVE_FT2" ... "#endif" around code using FT2. + +diff -ur dvipng-1.12.orig/fontmap.c dvipng-1.12/fontmap.c +--- dvipng-1.12.orig/fontmap.c 2009-03-25 14:04:41.000000000 +0100 ++++ dvipng-1.12/fontmap.c 2009-04-22 14:14:06.000000000 +0200 +@@ -316,6 +316,7 @@ + } + #endif + } ++#ifdef HAVE_FT2 + if(entry==NULL) { + struct psfontmap* entry_subfont=NULL; + entry=psfontmap; +@@ -331,6 +332,7 @@ + } + } + } ++#endif + if (entry!=NULL && entry->psfile==NULL) + ReadPSFontMap(entry); + if (entry!=NULL && entry->encname!=NULL && entry->encoding==NULL) diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-04-static b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-04-static new file mode 100644 index 00000000000..dd14dce5d29 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-04-static @@ -0,0 +1,341 @@ + Declare all functions used in only one file as static. + +diff -ur dvipng-1.12.orig/color.c dvipng-1.12/color.c +--- dvipng-1.12.orig/color.c 2009-03-25 14:06:21.000000000 +0100 ++++ dvipng-1.12/color.c 2009-06-09 12:58:51.000000000 +0200 +@@ -54,7 +54,7 @@ + cstack[1].blue=0; + } + +-struct colorname * NewColor(char* prefix, int nprefix, ++static struct colorname * NewColor(char* prefix, int nprefix, + char* name, int nname, + char* model, int nmodel, + char* values, int nvalues) +@@ -92,7 +92,7 @@ + #define FINDPSNAMEEND(s,n) n=0; while(stype) { + case FONT_TYPE_PK: +diff -ur dvipng-1.12.orig/fontmap.c dvipng-1.12/fontmap.c +--- dvipng-1.12.orig/fontmap.c 2009-04-22 14:14:06.000000000 +0200 ++++ dvipng-1.12/fontmap.c 2009-06-09 12:55:27.000000000 +0200 +@@ -30,7 +30,7 @@ + #endif + static struct psfontmap *psfontmap=NULL; + +-char* newword(char** buffer, char* end) ++static char* newword(char** buffer, char* end) + { + char *word,*pos=*buffer; + +@@ -55,7 +55,7 @@ + return(word); + } + +-char* find_format(char* name) ++static char* find_format(char* name) + { + /* Cater for both new (first case) and old (second case) kpathsea */ + char* format = +@@ -134,7 +134,7 @@ + return(newentry); + } + +-struct psfontmap *SearchPSFontMap(char* fontname, ++static struct psfontmap *SearchPSFontMap(char* fontname, + struct filemmap* search_mmap) + { + static char *pos=NULL,*end=NULL; +@@ -196,7 +196,7 @@ + #endif + } + +-void ReadPSFontMap(struct psfontmap *entry) ++static void ReadPSFontMap(struct psfontmap *entry) + { + char *pos,*end,*psname; + int nameno = 0; +diff -ur dvipng-1.12.orig/ft.c dvipng-1.12/ft.c +--- dvipng-1.12.orig/ft.c 2009-03-25 14:04:41.000000000 +0100 ++++ dvipng-1.12/ft.c 2009-06-09 12:56:39.000000000 +0200 +@@ -145,7 +145,7 @@ + } + + +-void UnLoadFT(struct char_entry *ptr) ++static void UnLoadFT(struct char_entry *ptr) + { + if (ptr->data!=NULL) + free(ptr->data); +diff -ur dvipng-1.12.orig/papersiz.c dvipng-1.12/papersiz.c +--- dvipng-1.12.orig/papersiz.c 2008-02-08 14:45:24.000000000 +0100 ++++ dvipng-1.12/papersiz.c 2009-06-09 12:59:23.000000000 +0200 +@@ -36,7 +36,7 @@ + * Advance the passed pointer as well. + */ + +-int32_t myatodim(char ** p) ++static int32_t myatodim(char ** p) + { + double tmp; /* double accuracy is enough, I think */ + int i=0; +diff -ur dvipng-1.12.orig/pk.c dvipng-1.12/pk.c +--- dvipng-1.12.orig/pk.c 2009-03-25 14:05:54.000000000 +0100 ++++ dvipng-1.12/pk.c 2009-06-09 12:47:48.000000000 +0200 +@@ -35,7 +35,7 @@ + int repeatcount; + int poshalf; + +-unsigned char getnyb(unsigned char** pos) ++static unsigned char getnyb(unsigned char** pos) + { + if (poshalf == 0) { + poshalf=1; +@@ -46,7 +46,7 @@ + } + } + +-uint32_t pk_packed_num(unsigned char** pos) ++static uint32_t pk_packed_num(unsigned char** pos) + { + register int i; + uint32_t j; +@@ -77,7 +77,7 @@ + } + } + +-unsigned char* skip_specials(unsigned char* pos) ++static unsigned char* skip_specials(unsigned char* pos) + { + uint32_t i; + +@@ -384,7 +384,7 @@ + } + } + +-void UnLoadPK(struct char_entry *ptr) ++static void UnLoadPK(struct char_entry *ptr) + { + if (ptr->data!=NULL) + free(ptr->data); +diff -ur dvipng-1.12.orig/ppagelist.c dvipng-1.12/ppagelist.c +--- dvipng-1.12.orig/ppagelist.c 2008-02-08 14:45:23.000000000 +0100 ++++ dvipng-1.12/ppagelist.c 2009-06-09 12:45:06.000000000 +0200 +@@ -107,7 +107,7 @@ + return(false); + } + +-void ListPage(int32_t pslow, int32_t pshigh) ++static void ListPage(int32_t pslow, int32_t pshigh) + { + register struct pp_list *pl; + +diff -ur dvipng-1.12.orig/set.c dvipng-1.12/set.c +--- dvipng-1.12.orig/set.c 2009-03-25 14:06:04.000000000 +0100 ++++ dvipng-1.12/set.c 2009-06-09 12:45:07.000000000 +0200 +@@ -84,7 +84,7 @@ + } + + +-void ChangeColor(gdImagePtr imagep,int x1,int y1, ++static void ChangeColor(gdImagePtr imagep,int x1,int y1, + int x2,int y2,int color1,int color2) + /* In the given rectangle, change color1 to color2 */ + { +diff -ur dvipng-1.12.orig/sfd.c dvipng-1.12/sfd.c +--- dvipng-1.12.orig/sfd.c 2008-05-05 20:58:00.000000000 +0200 ++++ dvipng-1.12/sfd.c 2009-06-09 12:49:29.000000000 +0200 +@@ -25,7 +25,7 @@ + #include "dvipng.h" + struct subfont* subfontp=NULL; + +-struct subfont* ReadSubfont(char* sfdname, char *infix) ++static struct subfont* ReadSubfont(char* sfdname, char *infix) + { + char *pos,*max,*sfdfile=NULL; + struct subfont* sfdp=NULL; +diff -ur dvipng-1.12.orig/special.c dvipng-1.12/special.c +--- dvipng-1.12.orig/special.c 2009-03-24 15:03:27.000000000 +0100 ++++ dvipng-1.12/special.c 2009-06-09 13:01:45.000000000 +0200 +@@ -40,7 +40,7 @@ + + struct pscode* psheaderp=NULL; /* static, DVI-specific header list */ + +-void PSCodeInit(struct pscode *entry, char *special) ++static void PSCodeInit(struct pscode *entry, char *special) + { + entry->next=NULL; + entry->special=special; +@@ -91,7 +91,7 @@ + } + } + +-void writepscode(struct pscode* pscodep, FILE* psstream) ++static void writepscode(struct pscode* pscodep, FILE* psstream) + { + while (pscodep!=NULL) { + if (pscodep->code!=NULL) { +@@ -131,7 +131,7 @@ + } + + +-gdImagePtr ++static gdImagePtr + ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, + int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) + { +@@ -274,7 +274,7 @@ + return psimage; + } + +-gdImagePtr ++static gdImagePtr + rescale(gdImagePtr psimage, int pngwidth, int pngheight) + { + gdImagePtr scaledimage=psimage; +@@ -305,7 +305,7 @@ + return(scaledimage); + } + +-void newpsheader(char* special) { ++static void newpsheader(char* special) { + struct pscode* tmp; + char* txt; + +diff -ur dvipng-1.12.orig/t1.c dvipng-1.12/t1.c +--- dvipng-1.12.orig/t1.c 2009-03-25 14:06:12.000000000 +0100 ++++ dvipng-1.12/t1.c 2009-06-09 12:56:08.000000000 +0200 +@@ -164,7 +164,7 @@ + } + + +-void UnLoadT1(struct char_entry *ptr) ++static void UnLoadT1(struct char_entry *ptr) + { + if (ptr->data!=NULL) + free(ptr->data); diff --git a/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-05-warnings b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-05-warnings new file mode 100644 index 00000000000..2de4ce3a696 --- /dev/null +++ b/Build/source/texk/dvipng/dvipng-1.12-PATCHES/patch-05-warnings @@ -0,0 +1,382 @@ + Avoid compiler warnings: + ANSI C function definitions. + Declare various (param and other) strings as const. + * special.c (SetSpecial): Avoid assigning a literal string to + the non-const string variable 'special' (somewhat clumsy). + +diff -ur dvipng-1.12.orig/color.c dvipng-1.12/color.c +--- dvipng-1.12.orig/color.c 2009-06-09 12:58:51.000000000 +0200 ++++ dvipng-1.12/color.c 2009-10-01 11:14:12.000000000 +0200 +@@ -39,11 +39,11 @@ + char name[1]; + } *colornamep=NULL,*xcp=NULL; + +-char *colordef[]={"xcolor.sty","dvipsnam.def", +- "svgnam.def","x11nam.def",NULL}; ++const char *colordef[]={"xcolor.sty","dvipsnam.def", ++ "svgnam.def","x11nam.def",NULL}; + char *xcpname=NULL; + +-void initcolor() ++void initcolor(void) + { + csp = 1; + cstack[0].red=255; +@@ -54,7 +54,7 @@ + cstack[1].blue=0; + } + +-static struct colorname * NewColor(char* prefix, int nprefix, ++static struct colorname * NewColor(const char* prefix, int nprefix, + char* name, int nname, + char* model, int nmodel, + char* values, int nvalues) +@@ -92,11 +92,12 @@ + #define FINDPSNAMEEND(s,n) n=0; while(s 1) csp--; /* Last color is global */ + DEBUG_PRINT(DEBUG_COLOR,("\n COLOR POP\t")) + } + +-void resetcolorstack(char * p) ++void resetcolorstack(const char * p) + { + if ( csp > 1 ) + Warning("global color change within nested colors"); +diff -ur dvipng-1.12.orig/dvi.c dvipng-1.12/dvi.c +--- dvipng-1.12.orig/dvi.c 2009-06-09 12:36:50.000000000 +0200 ++++ dvipng-1.12/dvi.c 2009-10-01 00:45:04.000000000 +0200 +@@ -38,7 +38,7 @@ + + bool followmode=0; + +-bool DVIFollowToggle() ++bool DVIFollowToggle(void) + { + return followmode = ! followmode; + } +diff -ur dvipng-1.12.orig/dvipng.h dvipng-1.12/dvipng.h +--- dvipng-1.12.orig/dvipng.h 2009-03-25 14:04:41.000000000 +0100 ++++ dvipng-1.12/dvipng.h 2009-10-01 11:14:10.000000000 +0200 +@@ -223,9 +223,9 @@ + bool MmapFile (char *filename,struct filemmap *fmmap); + void UnMmapFile(struct filemmap* fmmap); + +-void Message(int, char *fmt, ...); +-void Warning(char *fmt, ...); +-void Fatal(char *fmt, ...); ++void Message(int, const char *fmt, ...); ++void Warning(const char *fmt, ...); ++void Fatal(const char *fmt, ...); + + int32_t SNumRead(unsigned char*, register int); + uint32_t UNumRead(unsigned char*, register int); +@@ -354,10 +354,10 @@ + #endif + + /********************************************************/ +-/********************* pplist.h ***********************/ ++/********************* ppagelist.h ********************/ + /********************************************************/ + +-bool ParsePages(char*); ++bool ParsePages(const char*); + void FirstPage(int32_t,bool); + void LastPage(int32_t,bool); + void ClearPpList(void); +@@ -396,19 +396,19 @@ + void EndVFMacro(void); + + /**************************************************/ +-void handlepapersize(char*,int32_t*,int32_t*); ++void handlepapersize(const char*,int32_t*,int32_t*); + +-void stringrgb(char* colorstring,int *r,int *g,int *b); +-void background(char *); ++void stringrgb(const char* colorstring,int *r,int *g,int *b); ++void background(const char *); + void initcolor(void); + void popcolor(void); +-void pushcolor(char *); +-void resetcolorstack(char *); ++void pushcolor(const char *); ++void resetcolorstack(const char *); + void StoreColorStack(struct page_list *tpagep); + void ReadColorStack(struct page_list *tpagep); + void StoreBackgroundColor(struct page_list *tpagep); + void ClearColorNames(void); +-void InitXColorPrologue(char* prologuename); ++void InitXColorPrologue(const char* prologuename); + + /**********************************************************************/ + /************************* Global Variables *************************/ +diff -ur dvipng-1.12.orig/fontmap.c dvipng-1.12/fontmap.c +--- dvipng-1.12.orig/fontmap.c 2009-06-09 12:55:27.000000000 +0200 ++++ dvipng-1.12/fontmap.c 2009-10-01 00:44:57.000000000 +0200 +@@ -55,7 +55,7 @@ + return(word); + } + +-static char* find_format(char* name) ++static char* find_format(const char* name) + { + /* Cater for both new (first case) and old (second case) kpathsea */ + char* format = +diff -ur dvipng-1.12.orig/misc.c dvipng-1.12/misc.c +--- dvipng-1.12.orig/misc.c 2009-03-25 14:05:54.000000000 +0100 ++++ dvipng-1.12/misc.c 2009-10-01 00:39:28.000000000 +0200 +@@ -690,7 +690,7 @@ + /**********************************************************************/ + /****************************** Fatal *******************************/ + /**********************************************************************/ +-void Fatal (char *fmt, ...) ++void Fatal (const char *fmt, ...) + { + va_list args; + +@@ -719,7 +719,7 @@ + /**********************************************************************/ + /***************************** Warning ******************************/ + /**********************************************************************/ +-void Warning(char *fmt, ...) ++void Warning(const char *fmt, ...) + { + va_list args; + +@@ -738,7 +738,7 @@ + /**********************************************************************/ + /***************************** Message ******************************/ + /**********************************************************************/ +-void Message(int activeflags, char *fmt, ...) ++void Message(int activeflags, const char *fmt, ...) + { + va_list args; + +diff -ur dvipng-1.12.orig/papersiz.c dvipng-1.12/papersiz.c +--- dvipng-1.12.orig/papersiz.c 2009-06-09 12:59:23.000000000 +0200 ++++ dvipng-1.12/papersiz.c 2009-10-01 01:49:36.000000000 +0200 +@@ -36,20 +36,21 @@ + * Advance the passed pointer as well. + */ + +-static int32_t myatodim(char ** p) ++static int32_t myatodim(const char ** p) + { + double tmp; /* double accuracy is enough, I think */ + int i=0; ++ char *q; + +- tmp = strtod(*p,p); +- while (**p == ' ') +- (*p)++; +- while (i<8 && ((*p)[0]!=lengthnames[i][0] || (*p)[1]!=lengthnames[i][1])) ++ tmp = strtod(*p,&q); ++ while (*q == ' ') ++ q++; ++ while (i<8 && (q[0]!=lengthnames[i][0] || q[1]!=lengthnames[i][1])) + i++; +- if (i==8 && ((*p)[0]!=lengthnames[i][0] || (*p)[1]!=lengthnames[i][1])) +- Warning("unrecognized length unit \"%.2s\", assuming inches",*p); +- while (**p != ',' && **p !='\0') +- (*p)++; ++ if (i==8 && (q[0]!=lengthnames[i][0] || q[1]!=lengthnames[i][1])) ++ Warning("unrecognized length unit \"%.2s\", assuming inches",q); ++ while (*q != ',' && *q !='\0') ++ q++; + tmp = tmp*lengthsp[i]*dpi/4736286L; /* sp * dots/in / (sp/in), convert sp to pixels */ + return((int32_t) tmp); + } +@@ -60,7 +61,7 @@ + * the string after the `papersize=' specification. + */ + +-void handlepapersize(char * p, int32_t * x, int32_t * y) ++void handlepapersize(const char * p, int32_t * x, int32_t * y) + { + while (*p == ' ') + p++ ; +diff -ur dvipng-1.12.orig/ppagelist.c dvipng-1.12/ppagelist.c +--- dvipng-1.12.orig/ppagelist.c 2009-06-09 12:45:06.000000000 +0200 ++++ dvipng-1.12/ppagelist.c 2009-10-01 10:40:01.000000000 +0200 +@@ -130,9 +130,10 @@ + /* Parse a string representing a list of pages. Return 0 iff ok. As a + side effect, the page selection(s) is (are) prepended to ppages. */ + +-bool ParsePages(char *s) ++bool ParsePages(const char *s) + { +- char *c; /* conversion start */ ++ const char *c; /* conversion start */ ++ char *t; + long int ps_low = PAGE_MINPAGE, ps_high = PAGE_MAXPAGE; + + while (*s==' ' || *s=='\t') s++; +@@ -140,23 +141,27 @@ + if (*s=='-' || *s==':') { /* range with no starting value */ + ps_low = PAGE_MINPAGE; + c=s+1; +- ps_high = strtol(c,&s,10); ++ ps_high = strtol(c,&t,10); ++ s = t; + if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ + while (*s==' ' || *s=='\t') s++; + if (*s=='-' || *s==':') { /* Oh, range with negative starting value */ + ps_low = -ps_high; + c=s+1; +- ps_high = strtol(c,&s,10); ++ ps_high = strtol(c,&t,10); ++ s = t; + if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ + } + } else { /* range with starting value, or singleton */ + c=s; +- ps_low = ps_high = strtol(c,&s,10); ++ ps_low = ps_high = strtol(c,&t,10); ++ s = t; + if (c==s) + return(true); + if (*s=='-' || *s==':') { /* range */ + c=s+1; +- ps_high = strtol(c,&s,10); ++ ps_high = strtol(c,&t,10); ++ s = t; + if (c==s) ps_high=PAGE_MAXPAGE; /* no number */ + } + } +diff -ur dvipng-1.12.orig/special.c dvipng-1.12/special.c +--- dvipng-1.12.orig/special.c 2009-06-09 13:01:45.000000000 +0200 ++++ dvipng-1.12/special.c 2009-10-01 14:43:06.000000000 +0200 +@@ -132,7 +132,7 @@ + + + static gdImagePtr +-ps2png(struct pscode* pscodep, char *device, int hresolution, int vresolution, ++ps2png(struct pscode* pscodep, const char *device, int hresolution, int vresolution, + int llx, int lly, int urx, int ury, int bgred, int bggreen, int bgblue) + { + #ifndef MIKTEX +@@ -305,7 +305,7 @@ + return(scaledimage); + } + +-static void newpsheader(char* special) { ++static void newpsheader(const char* special) { + struct pscode* tmp; + char* txt; + +@@ -669,6 +669,7 @@ + struct pscode *tmp; + gdImagePtr psimage=NULL; + char *txt; ++ const char *newspecial=NULL; /* Avoid warning from special="..." */ + + /* Some packages split their literal PostScript code into + several specials. Check for those, and concatenate them so +@@ -694,9 +695,9 @@ + specials. The first numbers are generally valid for the bop + instruction, and the latter code is to move the origin to + the right place. */ +- special="ps:: 39139632 55387786 1000 600 600 (tikzdefault.dvi) @start 1 0 bop pgfo 0 0 matrix defaultmatrix transform itransform translate"; ++ newspecial="ps:: 39139632 55387786 1000 600 600 (tikzdefault.dvi) @start 1 0 bop pgfo 0 0 matrix defaultmatrix transform itransform translate"; + else if (strcmp(special,"ps:: pgfc")==0) +- special="ps:: pgfc eop end"; ++ newspecial="ps:: pgfc eop end"; + nextisps=DVIIsNextPSSpecial(dvi); + if (psenvironment || nextisps) { + if (!nextisps) { +@@ -705,12 +706,20 @@ + } + /* Don't use alloca, we do not want to run out of stack space */ + DEBUG_PRINT(DEBUG_GS,("\n PS SPECIAL ")); +- txt=malloc(strlen(special)+1); +- strcpy(txt,special); ++ if (newspecial == NULL) ++ newspecial=special; ++ if ((txt=malloc(strlen(newspecial)+1))==NULL) ++ Fatal("cannot allocate space for raw PostScript special"); ++ strcpy(txt,newspecial); + PSCodeInit(tmp,txt); + return; + } + DEBUG_PRINT(DEBUG_DVI,("\n LAST PS SPECIAL ")); ++ if (newspecial != NULL) { ++ if ((special=malloc(strlen(newspecial)+1))==NULL) ++ Fatal("cannot allocate space for raw PostScript special"); ++ strcpy(special,newspecial); ++ } + PSCodeInit(tmp,special); + /* Now, render image */ + if (option_flags & NO_GHOSTSCRIPT) +@@ -752,6 +761,8 @@ + } + free(pscodep); + pscodep=NULL; ++ if (newspecial != NULL) ++ free(special); + if (psimage==NULL) + page_flags |= PAGE_GAVE_WARN; + Message(BE_NONQUIET,">"); diff --git a/Build/source/utils/t1utils/t1utils-1.34-PATCHES/ChangeLog b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/ChangeLog new file mode 100644 index 00000000000..6732b2ca655 --- /dev/null +++ b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/ChangeLog @@ -0,0 +1,13 @@ +2009-08-23 Peter Breitenlohner + + * patch-03-warnings (new): Avoid more compiler warnings. + +2009-08-19 Peter Breitenlohner + + * patch-02-static (new): Avoid warnings when compiling with + 'gcc --Wmissing-prototypes'. + +2009-06-12 Francois Charette + + * patch-01-getline (new): Avoid getline name conflict. + diff --git a/Build/source/utils/t1utils/t1utils-1.34-PATCHES/TL-Changes b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/TL-Changes new file mode 100644 index 00000000000..194016e2ac5 --- /dev/null +++ b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/TL-Changes @@ -0,0 +1,13 @@ +Changes applied to the t1utils-1.34 tree as obtained from: + http://www.lcdf.org/type/ + +Removed: + config.guess + config.sub + depcomp + install-sh + mkinstalldirs + +Moved this file to ../: + strerror.c + diff --git a/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-01-getline b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-01-getline new file mode 100644 index 00000000000..006771de650 --- /dev/null +++ b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-01-getline @@ -0,0 +1,32 @@ + Avoid conflict with getline from some newer C libraries. + +diff -ur t1utils-1.34.orig/t1asm.c t1utils-1.34/t1asm.c +--- t1utils-1.34.orig/t1asm.c 2008-03-01 18:59:11.000000000 +0100 ++++ t1utils-1.34/t1asm.c 2009-06-12 01:41:46.000000000 +0200 +@@ -280,7 +280,7 @@ + the newline is put into line[]. When terminated by '{', the '{' is not put + into line[], and the flag start_charstring is set to 1. */ + +-static void getline() ++static void texlive_getline() + { + int c; + char *p = line; +@@ -721,7 +721,7 @@ + without /Subrs sections and provided a patch. */ + + while (!feof(ifp) && !ferror(ifp)) { +- getline(); ++ texlive_getline(); + + if (!ever_active) { + if (strncmp(line, "currentfile eexec", 17) == 0 && isspace(line[17])) { +@@ -792,7 +792,7 @@ + + /* There may be additional code. */ + while (!feof(ifp) && !ferror(ifp)) { +- getline(); ++ texlive_getline(); + eexec_string(line); + } + diff --git a/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-02-static b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-02-static new file mode 100644 index 00000000000..f603ab022db --- /dev/null +++ b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-02-static @@ -0,0 +1,176 @@ + Declare all functions used in only one file as static. + +diff -ur t1utils-1.34.orig/clp.c t1utils-1.34/clp.c +--- t1utils-1.34.orig/clp.c 2006-01-19 18:41:30.000000000 +0100 ++++ t1utils-1.34/clp.c 2009-08-19 15:02:19.000000000 +0200 +@@ -680,7 +680,7 @@ + } + + +-int ++static int + finish_string_list(Clp_Parser *clp, int type_id, int flags, + Clp_Option *items, int nitems, int itemscap) + { +diff -ur t1utils-1.34.orig/t1ascii.c t1utils-1.34/t1ascii.c +--- t1utils-1.34.orig/t1ascii.c 2008-03-01 18:58:48.000000000 +0100 ++++ t1utils-1.34/t1ascii.c 2009-08-19 15:02:19.000000000 +0200 +@@ -100,7 +100,7 @@ + putc('\n', stderr); + } + +-void ++static void + short_usage(void) + { + fprintf(stderr, "Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\ +@@ -108,7 +108,7 @@ + program_name, program_name); + } + +-void ++static void + usage(void) + { + printf("\ +diff -ur t1utils-1.34.orig/t1asm.c t1utils-1.34/t1asm.c +--- t1utils-1.34.orig/t1asm.c 2009-06-12 01:41:46.000000000 +0200 ++++ t1utils-1.34/t1asm.c 2009-08-19 15:02:19.000000000 +0200 +@@ -572,7 +572,7 @@ + putc('\n', stderr); + } + +-void ++static void + short_usage(void) + { + fprintf(stderr, "Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\ +@@ -580,7 +580,7 @@ + program_name, program_name); + } + +-void ++static void + usage(void) + { + printf("\ +diff -ur t1utils-1.34.orig/t1binary.c t1utils-1.34/t1binary.c +--- t1utils-1.34.orig/t1binary.c 2008-03-01 18:59:18.000000000 +0100 ++++ t1utils-1.34/t1binary.c 2009-08-19 15:02:19.000000000 +0200 +@@ -132,7 +132,7 @@ + } + + +-void ++static void + short_usage(void) + { + fprintf(stderr, "Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\ +@@ -141,7 +141,7 @@ + } + + +-void ++static void + usage(void) + { + printf("\ +diff -ur t1utils-1.34.orig/t1disasm.c t1utils-1.34/t1disasm.c +--- t1utils-1.34.orig/t1disasm.c 2008-03-01 18:59:27.000000000 +0100 ++++ t1utils-1.34/t1disasm.c 2009-08-19 15:02:19.000000000 +0200 +@@ -640,7 +640,7 @@ + error_count++; + } + +-void ++static void + short_usage(void) + { + fprintf(stderr, "Usage: %s [INPUT [OUTPUT]]\n\ +@@ -648,7 +648,7 @@ + program_name, program_name); + } + +-void ++static void + usage(void) + { + printf("\ +diff -ur t1utils-1.34.orig/t1mac.c t1utils-1.34/t1mac.c +--- t1utils-1.34.orig/t1mac.c 2008-03-01 18:59:01.000000000 +0100 ++++ t1utils-1.34/t1mac.c 2009-08-19 14:57:25.000000000 +0200 +@@ -778,7 +778,7 @@ + } + + +-void ++static void + short_usage(void) + { + fprintf(stderr, "Usage: %s [OPTION]... [INPUT [OUTPUT]]\n\ +@@ -787,7 +787,7 @@ + } + + +-void ++static void + usage(void) + { + printf("\ +diff -ur t1utils-1.34.orig/t1unmac.c t1utils-1.34/t1unmac.c +--- t1utils-1.34.orig/t1unmac.c 2008-03-01 19:00:03.000000000 +0100 ++++ t1utils-1.34/t1unmac.c 2009-08-19 14:59:25.000000000 +0200 +@@ -259,7 +259,7 @@ + putc('\n', stderr); + } + +-void ++static void + short_usage(void) + { + fprintf(stderr, "Usage: %s [OPTION]... INPUT [OUTPUT]\n\ +@@ -267,7 +267,7 @@ + program_name, program_name); + } + +-void ++static void + usage(void) + { + printf("\ +@@ -388,7 +388,7 @@ + #define APPLESINGLE_MAGIC 0x00051600 + #define APPLEDOUBLE_MAGIC 0x00051607 + +-const char * ++static const char * + check_appledouble(FILE *ifp) + { + int i; +@@ -400,7 +400,7 @@ + return 0; + } + +-const char * ++static const char * + translate_binhex(FILE *f, FILE *tmpf) + { + int i, c = 0, last_char, after_x90, bits, bitpos; +@@ -486,7 +486,7 @@ + return 0; + } + +-int ++static int + check_binhex_crc(FILE *f, int offset, int length) + { + int crc = 0; +@@ -501,7 +501,7 @@ + return crc == 0; + } + +-const char * ++static const char * + check_binhex(FILE *f) + { + int fname_len, data_len, rsrc_len, off; diff --git a/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-03-warnings b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-03-warnings new file mode 100644 index 00000000000..66f072f1779 --- /dev/null +++ b/Build/source/utils/t1utils/t1utils-1.34-PATCHES/patch-03-warnings @@ -0,0 +1,122 @@ + Avoid compiler warnings: + ANSI C function definitions. + Declare various (param and other) strings as const. + +diff -ur t1utils-1.34.orig/t1ascii.c t1utils-1.34/t1ascii.c +--- t1utils-1.34.orig/t1ascii.c 2009-08-19 15:02:19.000000000 +0200 ++++ t1utils-1.34/t1ascii.c 2009-08-23 14:48:59.000000000 +0200 +@@ -172,7 +172,7 @@ + } + + static void +-pfa_output_end() ++pfa_output_end(void) + { + } + +diff -ur t1utils-1.34.orig/t1asm.c t1utils-1.34/t1asm.c +--- t1utils-1.34.orig/t1asm.c 2009-08-19 15:02:19.000000000 +0200 ++++ t1utils-1.34/t1asm.c 2009-08-23 14:49:03.000000000 +0200 +@@ -266,7 +266,7 @@ + charstring. We use the heuristic that it should start with `/' (a name) or + `dup' (a subroutine). Previous heuristic caused killa bad output. */ + +-static int check_line_charstring() ++static int check_line_charstring(void) + { + char *p = line; + while (isspace(*p)) +@@ -280,7 +280,7 @@ + the newline is put into line[]. When terminated by '{', the '{' is not put + into line[], and the flag start_charstring is set to 1. */ + +-static void texlive_getline() ++static void texlive_getline(void) + { + int c; + char *p = line; +@@ -367,7 +367,7 @@ + /* This function initializes charstring encryption. Note that this is called + at the beginning of every charstring. */ + +-static void charstring_start() ++static void charstring_start(void) + { + int i; + +@@ -390,7 +390,7 @@ + /* This function outputs buffered, encrypted charstring data through possible + eexec encryption. */ + +-static void charstring_end() ++static void charstring_end(void) + { + byte *bp; + +@@ -433,7 +433,7 @@ + + /* This function returns one charstring token. It ignores comments. */ + +-static void get_charstring_token() ++static void get_charstring_token(void) + { + int c = getc(ifp); + while (isspace(c)) +@@ -466,7 +466,7 @@ + /* This function parses an entire charstring into integers and commands, + outputting bytes through the charstring buffer. */ + +-static void parse_charstring() ++static void parse_charstring(void) + { + struct command *cp; + +diff -ur t1utils-1.34.orig/t1binary.c t1utils-1.34/t1binary.c +--- t1utils-1.34.orig/t1binary.c 2009-08-19 15:02:19.000000000 +0200 ++++ t1utils-1.34/t1binary.c 2009-08-23 14:49:01.000000000 +0200 +@@ -85,7 +85,7 @@ + } + + static void +-pfb_output_end() ++pfb_output_end(void) + { + pfb_writer_end(&w); + } +diff -ur t1utils-1.34.orig/t1disasm.c t1utils-1.34/t1disasm.c +--- t1utils-1.34.orig/t1disasm.c 2009-08-19 15:02:19.000000000 +0200 ++++ t1utils-1.34/t1disasm.c 2009-08-23 15:04:37.000000000 +0200 +@@ -332,11 +332,11 @@ + /* 23.Feb.2004 - use 'memstr', not strstr, because the strings input to + eexec_line aren't null terminated! Reported by Werner Lemberg. */ + +-static const unsigned char * +-oog_memstr(const unsigned char *line, int line_len, const char *pattern, int pattern_len) ++static unsigned char * ++oog_memstr(unsigned char *line, int line_len, const char *pattern, int pattern_len) + { +- const unsigned char *try; +- const unsigned char *last = line + line_len - pattern_len + 1; ++ unsigned char *try; ++ unsigned char *last = line + line_len - pattern_len + 1; + while (line < last + && (try = memchr(line, (unsigned char)*pattern, last - line))) { + if (memcmp(try, pattern, pattern_len) == 0) +@@ -432,7 +432,7 @@ + badly: a charstring definition follows "/Charstrings ... begin", ON THE + SAME LINE. */ + { +- const char *CharStrings = (const char *) ++ char *CharStrings = (char *) + oog_memstr(line, line_len, "/CharStrings ", 13); + int crap, n; + char should_be_slash = 0; +@@ -595,7 +595,7 @@ + } + + static void +-disasm_output_end() ++disasm_output_end(void) + { + /* take care of leftover saved data */ + static char crap[1] = ""; -- cgit v1.2.3