# Conditional build:
%bcond_without lcd # without LCD subpixel color filtering (Microsoft patents in USA)
%bcond_without x11 # don't build examples (X11-based)
+%bcond_without harfbuzz # harfbuzz based autohinting
%bcond_without apidocs # disable api docs
Summary: TrueType font rasterizer
Summary(ru.UTF-8): Растеризатор шрифтов TrueType
Summary(uk.UTF-8): Растеризатор шрифтів TrueType
Name: freetype
-Version: 2.5.1
-Release: 1
+Version: 2.6.3
+Release: 2
Epoch: 1
License: GPL v2 or FTL
Group: Libraries
Source0: http://download.savannah.gnu.org/releases/freetype/%{name}-%{version}.tar.bz2
-# Source0-md5: 93eba7854094f46d7d98a9a2370af4d6
+# Source0-md5: 0037b25a8c090bc8a1218e867b32beb1
Source1: http://download.savannah.gnu.org/releases/freetype/%{name}-doc-%{version}.tar.bz2
-# Source1-md5: b955678d06318b32337bd7c730daa676
+# Source1-md5: ec2629b81f80decdae04a4b528097b81
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
-# Source2-md5: 73742ef4b13ff9f7b1d4ad2199964141
+# Source2-md5: f7c6102f29834a80456264fe4edd81d1
Patch0: %{name}-2.2.1-enable-valid.patch
-Patch1: %{name}-nodebug.patch
+Patch1: ft2demos-includes.patch
URL: http://www.freetype.org/
BuildRequires: automake
BuildRequires: bzip2-devel
+%{?with_harfbuzz:BuildRequires: harfbuzz-devel >= 0.9.19}
BuildRequires: libpng-devel
+BuildRequires: pkgconfig >= 1:0.24
BuildRequires: python
BuildRequires: python-modules
BuildRequires: rpm >= 4.4.9-56
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: bzip2-devel
+%{?with_harfbuzz:Requires: harfbuzz-devel >= 0.9.19}
Requires: libpng-devel
Requires: zlib-devel
Obsoletes: freetype2-devel
Summary: FreeType API documetation
Summary(pl.UTF-8): Dokumentacja API FreeType
Group: Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description apidocs
FreeType API documetation.
%prep
%setup -q -a1 -a2
%patch0 -p1
-%patch1 -p1
+cd ft2demos-%{version}
+%patch1 -p2
+cd ..
# avoid propagating -L%{_libdir} through *.la
%{__sed} -i -e 's,libpng-config --ldflags,libpng-config --libs,' builds/unix/configure
%build
+CC="%{__cc}" \
CFLAGS="%{rpmcflags} %{rpmcppflags} \
%{?with_lcd:-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING} \
-DTT_CONFIG_OPTION_SUBPIXEL_HINTING \
+%{?with_harfbuzz:-DFT_CONFIG_OPTION_USE_HARFBUZZ} \
" \
%{__make} setup unix \
CFG="--prefix=%{_prefix} --libdir=%{_libdir}"
+CC="%{__cc}" \
%{__make} \
X11_LIB=%{?_x_libraries}
%if %{with x11}
+CC="%{__cc}" \
%{__make} -C ft2demos-* \
TOP_DIR=$(pwd) \
X11_LIB=%{?_x_libraries}
%{_includedir}/freetype2
%{_aclocaldir}/freetype2.m4
%{_pkgconfigdir}/freetype2.pc
+%{_mandir}/man1/freetype-config.1*
%if %{with apidocs}
%files apidocs