aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ghc6/Makefile
blob: 7601d2b1e0eaf6537ebf67c47a9205169b5aa80b (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
# New ports collection makefile for:    ghc
# Date created:             28 August 1999
# Whom:                 Simon Marlow <simonmar@microsoft.com>
#
# $FreeBSD$

PORTNAME=   ghc
PORTVERSION=    5.04
PORTREVISION=   1
CATEGORIES= lang
MASTER_SITES=   http://www.haskell.org/ghc/dist/${PORTVERSION}/

ONLY_FOR_ARCHS= i386

SRC_DIST=   ghc-${PORTVERSION}-src${EXTRACT_SUFX} 
BOOT_DIST=  ghc-${PORTVERSION}-i386-unknown-freebsd-boot${EXTRACT_SUFX}
BOOT_DIST5= ghc-${PORTVERSION}-i386-unknown-freebsd5-boot${EXTRACT_SUFX}

USE_BZIP2=  yes
.include <bsd.port.pre.mk>

DISTFILES=  ${SRC_DIST}

.if ${OSVERSION} < 500000
DISTFILES+= ${BOOT_DIST}
.else
DISTFILES+= ${BOOT_DIST5}
.endif

MAINTAINER= simonmar@microsoft.com

USE_PERL5=  yes
USE_GMAKE=  yes
GNU_CONFIGURE=  yes

PLIST_SUB=      GHC_VERSION=${PORTVERSION}

# This port builds by downloading a minimal binary distribution of GHC and
# using that to bootstrap.
BOOT_DIR=   ${WRKDIR}/ghc-${PORTVERSION}-boot
BOOT_GHC=   ${BOOT_DIR}/bin/i386-unknown-freebsd/ghc-${PORTVERSION}

CONFIGURE_ARGS= --with-ghc=${BOOT_GHC}
# specifying CONFIGURE_TARGET doesn't work for some reason.
CONFIGURE_TARGET=

# override TMPDIR because /tmp often doesn't have enough space
# to build some of the larger libraries.
TMPDIR = ${WRKSRC}/tmp
MAKE_ENV += TMPDIR=${TMPDIR}

pre-configure:
    @(cd ${BOOT_DIR} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS})
    @(cd ${BOOT_DIR} && ${MAKE} in-place)

pre-build:
    @${MKDIR} ${TMPDIR}

.include <bsd.port.post.mk>