aboutsummaryrefslogtreecommitdiffstats
path: root/lang/mono/Makefile
blob: 918771680b2a6a83188936e91ff6b1059626f44e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# New ports collection makefile for:   mono
# Date created:        22 July 2002
# Whom:                Yukihiro Nakai <nakai@FreeBSD.org>
#
# $FreeBSD$
#   $Id: Makefile,v 1.71 2007/01/13 21:29:41 tmclau02 Exp $
#

PORTNAME=   mono
PORTVERSION=    1.2.2.1
PORTREVISION=   3
CATEGORIES= lang
MASTER_SITES=   http://www.go-mono.com/sources/mono/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= tmclaugh/mono

MAINTAINER= bsd-sharp-list@forge.novell.com
COMMENT=    An open source implementation of .NET Development Framework

CONFLICTS=  mono-devel-[0-9]* mono-svn-[0-9]*

USE_BISON=  yes
USE_GNOME=  gnomehack glib20
USE_GMAKE=  yes
USE_AUTOTOOLS=  libtool:15
LIBTOOLFILES=   configure libgc/configure
GNU_CONFIGURE=  yes
USE_LDCONFIG=   yes
CONFIGURE_ENV=  PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
        PTHREAD_LIBS="${PTHREAD_LIBS}"
CONFIGURE_ARGS= --program-transform-name=\'\' \
        --with-gc=included \
        --with-tls=pthread
MAKE_ARGS=  EXTERNAL_MCS=false

# Set location for .wapi creation.
MONO_SHARED_DIR=${WRKDIR}

# LC_ALL is set in order to work around issues people are having when using
# other languages.  This has shown itself in build fails and possibly other
# strange crashes.
MAKE_ENV=   MONO_SHARED_DIR="${MONO_SHARED_DIR}" \
        LC_ALL=C

# Removed amd64 arch because builds are exhibiting semaphore problems on
# pointyhat runs causing failure to build.
ONLY_FOR_ARCHS= i386 #amd64

MAN1=       al.1 cert2spc.1 certmgr.1 chktrust.1 cilc.1 disco.1 dtd2xsd.1 \
        gacutil.1 genxs.1 ilasm.1 jay.1 macpack.1 makecert.1 mcs.1 \
        mint.1 mkbundle.1 mono-service.1 mono-shlib-cop.1 mono.1 \
        monoburg.1 monodis.1 monop.1 monostyle.1 mozroots.1 oldmono.1 \
        permview.1 prj2make.1 secutil.1 setreg.1 signcode.1 sn.1 \
        soapsuds.1 sqlsharp.1 wsdl.1 xsd.1 mono-xmltool.1 sgen.1
MAN5=       mono-config.5

.include <bsd.port.pre.mk>

pre-everything::
    @${CAT} ${PKGMESSAGE}

.if ${OSVERSION} < 503000
IGNORE= does not work on 4.X and 5.X before 503000
.endif

# ttyname_r(3) patch
.if ${OSVERSION} < 600028
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-support_mph.h
.endif

.if exists(${LOCALBASE}/lib/libfam.so)
USE_FAM=    yes
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|g' \
        ${WRKSRC}/mono/metadata/assembly.c
    @${REINPLACE_CMD} -e 's|.so.0|.so|g' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' \
        ${WRKSRC}/configure ${WRKSRC}/libgc/configure
    @${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g ; \
        s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \
        ${WRKSRC}/mcs/tools/mkbundle/mkbundle.cs

.if ${OSVERSION} >= 700000
    @${REINPLACE_CMD} -e 's|freebsd6|freebsd7|g' \
    ${WRKSRC}/configure ${WRKSRC}/libgc/configure
.endif

tests: build
    @${ECHO_MSG} "===> Running mono regression tests"
    @(cd ${WRKSRC}/mono/tests && ${SETENV} ${MAKE_ENV} ${GMAKE} \
        ${MAKE_FLAGS} Makefile ${MAKE_ARGS} test)

post-configure:
    ${REINPLACE_CMD} -e 's|share\/man|man|g' \
        ${WRKSRC}/mcs/jay/Makefile

pre-su-install:
    ${MKDIR} ${X11BASE}/lib/mono/1.0
    ${MKDIR} ${X11BASE}/lib/mono/2.0
    ${MKDIR} ${X11BASE}/lib/mono/gac

.include <bsd.port.post.mk>