2013-06-15 22:06:55 +02:00
|
|
|
From: Jan Engelhardt <jengelh@inai.de>
|
|
|
|
Date: 2013-06-11 03:36:48.480850779 +0200
|
|
|
|
References: http://bugzilla.novell.com/824262
|
2015-10-09 11:42:29 +02:00
|
|
|
Directions: drop patch if unable to forward-port
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2019-04-18 14:14:14 +02:00
|
|
|
ICU sometimes changes their ABI without updating the SO numbers. They
|
|
|
|
did that before, and they did it again with 51.1->51.2. In part, this
|
|
|
|
is owed to how C++ is compiled on the contemporary implementations.
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
Thus, we will use the full version as the SO identifier in openSUSE.
|
|
|
|
|
2013-07-23 20:00:42 +02:00
|
|
|
Details:
|
|
|
|
|
2013-11-12 05:11:14 +01:00
|
|
|
U_ICU_VERSION_SHORT was (example) "51" before when there was a
|
|
|
|
libicui18n.so.51. Now, since there is a libicui18n.so.51.2, we need to
|
2013-07-23 20:00:42 +02:00
|
|
|
change U_ICU_VERSION_SHORT. But the define's documentation says
|
|
|
|
"without dots", and I do not know how much downstream code depends on
|
|
|
|
the non-dot feature, if at all. Anyhow, to bypass this question to
|
|
|
|
which we have no definite answer, U_ICU_VERSION_SHORT is instead simply
|
|
|
|
defined to "51_2" and we "fix" (read like: hack) it with symlinks.
|
|
|
|
|
|
|
|
However, the ICU source also uses U_ICU_VERSION_SHORT to construct the
|
|
|
|
path to its data files. However, as there is no "icudt51_2l.dat", but
|
|
|
|
only a "icudt51l.dat", U_ICU_VERSION_MAJOR_STR is introduced for
|
|
|
|
ICU-internal use, so that I do not have to edit more dirty Makefiles to
|
|
|
|
produce a "icudt51_2l.dat" instead. In fact, placing the version number
|
|
|
|
in "icudt51l" seems redundant, since that file is in a version-specific
|
|
|
|
directory anyway (/usr/share/icu/51.2/) — another point where ICU
|
|
|
|
development seems to not pay enough attention.
|
|
|
|
|
2013-06-15 22:06:55 +02:00
|
|
|
---
|
2014-10-11 18:52:20 +02:00
|
|
|
source/common/icuplug.cpp | 2 +-
|
2013-07-14 17:27:58 +02:00
|
|
|
source/common/unicode/utypes.h | 4 ++--
|
|
|
|
source/common/unicode/uvernum.h | 7 +++++--
|
2013-06-15 22:06:55 +02:00
|
|
|
source/config/mh-linux | 2 +-
|
|
|
|
source/config/pkgdataMakefile.in | 1 +
|
|
|
|
source/data/pkgdataMakefile.in | 1 +
|
|
|
|
source/extra/uconv/pkgdataMakefile.in | 1 +
|
|
|
|
source/icudefs.mk.in | 1 +
|
|
|
|
source/test/testdata/pkgdataMakefile.in | 1 +
|
|
|
|
source/tools/pkgdata/pkgdata.cpp | 4 ++--
|
2017-04-27 22:08:39 +02:00
|
|
|
10 files changed, 16 insertions(+), 8 deletions(-)
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2014-10-11 18:52:20 +02:00
|
|
|
Index: icu/source/common/icuplug.cpp
|
2013-07-14 17:27:58 +02:00
|
|
|
===================================================================
|
2014-10-11 18:52:20 +02:00
|
|
|
--- icu.orig/source/common/icuplug.cpp
|
|
|
|
+++ icu/source/common/icuplug.cpp
|
2016-12-10 16:27:45 +01:00
|
|
|
@@ -760,7 +760,7 @@ uplug_init(UErrorCode *status) {
|
2014-10-11 18:52:20 +02:00
|
|
|
pluginFile.append(plugin_dir, *status);
|
|
|
|
pluginFile.append(U_FILE_SEP_STRING, -1, *status);
|
|
|
|
pluginFile.append("icuplugins", -1, *status);
|
|
|
|
- pluginFile.append(U_ICU_VERSION_SHORT, -1, *status);
|
|
|
|
+ pluginFile.append(U_ICU_VERSION_MAJOR_STR, -1, *status);
|
|
|
|
pluginFile.append(".txt", -1, *status);
|
2013-07-14 17:27:58 +02:00
|
|
|
#endif
|
2014-10-11 18:52:20 +02:00
|
|
|
|
2013-07-14 17:27:58 +02:00
|
|
|
Index: icu/source/common/unicode/utypes.h
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/common/unicode/utypes.h
|
|
|
|
+++ icu/source/common/unicode/utypes.h
|
2016-12-10 16:27:45 +01:00
|
|
|
@@ -136,9 +136,9 @@
|
2013-07-14 17:27:58 +02:00
|
|
|
* ICU 1.8.x on EBCDIC, etc..
|
|
|
|
* @stable ICU 2.0
|
|
|
|
*/
|
|
|
|
-#define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER
|
|
|
|
+#define U_ICUDATA_NAME "icudt" U_ICU_VERSION_MAJOR_STR U_ICUDATA_TYPE_LETTER
|
|
|
|
#ifndef U_HIDE_INTERNAL_API
|
|
|
|
-#define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER /**< @internal */
|
|
|
|
+#define U_USRDATA_NAME "usrdt" U_ICU_VERSION_MAJOR_STR U_ICUDATA_TYPE_LETTER /**< @internal */
|
2015-10-09 11:42:29 +02:00
|
|
|
#define U_USE_USRDATA 0 /**< @internal */
|
2013-07-14 17:27:58 +02:00
|
|
|
#endif /* U_HIDE_INTERNAL_API */
|
|
|
|
|
|
|
|
Index: icu/source/common/unicode/uvernum.h
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/common/unicode/uvernum.h
|
|
|
|
+++ icu/source/common/unicode/uvernum.h
|
2019-04-01 17:27:24 +02:00
|
|
|
@@ -61,6 +61,7 @@
|
2013-07-14 17:27:58 +02:00
|
|
|
* @stable ICU 2.4
|
|
|
|
*/
|
2019-04-01 17:27:24 +02:00
|
|
|
#define U_ICU_VERSION_MAJOR_NUM 64
|
|
|
|
+#define U_ICU_VERSION_MAJOR_STR "64"
|
2013-07-14 17:27:58 +02:00
|
|
|
|
2013-11-12 05:11:14 +01:00
|
|
|
/** The current ICU minor version as an integer.
|
2013-07-14 17:27:58 +02:00
|
|
|
* This value will change in the subsequent releases of ICU
|
2019-04-01 17:27:24 +02:00
|
|
|
@@ -86,7 +87,9 @@
|
2013-07-14 17:27:58 +02:00
|
|
|
* This value will change in the subsequent releases of ICU
|
|
|
|
* @stable ICU 2.6
|
|
|
|
*/
|
2019-04-01 17:27:24 +02:00
|
|
|
-#define U_ICU_VERSION_SUFFIX _64
|
2013-07-14 17:27:58 +02:00
|
|
|
+#define ___icu_version_expand(major, minor) _ ## major ## _ ## minor
|
|
|
|
+#define ___icu_version_glue(major, minor) ___icu_version_expand(major, minor)
|
|
|
|
+#define U_ICU_VERSION_SUFFIX ___icu_version_glue(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \def U_DEF2_ICU_ENTRY_POINT_RENAME
|
2019-04-18 14:14:14 +02:00
|
|
|
@@ -152,7 +155,7 @@
|
2018-04-05 02:33:27 +02:00
|
|
|
*
|
|
|
|
* @stable ICU 2.6
|
2013-07-14 17:27:58 +02:00
|
|
|
*/
|
2019-04-01 17:27:24 +02:00
|
|
|
-#define U_ICU_VERSION_SHORT "64"
|
2019-04-18 14:14:14 +02:00
|
|
|
+#define U_ICU_VERSION_SHORT "64_2"
|
2017-12-30 09:56:10 +01:00
|
|
|
|
|
|
|
#ifndef U_HIDE_INTERNAL_API
|
|
|
|
/** Data version in ICU4C.
|
2013-06-15 22:06:55 +02:00
|
|
|
Index: icu/source/config/mh-linux
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/config/mh-linux
|
|
|
|
+++ icu/source/config/mh-linux
|
2016-12-10 16:27:45 +01:00
|
|
|
@@ -27,7 +27,7 @@ LDFLAGSICUDT=-nodefaultlibs -nostdlib
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
## Compiler switch to embed a library name
|
|
|
|
# The initial tab in the next line is to prevent icu-config from reading it.
|
|
|
|
- LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
|
|
|
|
+ LD_SONAME = -Wl,-soname -Wl,$(notdir $(FULL_SO_TARGET))
|
|
|
|
#SH# # We can't depend on MIDDLE_SO_TARGET being set.
|
|
|
|
#SH# LD_SONAME=
|
|
|
|
|
|
|
|
Index: icu/source/config/pkgdataMakefile.in
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/config/pkgdataMakefile.in
|
|
|
|
+++ icu/source/config/pkgdataMakefile.in
|
2016-12-10 16:27:45 +01:00
|
|
|
@@ -16,6 +16,7 @@ include $(top_builddir)/icudefs.mk
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
OUTPUTFILE=pkgdata.inc
|
|
|
|
MIDDLE_SO_TARGET=
|
|
|
|
+FULL_SO_TARGET=
|
2019-04-18 14:14:14 +02:00
|
|
|
PKGDATA_TRAILING_SPACE=" "
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
all : clean
|
|
|
|
Index: icu/source/data/pkgdataMakefile.in
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/data/pkgdataMakefile.in
|
|
|
|
+++ icu/source/data/pkgdataMakefile.in
|
2016-12-10 16:27:45 +01:00
|
|
|
@@ -16,6 +16,7 @@ include $(top_builddir)/icudefs.mk
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
OUTPUTFILE=icupkg.inc
|
|
|
|
MIDDLE_SO_TARGET=
|
|
|
|
+FULL_SO_TARGET=
|
2019-04-18 14:14:14 +02:00
|
|
|
PKGDATA_TRAILING_SPACE=" "
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
all : clean
|
|
|
|
Index: icu/source/extra/uconv/pkgdataMakefile.in
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/extra/uconv/pkgdataMakefile.in
|
|
|
|
+++ icu/source/extra/uconv/pkgdataMakefile.in
|
2019-04-18 14:14:14 +02:00
|
|
|
@@ -16,6 +16,7 @@ include $(top_builddir)/icudefs.mk
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2019-04-18 14:14:14 +02:00
|
|
|
OUTPUTFILE=pkgdata.inc
|
2013-06-15 22:06:55 +02:00
|
|
|
MIDDLE_SO_TARGET=
|
|
|
|
+FULL_SO_TARGET=
|
2019-04-18 14:14:14 +02:00
|
|
|
PKGDATA_TRAILING_SPACE=" "
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2019-04-18 14:14:14 +02:00
|
|
|
all : clean
|
2013-06-15 22:06:55 +02:00
|
|
|
Index: icu/source/icudefs.mk.in
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/icudefs.mk.in
|
|
|
|
+++ icu/source/icudefs.mk.in
|
2019-04-18 14:14:14 +02:00
|
|
|
@@ -202,6 +202,7 @@ LDLIBRARYPATH_ENVVAR = LD_LIBRARY_PATH
|
2013-06-15 22:06:55 +02:00
|
|
|
|
|
|
|
# Versioned target for a shared library.
|
|
|
|
FINAL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
|
|
|
|
+FULL_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION)
|
|
|
|
MIDDLE_SO_TARGET = $(SO_TARGET).$(SO_TARGET_VERSION_MAJOR)
|
|
|
|
SHARED_OBJECT = $(FINAL_SO_TARGET)
|
|
|
|
|
|
|
|
Index: icu/source/test/testdata/pkgdataMakefile.in
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/test/testdata/pkgdataMakefile.in
|
|
|
|
+++ icu/source/test/testdata/pkgdataMakefile.in
|
2019-04-18 14:14:14 +02:00
|
|
|
@@ -16,6 +16,7 @@ include $(top_builddir)/icudefs.mk
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2019-04-18 14:14:14 +02:00
|
|
|
OUTPUTFILE=pkgdata.inc
|
2013-06-15 22:06:55 +02:00
|
|
|
MIDDLE_SO_TARGET=
|
|
|
|
+FULL_SO_TARGET=
|
2019-04-18 14:14:14 +02:00
|
|
|
PKGDATA_TRAILING_SPACE=" "
|
2013-06-15 22:06:55 +02:00
|
|
|
|
2019-04-18 14:14:14 +02:00
|
|
|
all : clean
|
2013-06-15 22:06:55 +02:00
|
|
|
Index: icu/source/tools/pkgdata/pkgdata.cpp
|
|
|
|
===================================================================
|
|
|
|
--- icu.orig/source/tools/pkgdata/pkgdata.cpp
|
|
|
|
+++ icu/source/tools/pkgdata/pkgdata.cpp
|
2019-04-01 17:27:24 +02:00
|
|
|
@@ -1379,7 +1379,7 @@ static int32_t pkg_generateLibraryFile(c
|
|
|
|
length = static_cast<int32_t>(uprv_strlen(pkgDataFlags[GENLIB]) + uprv_strlen(pkgDataFlags[LDICUDTFLAGS]) +
|
2013-06-15 22:06:55 +02:00
|
|
|
((uprv_strlen(targetDir) + uprv_strlen(libFileNames[LIB_FILE_VERSION_TMP])) * 2) +
|
|
|
|
uprv_strlen(objectFile) + uprv_strlen(pkgDataFlags[LD_SONAME]) +
|
|
|
|
- uprv_strlen(pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION_MAJOR]) +
|
|
|
|
+ uprv_strlen(pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION]) +
|
2019-04-01 17:27:24 +02:00
|
|
|
uprv_strlen(pkgDataFlags[RPATH_FLAGS]) + uprv_strlen(pkgDataFlags[BIR_FLAGS]) + BUFFER_PADDING_SIZE);
|
2013-06-15 22:06:55 +02:00
|
|
|
#if U_PLATFORM == U_PF_CYGWIN
|
2019-04-01 17:27:24 +02:00
|
|
|
length += static_cast<int32_t>(uprv_strlen(targetDir) + uprv_strlen(libFileNames[LIB_FILE_CYGWIN_VERSION]));
|
|
|
|
@@ -1426,7 +1426,7 @@ static int32_t pkg_generateLibraryFile(c
|
2013-06-15 22:06:55 +02:00
|
|
|
#endif
|
|
|
|
objectFile,
|
|
|
|
pkgDataFlags[LD_SONAME],
|
|
|
|
- pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION_MAJOR],
|
|
|
|
+ pkgDataFlags[LD_SONAME][0] == 0 ? "" : libFileNames[LIB_FILE_VERSION],
|
|
|
|
pkgDataFlags[RPATH_FLAGS],
|
|
|
|
pkgDataFlags[BIR_FLAGS]);
|
|
|
|
|