1 %define realname fontconfig
2 Summary: Font configuration and customization tools - cross MinGW32 version
3 Summary(pl.UTF-8): Narzędzia do konfigurowania fontów - wersja skrośna dla MinGW32
4 Name: crossmingw32-%{realname}
8 Group: Development/Libraries
9 Source0: https://www.freedesktop.org/software/fontconfig/release/%{realname}-%{version}.tar.xz
10 # Source0-md5: d110d7a2636d420ae6ed9d2cf92002a4
11 Patch0: %{realname}-bitstream-cyberbit.patch
12 URL: http://fontconfig.org/
13 BuildRequires: autoconf >= 2.61
14 BuildRequires: automake >= 1:1.11
15 BuildRequires: crossmingw32-expat
16 BuildRequires: crossmingw32-freetype >= 2.8.1
17 BuildRequires: crossmingw32-gcc
18 BuildRequires: gettext-tools >= 0.19.8
19 BuildRequires: libtool >= 2:2.2
20 BuildRequires: pkgconfig >= 1:0.15
21 BuildRequires: sed >= 4.0
22 Requires: crossmingw32-expat
23 Requires: crossmingw32-freetype >= 2.8.1
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define no_install_post_strip 1
27 %define _enable_debug_packages 0
29 %define target i386-mingw32
30 %define target_platform i386-pc-mingw32
32 %define _sysprefix /usr
33 %define _prefix %{_sysprefix}/%{target}
34 %define _libdir %{_prefix}/lib
35 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
36 %define _dlldir /usr/share/wine/windows/system
37 %define __cc %{target}-gcc
38 %define __cxx %{target}-g++
39 %define __pkgconfig_provides %{nil}
40 %define __pkgconfig_requires %{nil}
43 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
44 # i486 instructions required for atomic operations
45 %define optflags -O2 -march=i486
47 # -z options are invalid for mingw linker, most of -f options are Linux-specific
48 %define filterout_ld -Wl,-z,.*
49 %define filterout_c -f[-a-z0-9=]*
52 Fontconfig is designed to locate fonts within the system and select
53 them according to requirements specified by applications.
55 This package contains the cross version for Win32.
57 %description -l pl.UTF-8
58 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
59 systemie i wybierania ich w zależności od potrzeb aplikacji.
61 Paket ten zawiera wersję skrośną dla Win32.
64 Summary: Static freetype library (cross MinGW32 version)
65 Summary(pl.UTF-8): Statyczna biblioteka freetype (wersja skrośna MinGW32)
66 Group: Development/Libraries
67 Requires: %{name} = %{version}-%{release}
70 Static freetype library (cross MinGW32 version).
72 %description static -l pl.UTF-8
73 Statyczna biblioteka freetype (wersja skrośna MinGW32).
76 Summary: DLL freetype library for Windows
77 Summary(pl.UTF-8): Biblioteka DLL freetype dla Windows
78 Group: Applications/Emulators
79 Requires: crossmingw32-expat-dll
80 Requires: crossmingw32-freetype-dll >= 2.8.1
84 DLL freetype library for Windows.
86 %description dll -l pl.UTF-8
87 Biblioteka DLL freetype dla Windows.
90 %setup -q -n %{realname}-%{version}
94 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
104 --with-arch=%{target} \
105 --with-freetype-config="pkg-config freetype2" \
107 --disable-silent-rules \
113 rm -rf $RPM_BUILD_ROOT
115 # fc_cachedir=/dummy is to avoid creating ${DESTDIR}LOCAL_APPDATA_FONTCONFIG_CACHE dir
116 %{__make} -j1 install \
117 DESTDIR=$RPM_BUILD_ROOT \
120 install -d $RPM_BUILD_ROOT%{_dlldir}
121 %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
124 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
125 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
129 %{__rm} -r $RPM_BUILD_ROOT/etc/fonts \
130 $RPM_BUILD_ROOT%{_datadir}/{fontconfig,locale,xml/fontconfig}
131 %{__rm} $RPM_BUILD_ROOT%{_bindir}/fc-*.exe
132 # if needed, use ITS data from native package
133 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gettext/its
136 rm -rf $RPM_BUILD_ROOT
139 %defattr(644,root,root,755)
140 %doc AUTHORS COPYING ChangeLog README
141 %{_libdir}/libfontconfig.dll.a
142 %{_libdir}/libfontconfig.la
143 %{_libdir}/fontconfig.def
144 %dir %{_includedir}/fontconfig
145 %{_includedir}/fontconfig/*.h
146 %{_pkgconfigdir}/fontconfig.pc
149 %defattr(644,root,root,755)
150 %{_libdir}/libfontconfig.a
153 %defattr(644,root,root,755)
154 %{_dlldir}/libfontconfig-*.dll