#
# Conditional build
%bcond_with bytecode # use bytecode hinting instead of autohinting by default
+%bcond_without static_libs # don't build static library
#
Summary: Font configuration and customization tools
Summary(pl): Narzêdzia do konfigurowania fontów
+Summary(pt_BR): Ferramentas para configuração e customização do acesso a fontes
Name: fontconfig
-Version: 2.2.98
+Version: 2.3.95
Release: 2
Epoch: 1
License: MIT
Group: Libraries
Source0: http://fontconfig.org/release/%{name}-%{version}.tar.gz
-# Source0-md5: f13af7e7dfa4e1d68aeb9dcc8d12045a
+# Source0-md5: 6860be35882f6d34636d52345efd5944
Patch0: %{name}-blacklist.patch
Patch1: %{name}-autohint.patch
-Patch2: %{name}-autohint2.patch
+Patch2: %{name}-cmap-parsing.patch
URL: http://fontconfig.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: expat-devel
BuildRequires: freetype-devel >= 2.1.5
BuildRequires: libtool
+BuildRequires: pkgconfig
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: freetype >= 2.1.5
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Paket ten zawiera programy narzêdziowe i dokumentacjê.
-#%description -l pt_BR
-#Fontconfig é uma biblioteca para configuração e customização do acesso
-#a fontes.
+%description -l pt_BR
+Fontconfig é uma biblioteca para configuração e customização do acesso
+a fontes.
+
+Este pacote contém as ferramentas e documentação.
%package libs
Summary: Font configuration and customization library
Summary(pl): Biblioteka do konfigurowania fontów
-Summary(pt_BR): Fontconfig é uma biblioteca para configuração e customização do acesso a fontes
+Summary(pt_BR): Biblioteca para configuração e customização do acesso a fontes
Group: Development/Libraries
Requires: freetype >= 2.1.5
Provides: XFree86-fontconfig
%package devel
Summary: Font configuration and customization library - development files
Summary(pl): Biblioteka do konfigurowania fontów - pliki dla programistów
-Summary(pt_BR): Fontconfig é uma biblioteca para configuração e customização do acesso a fontes
+Summary(pt_BR): Biblioteca para configuração e customização do acesso a fontes - arquivos de desenvolvimento
Group: Development/Libraries
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: expat-devel
Fontconfig é uma biblioteca para configuração e customização do acesso
a fontes.
+Este pacote contém arquivos de desenvolvimento necessários à criação
+de extensões baseadas na biblioteca fontconfig.
+
%package static
Summary: Static font configuration and customization library
Summary(pl): Statyczna biblioteka do konfigurowania fontów
+Summary(pt_BR): Biblioteca estática para configuração e customização do acesso a fontes
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
Provides: XFree86-fontconfig-static
%description static -l pl
Ten pakiet zawiera statyczn± wersjê biblioteki fontconfig.
+%description static -l pt_BR
+Este pacote contém a biblioteca estática do fontconfig
+
%prep
%setup -q
%patch0 -p1
%if %{with bytecode}
%patch1 -p1
-%else
-%patch2 -p1
%endif
+%patch2 -p1
%build
%{__libtoolize}
%{__autoheader}
%{__automake}
%configure \
- --disable-docs
+ --disable-docs \
+ %{!?with_static_libs:--disable-static}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_mandir}/man{1,3,5}
+install -d $RPM_BUILD_ROOT{%{_mandir}/man{1,3,5},/var/cache/fontconfig}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
install doc/*.3 $RPM_BUILD_ROOT%{_mandir}/man3
install doc/*.5 $RPM_BUILD_ROOT%{_mandir}/man5
+cp -f conf.d/README README.confd
+
%clean
rm -rf $RPM_BUILD_ROOT
%post
-HOME=/root %{_bindir}/fc-cache -f 2>/dev/null
+umask 022
+HOME=/tmp %{_bindir}/fc-cache -f 2>/dev/null || :
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog README
+%doc AUTHORS COPYING ChangeLog README README.confd
%attr(755,root,root) %{_bindir}/fc-*
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*
+/var/cache/fontconfig
%files libs
%defattr(644,root,root,755)
%dir %{_sysconfdir}/fonts
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/fonts.conf
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/local.conf
%{_sysconfdir}/fonts/fonts.dtd
+%dir %{_sysconfdir}/fonts/conf.d
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/*.conf
%attr(755,root,root) %{_libdir}/lib*.so.*.*
%files devel
%{_pkgconfigdir}/fontconfig.pc
%{_mandir}/man3/*.3*
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a
+%endif