diff --git a/mingw-icu.spec b/mingw-icu.spec index 5dd6a95..c40b47c 100644 --- a/mingw-icu.spec +++ b/mingw-icu.spec @@ -1,11 +1,10 @@ -%global __strip %{_mingw32_strip} -%global __objdump %{_mingw32_objdump} -%define __debug_install_post %{_mingw32_debug_install_post} -%define underscore_version %(echo %{version} | sed 's/\\./_/g') +%?mingw_package_header + +%global underscore_version %(echo %{version} | sed 's/\\./_/g') Name: mingw-icu Version: 4.8.1.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: MinGW compilation of International Components for Unicode Tools License: MIT and UCD and Public Domain @@ -19,14 +18,19 @@ Patch0: icu4c-4_6_1-crossbuild.patch Patch1: icu4c-4_6_1-use-correct-genccode-assembly-on-win32-and-win64.patch Patch2: icu4c-4_6_1-mingw-w64-mkdir-compatibility.patch -BuildRequires: mingw32-filesystem >= 68 +BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc-c++ BuildRequires: mingw32-binutils -#BuildRequires: mingw32-pkg-config + +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-gcc +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw64-binutils BuildRequires: autoconf + %description ICU is a set of C and C++ libraries that provides robust and full-featured Unicode and locale support. The library provides calendar @@ -37,11 +41,9 @@ currency formatting, time zone support, transliteration, and word, line, and sentence breaking, etc. - +# Win32 %package -n mingw32-icu Summary: MinGW compilation of International Components for Unicode Tools -Group: Development/Libraries - %description -n mingw32-icu ICU is a set of C and C++ libraries that provides robust and @@ -52,9 +54,22 @@ catalogs and resources, message formatting, normalization, number and currency formatting, time zone support, transliteration, and word, line, and sentence breaking, etc. +# Win64 +%package -n mingw64-icu +Summary: MinGW compilation of International Components for Unicode Tools + +%description -n mingw64-icu +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. -%{_mingw32_debug_package} +%?mingw_debug_package + %prep %setup -q -n icu @@ -73,101 +88,160 @@ popd pushd source mkdir -p nativebuild - pushd nativebuild - ../configure --enable-static --disable-shared - make %{?_smp_mflags} || make - popd -%{_mingw32_configure} \ +%mingw_configure \ --enable-shared --disable-static \ --with-cross-build=$(pwd)/nativebuild \ --with-data-packaging=library -make %{?_smp_mflags} +%mingw_make %{?_smp_mflags} popd %install pushd source - -make DESTDIR=$RPM_BUILD_ROOT install - +%mingw_make DESTDIR=$RPM_BUILD_ROOT install popd # UGLY HACKS RESTARTING -find $RPM_BUILD_ROOT%{_mingw32_libdir} -name "*.dll" -type l -delete +find $RPM_BUILD_ROOT -name "*.dll" -type l -delete -rm -f $RPM_BUILD_ROOT%{_mingw32_libdir}/icudata48.dll +rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/icudata48.dll +rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/icudata48.dll -mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libicudata48.1.1.dll \ - $RPM_BUILD_ROOT%{_mingw32_libdir}/icudata48.dll +mv $RPM_BUILD_ROOT%{mingw32_libdir}/libicudata48.1.1.dll \ + $RPM_BUILD_ROOT%{mingw32_libdir}/icudata48.dll +mv $RPM_BUILD_ROOT%{mingw64_libdir}/libicudata48.1.1.dll \ + $RPM_BUILD_ROOT%{mingw64_libdir}/icudata48.dll -for i in $RPM_BUILD_ROOT%{_mingw32_libdir}/*.dll; \ - do mv $i $RPM_BUILD_ROOT%{_mingw32_bindir}/; done +for i in $RPM_BUILD_ROOT%{mingw32_libdir}/*.dll ; \ + do mv $i $RPM_BUILD_ROOT%{mingw32_bindir}/; done +for i in $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll ; \ + do mv $i $RPM_BUILD_ROOT%{mingw64_bindir}/; done -sed -i -e 's,default_ENABLE_RPATH=.*,default_ENABLE_RPATH="N",' -e 's,^SO=.*$,SO="dll",' $RPM_BUILD_ROOT%{_mingw32_bindir}/icu-config +sed -i -e 's,default_ENABLE_RPATH=.*,default_ENABLE_RPATH="N",' -e 's,^SO=.*$,SO="dll",' $RPM_BUILD_ROOT%{mingw32_bindir}/icu-config +sed -i -e 's,default_ENABLE_RPATH=.*,default_ENABLE_RPATH="N",' -e 's,^SO=.*$,SO="dll",' $RPM_BUILD_ROOT%{mingw64_bindir}/icu-config # UGLY HACKS ENDING AGAIN -rm -fr $RPM_BUILD_ROOT%{_mingw32_mandir} -# remove dangling pointers -rm -fr $RPM_BUILD_ROOT%{_mingw32_libdir}/icu/Makefile.inc -rm -fr $RPM_BUILD_ROOT%{_mingw32_libdir}/icu/pkgdata.inc +rm -fr $RPM_BUILD_ROOT%{mingw32_mandir} +rm -fr $RPM_BUILD_ROOT%{mingw64_mandir} +# remove dangling pointers +rm -fr $RPM_BUILD_ROOT%{mingw32_libdir}/icu/Makefile.inc +rm -fr $RPM_BUILD_ROOT%{mingw64_libdir}/icu/Makefile.inc +rm -fr $RPM_BUILD_ROOT%{mingw32_libdir}/icu/pkgdata.inc +rm -fr $RPM_BUILD_ROOT%{mingw64_libdir}/icu/pkgdata.inc + + +# Win32 %files -n mingw32-icu %doc license.html unicode-license.txt -%{_mingw32_bindir}/genrb.exe -%{_mingw32_bindir}/gencnval.exe -%{_mingw32_bindir}/uconv.exe -%{_mingw32_bindir}/gencmn.exe -%{_mingw32_bindir}/makeconv.exe -%{_mingw32_bindir}/genbrk.exe -%{_mingw32_bindir}/gensprep.exe -%{_mingw32_bindir}/pkgdata.exe -%{_mingw32_bindir}/icupkg.exe -%{_mingw32_bindir}/derb.exe -%{_mingw32_bindir}/genccode.exe -%{_mingw32_bindir}/genctd.exe -%{_mingw32_bindir}/gencfu.exe -%{_mingw32_bindir}/gennorm2.exe -%{_mingw32_bindir}/icuinfo.exe +%{mingw32_bindir}/genrb.exe +%{mingw32_bindir}/gencnval.exe +%{mingw32_bindir}/uconv.exe +%{mingw32_bindir}/gencmn.exe +%{mingw32_bindir}/makeconv.exe +%{mingw32_bindir}/genbrk.exe +%{mingw32_bindir}/gensprep.exe +%{mingw32_bindir}/pkgdata.exe +%{mingw32_bindir}/icupkg.exe +%{mingw32_bindir}/derb.exe +%{mingw32_bindir}/genccode.exe +%{mingw32_bindir}/genctd.exe +%{mingw32_bindir}/gencfu.exe +%{mingw32_bindir}/gennorm2.exe +%{mingw32_bindir}/icuinfo.exe -%{_mingw32_bindir}/icuio48.dll -%{_mingw32_bindir}/icuuc48.dll -%{_mingw32_bindir}/icule48.dll -%{_mingw32_bindir}/icui18n48.dll -%{_mingw32_bindir}/icutu48.dll -%{_mingw32_bindir}/icudata48.dll -%{_mingw32_bindir}/iculx48.dll -%{_mingw32_bindir}/icutest48.dll +%{mingw32_bindir}/icuio48.dll +%{mingw32_bindir}/icuuc48.dll +%{mingw32_bindir}/icule48.dll +%{mingw32_bindir}/icui18n48.dll +%{mingw32_bindir}/icutu48.dll +%{mingw32_bindir}/icudata48.dll +%{mingw32_bindir}/iculx48.dll +%{mingw32_bindir}/icutest48.dll -%{_mingw32_bindir}/icu-config -%{_mingw32_libdir}/libicule.dll.a -%{_mingw32_libdir}/libicudata.dll.a -%{_mingw32_libdir}/libicui18n.dll.a -%{_mingw32_libdir}/libicuuc.dll.a -%{_mingw32_libdir}/libiculx.dll.a -%{_mingw32_libdir}/libicuio.dll.a -%{_mingw32_libdir}/libicutest.dll.a -%{_mingw32_libdir}/libicutu.dll.a -%{_mingw32_libdir}/pkgconfig/icu-i18n.pc -%{_mingw32_libdir}/pkgconfig/icu-io.pc -%{_mingw32_libdir}/pkgconfig/icu-le.pc -%{_mingw32_libdir}/pkgconfig/icu-lx.pc -%{_mingw32_libdir}/pkgconfig/icu-uc.pc -%{_mingw32_includedir}/layout -%{_mingw32_includedir}/unicode -%{_mingw32_libdir}/icu -%{_mingw32_datadir}/icu +%{mingw32_bindir}/icu-config +%{mingw32_libdir}/libicule.dll.a +%{mingw32_libdir}/libicudata.dll.a +%{mingw32_libdir}/libicui18n.dll.a +%{mingw32_libdir}/libicuuc.dll.a +%{mingw32_libdir}/libiculx.dll.a +%{mingw32_libdir}/libicuio.dll.a +%{mingw32_libdir}/libicutest.dll.a +%{mingw32_libdir}/libicutu.dll.a +%{mingw32_libdir}/pkgconfig/icu-i18n.pc +%{mingw32_libdir}/pkgconfig/icu-io.pc +%{mingw32_libdir}/pkgconfig/icu-le.pc +%{mingw32_libdir}/pkgconfig/icu-lx.pc +%{mingw32_libdir}/pkgconfig/icu-uc.pc +%{mingw32_includedir}/layout +%{mingw32_includedir}/unicode +%{mingw32_libdir}/icu +%{mingw32_datadir}/icu + +# Win64 +%files -n mingw64-icu +%doc license.html unicode-license.txt + +%{mingw64_bindir}/genrb.exe +%{mingw64_bindir}/gencnval.exe +%{mingw64_bindir}/uconv.exe +%{mingw64_bindir}/gencmn.exe +%{mingw64_bindir}/makeconv.exe +%{mingw64_bindir}/genbrk.exe +%{mingw64_bindir}/gensprep.exe +%{mingw64_bindir}/pkgdata.exe +%{mingw64_bindir}/icupkg.exe +%{mingw64_bindir}/derb.exe +%{mingw64_bindir}/genccode.exe +%{mingw64_bindir}/genctd.exe +%{mingw64_bindir}/gencfu.exe +%{mingw64_bindir}/gennorm2.exe +%{mingw64_bindir}/icuinfo.exe + +%{mingw64_bindir}/icuio48.dll +%{mingw64_bindir}/icuuc48.dll +%{mingw64_bindir}/icule48.dll +%{mingw64_bindir}/icui18n48.dll +%{mingw64_bindir}/icutu48.dll +%{mingw64_bindir}/icudata48.dll +%{mingw64_bindir}/iculx48.dll +%{mingw64_bindir}/icutest48.dll + +%{mingw64_bindir}/icu-config +%{mingw64_libdir}/libicule.dll.a +%{mingw64_libdir}/libicudata.dll.a +%{mingw64_libdir}/libicui18n.dll.a +%{mingw64_libdir}/libicuuc.dll.a +%{mingw64_libdir}/libiculx.dll.a +%{mingw64_libdir}/libicuio.dll.a +%{mingw64_libdir}/libicutest.dll.a +%{mingw64_libdir}/libicutu.dll.a +%{mingw64_libdir}/pkgconfig/icu-i18n.pc +%{mingw64_libdir}/pkgconfig/icu-io.pc +%{mingw64_libdir}/pkgconfig/icu-le.pc +%{mingw64_libdir}/pkgconfig/icu-lx.pc +%{mingw64_libdir}/pkgconfig/icu-uc.pc +%{mingw64_includedir}/layout +%{mingw64_includedir}/unicode +%{mingw64_libdir}/icu +%{mingw64_datadir}/icu %changelog +* Sun Mar 18 2012 Erik van Pienbroek - 4.8.1.1-5 +- Added win64 support +- Use mingw macros without leading underscore +- Use %%global instead of %%define + * Mon Feb 27 2012 Kalev Lember - 4.8.1.1-4 - Added Erik van Pienbroek's patches to fix build with the mingw-w64 toolchain