add community patches

This commit is contained in:
shirely16 2021-04-14 09:19:14 +08:00
parent 5ca5346b6c
commit 7a44c32acc
7 changed files with 268 additions and 1 deletions

View File

@ -0,0 +1,86 @@
From 2e6bf149908d61c2b2121dad36f2caef260a2053 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: May 28 2019 12:56:55 +0000
Subject: 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
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/2e6bf149908d61c2b2121dad36f2caef260a2053
--- 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

@ -0,0 +1,21 @@
From ac07a003d7f75321346188eb9618d418d2b2decb Mon Sep 17 00:00:00 2001
From: Michael Kuhn <suraia@fedoraproject.org>
Date: Oct 17 2019 19:06:50 +0000
Subject: Revert FT_DebugHook_Func ABI/API changes
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/ac07a003d7f75321346188eb9618d418d2b2decb
diff --git a/include/freetype/ftmodapi.h b/include/freetype/ftmodapi.h
index 8d039c4f3..88488bfe8 100644
--- a/include/freetype/ftmodapi.h
+++ b/include/freetype/ftmodapi.h
@@ -623,7 +623,7 @@ FT_BEGIN_HEADER
* it is bytecode interpreter's execution context, `TT_ExecContext`,
* which is declared in FreeType's internal header file `tttypes.h`.
*/
- typedef FT_Error
+ typedef void
(*FT_DebugHook_Func)( void* arg );

View File

@ -0,0 +1,29 @@
From cbf2c99f7813750cb82deb367a37e50dbb709395 Mon Sep 17 00:00:00 2001
From: besfahbo <besfahbo@fedoraproject.org>
Date: Jul 08 2006 01:07:01 +0000
Subject: - Enable modules gxvalid and otvalid
Enable modules gxvalid and otvalid
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/cbf2c99f7813750cb82deb367a37e50dbb709395
--- 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.
#
-# 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.
#
-# AUX_MODULES += otvalid
+AUX_MODULES += otvalid
# Auxiliary PostScript driver component to share common code.
#

View File

@ -0,0 +1,19 @@
From c1c64f8cf9264592bca747c9463814a805150346 Mon Sep 17 00:00:00 2001
From: besfahbo <besfahbo@fedoraproject.org>
Date: Jan 18 2007 19:42:34 +0000
Subject: - Add without_subpixel_rendering.
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/c1c64f8cf9264592bca747c9463814a805150346
--- 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 @@
* macro is not defined, FreeType offers alternative LCD rendering
* technology that produces excellent output without LCD filtering.
*/
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
/**************************************************************************

View File

@ -0,0 +1,18 @@
From 928ba6125d73435fddd73f9bf155e0f2a813bab7 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Aug 22 2016 13:08:48 +0000
Subject: Don't show path of non-existing libtool file
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/928ba6125d73435fddd73f9bf155e0f2a813bab7
--- 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
- echo ${SYSROOT}$libdir/libfreetype.la
+ echo ""
fi
# EOF

View File

@ -0,0 +1,76 @@
From 1007098e54f9449281f83516f0272afa5d20ec29 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Oct 09 2017 11:57:11 +0000
Subject: Fix multilib conflict
Require pkgconf so we can make freetype-config multilib compatible again
Resolves: #1497443
Conflict:NA
Reference:https://src.fedoraproject.org/rpms/freetype/c/1007098e54f9449281f83516f0272afa5d20ec29?branch=rawhide
--- 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

View File

@ -4,7 +4,7 @@
Name: freetype
Version: 2.10.2
Release: 2
Release: 3
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
@ -15,6 +15,12 @@ Source3: ftconfig.h
Patch1: freetype-2.5.2-more-demos.patch
Patch2: CVE-2020-15999.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
BuildRequires: gcc libX11-devel libpng-devel zlib-devel bzip2-devel
@ -52,6 +58,12 @@ pushd ft2demos-%{version}
%patch1 -p1 -b .more-demos
popd
%patch2 -p1
%patch6000 -p1
%patch6001 -p1
%patch6002 -p1
%patch6003 -p1
%patch6004 -p1
%patch6005 -p1
%build
%configure --disable-static --with-zlib=yes --with-bzip2=yes --with-png=yes --enable-freetype-config --with-harfbuzz=no
@ -123,6 +135,12 @@ install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/co
%{_mandir}/man1/*
%changelog
* 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