diff options
Diffstat (limited to 'Build/source/libs/teckit/TECkit-PATCHES')
6 files changed, 319 insertions, 0 deletions
diff --git a/Build/source/libs/teckit/TECkit-PATCHES/ChangeLog b/Build/source/libs/teckit/TECkit-PATCHES/ChangeLog new file mode 100644 index 00000000000..ffb9e3a9093 --- /dev/null +++ b/Build/source/libs/teckit/TECkit-PATCHES/ChangeLog @@ -0,0 +1,67 @@ +2014-07-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + Imported TECkit-2.5.4 source tree (teckit) from + http://scripts.sil.org/svn-public/teckit/TRUNK + (svn r139 2014-07-09 14:47:39 UTC). + + * patch-06-backport-r119 (removed): Now in source tree. + * patch-02-warning, patch-03-warnings, patch-04-pragmas, + patch-05-static: Adapted. + +2014-06-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-06-static_cast (removed): Replaced by ... + * patch-06-backport-r119 (new): ... Backport upstream changes: + svn r117: Update test runner for compatibility with newer + versions of perl + svn r118: Update Normalization test data for 6.0.0 + svn r119: Fix data-narrowing bug + +2014-06-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-06-static_cast (new): Add static_cast required by C++11. + +2012-10-13 Peter Breitenlohner <peb@mppmu.mpg.de> + + Avoid TL vs W32TeX diffs (from Akira). + * patch-04-pragmas (new): Remove '#pragma's. + * patch-05-static (new): Build a static library and not a Dll. + +2012-03-17 Peter Breitenlohner <peb@mppmu.mpg.de> + + Imported TECkit-2.5.3 source tree (teckit) from + http://scripts.sil.org/svn-public/teckit/TRUNK + (svn r116 2011-05-12 18:24:47 UTC). + + * patch-01-debian-505693, patch-04-case-sensitive (removed): + Now in source tree. + * patch-02-warning, patch-03-warnings: Adapted. + +2010-02-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-04-case-sensitive (new): #include <windows.h> instead + of <Windows.h> for, e.g., Linux => MinGW32 cross compilation. + +2009-10-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + Reconstruct TL TECkit sources from distributed tarball. + * TL-changes (new): Modifications applied to the distribution. + * patch-[0-9][0-9]-*: Patches applied to the distribution. + +2009-10-01 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-03-warnings (new): Avoid maximal compiler warnings. + source/Sample-tools/TECkit_Compile.cpp, source/Engine.{cpp,h}, + source/Public-headers/TECkit_Compiler.h, source/Compiler.cpp: + Constify. + +2009-06-25 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-02-warning (new): Avoid compiler warning. + source/Compiler.h: change type of Compiler::Pass.passType + long -> UInt32. + +2008-11-17 Jonathan Kew <jonathan_kew@sil.org> + + * patch-01-debian-505693 (new): Bug fix. + diff --git a/Build/source/libs/teckit/TECkit-PATCHES/TL-Changes b/Build/source/libs/teckit/TECkit-PATCHES/TL-Changes new file mode 100644 index 00000000000..1d3e207a88f --- /dev/null +++ b/Build/source/libs/teckit/TECkit-PATCHES/TL-Changes @@ -0,0 +1,39 @@ +Changes applied to the TECkit-2.5.4/ tree obtained from: + http://scripts.sil.org/svn-public/teckit/TRUNK + (svn r139 2014-07-09 14:47:39 UTC). + +Removed execute permissions from: + installed-top.pc.in + teckit.pc.in + uninstalled-top.pc.in + +Removed: + .gitignore + SFconv/expat/xmlparse/.cvsignore + SFconv/expat/xmlparse/CVS/ + SFconv/expat/xmltok/.cvsignore + SFconv/expat/xmltok/CVS/ + SFconv/expat/xmlwf/CVS/ + TECkit.mcp + build-mac-binaries.sh + build-linux-package.sh + build-windows-binaries.sh + debian-src/ + mac-installer/ + perl_binaries/ + source/teckitjni/ + zlib-1.2.3/ + +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 + +Added newline at end of file: + source/Carbon.r + diff --git a/Build/source/libs/teckit/TECkit-PATCHES/patch-02-warning b/Build/source/libs/teckit/TECkit-PATCHES/patch-02-warning new file mode 100644 index 00000000000..31e29ec497e --- /dev/null +++ b/Build/source/libs/teckit/TECkit-PATCHES/patch-02-warning @@ -0,0 +1,14 @@ + Avoid compiler warning. + +diff -ur TECkit-2.5.4.orig/source/Compiler.h TECkit-2.5.4/source/Compiler.h +--- TECkit-2.5.4.orig/source/Compiler.h 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Compiler.h 2014-07-18 10:59:53.000000000 +0200 +@@ -230,7 +230,7 @@ + vector<UInt32> byteClassLines; + vector<UInt32> uniClassLines; + +- long passType; ++ UInt32 passType; + UInt32 uniDefault; + UInt8 byteDefault; + bool supplementaryChars; diff --git a/Build/source/libs/teckit/TECkit-PATCHES/patch-03-warnings b/Build/source/libs/teckit/TECkit-PATCHES/patch-03-warnings new file mode 100644 index 00000000000..f157ad022ec --- /dev/null +++ b/Build/source/libs/teckit/TECkit-PATCHES/patch-03-warnings @@ -0,0 +1,104 @@ + Avoid more compiler warnings. + +diff -ur TECkit-2.5.4.orig/source/Compiler.cpp TECkit-2.5.4/source/Compiler.cpp +--- TECkit-2.5.4.orig/source/Compiler.cpp 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Compiler.cpp 2014-07-18 11:01:30.000000000 +0200 +@@ -189,14 +189,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; +@@ -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.4.orig/source/Engine.cpp TECkit-2.5.4/source/Engine.cpp +--- TECkit-2.5.4.orig/source/Engine.cpp 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Engine.cpp 2014-07-18 11:01:30.000000000 +0200 +@@ -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; + +@@ -2184,7 +2184,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.4.orig/source/Engine.h TECkit-2.5.4/source/Engine.h +--- TECkit-2.5.4.orig/source/Engine.h 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Engine.h 2014-07-18 11:01:30.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.4.orig/source/Public-headers/TECkit_Compiler.h TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h +--- TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h 2014-07-18 11:01:30.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.4.orig/source/Sample-tools/TECkit_Compile.cpp TECkit-2.5.4/source/Sample-tools/TECkit_Compile.cpp +--- TECkit-2.5.4.orig/source/Sample-tools/TECkit_Compile.cpp 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Sample-tools/TECkit_Compile.cpp 2014-07-18 11:07:05.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) + { + fprintf(stderr, "%s", msg); + if (param != 0) diff --git a/Build/source/libs/teckit/TECkit-PATCHES/patch-04-pragmas b/Build/source/libs/teckit/TECkit-PATCHES/patch-04-pragmas new file mode 100644 index 00000000000..fc75d22e5d8 --- /dev/null +++ b/Build/source/libs/teckit/TECkit-PATCHES/patch-04-pragmas @@ -0,0 +1,51 @@ + Remove the '#pragma's, they seem to cause problems for MSVC + and are certainly not needed otherwise. + +diff -ur TECkit-2.5.4.orig/source/Engine.cpp TECkit-2.5.4/source/Engine.cpp +--- TECkit-2.5.4.orig/source/Engine.cpp 2014-07-18 11:01:30.000000000 +0200 ++++ TECkit-2.5.4/source/Engine.cpp 2014-07-18 11:11:09.000000000 +0200 +@@ -102,8 +102,6 @@ + #endif + } + +-#pragma mark --- class Stage --- +- + Stage::Stage() + : oBuffer(0) + , oBufSize(0) +@@ -125,8 +123,6 @@ + return 0; + } + +-#pragma mark --- class Normalizer --- +- + #include "NormalizationData.c" + + Normalizer::Normalizer(bool compose) +@@ -396,8 +392,6 @@ + return c; + } + +-#pragma mark --- class Pass --- +- + Pass::Pass(const TableHeader* inTable, Converter* cnv) + : converter(cnv) + , tableHeader(inTable) +@@ -1282,8 +1276,6 @@ + return 0; + } + +-#pragma mark --- class Converter --- +- + Converter::Converter(const Byte* inTable, UInt32 inTableSize, bool inForward, + UInt16 inForm, UInt16 outForm) + : table(0) +@@ -1934,8 +1926,6 @@ + return true; + } + +-#pragma mark --- Public "C" API functions --- +- + TECkit_Status + WINAPI + TECkit_CreateConverter( diff --git a/Build/source/libs/teckit/TECkit-PATCHES/patch-05-static b/Build/source/libs/teckit/TECkit-PATCHES/patch-05-static new file mode 100644 index 00000000000..2e90b8f6218 --- /dev/null +++ b/Build/source/libs/teckit/TECkit-PATCHES/patch-05-static @@ -0,0 +1,44 @@ + For TeX Live we build a static library and not a Dll. + +diff -ur TECkit-2.5.4.orig/source/Engine.cpp TECkit-2.5.4/source/Engine.cpp +--- TECkit-2.5.4.orig/source/Engine.cpp 2014-07-18 11:11:09.000000000 +0200 ++++ TECkit-2.5.4/source/Engine.cpp 2014-07-18 11:18:02.000000000 +0200 +@@ -51,12 +51,6 @@ + # define NOSERVICE + # define NOMCX + # include <windows.h> +- +- BOOL WINAPI +- DllMain(HINSTANCE /*hInst*/, DWORD /*wDataSeg*/, LPVOID /*lpReserved*/) +- { +- return true; +- } + #endif + + #include "Engine.h" +diff -ur TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h +--- TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h 2014-07-18 11:01:30.000000000 +0200 ++++ TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h 2014-07-18 11:18:02.000000000 +0200 +@@ -30,6 +30,9 @@ + #ifdef _WIN32 + /* MS compiler has predefined _WIN32, so assume Windows target */ + #include <windows.h> // apparently just using windef.h fails on VC++6 ++#undef WINAPI ++#define WINAPI ++#define EXPORTED + #else + /* not the MS compiler, so try Metrowerks' platform macros */ + #ifndef __APPLE__ +diff -ur TECkit-2.5.4.orig/source/Public-headers/TECkit_Engine.h TECkit-2.5.4/source/Public-headers/TECkit_Engine.h +--- TECkit-2.5.4.orig/source/Public-headers/TECkit_Engine.h 2014-07-01 02:13:39.000000000 +0200 ++++ TECkit-2.5.4/source/Public-headers/TECkit_Engine.h 2014-07-18 11:18:02.000000000 +0200 +@@ -80,6 +80,9 @@ + #ifdef _WIN32 + /* MS compiler has predefined _WIN32, so assume Windows target */ + #include <windows.h> ++#undef WINAPI ++#define WINAPI ++#define EXPORTED + #else + /* not the MS compiler, so try Metrowerks' platform macros */ + #ifndef __APPLE__ |