diff options
Diffstat (limited to 'lang/ghc5/Makefile')
-rw-r--r-- | lang/ghc5/Makefile | 58 |
1 files changed, 18 insertions, 40 deletions
diff --git a/lang/ghc5/Makefile b/lang/ghc5/Makefile index e9e9a335dee6..f2dfdcdfa479 100644 --- a/lang/ghc5/Makefile +++ b/lang/ghc5/Makefile @@ -5,11 +5,14 @@ # $FreeBSD$ PORTNAME= ghc -PORTVERSION= 4.08.2 +PORTVERSION= 5.02.1 CATEGORIES= lang MASTER_SITES= http://www.haskell.org/ghc/dist/${PORTVERSION}/ -DISTFILES= ghc-${PORTVERSION}-src${EXTRACT_SUFX} \ - ghc-${PORTVERSION}-x86-hc${EXTRACT_SUFX} + +SRC_DIST= ghc-${PORTVERSION}-src-1${EXTRACT_SUFX} +BOOT_DIST= ghc-${PORTVERSION}-i386-unknown-freebsd-boot${EXTRACT_SUFX} + +DISTFILES= ${SRC_DIST} ${BOOT_DIST} MAINTAINER= simonmar@microsoft.com @@ -18,7 +21,14 @@ USE_PERL5= yes USE_GMAKE= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --enable-hc-boot --libdir=${PREFIX}/lib/ghc +PLIST_SUB= GHC_VERSION=${PORTVERSION} + +# 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= @@ -27,43 +37,11 @@ CONFIGURE_TARGET= TMPDIR = ${WRKSRC}/tmp MAKE_ENV += TMPDIR=${TMPDIR} +pre-configure: + @(cd ${BOOT_DIR} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}) + @(cd ${BOOT_DIR} && ${MAKE} in-place) -# Note: -# - This port will bootstrap from pre-compiled C files. -# - ToDo: bootstrap using existing compiler, if one is installed. - -# XXX: we touch the happy-generated files to ensure that when we -# switch to non-bootstrapping mode for installation, the build system -# won't try to create them. -# -BOOT_COOKIE = ${WRKDIR}/.boot_done - -${BOOT_COOKIE}: +pre-build: @${MKDIR} ${TMPDIR} - @${CP} ${FILESDIR}/build.mk ${WRKSRC}/mk - @${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/ghc/compiler/rename/ParseIface.hs - @${TOUCH} ${TOUCH_FLAGS} ${WRKSRC}/ghc/compiler/parser/Parser.hs - @(cd ${WRKSRC}/glafp-utils; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} boot) - @(cd ${WRKSRC}/ghc; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} boot) - @(cd ${WRKSRC}/hslibs; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} boot) - @${TOUCH} ${TOUCH_FLAGS} ${BOOT_COOKIE} - -pre-build: ${BOOT_COOKIE} - -# After building the compiler, we go back and build the libraries from -# source using the compiler we just built. We also build profiling -# versions of the libraries at this point. - -REAL_LIBS_COOKIE = ${WRKDIR}/.real_libs_done - -${REAL_LIBS_COOKIE}: - @echo "GhcWithHscBuiltViaC=NO" >>${WRKSRC}/mk/build.mk - @echo "GhcLibWays=p" >>${WRKSRC}/mk/build.mk - @(cd ${WRKSRC}/ghc/rts; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean boot all) - @(cd ${WRKSRC}/ghc/lib; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean boot all) - @(cd ${WRKSRC}/hslibs; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean boot all) - @${TOUCH} ${TOUCH_FLAGS} ${REAL_LIBS_COOKIE} - -post-build: ${REAL_LIBS_COOKIE} .include <bsd.port.mk> |