freebsd-ports/lang/ghc5/Makefile
Oliver Braun 08eb4c9f38 Upgrade to 5.04.1.
Note: This does *NOT* work on -current. The bootstrap tarball for -current is
      still missing. I am working on it. However I wanted to make this new
      version available on 4.7-R.

Submitted by:	maintainer
2002-09-17 20:09:56 +00:00

89 lines
2.2 KiB
Makefile

# New ports collection makefile for: ghc
# Date created: 28 August 1999
# Whom: Simon Marlow <simonmar@microsoft.com>
#
# $FreeBSD$
PORTNAME= ghc
PORTVERSION= 5.04.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}
.if defined(WITHOUT_PROFILE)
PLIST_SUB+= PROFILE="@comment "
.else
PLIST_SUB+= PROFILE=""
.endif
# 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-everything::
.if !defined(WITHOUT_PROFILE)
@${ECHO_CMD} "To build GHC without profiling libraries,"
@${ECHO_CMD} "hit Ctrl-C now and restart with 'make"
@$(ECHO_CMD) "WITHOUT_PROFILE=YES'."
.else
@${ECHO_CMD} "Building GHC without profiling libraries."
.endif
.if defined(WITHOUT_PROFILE)
post-extract:
@${ECHO} >>${WRKSRC}/mk/build.mk GhcLibWays=
.endif
post-patch:
@${PERL} -pi -e 's/DrIFT/DrIFT-ghc/g; \
s/DtdToHaskell/DtdToHaskell-ghc/g; \
s/Xtract/Xtract-ghc/g' \
${WRKSRC}/ghc/mk/config.mk \
${WRKSRC}/hslibs/tools/DrIFT/Makefile \
${WRKSRC}/hslibs/tools/DtdToHaskell/Makefile \
${WRKSRC}/hslibs/tools/Xtract/Makefile
pre-configure:
@(cd ${BOOT_DIR} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS})
@(cd ${BOOT_DIR} && ${MAKE} in-place)
pre-build:
@${MKDIR} ${TMPDIR}
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>