diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..c2ddf57 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,4 @@ +libicu50 +libicu-devel + requires -libicu- + requires "libicu50- = " diff --git a/icu-remove-datetime.patch b/icu-remove-datetime.patch new file mode 100644 index 0000000..ab80fc9 --- /dev/null +++ b/icu-remove-datetime.patch @@ -0,0 +1,16 @@ +--- + source/Makefile.in | 1 - + 1 file changed, 1 deletion(-) + +Index: icu/source/Makefile.in +=================================================================== +--- icu.orig/source/Makefile.in ++++ icu/source/Makefile.in +@@ -286,7 +286,6 @@ $(top_builddir)/config/icu-config: $(top + LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < $(top_builddir)/config/Makefile.inc | grep -v '#M#' | uniq >> $@ + LC_ALL=C sed -f $(top_srcdir)/config/make2sh.sed < @platform_make_fragment@ | grep -v '#M#' | uniq >> $@ + cat $(top_srcdir)/config/icu-config-bottom >> $@ +- echo "# Rebuilt on "`date` >> $@ + chmod u-w $@ + + config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h diff --git a/icu-rpmlint.diff b/icu-rpmlint.diff new file mode 100644 index 0000000..44bb8a8 --- /dev/null +++ b/icu-rpmlint.diff @@ -0,0 +1,29 @@ +I: Statement might be overflowing a buffer in strncat. Common mistake: + BAD: strncat(buffer,charptr,sizeof(buffer)) is wrong, it takes the left over size as 3rd argument + GOOD: strncat(buffer,charptr,sizeof(buffer)-strlen(buffer)-1) +E: icu bufferoverflowstrncat pkgdata.cpp:299:87 + +--- + source/tools/pkgdata/pkgdata.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: icu/source/tools/pkgdata/pkgdata.cpp +=================================================================== +--- icu.orig/source/tools/pkgdata/pkgdata.cpp ++++ icu/source/tools/pkgdata/pkgdata.cpp +@@ -1914,12 +1914,12 @@ static void loadLists(UPKGOptions *o, UE + const char cmd[] = "icu-config --incpkgdatafile"; + + /* #1 try the same path where pkgdata was called from. */ +- findDirname(progname, cmdBuf, 1024, &status); ++ findDirname(progname, cmdBuf, sizeof(cmdBuf), &status); + if(U_SUCCESS(status)) { + if (cmdBuf[0] != 0) { +- uprv_strncat(cmdBuf, U_FILE_SEP_STRING, 1024); ++ uprv_strncat(cmdBuf, U_FILE_SEP_STRING, sizeof(cmdBuf)-1-strlen(cmdBuf)); + } +- uprv_strncat(cmdBuf, cmd, 1024); ++ uprv_strncat(cmdBuf, cmd, sizeof(cmdBuf)-1-strlen(cmdBuf)); + + if(verbose) { + fprintf(stdout, "# Calling icu-config: %s\n", cmdBuf); diff --git a/icu.changes b/icu.changes new file mode 100644 index 0000000..8694368 --- /dev/null +++ b/icu.changes @@ -0,0 +1,536 @@ +------------------------------------------------------------------- +Wed Nov 14 18:09:09 UTC 2012 - jengelh@inai.de + +- Update to new upstream release 50 +* Unicode 6.2: Turkish Lira Sign, improved word & line segmentation + (BreakIterator) for symbols +* CLDR 22.1: Data coverage & quality improved across all major + languages; new short width type for weekday names; new zhuyin + (Bopomofo) collation for Chinese; improved data for + CompactDecimalFormat & RBNF +* Time zone data: 2012h +* Ordinal-number support in MessageFormat & PluralRules +* Deprecate setLocale(locale) in PluralFormat +* Dictionary-based break iterators (word segmentation) + +------------------------------------------------------------------- +Wed Jul 11 21:35:12 UTC 2012 - jengelh@inai.de + +- Remove SuSEconfig.icu; only run the link updater on icu updates + (FATE#313539) + +------------------------------------------------------------------- +Wed Jun 13 12:34:53 UTC 2012 - cfarrell@suse.com + +- license update: SUSE-XFree86-1.0 + The license (as stated in the license.html page) is not upstream at + http://www.spdx.org/licenses yet - thus, use this version (with SUSE- + proprietary prefix until the license goes upstream) + +------------------------------------------------------------------- +Tue Apr 10 10:22:49 UTC 2012 - cfarrell@suse.com + +- license update: MIT and SUSE-Public-Domain + This is _not_ IBM Public License code. + +------------------------------------------------------------------- +Tue Apr 3 12:45:07 UTC 2012 - jengelh@medozas.de + +- Update to new upstream release 49.1: +* Unicode 6.1: New scripts & blocks; changes to grapheme break & + line break property values; some characters change from symbol to + Po or No; etc. +* CLDR 21.0.1: Changes in segmentation data to match Unicode 6.1; + new structures for support of Chinese calendar, for + context-dependent capitalization, for gender of lists of people, + for ordinal categories, and for multiple number systems per + locale; deprecation of "commonlyUsed" element in timezone names; + removal of "whole-locale" aliases; major cleanups of timezone + names, delimiter data, abbreviated number data. +* Support for ISO 4217 numeric currency code +* See http://site.icu-project.org/download/49 for more + +------------------------------------------------------------------- +Sat Feb 25 14:57:50 UTC 2012 - jengelh@medozas.de + +- Use shlib policy for icu package +- Use proper data directory in CXXFLAGS + +------------------------------------------------------------------- +Wed Jan 18 12:14:28 UTC 2012 - vuntz@opensuse.org + +- Update to version 4.8.1.1: + + Time zone database version 2011k + + Several bug fixes. +- Changes from version 4.8.1: + + Common Locale Data Repository (CLDR) 2.0.1 + + Time zone database version 2011h + + Several bug fixes. +- Changes from version 4.8.0: + + Common Changes: + - CLDR 2.0: The CLDR 2.0 release contains numerous improvements + and bug fixes approved by the CLDR committee, including much + additional data for many languages. + - Explicit parent locale support in data imported from CLDR + - MessageFormat and related classes (choice/plural/select) have + been reimplemented, with several improvements and some + incompatible changes. + - Extended PluralFormat pattern syntax supports explicit-value + forms and offsets. + - Utility APIs in PluralRules (get some/all/unique keyword + values) + - Time zone API to return a list of available canonical system + time zone IDs + - Time zone API to return a region + - Collation: Full implementation & public API for script + reordering + - Dictionary-type trie + - GB18030-2005 update + + ICU4C Specific Changes: + - Alphabetic Index support ported from ICU4J + - X11 Compound Text encoding support ported from ICU4J + - Appendable interface +- Add unzip BuildRequires to handle .zip source file. +- Change the way we unpack the docs zip file: we need to create the + html subdirectory first, so we don't unpack via %setup but with + an explicit call to unzip. + +------------------------------------------------------------------- +Sat Dec 24 10:06:07 UTC 2011 - vuntz@opensuse.org + +- Remove call to suse_update_config, and stop removing + config.cache. + +------------------------------------------------------------------- +Thu Dec 22 09:47:32 UTC 2011 - vuntz@opensuse.org + +- Add automake BuildRequires that was implicit before, to fix + build. + +------------------------------------------------------------------- +Wed Oct 12 17:04:29 UTC 2011 - vuntz@opensuse.org + +- Drop pkgdata.diff: everything leads me to think this is not + needed anymore. Debian doesn't ship this patch with its 4.4 + version of ICU. This patch was just a workaround in the first + place anyway. + +------------------------------------------------------------------- +Tue Oct 11 22:26:44 CEST 2011 - dmueller@suse.de + +- Disable "make check" when run under qemu. + +------------------------------------------------------------------- +Tue Aug 2 15:40:36 UTC 2011 - idonmez@novell.com + +- Enable strict-aliasing again since the code seems to be fixed. +- Enable make check inside %check. +- Cleanup the spec file with spec-cleaner. + +------------------------------------------------------------------- +Thu May 5 10:21:40 CEST 2011 - vuntz@opensuse.org + +- Update to version 4.6.1: + + Common Locale Data Repository (CLDR) 1.9.1 + + Update timezone data support to Olson 2011c + + Fix: UCOL_RUNTIME_VERSION should be updated for 4.6 + + Fix: Collation Reordering Use Of USCRIPT_UNKNOWN + + Fix: Can't find Hangul with search coll (usearch doesn't handle + CE iter behavior) + + Fix: ULocale#toLanguageTag() should not supply "und" as + language when the locale has only private use + + Fix: USpoof uses NFKD, should be NFD + + ICU4C-specific bug fixes, including: + - ICU misparses numbers in scientific notation + - detect out of memory issue for Hashtable in low memory + situations +- Changes from version 4.6.0: + + Unicode 6.0: + - Supports final version of Unicode 6.0 + - New UCA data for collation/sorting, with refinements from + CLDR; this data is revamped for more effective use of + collation weights, and noncharacters are now handled + - Support for 2,088 new characters, including the new emoji and + Indian Rupee sign + - Fully updated properties + + CLDR 1.9: + - Supports final version of CLDR 1.9 + - The CLDR release contains numerous improvements and bug fixes + approved by the CLDR committee, mainly in the areas of + collation sequences, transliteration, and available date + formats. + + Support for UTS #46 Unicode IDNA Compatibility Processing. + + Alternate number symbols based on numbering system. + + Compact collation tailoring syntax for reduced memory and disk + footprint. + + New collation [import] rule for reduced footprint and improved + maintenance. + + Fast string BiDi direction detection. + + ICU4C-specific changes: + - ICU 4.6 requires compiler RTTI to be turned on. Please see + the ICU4C readme for more details. + - pkg-config files for a standard way of linking against ICU. + - Promotion to @draft (from @internal) for most regex functions + that provide access via UText. + - Regex support for a "find progress" callback. + - Enhance regex APIs to support full 64-bit offsets and + indices. + - New regex API to set match and start position independently. +- Update icu-remove-datetime.patch to apply without fuzz. +- Rebase icu44-rpmlint.diff. +- Add pkg-config BuildRequires to automatically get + pkgconfig()-style Provides. + +------------------------------------------------------------------- +Fri Jan 14 14:07:54 CET 2011 - vuntz@opensuse.org + +- Update to version 4.4.2: + + Common Changes: + - Update LMBCS mapping table + - Time zone data 2010l + + ICU4C Specific Changes: + - Fix: Difference between Java and C implementation with + exponent characters + - Fix: u_fflush (and thus u_fclose) not flushing stateful + converter + - Fix: unum_parseInt64 is not giving proper error + - Fix: Missing header files in Windows build + +------------------------------------------------------------------- +Thu Jul 8 21:02:02 UTC 2010 - jengelh@medozas.de + +- Update to version 4.4.1 + + Common Changes + - Common Locale Data Repository (CLDR) 1.8.1 + - Enabled non-Gregorian calendars in DateIntervalFormat +- Changes from version 4.4: + + Common Changes + - Unicode 5.2 support. + - CLDR 1.8 data - over 22% more data, with many new locales. + - Normalizer2 - for fast, flexible normalization, paving the + way for UTS #46 support of international domain names. + - Optimized resource bundle format to reduce the ICU resource + bundle installation footprint. + - Hebrew calendar month numbering improvement. + - Finer granular ICU locale resource data packaging. + - SelectFormat - for selecting a translation by a keyword among + multiple alternatives when formatting messages. + - Flexible hour pattern handling in DateFormatPatternGenerator. + - Updated LMBCS converter implementation. + - EBCDIC converter enhancement for supporting various SI/SO + codes used by non-IBM mainframes. + - 64bit time zone transition data support. + + ICU4C Specific Changes + - Regular Expressions support UText - allowing regular + expressions to work on large or discontiguous text + (Technology Preview). + - DecimalFormat support for big decimal numbers. + - ICU Plug-ins - for packaging a specific ICU servce as plug-in + and calling different versions of plug-ins in a same + environment (Technology Preview). + - C++ public smart pointers. + - Java modified UTF-8 support. + - Improved UnicodeString substring operations. + - New usearch options to control matching of collation elements +- Use %_smp_mflags +- Add icu44-rpmlint.diff to fix some build errors. +- Add pkgdata.diff to help build on some architecture, see + http://bugs.icu-project.org/trac/ticket/6969#comment:19. + +------------------------------------------------------------------- +Tue Apr 20 14:32:22 UTC 2010 - crrodriguez@opensuse.org + +- In JeOS, libicu is installed by default but it should + require timezone package to fullfill all dependencies. + +------------------------------------------------------------------- +Tue May 26 15:37:55 CEST 2009 - vuntz@novell.com + +- Drop icu4c-3_6-src-setBreakType-public.diff: it's not needed + anymore for OOo. + +------------------------------------------------------------------- +Sat May 23 14:14:40 CEST 2009 - vuntz@novell.com + +- Update to 4.2: + + Locale Data: ICU uses and supports data from Common Locale Data + Repository (CLDR) 1.7 , which includes data for 146 languages, + 159 territories, 468 locales- 21% more locale data than the + previous release. + + Number system support and the number keyword. + + Number system override in DateFormat. + + Numerics used by Hebrew Calendar date in Hebrew locale. + + BCP47 (language tag) / Locale transformation. + + BCP47 mapping of LDML keywords. + + Encoding selector: Return a list of charsets that can handle + the input text. + + Simple duration: Implementation of CLDR duration format. + + Available/Preferred keywords for a locale (Calendar, Collation, + and Currency). + + StringPrep standard profiles: RFC3491 NAMEPREP, RFC3530 NFS4, + RFC3722 iSCSI, RFC3920 NodePrep/ResourcePrep, RFC4011 MIB, + RFC4013 SASLprep, RFC4505 trace and RFC4518 LDAPprep. + + Miscellaneous Arabic shaping enhancements. + + UTF-8 friendly internal data structure for Unicode data lookup. + + API to get CLDR version used by ICU. + + ISCII charset converter updates (added Gurumukhi, other + updates). + + Performance improvements in Time Zone Name format/parse, and in + DateIntervalFormat construction. +- Remove AutoReqProv: it's default now. +- Drop icu-gcc44.patch: fixed upstream. +- Do not package packaging doc in libicu-doc. + +------------------------------------------------------------------- +Sat Mar 28 00:35:41 CET 2009 - vuntz@novell.com + +- Add icu-remove-datetime.patch to be more build-compare friendly. + +------------------------------------------------------------------- +Mon Mar 2 22:07:18 CET 2009 - crrodriguez@suse.de + +- fix build with GCC 4.4 +- remove static libraries + +------------------------------------------------------------------- +Wed Dec 10 12:34:56 CET 2008 - olh@suse.de + +- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade + (bnc#437293) + +------------------------------------------------------------------- +Thu Oct 30 12:34:56 CET 2008 - olh@suse.de + +- obsolete old -XXbit packages (bnc#437293) + +------------------------------------------------------------------- +Sat Sep 13 14:17:38 CEST 2008 - vuntz@novell.com + +- Merge with openSUSE:Factory. Redo the patch tags that were done + by jpr@novell.com + +------------------------------------------------------------------- +Sat Sep 6 00:54:42 CEST 2008 - maw@suse.de + +- Update to version 4.0: + (All of the bug numbers listed are against + http://bugs.icu-project.org/trac) + + Update to Unicode 5.1 (#5696) + + Locale Data: ICU uses and supports data from Common Locale Data + Repository (CLDR) 1.6, which includes many improvements in + quality and quantity of data + + Add/removeLikelySubtags (#6124) + + Charset converter file size improvement (#5987) + + Date Interval Formatting (#6157) Note: Calendar type supported + by this feature is Gregorian only in this release + + Improved Plural support + + Additional calendars: Chinese (#4081) and Coptic/Ethiopic + (#4571) + + Security fixes for CVE-2007-4770, CVE-2007-4771, and + CVE-2008-1036. +- Drop libicu-regex.patch, which has been upstreamed. + +------------------------------------------------------------------- +Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de + +- added baselibs.conf file to build xxbit packages + for multilib support + +------------------------------------------------------------------- +Wed Feb 13 17:42:00 CET 2008 - maw@suse.de + +- Update to version 3.8: + + Locale Data: ICU uses and supports data from Common Locale Data + Repository (CLDR) 1.5.0.1, which includes many improvements in + quality and quantity of data. + + Rule Based Time Zone: This set of classes provides the ability + to read and write time zone data in RFC2445 VTIMEZONE format. + This also provides access Olson timezone transitions. + + Timezone Formatting: This has changed to give more human + readable results. + + Relative Date/Time Formatting: A draft of the relative date/time + format class has been added. This functionality can be accessed + through the DateFormat::createDateInstance or DateFormat.getInstance + factory method. It provides the ability to format localized dates + in terms of "yesterday", "today" and "tomorrow", instead of a + specific only date or time. + + Demonstrations and Tools + * ICU Data Library Customizer: This new online tool provides an + easier way customize ICU's data. + * ICU4J Demonstrations: These will demonstrate some features of + ICU4J, like calendars, transliteration, and several other + features. + + Flexible Date/Time Formatting: A draft of flexible date/time + format generator has been added. This allows multiple date and + time format patterns to be generated that are valid for specific + locales. This funtionality can be accessed through the + DateTimePatternGenerator API. + + Time Zones: The default time zone is detected more accurately + on Unix machines. + + Additional Calendars + * @calendar=taiwan: This calendar is a variant of the Gregorian + calendar used in Taiwan. + * @calendar=indian: This is the Indian national calendar. + * @calendar=persian: This is the Persian calendar. It is also + known as the Jalāli Calendar. It is used in several Arabic + countries. + + UnicodeSet + * The Freezable design pattern is now supported, which can + improve performance for the contains() and span() methods + on frozen UnicodeSet objects. + * A span function was added for iterating through strings. + * The containsAll(string) and containsNone(string) now support + set strings, instead of only codepoints. + + Performance + * Charset conversion performance has been enhanced. The + amount of improvement varies depending on the converter + being used and platform being used. + * Rule based transliterator construction performance has been + improved. +- s#%run_ldconfig#/sbin/ldconfig# in libicu's %post and %postun +- add libicu-regex.patch (bnc#354372). + +------------------------------------------------------------------- +Thu Feb 7 14:25:21 CET 2008 - pmladek@suse.cz + +- made RuleBasedBreakIterator::setBreakType method pubclic; it was requested by + OpenOffice_org >= 2.3.1, see http://bugs.icu-project.org/trac/ticket/5498 + +------------------------------------------------------------------- +Wed Jul 25 18:02:05 CEST 2007 - pmladek@suse.cz + +- Updated to version 3.6 + * supports Unicode 5.0 + * supports data from Common Locale Data Repository (CLDR) 1.4 + * charset detection framework was added + * font layout engine has support added for Tibetan, Sinhala and Old Hangul + * BiDi algorithm was enhanced to be more flexible and efficient + * new icupkg tool provides an easier way to manage ICU's data library + * time zone data is modularized to allow easier building and updating of + the data + * BreakIterator uses UText for abstract text processing + * 64-bit indexing is now used to allow access to larger chunks of text + * added API for read-only locking for security and robustness + * lots performance improvements + +------------------------------------------------------------------- +Mon Feb 13 19:13:29 CET 2006 - olh@suse.de + +- mark libraries as executable to extract debuginfo + +------------------------------------------------------------------- +Wed Jan 25 21:32:14 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Aug 3 18:16:27 CEST 2005 - sbrabec@suse.cz + +- Updated to version 3.4. + +------------------------------------------------------------------- +Mon Mar 28 22:30:50 CEST 2005 - gekker@suse.de + +- Move icu-config to libicu-devel package (8030). + +------------------------------------------------------------------- +Mon Jan 10 17:40:00 CET 2005 - sbrabec@suse.cz + +- Updated to version 3.2 (#49578). + Updated by Robert Schiele . +- Added -fno-strict-aliasing. + +------------------------------------------------------------------- +Fri Nov 19 16:24:17 CET 2004 - ro@suse.de + +- ignore return-code from strip call + +------------------------------------------------------------------- +Tue May 25 20:51:50 CEST 2004 - clahey@suse.de + +- Removed --with-data-packaging=files. Fixes gtk-sharp compilation. + +------------------------------------------------------------------- +Mon May 24 19:50:19 CEST 2004 - clahey@suse.de + +- Updated to 2.6.2. + +------------------------------------------------------------------- +Wed Mar 31 12:45:14 CEST 2004 - mfabian@suse.de + +- Bugzilla #37029: "strip --strip-debug" static libraries to save + space on the CDs. + +------------------------------------------------------------------- +Fri Jan 23 17:57:03 CET 2004 - uli@suse.de + +- removed --disable-rpath; it is unnecessary and breaks the + icu-config script + +------------------------------------------------------------------- +Sat Jan 10 11:28:36 CET 2004 - adrian@suse.de + +- add %run_ldconfig + +------------------------------------------------------------------- +Tue Sep 23 19:53:27 CEST 2003 - mfabian@suse.de + +- Bugzilla #31665: "SuSEconfig.icu is not lib64 clean" fixed. + +------------------------------------------------------------------- +Mon Aug 18 17:15:52 CEST 2003 - mfabian@suse.de + +- update to 2.6. + +------------------------------------------------------------------- +Mon Jun 16 17:07:45 CEST 2003 - mfabian@suse.de + +- fix "directory not owned by any package". + +------------------------------------------------------------------- +Fri May 16 22:45:48 CEST 2003 - mfabian@suse.de + +- fix file list, remove CVS directories. + +------------------------------------------------------------------- +Wed Sep 11 16:49:01 CEST 2002 - mfabian@suse.de + +- /usr/sbin/gencnval is now in /usr/bin/gencnval. + Fix SuSEconfig.icu accordingly. + +------------------------------------------------------------------- +Sat Aug 17 01:06:28 CEST 2002 - mfabian@suse.de + +- update to 2.2 + +------------------------------------------------------------------- +Sun Aug 11 20:16:14 CEST 2002 - mfabian@suse.de + +- add Provides: libicu17 to libicu21 subpackage + (to trigger the selection of the new package during update.) + +------------------------------------------------------------------- +Fri Aug 9 10:48:57 CEST 2002 - mfabian@suse.de + +- update to 2.1 + +------------------------------------------------------------------- +Tue Mar 12 16:07:49 CET 2002 - mfabian@suse.de + +- use %{_libdir} + +------------------------------------------------------------------- +Tue Mar 12 13:32:41 CET 2002 - kukuk@suse.de + +- Fix most wrong directories in filelist + +------------------------------------------------------------------- +Mon Feb 11 22:59:49 CET 2002 - ro@suse.de + +- tar option for bz2 is "j" + +------------------------------------------------------------------- +Wed Mar 7 22:07:51 CET 2001 - mfabian@suse.de + +- new package: icu 1.7 +- package names as described in PACKAGING diff --git a/icu.spec b/icu.spec new file mode 100644 index 0000000..2dd573c --- /dev/null +++ b/icu.spec @@ -0,0 +1,230 @@ +# +# spec file for package icu +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: icu +%define lname libicu50 +Version: 50.1 +Release: 0 +%define aversion 50_1 +Summary: International Components for Unicode +License: SUSE-XFree86-1.0 +Group: System/Libraries +Url: http://ibm.com/software/globalization/icu +Source0: icu4c-%aversion-src.tar.xz +Source1: icu4c-%aversion-docs.zip +# PATCH-FIX-UPSTREAM icu-rpmlint.diff -- http://bugs.icu-project.org/trac/ticket/7808 +Patch1: icu-rpmlint.diff +# PATCH-FIX-OPENSUSE icu-remove-datetime.patch vuntz@novell.com -- Do not put date/time in icu-config (needed for build-compare) +Patch99: icu-remove-datetime.patch +#BuildRequires: automake +BuildRequires: gcc-c++ +BuildRequires: pkg-config +BuildRequires: unzip +BuildRequires: xz +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +ICU is a set of C and C++ libraries that provides robust and +full-featured Unicode and locale support. The library provides calendar +support, conversions for many character sets, language sensitive +collation, date and time formatting, support for many locales, message +catalogs and resources, message formatting, normalization, number and +currency formatting, time zone support, transliteration, and word, +line, and sentence breaking, etc. + +This package contains the Unicode character database and derived +properties along with converters and time zone data. + +This package contains the runtime libraries for ICU. It does not +contain any of the data files needed at runtime and present in the icu +and icu-locales packages. + +%package -n %lname +# Splitting this package is of no significant benefit: +# icudata (largest part) is always needed. +Summary: International Components for Unicode (development files) +Group: Development/Libraries/C and C++ +# bug437293 +%ifarch ppc64 +Obsoletes: libicu-64bit +%endif +Requires: timezone +Obsoletes: icu-i18ndata +# Following O/P added in timeframe for 12.2 +Provides: libicu = %version-%release +Obsoletes: libicu < %version-%release + +%description -n %lname +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. It does not contain any of the data files needed at +runtime and present in the `icu' and `icu-locales` packages. + +%package -n libicu-devel +Summary: International Components for Unicode (development files) +Group: Development/Libraries/C and C++ +# bug437293 +%ifarch ppc64 +Obsoletes: libicu-devel-64bit +%endif +# +Requires: %lname = %version + +%description -n libicu-devel +ICU is a C++ and C library that provides robust and full-featured +Unicode support. This package contains the development files for ICU. + +%package -n libicu-doc +Summary: International Components for Unicode (html documentation) +Group: Development/Libraries/C and C++ + +%description -n libicu-doc +ICU is a C++ and C library that provides robust and full-featured +Unicode support. This package contains the html documentation. + +%package data +Summary: International Components for Unicode (Sources for the Data in ICU) +Group: System/Libraries +Requires: %lname >= %version + +%description data +ICU is a C++ and C library that provides robust and full-featured +Unicode support. This package contains the source files for the data +found in the "icu" package. + +This data describes the Unicode data (normative and informative) and +also all the table-based converters provided in the ICU distribution. + +This package contains uncompiled source data. Precompiled data is in +the "%lname" package. + +%prep +%setup -q -n icu +mkdir html +pushd html +unzip %{S:1} +popd +%patch1 -p1 +%patch99 -p1 + +%build +cd source +export CXXFLAGS="%optflags -DICU_DATA_DIR=\\\"/usr/share/icu/%version/\\\"" +export CFLAGS="$CXXFLAGS" +%configure --disable-static --with-pic\ + --enable-shared \ + --without-samples +make %{?_smp_mflags} + +%install +find . -name CVS -type d -exec rm -Rf "{}" "+" +cd source + +make install DESTDIR="%buildroot"; + +# to extract debug info +chmod a+rx "%buildroot/%_libdir"/*.so.* + +# install uncompiled source data: +mkdir -p "%buildroot/%_datadir/icu/%version/unidata" +install -m 644 data/unidata/*.txt "%buildroot/%_datadir/icu/%version/unidata" +ln -s unidata/UnicodeData.txt "%buildroot/%_datadir/icu/%version/" + +rm "%buildroot/%_datadir/icu/%version/license.html" +rm "%buildroot/%_datadir/icu/%version/install-sh" + +%check +cd source +%if !0%{?qemu_user_space_build:1} +# Checks disabled in qemu because of races happening when we emulate +# multi-threaded programs, and some check tests atomic instructions in +# multi-threaded icu invocations +make check +%endif + +# This should be run by whatever owns /usr/lib64/icu - +# the (main) package in this case +%post +if test -d "%_libdir/icu"; then + current=$(cd "%_libdir/icu"; find [0-9]* -maxdepth 1 -type d -printf '%f\n' | + sort -V | tail -n1); + if test -n "$current"; then + rm -f "%_libdir/icu/current"; + ln -sv "$current" "%_libdir/icu/current"; + fi; +fi; + +%postun +if test -d "%_libdir/icu"; then + current=$(cd "%_libdir/icu"; find [0-9]* -maxdepth 1 -type d -printf '%f\n' | + sort -V | tail -n1); + if test -n "$current"; then + rm -f "%_libdir/icu/current"; + ln -sv "$current" "%_libdir/icu/current"; + fi; +fi; + +%post -n %lname -p /sbin/ldconfig + +%postun -n %lname -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%doc license.html readme.html +%dir %_libdir/icu +%dir %_libdir/icu/%version +%_libdir/icu/current +%_bindir/derb +%_bindir/gen* +%_bindir/icuinfo +%_bindir/makeconv +%_bindir/pkgdata +%_bindir/uconv +%_sbindir/* +%_mandir/*/* + +%files -n %lname +%defattr(-, root, root) +%_libdir/libicu*.so.* + +%files -n libicu-devel +%defattr(-, root, root) +%_libdir/libicu*.so +%_includedir/unicode/ +%_includedir/layout/ +%_libdir/icu/%version/Makefile.inc +%_libdir/icu/%version/pkgdata.inc +%_libdir/icu/Makefile.inc +%_libdir/icu/pkgdata.inc +%_libdir/pkgconfig/*.pc +%_bindir/icu-config +%dir %_datadir/icu +%dir %_datadir/icu/%version +%_datadir/icu/%version/mkinstalldirs +%_datadir/icu/%version/config/ + +%files -n libicu-doc +%defattr(-,root,root) +%doc html/ + +%files data +%defattr(-, root, root) +%_datadir/icu/%version/unidata/ +%_datadir/icu/%version/UnicodeData.txt + +%changelog