Compare commits

..

6 commits

Author SHA1 Message Date
Marek Kasik
325f38f36e Avoid NULL reference
Resolves: #1544776
2018-02-16 11:47:04 +01:00
Marek Kasik
f002a31dad Adjust loop counter maximum for TrueType fonts
Resolves: #1456585
2017-06-01 14:09:35 +02:00
Marek Kasik
ff3dccc995 Accept ISO646.1991-IRV as a Unicode charmap
in PCF and BDF drivers

Resolves: #1451795
2017-05-24 13:09:20 +02:00
Marek Kasik
7265f7f784 Fix numbers of tracking bugs 2017-05-02 17:24:06 +02:00
Marek Kasik
d3647a0d5d Add safety guard (CVE-2017-8287)
Resolves: #1446075
2017-05-02 17:04:51 +02:00
Marek Kasik
08b417b2fc Better protect `flex' handling (CVE-2017-8105)
Resolves: #1446502
2017-05-02 15:13:32 +02:00
16 changed files with 462 additions and 426 deletions

75
.gitignore vendored
View file

@ -1,3 +1,72 @@
/freetype-*.tar.xz
/freetype-doc-*.tar.xz
/ft2demos-*.tar.xz
ft2demos-2.3.12.tar.bz2
freetype-doc-2.3.12.tar.bz2
freetype-2.3.12.tar.bz2
freetype-2.4.2.tar.bz2
freetype-doc-2.4.2.tar.bz2
ft2demos-2.4.2.tar.bz2
/freetype-2.4.3.tar.bz2
/freetype-doc-2.4.3.tar.bz2
/ft2demos-2.4.3.tar.bz2
/freetype-2.4.4.tar.bz2
/freetype-doc-2.4.4.tar.bz2
/ft2demos-2.4.4.tar.bz2
/freetype-2.4.5.tar.bz2
/freetype-doc-2.4.5.tar.bz2
/ft2demos-2.4.5.tar.bz2
/freetype-2.4.6.tar.bz2
/freetype-doc-2.4.6.tar.bz2
/ft2demos-2.4.6.tar.bz2
/freetype-2.4.7.tar.bz2
/freetype-doc-2.4.7.tar.bz2
/ft2demos-2.4.7.tar.bz2
/freetype-2.4.8.tar.bz2
/freetype-doc-2.4.8.tar.bz2
/ft2demos-2.4.8.tar.bz2
/freetype-2.4.9.tar.bz2
/freetype-doc-2.4.9.tar.bz2
/ft2demos-2.4.9.tar.bz2
/freetype-2.4.10.tar.bz2
/freetype-doc-2.4.10.tar.bz2
/ft2demos-2.4.10.tar.bz2
/freetype-2.4.11.tar.bz2
/freetype-doc-2.4.11.tar.bz2
/ft2demos-2.4.11.tar.bz2
/freetype-2.4.12.tar.bz2
/freetype-doc-2.4.12.tar.bz2
/ft2demos-2.4.12.tar.bz2
/freetype-2.5.0.tar.bz2
/freetype-doc-2.5.0.tar.bz2
/ft2demos-2.5.0.tar.bz2
/freetype-2.5.2.tar.bz2
/freetype-doc-2.5.2.tar.bz2
/ft2demos-2.5.2.tar.bz2
/freetype-2.5.3.tar.bz2
/freetype-doc-2.5.3.tar.bz2
/ft2demos-2.5.3.tar.bz2
/freetype-2.5.4.tar.bz2
/freetype-doc-2.5.4.tar.bz2
/ft2demos-2.5.4.tar.bz2
/freetype-2.5.5.tar.bz2
/freetype-doc-2.5.5.tar.bz2
/ft2demos-2.5.5.tar.bz2
/freetype-2.6.tar.bz2
/freetype-doc-2.6.tar.bz2
/ft2demos-2.6.tar.bz2
/freetype-2.6.1.tar.bz2
/freetype-doc-2.6.1.tar.bz2
/ft2demos-2.6.1.tar.bz2
/freetype-2.6.2.tar.bz2
/freetype-doc-2.6.2.tar.bz2
/ft2demos-2.6.2.tar.bz2
/freetype-2.6.3.tar.bz2
/freetype-doc-2.6.3.tar.bz2
/ft2demos-2.6.3.tar.bz2
/freetype-2.6.5.tar.bz2
/freetype-doc-2.6.5.tar.bz2
/ft2demos-2.6.5.tar.bz2
/freetype-2.7.tar.bz2
/freetype-doc-2.7.tar.bz2
/ft2demos-2.7.tar.bz2
/freetype-2.7.1.tar.bz2
/freetype-doc-2.7.1.tar.bz2
/ft2demos-2.7.1.tar.bz2

View file

@ -1,72 +0,0 @@
--- freetype-2.10.0/include/freetype/ftoutln.h
+++ freetype-2.10.0/include/freetype/ftoutln.h
@@ -165,6 +165,15 @@ FT_BEGIN_HEADER
FT_Int numContours,
FT_Outline *anoutline );
+ /*
+ * Kept downstream for ABI compatibility only.
+ * It just throws error now. Remove once soname has been bumped.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Outline_New_Internal( FT_Memory memory,
+ FT_UInt numPoints,
+ FT_Int numContours,
+ FT_Outline *anoutline );
/**************************************************************************
*
@@ -192,6 +201,13 @@ FT_BEGIN_HEADER
FT_Outline_Done( FT_Library library,
FT_Outline* outline );
+ /*
+ * Kept downstream for ABI compatibility only.
+ * It just throws error now. Remove once soname has been bumped.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Outline_Done_Internal( FT_Memory memory,
+ FT_Outline* outline );
/**************************************************************************
*
--- freetype-2.10.0/src/base/ftoutln.c
+++ freetype-2.10.0/src/base/ftoutln.c
@@ -291,6 +291,19 @@
/* documentation is in ftoutln.h */
+ /*
+ * Kept downstream for ABI compatibility only.
+ * It just throws error now. Remove once soname has been bumped.
+ */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Outline_New_Internal( FT_Memory memory,
+ FT_UInt numPoints,
+ FT_Int numContours,
+ FT_Outline *anoutline )
+ {
+ return FT_THROW( Unimplemented_Feature );
+ }
+
FT_EXPORT_DEF( FT_Error )
FT_Outline_New( FT_Library library,
FT_UInt numPoints,
@@ -423,6 +436,17 @@
/* documentation is in ftoutln.h */
+ /*
+ * Kept downstream for ABI compatibility only.
+ * It just throws error now. Remove once soname has been bumped.
+ */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Outline_Done_Internal( FT_Memory memory,
+ FT_Outline* outline )
+ {
+ return FT_THROW( Unimplemented_Feature );
+ }
+
FT_EXPORT_DEF( FT_Error )
FT_Outline_Done( FT_Library library,
FT_Outline* outline )

View file

@ -1,18 +1,18 @@
--- freetype-2.2.1/modules.cfg.orig 2006-07-07 21:01:09.000000000 -0400
+++ freetype-2.2.1/modules.cfg 2006-07-07 21:01:54.000000000 -0400
@@ -110,7 +110,7 @@
# TrueType GX/AAT table validation. Needs `ftgxval.c' below.
# TrueType GX/AAT table validation. Needs ftgxval.c below.
#
# No FT_CONFIG_OPTION_PIC support.
-# AUX_MODULES += gxvalid
+AUX_MODULES += gxvalid
# Support for streams compressed with gzip (files with suffix .gz).
#
@@ -124,7 +124,7 @@
# OpenType table validation. Needs `ftotval.c' below.
# OpenType table validation. Needs ftotval.c below.
#
# No FT_CONFIG_OPTION_PIC support.
-# AUX_MODULES += otvalid
+AUX_MODULES += otvalid

