summaryrefslogtreecommitdiff
path: root/lang/ghc/Makefile
blob: 6962d56a8b2ac7a7c09cad626703b7503751b31c (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
54
# $NetBSD: Makefile,v 1.12 2003/06/02 01:19:03 jschauma Exp $

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

MAINTAINER=	tech-pkg@netbsd.org
HOMEPAGE=	http://www.haskell.org/ghc/
COMMENT=	Compiler for the functional language Haskell

DEPENDS+=	readline>=4.0:../../devel/readline
DEPENDS+=	gmp>=2.0.2:../../devel/gmp

USE_GNU_READLINE=yes
USE_PERL5=	yes
USE_GMAKE=	yes

# Note: this package contains a Haskell compiler that is itself
# written in Haskell. There are basically two ways we can solve the
# bootstrap problem:
# 1. bootstrap from pre-generated C files.
# 2. first download a binary pre-built compiler and use it to compile.
# We currently use way 1.
# The problem with 2. is that it may make the package more sensitive
# to the exact NetBSD versions involved (the version of the build
# system compared to the version used to build the pre-built binary).
# On the other hand, bootstrapping GHC from C is very fragile and it
# may be harder to update the package with method 1.
# For comparison, FreeBSD currently uses method 2.

# Note: a number of non-i386 platforms, including solaris/sparc,
# osf/alpha etc are supported natively by ghc. pkg support for those
# platforms and their NetBSD varients is left as a mid-level exercise
# for the reader
ONLY_FOR_PLATFORM= NetBSD-1.5*-i386 NetBSD-1.6*-i386

pre-configure:
	cd ${WRKSRC}; file=configure.in;				\
	${SED} -e "s|@PREFIX@|${PREFIX}|g" $${file} > $${file}.fixed;	\
	${MV} -f $${file}.fixed $${file};				\
	${AUTOCONF}

do-configure:
	: Nothing here, configure is run twice by the hc-build script.

do-build:
	(cd ${WRKSRC}; \
	 LIBS="-L${PREFIX}/lib" ./distrib/hc-build --prefix=${PREFIX})

.include "../../devel/readline/buildlink2.mk"
.include "../../devel/gmp/buildlink2.mk"
.include "../../mk/autoconf.mk"
.include "../../mk/bsd.pkg.mk"