diff --git a/.gitignore b/.gitignore index 6c0a922..181c2df 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ freetype-doc-2.3.11.tar.gz /freetype-2.7.tar.bz2 /freetype-2.7.1.tar.bz2 /freetype-2.8.tar.bz2 +/freetype-2.9.1.tar.bz2 diff --git a/freetype-2.2.1-enable-valid.patch b/freetype-2.2.1-enable-valid.patch index 21d80da..d924705 100644 --- a/freetype-2.2.1-enable-valid.patch +++ b/freetype-2.2.1-enable-valid.patch @@ -1,7 +1,7 @@ --- 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 @@ -10,7 +10,7 @@ # 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 diff --git a/freetype-2.3.0-enable-spr.patch b/freetype-2.3.0-enable-spr.patch index 8432e28..d551000 100644 --- a/freetype-2.3.0-enable-spr.patch +++ b/freetype-2.3.0-enable-spr.patch @@ -1,8 +1,8 @@ --- 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 @@ - /* This is done to allow FreeType clients to run unmodified, forcing */ - /* them to display normal gray-level anti-aliased glyphs. */ + /* 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-2.8-multilib.patch b/freetype-2.8-multilib.patch index 4f40a80..3ffd146 100644 --- a/freetype-2.8-multilib.patch +++ b/freetype-2.8-multilib.patch @@ -1,11 +1,11 @@ ---- freetype-2.8/builds/unix/freetype-config.in -+++ freetype-2.8/builds/unix/freetype-config.in +--- 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 --version >/dev/null 2>&1 +-%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 @@ -14,17 +14,17 @@ - export PKG_CONFIG_SYSROOT_DIR - fi - -- prefix=`pkg-config --variable prefix freetype2` -- exec_prefix=`pkg-config --variable exec_prefix freetype2` +- 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` +- includedir=`%PKG_CONFIG% --variable includedir freetype2` +- libdir=`%PKG_CONFIG% --variable libdir freetype2` - -- version=`pkg-config --modversion freetype2` +- version=`%PKG_CONFIG% --modversion freetype2` - -- cflags=`pkg-config --cflags freetype2` -- dynamic_libs=`pkg-config --libs freetype2` -- static_libs=`pkg-config --static --libs 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%" @@ -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-2.8-pcf-encoding.patch b/freetype-2.8-pcf-encoding.patch deleted file mode 100644 index fd1c706..0000000 --- a/freetype-2.8-pcf-encoding.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 082f2faf5007812bac6a1f783c7dcc6f49d761fe Mon Sep 17 00:00:00 2001 -From: Werner Lemberg -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 , 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 - diff --git a/freetype-2.9-ftsmooth.patch b/freetype-2.9-ftsmooth.patch new file mode 100644 index 0000000..2735bd5 --- /dev/null +++ b/freetype-2.9-ftsmooth.patch @@ -0,0 +1,101 @@ +--- 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/mingw-freetype.spec b/mingw-freetype.spec index 681bdfc..5757b48 100644 --- a/mingw-freetype.spec +++ b/mingw-freetype.spec @@ -1,30 +1,25 @@ %{?mingw_package_header} -# 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}} - Name: mingw-freetype -Version: 2.8 -Release: 3%{?dist} +Version: 2.9.1 +Release: 1%{?dist} Summary: Free and portable font rendering engine License: FTL or GPLv2+ URL: http://www.freetype.org Source0: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2 -# Patches from native Fedora package. +# Patches from native Fedora package: + +# 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 #Patch2: freetype-2.5.2-more-demos.patch Patch3: freetype-2.6.5-libtool.patch -Patch4: freetype-2.8-pcf-encoding.patch -Patch5: freetype-2.8-loop-counter.patch -Patch6: 0077-truetype-Fix-loading-of-named-instances.patch -Patch7: 0079-src-truetype-ttgxvar.c-TT_Get_MM_Var-Fix-thinko.patch -Patch8: freetype-2.8-multilib.patch +Patch4: freetype-2.8-multilib.patch +Patch5: freetype-2.9-ftsmooth.patch BuildArch: noarch @@ -81,10 +76,7 @@ Static version of the MinGW Windows Freetype library. %prep %setup -q -n freetype-%{version} -%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0} %patch0 -p1 -b .enable-spr -%endif - %patch1 -p1 -b .enable-valid #pushd ft2demos-%{version} @@ -92,15 +84,20 @@ Static version of the MinGW Windows Freetype library. #popd %patch3 -p1 -b .libtool -%patch4 -p1 -b .pcf-encoding -%patch5 -p1 -b .loop-counter -%patch6 -p1 -b .named-instances -%patch7 -p1 -b .named-instances2 -%patch8 -p1 -b .multilib +%patch4 -p1 -b .multilib +%patch5 -p1 -b .ftsmooth %build -%mingw_configure --enable-static --enable-shared +%mingw_configure \ + --enable-static \ + --enable-shared \ + --with-zlib=yes \ + --with-bzip2=yes \ + --with-png=yes \ + --enable-freetype-config \ + --with-harfbuzz=no + %mingw_make %{?_smp_mflags} # The ft2demos Makefile is hacky and doesn't understand @@ -147,6 +144,11 @@ rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} $RPM_BUILD_ROOT%{mingw64_mandir} %changelog +* Thu Nov 01 2018 Kalev Lember - 2.9.1-1 +- Update to 2.9.1 +- Sync patches with the native package +- Enable ClearType code thanks to Microsoft joining OIN + * Fri Jul 13 2018 Fedora Release Engineering - 2.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 5c7fbce..e007fdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (freetype-2.8.tar.bz2) = 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 +SHA512 (freetype-2.9.1.tar.bz2) = 856766e1f3f4c7dc8afb2b5ee991138c8b642c6a6e5e007cd2bc04ae58bde827f082557cf41bf541d97e8485f7fd064d10390d1ee597f19d1daed6c152e27708