View file

@ -1,11 +1,11 @@
--- freetype-2.3.0/include/freetype/config/ftoption.h.spf 2007-01-18 14:27:34.000000000 -0500
+++ freetype-2.3.0/include/freetype/config/ftoption.h 2007-01-18 14:27:48.000000000 -0500
@@ -92,7 +92,7 @@
* When this macro is not defined, FreeType offers alternative LCD
* rendering technology that produces excellent output.
*/
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/**************************************************************************
/*************************************************************************/

View file

@ -0,0 +1,17 @@
--- ft2demos-2.5.2/Makefile
+++ ft2demos-2.5.2/Makefile
@@ -296,10 +296,10 @@ else
# The following programs are not compiled automatically; either comment
# out the affected line or use the program name as a Makefile target.
#
- # EXES += ftchkwd
- # EXES += ftmemchk
- # EXES += ftpatchk
- # EXES += fttimer
+ EXES += ftchkwd
+ EXES += ftmemchk
+ EXES += ftpatchk
+ EXES += fttimer
# EXES += testname
exes: $(EXES:%=$(BIN_DIR_2)/%$E)

View file

@ -0,0 +1,21 @@
--- freetype-2.5.3/builds/unix/freetype-config.in
+++ freetype-2.5.3/builds/unix/freetype-config.in
@@ -114,12 +114,15 @@ if test "$echo_exec_prefix" = "yes" ; th
echo ${SYSROOT}$exec_prefix
fi
+prefix_var=`pkg-config --variable prefix freetype2`
+lib_suffix=`echo ${libdir} | sed -e 's:'$prefix_var'::'`
+
if test "$exec_prefix_set" = "yes" ; then
- libdir=$exec_prefix/lib
+ libdir=${exec_prefix}${lib_suffix}
else
if test "$local_prefix" = "yes" ; then
- includedir=$prefix/include
- libdir=$prefix/lib
+ includedir=`echo ${includedir} | sed -e 's:'$prefix_var':'${prefix}':'`
+ libdir=${prefix}${lib_suffix}
fi
fi

