220 lines
7.2 KiB
RPMSpec
220 lines
7.2 KiB
RPMSpec
#
|
|
# spec file for package fontconfig
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define build_docs 0
|
|
Name: fontconfig
|
|
Version: 2.12.3
|
|
Release: 0
|
|
Summary: Library for Font Configuration
|
|
License: MIT
|
|
Group: System/Libraries
|
|
Url: http://fontconfig.org/
|
|
Source0: http://fontconfig.org/release/%{name}-%{version}.tar.bz2
|
|
Source4: baselibs.conf
|
|
Source5: local.conf
|
|
# suse specific because freetype2-bitmap-foundry.patch
|
|
# https://www.libreoffice.org/bugzilla/show_bug.cgi?id=47704
|
|
Patch1: fontconfig-locale_c.utf8.patch
|
|
BuildRequires: automake >= 1.11
|
|
BuildRequires: freetype2-devel
|
|
# -----
|
|
# (see removal of src/fcobjshash.h in %build)
|
|
# build 2.12.3 (2.12.1 worked fine); not needed as soon
|
|
# as following bug is resolved:
|
|
# https://bugs.freedesktop.org/show_bug.cgi?id=101280
|
|
BuildRequires: gperf
|
|
# ---
|
|
BuildRequires: libexpat-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: pkgconfig
|
|
Requires: bash
|
|
Provides: XFree86:%{_sysconfdir}/fonts/fonts.dtd
|
|
Provides: ipa-fonts-config = 003.02
|
|
Obsoletes: ipa-fonts-config <= 003.02
|
|
Provides: IPA-fonts-config = 003.02
|
|
Obsoletes: IPA-fonts-config <= 003.02
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if %{build_docs}
|
|
BuildRequires: docbook-dsssl-stylesheets
|
|
BuildRequires: docbook-utils
|
|
BuildRequires: docbook_3
|
|
BuildRequires: docbook_4
|
|
BuildRequires: iso_ent
|
|
BuildRequires: libpng
|
|
BuildRequires: libxml2
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: lynx
|
|
BuildRequires: openjade
|
|
BuildRequires: opensp
|
|
BuildRequires: perl-SGMLS
|
|
BuildRequires: sgml-skel
|
|
BuildRequires: texlive-dvips
|
|
BuildRequires: texlive-jadetex
|
|
%endif
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: fontconfig-64bit
|
|
%endif
|
|
# After building with "build_docs" defined to "1" generate the doc tarball with:
|
|
# tar jcf fontconfig-doc.tar.bz2 fc-*/*.[0-9] doc/*.[0-9] doc/*.html doc/*/*.html doc/*.txt
|
|
%if %{build_docs} < 1
|
|
Source1: %{name}-doc-%{version}.tar.bz2
|
|
%endif
|
|
|
|
%description
|
|
Fontconfig is a library for configuring and customizing font access. It
|
|
contains two essential modules: the configuration module, which builds
|
|
an internal configuration from XML files, and the matching module,
|
|
which accepts font patterns and returns the nearest matching font.
|
|
|
|
%package devel
|
|
Summary: Include Files and Libraries mandatory for Development
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{name} = %{version}
|
|
Requires: freetype2-devel
|
|
Requires: glibc-devel
|
|
Provides: XFree86-devel:%{_libdir}/pkgconfig/fontconfig.pc
|
|
# bug437293
|
|
%ifarch ppc64
|
|
Obsoletes: fontconfig-devel-64bit
|
|
%endif
|
|
|
|
%description devel
|
|
This package countains all include files, libraries, configuration
|
|
files needed for compiling applications which use the fontconfig
|
|
library.
|
|
|
|
In addition, it contains extensive documentation and manual pages for
|
|
developers using the library.
|
|
|
|
Fontconfig is a library for configuring and customizing font access. It
|
|
contains two essential modules, the configuration module which builds
|
|
an internal configuration from XML files and the matching module which
|
|
accepts font patterns and returns the nearest matching font.
|
|
|
|
%prep
|
|
%setup -q
|
|
%if %{build_docs} < 1
|
|
tar -xvf %{SOURCE1}
|
|
%endif
|
|
%patch1 -p1
|
|
# use suse-specific doc path:
|
|
find -name \*.1 -o -name \*.sgml | xargs sed -i -e 's/usr\/share\/doc\/fontconfig/usr\/share\/doc\/packages\/fontconfig/g'
|
|
|
|
%build
|
|
# ----- build with automake 1.13
|
|
# work around from https://bugs.archlinux.org/task/33406
|
|
find . -name Makefile.am -exec sed -i "s/\(TESTS_ENVIRONMENT=.*\) sh/\1/" {} \;
|
|
chmod u+x test/run-test.sh
|
|
chmod u+x doc/check-missing-doc
|
|
# -----
|
|
# build 2.12.3 (2.12.1 worked fine); not needed as soon
|
|
# as following bug is resolved:
|
|
# https://bugs.freedesktop.org/show_bug.cgi?id=101280
|
|
rm src/fcobjshash.h
|
|
# ---
|
|
autoreconf -fiv
|
|
%configure --with-pic --with-arch=%{_host_cpu} \
|
|
--disable-static \
|
|
--with-freetype-lib=%{_libdir} \
|
|
--with-x \
|
|
--enable-libxml2=no \
|
|
--with-confdir=%{_sysconfdir}/fonts \
|
|
--with-docdir=%{_defaultdocdir}/%{name} \
|
|
--with-add-fonts=%{_prefix}/X11R6/lib/X11/fonts,/opt/kde3/share/fonts,%{_prefix}/local/share/fonts \
|
|
%if %{build_docs} == 0
|
|
--disable-docs
|
|
%endif
|
|
#
|
|
make %{?_smp_mflags} V=1
|
|
|
|
%check
|
|
export MALLOC_CHECK_=2
|
|
make %{?_smp_mflags} check
|
|
unset MALLOC_CHECK_
|
|
|
|
%install
|
|
make DESTDIR=%{buildroot} pkgconfigdir=%{_libdir}/pkgconfig install
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
# package /etc/fonts/conf.avail for compatibility reasons
|
|
mkdir %{buildroot}%{_sysconfdir}/fonts/conf.avail
|
|
# documentation
|
|
mkdir -p %{buildroot}/%{_defaultdocdir}/fontconfig
|
|
mkdir -p %{buildroot}/%{_defaultdocdir}/fontconfig-devel
|
|
install -m 644 AUTHORS COPYING ChangeLog README \
|
|
%{buildroot}/%{_defaultdocdir}/%{name}
|
|
install -m 644 doc/*.html %{buildroot}/%{_defaultdocdir}/fontconfig
|
|
install -m 644 doc/fontconfig-user.txt %{buildroot}/%{_defaultdocdir}/fontconfig
|
|
install -m 644 doc/fontconfig-devel/* %{buildroot}/%{_defaultdocdir}/fontconfig-devel
|
|
install -m 644 doc/fontconfig-devel.txt %{buildroot}/%{_defaultdocdir}/fontconfig-devel
|
|
for i in 1 3 5
|
|
do
|
|
mkdir -p %{buildroot}/%{_mandir}/man${i}/
|
|
for j in fc-*/*.${i} doc/*.${i} doc/*/*.${i}
|
|
do
|
|
test -f ${j} && install -m 644 ${j} %{buildroot}/%{_mandir}/man${i}/
|
|
done
|
|
gzip --best %{buildroot}/%{_mandir}/man${i}/*.${i}
|
|
done
|
|
install -m 644 conf.d/README %{buildroot}%{_sysconfdir}/fonts/conf.d
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/fonts
|
|
# tune links in conf.d
|
|
pushd %{buildroot}%{_sysconfdir}/fonts/conf.d
|
|
mv 50-user.conf 56-user.conf
|
|
rm 51-local.conf
|
|
ln -s ../local.conf 55-local.conf
|
|
# leave place for 60-family-prefer.conf from fonts-config
|
|
mv 60-latin.conf 61-latin.conf
|
|
popd
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libfontconfig.so.*
|
|
%{_bindir}/*
|
|
%dir %{_sysconfdir}/fonts
|
|
%dir %{_sysconfdir}/fonts/conf.d
|
|
# packaging /etc/fonts/conf.avail for compatibility reasons
|
|
%dir %{_sysconfdir}/fonts/conf.avail
|
|
%config %{_sysconfdir}/fonts/fonts.conf
|
|
%config %{_sysconfdir}/fonts/conf.d/*.conf
|
|
%config(noreplace) %{_sysconfdir}/fonts/local.conf
|
|
%{_sysconfdir}/fonts/conf.d/README
|
|
%dir %{_datadir}/%{name}
|
|
%dir %{_datadir}/%{name}/conf.avail
|
|
%{_datadir}/%{name}/conf.avail/*.conf
|
|
%dir %{_datadir}/xml/%{name}
|
|
%{_datadir}/xml/%{name}/fonts.dtd
|
|
%dir %{_localstatedir}/cache/fontconfig/
|
|
%doc %{_docdir}/%{name}
|
|
%{_mandir}/man5/fonts-conf.5.gz
|
|
%{_mandir}/man1/*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc %{_defaultdocdir}/%{name}-devel
|
|
%{_libdir}/pkgconfig/fontconfig.pc
|
|
%{_libdir}/libfontconfig.so
|
|
%{_mandir}/man3/Fc*
|
|
%{_includedir}/fontconfig/
|
|
|
|
%changelog
|