Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > main-updates-src > by-pkgid > a6c468d5fa3408dbd88ed90cd40665e9 > files > 34

freetype2-2.3.12-1.9mdv2010.2.src.rpm

%define build_bytecode_interpreter 0
%define build_subpixel 0
%define build_plf 0
%{?_with_plf: %global build_plf 1}
%{?_with_bytecode_interpreter: %global build_bytecode_interpreter 1}
%{?_with_subpixel: %global build_subpixel 1}

%define name	freetype2
%define	version	2.3.12


%if %build_plf
%define distsuffix plf
%define build_subpixel 1
%define build_bytecode_interpreter 1
%endif

%define major	6
%define libname	%mklibname freetype %{major}
%define develname %mklibname -d freetype %{major}
%define staticdevelname %mklibname -d -s freetype %{major}

%define git_url git://git.sv.gnu.org/freetype/freetype2.git

Name:		%name
Summary:	A free and portable TrueType font rendering engine
Version:	%version
%define subrel 9
Release:	%mkrel 1
License:	FreeType License/GPL
URL:		http://www.freetype.org/
Source0:	http://savannah.nongnu.org/download/freetype/freetype-%{version}.tar.bz2
Source1:	http://savannah.nongnu.org/download/freetype/freetype-doc-%{version}.tar.bz2
Source2:	http://savannah.nongnu.org/download/freetype/ft2demos-%{version}.tar.bz2
Patch1000:	ft2demos-2.3.12-mathlib.diff
Patch0:		freetype-2.3.12-CVE-2010-2520.diff
Patch1:		freetype-2.3.12-CVE-2010-2497,2498,2499,2500,2519.diff
Patch2:		freetype-2.3.12-CVE-2010-1797.diff
Patch3:		freetype-2.3.11-CVE-2010-2805.diff
Patch4:		freetype-2.3.11-CVE-2010-2806.diff
Patch5:		freetype-2.3.11-CVE-2010-2807.diff
Patch6:		freetype-2.3.11-CVE-2010-2808.diff
Patch7:		freetype-2.3.11-CVE-2010-3053.diff
Patch8:		freetype-2.3.11-CVE-2010-3311.diff
Patch9:		freetype-2.3.12-CVE-2010-3814.diff
Patch10:	freetype-2.3.12-CVE-2010-3855.diff
Patch11:	freetype-2.3.12-CVE-2011-0226.diff
Patch12:	freetype-2.3.12-CVE-2011-3256.diff
Patch13:	freetype-2.4.5-lzw_stack_protection.diff
Patch14:	freetype-2.4.5-CVE-2011-3439.diff
Patch15:	freetype-2.3.11-CVE-2012-1126.patch
Patch16:	freetype-2.3.11-CVE-2012-1127.patch
Patch17:	freetype-2.3.11-CVE-2012-1130.patch
Patch18:	freetype-2.3.12-CVE-2012-1131.diff
Patch19:	freetype-2.3.11-CVE-2012-1132.patch
Patch20:	freetype-2.3.11-CVE-2012-1134.patch
Patch21:	freetype-2.3.12-CVE-2012-1136.diff
Patch22:	freetype-2.3.11-CVE-2012-1137.patch
Patch23:	freetype-2.3.11-CVE-2012-1139.patch
Patch24:	freetype-2.3.11-CVE-2012-1140.patch
Patch25:	freetype-2.3.11-CVE-2012-1141.patch
Patch26:	freetype-2.3.11-CVE-2012-1142.patch
Patch27:	freetype-2.3.11-CVE-2012-1143.patch
Patch28:	freetype-2.3.11-CVE-2012-1144.patch
Patch29:	freetype-2.3.11-bdf-overflow.patch
Patch30:	freetype-2.3.11-array-initialization.patch
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:	zlib-devel
BuildRequires:	pkgconfig
BuildRequires:	libx11-devel
Group:		System/Libraries

%description
The FreeType2 engine is a free and portable TrueType font rendering engine.
It has been developed to provide TT support to a great variety of
platforms and environments. Note that FreeType2 is a library, not a
stand-alone application, though some utility applications are included
%if %{build_plf}

This package is in PLF because this build has bytecode interpreter and
subpixel hinting enabled which are covered by software patents.
%endif

%package -n %{libname}
Summary:	Shared libraries for a free and portable TrueType font rendering engine
Group:		System/Libraries
Obsoletes:	%{name}
Provides:	%{name} = %{version}-%{release}

