226 lines
6.7 KiB
RPMSpec
226 lines
6.7 KiB
RPMSpec
%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
|
|
|
|
%{!?with_xfree86:%define with_xfree86 1}
|
|
|
|
%bcond_without harfbuzz
|
|
|
|
Name: freetype
|
|
Version: 2.13.2
|
|
Release: 3
|
|
Summary: FreeType is a freely available software library to render fonts
|
|
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
|
|
|
|
Patch1: backport-freetype-2.5.2-more-demos.patch
|
|
Patch6000: backport-freetype-2.3.0-enable-spr.patch
|
|
Patch6001: backport-freetype-2.2.1-enable-valid.patch
|
|
Patch6002: backport-freetype-2.6.5-libtool.patch
|
|
Patch6003: backport-freetype-2.8-multilib.patch
|
|
Patch6004: backport-freetype-2.10.0-internal-outline.patch
|
|
Patch6005: backport-freetype-2.10.1-debughook.patch
|
|
Patch6006: backport-CVE-2025-27363.patch
|
|
|
|
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 = %{version}-%{release}
|
|
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
|
|
Provides: %{name}-subpixel = %{version}-%{release}
|
|
%endif
|
|
|
|
%description
|
|
FreeType is written in C, designed to be small,efficient, highly customizable, and portable while capable of producing high-quality
|
|
output (glyph images) of most vector and bitmap font formats
|
|
|
|
%package demos
|
|
Summary: A collection of freetype demos
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description demos
|
|
The FreeType engine is a free and portable font rendering engine,developed to provide advanced font support for a variety of platforms and environments.The demos package includes a set of useful small utilities showing various capabilities of the FreeType library.
|
|
|
|
%package devel
|
|
Summary: FreeType development libraries and header files
|
|
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
|
|
|
|
%prep
|
|
%setup -q -b 1 -a 2
|
|
|
|
pushd ft2demos-%{version}
|
|
%patch1 -p1 -b .more-demos
|
|
popd
|
|
%patch6000 -p1
|
|
%patch6001 -p1
|
|
%patch6002 -p1
|
|
%patch6003 -p1
|
|
%patch6004 -p1
|
|
%patch6005 -p1
|
|
%patch6006 -p1
|
|
|
|
%build
|
|
%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
|
|
|
|
%if %{with_xfree86}
|
|
cd ft2demos-%{version}
|
|
make TOP_DIR=".."
|
|
%endif
|
|
|
|
%install
|
|
%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}
|
|
done
|
|
}
|
|
%if %{with_xfree86}
|
|
{
|
|
for ftdemo in ftdiff ftgamma ftgrid ftmulti ftstring fttimer ftview ; do
|
|
builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
|
|
done
|
|
}
|
|
%endif
|
|
|
|
%define wordsize %{__isa_bits}
|
|
|
|
mv $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h \
|
|
$RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig-%{wordsize}.h
|
|
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h
|
|
|
|
%triggerpostun -- freetype < 2.0.5-3
|
|
{
|
|
# ttmkfdir updated - as of 2.0.5-3, on upgrades we need xfs to regenerate
|
|
# things to get the iso10646-1 encoding listed.
|
|
for I in %{_datadir}/fonts/*/TrueType /usr/share/X11/fonts/TTF; do
|
|
[ -d $I ] && [ -f $I/fonts.scale ] && [ -f $I/fonts.dir ] && touch $I/fonts.scale
|
|
done
|
|
exit 0
|
|
}
|
|
|
|
%check
|
|
mkdir -p tests/data/
|
|
cp %{SOURCE4} tests/data/
|
|
meson setup out -Dtests=enabled
|
|
meson compile -C out
|
|
meson test -C out
|
|
|
|
%files
|
|
%license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
|
|
%{_libdir}/libfreetype.so.*
|
|
|
|
%files demos
|
|
%{_bindir}/ft*
|
|
|
|
%files devel
|
|
%{_datadir}/aclocal/freetype2.m4
|
|
%{_includedir}/freetype2/*
|
|
%{_libdir}/libfreetype.so
|
|
%{_libdir}/pkgconfig/freetype2.pc
|
|
%{_bindir}/freetype-config
|
|
|
|
%files help
|
|
%doc docs/design
|
|
%doc docs/glyphs
|
|
%doc docs/reference
|
|
%doc docs/tutorial
|
|
%doc docs/CHANGES docs/formats.txt docs/ft2faq.html
|
|
%doc ChangeLog README
|
|
%{_mandir}/man1/*
|
|
|
|
%changelog
|
|
* Mon Mar 17 2025 zhangpan <zhangpan103@h-partners.com> - 2.13.2-3
|
|
- fix CVE-2025-27363
|
|
|
|
* Sun Aug 11 2024 Funda Wang <fundawang@yeah.net> - 2.13.2-2
|
|
- Cleanup spec
|
|
- Conditioned build harfbuzz support
|
|
|
|
* Thu Dec 28 2023 Paul Thomas <paulthomas100199@gmail.com> - 2.13.2-1
|
|
- update to version 2.13.2
|
|
|
|
* Wed Sep 20 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.13.1-2
|
|
- enable check
|
|
|
|
* Fri Jul 14 2023 zhangpan <zhangpan103@h-partners.com> - 2.13.1-1
|
|
- update to 2.13.1
|
|
|
|
* Mon Apr 17 2023 zhouwenpei <zhouwenpei1@h-partners.com> - 2.12.1-2
|
|
- fix CVE-2023-2004
|
|
|
|
* Tue Nov 29 2022 zhouwenpei <zhouwenpei1@h-partners.com> - 2.12.1-1
|
|
- update to 2.12.1
|
|
|
|
* Sat May 14 2022 wangkerong <wangkerong@h-partners.com> - 2.11.0-3
|
|
- fix CVE-2022-27454,CVE-2022-27455,CVE-2022-27456
|
|
|
|
* Thu Dec 09 2021 dongyuzhen <dongyuzhen@huawei.com> - 2.11.0-2
|
|
- detach a demos package
|
|
- fix the patch name
|
|
|
|
* Wed Dec 08 2021 dongyuzhen <dongyuzhen@huawei.com> - 2.11.0-1
|
|
- update to 2.11.0
|
|
|
|
* Tue Apr 13 2021 hanhui<hanhui15@huawei.com> - 2.10.2-3
|
|
- Type:bugfix
|
|
- CVE:NA
|
|
- SUG:NA
|
|
- DESC:add community patches
|
|
|
|
* Tue Dec 08 2020 zhanzhimin <zhanzhimin@huawei.com> - 2.10.2-2
|
|
- Type:CVE
|
|
- CVE:CVE-2020-15999
|
|
- SUG:NA
|
|
- DESC:fix CVE-2020-15999
|
|
|
|
* Mon Jul 20 2020 wangye <wangye70@huawei.com> - 2.10.2-1
|
|
- Type:enhancement
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:version update to 2.10.2
|
|
|
|
* Tue Jan 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.9.1-5
|
|
- Type:enhancement
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:optimization the spec
|
|
|
|
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.9.1-4
|
|
- Type:enhancement
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:optimization the spec
|
|
|
|
* Wed Sep 11 2019 openEuler jimmy<dukaitian@huawei.com> - 2.9.1-3
|
|
- Package init jimmy
|