1 |
|
2 |
%define name wine-gecko |
3 |
%define oname wine-mozilla |
4 |
%define version 1.2.0 |
5 |
%define rel 1 |
6 |
|
7 |
# random working revision from mingw-w64 trunk: |
8 |
%define mingw64_snap 2847 |
9 |
# not working due to various errors: |
10 |
# - 3272 (crt build failure) |
11 |
# - 3500 (redefinition of UINT8 while building mozilla) |
12 |
# - 3713 (crt build failure) |
13 |
|
14 |
# See: |
15 |
# http://wiki.winehq.org/Gecko |
16 |
# http://wiki.winehq.org/BuildingWineGecko |
17 |
|
18 |
# We bundle custom versions of mingw64 headers and crt here because |
19 |
# wine-gecko does not currently build with those from our system mingw32. |
20 |
|
21 |
Summary: HTML engine for Wine based on Gecko |
22 |
Name: %{name} |
23 |
Version: %{version} |
24 |
Release: %mkrel %{rel} |
25 |
Group: Emulators |
26 |
License: MPLv1.1 |
27 |
URL: http://wiki.winehq.org/Gecko |
28 |
Source: http://downloads.sourceforge.net/wine/%{oname}-%{version}-src.tar.bz2 |
29 |
# https://mingw-w64.svn.sourceforge.net/svnroot/mingw-w64/trunk |
30 |
Source1: mingw-w64-headers-svn%mingw64_snap.tar.bz2 |
31 |
Source2: mingw-w64-crt-svn%mingw64_snap.tar.bz2 |
32 |
# We would need a mingw64 crosscompiler for a 64-bit binary. |
33 |
# NOTE: building this package as-is on x86_64 will build a 32-bit binary instead. |
34 |
ExclusiveArch: %ix86 |
35 |
Requires: wine32 |
36 |
BuildRequires: mingw32-gcc |
37 |
BuildRequires: mingw32-gcc-c++ |
38 |
BuildRequires: autoconf2.1 |
39 |
BuildRequires: zip |
40 |
BuildRequires: glib2-devel |
41 |
BuildRequires: libIDL-devel |
42 |
BuildRequires: x11-proto-devel |
43 |
# lcab creates cabs without compression, but it is better than nothing |
44 |
BuildRequires: lcab |
45 |
|
46 |
%description |
47 |
A custom version of Mozilla's Gecko Layout Engine for Wine. This package |
48 |
is needed when running such Windows applications in Wine that display web |
49 |
pages using embedded IE. |
50 |
|
51 |
%prep |
52 |
%setup -q -c -a1 -a2 |
53 |
|
54 |
%build |
55 |
# disabled as build fails due to various issues if set: |
56 |
# %%_mingw32_env |
57 |
|
58 |
builddir=$PWD |
59 |
mkdir -p mingw-headers-build mingw-crt-build |
60 |
cd mingw-headers-build |
61 |
../mingw-w64-headers/configure --host=%_mingw32_host --prefix=$builddir/mingw-sysroot --enable-sdk=all |
62 |
%make install |
63 |
ln -s %_mingw32_host $builddir/mingw-sysroot/mingw |
64 |
cd .. |
65 |
|
66 |
OVERRIDE_FLAGS="--sysroot=$builddir/mingw-sysroot" |
67 |
export CC="%_mingw32_cc $OVERRIDE_FLAGS" |
68 |
export CXX="%_mingw32_cxx $OVERRIDE_FLAGS" |
69 |
|
70 |
cd mingw-crt-build |
71 |
../mingw-w64-crt/configure --host=%_mingw32_host --prefix=$builddir/mingw-sysroot |
72 |
%make |
73 |
%make install |
74 |
cd .. |
75 |
|
76 |
# Something strange happens here. Mozilla configure will detect this as true, |
77 |
# but the relevant code using __stdcall will fail to compile anyway (even if |
78 |
# the test in configure compiled fine). - Anssi 10/2010 |
79 |
export ac_cv___stdcall=false |
80 |
|
81 |
cd wine-mozilla |
82 |
cp -af wine/mozconfig wine/mozconfig-mga |
83 |
echo "ac_add_options --target=%_mingw32_host" >> wine/mozconfig-mga |
84 |
export MOZCONFIG=$PWD/wine/mozconfig-mga |
85 |
|
86 |
%make -f client.mk build |
87 |
wine/make_package ../wine_gecko |
88 |
cd ../wine_gecko/dist |
89 |
|
90 |
lcab -r wine_gecko ../../wine_gecko-%{version}-x86.cab |
91 |
|
92 |
%install |
93 |
rm -rf %{buildroot} |
94 |
install -d -m755 %{buildroot}%{_datadir}/wine/gecko |
95 |
install -m644 wine_gecko-%{version}-x86.cab %{buildroot}%{_datadir}/wine/gecko |
96 |
|
97 |
%clean |
98 |
rm -rf %{buildroot} |
99 |
|
100 |
%files |
101 |
%defattr(-,root,root) |
102 |
%doc wine-mozilla/LEGAL |
103 |
%doc wine-mozilla/LICENSE |
104 |
%doc wine-mozilla/toolkit/content/license.html |
105 |
%dir %{_datadir}/wine/gecko |
106 |
%{_datadir}/wine/gecko/*.cab |