%description -n %{libname}
The FreeType2 engine is a free and portable TrueType font rendering
engine.  It has been developed to provide TT support to a great
variety of platforms and environments. Note that FreeType2 is a
library, not a stand-alone application, though some utility
applications are included
%if %{build_plf}

This package is in PLF because this build has bytecode interpreter and
subpixel hinting enabled which are covered by software patents.
%endif

%package -n %{develname}
Summary:	Header files and static library for development with FreeType2
Group:		Development/C
Requires:	%{libname} = %{version}
Requires:	zlib-devel
Obsoletes:	%{name}-devel
Provides:	%{name}-devel = %{version}-%{release}

%description -n %{develname}
This package is only needed if you intend to develop or compile applications
which rely on the FreeType2 library. If you simply want to run existing
applications, you won't need this package.

%package -n %{staticdevelname}
Summary:	Static libraries for programs which will use the FreeType2 library
Group:		Development/C
Requires:	%{libname}-devel = %{version}
Obsoletes:	%{name}-static-devel
Provides:	%{name}-static-devel = %{version}-%{release}

%description -n %{staticdevelname}
This package includes the static libraries necessary for 
developing programs which will use the FreeType2 library.

If you are going to develop programs which use the FreeType2 library
you should install freetype2-devel.  You'll also need to have the 
freetype2 package installed.

%package demos
Summary:	A collection of FreeType demos
Group:		File tools

%description demos
The FreeType engine is a free and portable font rendering engine, developed to
provide advanced font support for a variety of platforms and environments. The
demos package includes a set of useful small utilities showing various
capabilities of the FreeType library.

%prep

%setup -q -n freetype-%version -b1 -a2

pushd ft2demos-%{version}
%patch1000 -p0
popd

%patch0 -p0 -b .CVE-2010-2520
%patch1 -p1 -b .CVE-2010-2497,2498,2499,2500,2519
%patch2 -p0 -b .CVE-2010-1797
%patch3 -p1 -b .CVE-2010-2805
%patch4 -p1 -b .CVE-2010-2806
%patch5 -p1 -b .CVE-2010-2807
%patch6 -p1 -b .CVE-2010-2808
%patch7 -p1 -b .CVE-2010-3053
%patch8 -p0 -b .CVE-2010-3311
%patch9 -p0 -b .CVE-2010-3814
%patch10 -p0 -b .CVE-2010-3855
%patch11 -p0 -b .CVE-2011-0226
%patch12 -p1 -b .CVE-2011-3256
%patch13 -p0 -b .lzw_stack_protection
%patch14 -p0 -b .CVE-2011-3439
%patch15 -p1 -b .CVE-2012-1126
%patch16 -p1 -b .CVE-2012-1127
%patch17 -p1 -b .CVE-2012-1130
%patch18 -p1 -b .CVE-2012-1131
%patch19 -p1 -b .CVE-2012-1132
%patch20 -p1 -b .CVE-2012-1134
%patch21 -p1 -b .CVE-2012-1136
%patch22 -p1 -b .CVE-2012-1137
%patch23 -p1 -b .CVE-2012-1139
%patch24 -p1 -b .CVE-2012-1140
%patch25 -p1 -b .CVE-2012-1141
%patch26 -p1 -b .CVE-2012-1142
%patch27 -p1 -b .CVE-2012-1143
%patch28 -p1 -b .CVE-2012-1144
%patch29 -p1 -b .bdf-overflow
%patch30 -p1 -b .array-initialization


%if %{build_bytecode_interpreter}
perl -pi -e 's|/\* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER \*/|#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER|' include/freetype/config/ftoption.h
%endif
%if %{build_subpixel}
perl -pi -e 's|^/\* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING \*/| #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING|' include/freetype/config/ftoption.h
%endif


%build

GCC_VERSION=`gcc --version | grep "^gcc" | awk '{ print $3 }' | sed 's+\([0-9]\)\.\([0-9]\)\..*+\1\2+'`
if [ $GCC_VERSION -lt 34 ]; then
#old gcc is generating wrong code with optimizations
export CFLAGS="-O"
fi

# some apps crash on ppc without this
%ifarch ppc
export CFLAGS="`echo %optflags |sed s/O2/O0/`"
%endif

%configure2_5x
%make

pushd ft2demos-%{version}
%make X11_PATH=%{_prefix} TOP_DIR=".."
popd

