From 64d59e2ec14b57b9d53dbe6394cd9652a506ce2b Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 19 Oct 2018 11:38:28 +0200 Subject: [PATCH 1/5] Use 'pkgconf' directly for multilib reasons Resolves: #1639379 --- freetype-2.8-multilib.patch | 16 ++++++++-------- freetype.spec | 6 +++++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/freetype-2.8-multilib.patch b/freetype-2.8-multilib.patch index 706f583..3ffd146 100644 --- a/freetype-2.8-multilib.patch +++ b/freetype-2.8-multilib.patch @@ -48,17 +48,17 @@ + export PKG_CONFIG_SYSROOT_DIR fi -+prefix=`%PKG_CONFIG% --variable prefix freetype2` -+exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2` ++prefix=`pkgconf --variable prefix freetype2` ++exec_prefix=`pkgconf --variable exec_prefix freetype2` + -+includedir=`%PKG_CONFIG% --variable includedir freetype2` -+libdir=`%PKG_CONFIG% --variable libdir freetype2` ++includedir=`pkgconf --variable includedir freetype2` ++libdir=`pkgconf --variable libdir freetype2` + -+version=`%PKG_CONFIG% --modversion freetype2` ++version=`pkgconf --modversion freetype2` + -+cflags=`%PKG_CONFIG% --cflags freetype2` -+dynamic_libs=`%PKG_CONFIG% --libs freetype2` -+static_libs=`%PKG_CONFIG% --static --libs freetype2` ++cflags=`pkgconf --cflags freetype2` ++dynamic_libs=`pkgconf --libs freetype2` ++static_libs=`pkgconf --static --libs freetype2` + orig_prefix=$prefix orig_exec_prefix=$exec_prefix diff --git a/freetype.spec b/freetype.spec index 75d90e8..40e789f 100644 --- a/freetype.spec +++ b/freetype.spec @@ -7,7 +7,7 @@ Summary: A free and portable font rendering engine Name: freetype Version: 2.9.1 -Release: 2%{?dist} +Release: 3%{?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 @@ -203,6 +203,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %{_mandir}/man1/* %changelog +* Fri Oct 19 2018 Marek Kasik - 2.9.1-3 +- Use 'pkgconf' directly for multilib reasons +- Resolves: #1639379 + * Fri Jul 13 2018 Fedora Release Engineering - 2.9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 0073df7db8ac034e23d29003e846d6817a20aa44 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 29 Oct 2018 16:59:39 +0100 Subject: [PATCH 2/5] Enable ClearType code --- freetype-2.3.0-enable-spr.patch | 11 ----------- freetype.spec | 18 ++++-------------- 2 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 freetype-2.3.0-enable-spr.patch diff --git a/freetype-2.3.0-enable-spr.patch b/freetype-2.3.0-enable-spr.patch deleted file mode 100644 index d551000..0000000 --- a/freetype-2.3.0-enable-spr.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 @@ - /* rendering technology that produces excellent output without LCD */ - /* filtering. */ - /* */ --/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ -+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING - - - /*************************************************************************/ diff --git a/freetype.spec b/freetype.spec index 40e789f..0ef10f4 100644 --- a/freetype.spec +++ b/freetype.spec @@ -1,13 +1,9 @@ -# 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} Summary: A free and portable font rendering engine Name: freetype Version: 2.9.1 -Release: 3%{?dist} +Release: 4%{?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 @@ -16,8 +12,6 @@ Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{versi Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2 Source3: ftconfig.h -Patch0: freetype-2.3.0-enable-spr.patch - # Enable otvalid and gxvalid modules Patch1: freetype-2.2.1-enable-valid.patch # Enable additional demos @@ -36,9 +30,6 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel Provides: %{name}-bytecode -%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0} -Provides: %{name}-subpixel -%endif %description The FreeType engine is a free and portable font rendering @@ -78,10 +69,6 @@ FreeType. %prep %setup -q -b 1 -a 2 -%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0} -%patch0 -p1 -b .enable-spr -%endif - %patch1 -p1 -b .enable-valid pushd ft2demos-%{version} @@ -203,6 +190,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %{_mandir}/man1/* %changelog +* Mon Oct 29 2018 Marek Kasik - 2.9.1-4 +- Enable ClearType code thanks to Microsoft joining OIN + * Fri Oct 19 2018 Marek Kasik - 2.9.1-3 - Use 'pkgconf' directly for multilib reasons - Resolves: #1639379 From 3f1c63550795a1ce04006b0e8f2daae6ca0ec26a Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Tue, 30 Oct 2018 21:32:15 -0400 Subject: [PATCH 3/5] Correctly enable subpixel rendering for ClearType functionality This was accidentally fully disabled instead of enabled properly. Let's do this correctly this time. This partially reverts commit 681428774035c20e9e7ed0a513f7c81cccd4af4c. --- freetype-2.3.0-enable-spr.patch | 11 +++++++++++ freetype.spec | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 freetype-2.3.0-enable-spr.patch diff --git a/freetype-2.3.0-enable-spr.patch b/freetype-2.3.0-enable-spr.patch new file mode 100644 index 0000000..d551000 --- /dev/null +++ b/freetype-2.3.0-enable-spr.patch @@ -0,0 +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 @@ + /* rendering technology that produces excellent output without LCD */ + /* filtering. */ + /* */ +-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ ++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING + + + /*************************************************************************/ diff --git a/freetype.spec b/freetype.spec index 0ef10f4..73829a9 100644 --- a/freetype.spec +++ b/freetype.spec @@ -3,7 +3,7 @@ Summary: A free and portable font rendering engine Name: freetype Version: 2.9.1 -Release: 4%{?dist} +Release: 5%{?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 @@ -12,6 +12,8 @@ Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{versi 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 # Enable otvalid and gxvalid modules Patch1: freetype-2.2.1-enable-valid.patch # Enable additional demos @@ -30,6 +32,7 @@ BuildRequires: zlib-devel BuildRequires: bzip2-devel Provides: %{name}-bytecode +Provides: %{name}-subpixel %description The FreeType engine is a free and portable font rendering @@ -69,6 +72,7 @@ FreeType. %prep %setup -q -b 1 -a 2 +%patch0 -p1 -b .enable-spr %patch1 -p1 -b .enable-valid pushd ft2demos-%{version} @@ -190,6 +194,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %{_mandir}/man1/* %changelog +* Wed Oct 31 2018 Neal Gompa - 2.9.1-5 +- Correctly enable subpixel rendering for ClearType functionality + * Mon Oct 29 2018 Marek Kasik - 2.9.1-4 - Enable ClearType code thanks to Microsoft joining OIN From 0b5af7a1b3e4dd0b4df91858acd12598d9139a44 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Wed, 31 Oct 2018 16:51:29 +0100 Subject: [PATCH 4/5] Obsolete freetype-freeworld Resolves: #1644700 --- freetype.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/freetype.spec b/freetype.spec index 73829a9..b4fadf5 100644 --- a/freetype.spec +++ b/freetype.spec @@ -3,7 +3,7 @@ Summary: A free and portable font rendering engine Name: freetype Version: 2.9.1 -Release: 5%{?dist} +Release: 6%{?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 @@ -33,6 +33,7 @@ BuildRequires: bzip2-devel Provides: %{name}-bytecode Provides: %{name}-subpixel +Obsoletes: freetype-freeworld < 2.9.1-2 %description The FreeType engine is a free and portable font rendering @@ -194,6 +195,10 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %{_mandir}/man1/* %changelog +* Wed Oct 31 2018 Marek Kasik - 2.9.1-6 +- Obsolete freetype-freeworld +- Resolves: #1644700 + * Wed Oct 31 2018 Neal Gompa - 2.9.1-5 - Correctly enable subpixel rendering for ClearType functionality From d1eb8e3918ce75c9b1962ff97f16145c48788aed Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 8 Apr 2019 16:50:02 +0200 Subject: [PATCH 5/5] Remove freetype-2.9-ftsmooth.patch --- freetype-2.9-ftsmooth.patch | 101 ------------------------------------ freetype.spec | 8 +-- 2 files changed, 4 insertions(+), 105 deletions(-) delete mode 100644 freetype-2.9-ftsmooth.patch diff --git a/freetype-2.9-ftsmooth.patch b/freetype-2.9-ftsmooth.patch deleted file mode 100644 index 2735bd5..0000000 --- a/freetype-2.9-ftsmooth.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- a/src/smooth/ftsmooth.c -+++ b/src/smooth/ftsmooth.c -@@ -232,39 +232,13 @@ - FT_UInt i, j; - - unsigned int height = bitmap->rows; -- unsigned int width = bitmap->width; -+ unsigned int width = bitmap->width / 3; - int pitch = bitmap->pitch; - -- -- /* Render 3 separate monochrome bitmaps, shifting the outline */ -- /* by 1/3 pixel. */ -- width /= 3; -- -- bitmap->buffer += width; -- -- error = render->raster_render( render->raster, ¶ms ); -- if ( error ) -- goto Exit; -- -- FT_Outline_Translate( outline, -21, 0 ); -- x_shift -= 21; -- bitmap->buffer += width; -- - error = render->raster_render( render->raster, ¶ms ); - if ( error ) - goto Exit; - -- FT_Outline_Translate( outline, 42, 0 ); -- x_shift += 42; -- bitmap->buffer -= 2 * width; -- -- error = render->raster_render( render->raster, ¶ms ); -- if ( error ) -- goto Exit; -- -- /* XXX: Rearrange the bytes according to FT_PIXEL_MODE_LCD. */ -- /* XXX: It is more efficient to render every third byte above. */ -- - if ( FT_ALLOC( temp, (FT_ULong)pitch ) ) - goto Exit; - -@@ -272,11 +246,7 @@ - { - line = bitmap->buffer + i * (FT_ULong)pitch; - for ( j = 0; j < width; j++ ) -- { -- temp[3 * j ] = line[j]; -- temp[3 * j + 1] = line[j + width]; -- temp[3 * j + 2] = line[j + width + width]; -- } -+ temp[3 * j] = temp[3 * j + 1] = temp[3 * j + 2] = line[j]; - FT_MEM_COPY( line, temp, pitch ); - } - -@@ -284,35 +254,23 @@ - } - else if ( vmul ) /* lcd_v */ - { -- int pitch = bitmap->pitch; -- -+ FT_Byte* line; -+ FT_UInt i; -+ int original_pitch = bitmap->pitch; - -- /* Render 3 separate monochrome bitmaps, shifting the outline */ -- /* by 1/3 pixel. Triple the pitch to render on each third row. */ - bitmap->pitch *= 3; - bitmap->rows /= 3; - -- bitmap->buffer += pitch; -- -- error = render->raster_render( render->raster, ¶ms ); -- if ( error ) -- goto Exit; -- -- FT_Outline_Translate( outline, 0, 21 ); -- y_shift += 21; -- bitmap->buffer += pitch; -- - error = render->raster_render( render->raster, ¶ms ); - if ( error ) - goto Exit; - -- FT_Outline_Translate( outline, 0, -42 ); -- y_shift -= 42; -- bitmap->buffer -= 2 * pitch; -- -- error = render->raster_render( render->raster, ¶ms ); -- if ( error ) -- goto Exit; -+ for ( i = 0; i < bitmap->rows; i++ ) -+ { -+ line = bitmap->buffer + i * bitmap->pitch; -+ FT_MEM_COPY( line + original_pitch, line, bitmap->width ); -+ FT_MEM_COPY( line + 2 * original_pitch, line, bitmap->width ); -+ } - - bitmap->pitch /= 3; - bitmap->rows *= 3; diff --git a/freetype.spec b/freetype.spec index b4fadf5..0689a29 100644 --- a/freetype.spec +++ b/freetype.spec @@ -3,7 +3,7 @@ Summary: A free and portable font rendering engine Name: freetype Version: 2.9.1 -Release: 6%{?dist} +Release: 7%{?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,8 +23,6 @@ Patch3: freetype-2.6.5-libtool.patch Patch4: freetype-2.8-multilib.patch -Patch5: freetype-2.9-ftsmooth.patch - BuildRequires: gcc BuildRequires: libX11-devel BuildRequires: libpng-devel @@ -82,7 +80,6 @@ popd %patch3 -p1 -b .libtool %patch4 -p1 -b .multilib -%patch5 -p1 -b .ftsmooth %build @@ -195,6 +192,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la} %{_mandir}/man1/* %changelog +* Mon Apr 8 2019 Marek Kasik - 2.9.1-7 +- Remove freetype-2.9-ftsmooth.patch + * Wed Oct 31 2018 Marek Kasik - 2.9.1-6 - Obsolete freetype-freeworld - Resolves: #1644700