- New upstream version 2.3.8.
[fedora-mingw.git] / freetype / mingw32-freetype.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 # Patented bytecode interpreter and patented subpixel rendering
8 # disabled by default.  Pass '--with bytecode_interpreter' and '--with
9 # subpixel_rendering' on rpmbuild command-line to enable them.
10
11 %define _with_subpixel_rendering 1}
12 %define _without_subpixel_rendering 0}
13 %{!?_with_bytecode_interpreter: %{!?_without_bytecode_interpreter: %define _without_bytecode_interpreter --without-bytecode_interpreter}}
14 %{!?_with_subpixel_rendering: %{!?_without_subpixel_rendering: %define _without_subpixel_rendering --without-subpixel_rendering}}
15
16 %define with_xfree86 0
17
18 Name:           mingw32-freetype
19 Version:        2.3.8
20 Release:        1%{?dist}
21 Summary:        Free and portable font rendering engine
22
23 License:        FTL or GPLv2+
24 URL:            http://www.freetype.org
25 Source:         http://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.bz2
26 Source1:        http://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.bz2
27 #Source2:        http://download.savannah.gnu.org/releases/freetype/ft2demos-%{version}.tar.bz2
28 Group:          Development/Libraries
29 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
30
31 # Patches from native Fedora package.
32 #Patch5:         ft2demos-2.1.9-mathlib.patch
33 Patch20:        freetype-2.1.10-enable-ft2-bci.patch
34 Patch21:        freetype-2.3.0-enable-spr.patch
35 Patch46:        freetype-2.2.1-enable-valid.patch
36 Patch88:        freetype-multilib.patch
37 Patch89:        freetype-2.2.1-memcpy-fix.patch
38
39 BuildArch:      noarch
40
41 BuildRequires:  mingw32-filesystem >= 25
42 BuildRequires:  mingw32-gcc
43 BuildRequires:  mingw32-binutils
44 BuildRequires:  mingw32-zlib
45 BuildRequires:  mingw32-dlfcn
46
47 Requires:       pkgconfig
48
49
50 %description
51 MinGW Windows Freetype library.
52
53
54 %prep
55 %setup -q -n freetype-%{version} -b 1 -a 1
56
57 #pushd ft2demos-%{version}
58 #%patch5 -p1 -b .mathlib
59 #popd
60
61 %if %{?_with_bytecode_interpreter:1}%{!?_with_bytecode_interpreter:0}
62 %patch20  -p1 -b .enable-ft2-bci
63 %endif
64
65 %if %{?_with_subpixel_rendering:1}%{!?_with_subpixel_rendering:0}
66 %patch21  -p1 -b .enable-spr
67 %endif
68
69 %patch46  -p1 -b .enable-valid
70
71 %patch88 -p1 -b .multilib
72 %patch89 -p1 -b .memcpy
73
74
75 %build
76 %{_mingw32_configure} --disable-static
77 make %{?_smp_mflags}
78
79 # The ft2demos Makefile is hacky and doesn't understand
80 # cross-compilation.  This nearly works, but not quite, so
81 # disable. it.
82 #pushd ft2demos-%{version}
83 #make TOP_DIR=".." PLATFORM=win32
84 #popd
85
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 make DESTDIR=$RPM_BUILD_ROOT install
91
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96
97 %files
98 %defattr(-,root,root)
99 %doc docs/LICENSE.TXT
100 %{_mingw32_bindir}/freetype-config
101 %{_mingw32_bindir}/libfreetype-6.dll
102 %{_mingw32_includedir}/freetype2
103 %{_mingw32_includedir}/ft2build.h
104 %{_mingw32_libdir}/libfreetype.dll.a
105 %{_mingw32_libdir}/libfreetype.la
106 %{_mingw32_libdir}/pkgconfig/freetype2.pc
107 %{_mingw32_datadir}/aclocal/freetype2.m4
108
109
110 %changelog
111 * Fri Jan 16 2009 Richard W.M. Jones <rjones@redhat.com> - 2.3.8-1
112 - New upstream version 2.3.8.
113 - Use the patches from the Fedora native package.
114 - Disable patented code.
115 - Don't build the static library.
116 - Use _smp_mflags.
117 - BR mingw32-dlfcn (not required, but uses it if installed).
118 - Add license file to doc section.
119
120 * Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 2.3.7-6
121 - Requires pkgconfig.
122
123 * Wed Sep 24 2008 Richard W.M. Jones <rjones@redhat.com> - 2.3.7-5
124 - Rename mingw -> mingw32.
125
126 * Mon Sep 22 2008 Daniel P. Berrange <berrange@redhat.com> - 2.3.7-4
127 - Import patches from rawhide  & add docs
128
129 * Sun Sep 21 2008 Richard W.M. Jones <rjones@redhat.com> - 2.3.7-3
130 - Depends on filesystem >= 25.
131
132 * Wed Sep 10 2008 Richard W.M. Jones <rjones@redhat.com> - 2.3.7-2
133 - Fix source URL.
134 - Remove static libraries.
135
136 * Tue Sep  9 2008 Daniel P. Berrange <berrange@redhat.com> - 2.3.7-1
137 - Initial RPM release