File mingw32-mono.spec of Package mingw32-mono
#
# spec file for package mingw32-mono
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# 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: 5.0.0
Release: 0
Summary: Mono for Windows
License: LGPL-2.1
Group: Development/Libraries
Url: http://www.mono-project.com
Source0: https://download.mono-project.com/sources/mono/mono-5.0.0.100.tar.bz2
Source1: https://raw.githubusercontent.com/mono/mono/b39e7e9d78938362417b2c966d204da60952c7b4/build-mingw32.sh
Source2: https://raw.githubusercontent.com/mono/mono/master/eglib/src/gmodule-win32-internals.h
Source1000: mingw32-mono-rpmlintrc
Patch1: 0005-Do-not-define-GC_DLL-for-GNU-compiler.patch
Patch2: mono-5.0.0-hide-pointer.patch
%if %{use_external_boehm}
Patch100: mono-3.0.7-external-gc.patch
%endif
Patch101: mono-2.10.1-build-mingw.patch
#!BuildIgnore: post-build-checks
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: mingw32-cross-binutils
BuildRequires: mingw32-cross-gcc
BuildRequires: mingw32-cross-gcc-c++
BuildRequires: mingw32-cross-pkg-config
BuildRequires: mingw32-filesystem >= 23
BuildRequires: pkg-config
BuildRequires: unzip
BuildRequires: zip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{_mingw32_package_header_debug}
BuildArch: noarch
%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.
%lang_package
%_mingw32_debug_package
%prep
%setup -q -n mono-%{version}
cp %{SOURCE1} .
cp %{SOURCE2} eglib/src
%patch1 -p1
%patch2 -p1
%if %{use_external_boehm}
%patch100 -p1
%endif
%patch101 -p1
%build
chmod +x build-mingw.sh
chmod +x build-mingw32.sh
./build-mingw.sh -d %{_mingw32_prefix} -m %{_mingw32_target}
%install
# 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 %{buildroot}%{_mingw32_prefix}
cp -r mono-win32/mono-%{version}/* %{buildroot}%{_mingw32_prefix}
%find_lang mcs
# Remove following ELF binaries
rm -f %{buildroot}%{_mingw32_libdir}/mono/2.0/mscorlib.dll.so
rm -f %{buildroot}%{_mingw32_libdir}/mono/4.5/mcs.exe.so
rm -f %{buildroot}%{_mingw32_libdir}/mono/4.5/mscorlib.dll.so
%files
%defattr(-,root,root)
%{_mingw32_prefix}
%exclude %{_mingw32_datadir}/locale
%files lang -f mcs.lang
%defattr(-,root,root)
%changelog