aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2014-02-16 10:10:59 +0000
committerGabor Pali <pgj@FreeBSD.org>2014-02-16 10:10:59 +0000
commit6f9d344bc3d846afb199bf2c41102d4fb9ab962a (patch)
treeecd92caf0997d2efdff5e8170e078b82c90e41e0 /lang
parent12de8f1cacccce60d7f3d0cfc60e0291480527ba (diff)
downloadports-6f9d344bc3d846afb199bf2c41102d4fb9ab962a.tar.gz
ports-6f9d344bc3d846afb199bf2c41102d4fb9ab962a.zip
Notes
Diffstat (limited to 'lang')
-rw-r--r--lang/ghc/Makefile11
-rw-r--r--lang/ghc/bsd.cabal.mk7
-rw-r--r--lang/ghc/bsd.cabal.options.mk6
-rw-r--r--lang/ghc/pkg-plist2
4 files changed, 19 insertions, 7 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index f35555b721c0..74acf1908e22 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -44,13 +44,14 @@ MAKE_ENV= LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
# You can view below.
GNU_CONFIGURE= yes
-OPTIONS_DEFINE= PROFILE DYNAMIC DOCS
+OPTIONS_DEFINE= PROFILE DYNAMIC LLVM DOCS
OPTIONS_DEFAULT= PROFILE DYNAMIC DOCS
BOOT_DESC= Use installed GHC for bootstrapping
BOOTH_DESC= Use installed HsColour for bootstrapping
PROFILE_DESC= Add support for performance profiling
DYNAMIC_DESC= Add support for dynamic linking
+LLVM_DESC= Add support for generating code via LLVM
DOCS_DESC= Install HTML documentation
LOCALBASE?= /usr/local
@@ -131,6 +132,14 @@ CONFIGURE_ARGS+= --with-system-libffi \
--with-ffi-libraries=${LOCALBASE}/lib
.endif
+.if ${PORT_OPTIONS:MLLVM}
+BUILD_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32
+RUN_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32
+
+CONFIGURE_ARGS+= --with-opt=${LOCALBASE}/bin/opt32 \
+ --with-llc=${LOCALBASE}/bin/llc32
+.endif
+
.if empty(PORT_OPTIONS:MBOOT)
BOOT_DIR= ${WRKDIR}/ghc-${BOOT_GHC_VERSION}-boot
diff --git a/lang/ghc/bsd.cabal.mk b/lang/ghc/bsd.cabal.mk
index 49b39b4dfb3b..115b21d20638 100644
--- a/lang/ghc/bsd.cabal.mk
+++ b/lang/ghc/bsd.cabal.mk
@@ -86,8 +86,11 @@ CONFIGURE_ARGS+= --with-gcc=${CC} --with-ld=${LD} --with-ar=${AR} \
--with-ranlib=${RANLIB}
.if ${PORT_OPTIONS:MLLVM}
-BUILD_DEPENDS+= llvm>=3.0:${PORTSDIR}/devel/llvm
-CONFIGURE_ARGS+= --ghc-option=-fllvm
+CONFIGURE_ARGS+= --ghc-option=-fllvm \
+ --ghc-option=-pgmlo --ghc-option=${LOCALBASE}/bin/opt32 \
+ --ghc-option=-pgmlc --ghc-option=${LOCALBASE}/bin/llc32
+
+BUILD_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32
.endif
.if defined(USE_ALEX)
diff --git a/lang/ghc/bsd.cabal.options.mk b/lang/ghc/bsd.cabal.options.mk
index 0e339f0f612e..087ae340b477 100644
--- a/lang/ghc/bsd.cabal.options.mk
+++ b/lang/ghc/bsd.cabal.options.mk
@@ -24,12 +24,12 @@ DYNAMIC_DESC?= Add support for dynamic linking
PROFILE_DESC?= Add support for profiling
LLVM_DESC?= Use the LLVM backend for code generation
-.if !exists(${GHC_CMD}) || (exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.dyn_hi) && !defined(IGNORE_DYNAMIC))
+.if (!exists(${GHC_CMD}) || exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.dyn_hi)) && !defined(IGNORE_DYNAMIC)
OPTIONS_DEFINE+= DYNAMIC
OPTIONS_DEFAULT+= DYNAMIC
.endif
-.if !exists(${GHC_CMD}) || (exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.p_hi) && !defined(IGNORE_PROFILE))
+.if (!exists(${GHC_CMD}) || exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/ghc-${GHC_VERSION}/GHC.p_hi)) && !defined(IGNORE_PROFILE)
OPTIONS_DEFINE+= PROFILE
.endif
@@ -37,7 +37,7 @@ OPTIONS_DEFINE+= PROFILE
OPTIONS_DEFINE+= LLVM
.endif
-.if !exists(${GHC_CMD}) || ((exists(${HADDOCK_CMD}) && exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/html)) && !defined(NOPORTDOCS))
+.if (!exists(${GHC_CMD}) || (exists(${HADDOCK_CMD}) && exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/html))) && !defined(NOPORTDOCS)
OPTIONS_DEFINE+= DOCS
OPTIONS_DEFAULT+= DOCS
HADDOCK_AVAILABLE= yes
diff --git a/lang/ghc/pkg-plist b/lang/ghc/pkg-plist
index ed7e8b3f54be..601fe49d83d6 100644
--- a/lang/ghc/pkg-plist
+++ b/lang/ghc/pkg-plist
@@ -11,7 +11,7 @@ bin/ghci-%%GHC_VERSION%%
bin/ghc-pkg-%%GHC_VERSION%%
bin/haddock-ghc-%%GHC_VERSION%%
bin/runghc-%%GHC_VERSION%%
-man/man1/ghc.1.gz
+%%PORTDOCS%%man/man1/ghc.1.gz
@exec /bin/ln -sf %D/bin/haddock-ghc-%%GHC_VERSION%% %D/bin/haddock || return true
@unexec /bin/rm -f %D/bin/haddock || return true
@exec /bin/mkdir -p %D/lib/cabal/ghc-%%GHC_VERSION%% || return true