diff --git a/baselibs.conf b/baselibs.conf index 5e6ebc4..d3a6b5e 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,4 +1,4 @@ -libicu52_1 +libicu53_1 libicu-devel requires -libicu- - requires "libicu52_1- = " + requires "libicu53_1- = " diff --git a/icu-fix-tests-depending-on-date.patch b/icu-fix-tests-depending-on-date.patch new file mode 100644 index 0000000..9c1528e --- /dev/null +++ b/icu-fix-tests-depending-on-date.patch @@ -0,0 +1,15 @@ +See icu-fix-tests-depending-on-date.patch + +Index: icu/source/test/intltest/dtfmttst.cpp +=================================================================== +--- icu.orig/source/test/intltest/dtfmttst.cpp ++++ icu/source/test/intltest/dtfmttst.cpp +@@ -1132,7 +1132,7 @@ DateFormatTest::TestTwoDigitYear() + return; + } + parse2DigitYear(fmt, "5/6/17", date(117, UCAL_JUNE, 5)); +- parse2DigitYear(fmt, "4/6/34", date(34, UCAL_JUNE, 4)); ++ parse2DigitYear(fmt, "4/6/34", date(134, UCAL_JUNE, 4)); + } + + // ------------------------------------- diff --git a/icu-rpmlint.diff b/icu-rpmlint.diff index 38bf5d5..6ccfa60 100644 --- a/icu-rpmlint.diff +++ b/icu-rpmlint.diff @@ -14,9 +14,9 @@ E: icu bufferoverflowstrncat pkgdata.cpp:299:87 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 +--- icu.orig/source/tools/pkgdata/pkgdata.cpp 2014-06-03 13:07:41.342876943 +0200 ++++ icu/source/tools/pkgdata/pkgdata.cpp 2014-06-03 13:08:45.537882879 +0200 +@@ -2069,12 +2069,12 @@ const char cmd[] = "icu-config --incpkgdatafile"; /* #1 try the same path where pkgdata was called from. */ @@ -27,7 +27,7 @@ Index: icu/source/tools/pkgdata/pkgdata.cpp - 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, 1023); + uprv_strncat(cmdBuf, cmd, sizeof(cmdBuf)-1-strlen(cmdBuf)); if(verbose) { diff --git a/icu-versioning.diff b/icu-versioning.diff index 65e691d..b10ee93 100644 --- a/icu-versioning.diff +++ b/icu-versioning.diff @@ -104,8 +104,8 @@ Index: icu/source/common/unicode/uvernum.h @@ -58,6 +58,7 @@ * @stable ICU 2.4 */ - #define U_ICU_VERSION_MAJOR_NUM 52 -+#define U_ICU_VERSION_MAJOR_STR "52" + #define U_ICU_VERSION_MAJOR_NUM 53 ++#define U_ICU_VERSION_MAJOR_STR "53" /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU @@ -113,7 +113,7 @@ Index: icu/source/common/unicode/uvernum.h * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ --#define U_ICU_VERSION_SUFFIX _52 +-#define U_ICU_VERSION_SUFFIX _53 +#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) @@ -124,8 +124,8 @@ Index: icu/source/common/unicode/uvernum.h * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ --#define U_ICU_VERSION_SHORT "52" -+#define U_ICU_VERSION_SHORT "52_1" +-#define U_ICU_VERSION_SHORT "53" ++#define U_ICU_VERSION_SHORT "53_1" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. diff --git a/icu.changes b/icu.changes index 1b657d2..b1426e0 100644 --- a/icu.changes +++ b/icu.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Tue Jul 29 19:44:47 UTC 2014 - coolo@suse.com + +- add baselibs.conf as source + +------------------------------------------------------------------- +Mon Jun 16 08:31:20 UTC 2014 - coolo@suse.com + +- add icu-fix-tests-depending-on-date.patch to fix build + see http://sourceforge.net/p/icu/mailman/message/32443311/ + +------------------------------------------------------------------- +Tue Jun 3 13:23:12 UTC 2014 - tchvatal@suse.com + +- Ensure we escape the find %f properly. + +------------------------------------------------------------------- +Tue Jun 3 11:35:25 UTC 2014 - tchvatal@suse.com + +- Version bump to 53.1: + * Data from the CLDR 25 release: Many bug fixes + * Time zone data: 2014b, including post CLDR 25 time zone data + update to CLDR. + * U+20BD Ruble Sign added (from Unicode 7.0, otherwise ICU 53 + still uses Unicode 6.3) + * Collation code re-implemented + * ICU4C now requires compilers with C99 support + * Updated Spoof Checker for Unicode Security Standard version + 6.3. (#10706) + * many more see http://site.icu-project.org/download/53 + +------------------------------------------------------------------- +Tue Jun 3 11:00:20 UTC 2014 - tchvatal@suse.com + +- Clean up with spec-cleaner and remove some obsolete provide/obsolete +- Use official download tarballs instead of repacks + ------------------------------------------------------------------- Mon Apr 7 12:04:42 UTC 2014 - schwab@suse.de diff --git a/icu.spec b/icu.spec index 4d598a7..f8f209a 100644 --- a/icu.spec +++ b/icu.spec @@ -16,28 +16,29 @@ # +%define lname libicu53_1 +%define aversion 53_1 Name: icu -%define lname libicu52_1 -Version: 52.1 +Version: 53.1 Release: 0 -%define aversion 52_1 Summary: International Components for Unicode License: MIT Group: Development/Libraries/C and C++ Url: http://icu-project.org/ -#DL-URL: http://download.icu-project.org/files/icu4c/%version/icu4c-%aversion-src.tgz -Source: icu4c-%aversion-src.tar.xz -Source2: icu4c-%aversion-docs.tar.xz +Source: http://download.icu-project.org/files/icu4c/%version/icu4c-%aversion-src.tgz +Source2: http://download.icu-project.org/files/icu4c/%version/icu4c-%aversion-docs.zip Source3: sanitize_docs.sh +Source100: baselibs.conf Patch1: icu-rpmlint.diff Patch2: icu-remove-datetime.patch Patch3: icu-versioning.diff Patch4: icu-fix-install-mode-files.diff +Patch5: icu-fix-tests-depending-on-date.patch BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: pkg-config -BuildRequires: xz +BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -54,16 +55,11 @@ This subpackage contains the runtime programs for interacting with ICU. %package -n %lname Summary: International Components for Unicode Group: System/Libraries -%ifarch ppc64 -# bug437293 -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 Requires: libicu%aversion-data +Requires: timezone +# Following O/P added in timeframe for 12.2 +Provides: libicu = %version +Obsoletes: libicu < %version %description -n %lname ICU is a set of C and C++ libraries that provides robust and @@ -88,10 +84,6 @@ most of the locale-specific information. %package -n libicu-devel Summary: International Components for Unicode (development files) Group: Development/Libraries/C and C++ -%ifarch ppc64 -# bug437293 -Obsoletes: libicu-devel-64bit -%endif Requires: %lname = %version %description -n libicu-devel @@ -122,34 +114,42 @@ also all the table-based converters provided in the ICU distribution. This package contains uncompiled source data. %prep -%setup -qn icu -a2 -%patch -P 1 -P 2 -P 3 -P 4 -p1 +%setup -q -n icu +# docs are special +mkdir html +cd html +unzip %SOURCE2 +cd .. + +%patch -P 1 -P 2 -P 3 -P 4 -p1 -P 5 -p1 %build cd source -export CXXFLAGS="%optflags -DICU_DATA_DIR=\\\"/usr/share/icu/%version/\\\"" +export CXXFLAGS="%optflags -DICU_DATA_DIR=\\\"%_datadir/icu/%version/\\\"" export CFLAGS="$CXXFLAGS" -%configure --disable-static --enable-shared --disable-samples \ +%configure \ + --disable-static \ + --enable-shared \ + --disable-samples \ --with-data-packaging=archive -make %{?_smp_mflags} +make %{?_smp_mflags} VERBOSE=1 %install -b="%buildroot" -mkdir -p "$b/%_docdir/%name" -cp -a html "$b/%_docdir/%name/" -cp -a license.html readme.html "$b/%_docdir/%name/" +mkdir -p "%buildroot/%_docdir/%name" +cp -a html "%buildroot/%_docdir/%name/" +cp -a license.html readme.html "%buildroot/%_docdir/%name/" find . -name CVS -type d -exec rm -Rf "{}" "+" cd source -make install DESTDIR="$b"; +make install DESTDIR="%buildroot" # # ICU's "pkgdata" utility is really fragile, so icu-versioning.diff # does as few as possible, but that means we need some additional # cleanup in the spec file now. # -pushd "$b/%_libdir/" +pushd "%buildroot/%_libdir/" for i in *.so.[0-9]*; do echo "Looking at $i" if [ "${i##*.so.}" != "%version" ]; then @@ -163,33 +163,32 @@ done popd # /usr/lib/rpm/elfdeps requires +x bit and not all had it at one point -chmod a+rx "$b/%_libdir"/lib*.so.* +chmod a+rx "%buildroot/%_libdir"/lib*.so.* # install uncompiled source data: -mkdir -p "$b/%_datadir/icu/%version/unidata" -install -m 644 data/unidata/*.txt "$b/%_datadir/icu/%version/unidata" -ln -s unidata/UnicodeData.txt "$b/%_datadir/icu/%version/" +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 "$b/%_datadir/icu/%version/license.html" -rm "$b/%_datadir/icu/%version/install-sh" +rm "%buildroot/%_datadir/icu/%version/license.html" +rm "%buildroot/%_datadir/icu/%version/install-sh" %fdupes %buildroot/%_prefix %check -#ln source/data/in/icudt51l.dat source/data/in/icudt%{version}l.dat 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 -ICU_DATA="%buildroot/%_datadir/icu/%version" make check VERBOSE=1 +ICU_DATA="%buildroot/%_datadir/icu/%version" make check %{?_smp_mflags} VERBOSE=1 %endif +%post # 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' | + 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"; @@ -199,7 +198,7 @@ fi; %postun if test -d "%_libdir/icu"; then - current=$(cd "%_libdir/icu/"; find [0-9]* -maxdepth 1 -type d -printf '%f\n' | + 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"; @@ -208,6 +207,7 @@ if test -d "%_libdir/icu"; then fi; %post -n %lname -p /sbin/ldconfig + %postun -n %lname -p /sbin/ldconfig %files @@ -235,7 +235,7 @@ fi; %defattr(-,root,root) %dir %_datadir/icu %dir %_datadir/icu/%version -%_datadir/icu/%version/icudt52[bl].dat +%_datadir/icu/%version/icudt5*[bl].dat %files -n libicu-devel %defattr(-, root, root) diff --git a/icu4c-52_1-docs.tar.xz b/icu4c-52_1-docs.tar.xz deleted file mode 100644 index 707317c..0000000 --- a/icu4c-52_1-docs.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f59c531ebd294c0c86a48ff4f4e92fa9b0b68697211816eda3ac65fb943ae73 -size 1880120 diff --git a/icu4c-52_1-src.tar.xz b/icu4c-52_1-src.tar.xz deleted file mode 100644 index c2e2592..0000000 --- a/icu4c-52_1-src.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0aeb9126a08f3bfa2134927aa4e29e77a4151c66e36fa6e14ed979d6cd0d8da2 -size 12895432 diff --git a/icu4c-53_1-docs.zip b/icu4c-53_1-docs.zip new file mode 100644 index 0000000..890127b --- /dev/null +++ b/icu4c-53_1-docs.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c700534d52b98615b4baffcf0502f37540604e67817625f05d6e2fbf98d0c0b +size 7943243 diff --git a/icu4c-53_1-src.tgz b/icu4c-53_1-src.tgz new file mode 100644 index 0000000..ea7eda1 --- /dev/null +++ b/icu4c-53_1-src.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28 +size 23218952