summaryrefslogtreecommitdiff
path: root/lang/ghc/Makefile
blob: 217c07f9c2c7637469997c271a170d57170fd296 (plain)
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
# $NetBSD: Makefile,v 1.23 2005/05/22 20:08:09 jlam Exp $

DISTNAME=	ghc-6.4
CATEGORIES=	lang
MASTER_SITES=	http://www.haskell.org/ghc/dist/6.4/
DISTFILES=	ghc-6.4-src.tar.bz2 \
		ghc-6.2.1-src.tar.bz2 \
		ghc-6.2.1-i386-unknown-netbsd-hc.tar.gz

MAINTAINER=	kristerw@NetBSD.org
HOMEPAGE=	http://www.haskell.org/ghc/
COMMENT=	Compiler for the functional language Haskell

SITES_ghc-6.2.1-i386-unknown-netbsd-hc.tar.gz=${MASTER_SITE_LOCAL}

ONLY_FOR_PLATFORM= NetBSD-1.5*-i386 NetBSD-1.6*-i386 NetBSD-[2-9]*-i386

GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-ghc=${WRKDIR}/bootstrap/bin/ghc
CONFIGURE_ENV+=		PerlCmd=${PERL5}
USE_GNU_READLINE=	yes	# uses the UNDO_ constants
USE_PERL5=		yes
USE_TOOLS+=		gmake

pre-configure:
	${MV} ${WRKDIR}/ghc-6.2.1/mk/bootstrap.mk \
		${WRKDIR}/ghc-6.2.1/mk/bootstrap.mk.tmp
	${SED} -e 's,@PREFIX@,${PREFIX},g' \
		< ${WRKDIR}/ghc-6.2.1/mk/bootstrap.mk.tmp \
		> ${WRKDIR}/ghc-6.2.1/mk/bootstrap.mk
	${MV} ${WRKDIR}/ghc-6.2.1/libraries/readline/package.conf.in \
		${WRKDIR}/ghc-6.2.1/libraries/readline/package.conf.in.tmp
	${SED} -e 's,@PREFIX@,${PREFIX},g' \
		< ${WRKDIR}/ghc-6.2.1/libraries/readline/package.conf.in.tmp \
		> ${WRKDIR}/ghc-6.2.1/libraries/readline/package.conf.in
	${MV} ${WRKDIR}/ghc-6.2.1/ghc/rts/package.conf.in \
		${WRKDIR}/ghc-6.2.1/ghc/rts/package.conf.in.tmp
	${SED} -e 's,@PREFIX@,${PREFIX},g' \
		< ${WRKDIR}/ghc-6.2.1/ghc/rts/package.conf.in.tmp \
		> ${WRKDIR}/ghc-6.2.1/ghc/rts/package.conf.in
	cd ${WRKDIR}/ghc-6.2.1 && \
		./distrib/hc-build \
			--enable-hc-boot-unregisterised \
			--prefix=${WRKDIR}/bootstrap
	cd ${WRKDIR}/ghc-6.2.1 && ${GMAKE} stage=1 install

pre-build:
	${ECHO} "SplitObjs=NO" > ${WRKSRC}/mk/build.mk

.include "../../devel/readline/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"