143 lines
6.2 KiB
Bash
143 lines
6.2 KiB
Bash
# Maintainer: Andrew Sun <adsun701@gmail.com>
|
|
|
|
_realname=mono
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
|
|
|
_gitcommit=9d7bbcffa7505c81a27db41ca1ffe8293c41dd41
|
|
pkgver=6.0.0.313
|
|
pkgrel=1
|
|
pkgdesc='Free implementation of the .NET platform including runtime and compiler (mingw-w64)'
|
|
url='https://www.mono-project.com/'
|
|
arch=('any')
|
|
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
|
|
license=('GPL' 'LGPL2.1' 'MPL')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-zlib"
|
|
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
|
"${MINGW_PACKAGE_PREFIX}-winpthreads"
|
|
"${MINGW_PACKAGE_PREFIX}-libgdiplus"
|
|
"${MINGW_PACKAGE_PREFIX}-python"
|
|
"${MINGW_PACKAGE_PREFIX}-ca-certificates")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
|
"${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-autotools"
|
|
"git"
|
|
"wget"
|
|
"curl")
|
|
provides=("${MINGW_PACKAGE_PREFIX}-monodoc")
|
|
conflicts=("${MINGW_PACKAGE_PREFIX}-monodoc")
|
|
source=(${_realname}::"git+https://github.com/mono/mono#commit=${_gitcommit}"
|
|
git+https://github.com/mono/aspnetwebstack
|
|
git+https://github.com/mono/Newtonsoft.Json
|
|
git+https://github.com/mono/cecil
|
|
git+https://github.com/mono/rx
|
|
git+https://github.com/mono/ikvm-fork
|
|
git+https://github.com/mono/ikdasm
|
|
git+https://github.com/mono/reference-assemblies
|
|
git+https://github.com/mono/NUnitLite
|
|
git+https://github.com/mono/NuGet.BuildTasks
|
|
git+https://github.com/mono/boringssl
|
|
git+https://github.com/mono/corefx
|
|
git+https://github.com/mono/bockbuild
|
|
git+https://github.com/mono/linker
|
|
git+https://github.com/mono/roslyn-binaries
|
|
git+https://github.com/mono/corert
|
|
git+https://github.com/mono/xunit-binaries
|
|
git+https://github.com/mono/api-doc-tools
|
|
git+https://github.com/mono/api-snapshot
|
|
0001-mono-5.4.1.7-fix-build.patch
|
|
0002-mono-5.4.1.7-avoid-appending-prefix.patch
|
|
0003-mono-5.4.1.7-fix-runtime.patch)
|
|
sha256sums=('SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'SKIP'
|
|
'04ab8ba5c7ad451b9e9d4bd76a4850afb790212ba73ac65e1e20f05c11de9924'
|
|
'772472f89f6884bf90159312a699a6d9768908c217edecd8bace08ab7ca7dceb'
|
|
'884d39a412231939ed48b6009fea26ae16a9c1b69f309fa289db071ec0002f28')
|
|
|
|
pkgver() {
|
|
cd "${srcdir}"/${_realname}
|
|
git describe --always --tags | sed 's/^v//;s/^mono-//;s/-/./g'
|
|
}
|
|
|
|
prepare() {
|
|
cd "${srcdir}"/${_realname}
|
|
git submodule init
|
|
git config submodule."external/aspnetwebstack".url "${srcdir}/aspnetwebstack"
|
|
git config submodule."external/Newtonsoft.Json".url "${srcdir}/Newtonsoft.Json"
|
|
git config submodule."external/cecil".url "${srcdir}/cecil"
|
|
git config submodule."external/rx".url "${srcdir}/rx"
|
|
git config submodule."external/ikvm".url "${srcdir}/ikvm-fork"
|
|
git config submodule."external/ikdasm".url "${srcdir}/ikdasm"
|
|
git config submodule."external/reference-assemblies".url "${srcdir}/reference-assemblies"
|
|
git config submodule."external/nunit-lite".url "${srcdir}/NUnitLite"
|
|
git config submodule."external/nuget-buildtasks".url "${srcdir}/NuGet.BuildTasks"
|
|
git config submodule."external/cecil-legacy".url "${srcdir}/cecil"
|
|
git config submodule."external/boringssl".url "${srcdir}/boringssl"
|
|
git config submodule."external/corefx".url "${srcdir}/corefx"
|
|
git config submodule."external/bockbuild".url "${srcdir}/bockbuild"
|
|
git config submodule."external/linker".url "${srcdir}/linker"
|
|
git config submodule."external/roslyn-binaries".url "${srcdir}/roslyn-binaries"
|
|
git config submodule."external/corert".url "${srcdir}/corert"
|
|
git config submodule."external/xunit-binaries".url "${srcdir}/xunit-binaries"
|
|
git config submodule."external/api-doc-tools".url "${srcdir}/api-doc-tools"
|
|
git config submodule."external/api-snapshot".url "${srcdir}/api-snapshot"
|
|
git submodule update --recursive
|
|
patch -Np1 -i "${srcdir}/0001-mono-5.4.1.7-fix-build.patch"
|
|
patch -Np1 -i "${srcdir}/0002-mono-5.4.1.7-avoid-appending-prefix.patch"
|
|
patch -Np1 -i "${srcdir}/0003-mono-5.4.1.7-fix-runtime.patch"
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
[[ -d "${srcdir}"/build-${MSYSTEM} ]] && rm -rf "${srcdir}"/build-${MSYSTEM}
|
|
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
|
|
cp -R "${srcdir}"/${_realname}/. "${srcdir}"/build-${MSYSTEM}
|
|
./configure \
|
|
--prefix=${MINGW_PREFIX} \
|
|
--build=${MINGW_CHOST} \
|
|
--host=${MINGW_CHOST} \
|
|
--target=${MINGW_CHOST} \
|
|
--disable-boehm \
|
|
--enable-static \
|
|
--enable-shared \
|
|
--with-mcs-docs=no \
|
|
--with-libgdiplus=${MINGW_PREFIX}
|
|
|
|
make get-monolite-latest
|
|
mkdir -p ./mono/mini/lib/mono/4.5/
|
|
cp -R ./mcs/class/lib/monolite-win32/d0aa6798-834d-11e9-b38a-3b0d70487d01/* ./mono/mini/lib/mono/4.5/
|
|
|
|
make
|
|
make -C mcs/jay
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}"/build-${MSYSTEM}
|
|
make DESTDIR="${pkgdir}" install
|
|
make -C mcs/jay DESTDIR="${pkgdir}" prefix=${MINGW_PREFIX} install
|
|
|
|
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
|
# Fix paths in bin directory
|
|
for f in "${pkgdir}"${MINGW_PREFIX}/bin/{al,al2,caspol,cccheck,ccrewrite,cert2spc,certmgr,cert-sync,chktrust,crlupdate,csc,csharp,csi,disco,dmcs,dtd2rng,dtd2xsd,gacutil,gacutil2,genxs,httpcfg,ikdasm,ilasm,illinkanalyzer,installvst,lc,macpack,makecert,mconfig,mcs,mdassembler,mdbrebase,mdoc,mdoc-assemble,mdoc-export-html,mdoc-export-msxdoc,mdoc-update,mdoc-validate,mdvalidater,mkbundle,mod,mono-api-html,mono-api-info,mono-cil-strip,mono-configuration-crypto,monodocer,monodocs2html,monodocs2slashdoc,mono-find-provides,mono-find-requires,monolinker,monop,monop2,mono-package-runtime,mono-service,mono-service2,mono-shlib-cop,mono-symbolicate,mono-test-install,mono-xmltool,mozroots,pdb2mdb,permview,peverify,resgen,resgen2,secutil,setreg,sgen,signcode,sn,soapsuds,sqlmetal,sqlsharp,svcutil,vbc,wsdl,wsdl2,xbuild,xsd}; do
|
|
sed -e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${f}
|
|
done
|
|
}
|