- release 4, rebuild against icu 64 auto/th/sword-1.7.4-4
authorAdam Gołębiowski <adamg@pld-linux.org>
Sat, 13 Apr 2019 21:40:20 +0000 (23:40 +0200)
committerAdam Gołębiowski <adamg@pld-linux.org>
Sat, 13 Apr 2019 21:40:20 +0000 (23:40 +0200)
sword-icu64.patch [new file with mode: 0644]

diff --git a/sword-icu64.patch b/sword-icu64.patch
new file mode 100644 (file)
index 0000000..8faf5e4
--- /dev/null
@@ -0,0 +1,78 @@
+diff -bur sword-1.7.4.orig/include/utf8transliterator.h sword-1.7.4/include/utf8transliterator.h
+--- sword-1.7.4.orig/include/utf8transliterator.h      2013-07-18 00:34:43.000000000 +0200
++++ sword-1.7.4/include/utf8transliterator.h   2019-04-13 23:12:32.614203906 +0200
+@@ -50,11 +50,11 @@
+ class SWModule;
+ struct SWTransData {
+-      UnicodeString resource;
++      icu::UnicodeString resource;
+       UTransDirection dir;
+ };
+-typedef std::map<const UnicodeString, SWTransData> SWTransMap;
+-typedef std::pair<UnicodeString, SWTransData> SWTransPair;
++typedef std::map<const icu::UnicodeString, SWTransData> SWTransMap;
++typedef std::pair<icu::UnicodeString, SWTransData> SWTransPair;
+ /** This Filter uses ICU for transliteration
+ */
+@@ -77,11 +77,11 @@
+       UErrorCode utf8status;
+       void Load(UErrorCode &status);
+-      void registerTrans(const UnicodeString& ID, const UnicodeString& resource, UTransDirection dir, UErrorCode &status);    
+-      bool checkTrans(const UnicodeString& ID, UErrorCode &status);
++      void registerTrans(const icu::UnicodeString& ID, const icu::UnicodeString& resource, UTransDirection dir, UErrorCode &status);  
++      bool checkTrans(const icu::UnicodeString& ID, UErrorCode &status);
+ #endif
+       bool addTrans(const char* newTrans, SWBuf* transList);
+-      Transliterator *createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status);
++      icu::Transliterator *createTrans(const icu::UnicodeString& ID, UTransDirection dir, UErrorCode &status);
+ public:
+       UTF8Transliterator();
+diff -bur sword-1.7.4.orig/src/modules/filters/utf8nfc.cpp sword-1.7.4/src/modules/filters/utf8nfc.cpp
+--- sword-1.7.4.orig/src/modules/filters/utf8nfc.cpp   2014-04-17 05:56:12.000000000 +0200
++++ sword-1.7.4/src/modules/filters/utf8nfc.cpp        2019-04-13 23:20:04.374845084 +0200
+@@ -46,11 +46,11 @@
+               return -1;
+         
+       err = U_ZERO_ERROR;
+-      UnicodeString source(text.getRawData(), text.length(), conv, err);
+-      UnicodeString target;
++      icu::UnicodeString source(text.getRawData(), text.length(), conv, err);
++      icu::UnicodeString target;
+       err = U_ZERO_ERROR;
+-      Normalizer::normalize(source, UNORM_NFC, 0, target, err);
++      icu::Normalizer::normalize(source, UNORM_NFC, 0, target, err);
+       err = U_ZERO_ERROR;
+       text.setSize(text.size()*2); // potentially, it can grow to 2x the original size
+diff -bur sword-1.7.4.orig/src/modules/filters/utf8transliterator.cpp sword-1.7.4/src/modules/filters/utf8transliterator.cpp
+--- sword-1.7.4.orig/src/modules/filters/utf8transliterator.cpp        2013-07-18 00:44:29.000000000 +0200
++++ sword-1.7.4/src/modules/filters/utf8transliterator.cpp     2019-04-13 23:18:33.983429613 +0200
+@@ -328,9 +328,9 @@
+ }
+-Transliterator * UTF8Transliterator::createTrans(const UnicodeString& ID, UTransDirection dir, UErrorCode &status )
++icu::Transliterator * UTF8Transliterator::createTrans(const icu::UnicodeString& ID, UTransDirection dir, UErrorCode &status )
+ {
+-      Transliterator *trans = Transliterator::createInstance(ID,UTRANS_FORWARD,status);
++      icu::Transliterator *trans = icu::Transliterator::createInstance(ID,UTRANS_FORWARD,status);
+       if (U_FAILURE(status)) {
+               delete trans;
+               return NULL;
+@@ -906,9 +906,9 @@
+                 addTrans("NFC", &ID);
+                 err = U_ZERO_ERROR;
+-                Transliterator * trans = createTrans(UnicodeString(ID), UTRANS_FORWARD, err);
++              icu::Transliterator * trans = createTrans(icu::UnicodeString(ID), UTRANS_FORWARD, err);
+                 if (trans && !U_FAILURE(err)) {
+-                        UnicodeString target = UnicodeString(source);
++                      icu::UnicodeString target = icu::UnicodeString(source);
+                       trans->transliterate(target);
+                       text.setSize(text.size()*2);
+                       len = ucnv_fromUChars(conv, text.getRawData(), text.size(), target.getBuffer(), target.length(), &err);
This page took 0.083816 seconds and 4 git commands to generate.