aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorGabor Pali <pgj@FreeBSD.org>2013-06-04 18:53:40 +0000
committerGabor Pali <pgj@FreeBSD.org>2013-06-04 18:53:40 +0000
commit109269205e521bb1d2d87678a391e5adefff88d6 (patch)
tree93f1f9278a9a48902904b7ff4a5ce711c10efe08 /lang
parentad7295cafd0e46ece6fcbf594ef39a767c296d0e (diff)
downloadports-109269205e521bb1d2d87678a391e5adefff88d6.tar.gz
ports-109269205e521bb1d2d87678a391e5adefff88d6.zip
Notes
Diffstat (limited to 'lang')
-rw-r--r--lang/ghc/Makefile14
-rw-r--r--lang/ghc/bsd.cabal.mk50
-rw-r--r--lang/ghc/bsd.cabal.options.mk7
-rw-r--r--lang/ghc/bsd.hackage.mk13
-rw-r--r--lang/ghc/distinfo8
-rw-r--r--lang/ghc/files/patch-aclocal.m419
-rw-r--r--lang/ghc/files/patch-compiler-main-Dynflags.hs11
-rw-r--r--lang/ghc/files/patch-configure.ac16
-rw-r--r--lang/ghc/files/patch-ghc.mk14
-rw-r--r--lang/ghc/files/patch-libraries-gen_contents_index10
-rw-r--r--lang/ghc/files/patch-libraries__base__GHC__Event__KQueue.hsc18
-rw-r--r--lang/ghc/pkg-descr30
-rw-r--r--lang/ghc/pkg-plist31
-rw-r--r--lang/hs-brainfuck/Makefile3
-rw-r--r--lang/hs-epic/Makefile4
-rw-r--r--lang/hs-epic/files/patch-Epic__Language.lhs23
-rw-r--r--lang/hs-unlambda/Makefile3
17 files changed, 165 insertions, 109 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 69dde180d91b..75aef1cfa7d0 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= ghc
-PORTVERSION= 7.4.2
-PORTREVISION= 1
+PORTVERSION= 7.6.3
CATEGORIES= lang haskell
MASTER_SITES= http://www.haskell.org/ghc/dist/${PORTVERSION}/:source \
${MASTER_SITE_LOCAL:S/$/:boot/}
@@ -22,7 +21,7 @@ HSCOLOUR_VERSION= 1.20.2
DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION}
EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION}
-CONFLICTS= ghc-6.8.* ghc-6.10.* ghc-6.12.* ghc-7.0.* ghc-7.2.*
+CONFLICTS= ghc-6.8.* ghc-6.10.* ghc-6.12.* ghc-7.0.* ghc-7.2.* ghc-7.4.*
USE_BZIP2= yes
LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
@@ -309,10 +308,10 @@ pre-configure:
post-install:
# cabalised hs-foo-ghc ports
- @${MKDIR} ${GHC_LIBDIR}/cabal
- @${MKDIR} ${DOCSDIR}/cabal
- @${MKDIR} ${EXAMPLESDIR}/cabal
- @${MKDIR} ${DATADIR}/cabal
+ @${MKDIR} ${PREFIX}/lib/cabal/ghc-${GHC_VERSION}
+ @${MKDIR} ${PREFIX}/share/cabal/ghc-${GHC_VERSION}
+ @${MKDIR} ${PREFIX}/share/doc/cabal/ghc-${GHC_VERSION}
+ @${MKDIR} ${PREFIX}/share/examples/cabal/ghc-${GHC_VERSION}
.if ${PORT_OPTIONS:MDOCS}
cd ${DOCSDIR}/html/libraries && ./gen_contents_index
.endif
@@ -320,6 +319,5 @@ post-install:
.if ${PORT_OPTIONS:MDOCS}
@${LN} -sf ${PREFIX}/bin/haddock-ghc-${GHC_VERSION} ${PREFIX}/bin/haddock
.endif
- @${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.include <bsd.port.mk>
diff --git a/lang/ghc/bsd.cabal.mk b/lang/ghc/bsd.cabal.mk
index 88f9e56d460b..1d95d0e665c1 100644
--- a/lang/ghc/bsd.cabal.mk
+++ b/lang/ghc/bsd.cabal.mk
@@ -21,7 +21,6 @@ NO_BUILD= yes
DIST_SUBDIR?= cabal
-CABAL_SETUP?= Setup.lhs
SETUP_CMD?= ./setup
ALEX_CMD?= ${LOCALBASE}/bin/alex
@@ -33,16 +32,16 @@ CABAL_DIRS+= ${DATADIR} ${EXAMPLESDIR} ${CABAL_LIBDIR}/${CABAL_LIBSUBDIR} \
GHC_HADDOCK_CMD=${LOCALBASE}/bin/haddock-ghc-${GHC_VERSION}
-CABAL_DOCSDIR= ${PREFIX}/share/doc/ghc-${GHC_VERSION}/cabal
+CABAL_DOCSDIR= ${PREFIX}/share/doc/cabal/ghc-${GHC_VERSION}
CABAL_DOCSDIR_REL= ${CABAL_DOCSDIR:S,^${PREFIX}/,,}
-DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION}/cabal/${DISTNAME}
+DATADIR= ${PREFIX}/share/cabal/ghc-${GHC_VERSION}/${DISTNAME}
DOCSDIR= ${CABAL_DOCSDIR}/${DISTNAME}
-EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION}/cabal/${DISTNAME}
+EXAMPLESDIR= ${PREFIX}/share/examples/cabal/ghc-${GHC_VERSION}/${DISTNAME}
GHC_LIB_DOCSDIR_REL= share/doc/ghc-${GHC_VERSION}/html/libraries
-CABAL_LIBDIR= ${PREFIX}/lib/ghc-${GHC_VERSION}/cabal
+CABAL_LIBDIR= ${PREFIX}/lib/cabal/ghc-${GHC_VERSION}
CABAL_LIBSUBDIR= ${DISTNAME}
CABAL_LIBDIR_REL= ${CABAL_LIBDIR:S,^${PREFIX}/,,}
@@ -82,6 +81,11 @@ USE_GCC= 4.6+
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
+.endif
+
.if defined(USE_ALEX)
BUILD_DEPENDS+= ${ALEX_CMD}:${PORTSDIR}/devel/hs-alex
CONFIGURE_ARGS+= --with-alex=${ALEX_CMD}
@@ -99,7 +103,7 @@ CONFIGURE_ARGS+= --with-c2hs=${C2HS_CMD}
.if defined(EXECUTABLE)
LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
-USES+= iconv
+USES+= iconv
.endif
.if defined(USE_CABAL)
@@ -146,7 +150,7 @@ HADDOCK_OPTS= # empty
BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour
HSCOLOUR_VERSION= 1.20.3
-HSCOLOUR_DATADIR= ${LOCALBASE}/share/ghc-${GHC_VERSION}/cabal/hscolour-${HSCOLOUR_VERSION}
+HSCOLOUR_DATADIR= ${LOCALBASE}/share/cabal/ghc-${GHC_VERSION}/hscolour-${HSCOLOUR_VERSION}
HADDOCK_OPTS+= --hyperlink-source --hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
.endif # HSCOLOUR
.endif # HADDOCK_AVAILABLE
@@ -190,28 +194,24 @@ post-patch::
${WRKSRC}/doc/configure.ac
.endif
-# Purge Haskell 98 (required for GHC 7.2 or later)
-.if defined(HASKELL98)
- @${REINPLACE_CMD} -E 's|haskell98[,]?||' \
- ${WRKSRC}/${PORTNAME}.cabal
-
- @${REINPLACE_CMD} 's|import List|import Data.List| ; \
- s|import Char|import Data.Char| ; \
- s|import Ratio|import Data.Ratio| ; \
- s|import Monad|import Control.Monad| ; \
- s|import IO|import System.IO.Error| ; \
- s|import Directory|import System.Directory| ; \
- s|import Maybe|import Data.Maybe| ; \
- s|import Array|import Data.Array|' \
- `${FIND} ${WRKSRC} -name '*.hs'`
-.endif
+_BUILD_SETUP= ${GHC_CMD} -o ${SETUP_CMD} -package Cabal --make
.if !target(do-configure)
do-configure:
.if !defined(METAPORT)
- cd ${WRKSRC} && ${GHC_CMD} --make ${CABAL_SETUP} -o setup -package Cabal
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
- ${SETUP_CMD} configure --ghc --prefix=${PREFIX} --extra-include-dirs="${LOCALBASE}/include" --extra-lib-dirs="${LOCALBASE}/lib" ${__handle_datadir__} ${CONFIGURE_ARGS}
+ @if [ -f ${WRKSRC}/Setup.hs ]; then \
+ cd ${WRKSRC} && ${_BUILD_SETUP} Setup.hs; fi
+ @if [ -f ${WRKSRC}/Setup.lhs ]; then \
+ cd ${WRKSRC} && ${_BUILD_SETUP} Setup.lhs; fi
+ @if [ -f ${WRKSRC}/${SETUP_CMD} ]; then \
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${SETUP_CMD} configure --ghc --prefix=${PREFIX} \
+ --extra-include-dirs="${LOCALBASE}/include" --extra-lib-dirs="${LOCALBASE}/lib" \
+ ${__handle_datadir__} ${CONFIGURE_ARGS}; \
+ else \
+ ${ECHO_MSG} "===> ${PKGNAME} configure fails: no setup program could be created."; \
+ exit 1; \
+ fi
.if ${PORT_OPTIONS:MDOCS}
.if defined(XMLDOCS) && defined(USE_AUTOTOOLS)
diff --git a/lang/ghc/bsd.cabal.options.mk b/lang/ghc/bsd.cabal.options.mk
index b222ac88fb94..0e339f0f612e 100644
--- a/lang/ghc/bsd.cabal.options.mk
+++ b/lang/ghc/bsd.cabal.options.mk
@@ -17,11 +17,12 @@ LOCALBASE?= /usr/local
GHC_CMD?= ${LOCALBASE}/bin/ghc
HADDOCK_CMD?= ${LOCALBASE}/bin/haddock
HSCOLOUR_CMD?= ${LOCALBASE}/bin/HsColour
-GHC_VERSION= 7.4.2
+GHC_VERSION= 7.6.3
HSCOLOUR_DESC?= Colorize generated documentation by HsColour
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))
OPTIONS_DEFINE+= DYNAMIC
@@ -32,6 +33,10 @@ OPTIONS_DEFAULT+= DYNAMIC
OPTIONS_DEFINE+= PROFILE
.endif
+.if !defined(IGNORE_LLVM)
+OPTIONS_DEFINE+= LLVM
+.endif
+
.if !exists(${GHC_CMD}) || ((exists(${HADDOCK_CMD}) && exists(${LOCALBASE}/lib/ghc-${GHC_VERSION}/html)) && !defined(NOPORTDOCS))
OPTIONS_DEFINE+= DOCS
OPTIONS_DEFAULT+= DOCS
diff --git a/lang/ghc/bsd.hackage.mk b/lang/ghc/bsd.hackage.mk
index 895c12edfb4f..0de54c23509d 100644
--- a/lang/ghc/bsd.hackage.mk
+++ b/lang/ghc/bsd.hackage.mk
@@ -24,6 +24,7 @@ ansi-terminal_port= devel/hs-ansi-terminal
ansi-wl-pprint_port= devel/hs-ansi-wl-pprint
arrows_port= devel/hs-arrows
asn1-data_port= devel/hs-asn1-data
+asn1-types_port= devel/hs-asn1-types
async_port= devel/hs-async
attempt_port= devel/hs-attempt
attoparsec_port= textproc/hs-attoparsec
@@ -95,6 +96,11 @@ csv_port= textproc/hs-csv
curl_port= ftp/hs-curl
darcs_port= devel/hs-darcs # executable
data-default_port= devel/hs-data-default
+data-default-class_port= devel/hs-data-default-class
+data-default-instances-base_port= devel/hs-data-default-instances-base
+data-default-instances-containers_port= devel/hs-data-default-instances-containers
+data-default-instances-dlist_port= devel/hs-data-default-instances-dlist
+data-default-instances-old-locale_port= devel/hs-data-default-instances-old-locale
data-lens_port= math/hs-data-lens
data-lens-template_port= math/hs-data-lens-template
data-pprint_port= devel/hs-data-pprint
@@ -118,6 +124,7 @@ enumerator_port= devel/hs-enumerator
epic_port= lang/hs-epic # executable
erf_port= math/hs-erf
errors_port= devel/hs-errors
+extensible-exceptions_port= devel/hs-extensible-exceptions
failure_port= devel/hs-failure
fast-logger_port= devel/hs-fast-logger
fastcgi_port= www/hs-fastcgi # lib_depends
@@ -139,6 +146,7 @@ git-annex_port= devel/hs-git-annex # executable
gitit_port= www/hs-gitit # executable
glade_port= devel/hs-glade
glib_port= devel/hs-glib
+GLURaw_port= x11-toolkits/hs-GLURaw
GLUT_port= x11-toolkits/hs-GLUT
groupoids_port= math/hs-groupoids
gstreamer_port= multimedia/hs-gstreamer
@@ -217,6 +225,7 @@ mime-mail_port= mail/hs-mime-mail
mime-types_port= mail/hs-mime-types
MissingH_port= devel/hs-MissingH
mmap_port= devel/hs-mmap
+mmorph_port= devel/hs-mmorph
monad-control_port= devel/hs-monad-control
monad-logger_port= devel/hs-monad-logger
monad-par_port= devel/hs-monad-par
@@ -240,6 +249,7 @@ ObjectName_port= devel/hs-ObjectName
oeis_port= www/hs-oeis
OpenAL_port= audio/hs-OpenAL
OpenGL_port= x11-toolkits/hs-OpenGL
+OpenGLRaw_port= x11-toolkits/hs-OpenGLRaw
optparse-applicative_port= devel/hs-optparse-applicative
pandoc_port= textproc/hs-pandoc # executable
pandoc-types_port= textproc/hs-pandoc-types
@@ -267,6 +277,7 @@ publicsuffixlist_port= net/hs-publicsuffixlist
pureMD5_port= security/hs-pureMD5
pwstore-fast_port= security/hs-pwstore-fast
QuickCheck_port= devel/hs-QuickCheck
+quickcheck-io_port= devel/hs-quickcheck-io
random_port= devel/hs-random
ranges_port= devel/hs-ranges
reactive_port= devel/hs-reactive
@@ -391,9 +402,7 @@ yaml_port= textproc/hs-yaml
yesod_port= www/hs-yesod
yesod-auth_port= www/hs-yesod-auth
yesod-core_port= www/hs-yesod-core
-yesod-default_port= www/hs-yesod-default
yesod-form_port= www/hs-yesod-form
-yesod-json_port= www/hs-yesod-json
yesod-persistent_port= www/hs-yesod-persistent
yesod-platform_port= www/hs-yesod-platform
yesod-routes_port= www/hs-yesod-routes
diff --git a/lang/ghc/distinfo b/lang/ghc/distinfo
index aaeaf1a5e791..79280774a9af 100644
--- a/lang/ghc/distinfo
+++ b/lang/ghc/distinfo
@@ -1,11 +1,7 @@
-SHA256 (ghc-7.4.2-src.tar.bz2) = f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d
-SIZE (ghc-7.4.2-src.tar.bz2) = 25836446
+SHA256 (ghc-7.6.3-src.tar.bz2) = bd43823d31f6b5d0b2ca7b74151a8f98336ab0800be85f45bb591c9c26aac998
+SIZE (ghc-7.6.3-src.tar.bz2) = 110763823
SHA256 (hscolour-1.20.2.tar.gz) = a52910f4c4c5576bed80e23aa914c71c3975d4cd9cd79a9c85e2617d97a8824a
SIZE (hscolour-1.20.2.tar.gz) = 25722
-SHA256 (ghc-7.4.1-i386-freebsd7-boot.tar.bz2) = e5cfc6c098179f8657d5cbf1a0fe70e8e9bfdde5a280c095e1dfc51d6e43731f
-SIZE (ghc-7.4.1-i386-freebsd7-boot.tar.bz2) = 45438870
-SHA256 (ghc-7.4.1-amd64-freebsd7-boot.tar.bz2) = 836e48e2a250a43b1230eac7f04821de86d915a51d0a36d6040b48cdd25ecedb
-SIZE (ghc-7.4.1-amd64-freebsd7-boot.tar.bz2) = 45310351
SHA256 (ghc-7.4.1-i386-freebsd8-boot.tar.bz2) = b58f5b346c2b261f6357f5f72a0bf2c3c766e914cffbe6f2aefb1abf67b9a797
SIZE (ghc-7.4.1-i386-freebsd8-boot.tar.bz2) = 45447162
SHA256 (ghc-7.4.1-amd64-freebsd8-boot.tar.bz2) = 536da87dc9e32e98f9258e29b3a44846db6ac786f26b426da4808c33fcc92914
diff --git a/lang/ghc/files/patch-aclocal.m4 b/lang/ghc/files/patch-aclocal.m4
index f288e6b77221..48c040f74504 100644
--- a/lang/ghc/files/patch-aclocal.m4
+++ b/lang/ghc/files/patch-aclocal.m4
@@ -1,5 +1,5 @@
---- aclocal.m4.orig 2012-06-06 19:10:25.000000000 +0200
-+++ aclocal.m4 2013-02-03 01:28:58.024638318 +0100
+--- aclocal.m4.orig 2013-04-18 23:22:46.000000000 +0200
++++ aclocal.m4 2013-04-29 20:32:30.000000000 +0200
@@ -19,6 +19,8 @@
# In bindists, we haven't called AC_CANONICAL_{BUILD,HOST,TARGET}
# so this justs uses $bootstrap_target.
@@ -15,10 +15,10 @@
;;
- x86_64)
+ x86_64|amd64)
- GET_ARM_ISA()
test -z "[$]2" || eval "[$]2=ArchX86_64"
;;
-@@ -186,7 +188,7 @@
+ powerpc)
+@@ -185,7 +187,7 @@
checkVendor() {
case [$]1 in
@@ -27,7 +27,7 @@
;;
*)
echo "Unknown vendor [$]1"
-@@ -1835,7 +1837,7 @@
+@@ -1889,7 +1891,7 @@
vax)
$2="vax"
;;
@@ -36,12 +36,3 @@
$2="x86_64"
;;
*)
-@@ -1875,7 +1877,7 @@
- freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
- $2="$1"
- ;;
-- freebsd8) # like i686-gentoo-freebsd8
-+ freebsd*) # like i686-gentoo-freebsd8
- $2="freebsd"
- ;;
- *)
diff --git a/lang/ghc/files/patch-compiler-main-Dynflags.hs b/lang/ghc/files/patch-compiler-main-Dynflags.hs
new file mode 100644
index 000000000000..ee76c6da2988
--- /dev/null
+++ b/lang/ghc/files/patch-compiler-main-Dynflags.hs
@@ -0,0 +1,11 @@
+--- compiler/main/DynFlags.hs.orig 2012-06-06 19:10:25.000000000 +0200
++++ compiler/main/DynFlags.hs 2013-02-08 15:23:36.000000000 +0100
+@@ -2390,7 +2390,7 @@
+ flag)
+ return dflags
+ HscLlvm
+- | not ((arch == ArchX86_64) && (os == OSLinux || os == OSDarwin)) &&
++ | not ((arch == ArchX86_64) && (os == OSLinux || os == OSDarwin || os == OSFreeBSD)) &&
+ (not opt_Static || opt_PIC)
+ ->
+ do addWarn ("Ignoring " ++ flag ++ " as it is incompatible with -fPIC and -dynamic on this platform")
diff --git a/lang/ghc/files/patch-configure.ac b/lang/ghc/files/patch-configure.ac
index 11139a3aa71d..e7504949abce 100644
--- a/lang/ghc/files/patch-configure.ac
+++ b/lang/ghc/files/patch-configure.ac
@@ -1,5 +1,5 @@
---- configure.ac.orig 2012-06-06 19:10:25.000000000 +0200
-+++ configure.ac 2013-02-02 17:31:55.193634655 +0100
+--- ./configure.ac.orig 2013-04-19 00:31:00.000000000 +0200
++++ ./configure.ac 2013-04-30 19:30:40.381161098 +0200
@@ -89,6 +89,59 @@
fi
WithGhc="$GHC"])
@@ -60,7 +60,17 @@
dnl ** Tell the make system which OS we are using
dnl $OSTYPE is set by the operating system to "msys" or "cygwin" or something
-@@ -717,7 +770,6 @@
+@@ -379,6 +432,9 @@
+ BuildingCrossCompiler=NO
+ PortingCompiler=NO
+ CrossCompiling=NO
++
++build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/-freebsd.*$/-freebsd/g'`
++
+ # If 'host' and 'target' differ, then this means we are building a cross-compiler.
+ if test "$host" != "$target" ; then
+ BuildingCrossCompiler=YES
+@@ -839,7 +895,6 @@
FP_VISIBILITY_HIDDEN
dnl ** check for librt
diff --git a/lang/ghc/files/patch-ghc.mk b/lang/ghc/files/patch-ghc.mk
index 81f97ee717ea..a8e806b6e47c 100644
--- a/lang/ghc/files/patch-ghc.mk
+++ b/lang/ghc/files/patch-ghc.mk
@@ -1,6 +1,6 @@
---- ghc.mk.orig 2012-06-06 19:10:25.000000000 +0200
-+++ ghc.mk 2013-01-30 16:24:02.000000000 +0100
-@@ -81,6 +81,7 @@
+--- ghc.mk.orig 2013-04-18 23:22:46.000000000 +0200
++++ ghc.mk 2013-04-29 20:42:16.000000000 +0200
+@@ -80,6 +80,7 @@
# Catch make if it runs away into an infinite loop
ifeq "$(MAKE_RESTARTS)" ""
else ifeq "$(MAKE_RESTARTS)" "1"
@@ -8,8 +8,8 @@
else
$(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug?)
endif
-@@ -574,12 +575,18 @@
- $(GHC_GENPRIMOP_DIR)
+@@ -595,12 +596,18 @@
+ MAYBE_GHCI=driver/ghci
endif
+ifeq "$(UseSystemLibFFI)" "YES"
@@ -20,7 +20,7 @@
+
BUILD_DIRS += \
driver \
- driver/ghci \
+ $(MAYBE_GHCI) \
driver/ghc \
driver/haddock \
- libffi \
@@ -28,7 +28,7 @@
includes \
rts
-@@ -971,6 +978,7 @@
+@@ -1005,6 +1012,7 @@
echo "BUILD_DOCBOOK_PDF = $(BUILD_DOCBOOK_PDF)" >> $(BIN_DIST_MK)
echo "BUILD_MAN = $(BUILD_MAN)" >> $(BIN_DIST_MK)
echo "GHC_CABAL_INPLACE = utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" >> $(BIN_DIST_MK)
diff --git a/lang/ghc/files/patch-libraries-gen_contents_index b/lang/ghc/files/patch-libraries-gen_contents_index
deleted file mode 100644
index a2785da02ed9..000000000000
--- a/lang/ghc/files/patch-libraries-gen_contents_index
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./libraries/gen_contents_index.orig 2012-02-01 19:10:32.000000000 +0100
-+++ ./libraries/gen_contents_index 2012-05-17 02:20:09.000000000 +0200
-@@ -47,7 +47,6 @@
- esac
-
- # Now create the combined contents and index pages
--echo $HADDOCK_ARGS
- $HADDOCK --gen-index --gen-contents -o . \
- -t "Haskell Hierarchical Libraries" \
- -p "prologue.txt" \
diff --git a/lang/ghc/files/patch-libraries__base__GHC__Event__KQueue.hsc b/lang/ghc/files/patch-libraries__base__GHC__Event__KQueue.hsc
new file mode 100644
index 000000000000..ffc1d3df082a
--- /dev/null
+++ b/lang/ghc/files/patch-libraries__base__GHC__Event__KQueue.hsc
@@ -0,0 +1,18 @@
+--- ./libraries/base/GHC/Event/KQueue.hsc.orig 2013-04-18 23:30:14.000000000 +0200
++++ ./libraries/base/GHC/Event/KQueue.hsc 2013-04-30 13:34:11.549185351 +0200
+@@ -235,10 +235,11 @@
+ #endif
+ deriving (Bits, Eq, Num, Show, Storable)
+
+-#{enum Filter, Filter
+- , filterRead = EVFILT_READ
+- , filterWrite = EVFILT_WRITE
+- }
++filterRead :: Filter
++filterRead = Filter (#const EVFILT_READ)
++
++filterWrite :: Filter
++filterWrite = Filter (#const EVFILT_WRITE)
+
+ data TimeSpec = TimeSpec {
+ tv_sec :: {-# UNPACK #-} !CTime
diff --git a/lang/ghc/pkg-descr b/lang/ghc/pkg-descr
index f6962bd4d3aa..520a29318997 100644
--- a/lang/ghc/pkg-descr
+++ b/lang/ghc/pkg-descr
@@ -1,16 +1,20 @@
-Haskell is the standard lazy purely functional programming language.
-The current language version is Haskell 98, agreed in December 1998,
-with a revised version published in January 2003.
+The Glasgow Haskell Compiler is a state-of-the-art, open source, compiler and
+interactive environment for the functional language Haskell. Highlights:
-The Glasgow Haskell Compiler is a robust, fully-featured, optimising
-compiler for the functional programming language Haskell 98 generating
-good code for a variety of platforms. GHC is a state-of-the-art
-programming suite for Haskell and compiles Haskell to either native code
-or C. It implements numerous experimental language extensions to
-Haskell, including concurrency, a foreign language interface, several
-type-system extensions, exceptions, and so on. GHC comes with a
-generational garbage collector, a space and time profiler, comprehensive
-set of libraries and an interactive system for convenient, quick
-development.
+ * Supports the entire Haskell 2010 language plus a wide variety of
+ extensions.
+ * Has particularly good support for concurrency and parallelism, including
+ support for Software Transactional Memory (STM).
+ * Generates fast code, particularly for concurrent programs.
+ * Works on several platforms including FreeBSD, Windows, Mac, Linux, most
+ varieties of Unix, and several different processor architectures.
+ * Has extensive optimisation capabilities, including inter-module optimisation.
+ * Compiles Haskell code either directly to native code or using LLVM as a
+ back-end. It can also generate C code as an intermediate target for porting
+ to new platforms. The interactive environment compiles Haskell to bytecode,
+ and supports execution of mixed bytecode/compiled programs.
+ * Profiling is supported, both by time/allocation and various kinds of heap
+ profiling.
+ * Comes with several libraries, and thousands more are available on Hackage.
WWW: http://www.haskell.org/ghc/
diff --git a/lang/ghc/pkg-plist b/lang/ghc/pkg-plist
index 7ab250d17dbe..8a1ccd4ce889 100644
--- a/lang/ghc/pkg-plist
+++ b/lang/ghc/pkg-plist
@@ -3,21 +3,26 @@ bin/ghc
bin/ghci
bin/ghc-pkg
bin/runhaskell
-bin/haddock-ghc-%%GHC_VERSION%%
-bin/ghci-%%GHC_VERSION%%
-bin/hsc2hs
-bin/ghc-pkg-%%GHC_VERSION%%
bin/runghc
-bin/ghc-%%GHC_VERSION%%
bin/hp2ps
bin/hpc
+bin/hsc2hs
+bin/ghc-%%GHC_VERSION%%
+bin/ghci-%%GHC_VERSION%%
+bin/ghc-pkg-%%GHC_VERSION%%
+bin/haddock-ghc-%%GHC_VERSION%%
+bin/runghc-%%GHC_VERSION%%
@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/%%GHC_LIBDIR%%/cabal || return true
-@exec /bin/mkdir -p %D/%%DOCSDIR%%/cabal || return true
-@exec /bin/mkdir -p %D/%%DATADIR%%/cabal || return true
-@exec /bin/mkdir -p %D/%%EXAMPLESDIR%%/cabal || return true
-@dirrm %%DATADIR%%/cabal
-@dirrm %%DATADIR%%
-@dirrm %%EXAMPLESDIR%%/cabal
-@dirrm %%EXAMPLESDIR%%
+@exec /bin/mkdir -p %D/lib/cabal/ghc-%%GHC_VERSION%% || return true
+@exec /bin/mkdir -p %D/share/cabal/ghc-%%GHC_VERSION%% || return true
+@exec /bin/mkdir -p %D/share/doc/cabal/ghc-%%GHC_VERSION%% || return true
+@exec /bin/mkdir -p %D/share/examples/cabal/ghc-%%GHC_VERSION%% || return true
+@dirrmtry lib/cabal/ghc-%%GHC_VERSION%%
+@dirrmtry lib/cabal
+@dirrmtry share/cabal/ghc-%%GHC_VERSION%%
+@dirrmtry share/cabal
+@dirrmtry share/doc/cabal/ghc-%%GHC_VERSION%%
+@dirrmtry share/doc/cabal
+@dirrmtry share/examples/cabal/ghc-%%GHC_VERSION%%
+@dirrmtry share/examples/cabal
diff --git a/lang/hs-brainfuck/Makefile b/lang/hs-brainfuck/Makefile
index f86e53030995..6acf241e2bb1 100644
--- a/lang/hs-brainfuck/Makefile
+++ b/lang/hs-brainfuck/Makefile
@@ -3,7 +3,7 @@
PORTNAME= brainfuck
PORTVERSION= 0.1
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= lang haskell
MAINTAINER= haskell@FreeBSD.org
@@ -11,7 +11,6 @@ COMMENT= Brainfuck interpreter written in Haskell
LICENSE= GPLv2
-CABAL_SETUP= Setup.hs
USE_CABAL= mtl
EXECUTABLE= bf
diff --git a/lang/hs-epic/Makefile b/lang/hs-epic/Makefile
index 4183c2962d0f..4587d6c6fa5a 100644
--- a/lang/hs-epic/Makefile
+++ b/lang/hs-epic/Makefile
@@ -2,7 +2,7 @@
PORTNAME= epic
PORTVERSION= 0.9.3
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= lang haskell
MAINTAINER= haskell@FreeBSD.org
@@ -10,8 +10,6 @@ COMMENT= Compiler for a simple functional language
LICENSE= BSD
-CABAL_SETUP= Setup.hs
-
USE_CABAL= mtl
USE_HAPPY= yes
diff --git a/lang/hs-epic/files/patch-Epic__Language.lhs b/lang/hs-epic/files/patch-Epic__Language.lhs
new file mode 100644
index 000000000000..cb047e5e75f5
--- /dev/null
+++ b/lang/hs-epic/files/patch-Epic__Language.lhs
@@ -0,0 +1,23 @@
+--- ./Epic/Language.lhs.orig 2012-02-28 00:44:29.000000000 +0100
++++ ./Epic/Language.lhs 2013-05-01 00:03:23.000000000 +0200
+@@ -5,6 +5,7 @@
+
+ > import Control.Monad
+ > import System.IO
++> import System.IO.Error
+ > import System.Directory
+ > import System.Environment
+
+@@ -377,9 +378,9 @@
+ > openTempFile dir "esc"
+
+ > environment :: String -> IO (Maybe String)
+-> environment x = catch (do e <- getEnv x
+-> return (Just e))
+-> (\_ -> return Nothing)
++> environment x = catchIOError (do e <- getEnv x
++> return (Just e))
++> (\_ -> return Nothing)
+
+ Some tests
+
diff --git a/lang/hs-unlambda/Makefile b/lang/hs-unlambda/Makefile
index 6c32487fc216..c046754d80f6 100644
--- a/lang/hs-unlambda/Makefile
+++ b/lang/hs-unlambda/Makefile
@@ -3,7 +3,7 @@
PORTNAME= unlambda
PORTVERSION= 0.1.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang haskell
MAINTAINER= haskell@FreeBSD.org
@@ -11,7 +11,6 @@ COMMENT= Unlambda interpreter
LICENSE= GPLv2
-CABAL_SETUP= Setup.hs
USE_CABAL= mtl
EXECUTABLE= unlambda