File mingw32-mono.spec of Package mingw32-mono

%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
%define __os_install_post %{_mingw32_debug_install_post} \
                          %{_mingw32_install_post}

# The embedded boehm gc for mono 2.10 does not compile for 64 bit. Until it
# is updated to a version that compiles, we must use an external variant.
%define use_external_boehm 1

Name:           mingw32-mono
Version:        2.10.1
Release:        0
Summary:        Mono for Windows

License:        LGPL v2.1 only
URL:            http://www.mono-project.com
Source0:        http://ftp.novell.com/pub/mono/sources/mono/mono-%{version}.tar.bz2
Source1000:     mingw32-mono-rpmlintrc
Patch1:         0005-Do-not-define-GC_DLL-for-GNU-compiler.patch
Patch2:         0001-Avoid-a-boehm-dependency-in-driver.c.patch
Patch3:         0001-Return-TRUE-from-mono_gc_dllmain.patch
Patch4:         0002-Only-call-GC_DllMain-for-embedded-gc.patch
Patch5:         mono-2.10.1-hide-pointer.patch
%if %{use_external_boehm}
Patch100:         mono-2.10-external-gc.patch
%endif
Patch101:       mono-2.10.1-build-mingw.patch
Patch102:       0001-Use-libmono-llvm.la-to-include-LLVM-sources.patch

Group:          Development/Libraries
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
#!BuildIgnore: post-build-checks

BuildRequires: autoconf automake libtool bison unzip
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRequires: zip
#BuildRequires: xorg-x11-libX11

BuildRequires: mingw32-filesystem >= 23
BuildRequires: mingw32-cross-binutils
BuildRequires: mingw32-cross-gcc
BuildRequires: mingw32-cross-gcc-c++
BuildRequires: mingw32-cross-pkg-config

%if %{use_external_boehm}
BuildRequires: mingw32-gc-devel
%endif

%description
Mono is an open source implementation of Microsoft's dotNet.
This package lets you run Mono in Wine.

%{_mingw32_debug_package}

%prep
%setup -q -n mono-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%if %{use_external_boehm}
%patch100 -p1
%endif
%patch101 -p1
%patch102 -p1

%build
chmod +x build-mingw.sh
./build-mingw.sh -d %{_mingw32_prefix} -m %{_mingw32_target}


%install
rm -rf $RPM_BUILD_ROOT

# These three .bat files are build incorrect, just mark them as not
# executable for now.
chmod -x mono-win32/mono-%{version}/bin/makecert.bat
chmod -x mono-win32/mono-%{version}/bin/sn.bat
chmod -x mono-win32/mono-%{version}/bin/mono-configuration-crypto.bat

mkdir -p $RPM_BUILD_ROOT%{_mingw32_prefix}
cp -r mono-win32/mono-%{version}/* $RPM_BUILD_ROOT%{_mingw32_prefix}


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{_mingw32_prefix}

%changelog
openSUSE Build Service is sponsored by