source: trunk/dports/devel/mono/Portfile

Last change on this file was 140806, checked in by mcalhoun@…, 22 months ago

mono: ensure we are UsingTheRightCompiler (patchfiles mistakenly left out until r140812)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 140806 2015-10-03 16:06:47Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                mono
7version             3.12.1
8revision            1
9categories          devel lang mono
10platforms           darwin
11license             {GPL-2 LGPL-2 MIT}
12maintainers         nomaintainer
13description         Implementation of the .NET Development Framework
14long_description    \
15    Mono is an effort to create an open source implementation of the .NET \
16    Development Framework including a C# compiler.
17
18homepage            http://www.mono-project.com/
19master_sites        http://download.mono-project.com/sources/mono/
20use_bzip2           yes
21universal_variant   no
22
23checksums           rmd160  c34cb00ab4cf8cd5e2804bde952b3f5fde3cdc17 \
24                    sha256  5d8cf153af2948c06bc9fbf5088f6834868e4db8e5f41c7cff76da173732b60d
25
26depends_build       port:coreutils \
27                    port:gawk \
28                    port:pkgconfig
29
30depends_lib         port:gettext \
31                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
32                    port:libiconv \
33                    port:zlib \
34                    port:libgdiplus \
35                    port:xorg-libX11
36
37# Save value of ${configure.cc} for use in patching files
38set configure_cc ${configure.cc}
39# Do NOT pick up external boehmgc (prefixing CPPFLAGS or CFLAGS does not suffice -- ugly++)
40configure.cc-append "-I${worksrcpath}/libgc/include"
41
42configure.args      --with-gc=included \
43                    --with-preview=yes \
44                    --without-sigaltstack \
45                    --with-libgdiplus=${prefix} \
46                    --disable-dtrace
47
48configure.ldflags-append \
49                    -lintl -lcharset
50
51use_parallel_build  no
52
53test.run            yes
54test.target         check
55
56patchfiles          snowleopard-mutex.patch
57
58if { ${build_arch} == "i386" } {
59    configure.args-append "--host=i686-apple-${os.platform}${os.version}"
60}
61
62# Ensure we are UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
63patchfiles-append   patch-aot-compiler.c.diff \
64                    patch-Makefile.in.diff
65
66post-patch {
67    if {${os.major} < 9} {
68        reinplace "s:MAC_OS_X_VERSION_10_5:1050:g" \
69            ${worksrcpath}/libgc/darwin_stop_world.c \
70            ${worksrcpath}/mono/mini/mini-darwin.c \
71            ${worksrcpath}/mono/utils/mono-sigcontext.h
72
73        reinplace "s/arch_state->__/arch_state->/g" \
74            ${worksrcpath}/mono/utils/mach-support-x86.c
75        reinplace "s/struct __darwin_mcontext32/struct mcontext/g" \
76            ${worksrcpath}/mono/utils/mach-support-x86.c
77        reinplace "s/ctx->__/ctx->/g" \
78            ${worksrcpath}/mono/utils/mach-support-x86.c
79    }
80
81    # Ensure we are UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
82    reinplace "s:__MACPORTS_CC__:${configure_cc}:g" \
83        ${worksrcpath}/mono/mini/aot-compiler.c
84}
85
86post-destroot {
87    set docdir ${prefix}/share/doc/${name}
88
89    xinstall -d ${destroot}${docdir}
90    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING.LIB ChangeLog NEWS README.md \
91        ${destroot}${docdir}
92
93    xinstall -m 0644 -W ${worksrcpath}/docs assembly-bundle embedded-api exceptions \
94        gc-issues jit-thoughts jit-trampolines object-layout stack-alignment unmanaged-calls \
95        ${destroot}${docdir}
96
97    set libgc_docdir ${prefix}/share/doc/ligbc-mono-6.6
98
99    eval move ${destroot}${prefix}/share/libgc-mono \
100        ${destroot}${libgc_docdir}
101
102    xinstall -d ${destroot}${libgc_docdir}/html
103
104    move {*}[glob ${destroot}${libgc_docdir}/*.html] \
105        ${destroot}${libgc_docdir}/html
106}
107
108# beta_version is actually the latest stable
109# stable_version is the EOL previous stable version
110# go figure...
111livecheck.type      regex
112livecheck.url       [lindex ${master_sites} 0]
113livecheck.regex     [quotemeta ${name}]-(3(?:\\.\\d+)*)[quotemeta ${extract.suffix}]
Note: See TracBrowser for help on using the repository browser.