View file

@ -1,11 +1,11 @@
--- freetype-2.8/builds/unix/freetype-config.in.orig 2017-03-30 12:20:23.000000001 +0200
+++ freetype-2.8/builds/unix/freetype-config.in 2017-05-16 13:25:39.223041128 +0200
@@ -205,7 +205,7 @@ if test "$echo_libs" = "yes" ; then
fi
--- freetype-2.6.5/builds/unix/freetype-config.in
+++ freetype-2.6.5/builds/unix/freetype-config.in
@@ -158,7 +154,7 @@ fi
if test "$echo_libtool" = "yes" ; then
- echo ${SYSROOT}$libdir/libfreetype.la
+ echo ""
convlib="libfreetype.la"
- echo ${SYSROOT}$libdir/$convlib
+ #echo ${SYSROOT}$libdir/$convlib
fi
# EOF

View file

@ -0,0 +1,39 @@
From 29c759284e305ec428703c9a5831d0b1fc3497ef Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Sat, 27 Jan 2018 14:43:43 +0100
Subject: [PATCH] * src/truetype/ttinterp.c (Ins_GETVARIATION): Avoid NULL
reference.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5736
---
src/truetype/ttinterp.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index d855aaaa9..551f14a2e 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -7456,8 +7456,16 @@
return;
}
- for ( i = 0; i < num_axes; i++ )
- args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+ if ( coords )
+ {
+ for ( i = 0; i < num_axes; i++ )
+ args[i] = coords[i] >> 2; /* convert 16.16 to 2.14 format */
+ }
+ else
+ {
+ for ( i = 0; i < num_axes; i++ )
+ args[i] = 0;
+ }
}
--
2.14.3

View file

@ -0,0 +1,48 @@
--- freetype-2.7.1/src/truetype/ttinterp.c
+++ freetype-2.7.1/src/truetype/ttinterp.c
@@ -7605,21 +7605,34 @@
exc->twilight.n_points = (FT_UShort)num_twilight_points;
}
- /* Set up loop detectors. We restrict the number of LOOPCALL loops */
- /* and the number of JMPR, JROT, and JROF calls with a negative */
- /* argument to values that depend on the size of the CVT table and */
- /* the number of points in the current glyph (if applicable). */
- /* */
- /* The idea is that in real-world bytecode you either iterate over */
- /* all CVT entries, or over all points (or contours) of a glyph, and */
- /* such iterations don't happen very often. */
+ /* Set up loop detectors. We restrict the number of LOOPCALL loops */
+ /* and the number of JMPR, JROT, and JROF calls with a negative */
+ /* argument to values that depend on various parameters like the */
+ /* size of the CVT table or the number of points in the current */
+ /* glyph (if applicable). */
+ /* */
+ /* The idea is that in real-world bytecode you either iterate over */
+ /* all CVT entries (in the `prep' table), or over all points (or */
+ /* contours, in the `glyf' table) of a glyph, and such iterations */
+ /* don't happen very often. */
exc->loopcall_counter = 0;
exc->neg_jump_counter = 0;
/* The maximum values are heuristic. */
- exc->loopcall_counter_max = FT_MAX( 100,
- 10 * ( exc->pts.n_points +
- exc->cvtSize ) );
+ if ( exc->pts.n_points )
+ exc->loopcall_counter_max = FT_MAX( 50,
+ 10 * exc->pts.n_points ) +
+ FT_MAX( 50,
+ exc->cvtSize / 10 );
+ else
+ exc->loopcall_counter_max = 300 + 8 * exc->cvtSize;
+
+ /* as a protection against an unreasonable number of CVT entries */
+ /* we assume at most 100 control values per glyph for the counter */
+ if ( exc->loopcall_counter_max >
+ 100 * (FT_ULong)exc->face->root.num_glyphs )
+ exc->loopcall_counter_max = 100 * (FT_ULong)exc->face->root.num_glyphs;
+
FT_TRACE5(( "TT_RunIns: Limiting total number of loops in LOOPCALL"
" to %d\n", exc->loopcall_counter_max ));

