From bc3685d9a272823350f6cd29bf59e819ea8c4fe9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 17 Jan 2009 11:36:09 +0000 Subject: [PATCH] Initial import. --- .cvsignore | 2 + freetype-2.1.10-enable-ft2-bci.patch | 11 +++ freetype-2.2.1-enable-valid.patch | 20 ++++ freetype-2.2.1-memcpy-fix.patch | 14 +++ freetype-2.3.0-enable-spr.patch | 11 +++ freetype-multilib.patch | 18 ++++ import.log | 1 + mingw32-freetype.spec | 137 +++++++++++++++++++++++++++ sources | 2 + 9 files changed, 216 insertions(+) create mode 100644 freetype-2.1.10-enable-ft2-bci.patch create mode 100644 freetype-2.2.1-enable-valid.patch create mode 100644 freetype-2.2.1-memcpy-fix.patch create mode 100644 freetype-2.3.0-enable-spr.patch create mode 100644 freetype-multilib.patch create mode 100644 import.log create mode 100644 mingw32-freetype.spec diff --git a/.cvsignore b/.cvsignore index e69de29..ea5aeac 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,2 @@ +freetype-2.3.8.tar.bz2 +freetype-doc-2.3.8.tar.bz2 diff --git a/freetype-2.1.10-enable-ft2-bci.patch b/freetype-2.1.10-enable-ft2-bci.patch new file mode 100644 index 0000000..b1766a0 --- /dev/null +++ b/freetype-2.1.10-enable-ft2-bci.patch @@ -0,0 +1,11 @@ +--- freetype-2.1.10/include/freetype/config/ftoption.h.enable-ft2-bci 2005-10-12 13:50:40.000000000 -0400 ++++ freetype-2.1.10/include/freetype/config/ftoption.h 2005-10-12 14:18:50.000000000 -0400 +@@ -436,7 +436,7 @@ + /* Do not #undef this macro here, since the build system might */ + /* define it for certain configurations only. */ + /* */ +-/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ ++#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER + + + /*************************************************************************/ diff --git a/freetype-2.2.1-enable-valid.patch b/freetype-2.2.1-enable-valid.patch new file mode 100644 index 0000000..c78b6b7 --- /dev/null +++ b/freetype-2.2.1-enable-valid.patch @@ -0,0 +1,20 @@ +--- 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 @@ + AUX_MODULES += cache + + # TrueType GX/AAT table validation. Needs ftgxval.c below. +-# AUX_MODULES += gxvalid ++AUX_MODULES += gxvalid + + # Support for streams compressed with gzip (files with suffix .gz). + # +@@ -124,7 +124,7 @@ + + # OpenType table validation. Needs ftotval.c below. + # +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # diff --git a/freetype-2.2.1-memcpy-fix.patch b/freetype-2.2.1-memcpy-fix.patch new file mode 100644 index 0000000..67a1c07 --- /dev/null +++ b/freetype-2.2.1-memcpy-fix.patch @@ -0,0 +1,14 @@ +--- freetype-2.2.1/src/psaux/psobjs.c~ 2006-04-26 16:38:17.000000000 +0200 ++++ freetype-2.2.1/src/psaux/psobjs.c 2006-09-10 15:01:13.000000000 +0200 +@@ -165,6 +165,11 @@ + return PSaux_Err_Invalid_Argument; + } + ++ if ( length < 0 ) { ++ FT_ERROR(( "ps_table_add: invalid length\n" )); ++ return PSaux_Err_Invalid_Argument; ++ } ++ + /* grow the base block if needed */ + if ( table->cursor + length > table->capacity ) + { diff --git a/freetype-2.3.0-enable-spr.patch b/freetype-2.3.0-enable-spr.patch new file mode 100644 index 0000000..8432e28 --- /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 @@ + /* This is done to allow FreeType clients to run unmodified, forcing */ + /* them to display normal gray-level anti-aliased glyphs. */ + /* */ +-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */ ++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING + + + /*************************************************************************/ diff --git a/freetype-multilib.patch b/freetype-multilib.patch new file mode 100644 index 0000000..f369adb --- /dev/null +++ b/freetype-multilib.patch @@ -0,0 +1,18 @@ +--- freetype-2.2.1/builds/unix/freetype-config.in.multilib 2006-07-27 18:50:40.000000000 -0400 ++++ freetype-2.2.1/builds/unix/freetype-config.in 2006-07-27 18:58:13.000000000 -0400 +@@ -9,11 +9,11 @@ + # indicate that you have read the license and understand and accept it + # fully. + +-prefix=@prefix@ +-exec_prefix=@exec_prefix@ ++prefix=`pkg-config --variable prefix freetype2` ++exec_prefix=`pkg-config --variable exec_prefix freetype2` + exec_prefix_set=no +-includedir=@includedir@ +-libdir=@libdir@ ++includedir=`pkg-config --variable includedir freetype2` ++libdir=`pkg-config --variable libdir freetype2` + enable_shared=@build_libtool_libs@ + wl=@wl@ + hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@' diff --git a/import.log b/import.log new file mode 100644 index 0000000..9c6dd7d --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +mingw32-freetype-2_3_8-1_fc10:HEAD:mingw32-freetype-2.3.8-1.fc10.src.rpm:1232191855 diff --git a/mingw32-freetype.spec b/mingw32-freetype.spec new file mode 100644 index 0000000..ac0c2cf --- /dev/null +++ b/mingw32-freetype.spec @@ -0,0 +1,137 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +# Patented bytecode interpreter and patented subpixel rendering +# disabled by default. Pass '--with bytecode_interpreter' and '--with +# subpixel_rendering' on rpmbuild command-line to enable them. + +%define _with_subpixel_rendering 1} +%define _without_subpixel_rendering 0} +%{!?_with_bytecode_interpreter: %{!?_without_bytecode_interpreter: %define _without_bytecode_interpreter --without-bytecode_interpreter}} +%{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}} + +%define with_xfree86 0 + +Name: mingw32-freetype +Version: 2.3.8 +Release: 1%{?dist} +Summary: Free and portable font rendering engine + +License: FTL or GPLv2+ +URL: http://www.freetype.org +Source: http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2 +Source1: http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2 +#Source2: http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2 +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +# Patches from native Fedora package. +#Patch5: ft2demos-2.1.9-mathlib.patch +Patch20: freetype-2.1.10-enable-ft2-bci.patch +Patch21: freetype-2.3.0-enable-spr.patch +Patch46: freetype-2.2.1-enable-valid.patch +Patch88: freetype-multilib.patch +Patch89: freetype-2.2.1-memcpy-fix.patch + +BuildArch: noarch + +BuildRequires: mingw32-filesystem >= 25 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils +BuildRequires: mingw32-zlib +BuildRequires: mingw32-dlfcn + +Requires: pkgconfig + + +%description +MinGW Windows Freetype library. + + +%prep +%setup -q -n freetype-%{version} -b 1 -a 1 + +#pushd ft2demos-%{version} +#%patch5 -p1 -b .mathlib +#popd + +%if %{?_with_bytecode_interpreter:1}%{!?_with_bytecode_interpreter:0} +%patch20 -p1 -b .enable-ft2-bci +%endif + +%if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0} +%patch21 -p1 -b .enable-spr +%endif + +%patch46 -p1 -b .enable-valid + +%patch88 -p1 -b .multilib +%patch89 -p1 -b .memcpy + + +%build +%{_mingw32_configure} --disable-static +make %{?_smp_mflags} + +# The ft2demos Makefile is hacky and doesn't understand +# cross-compilation. This nearly works, but not quite, so +# disable. it. +#pushd ft2demos-%{version} +#make TOP_DIR=".." PLATFORM=win32 +#popd + + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR=$RPM_BUILD_ROOT install + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%doc docs/LICENSE.TXT +%{_mingw32_bindir}/freetype-config +%{_mingw32_bindir}/libfreetype-6.dll +%{_mingw32_includedir}/freetype2 +%{_mingw32_includedir}/ft2build.h +%{_mingw32_libdir}/libfreetype.dll.a +%{_mingw32_libdir}/libfreetype.la +%{_mingw32_libdir}/pkgconfig/freetype2.pc +%{_mingw32_datadir}/aclocal/freetype2.m4 + + +%changelog +* Fri Jan 16 2009 Richard W.M. Jones - 2.3.8-1 +- New upstream version 2.3.8. +- Use the patches from the Fedora native package. +- Disable patented code. +- Don't build the static library. +- Use _smp_mflags. +- BR mingw32-dlfcn (not required, but uses it if installed). +- Add license file to doc section. + +* Tue Jan 13 2009 Richard W.M. Jones - 2.3.7-6 +- Requires pkgconfig. + +* Wed Sep 24 2008 Richard W.M. Jones - 2.3.7-5 +- Rename mingw -> mingw32. + +* Mon Sep 22 2008 Daniel P. Berrange - 2.3.7-4 +- Import patches from rawhide & add docs + +* Sun Sep 21 2008 Richard W.M. Jones - 2.3.7-3 +- Depends on filesystem >= 25. + +* Wed Sep 10 2008 Richard W.M. Jones - 2.3.7-2 +- Fix source URL. +- Remove static libraries. + +* Tue Sep 9 2008 Daniel P. Berrange - 2.3.7-1 +- Initial RPM release diff --git a/sources b/sources index e69de29..a685a3b 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +6cf31a08826715a0d16ae366da9c7d3b freetype-2.3.8.tar.bz2 +de1cc7cf098e11fba5898efdab1bc23d freetype-doc-2.3.8.tar.bz2