SHA256
1
0
forked from pool/icu

Accepting request 183019 from X11:common:Factory

- Change icu-versioning.diff: Resolve libqt4 emitting a warning
  that it cannot dlopen libicui18n.so
- Build I18N data as a plain file rather than as an arch-dependent
  huge shared library
- Add icu-fix-install-mode-files.diff (forwarded request 183017 from jengelh)

OBS-URL: https://build.opensuse.org/request/show/183019
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/icu?expand=0&rev=41
This commit is contained in:
Stephan Kulow 2013-07-16 05:35:49 +00:00 committed by Git OBS Bridge
commit e430167931
4 changed files with 188 additions and 13 deletions

View File

@ -0,0 +1,51 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-06-28 12:54:31.002040372 +0200
build: fix abort of install procedure with packaging=files
When ./configure --with-data-packaging=files, make install aborts
because the previous developer did not test it with a normal
user account/DESTDIR install.
make[1]: Entering directory `/home/abuild/rpmbuild/BUILD/icu/source/data'
LD_LIBRARY_PATH=../stubdata:../tools/ctestfw:../lib:$LD_LIBRARY_PATH ../bin/pkgdata -O ../data/icupkg.inc -q -c -s /home/abuild/rpmbuild/BUILD/icu/source/data/out/build/icudt51l -d ./out -e icudt51 -T ./out/tmp -p icudt51l -m files -r 51.2 ./out/tmp/icudata.lst
/bin/sh ../mkinstalldirs /home/abuild/rpmbuild/BUILDROOT/icu-51.2-0.x86_64/usr/share/icu/51.2
mkdir /home/abuild/rpmbuild/BUILDROOT/icu-51.2-0.x86_64/usr/share/icu
mkdir /home/abuild/rpmbuild/BUILDROOT/icu-51.2-0.x86_64/usr/share/icu/51.2
/bin/sh ../mkinstalldirs /usr/share/icu/51.2/icudt51l
mkdir /usr/share/icu
mkdir: cannot create directory '/usr/share/icu': Permission denied
---
source/data/Makefile.in | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
Index: icu/source/data/Makefile.in
===================================================================
--- icu.orig/source/data/Makefile.in
+++ icu/source/data/Makefile.in
@@ -191,15 +191,15 @@ endif
install-local: $(PKGDATA_LIST) ./icupkg.inc packagedata $(OS390INSTALL)
$(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(ICUPKGDATA_DIR)
ifeq ($(PKGDATA_MODE),files)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE)
- $(MKINSTALLDIRS) $(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(CURR_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(LANG_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(REGION_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(ZONE_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(BREAK_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(COLLATION_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(RBNF_TREE)
+ $(MKINSTALLDIRS) $(DESTDIR)$(ICUPKGDATA_DIR)/$(ICUDATA_NAME)/$(TRANSLIT_TREE)
endif
ifneq ($(ENABLE_STATIC),)
ifeq ($(PKGDATA_MODE),dll)

View File

@ -10,6 +10,10 @@ SO numbers. They did that before, and they have done it with
Thus, we will use the full version as the SO identifier in openSUSE. Thus, we will use the full version as the SO identifier in openSUSE.
--- ---
source/common/icuplug.c | 2 +-
source/common/umapfile.c | 6 +++---
source/common/unicode/utypes.h | 4 ++--
source/common/unicode/uvernum.h | 7 +++++--
source/config/mh-linux | 2 +- source/config/mh-linux | 2 +-
source/config/pkgdataMakefile.in | 1 + source/config/pkgdataMakefile.in | 1 +
source/data/pkgdataMakefile.in | 1 + source/data/pkgdataMakefile.in | 1 +
@ -17,8 +21,95 @@ Thus, we will use the full version as the SO identifier in openSUSE.
source/icudefs.mk.in | 1 + source/icudefs.mk.in | 1 +
source/test/testdata/pkgdataMakefile.in | 1 + source/test/testdata/pkgdataMakefile.in | 1 +
source/tools/pkgdata/pkgdata.cpp | 4 ++-- source/tools/pkgdata/pkgdata.cpp | 4 ++--
7 files changed, 8 insertions(+), 3 deletions(-) 11 files changed, 19 insertions(+), 11 deletions(-)
Index: icu/source/common/icuplug.c
===================================================================
--- icu.orig/source/common/icuplug.c
+++ icu/source/common/icuplug.c
@@ -744,7 +744,7 @@ uplug_init(UErrorCode *status) {
uprv_strncpy(plugin_file, plugin_dir, 2047);
uprv_strncat(plugin_file, U_FILE_SEP_STRING,2047);
uprv_strncat(plugin_file, "icuplugins",2047);
- uprv_strncat(plugin_file, U_ICU_VERSION_SHORT ,2047);
+ uprv_strncat(plugin_file, U_ICU_VERSION_MAJOR_STR, 2047);
uprv_strncat(plugin_file, ".txt" ,2047);
#endif
Index: icu/source/common/umapfile.c
===================================================================
--- icu.orig/source/common/umapfile.c
+++ icu/source/common/umapfile.c
@@ -58,7 +58,7 @@
# define LIB_PREFIX "lib"
# define LIB_SUFFIX ".dll"
/* This is inconvienient until we figure out what to do with U_ICUDATA_NAME in utypes.h */
-# define U_ICUDATA_ENTRY_NAME "icudt" U_ICU_VERSION_SHORT U_LIB_SUFFIX_C_NAME_STRING "_dat"
+# define U_ICUDATA_ENTRY_NAME "icudt" U_ICU_VERSION_MAJOR_STR U_LIB_SUFFIX_C_NAME_STRING "_dat"
# endif
#elif MAP_IMPLEMENTATION==MAP_STDIO
# include <stdio.h>
@@ -411,10 +411,10 @@
/* BUT FOR BATCH MODE IT IS AN EXCEPTION BECAUSE */
/* THE FIRST THREE LETTERS ARE PREASSIGNED TO THE */
/* PROJECT!!!!! */
- uprv_strcpy(pathBuffer, "IXMI" U_ICU_VERSION_SHORT "DA");
+ uprv_strcpy(pathBuffer, "IXMI" U_ICU_VERSION_MAJOR_STR "DA");
# else
/* set up the library name */
- uprv_strcpy(basename, LIB_PREFIX U_LIBICUDATA_NAME U_ICU_VERSION_SHORT LIB_SUFFIX);
+ uprv_strcpy(basename, LIB_PREFIX U_LIBICUDATA_NAME U_ICU_VERSION_MAJOR_STR LIB_SUFFIX);
# endif
# ifdef UDATA_DEBUG
Index: icu/source/common/unicode/utypes.h
===================================================================
--- icu.orig/source/common/unicode/utypes.h
+++ icu/source/common/unicode/utypes.h
@@ -134,9 +134,9 @@
* 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 */
#define U_USE_USRDATA 1 /**< @internal */
#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
@@ -58,6 +58,7 @@
* @stable ICU 2.4
*/
#define U_ICU_VERSION_MAJOR_NUM 51
+#define U_ICU_VERSION_MAJOR_STR "51"
/** The current ICU minor version as an integer.
* This value will change in the subsequent releases of ICU
@@ -83,7 +84,9 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
-#define U_ICU_VERSION_SUFFIX _51
+#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
@@ -124,7 +127,7 @@
* This value will change in the subsequent releases of ICU
* @stable ICU 2.6
*/
-#define U_ICU_VERSION_SHORT "51"
+#define U_ICU_VERSION_SHORT "51_2"
#ifndef U_HIDE_INTERNAL_API
/** Data version in ICU4C.
Index: icu/source/config/mh-linux Index: icu/source/config/mh-linux
=================================================================== ===================================================================
--- icu.orig/source/config/mh-linux --- icu.orig/source/config/mh-linux

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun Jul 14 13:50:44 UTC 2013 - jengelh@inai.de
- Change icu-versioning.diff: Resolve libqt4 emitting a warning
that it cannot dlopen libicui18n.so
- Build I18N data as a plain file rather than as an arch-dependent
huge shared library
- Add icu-fix-install-mode-files.diff
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jun 15 20:05:05 UTC 2013 - jengelh@inai.de Sat Jun 15 20:05:05 UTC 2013 - jengelh@inai.de

View File

@ -33,6 +33,7 @@ Source3: sanitize_docs.sh
Patch1: icu-rpmlint.diff Patch1: icu-rpmlint.diff
Patch2: icu-remove-datetime.patch Patch2: icu-remove-datetime.patch
Patch3: icu-versioning.diff Patch3: icu-versioning.diff
Patch4: icu-fix-install-mode-files.diff
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkg-config BuildRequires: pkg-config
@ -51,10 +52,8 @@ line, and sentence breaking, etc.
This subpackage contains the runtime programs for interacting with ICU. This subpackage contains the runtime programs for interacting with ICU.
%package -n %lname %package -n %lname
# Splitting this package is of no significant benefit: Summary: International Components for Unicode
# icudata (largest part) is always needed. Group: System/Libraries
Summary: International Components for Unicode (development files)
Group: Development/Libraries/C and C++
%ifarch ppc64 %ifarch ppc64
# bug437293 # bug437293
Obsoletes: libicu-64bit Obsoletes: libicu-64bit
@ -64,12 +63,28 @@ Obsoletes: icu-i18ndata
# Following O/P added in timeframe for 12.2 # Following O/P added in timeframe for 12.2
Provides: libicu = %version-%release Provides: libicu = %version-%release
Obsoletes: libicu < %version-%release Obsoletes: libicu < %version-%release
Requires: libicu%aversion-data
%description -n %lname %description -n %lname
ICU is a set of C and C++ libraries that provides robust and ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the runtime full-featured Unicode support. This package contains the runtime
libraries for ICU which include precompiled locale data. libraries for ICU which include precompiled locale data.
%package -n libicu%aversion-data
Summary: International Components for Unicode
Group: System/Libraries
%if 0%{?suse_version} >= 1210
BuildArch: noarch
%endif
%description -n libicu%aversion-data
ICU is a set of C and C++ libraries that provides robust and
full-featured Unicode support. This package contains the runtime
libraries for ICU which include precompiled locale data.
This subpackage contains the precompiled ICU databases that contain
most of the locale-specific information.
%package -n libicu-devel %package -n libicu-devel
Summary: International Components for Unicode (development files) Summary: International Components for Unicode (development files)
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -104,21 +119,19 @@ found in the "icu" package.
This data describes the Unicode data (normative and informative) and This data describes the Unicode data (normative and informative) and
also all the table-based converters provided in the ICU distribution. also all the table-based converters provided in the ICU distribution.
This package contains uncompiled source data. Precompiled data is in This package contains uncompiled source data.
the "%lname" package.
%prep %prep
%setup -qn icu -a2 %setup -qn icu -a2
%patch -P 1 -P 2 -P 3 -p1 %patch -P 1 -P 2 -P 3 -P 4 -p1
%build %build
cd source cd source
export CXXFLAGS="%optflags -DICU_DATA_DIR=\\\"/usr/share/icu/%version/\\\"" export CXXFLAGS="%optflags -DICU_DATA_DIR=\\\"/usr/share/icu/%version/\\\""
export CFLAGS="$CXXFLAGS" export CFLAGS="$CXXFLAGS"
%configure --disable-static \ %configure --disable-static --enable-shared --disable-samples \
--enable-shared \ --with-data-packaging=archive
--disable-samples make %{?_smp_mflags}
make %{?_smp_mflags} VERBOSE=1
%install %install
b="%buildroot" b="%buildroot"
@ -156,12 +169,13 @@ rm "$b/%_datadir/icu/%version/install-sh"
%fdupes %buildroot/%_prefix %fdupes %buildroot/%_prefix
%check %check
#ln source/data/in/icudt51l.dat source/data/in/icudt%{version}l.dat
cd source cd source
%if !0%{?qemu_user_space_build:1} %if !0%{?qemu_user_space_build:1}
# Checks disabled in qemu because of races happening when we emulate # Checks disabled in qemu because of races happening when we emulate
# multi-threaded programs, and some check tests atomic instructions in # multi-threaded programs, and some check tests atomic instructions in
# multi-threaded icu invocations # multi-threaded icu invocations
make check VERBOSE=1 ICU_DATA="%buildroot/%_datadir/icu/%version" make check VERBOSE=1
%endif %endif
# This should be run by whatever owns /usr/lib64/icu - # This should be run by whatever owns /usr/lib64/icu -
@ -210,11 +224,19 @@ fi;
%defattr(-, root, root) %defattr(-, root, root)
%_libdir/libicu*.so.* %_libdir/libicu*.so.*
%files -n libicu%aversion-data
%defattr(-,root,root)
%dir %_datadir/icu
%dir %_datadir/icu/%version
%_datadir/icu/%version/icudt51l.dat
%files -n libicu-devel %files -n libicu-devel
%defattr(-, root, root) %defattr(-, root, root)
%_libdir/libicu*.so %_libdir/libicu*.so
%_includedir/unicode/ %_includedir/unicode/
%_includedir/layout/ %_includedir/layout/
%dir %_libdir/icu/
%dir %_libdir/icu/%version/
%_libdir/icu/%version/Makefile.inc %_libdir/icu/%version/Makefile.inc
%_libdir/icu/%version/pkgdata.inc %_libdir/icu/%version/pkgdata.inc
%_libdir/icu/Makefile.inc %_libdir/icu/Makefile.inc
@ -233,6 +255,8 @@ fi;
%files data %files data
%defattr(-, root, root) %defattr(-, root, root)
%dir %_datadir/icu/
%dir %_datadir/icu/%version/
%_datadir/icu/%version/unidata/ %_datadir/icu/%version/unidata/
%_datadir/icu/%version/UnicodeData.txt %_datadir/icu/%version/UnicodeData.txt