View file

@ -0,0 +1,58 @@
From 082f2faf5007812bac6a1f783c7dcc6f49d761fe Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Wed, 24 May 2017 07:40:46 +0200
Subject: [PATCH] [bdf, pcf] Support ISO646.1991-IRV character encoding (aka
ASCII).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Problem reported by Marek Kašík <mkasik@redhat.com>, cf.
https://bugzilla.redhat.com/show_bug.cgi?id=1451795
* src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdrivr.c
(PCF_Face_Init): Implement it.
---
ChangeLog | 11 +++++++++++
src/bdf/bdfdrivr.c | 6 +++++-
src/pcf/pcfdrivr.c | 6 +++++-
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index a2242be0..c0a5a5c5 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -545,7 +545,11 @@ THE SOFTWARE.
if ( !ft_strcmp( s, "10646" ) ||
( !ft_strcmp( s, "8859" ) &&
!ft_strcmp( face->charset_encoding, "1" ) ) )
- unicode_charmap = 1;
+ unicode_charmap = 1;
+ /* another name for ASCII */
+ else if ( !ft_strcmp( s, "646.1991" ) &&
+ !ft_strcmp( face->charset_encoding, "IRV" ) )
+ unicode_charmap = 1;
}
{
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index 9f4d36d1..50530941 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -387,7 +387,11 @@ THE SOFTWARE.
if ( !ft_strcmp( s, "10646" ) ||
( !ft_strcmp( s, "8859" ) &&
!ft_strcmp( face->charset_encoding, "1" ) ) )
- unicode_charmap = 1;
+ unicode_charmap = 1;
+ /* another name for ASCII */
+ else if ( !ft_strcmp( s, "646.1991" ) &&
+ !ft_strcmp( face->charset_encoding, "IRV" ) )
+ unicode_charmap = 1;
}
}
--
2.13.0

View file

@ -0,0 +1,47 @@
From f958c48ee431bef8d4d466b40c9cb2d4dbcb7791 Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Fri, 24 Mar 2017 09:15:10 +0100
Subject: [PATCH] [psaux] Better protect `flex' handling.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=935
* src/psaux/t1decode.c (t1_decoder_parse_charstrings)
<callothersubr>: Since there is not a single flex operator but a
series of subroutine calls, malformed fonts can call arbitrary other
operators after the start of a flex, possibly adding points. For
this reason we have to check the available number of points before
inserting a point.
---
ChangeLog | 15 +++++++++++++++
src/psaux/t1decode.c | 9 +++++++++
2 files changed, 24 insertions(+)
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index af7b465e..7dd45135 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -780,10 +780,19 @@
/* point without adding any point to the outline */
idx = decoder->num_flex_vectors++;
if ( idx > 0 && idx < 7 )
+ {
+ /* in malformed fonts it is possible to have other */
+ /* opcodes in the middle of a flex (which don't */
+ /* increase `num_flex_vectors'); we thus have to */
+ /* check whether we can add a point */
+ if ( FT_SET_ERROR( t1_builder_check_points( builder, 1 ) ) )
+ goto Syntax_Error;
+
t1_builder_add_point( builder,
x,
y,
(FT_Byte)( idx == 3 || idx == 6 ) );
+ }
}
break;
--
2.12.2

View file

@ -0,0 +1,36 @@
From 3774fc08b502c3e685afca098b6e8a195aded6a0 Mon Sep 17 00:00:00 2001
From: Werner Lemberg <wl@gnu.org>
Date: Sun, 26 Mar 2017 08:32:09 +0200
Subject: [PATCH] * src/psaux/psobjs.c (t1_builder_close_contour): Add safety
guard.
Reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
---
ChangeLog | 8 ++++++++
src/psaux/psobjs.c | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index d18e821a..0baf8368 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1718,6 +1718,14 @@
first = outline->n_contours <= 1
? 0 : outline->contours[outline->n_contours - 2] + 1;
+ /* in malformed fonts it can happen that a contour was started */
+ /* but no points were added */
+ if ( outline->n_contours && first == outline->n_points )
+ {
+ outline->n_contours--;
+ return;
+ }
+
/* We must not include the last point in the path if it */
/* is located on the first point. */
if ( outline->n_points > 1 )
--
2.12.2

View file

