Sync from SUSE:SLFO:Main freetype2 revision 393ee1b023a56cd19cc304fcea33a57a

This commit is contained in:
Adrian Schröter 2024-05-03 12:38:57 +02:00
commit 0856753942
25 changed files with 4123 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

4
_multibuild Normal file
View File

@ -0,0 +1,4 @@
<multibuild>
<package>ft2demos</package>
</multibuild>

9
baselibs.conf Normal file
View File

@ -0,0 +1,9 @@
libfreetype6
obsoletes "freetype2-<targettype> < <version>"
provides "freetype2-<targettype> = <version>"
freetype2-devel
requires -freetype2-<targettype>
requires "libfreetype6-<targettype>"
requires "zlib-devel-<targettype>"
requires "libbz2-devel-<targettype>"
requires "libbrotli-devel-<targettype>"

BIN
bnc628213_test.otf Normal file

Binary file not shown.

BIN
bnc629447_sigsegv31.ttf (Stored with Git LFS) Normal file

Binary file not shown.

BIN
bnc633938_badbdf.0 Normal file

Binary file not shown.

Binary file not shown.

BIN
bug-647375_tt2.ttf (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,20 @@
---
src/base/ftobjs.c | 5 +++++
1 file changed, 5 insertions(+)
Index: freetype-2.13.1/src/base/ftobjs.c
===================================================================
--- freetype-2.13.1.orig/src/base/ftobjs.c
+++ freetype-2.13.1/src/base/ftobjs.c
@@ -2753,6 +2753,11 @@
if ( FT_IS_SCALABLE( face ) )
{
+ if ( face->family_name && strncmp(face->family_name, "CMEX", 4 ) == 0){
+ face->underline_position = (FT_Short)( -face->units_per_EM / 10 );
+ face->underline_thickness = (FT_Short)( face->units_per_EM / 30 );
+ }
+
if ( face->height < 0 )
face->height = (FT_Short)-face->height;

View File

@ -0,0 +1,40 @@
Index: freetype-2.13.1/builds/unix/configure
===================================================================
--- freetype-2.13.1.orig/builds/unix/configure
+++ freetype-2.13.1/builds/unix/configure
@@ -16389,7 +16389,6 @@ fi
# entries in Requires.private are separated by commas
PKGCONFIG_REQUIRES_PRIVATE="$zlib_reqpriv, \
$bzip2_reqpriv, \
- $libpng_reqpriv, \
$harfbuzz_reqpriv, \
$brotli_reqpriv"
# beautify
@@ -16417,7 +16416,6 @@ PKGCONFIG_LIBS_PRIVATE=`echo "$PKGCONFIG
LIBSSTATIC_CONFIG="-lfreetype \
$zlib_libsstaticconf \
$bzip2_libsstaticconf \
- $libpng_libsstaticconf \
$harfbuzz_libsstaticconf \
$brotli_libsstaticconf \
$ft2_extra_libs"
Index: freetype-2.13.1/builds/unix/configure.raw
===================================================================
--- freetype-2.13.1.orig/builds/unix/configure.raw
+++ freetype-2.13.1/builds/unix/configure.raw
@@ -992,7 +992,6 @@ fi
# entries in Requires.private are separated by commas
PKGCONFIG_REQUIRES_PRIVATE="$zlib_reqpriv, \
$bzip2_reqpriv, \
- $libpng_reqpriv, \
$harfbuzz_reqpriv, \
$brotli_reqpriv"
# beautify
@@ -1020,7 +1019,6 @@ PKGCONFIG_LIBS_PRIVATE=`echo "$PKGCONFIG
LIBSSTATIC_CONFIG="-lfreetype \
$zlib_libsstaticconf \
$bzip2_libsstaticconf \
- $libpng_libsstaticconf \
$harfbuzz_libsstaticconf \
$brotli_libsstaticconf \
$ft2_extra_libs"

View File

@ -0,0 +1,13 @@
Index: freetype-2.11.0/include/freetype/config/ftoption.h
===================================================================
--- freetype-2.11.0.orig/include/freetype/config/ftoption.h
+++ freetype-2.11.0/include/freetype/config/ftoption.h
@@ -877,7 +877,7 @@ FT_BEGIN_HEADER
* If this option is activated, it can be controlled with the
* `no-long-family-names` property of the 'pcf' driver module.
*/
-/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */
+#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES
/*************************************************************************/

View File

@ -0,0 +1,13 @@
Index: freetype-2.11.0/include/freetype/config/ftoption.h
===================================================================
--- freetype-2.11.0.orig/include/freetype/config/ftoption.h
+++ freetype-2.11.0/include/freetype/config/ftoption.h
@@ -123,7 +123,7 @@ FT_BEGIN_HEADER
* When this macro is not defined, FreeType offers alternative LCD
* rendering technology that produces excellent output.
*/
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/**************************************************************************

BIN
freetype-2.13.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4wZ0cHhWQJ/xlIAQvmw6rGOtjj8FAmTo+Y4ACgkQvmw6rGOt
jj/cJw//fgODrYtm8tI042WzspEQCWqBjV9yIVrzx7us910DSYR1Uim48LiCXCqT
WUXgz+0Ppd1XMmjVvOGXimaPyxOND0pjNbRzVN2qXrqbo2un7RmRJcg9bc+9znK3
d0UiI4PqVTuhiOb989L/lf9m9yc9miuvFOFHeU/FWFWdQ1YXTRPMWmHKsiDQIqyU
RGoQVYI4fqkW8aRxLKmPDJncYW/Y/EhWyfSc13vfNUSp0N2HvwbpcoWyDGjXwPA1
R+Sv364BgeJuDnSpjqBKyskXaMKSY7Mk+MgrdKoOYbcXurr/mdFgEPBsaLK1kENW
2vG1I706o5rAmJr0EqvkDy/qfJmjPufNik2XIuo7J+VdSA5RY0aex85HARgIcg8Z
ZDTdmm7qoa0bkYouSsXAXhkewgCXb3L+2fFsBZIXK8aDgdkwYUPuF3z76BTjxn3i
6DOefYDZJuYHa3iuSp+d6Veym3CzcEqid6Dyn66AngONOy43+I/wz8mNt17P6Q0d
RTx42UeDiWdK2AHPGIa1sAwY7sWRNMPLjcPUR0W6kpoQq6zR5q+qFa7MGyzoAIgU
SQ4ocnbJC09B4ksJMcsdfIKltBK2o3fi6yCYm8KKf+9bcOZeQnCFNdfT0atGaMNW
TD+hxDUd4y2tt7osGL204b5C0O7VpoGXDkgOiHnT4q4MCJ6ExqI=
=AmM4
-----END PGP SIGNATURE-----

BIN
freetype-doc-2.13.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4wZ0cHhWQJ/xlIAQvmw6rGOtjj8FAmTo+Y8ACgkQvmw6rGOt
jj8HyA//U/pUi5Lyn8NW5++42JBaDXDNiaPRpIt27K9GJ1TRFRECP9DgnEs2n83J
uVx0e3VcFanZv/7x96WxpafhYYFbhKBOne8vqxVqGjwOKMHoGPKz9ICFfGsWGQsb
SdLialNam/kBCp7hz/SKVnWtBd4Nt87TKs//9fwoLw8aJW5dG9js8qfq4wZnSVXh
FATpHaxkMAf6a0f558z2rzjYnbGmlBI8O5utOxGjLbZ1bKrwfC91wQoNQvnfqj/2
aPDwW4QuRjK4LZ1p5NuO/Ji3Es8E2p1wYmVuEwEpaXMI76k09GVbSVfsSfftdRMc
oI1MF/lCcAf9oTxxvsSbI7Pt8l3+eaIB1vApJBvppNjM2ky+fsIhQiL87RPQ9Nur
LZtu671FP0V6DbQ39AZ8D9679Pw/YFQx6g5KAo4XlUmhVBuGAAHW7Hg+U3nDDesE
uliwcXoOaO9Z6O+WFpGZQD2s9b7DNdy2cS+f7sN3cxIzq5IIFZNIla1E/TE15hwn
uhL9v9iTVKHmOA7URqsE+cA1iFa8o1RcvBurgd+Ma22woHBc8xYG8oODCP7mwg8n
zj/uZdBPUFXXCQGNrz5fZFXPnQSfoDZACBFNMo4UuWjzIORgXEo5webIDsuP9+fv
0cqoX5Tkp1eqCUAJXSBmhDL4WkRGTbg7spBd8kgnp3tytv+9Shw=
=pDyJ
-----END PGP SIGNATURE-----

2145
freetype2.changes Normal file

File diff suppressed because it is too large Load Diff

50
freetype2.keyring Normal file
View File

@ -0,0 +1,50 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFzeVs8BEAC6x2UWFcVgjoHHpfJepxtzduLYt8jX9viX57uc1WwNK/vD24Sy
cvzt6CEHVOD4FILLSQ14LPid4aa5YyLl4DPQs3qva+ZWCSdBF8VEGZ3/WVJ7TkiI
yQTnesd+vw04WiBgtmVqcgbO6W46WRDWEZqaIh+8bthYrbUVgAojsvcNicDooXU4
IvuHiK1LrCyZPyn+pUiKZ+UnnRuh/klmNVjBdqfoTg0Y0nbQwmroUrFIn0X9gxpm
mj1d+3gyZWE0+c4axrNH5OO729Ck/Lx+hkZMHsFuPFl+P2kR7ZHRUykn7CMdPUGd
UmK1/71hDwmN/TMBqgzyLCv+AeEBavhGxPLnFC2mvSpBd0XtD49jbn2RfWGl9m3I
g7S0MgTAKZTsGj2V0xfjMw5lcC2iIknv+tb3MZB1Tt8u1rCWHKgh3EpGFsBK+AGW
jFTFnvvaXOQUrtVKYlU0joxhTM0rTOnJu78meAfoHSlRgNXtu5H37AErs2zGCIqG
Qt1nmONlmJRF6xllhu5lui//zN+xKiNQMlxerEXjBXcuUyw4JQloECTEgQ8Fjz+5
YlvFQEuXUQ9t/Cp0K6ZOBNMT7vNpurp3uuT1INF2gbCSlCAErECsXTvAZ5cpe7Q4
zJelg1AiOdd/sM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85
3WwmK3SM6YTnOxA3qsQtb9pyb5EDIPfPO7zlYjcnvSPPhP2xMG2ChNVqJ10hNtnf
wuol46Q+uIUuvFErhUMbyeCH/gctL3Lfi9H0nGPjRSAE8U91mQAkImQdWfNpxpso
XcSwq7jttDqVrxsVISshSQMIOZf2llEgY6ZWxZYtUTfpIQsD+SeeBDUUcw==
=1ZH3
-----END PGP PUBLIC KEY BLOCK-----

1
freetype2.sh Normal file
View File

@ -0,0 +1 @@
export FREETYPE_PROPERTIES="truetype:interpreter-version=35"

158
freetype2.spec Normal file
View File

@ -0,0 +1,158 @@
#
# spec file for package freetype2
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define doc_version 2.13.2
Name: freetype2
Version: 2.13.2
Release: 0
Summary: A TrueType Font Library
License: FTL AND GPL-2.0-only
Group: System/Libraries
URL: https://www.freetype.org
Source0: https://downloads.sourceforge.net/project/freetype/freetype2/%{version}/freetype-%{version}.tar.xz
Source1: https://downloads.sourceforge.net/project/freetype/freetype-docs/%{version}/freetype-doc-%{version}.tar.xz
Source2: %{name}.sh
Source10: https://downloads.sourceforge.net/project/freetype/freetype2/%{version}/freetype-%{version}.tar.xz.sig
Source11: https://downloads.sourceforge.net/project/freetype/freetype-docs/%{version}/freetype-doc-%{version}.tar.xz.sig
Source12: freetype2.keyring
Source20: https://downloads.sourceforge.net/project/freetype/freetype-demos/%{version}/ft2demos-%{version}.tar.xz
Source21: https://downloads.sourceforge.net/project/freetype/freetype-demos/%{version}/ft2demos-%{version}.tar.xz.sig
Source1000: baselibs.conf
Patch0: bugzilla-308961-cmex-workaround.patch
# PATCH-FIX-OPENSUSE don-t-mark-libpng-as-required-library.patch -- it is private in .pc
Patch1: don-t-mark-libpng-as-required-library.patch
Patch2: enable-long-family-names-by-default.patch
Patch3: enable-subpixel-rendering.patch
BuildRequires: gawk
BuildRequires: libbz2-devel
BuildRequires: libpng-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libbrotlidec)
BuildRequires: pkgconfig(zlib)
%description
This library features TrueType fonts for open source projects. This
version also contains an autohinter for producing improved output.
%package -n libfreetype6
Summary: A TrueType Font Library
Group: System/Libraries
Obsoletes: freetype2 < %{version}
Provides: freetype2 = %{version}
%description -n libfreetype6
This library features TrueType fonts for open source projects. This
version also contains an autohinter for producing improved output.
%package profile-tti35
Summary: Set TrueType interpreter to version 35
Group: System/Shells
Requires: bash
Requires: freetype2
BuildArch: noarch
%description profile-tti35
System environment for set TrueType interpreter to version 35.
In release 2.6.4, a new hinting mode for TrueType fonts was added,
which enabled by default to activate sub-pixel hinting for TrueType.
This broke the work of full hinting. This optional package with a bash profile
that will switch the TrueType Interpreter to the old version 35.
%package devel
Summary: Development environment for the freetype2 TrueType font library
Group: Development/Libraries/C and C++
Requires: libfreetype6 = %{version}
Requires: pkgconfig(libbrotlidec)
Requires: pkgconfig(zlib)
# there is no freetype-devel on suse:
Provides: freetype-devel
# Static library provides:
Provides: libfreetype6-devel-static
%description devel
This package contains all necessary include files, libraries and
documentation needed to develop applications that require the freetype2
TrueType font library.
It also contains a small tutorial for using that library.
%package -n ftdump
Summary: Simple font dumper
Group: Productivity/Publishing/Other
Conflicts: ft2demos < %{version}
%description -n ftdump
Simple font dumper
This tool is part of the FreeType project
%prep
%setup -q -n freetype-%{version} -a 1 -a 20
%autopatch -p1
%build
export CFLAGS="%{optflags} -D_GNU_SOURCE $(getconf LFS_CFLAGS)"
%configure \
--with-bzip2 \
--with-brotli \
--without-harfbuzz \
--with-png \
--with-zlib \
--enable-freetype-config \
--disable-static
%make_build ANSIFLAGS=
cd ft2demos-%{version}
%make_build TOP_DIR=.. $PWD/bin/ftdump
%install
%make_install
cd ft2demos-%{version}
../builds/unix/libtool --mode=install %{_bindir}/install -c bin/ftdump %{buildroot}%{_bindir}/ftdump
cd ..
install -Dm 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
# remove documentation that does not belong in an rpm
rm docs/INSTALL*
rm %{buildroot}%{_libdir}/libfreetype.la
%post -n libfreetype6 -p /sbin/ldconfig
%postun -n libfreetype6 -p /sbin/ldconfig
%files -n libfreetype6
%{_libdir}/libfreetype.so.*
%doc ChangeLog README
%doc docs/{CHANGES,CUSTOMIZE,DEBUG,MAKEPP,PROBLEMS,TODO,*.txt}
%files profile-tti35
%config %{_sysconfdir}/profile.d/%{name}.sh
%files devel
%doc docs/reference/*
%{_bindir}/freetype-config
%{_includedir}/*
%{_libdir}/libfreetype.so
%{_libdir}/pkgconfig/freetype2.pc
%{_mandir}/man1/freetype-config.1%{?ext_man}
%{_datadir}/aclocal
%files -n ftdump
%{_bindir}/ftdump
%changelog

BIN
ft2demos-2.13.2.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE4wZ0cHhWQJ/xlIAQvmw6rGOtjj8FAmTo+Y4ACgkQvmw6rGOt
jj+qXQ/8DjjRxDZPmu8PCeUF4/45nqs/sugJomZ9jIjBX0PnuoLP8xupGwGVxYAP
tn+SHTX74acMkHUo6enUf7Q7l30vh563sXucJWkdSGoH0i60/0tTXUI3ryUOq9lT
fp9R6AqmoWJZzryFDcUMNqZqKYAXtDAIsj/LkNG1FEPqyCz4kwoFgxzIlqp2CXkq
cdefTUpr/18pCniRKiesE6xzomUb71rsWvZpllzFWkVIokYtW8uz/9qLCkX8lzoG
zJEusm7FkjJYwA5o0YZbMq9VpFcv4PnQPkqGRDamGIAYIkR3NKhJANhQ5YobPfeM
pP+Yg+N22pFDUvvoztCMGRXcDX2/ZdDu8fCX+CUpxsdq+gXEjTy0cVsWqSzPUl3U
fotqyM4KNQQPGX92XcItdOY3k1QBqu+/oNcUmeRB3Tu1fM28ChrK2cAuJJDzj91/
Km/NEkGcj54g5Pslju3WEIoXlCqCR7HwZF8ONWeO8UBku+12kWEpMKJbFhNx3DxS
oH89UzyqSpegTp4VlrwDgGPok6PYZ0l8vAIVvuxs26cTvGJbN5ErkgViAxQMbyW8
bx0C1ATx9zYPcQ3Nx4TFJuLRnx7Sxt38Tbr25d6jOmqbmLcmLaPyV3/HJW9mkcu4
6RtC5dz/S6iBNycKsTowUv7WWZAaE1zUtTdyRbeT0rE+34HzZAQ=
=MnLS
-----END PGP SIGNATURE-----

1316
ft2demos.changes Normal file

File diff suppressed because it is too large Load Diff

250
ft2demos.spec Normal file
View File

@ -0,0 +1,250 @@
#
# spec file for package ft2demos
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%global freetype_version 2.13.2
Name: ft2demos
Version: 2.13.2
Release: 0
Summary: Freetype2 Utilities and Demo Programs
License: GPL-2.0-or-later
Group: Productivity/Publishing/Other
URL: https://www.freetype.org
Source0: https://downloads.sourceforge.net/project/freetype/freetype2/%{version}/freetype-%{version}.tar.xz
Source1: https://downloads.sourceforge.net/project/freetype/freetype-demos/%{version}/ft2demos-%{version}.tar.xz
Source10: https://downloads.sourceforge.net/project/freetype/freetype2/%{version}/freetype-%{version}.tar.xz.sig
Source11: https://downloads.sourceforge.net/project/freetype/freetype-demos/%{version}/ft2demos-%{version}.tar.xz.sig
Source12: freetype2.keyring
Source1000: bnc628213_test.otf
Source1004: bnc629447_sigsegv31.ttf
Source1013: bnc633938_badbdf.0
Source1015: bug-641580_CVE-2010-3311.cff
Source1016: bug-647375_tt2.ttf
# silence our clamav check
NoSource: 1000
# PATCH-FIX-UPSTREAM overflow.patch -- I: Statement is overflowing a buffer
Patch201: overflow.patch
# PATCH-FIX-OPENSUSE don-t-mark-libpng-as-required-library.patch -- it is private in .pc
Patch202: don-t-mark-libpng-as-required-library.patch
Patch308961: bugzilla-308961-cmex-workaround.patch
BuildRequires: cmake
BuildRequires: libpng-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(harfbuzz)
BuildRequires: pkgconfig(libbrotlidec)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(zlib)
Requires: ftbench = %{version}-%{release}
Requires: ftdiff = %{version}-%{release}
Requires: ftdump = %{version}
Requires: ftgamma = %{version}-%{release}
Requires: ftgrid = %{version}-%{release}
Requires: ftinspect = %{version}-%{release}
Requires: ftlint = %{version}-%{release}
Requires: ftmulti = %{version}-%{release}
Requires: ftstring = %{version}-%{release}
Requires: ftvalid = %{version}-%{release}
Requires: ftview = %{version}-%{release}
Conflicts: dtc < 1.4.0
%description
Freetype2 utilities and demo programs.
%package -n ftbench
Summary: Run FreeType benchmarks
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftbench
Run FreeType benchmarks
This tool is part of the FreeType project
%package -n ftdiff
Summary: Compare font hinting modes
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftdiff
Compare font hinting modes
This tool is part of the FreeType project
%package -n ftgamma
Summary: Screen gamma calibration helper
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftgamma
Screen gamma calibration helper
This tool is part of the FreeType project
%package -n ftgrid
Summary: Simple glyph grid viewer
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftgrid
Simple glyph grid viewer
This tool is part of the FreeType project
%package -n ftinspect
Summary: Shows how a font gets rendered by FreeType
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftinspect
Shows how a font gets rendered by FreeType, allowing
control over virtually all rendering parameters
This tool is part of the FreeType project
%package -n ftlint
Summary: Simple font tester
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftlint
Simple font tester
This tool is part of the FreeType project
%package -n ftmulti
Summary: Multiple masters font viewer
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftmulti
Multiple masters font viewer
This tool is part of the FreeType project
%package -n ftsdf
Summary: Signed Distance Fields viewer
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftsdf
Signed Distance Fields viewer
This tool is part of the FreeType project
%package -n ftstring
Summary: String viewer
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftstring
String viewer
This tool is part of the FreeType project
%package -n ftvalid
Summary: Layout table validator
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftvalid
Layout table validator
This tool is part of the FreeType project
%package -n ftview
Summary: Simple glyph viewer
Group: Productivity/Publishing/Other
Conflicts: %{name} < %{version}-%{release}
%description -n ftview
Simple glyph viewer
This tool is part of the FreeType project
%prep
%setup -q -n freetype-%{freetype_version} -b 1
%patch308961 -p 1
pushd ../ft2demos-%{version}
%patch201 -p1
popd
%patch202 -p1
%build
export CFLAGS="%{optflags} -std=gnu99 -D_GNU_SOURCE $(getconf LFS_CFLAGS)"
%configure \
--enable-static \
--without-bzip2
%make_build
pushd ..
ln -s freetype-%{freetype_version} freetype
cd ft2demos-%{version}
%make_build
cd src/ftinspect
%cmake
%cmake_build
popd
%install
mkdir -p %{buildroot}%{_bindir}
pushd ../ft2demos-%{version}/bin/.libs
# packaged in freetype2.spec
rm ftdump
install -m 755 ft* %{buildroot}%{_bindir}
cd ../../src/ftinspect
install -m 755 ../../src/ftinspect/build/ftinspect %{buildroot}%{_bindir}
popd
%check
%{buildroot}%{_bindir}/ftbench -c 1 %{SOURCE1000}
%{buildroot}%{_bindir}/ftbench -c 1 %{SOURCE1004} |& grep -v "couldn't load font resource" && echo "should fail"
%{buildroot}%{_bindir}/ftbench -c 1 %{SOURCE1013} |& grep -v "couldn't load font resource" && echo "should fail"
%{buildroot}%{_bindir}/ftbench -c 1 %{SOURCE1015} |& grep -v "couldn't load font resource" && echo "should fail"
%{buildroot}%{_bindir}/ftbench -c 1 %{SOURCE1016}
%files
%doc README
%files -n ftbench
%{_bindir}/ftbench
%files -n ftdiff
%{_bindir}/ftdiff
%files -n ftgamma
%{_bindir}/ftgamma
%files -n ftgrid
%{_bindir}/ftgrid
%files -n ftinspect
%{_bindir}/ftinspect
%files -n ftlint
%{_bindir}/ftlint
%files -n ftmulti
%{_bindir}/ftmulti
%files -n ftsdf
%{_bindir}/ftsdf
%files -n ftstring
%{_bindir}/ftstring
%files -n ftvalid
%{_bindir}/ftvalid
%files -n ftview
%{_bindir}/ftview
%changelog

18
overflow.patch Normal file
View File

@ -0,0 +1,18 @@
Index: ft2demos-2.10.0/src/ttdebug.c
===================================================================
--- ft2demos-2.10.0.orig/src/ttdebug.c
+++ ft2demos-2.10.0/src/ttdebug.c
@@ -2024,11 +2024,11 @@
FT_Library_Version( library, &major, &minor, &patch );
- offset = snprintf( version_string, 64,
+ offset = snprintf( version_string, sizeof(version_string),
"ttdebug (FreeType) %d.%d",
major, minor );
if ( patch )
- offset = snprintf( version_string + offset, (size_t)( 64 - offset ),
+ offset = snprintf( version_string + offset, (size_t)( sizeof(version_string) - offset ),
".%d",
patch );
}