aboutsummaryrefslogtreecommitdiffstats
path: root/devel/hs-c2hs/Makefile
diff options
context:
space:
mode:
authorobraun <obraun@FreeBSD.org>2004-02-25 19:40:09 +0800
committerobraun <obraun@FreeBSD.org>2004-02-25 19:40:09 +0800
commit4c179af34ce71c75ca606bce831a2c34f3d5e433 (patch)
tree5a1f3a6be5cacd774c40bf2313ebadcf82a4e47a /devel/hs-c2hs/Makefile
parentc8a83821edbd586f2f8e2ba94acc1e1b41552289 (diff)
downloadfreebsd-ports-gnome-4c179af34ce71c75ca606bce831a2c34f3d5e433.tar.gz
freebsd-ports-gnome-4c179af34ce71c75ca606bce831a2c34f3d5e433.tar.zst
freebsd-ports-gnome-4c179af34ce71c75ca606bce831a2c34f3d5e433.zip
Make c2hs buildable with either ghc6 (default) or ghc5.
Submitted by: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
Diffstat (limited to 'devel/hs-c2hs/Makefile')
-rw-r--r--devel/hs-c2hs/Makefile27
1 files changed, 22 insertions, 5 deletions
diff --git a/devel/hs-c2hs/Makefile b/devel/hs-c2hs/Makefile
index 1e45103b9e06..41f470dd8ef7 100644
--- a/devel/hs-c2hs/Makefile
+++ b/devel/hs-c2hs/Makefile
@@ -14,17 +14,34 @@ PKGNAMEPREFIX= hs-
MAINTAINER= obraun@FreeBSD.org
COMMENT= C->Haskell, an Interface Generator for Haskell
-BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc
-RUN_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+OPTIONS= GHC5 "Build for ghc5" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GHC5)
+GHC= ghc-5.04.3
+GHCDEP= ghc5
+GHCMAJOR= 5
+.else
+GHC= ghc-6.2
+GHCDEP= ghc
+GHCMAJOR= 6
+.endif
+PKGNAMESUFFIX= -${GHCDEP}
+
+BUILD_DEPENDS= ${GHC}:${PORTSDIR}/lang/${GHCDEP}
+RUN_DEPENDS= ${GHC}:${PORTSDIR}/lang/${GHCDEP}
USE_SIZE= yes
HAS_CONFIGURE= yes
USE_GMAKE= yes
-GHC_VERSION= `${LOCALBASE}/bin/ghc --numeric-version`
+GHC_VERSION= `${LOCALBASE}/bin/${GHC} --numeric-version`
PLIST_SUB+= C2HS_VERSION="${PORTVERSION}" GHC_VERSION="${GHC_VERSION}"
+PLIST_SUB+= GHCMAJOR="${GHCMAJOR}"
-CONFIGURE_ARGS+= --prefix=${PREFIX} --enable-add-package
+CONFIGURE_ARGS+= --prefix=${PREFIX} --enable-add-package \
+ --with-hc=${GHC}
MAN1= c2hs-config.1 c2hs.1
@@ -36,4 +53,4 @@ post-install:
${INSTALL_MAN} c2hs-config.1 c2hs.1 ${MANPREFIX}/man/man1)
@${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>