@ -1,65 +0,0 @@
--- freetype-2.9/builds/unix/freetype-config.in
+++ freetype-2.9/builds/unix/freetype-config.in
@@ -13,45 +13,25 @@ LC_ALL=C
export LC_ALL
-# if `pkg-config' is available, use values from `freetype2.pc'
-%PKG_CONFIG% --atleast-pkgconfig-version 0.24 >/dev/null 2>&1
-if test $? -eq 0 ; then
- # note that option `--variable' is not affected by the
- # PKG_CONFIG_SYSROOT_DIR environment variable
- if test "x$SYSROOT" != "x" ; then
- PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
- export PKG_CONFIG_SYSROOT_DIR
- fi
-
- prefix=`%PKG_CONFIG% --variable prefix freetype2`
- exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2`
-
- includedir=`%PKG_CONFIG% --variable includedir freetype2`
- libdir=`%PKG_CONFIG% --variable libdir freetype2`
-
- version=`%PKG_CONFIG% --modversion freetype2`
-
- cflags=`%PKG_CONFIG% --cflags freetype2`
- dynamic_libs=`%PKG_CONFIG% --libs freetype2`
- static_libs=`%PKG_CONFIG% --static --libs freetype2`
-else
- prefix="%prefix%"
- exec_prefix="%exec_prefix%"
-
- includedir="%includedir%"
- libdir="%libdir%"
-
- version=%ft_version%
-
- cflags="-I${SYSROOT}$includedir/freetype2"
- dynamic_libs="-lfreetype"
- static_libs="%LIBSSTATIC_CONFIG%"
- if test "${SYSROOT}$libdir" != "/usr/lib" &&
- test "${SYSROOT}$libdir" != "/usr/lib64" ; then
- libs_L="-L${SYSROOT}$libdir"
- fi
+# note that option `--variable' is not affected by the
+# PKG_CONFIG_SYSROOT_DIR environment variable
+if test "x$SYSROOT" != "x" ; then
+ PKG_CONFIG_SYSROOT_DIR="$SYSROOT"
+ export PKG_CONFIG_SYSROOT_DIR
fi
+prefix=`pkgconf --variable prefix freetype2`
+exec_prefix=`pkgconf --variable exec_prefix freetype2`
+
+includedir=`pkgconf --variable includedir freetype2`
+libdir=`pkgconf --variable libdir freetype2`
+
+version=`pkgconf --modversion freetype2`
+
+cflags=`pkgconf --cflags freetype2`
+dynamic_libs=`pkgconf --libs freetype2`
+static_libs=`pkgconf --static --libs freetype2`
+
orig_prefix=$prefix
orig_exec_prefix=$exec_prefix

18
freetype-multilib.patch Normal file
View file

