commit dc54264c014e9b7afecb715811273cbf502cd129
Author: Kevin Kofler <kevin.kofler(a)chello.at>
Date: Tue Nov 22 07:18:22 2016 +0100
Add freetype-2.7-valgrind.patch from Fedora freetype (rh#1395915)
* Tue Nov 22 2016 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.7-2
- Add freetype-2.7-valgrind.patch from Fedora freetype (rh#1395915)
freetype-2.7-valgrind.patch | 65 +++++++++++++++++++++++++++++++++++++++++++++
freetype-freeworld.spec | 9 ++++++-
2 files changed, 73 insertions(+), 1 deletion(-)
---
diff --git a/freetype-2.7-valgrind.patch b/freetype-2.7-valgrind.patch
new file mode 100644
index 0000000..e677f50
--- /dev/null
+++ b/freetype-2.7-valgrind.patch
@@ -0,0 +1,65 @@
+From 6ca54c643094800c1915dd856b9ea36276fe1e97 Mon Sep 17 00:00:00 2001
+From: Alexei Podtelezhnikov <apodtele(a)gmail.com>
+Date: Sun, 11 Sep 2016 16:00:52 -0400
+Subject: [PATCH] [smooth] Fix valgrind warning and reoptimize.
+
+The algorithm calls `gray_set_cell' at the start of each new contour
+or when the contours cross the cell boundaries. Double-checking for
+that is wasteful.
+
+* src/smooth/ftgrays.c (gray_set_cell): Remove check for a new cell.
+(gray_convert_glyph): Remove initialization introduced by 44b172e88.
+---
+ ChangeLog | 11 +++++++++++
+ src/smooth/ftgrays.c | 21 +++++++++------------
+ 2 files changed, 20 insertions(+), 12 deletions(-)
+
+diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
+index 59fafdb..8f85ec2 100644
+--- a/src/smooth/ftgrays.c
++++ b/src/smooth/ftgrays.c
+@@ -577,24 +577,21 @@ typedef ptrdiff_t FT_PtrDist;
+
+ /* All cells that are on the left of the clipping region go to the */
+ /* min_ex - 1 horizontal position. */
++
+ if ( ex > ras.max_ex )
+ ex = ras.max_ex;
+
+ if ( ex < ras.min_ex )
+ ex = ras.min_ex - 1;
+
+- /* are we moving to a different cell ? */
+- if ( ex != ras.ex || ey != ras.ey )
+- {
+- /* record the current one if it is valid */
+- if ( !ras.invalid )
+- gray_record_cell( RAS_VAR );
++ /* record the current one if it is valid */
++ if ( !ras.invalid )
++ gray_record_cell( RAS_VAR );
+
+- ras.area = 0;
+- ras.cover = 0;
+- ras.ex = ex;
+- ras.ey = ey;
+- }
++ ras.area = 0;
++ ras.cover = 0;
++ ras.ex = ex;
++ ras.ey = ey;
+
+ ras.invalid = ( ey >= ras.max_ey || ey < ras.min_ey ||
+ ex >= ras.max_ex );
+@@ -1820,7 +1817,7 @@ typedef ptrdiff_t FT_PtrDist;
+ ras.num_cells = 0;
+ ras.invalid = 1;
+ ras.min_ey = band[1];
+- ras.max_ey = ras.ey = band[0];
++ ras.max_ey = band[0];
+
+ error = gray_convert_glyph_inner( RAS_VAR );
+
+--
+2.9.3
+
diff --git a/freetype-freeworld.spec b/freetype-freeworld.spec
index 57632b6..036f98b 100644
--- a/freetype-freeworld.spec
+++ b/freetype-freeworld.spec
@@ -1,7 +1,7 @@
Summary: A free and portable font rendering engine
Name: freetype-freeworld
Version: 2.7
-Release: 1%{?dist}
+Release: 2%{?dist}
License: (FTL or GPLv2+) and BSD and MIT and Public Domain and zlib with acknowledgement
URL:
http://www.freetype.org
Source:
http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.ta...
@@ -11,6 +11,8 @@ Patch21: freetype-2.3.0-enable-spr.patch
# Enable otvalid and gxvalid modules
Patch46: freetype-2.2.1-enable-valid.patch
+Patch94: freetype-2.7-valgrind.patch
+
## Security fixes:
# none needed yet
@@ -42,6 +44,8 @@ It transparently overrides the system library using ld.so.conf.d.
%patch46 -p1 -b .enable-valid
+%patch94 -p1 -b .valgrind
+
%build
%configure --disable-static \
@@ -85,6 +89,9 @@ echo "%{_libdir}/%{name}" \
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%changelog
+* Tue Nov 22 2016 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.7-2
+- Add freetype-2.7-valgrind.patch from Fedora freetype (rh#1395915)
+
* Sun Nov 13 2016 Kevin Kofler <Kevin(a)tigcc.ticalc.org> 2.7-1
- Update to 2.7 (matches Fedora freetype, rh#1374305)
- Merge rebased freetype-2.2.1-enable-valid.patch from Fedora freetype