Update to 2.8

Resolves: #1450581
This commit is contained in:
Marek Kasik 2017-05-17 13:45:10 +02:00
parent 800ea290b9
commit ae70238808
6 changed files with 16 additions and 152 deletions

View File

@ -1,21 +0,0 @@
--- 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.6.5/builds/unix/freetype-config.in
+++ freetype-2.6.5/builds/unix/freetype-config.in
@@ -158,7 +154,7 @@ fi
--- 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
if test "$echo_libtool" = "yes" ; then
convlib="libfreetype.la"
- echo ${SYSROOT}$libdir/$convlib
+ #echo ${SYSROOT}$libdir/$convlib
- echo ${SYSROOT}$libdir/libfreetype.la
+ echo ""
fi
# EOF

View File

@ -1,47 +0,0 @@
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

@ -1,36 +0,0 @@
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,18 +0,0 @@
--- 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

@ -6,8 +6,8 @@
Summary: A free and portable font rendering engine
Name: freetype
Version: 2.7.1
Release: 7%{?dist}
Version: 2.8
Release: 1%{?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
@ -23,20 +23,7 @@ Patch1: freetype-2.2.1-enable-valid.patch
# Enable additional demos
Patch2: freetype-2.5.2-more-demos.patch
# Fix multilib conflicts
Patch3: freetype-multilib.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1161963
Patch4: freetype-2.5.3-freetype-config-prefix.patch
Patch5: freetype-2.6.5-libtool.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1446500
Patch6: freetype-2.7.1-protect-flex-handling.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1446073
Patch7: freetype-2.7.1-safety-guard.patch
Patch3: freetype-2.6.5-libtool.patch
BuildRequires: libX11-devel
BuildRequires: libpng-devel
@ -95,11 +82,7 @@ pushd ft2demos-%{version}
%patch2 -p1 -b .more-demos
popd
%patch3 -p1 -b .multilib
%patch4 -p1 -b .freetype-config-prefix
%patch5 -p1 -b .libtool
%patch6 -p1 -b .protect-flex-handling
%patch7 -p1 -b .safety-guard
%patch3 -p1 -b .libtool
%build
@ -133,7 +116,7 @@ popd
%install
%makeinstall gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
%make_install gnulocaledir=$RPM_BUILD_ROOT%{_datadir}/locale
{
for ftdemo in ftbench ftchkwd ftmemchk ftpatchk fttimer ftdump ftlint ftmemchk ftvalid ; do
@ -187,7 +170,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
%{_bindir}/fttimer
%{_bindir}/ftdump
%{_bindir}/ftlint
%{_bindir}/ftmemchk
%{_bindir}/ftvalid
%if %{with_xfree86}
%{_bindir}/ftdiff
@ -195,7 +177,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
%{_bindir}/ftgrid
%{_bindir}/ftmulti
%{_bindir}/ftstring
%{_bindir}/fttimer
%{_bindir}/ftview
%endif
%doc ChangeLog README
@ -215,6 +196,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
%{_mandir}/man1/*
%changelog
* 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