diff --git a/baselibs.conf b/baselibs.conf index 7f73de3..496634e 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,3 +1,3 @@ -libfreetype6 +freetype2 freetype2-devel requires "zlib-devel-" diff --git a/bnc485889-overflow1.patch b/bnc485889-overflow1.patch new file mode 100644 index 0000000..09b5d6d --- /dev/null +++ b/bnc485889-overflow1.patch @@ -0,0 +1,59 @@ +From 0545ec1ca36b27cb928128870a83e5f668980bc5 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Fri, 20 Mar 2009 05:49:10 +0000 +Subject: Protect against invalid SID values in CFFs. + +Problem reported by Tavis Ormandy . + +* src/cff/cffload.c (cff_charset_load): Reject SID values larger +than 64999. +--- +diff --git a/src/cff/cffload.c b/src/cff/cffload.c +index 22163fb..24b899d 100644 +--- a/src/cff/cffload.c ++++ b/src/cff/cffload.c +@@ -842,7 +842,20 @@ + goto Exit; + + for ( j = 1; j < num_glyphs; j++ ) +- charset->sids[j] = FT_GET_USHORT(); ++ { ++ FT_UShort sid = FT_GET_USHORT(); ++ ++ ++ /* this constant is given in the CFF specification */ ++ if ( sid < 65000 ) ++ charset->sids[j] = sid; ++ else ++ { ++ FT_ERROR(( "cff_charset_load:" ++ " invalid SID value %d set to zero\n", sid )); ++ charset->sids[j] = 0; ++ } ++ } + + FT_FRAME_EXIT(); + } +@@ -875,6 +888,20 @@ + goto Exit; + } + ++ /* check whether the range contains at least one valid glyph; */ ++ /* the constant is given in the CFF specification */ ++ if ( glyph_sid >= 65000 ) { ++ FT_ERROR(( "cff_charset_load: invalid SID range\n" )); ++ error = CFF_Err_Invalid_File_Format; ++ goto Exit; ++ } ++ ++ /* try to rescue some of the SIDs if `nleft' is too large */ ++ if ( nleft > 65000 - 1 || glyph_sid >= 65000 - nleft ) { ++ FT_ERROR(( "cff_charset_load: invalid SID range trimmed\n" )); ++ nleft = 65000 - 1 - glyph_sid; ++ } ++ + /* Fill in the range of sids -- `nleft + 1' glyphs. */ + for ( i = 0; j < num_glyphs && i <= nleft; i++, j++, glyph_sid++ ) + charset->sids[j] = glyph_sid; +-- +cgit v0.8.2 diff --git a/bnc485889-overflow2.patch b/bnc485889-overflow2.patch new file mode 100644 index 0000000..9d499bc --- /dev/null +++ b/bnc485889-overflow2.patch @@ -0,0 +1,26 @@ +From 0a05ba257b6ddd87dacf8d54b626e4b360e0a596 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Fri, 20 Mar 2009 06:19:45 +0000 +Subject: Protect against malformed compressed data. + +Problem reported by Tavis Ormandy . + +* src/lsw/ftzopen.c (ft_lzwstate_io): Test whether `state->prefix' is +zero. +--- +diff --git a/src/lzw/ftzopen.c b/src/lzw/ftzopen.c +index fc78315..c0483de 100644 +--- a/src/lzw/ftzopen.c ++++ b/src/lzw/ftzopen.c +@@ -332,6 +332,9 @@ + + while ( code >= 256U ) + { ++ if ( !state->prefix ) ++ goto Eof; ++ + FTLZW_STACK_PUSH( state->suffix[code - 256] ); + code = state->prefix[code - 256]; + } +-- +cgit v0.8.2 diff --git a/bnc485889-overflow3.patch b/bnc485889-overflow3.patch new file mode 100644 index 0000000..6b0f858 --- /dev/null +++ b/bnc485889-overflow3.patch @@ -0,0 +1,39 @@ +From 79972af4f0485a11dcb19551356c45245749fc5b Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Fri, 20 Mar 2009 07:21:37 +0000 +Subject: Protect against too large glyphs. + +Problem reported by Tavis Ormandy . + +* src/smooth/ftsmooth.c (ft_smooth_render_generic): Don't allow +`width' or `pitch' to be larger than 0xFFFF. +--- +diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c +index a6db504..cacc490 100644 +--- a/src/smooth/ftsmooth.c ++++ b/src/smooth/ftsmooth.c +@@ -153,7 +153,7 @@ + slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP; + } + +- /* allocate new one, depends on pixel format */ ++ /* allocate new one */ + pitch = width; + if ( hmul ) + { +@@ -194,6 +194,13 @@ + + #endif + ++ if ( pitch > 0xFFFF || height > 0xFFFF ) ++ { ++ FT_ERROR(( "ft_smooth_render_generic: glyph too large: %d x %d\n", ++ width, height )); ++ return Smooth_Err_Raster_Overflow; ++ } ++ + bitmap->pixel_mode = FT_PIXEL_MODE_GRAY; + bitmap->num_grays = 256; + bitmap->width = width; +-- +cgit v0.8.2 diff --git a/bnc485889-overflow4.patch b/bnc485889-overflow4.patch new file mode 100644 index 0000000..fb5c939 --- /dev/null +++ b/bnc485889-overflow4.patch @@ -0,0 +1,63 @@ +From a18788b14db60ae3673f932249cd02d33a227c4e Mon Sep 17 00:00:00 2001 +From: Werner Lemberg +Date: Fri, 20 Mar 2009 07:03:58 +0000 +Subject: Fix validation for various cmap table formats. + +* src/sfnt/ttcmap.c (tt_cmap8_validate, tt_cmap10_validate, +tt_cmap12_validate): Check `length' correctly. +(tt_cmap_14_validate): Check `length' and `numMappings' correctly. +--- +diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c +index 6830391..1bd2ce7 100644 +--- a/src/sfnt/ttcmap.c ++++ b/src/sfnt/ttcmap.c +@@ -1635,7 +1635,7 @@ + FT_INVALID_TOO_SHORT; + + length = TT_NEXT_ULONG( p ); +- if ( table + length > valid->limit || length < 8208 ) ++ if ( length > (FT_UInt32)( valid->limit - table ) || length < 8192 + 16 ) + FT_INVALID_TOO_SHORT; + + is32 = table + 12; +@@ -1863,7 +1863,8 @@ + p = table + 16; + count = TT_NEXT_ULONG( p ); + +- if ( table + length > valid->limit || length < 20 + count * 2 ) ++ if ( length > (FT_ULong)( valid->limit - table ) || ++ length < 20 + count * 2 ) + FT_INVALID_TOO_SHORT; + + /* check glyph indices */ +@@ -2048,7 +2049,8 @@ + p = table + 12; + num_groups = TT_NEXT_ULONG( p ); + +- if ( table + length > valid->limit || length < 16 + 12 * num_groups ) ++ if ( length > (FT_ULong)( valid->limit - table ) || ++ length < 16 + 12 * num_groups ) + FT_INVALID_TOO_SHORT; + + /* check groups, they must be in increasing order */ +@@ -2429,7 +2431,8 @@ + FT_ULong num_selectors = TT_NEXT_ULONG( p ); + + +- if ( table + length > valid->limit || length < 10 + 11 * num_selectors ) ++ if ( length > (FT_ULong)( valid->limit - table ) || ++ length < 10 + 11 * num_selectors ) + FT_INVALID_TOO_SHORT; + + /* check selectors, they must be in increasing order */ +@@ -2491,7 +2494,7 @@ + FT_ULong i, lastUni = 0; + + +- if ( ndp + numMappings * 4 > valid->limit ) ++ if ( numMappings * 4 > (FT_ULong)( valid->limit - ndp ) ) + FT_INVALID_TOO_SHORT; + + for ( i = 0; i < numMappings; ++i ) +-- +cgit v0.8.2 diff --git a/bugzilla-159166-reduce-embolden-distance.patch b/bugzilla-159166-reduce-embolden-distance.patch new file mode 100644 index 0000000..b59f2ef --- /dev/null +++ b/bugzilla-159166-reduce-embolden-distance.patch @@ -0,0 +1,13 @@ +diff -ru freetype-2.2.1.orig/src/base/ftsynth.c freetype-2.2.1/src/base/ftsynth.c +--- freetype-2.2.1.orig/src/base/ftsynth.c 2006-02-25 07:12:35.000000000 +0100 ++++ freetype-2.2.1/src/base/ftsynth.c 2006-06-22 15:45:32.000000000 +0200 +@@ -108,7 +108,7 @@ + + /* some reasonable strength */ + xstr = FT_MulFix( face->units_per_EM, +- face->size->metrics.y_scale ) / 24; ++ face->size->metrics.y_scale ) / 35; + ystr = xstr; + + if ( slot->format == FT_GLYPH_FORMAT_OUTLINE ) + diff --git a/bugzilla-308961-cmex-workaround.patch b/bugzilla-308961-cmex-workaround.patch index 89c585c..a372d31 100644 --- a/bugzilla-308961-cmex-workaround.patch +++ b/bugzilla-308961-cmex-workaround.patch @@ -1,8 +1,8 @@ -Index: freetype-2.3.12/src/base/ftobjs.c +Index: freetype-2.3.5/src/base/ftobjs.c =================================================================== ---- freetype-2.3.12.orig/src/base/ftobjs.c 2010-01-23 13:44:16.000000000 +0100 -+++ freetype-2.3.12/src/base/ftobjs.c 2010-03-31 16:23:42.000000000 +0200 -@@ -2103,6 +2103,11 @@ +--- freetype-2.3.5.orig/src/base/ftobjs.c ++++ freetype-2.3.5/src/base/ftobjs.c +@@ -1820,6 +1820,11 @@ if ( FT_IS_SCALABLE( face ) ) { diff --git a/fix-build.patch b/fix-build.patch index 01b190b..78b49d1 100644 --- a/fix-build.patch +++ b/fix-build.patch @@ -1,8 +1,8 @@ -Index: freetype-2.3.12/autogen.sh +Index: freetype-2.3.9/autogen.sh =================================================================== ---- freetype-2.3.12.orig/autogen.sh 2010-02-13 07:54:14.000000000 +0100 -+++ freetype-2.3.12/autogen.sh 2010-03-31 16:23:42.000000000 +0200 -@@ -150,7 +150,7 @@ sed -e "s;@VERSION@;$freetype_major$free +--- freetype-2.3.9.orig/autogen.sh ++++ freetype-2.3.9/autogen.sh +@@ -149,7 +149,7 @@ sed -e "s;@VERSION@;$freetype_major$free < configure.raw > configure.ac run aclocal -I . --force @@ -11,11 +11,11 @@ Index: freetype-2.3.12/autogen.sh run autoconf --force chmod +x mkinstalldirs -Index: freetype-2.3.12/builds/unix/configure.raw +Index: freetype-2.3.9/builds/unix/configure.raw =================================================================== ---- freetype-2.3.12.orig/builds/unix/configure.raw 2010-02-13 07:55:07.000000000 +0100 -+++ freetype-2.3.12/builds/unix/configure.raw 2010-03-31 16:23:42.000000000 +0200 -@@ -650,7 +650,7 @@ AC_SUBST([FT2_EXTRA_LIBS]) +--- freetype-2.3.9.orig/builds/unix/configure.raw ++++ freetype-2.3.9/builds/unix/configure.raw +@@ -635,7 +635,7 @@ AC_SUBST([FT2_EXTRA_LIBS]) AC_SUBST([SYSTEM_ZLIB]) diff --git a/freetype-2.3.12.tar.bz2 b/freetype-2.3.12.tar.bz2 deleted file mode 100644 index cb44ec0..0000000 --- a/freetype-2.3.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3b96438f016a62b676c1d2089c00ca777f710d19f6aefa66ccf068d360db3e92 -size 1453034 diff --git a/freetype-2.3.9.tar.bz2 b/freetype-2.3.9.tar.bz2 new file mode 100644 index 0000000..0715d3e --- /dev/null +++ b/freetype-2.3.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51a033bce9904d73e0821e8e2bba24bd319619d7d1b2e9eeccac611580242ab6 +size 1363190 diff --git a/freetype-doc-2.3.12.tar.bz2 b/freetype-doc-2.3.12.tar.bz2 deleted file mode 100644 index b08bf9b..0000000 --- a/freetype-doc-2.3.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c52e4b9c90d67b45fe11a89934ddc2bde44bc8419986583fd1e10acbc21e662 -size 104320 diff --git a/freetype-doc-2.3.9.tar.bz2 b/freetype-doc-2.3.9.tar.bz2 new file mode 100644 index 0000000..d6bb0ba --- /dev/null +++ b/freetype-doc-2.3.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a06ba5e13c0087cddd1bf0aa7f3622e65389afe3f3beebcd6c76d42b01f8497 +size 102532 diff --git a/freetype2-bc.patch b/freetype2-bc.patch index bb5388e..ede9d94 100644 --- a/freetype2-bc.patch +++ b/freetype2-bc.patch @@ -1,8 +1,7 @@ -Index: freetype-2.3.12/include/freetype/config/ftoption.h -=================================================================== ---- freetype-2.3.12.orig/include/freetype/config/ftoption.h 2010-02-09 15:40:56.000000000 +0100 -+++ freetype-2.3.12/include/freetype/config/ftoption.h 2010-03-31 16:23:42.000000000 +0200 -@@ -497,7 +497,7 @@ FT_BEGIN_HEADER +diff -ru freetype-2.1.10.orig/include/freetype/config/ftoption.h freetype-2.1.10/include/freetype/config/ftoption.h +--- freetype-2.1.10.orig/include/freetype/config/ftoption.h 2005-06-06 17:37:53.000000000 +0200 ++++ freetype-2.1.10/include/freetype/config/ftoption.h 2005-07-19 16:25:31.000000000 +0200 +@@ -436,7 +436,7 @@ /* Do not #undef this macro here, since the build system might */ /* define it for certain configurations only. */ /* */ @@ -11,3 +10,4 @@ Index: freetype-2.3.12/include/freetype/config/ftoption.h /*************************************************************************/ +freetype-2.1.10/include/freetype/configだけに発見: ftoption.h.~1~ diff --git a/freetype2-bitmap-foundry.patch b/freetype2-bitmap-foundry.patch index 1f80e76..32b08d9 100644 --- a/freetype2-bitmap-foundry.patch +++ b/freetype2-bitmap-foundry.patch @@ -1,8 +1,7 @@ -Index: freetype-2.3.12/src/pcf/pcfread.c -=================================================================== ---- freetype-2.3.12.orig/src/pcf/pcfread.c 2009-10-10 19:32:28.000000000 +0200 -+++ freetype-2.3.12/src/pcf/pcfread.c 2010-03-31 16:23:42.000000000 +0200 -@@ -1171,8 +1171,34 @@ THE SOFTWARE. +diff -ru freetype-2.3.4.orig/src/pcf/pcfread.c freetype-2.3.4/src/pcf/pcfread.c +--- freetype-2.3.4.orig/src/pcf/pcfread.c 2007-04-10 15:45:54.000000000 +0200 ++++ freetype-2.3.4/src/pcf/pcfread.c 2007-04-10 16:24:58.000000000 +0200 +@@ -1164,8 +1164,34 @@ prop = pcf_find_property( face, "FAMILY_NAME" ); if ( prop && prop->isString ) { diff --git a/freetype2.changes b/freetype2.changes index f247ca2..cdf65f6 100644 --- a/freetype2.changes +++ b/freetype2.changes @@ -1,14 +1,3 @@ -------------------------------------------------------------------- -Wed Mar 31 14:45:27 UTC 2010 - coolo@novell.com - -- update to version 2.3.12: - brings considerable improvements for b/w rasterizing of hinted - TrueType fonts at small sizes, see NEWS for more details -- fixed build without sysvinit in the build system -- disable no longer compiling patch that should be upstream or dead -- split out shared library policy package -- remove old patches - ------------------------------------------------------------------- Mon Dec 14 20:12:43 CET 2009 - jengelh@medozas.de @@ -32,9 +21,9 @@ Sun Aug 2 20:06:24 UTC 2009 - jansimon.moeller@opensuse.org ------------------------------------------------------------------- Mon Jul 27 15:01:04 CEST 2009 - tiwai@suse.de -- updated to version 2.3.8: +- updated to version 2.3.9: * see URLs below - http://www.freetype.org/index2.html#release-freetype-2.3.8 + http://www.freetype.org/index2.html#release-freetype-2.3.9 http://sourceforge.net/project/shownotes.php?group_id=3157&release_id=653641 - updated to version 2.3.9: * see URLs below diff --git a/freetype2.spec b/freetype2.spec index c47ee40..ee5bea7 100644 --- a/freetype2.spec +++ b/freetype2.spec @@ -28,7 +28,7 @@ AutoReqProv: on Obsoletes: freetype2-64bit %endif # -Version: 2.3.12 +Version: 2.3.9 Release: 3 Url: http://www.freetype.org Summary: A TrueType Font Library @@ -43,25 +43,29 @@ Source2: freetype-doc-reference.tar.bz2 Source3: baselibs.conf Patch3: freetype2-bitmap-foundry.patch Patch4: ft2-stream-compat.diff +Patch5: revert-fix-bytecode.patch +Patch8: bugzilla-159166-reduce-embolden-distance.patch Patch9: fix-build.patch Patch308961: bugzilla-308961-cmex-workaround.patch +Patch11: bnc485889-overflow1.patch +Patch12: bnc485889-overflow2.patch +Patch13: bnc485889-overflow3.patch +Patch14: bnc485889-overflow4.patch Patch100: freetype2-bc.patch Patch200: freetype2-subpixel.patch -Patch201: use_unix.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This library features TrueType fonts for open source projects. This version also contains an autohinter for producing improved output. -%package -n libfreetype6 -License: Freetype License (BSD-like). See http://freetype.sourceforge.net/FTL.TXT -Summary: A TrueType Font Library -Group: System/Libraries -%description -n libfreetype6 -This library features TrueType fonts for open source projects. This -version also contains an autohinter for producing improved output. + +Authors: +-------- + David Turner + Robert Wilhelm + Werner Lemberg %package devel License: GPLv2+ ; Freetype License (BSD-like). See http://freetype.sourceforge.net/FTL.TXT @@ -81,6 +85,14 @@ TrueType font library. It also contains a small tutorial for using that library. + + +Authors: +-------- + David Turner + Robert Wilhelm + Werner Lemberg + %prep # The byte code interpreter is compiled in by default # because of the following option. @@ -93,29 +105,33 @@ It also contains a small tutorial for using that library. %define enable_bytecode_interpreter 1 %define enable_subpixel_rendering 0 %setup -q -n freetype-%{version} -a 1 -# Patch does still apply but no longer compiles and it's unclear -# to me who still needs it - it used to work around qt3 bug afair -##%patch3 -p 1 -b .bitmap-foundry +%patch3 -p 1 -b .bitmap-foundry %patch4 -p 1 -b .ft2-stream-compat +#%patch5 -p 1 #%patch8 -p 1 %patch9 -p 1 %patch308961 -p 1 +%patch11 -p 1 +%patch12 -p 1 +%patch13 -p 1 +%patch14 -p 1 %if %{enable_bytecode_interpreter} %patch100 -p 1 -b .bytecode %endif %if %{enable_subpixel_rendering} %patch200 -p 1 -b .subpixel %endif -%patch201 -p1 pushd docs tar xf $RPM_SOURCE_DIR/freetype-doc-reference.tar.bz2 popd find . -name CVS -type d | xargs rm -rf find . -name ".cvsignore" | xargs rm -f cp /usr/share/automake*/config.{guess,sub} builds/unix -rm docs/reference/.gitignore %build +%if %suse_version > 1110 +sh ./autogen.sh +%endif export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing" %ifarch arm export CFLAGS="$CFLAGS -std=gnu99" @@ -136,18 +152,15 @@ make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install %clean -%post -n libfreetype6 -p /sbin/ldconfig +%post -p /sbin/ldconfig -%postun -n libfreetype6 -p /sbin/ldconfig - -%files -n libfreetype6 -%defattr(-,root,root) -%{_libdir}/libfreetype.so.* +%postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc ChangeLog README %doc docs/* +%{_libdir}/libfreetype.so.* %files devel %defattr(-,root,root) diff --git a/ft2-stream-compat.diff b/ft2-stream-compat.diff index 4fe34b0..cb3463a 100644 --- a/ft2-stream-compat.diff +++ b/ft2-stream-compat.diff @@ -1,7 +1,7 @@ -Index: freetype-2.3.12/src/base/ftstream.c +Index: freetype-2.3.9/src/base/ftstream.c =================================================================== ---- freetype-2.3.12.orig/src/base/ftstream.c 2009-08-03 19:51:40.000000000 +0200 -+++ freetype-2.3.12/src/base/ftstream.c 2010-03-31 16:23:42.000000000 +0200 +--- freetype-2.3.9.orig/src/base/ftstream.c ++++ freetype-2.3.9/src/base/ftstream.c @@ -44,6 +44,17 @@ stream->close = 0; } @@ -20,7 +20,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( void ) FT_Stream_Close( FT_Stream stream ) -@@ -87,6 +98,8 @@ +@@ -84,6 +95,8 @@ return error; } @@ -29,7 +29,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Error ) FT_Stream_Skip( FT_Stream stream, -@@ -98,6 +111,8 @@ +@@ -95,6 +108,8 @@ return FT_Stream_Seek( stream, (FT_ULong)( stream->pos + distance ) ); } @@ -38,7 +38,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_Pos( FT_Stream stream ) -@@ -114,6 +129,8 @@ +@@ -111,6 +126,8 @@ return FT_Stream_ReadAt( stream, stream->pos, buffer, count ); } @@ -47,7 +47,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Error ) FT_Stream_ReadAt( FT_Stream stream, -@@ -188,6 +205,8 @@ +@@ -184,6 +201,8 @@ return read_bytes; } @@ -56,7 +56,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Error ) FT_Stream_ExtractFrame( FT_Stream stream, -@@ -210,7 +229,9 @@ +@@ -206,7 +225,9 @@ return error; } @@ -67,7 +67,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( void ) FT_Stream_ReleaseFrame( FT_Stream stream, FT_Byte** pbytes ) -@@ -229,6 +250,8 @@ +@@ -225,6 +246,8 @@ *pbytes = 0; } @@ -76,7 +76,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Error ) FT_Stream_EnterFrame( FT_Stream stream, -@@ -295,6 +318,8 @@ +@@ -291,6 +314,8 @@ return error; } @@ -85,7 +85,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( void ) FT_Stream_ExitFrame( FT_Stream stream ) -@@ -325,6 +350,8 @@ +@@ -321,6 +346,8 @@ stream->limit = 0; } @@ -94,7 +94,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Char ) FT_Stream_GetChar( FT_Stream stream ) -@@ -341,6 +368,8 @@ +@@ -337,6 +364,8 @@ return result; } @@ -103,7 +103,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Short ) FT_Stream_GetShort( FT_Stream stream ) -@@ -360,6 +389,8 @@ +@@ -356,6 +385,8 @@ return result; } @@ -112,7 +112,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Short ) FT_Stream_GetShortLE( FT_Stream stream ) -@@ -379,6 +410,8 @@ +@@ -375,6 +406,8 @@ return result; } @@ -121,7 +121,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_GetOffset( FT_Stream stream ) -@@ -397,6 +430,8 @@ +@@ -393,6 +426,8 @@ return result; } @@ -130,7 +130,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_GetLong( FT_Stream stream ) -@@ -415,6 +450,8 @@ +@@ -411,6 +446,8 @@ return result; } @@ -139,7 +139,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_GetLongLE( FT_Stream stream ) -@@ -433,6 +470,8 @@ +@@ -429,6 +466,8 @@ return result; } @@ -148,7 +148,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Char ) FT_Stream_ReadChar( FT_Stream stream, -@@ -470,6 +509,8 @@ +@@ -465,6 +504,8 @@ return 0; } @@ -157,7 +157,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Short ) FT_Stream_ReadShort( FT_Stream stream, -@@ -517,6 +558,9 @@ +@@ -512,6 +553,9 @@ return 0; } @@ -167,7 +167,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Short ) FT_Stream_ReadShortLE( FT_Stream stream, -@@ -564,6 +608,8 @@ +@@ -559,6 +603,8 @@ return 0; } @@ -176,7 +176,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_ReadOffset( FT_Stream stream, -@@ -611,6 +657,8 @@ +@@ -606,6 +652,8 @@ return 0; } @@ -185,7 +185,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_ReadLong( FT_Stream stream, -@@ -658,6 +706,8 @@ +@@ -652,6 +700,8 @@ return 0; } @@ -194,7 +194,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Long ) FT_Stream_ReadLongLE( FT_Stream stream, -@@ -705,6 +755,9 @@ +@@ -699,6 +749,9 @@ return 0; } @@ -204,7 +204,7 @@ Index: freetype-2.3.12/src/base/ftstream.c FT_BASE_DEF( FT_Error ) FT_Stream_ReadFields( FT_Stream stream, -@@ -848,5 +901,6 @@ +@@ -842,5 +895,6 @@ return error; } diff --git a/ft2demos-2.3.12.tar.bz2 b/ft2demos-2.3.12.tar.bz2 deleted file mode 100644 index f23d3d4..0000000 --- a/ft2demos-2.3.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6d588a7ac75823e1e832dfeec65d29d88ec9188db5b45eb1868439a4432b48c -size 159690 diff --git a/ft2demos-2.3.9.tar.bz2 b/ft2demos-2.3.9.tar.bz2 new file mode 100644 index 0000000..7851a31 --- /dev/null +++ b/ft2demos-2.3.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c82dcbdb6581c1b5ab01c166fde238d86c55e457c0bd533f2166b7038639b734 +size 159111 diff --git a/ft2demos.changes b/ft2demos.changes index 92b9151..fefe2e6 100644 --- a/ft2demos.changes +++ b/ft2demos.changes @@ -1,10 +1,3 @@ -------------------------------------------------------------------- -Wed Mar 31 15:08:24 UTC 2010 - coolo@novell.com - -- update to version 2.3.12: - brings considerable improvements for b/w rasterizing of hinted - TrueType fonts at small sizes, see NEWS for more details - ------------------------------------------------------------------- Mon Jul 27 15:05:32 CEST 2009 - tiwai@suse.de diff --git a/ft2demos.spec b/ft2demos.spec index 3962637..91d1182 100644 --- a/ft2demos.spec +++ b/ft2demos.spec @@ -23,8 +23,10 @@ BuildRequires: xorg-x11-devel License: GPLv2+ Group: Productivity/Publishing/Other AutoReqProv: on +%if %suse_version > 1000 Supplements: fonts-config -Version: 2.3.12 +%endif +Version: 2.3.9 Release: 3 %define freetype_version %{version} Url: http://www.freetype.org @@ -39,19 +41,33 @@ Source0: http://savannah.nongnu.org/download/freetype/freetype-%{version} Source1: http://savannah.nongnu.org/download/freetype/ft2demos-%{version}.tar.bz2 # pregenerated to avoid build-dependence on python: Source2: freetype-doc-reference.tar.bz2 +Patch3: freetype2-bitmap-foundry.patch Patch4: ft2-stream-compat.diff +Patch5: revert-fix-bytecode.patch +Patch8: bugzilla-159166-reduce-embolden-distance.patch Patch9: fix-build.patch Patch308961: bugzilla-308961-cmex-workaround.patch +Patch11: bnc485889-overflow1.patch +Patch12: bnc485889-overflow2.patch +Patch13: bnc485889-overflow3.patch +Patch14: bnc485889-overflow4.patch Patch50: ft2demos-build-testname.patch Patch100: freetype2-bc.patch Patch101: ft2demos-bc.patch Patch200: freetype2-subpixel.patch -Patch201: use_unix.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Freetype2 utilities and demo programs. + + +Authors: +-------- + David Turner + Robert Wilhelm + Werner Lemberg + %prep # The byte code interpreter is compiled in by default # because of the following option. @@ -64,11 +80,16 @@ Freetype2 utilities and demo programs. %define enable_bytecode_interpreter 1 %define enable_subpixel_rendering 0%{?opensuse_bs} %setup -n freetype-%{freetype_version} -b 1 +%patch3 -p 1 -b .bitmap-foundry %patch4 -p 1 -b .ft2-stream-compat #%patch5 -p 1 #%patch8 -p 1 %patch9 -p 1 %patch308961 -p 1 +%patch11 -p 1 +%patch12 -p 1 +%patch13 -p 1 +%patch14 -p 1 pushd ../ft2demos-%{version} %patch50 -p 1 popd @@ -81,7 +102,6 @@ popd %if %{enable_subpixel_rendering} %patch200 -p 1 -b .subpixel %endif -%patch201 -p1 pushd docs tar xf $RPM_SOURCE_DIR/freetype-doc-reference.tar.bz2 popd @@ -90,6 +110,9 @@ find . -name ".cvsignore" | xargs rm -f cp /usr/share/automake*/config.{guess,sub} builds/unix %build +%if %suse_version > 1110 +sh ./autogen.sh +%endif export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing " ln -s /usr/bin/libtool ./builds/unix/libtool make setup CFG="--prefix=/usr --libdir=%{_libdir} --with-zlib" @@ -111,7 +134,7 @@ popd #make prefix=$RPM_BUILD_ROOT/usr libdir=$RPM_BUILD_ROOT/%{_libdir} install mkdir -p $RPM_BUILD_ROOT%{_bindir} pushd ../ft2demos-%{version}/bin/.libs - install -m 755 ft* $RPM_BUILD_ROOT%{_bindir} + install -m 755 ft* testname $RPM_BUILD_ROOT%{_bindir} popd %clean @@ -119,5 +142,6 @@ popd %files %defattr(-,root,root) %{_bindir}/ft* +%{_bindir}/testname %changelog diff --git a/revert-fix-bytecode.patch b/revert-fix-bytecode.patch new file mode 100644 index 0000000..da26185 --- /dev/null +++ b/revert-fix-bytecode.patch @@ -0,0 +1,12 @@ +diff -ru freetype-2.2.1.20061013.orig/src/truetype/ttinterp.c freetype-2.2.1.20061013/src/truetype/ttinterp.c +--- freetype-2.2.1.20061013.orig/src/truetype/ttinterp.c 2006-08-26 00:45:13.000000000 +0200 ++++ freetype-2.2.1.20061013/src/truetype/ttinterp.c 2006-10-20 12:10:46.000000000 +0200 +@@ -18,7 +18,7 @@ + + /* define FIX_BYTECODE to implement the bytecode interpreter fixes */ + /* needed to match Windows behaviour more accurately */ +-#define FIX_BYTECODE ++/* #define FIX_BYTECODE */ + + + #include diff --git a/use_unix.diff b/use_unix.diff deleted file mode 100644 index e3debf5..0000000 --- a/use_unix.diff +++ /dev/null @@ -1,26 +0,0 @@ -Index: freetype-2.3.12/builds/toplevel.mk -=================================================================== ---- freetype-2.3.12.orig/builds/toplevel.mk 2010-03-31 16:24:31.000000000 +0200 -+++ freetype-2.3.12/builds/toplevel.mk 2010-03-31 16:31:02.000000000 +0200 -@@ -120,7 +120,7 @@ ifdef check_platform - # - # Note: This test is duplicated in `builds/unix/detect.mk'. - # -- is_unix := $(strip $(wildcard /sbin/init) \ -+ is_unix := $(strip $(wildcard /bin/ls) \ - $(wildcard /usr/sbin/init) \ - $(wildcard /hurd/auth)) - ifneq ($(is_unix),) -Index: freetype-2.3.12/builds/unix/detect.mk -=================================================================== ---- freetype-2.3.12.orig/builds/unix/detect.mk 2009-03-14 14:45:26.000000000 +0100 -+++ freetype-2.3.12/builds/unix/detect.mk 2010-03-31 16:31:16.000000000 +0200 -@@ -18,7 +18,7 @@ ifeq ($(PLATFORM),ansi) - - # Note: this test is duplicated in "builds/toplevel.mk". - # -- is_unix := $(strip $(wildcard /sbin/init) \ -+ is_unix := $(strip $(wildcard /bin/ls) \ - $(wildcard /usr/sbin/init) \ - $(wildcard /hurd/auth)) - ifneq ($(is_unix),)