summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglasseyes <dglassey@gmail.com>2018-11-12 22:31:21 +0700
committerglasseyes <dglassey@gmail.com>2018-11-12 22:31:21 +0700
commit68d8eb378abb3490ae7f5afa8fc5c446798907c5 (patch)
treee9d161536412460a56a5e4040aa42a5090d6f16d
parent89198cdafd1857f3dfc7256d1ba8cbd095b4b29e (diff)
icu and piuparts
add Breaks/Replaces on libsword11v5 >= 1.8 add icu 63 patch
-rw-r--r--debian/changelog11
-rw-r--r--debian/control2
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/sword_ICU_63.1.patch648
4 files changed, 662 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 1f4079b..d2eee94 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+sword (1.8.1+dfsg-8) UNRELEASED-WIP-DO-NOT-UPLOAD-YET; urgency=medium
+
+ * Breaks/Replaces on libsword11v5 >= 1.8, Closes: #913407
+ Thanks to Andreas Beckmann
+ * Patch to build against libicu63, Closes: #913511
+ Thanks to László Böszörményi the icu maintainer
+ * 1.8.1+dfsg-1 made build reproducible again, Closes: #912161
+ Thanks to Chris Lamb for the earlier reproducibility patch
+
+ -- Daniel Glassey <wdg@debian.org> Mon, 12 Nov 2018 22:06:58 +0700
+
sword (1.8.1+dfsg-7) unstable; urgency=medium
* debian/python-sword.install: removed
diff --git a/debian/control b/debian/control
index 7c547cd..d86126b 100644
--- a/debian/control
+++ b/debian/control
@@ -25,6 +25,8 @@ Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends: libsword-common, ${shlibs:Depends}, ${misc:Depends}
Recommends: sword-frontend
+Breaks: libsword11v5 (>= 1.8)
+Replaces: libsword11v5 (>= 1.8)
Multi-Arch: same
Description: API/library for bible software
The SWORD Project is an open source, cross-platform (Linux, Windows, Solaris,
diff --git a/debian/patches/series b/debian/patches/series
index 9cdd410..8c56ec3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
0005-untgz-sprintf.patch
0006-powerpc64.patch
0007-gbfwordjs.patch
+sword_ICU_63.1.patch
diff --git a/debian/patches/sword_ICU_63.1.patch b/debian/patches/sword_ICU_63.1.patch
new file mode 100644
index 0000000..9e1e006
--- /dev/null
+++ b/debian/patches/sword_ICU_63.1.patch
@@ -0,0 +1,648 @@
+Description: fix FTBFS with ICU 63.1
+ Add icu namespace.
+Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
+Last-Update: 2018-11-04
+
+---
+
+--- sword-1.8.1.orig/include/utf8transliterator.h
++++ sword-1.8.1/include/utf8transliterator.h
+@@ -50,11 +50,11 @@ SWORD_NAMESPACE_START
+ 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 @@ private:
+ 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();
+--- sword-1.8.1.orig/src/modules/filters/scsuutf8.cpp
++++ sword-1.8.1/src/modules/filters/scsuutf8.cpp
+@@ -140,7 +140,7 @@ char SCSUUTF8::processText(SWBuf &text,
+ #ifdef _ICU_
+ // Try decoding with ICU if possible
+ err = U_ZERO_ERROR;
+- UnicodeString utf16Text(text.getRawData(), text.length(), scsuConv, err);
++ icu::UnicodeString utf16Text(text.getRawData(), text.length(), scsuConv, err);
+ err = U_ZERO_ERROR;
+ int32_t len = utf16Text.extract(text.getRawData(), text.size(), utf8Conv, err);
+ if (len > (int32_t)text.size()+1) {
+--- sword-1.8.1.orig/src/modules/filters/utf8nfc.cpp
++++ sword-1.8.1/src/modules/filters/utf8nfc.cpp
+@@ -46,11 +46,11 @@ char UTF8NFC::processText(SWBuf &text, c
+ 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
+--- sword-1.8.1.orig/src/modules/filters/utf8scsu.cpp
++++ sword-1.8.1/src/modules/filters/utf8scsu.cpp
+@@ -46,7 +46,7 @@ char UTF8SCSU::processText(SWBuf &text,
+ return -1;
+
+ err = U_ZERO_ERROR;
+- UnicodeString utf16Text(text.getRawData(), text.length(), utf8Conv, err);
++ icu::UnicodeString utf16Text(text.getRawData(), text.length(), utf8Conv, err);
+ err = U_ZERO_ERROR;
+ int32_t len = utf16Text.extract(text.getRawData(), text.size(), scsuConv, err);
+ if (len > (int32_t)text.size()+1) {
+--- sword-1.8.1.orig/src/modules/filters/utf8transliterator.cpp
++++ sword-1.8.1/src/modules/filters/utf8transliterator.cpp
+@@ -107,14 +107,14 @@ const char UTF8Transliterator::SW_RESDAT
+
+ class SWCharString {
+ public:
+- inline SWCharString(const UnicodeString& str);
++ inline SWCharString(const icu::UnicodeString& str);
+ inline ~SWCharString();
+ inline operator const char*() { return ptr; }
+ private:
+ char buf[128];
+ char* ptr;
+ };
+-SWCharString::SWCharString(const UnicodeString& str) {
++SWCharString::SWCharString(const icu::UnicodeString& str) {
+ // TODO This isn't quite right -- we should probably do
+ // preflighting here to determine the real length.
+ if (str.length() >= (int32_t)sizeof(buf)) {
+@@ -176,9 +176,9 @@ void UTF8Transliterator::Load(UErrorCode
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+- UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+- UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+- UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
++ icu::UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
++ icu::UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
++ icu::UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
+ SWLog::getSystemLog()->logDebug("ok so far");
+
+ if (U_SUCCESS(status)) {
+@@ -223,7 +223,7 @@ void UTF8Transliterator::Load(UErrorCode
+ #endif // _ICUSWORD_
+ }
+
+-void UTF8Transliterator::registerTrans(const UnicodeString& ID, const UnicodeString& resource,
++void UTF8Transliterator::registerTrans(const icu::UnicodeString& ID, const icu::UnicodeString& resource,
+ UTransDirection dir, UErrorCode &status )
+ {
+ #ifndef _ICUSWORD_
+@@ -238,10 +238,10 @@ void UTF8Transliterator::registerTrans(
+ #endif
+ }
+
+-bool UTF8Transliterator::checkTrans(const UnicodeString& ID, UErrorCode &status )
++bool UTF8Transliterator::checkTrans(const icu::UnicodeString& ID, UErrorCode &status )
+ {
+ #ifndef _ICUSWORD_
+- Transliterator *trans = Transliterator::createInstance(ID, UTRANS_FORWARD, status);
++ icu::Transliterator *trans = icu::Transliterator::createInstance(ID, UTRANS_FORWARD, status);
+ if (!U_FAILURE(status))
+ {
+ // already have it, clean up and return true
+@@ -259,14 +259,14 @@ bool UTF8Transliterator::checkTrans(cons
+ UParseError parseError;
+ //UErrorCode status;
+ //std::cout << "unregistering " << ID << std::endl;
+- //Transliterator::unregister(ID);
++ //icu::Transliterator::unregister(ID);
+ SWLog::getSystemLog()->logDebug("resource is %s", swstuff.resource.getBuffer());
+
+ // Get the rules
+ //std::cout << "importing: " << ID << ", " << resource << std::endl;
+ SWCharString ch(swstuff.resource);
+ UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status);
+- const UnicodeString rules = ures_getUnicodeStringByKey(bundle, SW_RB_RULE, &status);
++ const icu::UnicodeString rules = ures_getUnicodeStringByKey(bundle, SW_RB_RULE, &status);
+ ures_close(bundle);
+ //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
+ // parseError, status);
+@@ -277,7 +277,7 @@ bool UTF8Transliterator::checkTrans(cons
+ }
+
+
+- Transliterator *trans = Transliterator::createFromRules(ID, rules, swstuff.dir,
++ icu::Transliterator *trans = icu::Transliterator::createFromRules(ID, rules, swstuff.dir,
+ parseError,status);
+ if (U_FAILURE(status)) {
+ SWLog::getSystemLog()->logError("UTF8Transliterator: ICU: Failed to create transliterator");
+@@ -291,10 +291,10 @@ bool UTF8Transliterator::checkTrans(cons
+ return false;
+ }
+
+- Transliterator::registerInstance(trans);
++ icu::Transliterator::registerInstance(trans);
+ return true;
+
+- //Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
++ //icu::Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
+ //return trans;
+ }
+ else
+@@ -311,7 +311,7 @@ bool UTF8Transliterator::addTrans(const
+ #ifdef ICU_CUSTOM_RESOURCE_BUILDING
+ #ifdef _ICUSWORD_
+ UErrorCode status;
+- if (checkTrans(UnicodeString(newTrans), status)) {
++ if (checkTrans(icu::UnicodeString(newTrans), status)) {
+ #endif
+ #endif // ICU_CUSTOM_RESOURCE_BUILDING
+ *transList += newTrans;
+@@ -328,9 +328,9 @@ bool UTF8Transliterator::addTrans(const
+ }
+
+
+-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 @@ char UTF8Transliterator::processText(SWB
+ 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);
+--- sword-1.8.1.orig/tests/tlitmgrtest.cpp
++++ sword-1.8.1/tests/tlitmgrtest.cpp
+@@ -21,7 +21,7 @@
+ */
+
+ /*
+- * void Transliterator::initializeRegistry(void) {
++ * void icu::Transliterator::initializeRegistry(void) {
+ // Lock first, check registry pointer second
+ Mutex lock(&registryMutex);
+ if (registry != 0) {
+@@ -45,7 +45,7 @@
+ * <id>:alias:<getInstanceArg>:
+ *
+ * <id> is the ID of the system transliterator being defined. These
+- * are public IDs enumerated by Transliterator.getAvailableIDs(),
++ * are public IDs enumerated by icu::Transliterator.getAvailableIDs(),
+ * unless the second field is "internal".
+ *
+ * <resource> is a ResourceReader resource name. Currently these refer
+@@ -55,7 +55,7 @@
+ * <direction> is either "FORWARD" or "REVERSE".
+ *
+ * <getInstanceArg> is a string to be passed directly to
+- * Transliterator.getInstance(). The returned Transliterator object
++ * icu::Transliterator.getInstance(). The returned icu::Transliterator object
+ * then has its ID changed to <id> and is returned.
+ *
+ * The extra blank field on "alias" lines is to make the array square.
+@@ -73,9 +73,9 @@
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+- UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+- UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+- UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
++ icu::UnicodeString id = icu::ures_getUnicodeStringByIndex(colBund, 0, &status);
++ UChar type = icu::ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
++ icu::UnicodeString resString = icu::ures_getUnicodeStringByIndex(colBund, 2, &status);
+
+ if (U_SUCCESS(status)) {
+ switch (type) {
+@@ -86,7 +86,7 @@
+ {
+ UBool visible = (type == 0x0066 /f/);
+ UTransDirection dir =
+- (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
++ (icu::ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /F/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ registry->put(id, resString, dir, visible);
+@@ -133,7 +133,7 @@
+ */
+
+
+-/*Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID,
++/*icu::Transliterator* TransliteratorRegistry::instantiateEntry(const icu::UnicodeString& ID,
+ Entry *entry,
+ TransliteratorAlias* &aliasReturn,
+ UParseError& parseError,
+@@ -150,8 +150,8 @@
+ } else if (entry->entryType == Entry::FACTORY) {
+ return entry->u.factory.function(ID, entry->u.factory.context);
+ } else if (entry->entryType == Entry::COMPOUND_RBT) {
+- UnicodeString id("_", "");
+- Transliterator *t = new RuleBasedTransliterator(id, entry->u.data);
++ icu::UnicodeString id("_", "");
++ icu::Transliterator *t = new RuleBasedTransliterator(id, entry->u.data);
+ aliasReturn = new TransliteratorAlias(ID, entry->stringArg, t, entry->intArg, entry->compoundFilter);
+ return 0;
+ }
+@@ -176,7 +176,7 @@
+ // name; this in no way represents an actual locale.
+ CharString ch(entry->stringArg);
+ UResourceBundle *bundle = ures_openDirect(0, ch, &status);
+- UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
++ icu::UnicodeString rules = icu::ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
+ ures_close(bundle);
+
+ // If the status indicates a failure, then we don't have any
+@@ -209,7 +209,7 @@
+ // top of the loop, then loop back to the top. As long as we
+ // do this, we only loop through twice at most.
+ // NOTE: The logic here matches that in
+- // Transliterator::createFromRules().
++ // icu::Transliterator::createFromRules().
+ if (entry->stringArg.length() == 0) {
+ if (entry->u.data == 0) {
+ // No idBlock, no data -- this is just an
+@@ -249,7 +249,7 @@
+
+ class SWCharString {
+ public:
+- inline SWCharString(const UnicodeString& str);
++ inline SWCharString(const icu::UnicodeString& str);
+ inline ~SWCharString();
+ inline operator const char*() { return ptr; }
+ private:
+@@ -257,7 +257,7 @@ class SWCharString {
+ char* ptr;
+ };
+
+-inline SWCharString::SWCharString(const UnicodeString& str) {
++inline SWCharString::SWCharString(const icu::UnicodeString& str) {
+ // TODO This isn't quite right -- we should probably do
+ // preflighting here to determine the real length.
+ if (str.length() >= (int32_t)sizeof(buf)) {
+@@ -287,21 +287,21 @@ static const char SW_RESDATA[] = "/usr/l
+ using namespace std;
+
+ struct SWTransData {
+- UnicodeString resource;
++ icu::UnicodeString resource;
+ UTransDirection dir;
+ };
+
+-typedef map <const UnicodeString, SWTransData> SWTransMap;
++typedef map <const icu::UnicodeString, SWTransData> SWTransMap;
+
+-typedef pair<UnicodeString, SWTransData> SWTransPair;
++typedef pair<icu::UnicodeString, SWTransData> SWTransPair;
+
+ SWTransMap *sw_tmap;
+
+-Transliterator * instantiateTrans(const UnicodeString& ID, const UnicodeString& resource,
++icu::Transliterator * instantiateTrans(const icu::UnicodeString& ID, const icu::UnicodeString& resource,
+ UTransDirection dir, UParseError &parseError, UErrorCode &status );
+
+-Transliterator *SWTransFactory(const UnicodeString &ID,
+- Transliterator::Token context)
++icu::Transliterator *SWTransFactory(const icu::UnicodeString &ID,
++ icu::Transliterator::Token context)
+ {
+ std::cout << "running factory for " << ID << std::endl;
+ SWTransMap::iterator swelement;
+@@ -312,19 +312,19 @@ Transliterator *SWTransFactory(const Uni
+ UParseError parseError;
+ UErrorCode status;
+ std::cout << "unregistering " << ID << std::endl;
+- Transliterator::unregister(ID);
++ icu::Transliterator::unregister(ID);
+ std::cout << "resource is " << swstuff.resource << std::endl;
+- Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
++ icu::Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
+ return trans;
+ }
+ return NULL;
+ }
+
+-void instantiateTransFactory(const UnicodeString& ID, const UnicodeString& resource,
++void instantiateTransFactory(const icu::UnicodeString& ID, const icu::UnicodeString& resource,
+ UTransDirection dir, UParseError &parseError, UErrorCode &status )
+ {
+ std::cout << "making factory for ID " << ID << std::endl;
+- Transliterator::Token context;
++ icu::Transliterator::Token context;
+ SWTransData swstuff;
+ swstuff.resource = resource;
+ swstuff.dir = dir;
+@@ -332,10 +332,10 @@ void instantiateTransFactory(const Unic
+ swpair.first = ID;
+ swpair.second = swstuff;
+ sw_tmap->insert(swpair);
+- Transliterator::registerFactory(ID, &SWTransFactory, context);
++ icu::Transliterator::registerFactory(ID, &SWTransFactory, context);
+ }
+
+-void registerTrans(const UnicodeString& ID, const UnicodeString& resource,
++void registerTrans(const icu::UnicodeString& ID, const icu::UnicodeString& resource,
+ UTransDirection dir, UErrorCode &status )
+ {
+ std::cout << "registering ID locally " << ID << std::endl;
+@@ -348,9 +348,9 @@ void registerTrans(const UnicodeString&
+ sw_tmap->insert(swpair);
+ }
+
+-bool checkTrans(const UnicodeString& ID, UErrorCode &status )
++bool checkTrans(const icu::UnicodeString& ID, UErrorCode &status )
+ {
+- Transliterator *trans = Transliterator::createInstance(ID, UTRANS_FORWARD, status);
++ icu::Transliterator *trans = icu::Transliterator::createInstance(ID, UTRANS_FORWARD, status);
+ if (!U_FAILURE(status))
+ {
+ // already have it, clean up and return true
+@@ -368,14 +368,14 @@ bool checkTrans(const UnicodeString& ID,
+ UParseError parseError;
+ //UErrorCode status;
+ //std::cout << "unregistering " << ID << std::endl;
+- //Transliterator::unregister(ID);
++ //icu::Transliterator::unregister(ID);
+ std::cout << "resource is " << swstuff.resource << std::endl;
+
+ // Get the rules
+ //std::cout << "importing: " << ID << ", " << resource << std::endl;
+ SWCharString ch(swstuff.resource);
+ UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status);
+- const UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
++ const icu::UnicodeString rules = icu::ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
+ ures_close(bundle);
+ //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
+ // parseError, status);
+@@ -386,7 +386,7 @@ bool checkTrans(const UnicodeString& ID,
+ }
+
+
+- Transliterator *trans = Transliterator::createFromRules(ID, rules, swstuff.dir,
++ icu::Transliterator *trans = icu::Transliterator::createFromRules(ID, rules, swstuff.dir,
+ parseError,status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to create transliterator" << std::endl;
+@@ -400,10 +400,10 @@ bool checkTrans(const UnicodeString& ID,
+ return false;
+ }
+
+- Transliterator::registerInstance(trans);
++ icu::Transliterator::registerInstance(trans);
+ return true;
+
+- //Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
++ //icu::Transliterator *trans = instantiateTrans(ID, swstuff.resource, swstuff.dir, parseError, status);
+ //return trans;
+ }
+ else
+@@ -412,15 +412,15 @@ bool checkTrans(const UnicodeString& ID,
+ }
+ }
+
+-Transliterator * createTrans(const UnicodeString& preID, const UnicodeString& ID,
+- const UnicodeString& postID, UTransDirection dir, UErrorCode &status )
++icu::Transliterator * createTrans(const icu::UnicodeString& preID, const icu::UnicodeString& ID,
++ const icu::UnicodeString& postID, UTransDirection dir, UErrorCode &status )
+ {
+ // extract id to check from ID xxx;id;xxx
+ if (checkTrans(ID, status)) {
+- UnicodeString fullID = preID;
++ icu::UnicodeString fullID = preID;
+ fullID += ID;
+ fullID += postID;
+- Transliterator *trans = Transliterator::createInstance(fullID,UTRANS_FORWARD,status);
++ icu::Transliterator *trans = icu::Transliterator::createInstance(fullID,UTRANS_FORWARD,status);
+ if (U_FAILURE(status)) {
+ delete trans;
+ return NULL;
+@@ -434,7 +434,7 @@ Transliterator * createTrans(const Unico
+ }
+ }
+
+-Transliterator * instantiateTrans(const UnicodeString& ID, const UnicodeString& resource,
++icu::Transliterator * instantiateTrans(const icu::UnicodeString& ID, const icu::UnicodeString& resource,
+ UTransDirection dir, UParseError &parseError, UErrorCode &status )
+ {
+ //TransliterationRuleData *ruleData;
+@@ -447,7 +447,7 @@ Transliterator * instantiateTrans(const
+ std::cout << "importing: " << ID << ", " << resource << std::endl;
+ SWCharString ch(resource);
+ UResourceBundle *bundle = ures_openDirect(SW_RESDATA, ch, &status);
+- const UnicodeString rules = ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
++ const icu::UnicodeString rules = icu::ures_getUnicodeStringByKey(bundle, RB_RULE, &status);
+ ures_close(bundle);
+ //parser.parse(rules, isReverse ? UTRANS_REVERSE : UTRANS_FORWARD,
+ // parseError, status);
+@@ -462,7 +462,7 @@ Transliterator * instantiateTrans(const
+
+ //entry->entryType = Entry::RBT_DATA;
+ //return new RuleBasedTransliterator(ID, ruleData);
+- Transliterator *trans = Transliterator::createFromRules(ID, rules, dir, parseError, status);
++ icu::Transliterator *trans = icu::Transliterator::createFromRules(ID, rules, dir, parseError, status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to create transliterator" << std::endl;
+ std::cout << "status " << u_errorName(status) << std::endl;
+@@ -475,7 +475,7 @@ Transliterator * instantiateTrans(const
+ return NULL;
+ }
+
+- Transliterator::registerInstance(trans);
++ icu::Transliterator::registerInstance(trans);
+ return trans;
+ }
+
+@@ -500,9 +500,9 @@ void initiateSwordTransliterators(UError
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+- UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+- UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+- UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
++ icu::UnicodeString id = icu::ures_getUnicodeStringByIndex(colBund, 0, &status);
++ UChar type = icu::ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
++ icu::UnicodeString resString = icu::ures_getUnicodeStringByIndex(colBund, 2, &status);
+
+ if (U_SUCCESS(status)) {
+ switch (type) {
+@@ -513,7 +513,7 @@ void initiateSwordTransliterators(UError
+ {
+ //UBool visible = (type == 0x0066 /*f*/);
+ UTransDirection dir =
+- (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
++ (icu::ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /*F*/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ //registry->put(id, resString, dir, visible);
+@@ -567,9 +567,9 @@ void initiateSwordTransliteratorsByFacto
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+- UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+- UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+- UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
++ icu::UnicodeString id = icu::ures_getUnicodeStringByIndex(colBund, 0, &status);
++ UChar type = icu::ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
++ icu::UnicodeString resString = icu::ures_getUnicodeStringByIndex(colBund, 2, &status);
+ std::cout << "ok so far" << std::endl;
+
+ if (U_SUCCESS(status)) {
+@@ -581,7 +581,7 @@ void initiateSwordTransliteratorsByFacto
+ {
+ //UBool visible = (type == 0x0066 /*f*/);
+ UTransDirection dir =
+- (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
++ (icu::ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /*F*/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ //registry->put(id, resString, dir, visible);
+@@ -636,9 +636,9 @@ void initiateSwordTransliteratorsToMap(U
+ colBund = ures_getByIndex(transIDs, row, 0, &status);
+
+ if (U_SUCCESS(status) && ures_getSize(colBund) == 4) {
+- UnicodeString id = ures_getUnicodeStringByIndex(colBund, 0, &status);
+- UChar type = ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
+- UnicodeString resString = ures_getUnicodeStringByIndex(colBund, 2, &status);
++ icu::UnicodeString id = icu::ures_getUnicodeStringByIndex(colBund, 0, &status);
++ UChar type = icu::ures_getUnicodeStringByIndex(colBund, 1, &status).charAt(0);
++ icu::UnicodeString resString = icu::ures_getUnicodeStringByIndex(colBund, 2, &status);
+ std::cout << "ok so far" << std::endl;
+
+ if (U_SUCCESS(status)) {
+@@ -650,7 +650,7 @@ void initiateSwordTransliteratorsToMap(U
+ {
+ //UBool visible = (type == 0x0066 /*f*/);
+ UTransDirection dir =
+- (ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
++ (icu::ures_getUnicodeStringByIndex(colBund, 3, &status).charAt(0) ==
+ 0x0046 /*F*/) ?
+ UTRANS_FORWARD : UTRANS_REVERSE;
+ //registry->put(id, resString, dir, visible);
+@@ -690,19 +690,19 @@ int main()
+ {
+ sw_tmap = new SWTransMap();
+ UErrorCode status = U_ZERO_ERROR;
+- std::cout << "Available before: " << Transliterator::countAvailableIDs() << std::endl;
++ std::cout << "Available before: " << icu::Transliterator::countAvailableIDs() << std::endl;
+ //initiateSwordTransliterators(status);
+ //initiateSwordTransliteratorsByFactory(status);
+ initiateSwordTransliteratorsToMap(status);
+- int32_t cids = Transliterator::countAvailableIDs();
++ int32_t cids = icu::Transliterator::countAvailableIDs();
+ std::cout << "Available after: " << cids << std::endl;
+
+ //for ( int32_t i=0;i<cids;i++) {
+- // std::cout << i << ": " << Transliterator::getAvailableID(i) << std::endl;
++ // std::cout << i << ": " << icu::Transliterator::getAvailableID(i) << std::endl;
+ //}
+
+- //Transliterator *trans = Transliterator::createInstance("NFD;Latin-Gothic;NFC", UTRANS_FORWARD,status);
+- Transliterator *trans = createTrans("NFD;", "Latin-Gothic", ";NFC", UTRANS_FORWARD,status);
++ //icu::Transliterator *trans = icu::Transliterator::createInstance("NFD;Latin-Gothic;NFC", UTRANS_FORWARD,status);
++ icu::Transliterator *trans = createTrans("NFD;", "Latin-Gothic", ";NFC", UTRANS_FORWARD,status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to get Latin-Gothic" << std::endl;
+ status = U_ZERO_ERROR;
+@@ -713,9 +713,9 @@ int main()
+ delete trans;
+ }
+
+- std::cout << "Available after gothic: " << Transliterator::countAvailableIDs() << std::endl;
++ std::cout << "Available after gothic: " << icu::Transliterator::countAvailableIDs() << std::endl;
+
+- //trans = Transliterator::createInstance("NFD;BGreek-Greek;NFC", UTRANS_FORWARD, status);
++ //trans = icu::Transliterator::createInstance("NFD;BGreek-Greek;NFC", UTRANS_FORWARD, status);
+ trans = createTrans("NFD;", "BGreek-Greek", ";NFC", UTRANS_FORWARD, status);
+ if (U_FAILURE(status)) {
+ std::cout << "Failed to get BGreek-Greek" << std::endl;
+@@ -726,7 +726,7 @@ int main()
+ std::cout << "Got BGreek-Greek :)" << std::endl;
+ delete trans;
+ }
+- std::cout << "Available after greek: " << Transliterator::countAvailableIDs() << std::endl;
++ std::cout << "Available after greek: " << icu::Transliterator::countAvailableIDs() << std::endl;
+
+ delete sw_tmap;
+
+--- sword-1.8.1.orig/tests/translittest.cpp
++++ sword-1.8.1/tests/translittest.cpp
+@@ -36,7 +36,7 @@
+ using namespace std;
+
+ // Print the given string to stdout
+-void uprintf(const UnicodeString &str) {
++void uprintf(const icu::UnicodeString &str) {
+ char *buf = 0;
+ int32_t len = str.length();
+ // int32_t bufLen = str.extract(0, len, buf); // Preflight
+@@ -90,7 +90,7 @@ int main() {
+ u_errorName(status) << std::endl;
+ return 0;
+ }
+- std::cout << "available " << Transliterator::countAvailableIDs() << std::endl;
++ std::cout << "available " << icu::Transliterator::countAvailableIDs() << std::endl;
+ //udata_setAppData("/usr/local/lib/sword/swicu.dat" , pAppData, &status);
+ //if (U_FAILURE(status))
+ //{
+@@ -99,20 +99,20 @@ int main() {
+ //return 0;
+ //}
+
+- int32_t i_ids = Transliterator::countAvailableIDs();
++ int32_t i_ids = icu::Transliterator::countAvailableIDs();
+
+ std::cout << "available " << i_ids << std::endl;
+ for (int i=0; i<i_ids;i++)
+ {
+ std::cout << "id " << i << ": ";
+- uprintf(Transliterator::getAvailableID(i));
++ uprintf(icu::Transliterator::getAvailableID(i));
+ std::cout << std::endl;
+ }
+
+
+ //UTF8Transliterator utran = new UTF8Transliterator();
+ std::cout << "creating transliterator 2" << std::endl;
+- Transliterator *btrans = Transliterator::createInstance("NFD;Latin-Greek;NFC",
++ icu::Transliterator *btrans = icu::Transliterator::createInstance("NFD;Latin-Greek;NFC",
+ UTRANS_FORWARD, status);
+ if (U_FAILURE(status))
+ {
+@@ -121,7 +121,7 @@ int main() {
+ return 0;
+ }
+ std::cout << "creating transliterator 1" << std::endl;
+- Transliterator *trans = Transliterator::createInstance("NFD;Latin-Gothic;NFC",
++ icu::Transliterator *trans = icu::Transliterator::createInstance("NFD;Latin-Gothic;NFC",
+ UTRANS_FORWARD, status);
+ if (U_FAILURE(status))
+ {