diff --git a/freetype.spec b/freetype.spec index 8d2006462f6f2216efb823d81205bd4a1f0b2854..a3f91d82d2e754d254b464a5ac02158916808d3e 100644 --- a/freetype.spec +++ b/freetype.spec @@ -2,15 +2,17 @@ %{!?with_xfree86:%define with_xfree86 1} +%bcond_without harfbuzz + Name: freetype Version: 2.13.2 -Release: 1 +Release: 2 Summary: FreeType is a freely available software library to render fonts -License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement -URL: http://www.freetype.org -Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz -Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz -Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz +License: (FTL OR GPL-2.0-or-later) AND BSD-3-Clause AND MIT AND MIT-Modern-Variant AND Zlib +URL: https://www.freetype.org +Source0: https://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.xz +Source1: https://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.xz +Source2: https://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.xz Source3: ftconfig.h #from tests/scripts/download-test-fonts.py:https://github.com/python-pillow/Pillow/files/6622147/As.I.Lay.Dying.zip Source4: As.I.Lay.Dying.ttf @@ -23,11 +25,18 @@ Patch6003: backport-freetype-2.8-multilib.patch Patch6004: backport-freetype-2.10.0-internal-outline.patch Patch6005: backport-freetype-2.10.1-debughook.patch -BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel meson +BuildRequires: gcc meson +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libbrotlidec) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(zlib) +%if %{with harfbuzz} +BuildRequires: pkgconfig(harfbuzz) >= 2.0.0 +%endif -Provides: %{name}-bytecode +Provides: %{name}-bytecode = %{version}-%{release} %if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0} -Provides: %{name}-subpixel +Provides: %{name}-subpixel = %{version}-%{release} %endif %description @@ -43,35 +52,39 @@ The FreeType engine is a free and portable font rendering engine,developed to pr %package devel Summary: FreeType development libraries and header files -Requires: %{name} = %{version}-%{release} pkgconf +Requires: %{name} = %{version}-%{release} %description devel The freetype-devel package includes the static libraries and header files for the FreeType font rendering engine.Install freetype-devel if you want to develop programs which will use FreeType. -%package help -Summary: Documents for freetype -Buildarch: noarch - -%description help -Man pages and other related for freetype documents. +%package_help %prep -%setup -q -b 1 -a 2 +%setup -q -b 1 -a 2 pushd ft2demos-%{version} -%patch1 -p1 -b .more-demos +%patch -P1 -p1 -b .more-demos popd -%patch6000 -p1 -%patch6001 -p1 -%patch6002 -p1 -%patch6003 -p1 -%patch6004 -p1 -%patch6005 -p1 +%patch -P6000 -p1 +%patch -P6001 -p1 +%patch -P6002 -p1 +%patch -P6003 -p1 +%patch -P6004 -p1 +%patch -P6005 -p1 %build -%configure --disable-static --with-zlib=yes --with-bzip2=yes --with-png=yes --enable-freetype-config --with-harfbuzz=no +%configure --disable-static \ + --with-zlib=yes \ + --with-bzip2=yes \ + --with-png=yes \ +%if %{with harfbuzz} + --with-harfbuzz=yes \ +%else + --with-harfbuzz=no \ +%endif + --enable-freetype-config sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' builds/unix/libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' builds/unix/libtool %make_build @@ -82,7 +95,8 @@ make TOP_DIR=".." %endif %install -%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale +%make_install +%delete_la { for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftmemchk ftvalid ; do builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir} @@ -112,10 +126,6 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/co exit 0 } -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - %check mkdir -p tests/data/ cp %{SOURCE4} tests/data/ @@ -124,7 +134,6 @@ meson compile -C out meson test -C out %files -%{!?_licensedir:%global license %%doc} %license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT %{_libdir}/libfreetype.so.* @@ -137,7 +146,6 @@ meson test -C out %{_libdir}/libfreetype.so %{_libdir}/pkgconfig/freetype2.pc %{_bindir}/freetype-config -%exclude %{_libdir}/*.{a,la} %files help %doc docs/design @@ -149,6 +157,10 @@ meson test -C out %{_mandir}/man1/* %changelog +* Sun Aug 11 2024 Funda Wang - 2.13.2-2 +- Cleanup spec +- Conditioned build harfbuzz support + * Thu Dec 28 2023 Paul Thomas - 2.13.2-1 - update to version 2.13.2