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
|
2007-12-30 12:37:20 +01:00
|
|
|
PORTVERSION= 6.8.2
|
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 \
|
2007-01-25 00:55:35 +01:00
|
|
|
http://www.haskell.org/ghc/dist/${PORTVERSION}/FreeBSD/:boot \
|
2007-02-15 06:13:41 +01:00
|
|
|
${MASTER_SITE_LOCAL:S/$/:boot/}
|
2007-01-22 06:06:44 +01:00
|
|
|
DISTFILES= ghc-${PORTVERSION}-src${EXTRACT_SUFX}:source \
|
|
|
|
ghc-${PORTVERSION}-src-extralibs${EXTRACT_SUFX}:source
|
2006-06-13 19:34:59 +02:00
|
|
|
|
|
|
|
MAINTAINER= haskell@FreeBSD.org
|
|
|
|
COMMENT= A Compiler for the functional language Haskell
|
|
|
|
|
2002-07-23 03:18:29 +02:00
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
|
2006-05-08 11:51:18 +02:00
|
|
|
BOOT_DIST= ghc-${PORTVERSION}-i386-unknown-freebsd6-boot${EXTRACT_SUFX}:boot
|
2002-01-07 15:39:00 +01:00
|
|
|
|
2007-09-30 05:54:50 +02:00
|
|
|
USE_AUTOTOOLS= autoconf:261:env
|
2002-05-08 18:41:23 +02:00
|
|
|
USE_BZIP2= yes
|
2007-12-30 12:37:20 +01:00
|
|
|
#LIB_DEPENDS+= gmp.7:${PORTSDIR}/math/libgmp4
|
2007-09-29 22:58:03 +02:00
|
|
|
|
|
|
|
USE_PERL5= yes
|
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= 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>
|
|
|
|
|
2007-10-04 03:25:18 +02:00
|
|
|
.if ${OSVERSION} >= 700000
|
2006-05-28 11:30:51 +02:00
|
|
|
IGNORE= unsupported at the moment
|
2007-10-04 03:25:18 +02:00
|
|
|
.elif ${OSVERSION} >= 600000
|
2006-05-28 11:30:51 +02:00
|
|
|
DISTFILES+= ${BOOT_DIST}
|
|
|
|
.else
|
2007-01-22 06:06:44 +01:00
|
|
|
IGNORE= unsupported at the moment
|
|
|
|
#DISTFILES+= ${BOOT_DIST5}
|
2005-08-26 07:23:21 +02:00
|
|
|
.endif
|
1999-11-10 18:25:29 +01:00
|
|
|
|
2006-01-06 10:36:41 +01: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
|
2007-12-30 12:37:20 +01:00
|
|
|
BOOT_GHC= ${BOOT_DIR}/bin/ghc-${PORTVERSION}
|
2002-01-07 15:39:00 +01:00
|
|
|
|
2007-12-30 12:37:20 +01:00
|
|
|
CONFIGURE_ARGS+= --with-ghc=${BOOT_GHC} --with-gcc=${CC}# \
|
|
|
|
# --with-gmp-includes=${LOCALBASE}/include --with-gmp-libraries=${LOCALBASE}/lib
|
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:
|
2007-12-30 12:37:20 +01:00
|
|
|
#CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
|
|
|
|
CONFIGURE_ENV+= CFLAGS= #empty
|
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}
|
2007-09-17 07:43:55 +02:00
|
|
|
EXCLUDELIBS= ALUT GLUT HGL OpenAL OpenGL X11
|
2000-10-13 22:17:46 +02:00
|
|
|
|
2004-01-15 23:56:11 +01:00
|
|
|
post-extract:
|
2007-09-17 07:43:55 +02:00
|
|
|
.if defined(WITHOUT_PROFILE)
|
2002-08-22 14:53:38 +02:00
|
|
|
@${ECHO} >>${WRKSRC}/mk/build.mk GhcLibWays=
|
|
|
|
.endif
|
2007-09-17 07:43:55 +02:00
|
|
|
@cd ${WRKSRC}/libraries && ${RM} -rf ${EXCLUDELIBS}
|
2002-08-22 14:53:38 +02:00
|
|
|
|
|
|
|
post-patch:
|
2004-01-15 23:56:11 +01:00
|
|
|
@${REINPLACE_CMD} s+%%LOCALBASE%%+${LOCALBASE}+ \
|
2007-01-22 06:06:44 +01:00
|
|
|
${WRKSRC}/rts/package.conf.in
|
2002-08-22 14:53:38 +02:00
|
|
|
|
2002-01-07 15:39:00 +01:00
|
|
|
pre-configure:
|
2007-12-30 12:37:20 +01:00
|
|
|
@(cd ${BOOT_DIR} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} --prefix=${BOOT_DIR})
|
|
|
|
@(cd ${BOOT_DIR} && ${GMAKE} install)
|
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
|
|
|
|
2007-09-17 07:43:55 +02:00
|
|
|
post-install:
|
|
|
|
@${MKDIR} ${PREFIX}/lib/ghc-${PORTVERSION}/cabal # cabalised hs-foo-ghc ports
|
|
|
|
|
2002-05-08 18:41:23 +02:00
|
|
|
.include <bsd.port.post.mk>
|