%install
rm -fr %buildroot
%makeinstall

%multiarch_binaries $RPM_BUILD_ROOT%{_bindir}/freetype-config
%multiarch_includes $RPM_BUILD_ROOT%{_includedir}/freetype2/freetype/config/ftconfig.h

install -d $RPM_BUILD_ROOT/%{_bindir}

for ftdemo in ftbench ftdiff ftdump ftgamma ftgrid ftlint ftmulti ftstring ftvalid ftview; do
    builds/unix/libtool --mode=install install -m 755 ft2demos-%{version}/bin/$ftdemo $RPM_BUILD_ROOT/%{_bindir}
done

%clean
rm -fr %buildroot

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif
%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files -n %{libname}
%defattr(-, root, root)
%{_libdir}/*.so.%{major}*

%files -n %{develname}
%defattr(-, root, root)
%doc docs/*
%{_bindir}/freetype-config
%{_libdir}/*.so
%{_libdir}/*.la
%dir %{_includedir}/freetype2
%{_includedir}/freetype2/*
%{_includedir}/ft2build.h
%{_datadir}/aclocal/*
%{_libdir}/pkgconfig/*
%multiarch %multiarch_bindir/freetype-config
%multiarch %dir %multiarch_includedir/freetype2
%multiarch %multiarch_includedir/freetype2/*

%files -n %{staticdevelname}
%defattr(-, root, root)
%{_libdir}/*.a

%files demos
%defattr(-,root,root)
%{_bindir}/ftbench
%{_bindir}/ftdiff
%{_bindir}/ftdump
%{_bindir}/ftgamma
%{_bindir}/ftgrid
%{_bindir}/ftlint
%{_bindir}/ftmulti
%{_bindir}/ftstring
%{_bindir}/ftvalid
%{_bindir}/ftview

%changelog
* Thu Apr 12 2012 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.9mdv2010.2
- P15: security fix for CVE-2012-1126 (rhel6)
- P16: security fix for CVE-2012-1127 (rhel6)
- P17: security fix for CVE-2012-1130 (rhel6)
- P18: security fix for CVE-2012-1131 (rhel6)
- P19: security fix for CVE-2012-1132 (rhel6)
- P20: security fix for CVE-2012-1134 (rhel6)
- P21: security fix for CVE-2012-1136 (rhel6)
- P22: security fix for CVE-2012-1137 (rhel6)
- P23: security fix for CVE-2012-1139 (rhel6)
- P24: security fix for CVE-2012-1140 (rhel6)
- P25: security fix for CVE-2012-1141 (rhel6)
- P26: security fix for CVE-2012-1142 (rhel6)
- P27: security fix for CVE-2012-1143 (rhel6)
- P28: security fix for CVE-2012-1144 (rhel6)
- P29: Properly initialize array "result" in FT_Outline_Get_Orientation() (rhel6)
- P30: Check bytes per row for overflow in _bdf_parse_glyphs() (rhel6)
- added the demos sub package to ease the testing

* Wed Nov 16 2011 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.8mdv2010.2
- P14: security fix for CVE-2011-3439 (upstream)

* Fri Oct 21 2011 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.7mdv2010.2
- P12: security fix for CVE-2011-3256 (upstream)
- P13: added lzw stack protection (upstream)

* Tue Jul 26 2011 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.6mdv2010.2
- P11: security fix for CVE-2011-0226 (rhel6)

* Sun Nov 14 2010 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.5mdv2010.1
- P9: security fix for CVE-2010-3814 (ubuntu)
- P10: security fix for CVE-2010-3855 (ubuntu)

* Wed Oct 13 2010 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.4mdv2010.1
- P8: security fix for CVE-2010-3311 (adapted from debian)

* Sun Aug 22 2010 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.3mdv2010.1
- P3: security fix for CVE-2010-2805 (ubuntu)
- P4: security fix for CVE-2010-2806 (ubuntu)
- P5: security fix for CVE-2010-2807 (ubuntu)
- P6: security fix for CVE-2010-2808 (ubuntu)
- P7: security fix for CVE-2010-3053 (ubuntu)

* Thu Aug 12 2010 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.2mdv2010.1
- P2: security fix for CVE-2010-1797 (rhel5)

* Fri Jul 16 2010 Oden Eriksson <oeriksson@mandriva.com> 2.3.12-1.1mdv2010.1
- P0: security fix for CVE-2010-2520 (debian)
- P1: security fix for CVE-2010-2497,2498,2499,2500,2519 (debian + additional code from upstream)

* Mon Feb 15 2010 Frederic Crozat <fcrozat@mandriva.com> 2.3.12-1mdv2010.1
+ Revision: 506123
- Release 2.3.12
- Fix url

* Sat Jan 02 2010 Funda Wang <fwang@mandriva.org> 2.3.11-2mdv2010.1
+ Revision: 484980
- libtoolize is not needed any more

* Mon Oct 12 2009 Frederic Crozat <fcrozat@mandriva.com> 2.3.11-1mdv2010.0
+ Revision: 456723
- Release 2.3.11

* Fri Oct 09 2009 Frederic Crozat <fcrozat@mandriva.com> 2.3.10-1mdv2010.0
+ Revision: 456395
- Release 2.3.10
- Remove patches 0, 1 (merged upstream)

  + Olivier Blin <oblin@mandriva.com>
    - fix assembly declaration for armel (from Arnaud Patard)

* Thu Sep 24 2009 Oden Eriksson <oeriksson@mandriva.com> 2.3.9-4mdv2010.0
+ Revision: 448177
- added the corrected patch by pcpa for fixing CVE-2009-0946

* Wed Sep 23 2009 Oden Eriksson <oeriksson@mandriva.com> 2.3.9-3mdv2010.0
+ Revision: 447643
- P0: security fix for CVE-2009-0946

* Wed Sep 02 2009 Christophe Fergeau <cfergeau@mandriva.com> 2.3.9-2mdv2010.0
+ Revision: 424480
- rebuild

  + Frederic Crozat <fcrozat@mandriva.com>
    - add git_url

* Thu Mar 12 2009 Frederic Crozat <fcrozat@mandriva.com> 2.3.9-1mdv2009.1
+ Revision: 354233
- Release 2.3.9

* Wed Jan 14 2009 Frederic Crozat <fcrozat@mandriva.com> 2.3.8-2mdv2009.1
+ Revision: 329473
- Release 2.3.8

* Thu Dec 25 2008 Oden Eriksson <oeriksson@mandriva.com> 2.3.7-2mdv2009.1
+ Revision: 318825
- rebuild

* Mon Jun 30 2008 Frederic Crozat <fcrozat@mandriva.com> 2.3.7-1mdv2009.0
+ Revision: 230204
- Release 2.3.7

* Tue Jun 10 2008 Frederic Crozat <fcrozat@mandriva.com> 2.3.6-1mdv2009.0
+ Revision: 217357
- Release 2.3.6

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Tue Sep 18 2007 Frederic Crozat <fcrozat@mandriva.com> 2.3.5-2mdv2008.0
+ Revision: 89480
- Force rebuild

* Tue Jul 03 2007 Funda Wang <fwang@mandriva.org> 2.3.5-1mdv2008.0
+ Revision: 47335
- New version

  + Anssi Hannula <anssi@mandriva.org>
    - plf: update reason

* Fri Apr 27 2007 Frederic Crozat <fcrozat@mandriva.com> 2.3.4-1mdv2008.0
+ Revision: 18751
- Release 2.3.4
- Remove patch0, merged upstream
- add build options in package to enable individually subpixel hinting and bytecode interpreter

* Sat Apr 21 2007 Anssi Hannula <anssi@mandriva.org> 2.3.1-4mdv2008.0
+ Revision: 16552
- patch0: fix CVE-2007-1351


* Sun Feb 18 2007 Götz Waschk <waschk@mandriva.org> 2.3.1-3mdv2007.0
+ Revision: 122328
- fix buildrequires

* Sun Feb 18 2007 Götz Waschk <waschk@mandriva.org> 2.3.1-2mdv2007.1
+ Revision: 122284
- rebuild to fix pkgconfig deps

* Wed Jan 31 2007 Frederic Crozat <fcrozat@mandriva.com> 2.3.1-1mdv2007.1
+ Revision: 115653
- Release 2.3.1

* Wed Jan 17 2007 Frederic Crozat <fcrozat@mandriva.com> 2.3.0-1mdv2007.1
+ Revision: 109964
- Release 2.3.0
- Removes all patches, merged upstream

* Sat Dec 02 2006 Olivier Blin <oblin@mandriva.com> 2.2.1-9mdv2007.1
+ Revision: 89940
- fix overlapping segments (#23258)

* Sat Nov 11 2006 Anssi Hannula <anssi@mandriva.org> 2.2.1-8mdv2007.0
+ Revision: 81091
- plf: really enable full hinting

* Fri Nov 03 2006 Anssi Hannula <anssi@mandriva.org> 2.2.1-7mdv2007.1
+ Revision: 76248
- increase release
- plf: fix reason

  + Oden Eriksson <oeriksson@mandriva.com>
    - bzip2 cleanup
    - rebuild

* Thu Oct 12 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.1-5mdv2007.1
+ Revision: 63443
- bunzip patches
- Import freetype2

* Tue Sep 12 2006 Frederic Crozat <fcrozat@mandriva.com> 2.2.1-4mdv2007.0
- Patch6 (pterjan): fix crash (fdo bug #6841)

* Sat Jul 22 2006 Frederic Crozat <fcrozat@mandriva.com> 2.2.1-3mdv2007.0
- Patch0 (CVS): fix CVE-2006-3467
- Patch1 (CVS): handles correctly bdf fonts without POINT_SIZE property
- Patch2 (CVS): fix bytecode hint instructions
- Patch3 (CVS): fix handling of some strange PFR fonts
- Patch4 (CVS): speedup small gzip fonts loading
- Patch5 (CVS): fix rogue client crash

* Tue May 30 2006 Götz Waschk <waschk@mandriva.org> 2.2.1-2mdv2007.0
- mkrel

* Tue May 16 2006 Frederic Crozat <fcrozat@mandriva.com> 2.2.1-1mdk
- Release 2.2.1
- Remove patches 0, 1, 2, 3, 5, 6 (merged upstream)

* Wed Nov 16 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-10mdk
- Rebuild to get debug package

* Tue Sep 27 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-9mdk 
- Patch6 (David Turner): fix anti-aliasing rendering

* Wed Sep 21 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-8mdk 
- Remove patch4, it wasn't fixing the real problem which is in cairo

* Wed Sep 14 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-7mdk 
- Patch5 (CVS): fix disabled kerning

* Wed Aug 31 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-6mdk 
- Patch4 (Owen Taylor): fix font rendering in Cairo

* Thu Aug 25 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-5mdk 
- Patch2 (CVS): fix autofit render setup
- Patch3 (CVS): fix memleak

* Thu Aug 25 2005 Götz Waschk <waschk@mandriva.org> 2.1.10-4mdk
- fix bug 17248

* Thu Aug 04 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-3mdk 
- Patch1 (David Turner): put back internal API used by xorg-x11 (Mdk bug #14636)

* Wed Aug 03 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-2mdk 
- Patch0 (CVS): various fixes (mostly embolding)

* Tue Jul 05 2005 Frederic Crozat <fcrozat@mandriva.com> 2.1.10-1mdk 
- Release 2.1.10
- Remove patches 0, 3, 4, 5, 6, 7 (merged upstream)

* Thu Mar 17 2005 Frederic Crozat <fcrozat@mandrakesoft.com> 2.1.9-6mdk 
- Disable patches 1 & 2, they seems to alter CJK (Mdk bug #14725)

* Thu Mar 10 2005 Frederic Crozat <fcrozat@mandrakesoft.com> 2.1.9-5mdk 
- Patch1 (CVS): fix ttf hints distortions
- Patch2 (CVS): fix ttf interpreter
- Patch3 (CVS): fix stroker for closed outlines and single points
- Patch4 (CVS): fix cff font load 
- Patch5 (CVS): fix size comparison for BDF files
- Patch6 (CVS): fix size comparison for PCF files
- Patch7 (CVS): fix fractional size handling

* Thu Feb 10 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.1.9-4mdk
- nuke lib64 rpaths
- multiarch freetype-config (for --libtool)

* Mon Jan 31 2005 Frederic Lepied <flepied@mandrakesoft.com> 2.1.9-3mdk
- multiarch

* Fri Jul 23 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.1.9-2mdk
- use -O0 on ppc to prevent crashes with new fontconfig installed

* Tue Jul 20 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.1.9-1mdk
- Release 2.1.9
- Add check to lower optimizations for old gcc

* Sat Jul 10 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.1.8-2mdk
- Enable back optimizations (safe with gcc 3.4.x)

* Thu Apr 22 2004 Frederic Crozat <fcrozat@mandrakesoft.com> 2.1.8-1mdk
- Release 2.1.8
- Remove patch0 (merged upstream)