@ -0,0 +1,18 @@
--- freetype-2.5.2/builds/unix/freetype-config.in
+++ freetype-2.5.2/builds/unix/freetype-config.in
@@ -12,11 +12,11 @@
LC_ALL=C
export LC_ALL
-prefix="%prefix%"
-exec_prefix="%exec_prefix%"
+prefix=`pkg-config --variable prefix freetype2`
+exec_prefix=`pkg-config --variable exec_prefix freetype2`
exec_prefix_set="no"
-includedir="%includedir%"
-libdir="%libdir%"
+includedir=`pkg-config --variable includedir freetype2`
+libdir=`pkg-config --variable libdir freetype2`
usage()
{

View file

@ -1,42 +1,60 @@
# Patented subpixel rendering disabled by default.
# Pass '--with subpixel_rendering' on rpmbuild command-line to enable.
%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
%{!?with_xfree86:%define with_xfree86 1}
%bcond_with bootstrap
Name: freetype
Version: 2.14.3
Release: 2%{?dist}
Summary: A free and portable font rendering engine
License: (FTL OR GPL-2.0-or-later) AND BSD-3-Clause AND MIT AND MIT-Modern-Variant AND LicenseRef-Fedora-Public-Domain AND Zlib
Name: freetype
Version: 2.7.1
Release: 10%{?dist}
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
Group: System Environment/Libraries
URL: http://www.freetype.org
Source: 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
Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2
Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
Source3: ftconfig.h
# Enable subpixel rendering (ClearType)
Patch0: freetype-2.3.0-enable-spr.patch
Patch21: freetype-2.3.0-enable-spr.patch
# Enable otvalid and gxvalid modules
Patch1: freetype-2.2.1-enable-valid.patch
Patch46: freetype-2.2.1-enable-valid.patch
# Enable additional demos
Patch47: freetype-2.5.2-more-demos.patch
Patch3: freetype-2.6.5-libtool.patch
# Fix multilib conflicts
Patch88: freetype-multilib.patch
Patch4: freetype-2.8-multilib.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1161963
Patch92: freetype-2.5.3-freetype-config-prefix.patch
Patch5: freetype-2.10.0-internal-outline.patch
Patch93: freetype-2.6.5-libtool.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1446500
Patch94: freetype-2.7.1-protect-flex-handling.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1446073
Patch95: freetype-2.7.1-safety-guard.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1451795
Patch96: freetype-2.7.1-pcf-encoding.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1456585
Patch97: freetype-2.7.1-loop-counter.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1544776
Patch98: freetype-2.7.1-getvariation.patch
BuildRequires: gcc
BuildRequires: libX11-devel
BuildRequires: libpng-devel
BuildRequires: zlib-devel
BuildRequires: bzip2-devel
BuildRequires: brotli-devel
BuildRequires: make
%if %{without bootstrap}
BuildRequires: harfbuzz-devel
%endif
Provides: %{name}-bytecode
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
Provides: %{name}-subpixel
Obsoletes: freetype-freeworld < 2.9.1-2
%endif
%description
The FreeType engine is a free and portable font rendering
@ -49,6 +67,7 @@ text-rendering library.
%package demos
Summary: A collection of FreeType demos
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description demos
@ -60,8 +79,8 @@ small utilities showing various capabilities of the FreeType library.
%package devel
Summary: FreeType development libraries and header files
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconf%{?_isa}
%description devel
The freetype-devel package includes the static libraries and header files
@ -74,12 +93,24 @@ FreeType.
%prep
%setup -q -b 1 -a 2
%patch 0 -p1 -b .enable-spr
%patch 1 -p1 -b .enable-valid
%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
%patch21 -p1 -b .enable-spr
%endif
%patch 3 -p1 -b .libtool
%patch 4 -p1 -b .multilib
%patch 5 -p1 -b .internal-outline
%patch46 -p1 -b .enable-valid
pushd ft2demos-%{version}
%patch47 -p1 -b .more-demos
popd
%patch88 -p1 -b .multilib
%patch92 -p1 -b .freetype-config-prefix
%patch93 -p1 -b .libtool
%patch94 -p1 -b .protect-flex-handling
%patch95 -p1 -b .safety-guard
%patch96 -p1 -b .pcf-encoding
%patch97 -p1 -b .loop-counter
%patch98 -p1 -b .getvariation
%build
@ -87,16 +118,10 @@ FreeType.
--with-zlib=yes \
--with-bzip2=yes \
--with-png=yes \
--enable-freetype-config \
%if %{without bootstrap}
--with-harfbuzz=yes \
%else
--with-harfbuzz=no \
%endif
--with-brotli=yes
--with-harfbuzz=no
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
make %{?_smp_mflags}
%if %{with_xfree86}
# Build demos
@ -105,37 +130,35 @@ make TOP_DIR=".."
popd
%endif
# Convert FTL.txt and example3.cpp to UTF-8
pushd docs
iconv -f latin1 -t utf-8 < FTL.TXT > FTL.TXT.tmp && \
touch -r FTL.TXT FTL.TXT.tmp && \
mv FTL.TXT.tmp FTL.TXT
iconv -f iso-8859-1 -t utf-8 < "tutorial/example3.cpp" > "tutorial/example3.cpp.utf8"
touch -r tutorial/example3.cpp tutorial/example3.cpp.utf8 && \
mv tutorial/example3.cpp.utf8 tutorial/example3.cpp
popd
%install
%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
%makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
{
for ftdemo in ftbench ftdump ftlint ftvalid ttdebug ; do
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 ftsdf ftstring ftview ; do
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
# man pages for freetype-demos
{
for ftdemo in ftbench ftdump ftlint ftvalid ttdebug ; do
builds/unix/libtool --mode=install install -m 644 ft2demos-%{version}/man/${ftdemo}.1 $RPM_BUILD_ROOT/%{_mandir}/man1
done
}
%if %{with_xfree86}
{
for ftdemo in ftdiff ftgamma ftgrid ftmulti ftsdf ftstring ftview ; do
builds/unix/libtool --mode=install install -m 644 ft2demos-%{version}/man/${ftdemo}.1 $RPM_BUILD_ROOT/%{_mandir}/man1
done
}
%endif
# fix multilib issues
%define wordsize %{__isa_bits}
@ -143,7 +166,7 @@ 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
# Don't package static .a or .la files
# Don't package static a or .la files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
@ -157,40 +180,34 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
exit 0
}
%ldconfig_scriptlets
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
%license docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
%{_libdir}/libfreetype.so.*
%doc README
%files demos
%{_bindir}/ftbench
%{_bindir}/ftchkwd
%{_bindir}/ftmemchk
%{_bindir}/ftpatchk
%{_bindir}/fttimer
%{_bindir}/ftdump
%{_bindir}/ftlint
%{_bindir}/ftmemchk
%{_bindir}/ftvalid
%{_bindir}/ttdebug
%{_mandir}/man1/ftbench.1.gz
%{_mandir}/man1/ftdump.1.gz
%{_mandir}/man1/ftlint.1.gz
%{_mandir}/man1/ftvalid.1.gz
%{_mandir}/man1/ttdebug.1.gz
%if %{with_xfree86}
%{_bindir}/ftdiff
%{_bindir}/ftgamma
%{_bindir}/ftgrid
%{_bindir}/ftmulti
%{_bindir}/ftsdf
%{_bindir}/ftstring
%{_bindir}/fttimer
%{_bindir}/ftview
%{_mandir}/man1/ftdiff.1.gz
%{_mandir}/man1/ftgamma.1.gz
%{_mandir}/man1/ftgrid.1.gz
%{_mandir}/man1/ftmulti.1.gz
%{_mandir}/man1/ftsdf.1.gz
%{_mandir}/man1/ftstring.1.gz
%{_mandir}/man1/ftview.1.gz
%endif
%doc ChangeLog README
@ -209,215 +226,18 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
%{_mandir}/man1/*
%changelog
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Mon Apr 13 2026 Marek Kasik <mkasik@redhat.com> - 2.14.3-1
- Update to 2.14.3
- Resolves: #2443653
* Thu Feb 19 2026 Alexei Podtelezhnikov <apodtele@gmail.com> - 2.14.1-3
- Various spec fixes:
- * Remove redundant UTF-8 conversions
- * Do not build outdated demos
- * Build ftsdf and ttdebug demos
- Resolves: #2440529
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Oct 15 2025 Marek Kasik <mkasik@redhat.com> - 2.14.1-1
- Update to 2.14.1
- Resolves: #2393704
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Oct 08 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 2.13.3-1
- Update to 2.13.3
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Feb 6 2024 Marek Kasik <mkasik@redhat.com> - 2.13.2-5
- Migrated to SPDX license
* Tue Jan 30 2024 Marek Kasik <mkasik@redhat.com> - 2.13.2-4
- Remove a patch which causes FTBFS
- Resolves: #2261113
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 16 2024 Marek Kasik <mkasik@redhat.com> - 2.13.2-1
- Update to 2.13.2
- Resolves: #2217137
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.13.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 27 2023 Marek Kasik <mkasik@redhat.com> - 2.13.1-1
- Update to 2.13.1
- Resolves: #2217137
* Sat Feb 25 2023 Marek Kasik <mkasik@redhat.com> - 2.13.0-1
- Update to 2.13.0
- Resolves: #2168496
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.12.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jul 8 2022 Marek Kasik <mkasik@redhat.com> - 2.12.1-2
- Clear correct flags for doc ownership
- Resolves: #2104570
* Mon May 2 2022 Marek Kasik <mkasik@redhat.com> - 2.12.1-1
- Update to 2.12.1
- Resolves: #2080714
* Mon Apr 25 2022 Marek Kasik <mkasik@redhat.com> - 2.12.0-1
- Update to 2.12.0
- Resolves: #2070686
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.11.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Dec 4 2021 Diego Herrera <dherrera@redhat.com> - 2.11.1-1
- Update to 2.11.1
* Thu Jul 22 2021 Marek Kasik <mkasik@redhat.com> - 2.11.0-1
- Update to 2.11.0
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Feb 5 2021 Akira TAGOH <tagoh@redhat.com> - 2.10.4-3
- Enable HarfBuzz support
- Add bootstrap without HarfBuzz
- Resolves: #1853937
- Resolves: #1906714
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Oct 23 2020 Marek Kasik <mkasik@redhat.com> - 2.10.4-1
- Update to 2.10.4
- Test bitmap size earlier for PNGs
- Fix memory leak in pngshim.c
- Enable man pages for demos
- Resolves: #1887084, #1890211
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 21 2020 Tom Stellard <tstellar@redhat.com> - 2.10.2-2
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Jul 15 2020 Marek Kasik <mkasik@redhat.com> - 2.10.2-1
- Update to 2.10.2
- Enable support for WOFF2 streams
- Resolves: #1725983
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Oct 12 2019 Michael Kuhn <suraia@fedoraproject.org> - 2.10.1-1
- Update to 2.10.1
- Revert FT_DebugHook_Func ABI/API changes
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.10.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jun 11 09:42:57 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.10.0-2
- Fix handling of undefined glyph [pcf]
* Tue May 28 2019 Marek Kasik <mkasik@redhat.com> - 2.10.0-1
- Update to 2.10.0
- Keep FT_Outline_New_Internal() and FT_Outline_Done_Internal()
- for ABI compatibility but make them just throw
- Unimplemented_Feature error.
- Remove them once soname has been bumped!
- Resolves: #1689117
* Mon Apr 8 2019 Marek Kasik <mkasik@redhat.com> - 2.9.1-8
- Remove freetype-2.9-ftsmooth.patch
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Oct 31 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-6
- Obsolete freetype-freeworld
- Resolves: #1644700
* Wed Oct 31 2018 Neal Gompa <ngompa13@gmail.com> - 2.9.1-5
- Correctly enable subpixel rendering for ClearType functionality
* Mon Oct 29 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-4
- Enable ClearType code thanks to Microsoft joining OIN
* Fri Oct 19 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-3
- Use 'pkgconf' directly for multilib reasons
- Resolves: #1639379
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri May 25 2018 Marek Kasik <mkasik@redhat.com> - 2.9.1-1
- Update to 2.9.1
- Modify/remove patches as needed
- Resolves: #1574125
* Tue Mar 20 2018 Marek Kasik <mkasik@redhat.com> - 2.9-1
- Update to 2.9
- Add/modify/remove patches as needed
- Resolves: #1492372
* Fri Feb 16 2018 Marek Kasik <mkasik@redhat.com> - 2.8-10
* Fri Feb 16 2018 Marek Kasik <mkasik@redhat.com> - 2.7.1-10
- Avoid NULL reference
- Resolves: #1544776
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.8-8
- Switch to %%ldconfig_scriptlets
* Mon Oct 9 2017 Marek Kasik <mkasik@redhat.com> - 2.8-7
- Require pkgconf so we can make freetype-config multilib compatible again
- Resolves: #1497443
* Thu Sep 21 2017 Marek Kasik <mkasik@redhat.com> - 2.8-6
- Fix loading of named instances (TrueType)
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Jun 1 2017 Marek Kasik <mkasik@redhat.com> - 2.8-3
* Thu Jun 1 2017 Marek Kasik <mkasik@redhat.com> - 2.7.1-9
- Adjust loop counter maximum for TrueType fonts
- Resolves: #1456585
* Wed May 24 2017 Marek Kasik <mkasik@redhat.com> - 2.8-2
* Wed May 24 2017 Marek Kasik <mkasik@redhat.com> - 2.7.1-8
- Accept ISO646.1991-IRV as a Unicode charmap in PCF and BDF drivers
- Resolves: #1451795
* Wed May 17 2017 Marek Kasik <mkasik@redhat.com> - 2.8-1
- Update to 2.8
- Modify/remove patches as needed
- Resolves: #1450581
* Tue May 2 2017 Marek Kasik <mkasik@redhat.com> - 2.7.1-7
- Fix numbers of tracking bugs

View file

@ -1,3 +1,3 @@
SHA512 (freetype-2.14.3.tar.xz) = 43de86ea70b4b47f6efaae67f3440f65a24ffac29dc6d11203a9764e4f1a749ce1ba7645acd23525220b3ba12ddad8687b962b9f1254e2c0a86070854e85d5a0
SHA512 (freetype-doc-2.14.3.tar.xz) = f5d9bdd5119d353533a17366bfbe6d847d079f908137b1353cb9b6ce2e9ae5998dcaf7c888eeceec22b162cdb14256c6e7fefd75057250321fbcd9fcafc068f4
SHA512 (ft2demos-2.14.3.tar.xz) = e59c1266010330a8cbfd25dec096a72ce7539b64f9c057de062a281261b3ad658240f58e75b53d7a880d7ad5e020206316a6e9e82b03dec2e4d999f3f56cb39a
SHA512 (freetype-2.7.1.tar.bz2) = df39e2ef55f9090a66fecb6b5e9a5d296a043ddfd919d0ce3d7ea5132aa388bfbbeeaa6d6df6513956134b987e1c3a5eac6975c0c9631213af77457a623b49da
SHA512 (freetype-doc-2.7.1.tar.bz2) = acccc0cdacf277abb967aee3a09850f10aafe7719d01fc179fc660e8f3d596203d9a0ae74785e5c7e7ad744032d2209a547607edc43c8fde9d136de00cd59ff6
SHA512 (ft2demos-2.7.1.tar.bz2) = d3c5d81f302629c50b82696db0a83f17e3940fe38ecfddf5c56f63ff3f136f248b0458fe75337823cc080852f48a7326f4e5599240042ba1cb8984e05edd9823