1999-11-10 18:25:29 +01:00
|
|
|
# New ports collection makefile for: ghc
|
|
|
|
# Date created: 28 August 1999
|
|
|
|
# Whom: Simon Marlow <simonmar@microsoft.com>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2000-04-12 08:21:15 +02:00
|
|
|
PORTNAME= ghc
|
2005-10-14 14:01:17 +02:00
|
|
|
PORTVERSION= 6.4.1
|
2002-11-20 10:10:55 +01:00
|
|
|
CATEGORIES= lang haskell
|
2003-01-01 18:24:59 +01:00
|
|
|
MASTER_SITES= http://www.haskell.org/ghc/dist/${PORTVERSION}/:source \
|
2004-07-26 14:06:07 +02:00
|
|
|
http://www.haskell.org/ghc/dist/${PORTVERSION}/FreeBSD/:boot
|
2005-06-28 08:45:28 +02:00
|
|
|
PATCH_SITES= http://www-i2.informatik.rwth-aachen.de/~stolz/FreeBSD/
|
2005-10-14 14:01:17 +02:00
|
|
|
PATCHFILES= patch-ghc-libraries_OpenAL.diff
|
2002-01-07 15:39:00 +01:00
|
|
|
|
2002-07-23 03:18:29 +02:00
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
|
2003-01-01 18:24:59 +01:00
|
|
|
SRC_DIST= ghc-${PORTVERSION}-src${EXTRACT_SUFX}:source
|
|
|
|
BOOT_DIST= ghc-${PORTVERSION}-i386-unknown-freebsd-boot${EXTRACT_SUFX}:boot
|
|
|
|
BOOT_DIST5= ghc-${PORTVERSION}-i386-unknown-freebsd5-boot${EXTRACT_SUFX}:boot
|
2002-01-07 15:39:00 +01:00
|
|
|
|
2002-05-08 18:41:23 +02:00
|
|
|
USE_BZIP2= yes
|
2005-06-28 08:45:28 +02:00
|
|
|
|
|
|
|
OPTIONS= PROFILE "Compile for profiling as well" on
|
|
|
|
|
2002-05-08 18:41:23 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
DISTFILES= ${SRC_DIST}
|
|
|
|
|
|
|
|
.if ${OSVERSION} < 500000
|
|
|
|
DISTFILES+= ${BOOT_DIST}
|
|
|
|
.else
|
|
|
|
DISTFILES+= ${BOOT_DIST5}
|
2005-08-26 07:23:21 +02:00
|
|
|
.if ${OSVERSION} >= 600000
|
|
|
|
LIB_DEPENDS+= c.5:${PORTSDIR}/misc/compat5x
|
|
|
|
.endif
|
2002-05-08 18:41:23 +02:00
|
|
|
.endif
|
1999-11-10 18:25:29 +01:00
|
|
|
|
2005-10-16 22:30:58 +02:00
|
|
|
.if ${PERL_LEVEL} < 500600
|
|
|
|
IGNORE= requires newer version of perl
|
|
|
|
.endif
|
|
|
|
|
2005-11-15 07:52:12 +01:00
|
|
|
USE_AUTOTOOLS= autoconf:259:env
|
2005-08-26 07:23:21 +02:00
|
|
|
LIB_DEPENDS+= gmp.6:${PORTSDIR}/math/libgmp4 \
|
2005-06-28 08:45:28 +02:00
|
|
|
glut.3:${PORTSDIR}/graphics/libglut \
|
2005-10-14 14:01:17 +02:00
|
|
|
openal.0:${PORTSDIR}/audio/openal \
|
|
|
|
readline.5:${PORTSDIR}/devel/readline
|
2003-12-16 11:08:52 +01:00
|
|
|
|
1999-11-10 18:25:29 +01:00
|
|
|
MAINTAINER= simonmar@microsoft.com
|
2003-02-21 13:35:09 +01:00
|
|
|
COMMENT= A Compiler for the functional language Haskell
|
1999-11-10 18:25:29 +01:00
|
|
|
|
|
|
|
USE_PERL5= yes
|
2003-12-12 17:33:17 +01:00
|
|
|
USE_REINPLACE= yes
|
1999-11-10 18:25:29 +01:00
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2005-03-23 09:43:18 +01:00
|
|
|
USE_GL= yes
|
1999-11-10 18:25:29 +01:00
|
|
|
|
2004-10-17 11:25:00 +02:00
|
|
|
PLIST_SUB= GHC_VERSION=${PORTVERSION}
|
2002-08-22 14:53:38 +02:00
|
|
|
.if defined(WITHOUT_PROFILE)
|
|
|
|
PLIST_SUB+= PROFILE="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PROFILE=""
|
|
|
|
.endif
|
2002-01-07 15:39:00 +01:00
|
|
|
|
|
|
|
# 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}
|
|
|
|
|
2005-10-14 14:01:17 +02:00
|
|
|
CONFIGURE_ARGS= --with-ghc=${BOOT_GHC} --with-gcc=${CC} \
|
|
|
|
--enable-openal
|
2000-03-04 14:50:17 +01:00
|
|
|
# specifying CONFIGURE_TARGET doesn't work for some reason.
|
|
|
|
CONFIGURE_TARGET=
|
2003-12-12 17:33:17 +01:00
|
|
|
# libgmp:
|
|
|
|
CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
|
1999-11-10 18:25:29 +01:00
|
|
|
|
2000-10-13 22:17:46 +02:00
|
|
|
# override TMPDIR because /tmp often doesn't have enough space
|
|
|
|
# to build some of the larger libraries.
|
2004-10-17 11:25:00 +02:00
|
|
|
TMPDIR= ${WRKSRC}/tmp
|
|
|
|
MAKE_ENV+= TMPDIR=${TMPDIR}
|
2000-10-13 22:17:46 +02:00
|
|
|
|
2004-01-15 23:56:11 +01:00
|
|
|
# Just do a stage1 build
|
2004-10-17 11:25:00 +02:00
|
|
|
ALL_TARGET= stage1
|
2004-01-15 23:56:11 +01:00
|
|
|
MAKE_ENV += stage=1
|
|
|
|
|
2003-12-12 17:33:17 +01:00
|
|
|
.if defined(WITHOUT_PROFILE)
|
2004-01-15 23:56:11 +01:00
|
|
|
post-extract:
|
2002-08-22 14:53:38 +02:00
|
|
|
@${ECHO} >>${WRKSRC}/mk/build.mk GhcLibWays=
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-patch:
|
2004-01-15 23:56:11 +01:00
|
|
|
@${REINPLACE_CMD} s+%%LOCALBASE%%+${LOCALBASE}+ \
|
|
|
|
${WRKSRC}/ghc/rts/package.conf.in
|
2002-08-22 14:53:38 +02:00
|
|
|
|
2002-01-07 15:39:00 +01:00
|
|
|
pre-configure:
|
2005-06-28 08:45:28 +02:00
|
|
|
@(cd ${WRKSRC}/libraries/OpenAL && ${AUTOCONF})
|
2002-01-07 15:39:00 +01:00
|
|
|
@(cd ${BOOT_DIR} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS})
|
|
|
|
@(cd ${BOOT_DIR} && ${MAKE} in-place)
|
2000-10-13 22:17:46 +02:00
|
|
|
|
2002-01-07 15:39:00 +01:00
|
|
|
pre-build:
|
2000-10-13 22:17:46 +02:00
|
|
|
@${MKDIR} ${TMPDIR}
|
1999-11-10 18:25:29 +01:00
|
|
|
|
2002-05-08 18:41:23 +02:00
|
|
|
.include <bsd.port.post.mk>
|