Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Leap:15.0:Staging:A
firebird
unicode-handle-the-ICU-version-hack-from-SuSE.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File unicode-handle-the-ICU-version-hack-from-SuSE.patch of Package firebird
From: Michal Kubecek <mkubecek@suse.cz> Date: Mon, 1 Sep 2014 11:49:49 +0200 Subject: unicode: handle the ICU version hack from SuSE OpenSuSE >= 13.1 adds minor version into ICU soname to cope with repeated upstream ABI breakages. We therefore need to make unicode_util functions adapt to this. --- src/common/unicode_util.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/common/unicode_util.cpp b/src/common/unicode_util.cpp index e72ee291973d..b232252b91a3 100644 --- a/src/common/unicode_util.cpp +++ b/src/common/unicode_util.cpp @@ -52,6 +52,8 @@ // The next major ICU version after 4.8 is 49. #define ICU_NEW_VERSION_MEANING 49 +// openSUSE >= 13.1 adds minor version to soname +#define ICU_VERSION_SUSE_HACK 51 using namespace Firebird; @@ -347,7 +349,9 @@ static void formatFilename(PathName& filename, const char* templateName, int majorVersion, int minorVersion) { string s; - if (majorVersion >= ICU_NEW_VERSION_MEANING) + if (majorVersion >= ICU_VERSION_SUSE_HACK) + s.printf("%d_%d", majorVersion, minorVersion); + else if (majorVersion >= ICU_NEW_VERSION_MEANING) s.printf("%d", majorVersion); else s.printf("%d%d", majorVersion, minorVersion); @@ -970,13 +974,20 @@ UnicodeUtil::ICU* UnicodeUtil::loadICU(const string& icuVersion, const string& c &majorVersion, &minorVersion); if (n == 1) - minorVersion = 0; + { + n = sscanf((*i == "default" ? version : *i).c_str(), "%d_%d", + &majorVersion, &minorVersion); + if (n == 1) + minorVersion = 0; + } else if (n != 2) continue; string configVersion; - if (majorVersion >= ICU_NEW_VERSION_MEANING) + if (majorVersion >= ICU_VERSION_SUSE_HACK) + configVersion.printf("%d_%d", majorVersion, minorVersion); + else if (majorVersion >= ICU_NEW_VERSION_MEANING) { minorVersion = 0; configVersion.printf("%d", majorVersion); @@ -1138,7 +1149,7 @@ UnicodeUtil::ConversionICU& UnicodeUtil::getConversionICU() LocalStatus ls; CheckStatusWrapper lastError(&ls); string version; - const int majorArray[] = {5, 4, 3, 6, 0}; + const int majorArray[] = {5, 51, 52, 53, 54, 55, 56, 57, 58, 59, 4, 3, 6, 0}; for (const int* major = majorArray; *major; ++major) { @@ -1180,7 +1191,9 @@ string UnicodeUtil::getDefaultIcuVersion() string rc; UnicodeUtil::ConversionICU& icu(UnicodeUtil::getConversionICU()); - if (icu.vMajor >= ICU_NEW_VERSION_MEANING) + if (icu.vMajor >= ICU_VERSION_SUSE_HACK) + rc.printf("%d_%d", icu.vMajor, icu.vMinor); + else if (icu.vMajor >= ICU_NEW_VERSION_MEANING) rc.printf("%d", icu.vMajor); else rc.printf("%d.%d", icu.vMajor, icu.vMinor); -- 2.8.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor