winegcc32-1.1.10-1kkr2009.0.spec

%define distname wine

%define name     winegcc32
%define version  1.1.10
%define release  %mkrel 1


Summary:        winegcc for x86_64 to build 32-bit binary
Summary(ja):    32-bitのバイナリをビルドするためのx86_64向けwinegcc
Name:           %{name}
Version:        %{version}
Release:        %{release}
Source:         http://prdownloads.sourceforge.net/wine/%{distname}-%{version}.tar.bz2
  # Size  : 14,734,081
  # MD5   : 939ddfacb80678a99b3c960edb3a30f5
  # SHA-1 : 21712c3c6195779304cd72f5175ea1528b2a26a0
URL:            http://www.winehq.org/
License:        LGPLv2.1+
Group:          Development/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires:       gcc gcc-c++


%description
winegcc built on x86_32 can't link properly on x86_64.

ld: Relocatable linking with relocations from format elf32-i386 (xxx.o) to format elf64-x86-64 (yyy.o) is not supported

This package contains winegcc built on x86_64, workaround for this problem.

%description -l ja
x86_32上でビルドされたwinegccはx86_64上で正しくリンクを行うことができません。

ld: Relocatable linking with relocations from format elf32-i386 (xxx.o) to format elf64-x86-64 (yyy.o) is not supported

本パッケージは、この問題の次善策である、x86_64上でビルドされたwinegccを含んでいます。


%prep
%ifarch x86_64
%setup -q -n %{distname}-%{version}
%{__sed} -i 's:\(else if (strendswith(argv\[0\], "++\)\(")) opts.processor = proc_cxx;\):\132\2:' tools/winegcc/winegcc.c
%else
echo "This package must be built on x86_64."
exit 1
%endif


%build
CFLAGS="%{optflags}" ./configure \
	--prefix=%{_prefix} \
	--without-alsa \
	--without-audioio \
	--without-capi \
	--without-cms \
	--without-coreaudio \
	--without-cups \
	--without-curses \
	--without-esd \
	--without-fontconfig \
	--without-freetype \
	--without-gphoto \
	--without-glu \
	--without-gnutls \
	--without-hal \
	--without-jack \
	--without-jpeg \
	--without-ldap \
	--without-nas \
	--without-opengl \
	--without-openssl \
	--without-oss \
	--without-png \
	--without-sane \
	--without-xcomposite \
	--without-xcursor \
	--without-xinerama \
	--without-xinput \
	--without-xml \
	--without-xrandr \
	--without-xrender \
	--without-xshape \
	--without-xshm \
	--without-xslt \
	--without-xxf86vm
%make depend
%make -C libs
%make -C tools/winegcc


%install
%{__rm} %{buildroot} -fr
%{__install} -D -m 755 tools/winegcc/winegcc %{buildroot}/%{_bindir}/winegcc32
pushd %{buildroot}/%{_bindir}/
%{__ln_s} winegcc32 wineg++32
popd
%{__lzma} LICENSE


%clean
%{__rm} %{buildroot} -fr


%files
%defattr(-, root, root)
%{_bindir}/winegcc32
%{_bindir}/wineg++32
%doc LICENSE.lzma


%changelog
* Thu Dec 18 2008 kakurasan <kakurasan AT gmail DOT com> 1.1.10-1kkr2009.0
- initial build