]> git.pld-linux.org Git - packages/crossmingw32-fontconfig.git/blob - crossmingw32-fontconfig.spec
- updated to 2.15.0
[packages/crossmingw32-fontconfig.git] / crossmingw32-fontconfig.spec
1 %define         realname   fontconfig
2 Summary:        Font configuration and customization tools - cross MinGW32 versoin
3 Summary(pl.UTF-8):      Narzędzia do konfigurowania fontów - wersja skrośna dla MinGW32
4 Name:           crossmingw32-%{realname}
5 Version:        2.13.1
6 Release:        1
7 License:        MIT
8 Group:          Development/Libraries
9 Source0:        https://www.freedesktop.org/software/fontconfig/release/%{realname}-%{version}.tar.bz2
10 # Source0-md5:  36cdea1058ef13cbbfdabe6cb019dc1c
11 Patch0:         %{realname}-bitstream-cyberbit.patch
12 Patch1:         %{realname}-win32.patch
13 URL:            http://fontconfig.org/
14 BuildRequires:  autoconf >= 2.61
15 BuildRequires:  automake >= 1:1.11
16 BuildRequires:  crossmingw32-expat
17 BuildRequires:  crossmingw32-freetype >= 2.8.1
18 BuildRequires:  crossmingw32-gcc
19 BuildRequires:  gettext-tools >= 0.19.8
20 BuildRequires:  libtool >= 2:2.2
21 BuildRequires:  pkgconfig >= 1:0.15
22 BuildRequires:  sed >= 4.0
23 Requires:       crossmingw32-expat
24 Requires:       crossmingw32-freetype >= 2.8.1
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %define         no_install_post_strip   1
28
29 %define         target                  i386-mingw32
30 %define         target_platform         i386-pc-mingw32
31
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}
41
42 %ifnarch %{ix86}
43 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
44 %define         optflags        -O2
45 %endif
46 # -z options are invalid for mingw linker, most of -f options are Linux-specific
47 %define         filterout_ld    -Wl,-z,.*
48 %define         filterout_c     -f[-a-z0-9=]*
49
50 %description
51 Fontconfig is designed to locate fonts within the system and select
52 them according to requirements specified by applications.
53
54 This package contains the cross version for Win32.
55
56 %description -l pl.UTF-8
57 Fontconfig jest biblioteką przeznaczoną do lokalizowania fontów w
58 systemie i wybierania ich w zależności od potrzeb aplikacji.
59
60 Paket ten zawiera wersję skrośną dla Win32.
61
62 %package static
63 Summary:        Static freetype library (cross MinGW32 version)
64 Summary(pl.UTF-8):      Statyczna biblioteka freetype (wersja skrośna MinGW32)
65 Group:          Development/Libraries
66 Requires:       %{name} = %{version}-%{release}
67
68 %description static
69 Static freetype library (cross MinGW32 version).
70
71 %description static -l pl.UTF-8
72 Statyczna biblioteka freetype (wersja skrośna MinGW32).
73
74 %package dll
75 Summary:        DLL freetype library for Windows
76 Summary(pl.UTF-8):      Biblioteka DLL freetype dla Windows
77 Group:          Applications/Emulators
78 Requires:       crossmingw32-expat-dll
79 Requires:       crossmingw32-freetype-dll >= 2.8.1
80 Requires:       wine
81
82 %description dll
83 DLL freetype library for Windows.
84
85 %description dll -l pl.UTF-8
86 Biblioteka DLL freetype dla Windows.
87
88 %prep
89 %setup -q -n %{realname}-%{version}
90 %patch0 -p1
91 %patch1 -p1
92
93 # uses POSIX-specific dirent interfaces
94 %{__sed} -i -e 's/test-migration//' test/Makefile.am
95
96 %build
97 export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig
98 %{__gettextize}
99 %{__libtoolize}
100 %{__aclocal} -I m4
101 %{__autoconf}
102 %{__autoheader}
103 %{__automake}
104 %configure \
105         --target=%{target} \
106         --host=%{target} \
107         --with-arch=%{target} \
108         --with-freetype-config="pkg-config freetype2" \
109         --disable-docs \
110         --disable-silent-rules \
111         --enable-static
112
113 %{__make}
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117
118 # fc_cachedir=/dummy is to avoid creating ${DESTDIR}LOCAL_APPDATA_FONTCONFIG_CACHE dir
119 %{__make} -j1 install \
120         DESTDIR=$RPM_BUILD_ROOT \
121         fc_cachedir=/dummy
122
123 install -d $RPM_BUILD_ROOT%{_dlldir}
124 %{__mv} $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
125
126 %if 0%{!?debug:1}
127 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
128 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
129 %endif
130
131 # runtime
132 %{__rm} -r $RPM_BUILD_ROOT/etc/fonts \
133         $RPM_BUILD_ROOT%{_datadir}/{fontconfig,locale,xml/fontconfig}
134 %{__rm} $RPM_BUILD_ROOT%{_bindir}/fc-*.exe
135 # if needed, use ITS data from native package
136 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gettext/its
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %files
142 %defattr(644,root,root,755)
143 %doc AUTHORS COPYING ChangeLog README
144 %{_libdir}/libfontconfig.dll.a
145 %{_libdir}/libfontconfig.la
146 %{_libdir}/fontconfig.def
147 %dir %{_includedir}/fontconfig
148 %{_includedir}/fontconfig/*.h
149 %{_pkgconfigdir}/fontconfig.pc
150
151 %files static
152 %defattr(644,root,root,755)
153 %{_libdir}/libfontconfig.a
154
155 %files dll
156 %defattr(644,root,root,755)
157 %{_dlldir}/libfontconfig-*.dll
This page took 0.405544 seconds and 3 git commands to generate.