Upgrading Pandoc

Clemens Lang cal at macports.org
Wed Mar 7 23:35:47 UTC 2018


Hi,

On Sun, Mar 04, 2018 at 02:18:24PM -0500, Mark Anderson wrote:
> So I started trying to move pandoc from some older version to 2.1.1
> but then I realized I needed to upgrade the Haskell compiler and
> libraries to do that. I got started, but wow, this is something else.
> Does anyone have tips about upgrading Haskell?

I'm attaching my current progress as a patch. It should apply cleanly to
the current master.

I didn't package stack. It has way too many dependencies to get this
done without automation, and unless somebody picks up
https://github.com/neverpanic/cabal2port (or re-writes a similar tool
from scratch), that's not happening.

Current state of this patch is that I'd need to commit this together
with a revbump of every haskell port (because otherwise the libraries
installed by these ports link against libraries built against the old
GHC, which will not work). That's probably simple enough, so if you want
to prepare a PR with my changes + the revbumps, that'd be welcome.

Of course, somebody would also have to test build this (or at least some
large and important haskell ports).

> Is there a magic to it or should I just keep slogging along and open a
> ticket?

It's magic, unfortunately. ;-)

-- 
Clemens
-------------- next part --------------
diff --git a/_resources/port1.0/group/haskell-1.0.tcl b/_resources/port1.0/group/haskell-1.0.tcl
index df8e404d4c..58db42cca8 100644
--- a/_resources/port1.0/group/haskell-1.0.tcl
+++ b/_resources/port1.0/group/haskell-1.0.tcl
@@ -53,7 +53,7 @@ set haskell.compiler_list {ghc}
 # updates.
 array set haskell.compiler_configuration {
     ghc {port       ghc
-         version    7.8.3
+         version    8.0.1
          compiler   ${prefix}/bin/ghc
          ghc-pkg    ${prefix}/bin/ghc-pkg}
 }
diff --git a/devel/haskell-platform/Portfile b/devel/haskell-platform/Portfile
index b10f76a316..ab814572f3 100644
--- a/devel/haskell-platform/Portfile
+++ b/devel/haskell-platform/Portfile
@@ -5,7 +5,7 @@ PortSystem      1.0
 name            haskell-platform
 
 if {$subport == $name} {
-    version         2014.2.0.0
+    version         8.0.1
     categories      devel haskell
     maintainers     cal openmaintainer
     description     \
@@ -117,9 +117,9 @@ proc haskell_platform_tool {pkgname pkgversion pkgrevision {block {}}} {
 # Additional Platform Libraries #
 #################################
 
-haskell_platform_port async 2.0.1.5 1 {
-    checksums               rmd160  0ec360bc373c4ca0b3c7617ec611f2414804e9cd \
-                            sha256  cd13ac558f4f63e567100805770648e89307a3210852b17038c9be4fcc3aa83c
+haskell_platform_port async 2.1.0 0 {
+    checksums               rmd160  6b82f7ecc2b76b795b3a75860f741556b977e830 \
+                            sha256  93c37611f9c68b5cdc8cd9960ae77a7fbc25da83cae90137ef1378d857f22c2f
 
     depends_lib-append      port:hs-stm
 
@@ -137,11 +137,12 @@ haskell_platform_port async 2.0.1.5 1 {
         automatically killed when their parent dies (see withAsync).
 }
 
-haskell_platform_port attoparsec 0.10.4.0 4 {
-    checksums               rmd160  1fc9845e60fb0cddc9ffa8838c446b3046cd3522 \
-                            sha256  b6b84e0dbd1c3beec1dedea578ac2f4d62afbe66b383582b7b3349406866d346
+haskell_platform_port attoparsec 0.13.0.2 0 {
+    checksums               rmd160  93333785e4716309332b659d2b789cac4bbf7d48 \
+                            sha256  69f7f381f644ba4a6f348bbff9b2b4280b7b602e8e25e59eadb6e30ad5f2ec6a
 
-    depends_lib-append      port:hs-text
+    depends_lib-append      port:hs-text \
+                            port:hs-scientific
 
     description             Fast combinator parsing for bytestrings and text
     long_description        \
@@ -150,9 +151,9 @@ haskell_platform_port attoparsec 0.10.4.0 4 {
         formats.
 }
 
-haskell_platform_port case-insensitive 1.1.0.3 1 {
-    checksums               rmd160  351ebf0ae84c4c580b910dbd3ed0828b309874c7 \
-                            sha256  7b255fe63155d53ab84b248ab5ba9306fd4bec47a6198e3275cf9cb41c4d263b
+haskell_platform_port case-insensitive 1.2.0.6 0 {
+    checksums               rmd160  bc4b78cc1c8e812ea243453f26e0bb4697d68d96 \
+                            sha256  bc7b53517fefc475311bfe6dbab8ade47ab8df11a59079653aa3271e9ffcb1c4
 
     depends_lib-append      port:hs-hashable \
                             port:hs-text
@@ -165,9 +166,9 @@ haskell_platform_port case-insensitive 1.1.0.3 1 {
         insensitive to cases.
 }
 
-haskell_platform_port fgl 5.5.0.1 1 {
-    checksums               rmd160  c6c1f89db51d8d3ce6687dab13109c7f40c9c10c \
-                            sha256  aa61664ba38db3e54124b702b1ee92a72a569c981b759e48cfb567078b038763
+haskell_platform_port fgl 5.5.2.3 0 {
+    checksums               rmd160  8371f511eadac788974737f0fad7ec157eadc4b3 \
+                            sha256  f4113b5221917feb6389494bf8b7b6221ee00f322b6c25fc25a25795549f9e20
 
     depends_lib-append      port:hs-mtl
 
@@ -175,21 +176,17 @@ haskell_platform_port fgl 5.5.0.1 1 {
     long_description        ${description}
 }
 
-haskell_platform_port GLUT 2.5.1.1 1 {
-    checksums               rmd160  b6e4bad4109307a614c3ba93aa1f3f8857ae45dc \
-                            sha256  4a8177e154ead5a7bcc110f8fe408f9cf720783dde024ac1936cd95b659b2d59
-
-    depends_lib-append      port:hs-opengl
+haskell_platform_port fixed 0.2.1.1 0 {
+    checksums               rmd160  0efb4f13fc43f916ffa50247902af6f12010e71e \
+                            sha256  24a9e1e251998c9d06037bb771d9eab2980a91132de59a19d0166a1c51e715e2
 
-    description             A binding for the OpenGL Utility Toolkit
-    long_description        \
-        A Haskell binding for the OpenGL Utility Toolkit, a window system \
-        independent toolkit for writing OpenGL programs.
+    description             Signed 15.16 precision fixed point arithmetic
+    long_description        ${description}
 }
 
-haskell_platform_port GLURaw 1.4.0.1 1 {
-    checksums               rmd160  1fa7a906c6f99d9540b200de038a2a734e576cea \
-                            sha256  9655644beb54ff8fac68f2e0fd8a8e9a1e8409272e2e4c963ccce9bcd60e0ecc
+haskell_platform_port GLURaw 2.0.0.1 0 {
+    checksums               rmd160  309220ac689d5576e99be29bd2a54c2affae730a \
+                            sha256  d561b2e170e6048f7f1b18647fa569f28684291e25924b41f169ecfdc281ab40
 
     depends_lib-append      port:hs-openglraw
 
@@ -200,9 +197,29 @@ haskell_platform_port GLURaw 1.4.0.1 1 {
         a nicer interface.
 }
 
-haskell_platform_port hashable 1.2.2.0 1 {
-    checksums               rmd160  33f9040f2afcb93d6475d8872aef4c164a4cff5e \
-                            sha256  033a90b0369af59bf922d0c2af8d73a18432b46b0a47607f436d38f873a88e21
+haskell_platform_port GLUT 2.7.0.7 0 {
+    checksums               rmd160  cff3ad049dbb6b49738b27833ce9217abafa9ca0 \
+                            sha256  3a9f292f6a417c90f39065c7e0d441798b99276ccdd1c0f3feff50955b937c93
+
+    depends_lib-append      port:hs-opengl
+
+    description             A binding for the OpenGL Utility Toolkit
+    long_description        \
+        A Haskell binding for the OpenGL Utility Toolkit, a window system \
+        independent toolkit for writing OpenGL programs.
+}
+
+haskell_platform_port half 0.2.2.3 0 {
+    checksums               rmd160  25b4611e534af7fdbbf65fd5e4e1af69e2065048 \
+                            sha256  85c244c80d1c889a3d79073a6f5a99d9e769dbe3c574ca11d992b2b4f7599a5c
+
+    description             Half-precision floating-point
+    long_description        ${description}
+}
+
+haskell_platform_port hashable 1.2.4.0 0 {
+    checksums               rmd160  cfca5318aa0394cb4573b39f0b42e067c1b6e9a8 \
+                            sha256  fb9671db0c39cd48d38e2e13e3352e2bf7dfa6341edfe68789a1753d21bb3cf3
 
     depends_lib-append      port:hs-text
 
@@ -214,10 +231,11 @@ haskell_platform_port hashable 1.2.2.0 1 {
         a way to combine hash values.
 }
 
-haskell_platform_port haskell-src 1.0.1.6 1 {
-    checksums               rmd160  649a0f9f116cb90f03411a9e8d53b17409c38134 \
-                            sha256  c7c556366025d9895d1110ecfa30a29e29d7d0a8cb447716fe601e4ff5da4cef
+haskell_platform_port haskell-src 1.0.2.0 0 {
+    checksums               rmd160  d948608604247fd77a3fa4b3041e9da89ced36f6 \
+                            sha256  2a25ee5729230edddb94af8d9881efbc1d8798bd316097f4646749cb2fa491a6
 
+    depends_build-append    port:hs-happy
     depends_lib-append      port:hs-syb
 
     description             Support for manipulating Haskell source code
@@ -228,7 +246,7 @@ haskell_platform_port haskell-src 1.0.1.6 1 {
         of this package are to parse or generate Haskell 98 code.
 }
 
-haskell_platform_port html 1.0.1.2 6 {
+haskell_platform_port html 1.0.1.2 7 {
     checksums               rmd160  55d95a42c297c9c4b0b0c3bbd077a5ed59e48878 \
                             sha256  0c35495ea33d65e69c69bc7441ec8e1af69fbb43433c2aa3406c0a13a3ab3061
 
@@ -237,13 +255,13 @@ haskell_platform_port html 1.0.1.2 6 {
         This package contains a combinator library for constructing HTML documents.
 }
 
-haskell_platform_port HTTP 4000.2.10 1 {
-    checksums               rmd160  b1e3a1aec27c3e09fe1f93f93ab717cc4e576504 \
-                            sha256  efde6d9f2e8cd7b72068579f0a75449703c0fa7aee76dfc0f3af175295a127d1
+haskell_platform_port HTTP 4000.3.3 0 {
+    checksums               rmd160  cb0c32394df7986a4b91534ccf3026a07c3d59c4 \
+                            sha256  bbada3c2088dc1384234cdbc1bb6089ea588da068a6a38878ea259dd19de9bf2
 
     depends_lib-append      port:hs-network \
-                            port:hs-mtl \
-                            port:hs-parsec
+                            port:hs-network-uri \
+                            port:hs-mtl
 
     description             A library for client-side HTTP
     long_description        \
@@ -254,9 +272,9 @@ haskell_platform_port HTTP 4000.2.10 1 {
         the implementation is all written in Haskell.
 }
 
-haskell_platform_port HUnit 1.2.5.2 3 {
-    checksums               rmd160  f6ac9ac12c152609174ea80a3a0c694210c81594 \
-                            sha256  0af5ad34dba27de48b94ce6d5f7ee3aa6af6183bdc4a3967b811e28520369a41
+haskell_platform_port HUnit 1.3.1.1 0 {
+    checksums               rmd160  0198586d9234183b90f82dbce709f9355875ad2e \
+                            sha256  93e5fc4290ab685b469209f04d9858338ffff486e15c23a11260c47e32da8ef8
 
     description             A unit testing framework for Haskell
     long_description        \
@@ -264,9 +282,12 @@ haskell_platform_port HUnit 1.2.5.2 3 {
         tool for Java, see: http://www.junit.org.
 }
 
-haskell_platform_port mtl 2.1.3.1 1 {
-    checksums               rmd160  f6432fb7e64d66eff69f02ccca9fc30ac5dce502 \
-                            sha256  77af766957fb49361fe63446f272a698bddb13398669edc363022e5c2517f6f6
+haskell_platform_port mtl 2.2.1 0 {
+    patch.pre_args          -p1
+    patchfiles              59498406a6338d93891dec3abcbdde2cb7e41325.patch
+
+    checksums               rmd160  61f2af56029c85c40a66a04cbd8ff1b97e0f90d9 \
+                            sha256  cae59d79f3a16f8e9f3c9adc1010c7c6cdddc73e8a97ff4305f6439d855c8dc5
 
     description             Monad classes, using functional dependencies
     long_description        \
@@ -276,9 +297,9 @@ haskell_platform_port mtl 2.1.3.1 1 {
         School of Functional Programming, 1995
 }
 
-haskell_platform_port network 2.4.2.3 1 {
-    checksums               rmd160  38f20be22e51a902a00416bad1e63480316e8348 \
-                            sha256  801b9c652dae626bf4a96175162b1290e7fe7ff20d802d62434d5ae1d363c16d
+haskell_platform_port network 2.6.2.1 0 {
+    checksums               rmd160  3bcc893f68ca44f71cffedd95464ad0217b451c2 \
+                            sha256  a3fda15c9bbe2c7274d97f40398c6cf8d1d3a9fe896fbf6531e1bfc849bb1bfa
 
     depends_lib-append      port:hs-parsec
 
@@ -286,12 +307,36 @@ haskell_platform_port network 2.4.2.3 1 {
     long_description        ${description}
 }
 
-haskell_platform_port OpenGL 2.9.2.0 1 {
-    checksums               rmd160  b238630bd16d37485c58835a643d965ac6c61ef2 \
-                            sha256  1758f6cacc9ea8f0d410fd0abc1a19f2a50dffdb62736d66d4e62b20619545e9
+haskell_platform_port network-uri 2.6.1.0 0 {
+    checksums               rmd160  591880177d5a19fad3a62c5b61af3e9e33cea94f \
+                            sha256  423e0a2351236f3fcfd24e39cdbc38050ec2910f82245e69ca72a661f7fc47f0
+
+    depends_lib-append      port:hs-parsec
+
+    description             URI manipulation
+    long_description        \
+        This package provides an URI manipulation interface.
+}
+
+haskell_platform_port ObjectName 1.1.0.1 0 {
+    checksums               rmd160  53d05e3d9dc597b41f152288ae9b0754f4067b8d \
+                            sha256  72dbef237580fd4e8567de2de752835bbadd3629f486d1586486d49a49aad210
+
+    description             Explicitly handled object names
+    long_description        \
+        This tiny package contains the class ObjectName, which corresponds to \
+        the general notion of explicitly handled identifiers for API objects, \
+        e.g. a texture object name in OpenGL or a buffer object name in OpenAL.
+}
+
+haskell_platform_port OpenGL 3.0.0.2 0 {
+    checksums               rmd160  ed26ed24240cd8ecca1ba7d0c2e8eb5800146475 \
+                            sha256  13ee4a24d7caad61d3b63146be6620b523bde5b79f223c291f9f25ae9fd9681a
 
     depends_lib-append      port:hs-gluraw \
+                            port:hs-objectname \
                             port:hs-openglraw \
+                            port:hs-statevar \
                             port:hs-text
 
     description             A binding for the OpenGL graphics system
@@ -300,9 +345,13 @@ haskell_platform_port OpenGL 2.9.2.0 1 {
         its accompanying utility library (GLU, version 1.3).
 }
 
-haskell_platform_port OpenGLRaw 1.5.0.0 1 {
-    checksums               rmd160  6ede61cb59090ede7d3ec1df41311a8e14496080 \
-                            sha256  852aa5229722269d70daed3c04b95e9dc7b7013efd62ebc4f2873a81768b9a12
+haskell_platform_port OpenGLRaw 3.1.0.0 0 {
+    checksums               rmd160  a975c57257dc9302d95a62a9bd95e266af7164ad \
+                            sha256  414364cacce1c7601c93b388dbb73c5bdc76e5b0f3754ee61d0a5b94ccf9f3ce
+
+    depends_lib-append      port:hs-fixed \
+                            port:hs-half \
+                            port:hs-text
 
     description             A raw binding for the OpenGL graphics system
     long_description        \
@@ -318,17 +367,17 @@ haskell_platform_port OpenGLRaw 1.5.0.0 1 {
         thrown.
 }
 
-haskell_platform_port parallel 3.2.0.4 1 {
-    checksums               rmd160  4bc31de0b3dd63ca8d24c967f32a2ee40f0a2d64 \
-                            sha256  8cdb637fc04e4dd62f9deb0fe3c191b8068526009960f297f54dc9cf5616146d
+haskell_platform_port parallel 3.2.1.0 0 {
+    checksums               rmd160  1401fc3ec776251484ca3238301785fc746c7387 \
+                            sha256  4de3cdbb71dfd13cbb70a1dc1d1d5cf34fbe9828e05eb02b3dc658fdc2148526
 
     description             Parallel programming library
     long_description        This package provides a library for parallel programming.
 }
 
-haskell_platform_port parsec 3.1.5 1 {
-    checksums               rmd160  4d27dffd266c38cc3266ea17b792e00f180b3968 \
-                            sha256  c572245d72bc3aff3491ce4f89215fcaa1e01c5e7b280d4c105a87db31793cb8
+haskell_platform_port parsec 3.1.9 0 {
+    checksums               rmd160  366255e648b0b9e20a555e942c71f53014a5a513 \
+                            sha256  71f711d24c89581a43b8bc2d3ed56a1a802bbf1cd0b083bc34636c232b0342c9
 
     depends_lib-append      port:hs-mtl \
                             port:hs-text
@@ -342,19 +391,26 @@ haskell_platform_port parsec 3.1.5 1 {
         monads, and it is also parametric in the input stream type.
 }
 
-haskell_platform_port primitive 0.5.2.1 1 {
-    checksums               rmd160  b456047baa641acc897a871cc2212f9f3a2c576f \
-                            sha256  0e516b81c2ef2c96d47dc40561663cc2cbfece0f135948e77e9b53025ff1c3ee
+haskell_platform_port primitive 0.6.1.0 0 {
+    patch.pre_args          -p1
+    patchfiles              0359ea15842d4e6bef27c0d621964507e4bfd219.patch \
+                            83d3d23d2fa1583ecd1b59464cc889924e1b5fff.patch \
+                            1af89788d5c9ab7a0a93ff6764e1770e6c80d957.patch
+
+    checksums               rmd160  001324da6b15c9220304ab23d0cba166fa3e19d9 \
+                            sha256  93731fa72eaf74e8e83453f080828e18cec9fbc82bee91b49ba8b61c043d38c8
 
     description             Primitive memory-related operations
     long_description        This package provides various primitive memory-related operations.
 }
 
-haskell_platform_port QuickCheck 2.6 3 {
-    checksums               rmd160  94bab2dcefdd7a6eddd5af7211db1babf39e0df8 \
-                            sha256  8001c00a1892714d914e5007ba72cdd428c1ea4c6b8418c6cb5e7809753d970d
+haskell_platform_port QuickCheck 2.8.2 0 {
+    checksums               rmd160  d6aefde8860096ec06d66bbe1f2c451229aedb6b \
+                            sha256  98c64de1e2dbf801c54dcdcb8ddc33b3569e0da38b39d711ee6ac505769926aa
+
+    depends_lib-append      port:hs-tf-random
 
-    depends_lib-append      port:hs-random
+    configure.args-append   -f base4point8
 
     description             Automatic testing of Haskell programs
     long_description        \
@@ -364,9 +420,9 @@ haskell_platform_port QuickCheck 2.6 3 {
         that the properties hold in a large number of randomly generated cases.
 }
 
-haskell_platform_port random 1.0.1.1 5 {
-    checksums               rmd160  a13a4d7fefd15611cf863f11caf212efede320c3 \
-                            sha256  df7c3b405de0ac27a2ee8fdc8dad87cb42e8eac01fef53861e43bc47c8111559
+haskell_platform_port random 1.1 0 {
+    checksums               rmd160  483867e6a218fd5aee0ed5156c81b90169de9fd1 \
+                            sha256  b718a41057e25a3a71df693ab0fe2263d492e759679b3c2fea6ea33b171d3a5a
 
     description             random number library
     long_description        \
@@ -374,7 +430,7 @@ haskell_platform_port random 1.0.1.1 5 {
         the ability to split random number generators.
 }
 
-haskell_platform_port regex-base 0.93.2 5 {
+haskell_platform_port regex-base 0.93.2 6 {
     checksums               rmd160  c009e193dd453666c7c3b585a25f3a8add7ec6b6 \
                             sha256  20dc5713a16f3d5e2e6d056b4beb9cfdc4368cd09fd56f47414c847705243278
 
@@ -384,7 +440,7 @@ haskell_platform_port regex-base 0.93.2 5 {
     long_description        Interface API for regex-posix,pcre,parsec,tdfa,dfa
 }
 
-haskell_platform_port regex-compat 0.95.1 5 {
+haskell_platform_port regex-compat 0.95.1 6 {
     checksums               rmd160  b2fe02ca3c4e9027b2d433c8a265b19a85c8bd17 \
                             sha256  d57cb1a5a4d66753b18eaa37a1621246f660472243b001894f970037548d953b
 
@@ -395,7 +451,7 @@ haskell_platform_port regex-compat 0.95.1 5 {
     long_description        One module layer over regex-posix to replace Text.Regex
 }
 
-haskell_platform_port regex-posix 0.95.2 4 {
+haskell_platform_port regex-posix 0.95.2 5 {
     checksums               rmd160  7ee59eb760bb8c0c7fe17e17d90eb0623b9fd5bb \
                             sha256  56019921cd4a4c9682b81ec614236fea816ba8ed8785a1640cd66d8b24fc703e
 
@@ -405,9 +461,24 @@ haskell_platform_port regex-posix 0.95.2 4 {
     long_description        The posix regex backend for regex-base
 }
 
-haskell_platform_port split 0.2.2 3 {
-    checksums               rmd160  7d4fe221283836386807f0e73a90df1255061f6f \
-                            sha256  f9cf9e571357f227aed5be9a78f5bbf78ef55c99df2edf7fdc659acc1f904375
+haskell_platform_port scientific 0.3.4.6 0 {
+    checksums               rmd160  4bfb75065ac6f4bd08a57fbc5b0b57740bd475f9 \
+                            sha256  bdd15c72b379ceaef5f30d7113e6971a47090a285f46d1d44528e328061df382
+
+    depends_lib-append      port:hs-hashable \
+                            port:hs-text \
+                            port:hs-vector
+
+    description             Numbers represented using scientific notation
+    long_description        \
+        Data.Scientific provides the number type Scientific. Scientific numbers \
+        are arbitrary precision and space efficient. They are represented using \
+        scientific notation.
+}
+
+haskell_platform_port split 0.2.3 0 {
+    checksums               rmd160  07ecb46e17402354b59df4c0dd27e1d1d3215314 \
+                            sha256  a6d100e433fa27eda72127475ba9c55481ca4105cfbb6ff55b67023d00ccead9
 
     description             Combinator library for splitting lists.
     long_description        \
@@ -415,17 +486,29 @@ haskell_platform_port split 0.2.2 3 {
         the "split" function found in several mainstream languages.
 }
 
-haskell_platform_port stm 2.4.2 3 {
-    checksums               rmd160  7d49257f7e2de7cf18e02dc3ceeb4619d7980dd8 \
-                            sha256  c8ee3cd64c266133902619cfff2d04e5f66206f91dbce8dd1182037fbe4858db
+haskell_platform_port StateVar 1.1.0.4 0 {
+    checksums               rmd160  2ebc45624d7c7559dd95b92c14771da7967818ad \
+                            sha256  7ad68decb5c9a76f83c95ece5fa13d1b053e4fb1079bd2d3538f6b05014dffb7
+
+    depends_lib-append      port:hs-stm
+
+    description             State variables
+    long_description        \
+        This package contains state variables, which are references in the IO \
+        monad, like IORefs or parts of the OpenGL state.
+}
+
+haskell_platform_port stm 2.4.4.1 0 {
+    checksums               rmd160  cf2d08df7a1d7b05ae793a28c548a7014f595cd1 \
+                            sha256  8f999095ed8d50d2056fc6e185035ee8166c50751e1af8de02ac38d382bf3384
 
     description             Software Transactional Memory
     long_description        A modular composable concurrency abstraction.
 }
 
-haskell_platform_port syb 0.4.1 1 {
-    checksums               rmd160  4ed2329f3c915adb91fb5b1f6b3735e219d1fdd6 \
-                            sha256  aa32cb3d9a0cbcfb24ac1c5d567886e8908dd017fd009ffd446bff86732670d2
+haskell_platform_port syb 0.6 0 {
+    checksums               rmd160  b482c5236cdca6ef315fed2830c6937e8a9890b7 \
+                            sha256  a38d1f7e6a40e2c990fec85215c45063a508bf73df98a4483ec78c5025b66cdc
 
     description             Scrap Your Boilerplate
     long_description        \
@@ -437,9 +520,9 @@ haskell_platform_port syb 0.4.1 1 {
         a variety of traversals.
 }
 
-haskell_platform_port text 1.1.0.0 1 {
-    checksums               rmd160  b57efc9cbf277cd914a9e148129e42ae861771b8 \
-                            sha256  80f1ada824f0e3886bb49dc7fd128707ca1a34e06bbf4419873b1677c4d7ba92
+haskell_platform_port text 1.2.2.1 0 {
+    checksums               rmd160  e45ea659385824258fffd634b7c141e567885d6e \
+                            sha256  1addb1bdf36293c996653c9a0a320b5491714495862d997a23fb1ecd41ff395b
 
     description             An efficient packed Unicode text type
     long_description        \
@@ -447,9 +530,26 @@ haskell_platform_port text 1.1.0.0 1 {
         with a powerful loop fusion optimization framework.
 }
 
-haskell_platform_port unordered-containers 0.2.4.0 1 {
-    checksums               rmd160  0d62b6b8f95e65890e07934413cd1377ed1e85e5 \
-                            sha256  34eaeb0c96d84169aca7085cf21f89bedb4bdb4de2ac78358a087faeea93cdf4
+haskell_platform_port tf-random 0.5 1 {
+    checksums               rmd160  bd58a02f7e68c4fd4e51591fa4ddad93d416d717 \
+                            sha256  2e30cec027b313c9e1794d326635d8fc5f79b6bf6e7580ab4b00186dadc88510
+
+    depends_lib-append      port:hs-primitive \
+                            port:hs-random
+
+    description             High-quality splittable pseudorandom number generator
+    long_description        \
+        This package contains an implementation of a high-quality splittable \
+        pseudorandom number generator. The generator is based on \
+        a cryptographic hash function built on top of the ThreeFish block \
+        cipher. See the paper Splittable Pseudorandom Number Generators Using \
+        Cryptographic Hashing by Claessen, Pałka for details and the rationale \
+        of the design.
+}
+
+haskell_platform_port unordered-containers 0.2.7.0 0 {
+    checksums               rmd160  2458771be54ad1e26c499933585df2c927d9f3d6 \
+                            sha256  6503226d24069698bbb454c15c53a7f9f245aba228e142c6b6ab2d31cecc5ef6
 
     depends_lib-append      port:hs-hashable
 
@@ -460,9 +560,13 @@ haskell_platform_port unordered-containers 0.2.4.0 1 {
         quantities and high speed.
 }
 
-haskell_platform_port vector 0.10.9.1 1 {
-    checksums               rmd160  885ba057a05219ae6a35170539c68996d2074668 \
-                            sha256  205656e9741aad406e427e988dbf1665bf5dbdf3e9d574e309c274be4e06bde5
+haskell_platform_port vector 0.11.0.0 0 {
+    patch.pre_args          -p1
+    patchfiles              552ff11c2bd905faff53b2e34900cbbbf59955c8.patch \
+                            6c17dd6fadc5e7e3e09f7892380ce1339f296efd.patch
+
+    checksums               rmd160  7d4b4839385bcfed622b9be1d40801b7b33f03b2 \
+                            sha256  0a5320ed44c3f2b04b7f61e0f63f4fcd5b337524e601e01d5813ace3f5a432e4
 
     depends_lib-append      port:hs-primitive
 
@@ -472,9 +576,9 @@ haskell_platform_port vector 0.10.9.1 1 {
         immutable), with a powerful loop optimisation framework.
 }
 
-haskell_platform_port zlib 0.5.4.1 4 {
-    checksums               rmd160  9ed49e79e239604958a9c385cca75747fafc2713 \
-                            sha256  cca365e4c52c90be41a5754943134da5ce6c60bb52fa00c128fd118e0505a550
+haskell_platform_port zlib 0.6.1.1 0 {
+    checksums               rmd160  244614e96ea44529025f5343a768bd8317adbd48 \
+                            sha256  c5f5b4285473657a7997d74f7642f3e7bda40f92c3c5d49471a899e27a4ba735
 
     depends_lib-append      port:zlib
 
@@ -490,15 +594,21 @@ haskell_platform_port zlib 0.5.4.1 4 {
 # Programs and Tools #
 ######################
 
-haskell_platform_tool cabal-install 1.18.0.5 1 {
-    checksums               rmd160  f07279510e03678ad5e3720d9e01707681f874ea \
-                            sha256  477df8ef73916e8bc23c727280a1700939131a3e2809a057668c883b0b521782
+haskell_platform_tool cabal-install 1.24.0.0 0 {
+    checksums               rmd160  8cb6a107efc71d68783e8c41e54498a257059b3c \
+                            sha256  d840ecfd0a95a96e956b57fb2f3e9c81d9fc160e1fd0ea350b0d37d169d9e87e
 
-    depends_lib-append      port:hs-http \
+    depends_lib-append      \
+                            port:hs-async \
+                            port:hs-cryptohash-sha256 \
+                            port:hs-hackage-security \
+                            port:hs-hashable \
+                            port:hs-http \
                             port:hs-mtl \
                             port:hs-network \
                             port:hs-random \
                             port:hs-stm \
+                            port:hs-tar \
                             port:hs-zlib
 
     description             The command-line interface for Cabal and Hackage
@@ -508,9 +618,9 @@ haskell_platform_tool cabal-install 1.18.0.5 1 {
         installation of Haskell libraries and programs.
 }
 
-haskell_platform_tool alex 3.1.3 1 {
-    checksums               rmd160  2325ccfc770264c517d2dfa38cece9376d4e252d \
-                            sha256  8d41a6e72a016155f00c846f7146ab4b27fe9640668a4b592d6a9b856f970a92
+haskell_platform_tool alex 3.1.7 0 {
+    checksums               rmd160  f96a1970e649c5928c8e4450517fa721e8059e10 \
+                            sha256  89a1a13da6ccbeb006488d9574382e891cf7c0567752b330cc8616d748bf28d1
 
     depends_lib-append      port:hs-quickcheck
 
@@ -522,9 +632,9 @@ haskell_platform_tool alex 3.1.3 1 {
         similar to the tool lex or flex for C/C++.
 }
 
-haskell_platform_tool happy 1.19.4 1 {
-    checksums               rmd160  8ec09c4743d85ae493354e49df07f0ee423267cf \
-                            sha256  6be499f66c61f8c48cbbbcb70515eb8e62c2bfa08adcc8c9474e7ae343a6936d
+haskell_platform_tool happy 1.19.5 0 {
+    checksums               rmd160  31895a6e6bcf1eeae2e5949cc5ca49d84094ae89 \
+                            sha256  62f03ac11d7b4b9913f212f5aa2eee1087f3b46dc07d799d41e1854ff02843da
 
     depends_lib-append      port:hs-mtl
     description             A parser generator for Haskell
@@ -534,9 +644,9 @@ haskell_platform_tool happy 1.19.4 1 {
         in a similar way to the yacc tool for C.
 }
 
-haskell_platform_tool hscolour 1.20.3 1 {
-    checksums               rmd160  2d875ecdb910a5955a5ec049935a74c60edbc4cc \
-                            sha256  3adb816fba3ecdf9f1ee5fb23feb0611b0762f7e8c2a282c2def5cc2f5483d96
+haskell_platform_tool hscolour 1.24 0 {
+    checksums               rmd160  3e12fdf8b9148c1d591d5e55805d3a62602c6de8 \
+                            sha256  54bc45137ba06bd876cf98424f974e325e9b236bd5c18d1c5b2ea0351b1d9332
 
     license                 GPL-2+
 
diff --git a/devel/haskell-platform/files/0359ea15842d4e6bef27c0d621964507e4bfd219.patch b/devel/haskell-platform/files/0359ea15842d4e6bef27c0d621964507e4bfd219.patch
index e69de29bb2..e63ddc67d0 100644
--- a/devel/haskell-platform/files/0359ea15842d4e6bef27c0d621964507e4bfd219.patch
+++ b/devel/haskell-platform/files/0359ea15842d4e6bef27c0d621964507e4bfd219.patch
@@ -0,0 +1,23 @@
+From 0359ea15842d4e6bef27c0d621964507e4bfd219 Mon Sep 17 00:00:00 2001
+From: Herbert Valerio Riedel <hvr at gnu.org>
+Date: Sat, 31 Oct 2015 10:03:39 +0100
+Subject: [PATCH] Bump upper bound to allow base-4.9
+
+Upstream-Stauts: Backport [https://github.com/haskell/primitive/commit/0359ea15842d4e6bef27c0d621964507e4bfd219]
+---
+ primitive.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/primitive.cabal b/primitive.cabal
+index 232dccc..2f35e9e 100644
+--- a/primitive.cabal
++++ b/primitive.cabal
+@@ -36,7 +36,7 @@ Library
+         Data.Primitive.Internal.Compat
+         Data.Primitive.Internal.Operations
+ 
+-  Build-Depends: base >= 4.3 && < 4.9
++  Build-Depends: base >= 4.3 && < 4.10
+                , ghc-prim >= 0.2 && < 0.5
+                , transformers >= 0.2 && < 0.5
+ 
diff --git a/devel/haskell-platform/files/1af89788d5c9ab7a0a93ff6764e1770e6c80d957.patch b/devel/haskell-platform/files/1af89788d5c9ab7a0a93ff6764e1770e6c80d957.patch
index e69de29bb2..d9801acd6c 100644
--- a/devel/haskell-platform/files/1af89788d5c9ab7a0a93ff6764e1770e6c80d957.patch
+++ b/devel/haskell-platform/files/1af89788d5c9ab7a0a93ff6764e1770e6c80d957.patch
@@ -0,0 +1,23 @@
+From 1af89788d5c9ab7a0a93ff6764e1770e6c80d957 Mon Sep 17 00:00:00 2001
+From: Herbert Valerio Riedel <hvr at gnu.org>
+Date: Sun, 20 Dec 2015 23:17:37 +0100
+Subject: [PATCH] Relax upper bound to allow transformers-0.5
+
+Upstream-Status: Backport [https://github.com/haskell/primitive/commit/1af89788d5c9ab7a0a93ff6764e1770e6c80d957]
+---
+ primitive.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/primitive.cabal b/primitive.cabal
+index f034b78..982d2f4 100644
+--- a/primitive.cabal
++++ b/primitive.cabal
+@@ -38,7 +38,7 @@ Library
+ 
+   Build-Depends: base >= 4.3 && < 4.10
+                , ghc-prim >= 0.2 && < 0.6
+-               , transformers >= 0.2 && < 0.5
++               , transformers >= 0.2 && < 0.6
+ 
+   Ghc-Options: -O2 -Wall
+ 
diff --git a/devel/haskell-platform/files/552ff11c2bd905faff53b2e34900cbbbf59955c8.patch b/devel/haskell-platform/files/552ff11c2bd905faff53b2e34900cbbbf59955c8.patch
index e69de29bb2..adb10b827a 100644
--- a/devel/haskell-platform/files/552ff11c2bd905faff53b2e34900cbbbf59955c8.patch
+++ b/devel/haskell-platform/files/552ff11c2bd905faff53b2e34900cbbbf59955c8.patch
@@ -0,0 +1,23 @@
+From 552ff11c2bd905faff53b2e34900cbbbf59955c8 Mon Sep 17 00:00:00 2001
+From: Herbert Valerio Riedel <hvr at gnu.org>
+Date: Sat, 31 Oct 2015 10:02:58 +0100
+Subject: [PATCH] Bump upper bound to allow base-4.9
+
+Upstream-Status: Backport [https://github.com/haskell/vector/commit/552ff11c2bd905faff53b2e34900cbbbf59955c8]
+---
+ vector.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vector.cabal b/vector.cabal
+index 062fd38..3d3b0ff 100644
+--- a/vector.cabal
++++ b/vector.cabal
+@@ -138,7 +138,7 @@ Library
+   Install-Includes:
+         vector.h
+ 
+-  Build-Depends: base >= 4.3 && < 4.9
++  Build-Depends: base >= 4.3 && < 4.10
+                , primitive >= 0.5.0.1 && < 0.7
+                , ghc-prim >= 0.2 && < 0.5
+                , deepseq >= 1.1 && < 1.5
diff --git a/devel/haskell-platform/files/59498406a6338d93891dec3abcbdde2cb7e41325.patch b/devel/haskell-platform/files/59498406a6338d93891dec3abcbdde2cb7e41325.patch
index e69de29bb2..591c3c51c1 100644
--- a/devel/haskell-platform/files/59498406a6338d93891dec3abcbdde2cb7e41325.patch
+++ b/devel/haskell-platform/files/59498406a6338d93891dec3abcbdde2cb7e41325.patch
@@ -0,0 +1,23 @@
+From 59498406a6338d93891dec3abcbdde2cb7e41325 Mon Sep 17 00:00:00 2001
+From: Oleg Grenrus <oleg.grenrus at iki.fi>
+Date: Wed, 23 Dec 2015 16:41:29 +0200
+Subject: [PATCH] Support transformers-0.5
+
+Upstream-Staus: Backport [https://github.com/ekmett/mtl/commit/59498406a6338d93891dec3abcbdde2cb7e41325]
+---
+ mtl.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mtl.cabal b/mtl.cabal
+index aaa5187..7702edd 100644
+--- a/mtl.cabal
++++ b/mtl.cabal
+@@ -54,7 +54,7 @@ Library
+     Control.Monad.Writer.Class
+     Control.Monad.Writer.Lazy
+     Control.Monad.Writer.Strict
+-  build-depends: base < 6, transformers == 0.4.*
++  build-depends: base < 6, transformers >= 0.4 && <0.6
+   extensions:
+     MultiParamTypeClasses
+     FunctionalDependencies
diff --git a/devel/haskell-platform/files/6c17dd6fadc5e7e3e09f7892380ce1339f296efd.patch b/devel/haskell-platform/files/6c17dd6fadc5e7e3e09f7892380ce1339f296efd.patch
index e69de29bb2..8045ecb087 100644
--- a/devel/haskell-platform/files/6c17dd6fadc5e7e3e09f7892380ce1339f296efd.patch
+++ b/devel/haskell-platform/files/6c17dd6fadc5e7e3e09f7892380ce1339f296efd.patch
@@ -0,0 +1,25 @@
+From 6c17dd6fadc5e7e3e09f7892380ce1339f296efd Mon Sep 17 00:00:00 2001
+From: Herbert Valerio Riedel <hvr at gnu.org>
+Date: Sun, 1 Nov 2015 12:51:30 +0100
+Subject: [PATCH] Relax upper bound on `ghc-prim` to allow v0.5
+
+See https://github.com/ghc/ghc/blob/master/libraries/ghc-prim/changelog.md for what changed
+
+Upstream-Status: Backport [https://github.com/haskell/vector/commit/6c17dd6fadc5e7e3e09f7892380ce1339f296efd]
+---
+ vector.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vector.cabal b/vector.cabal
+index 3d3b0ff..d962c72 100644
+--- a/vector.cabal
++++ b/vector.cabal
+@@ -140,7 +140,7 @@ Library
+ 
+   Build-Depends: base >= 4.3 && < 4.10
+                , primitive >= 0.5.0.1 && < 0.7
+-               , ghc-prim >= 0.2 && < 0.5
++               , ghc-prim >= 0.2 && < 0.6
+                , deepseq >= 1.1 && < 1.5
+ 
+   Ghc-Options: -O2 -Wall -fno-warn-orphans
diff --git a/devel/haskell-platform/files/83d3d23d2fa1583ecd1b59464cc889924e1b5fff.patch b/devel/haskell-platform/files/83d3d23d2fa1583ecd1b59464cc889924e1b5fff.patch
index e69de29bb2..0ea46a4863 100644
--- a/devel/haskell-platform/files/83d3d23d2fa1583ecd1b59464cc889924e1b5fff.patch
+++ b/devel/haskell-platform/files/83d3d23d2fa1583ecd1b59464cc889924e1b5fff.patch
@@ -0,0 +1,25 @@
+From 83d3d23d2fa1583ecd1b59464cc889924e1b5fff Mon Sep 17 00:00:00 2001
+From: Herbert Valerio Riedel <hvr at gnu.org>
+Date: Sun, 1 Nov 2015 12:51:32 +0100
+Subject: [PATCH] Relax upper bound on `ghc-prim` to allow v0.5
+
+See https://github.com/ghc/ghc/blob/master/libraries/ghc-prim/changelog.md for what changed
+
+Upstream-Status: Backport [https://github.com/haskell/primitive/commit/83d3d23d2fa1583ecd1b59464cc889924e1b5fff]
+---
+ primitive.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/primitive.cabal b/primitive.cabal
+index 2f35e9e..f034b78 100644
+--- a/primitive.cabal
++++ b/primitive.cabal
+@@ -37,7 +37,7 @@ Library
+         Data.Primitive.Internal.Operations
+ 
+   Build-Depends: base >= 4.3 && < 4.10
+-               , ghc-prim >= 0.2 && < 0.5
++               , ghc-prim >= 0.2 && < 0.6
+                , transformers >= 0.2 && < 0.5
+ 
+   Ghc-Options: -O2 -Wall
diff --git a/devel/hs-base16-bytestring/Portfile b/devel/hs-base16-bytestring/Portfile
index e69de29bb2..1759f0f002 100644
--- a/devel/hs-base16-bytestring/Portfile
+++ b/devel/hs-base16-bytestring/Portfile
@@ -0,0 +1,15 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+
+PortSystem          1.0
+PortGroup           haskell 1.0
+
+haskell.setup       base16-bytestring 0.1.1.6
+checksums           rmd160  a1dfb191490ac54b7a0a30ab76d77f67d8ce3c4d \
+                    sha256  5afe65a152c5418f5f4e3579a5e0d5ca19c279dc9bf31c1a371ccbe84705c449
+
+license             BSD
+maintainers         cal openmaintainer
+platforms           darwin
+
+description         Fast base16 (hex) encoding and decoding for ByteStrings
+long_description    ${description}
diff --git a/devel/hs-base64-bytestring/Portfile b/devel/hs-base64-bytestring/Portfile
index f20e4d7a56..49bb77ddfa 100644
--- a/devel/hs-base64-bytestring/Portfile
+++ b/devel/hs-base64-bytestring/Portfile
@@ -4,7 +4,7 @@ PortSystem          1.0
 PortGroup           haskell 1.0
 
 haskell.setup       base64-bytestring 1.0.0.1
-revision            5
+revision            7
 license             BSD
 maintainers         cal openmaintainer
 platforms           darwin
diff --git a/devel/hs-cryptohash-sha256/Portfile b/devel/hs-cryptohash-sha256/Portfile
index e69de29bb2..78224c6f11 100644
--- a/devel/hs-cryptohash-sha256/Portfile
+++ b/devel/hs-cryptohash-sha256/Portfile
@@ -0,0 +1,28 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+
+PortSystem          1.0
+PortGroup           haskell 1.0
+
+haskell.setup       cryptohash-sha256 0.11.101.0
+checksums           rmd160  6fb799481497515388c4dd176969eecc7c4a7507 \
+                    sha256  52756435dbea248e344fbcbcc5df5307f60dfacf337dfd11ae30f1c7a4da05dd
+
+maintainers         cal openmaintainer
+platforms           darwin
+license             BSD
+
+description         Fast, pure and practical SHA-256 implementation
+long_description    \
+    A practical incremental and one-pass, pure API to the SHA-256 cryptographic \
+    hash algorithm according to FIPS 180-4 with performance close to the \
+    fastest implementations available in other languages. \
+    \nThe core SHA-256 algorithm is implemented in C and is thus expected to be \
+    as fast as the standard sha256sum(1) tool\; for instance, on an Intel Core \
+    i7-3770 at 3.40GHz this implementation can compute a SHA-256 hash over 230 \
+    MiB of data in under one second. (If, instead, you require a pure Haskell \
+    implementation and performance is secondary, please refer to the SHA \
+    package.)\
+    \nAdditionally, this package provides support for\
+    \n - HMAC-SHA-256: SHA-256-based Hashed Message Authentication Codes (HMAC)\
+    \n - HKDF-SHA-256: HMAC-SHA-256-based Key Derivation Function (HKDF)\
+    \nconforming to RFC6234, RFC4231, RFC5869, et al..
diff --git a/devel/hs-ed25519/Portfile b/devel/hs-ed25519/Portfile
index e69de29bb2..2d883dc25f 100644
--- a/devel/hs-ed25519/Portfile
+++ b/devel/hs-ed25519/Portfile
@@ -0,0 +1,22 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+
+PortSystem          1.0
+PortGroup           haskell 1.0
+
+haskell.setup       ed25519 0.0.5.0
+checksums           rmd160  eebedb9ca2a80b47cb67af71ffd9c620b1c3d5e9 \
+                    sha256  d8a5958ebfa9309790efade64275dc5c441b568645c45ceed1b0c6ff36d6156d
+
+maintainers         cal openmaintainer
+platforms           darwin
+license             MIT
+
+description         Ed25519 cryptographic signatures
+long_description    \
+    This package provides a simple, fast, self-contained copy of the Ed25519 \
+    public-key signature system with a clean interface. It also includes \
+    support for detached signatures, and thorough documentation on the design \
+    and implementation, including usage guidelines.
+
+patchfiles          85d6ef17430daa2c81a7b9438e7b988a3b5a5f24.patch
+patch.pre_args      -p1
diff --git a/devel/hs-ed25519/files/85d6ef17430daa2c81a7b9438e7b988a3b5a5f24.patch b/devel/hs-ed25519/files/85d6ef17430daa2c81a7b9438e7b988a3b5a5f24.patch
index e69de29bb2..bdea42e828 100644
--- a/devel/hs-ed25519/files/85d6ef17430daa2c81a7b9438e7b988a3b5a5f24.patch
+++ b/devel/hs-ed25519/files/85d6ef17430daa2c81a7b9438e7b988a3b5a5f24.patch
@@ -0,0 +1,29 @@
+From 85d6ef17430daa2c81a7b9438e7b988a3b5a5f24 Mon Sep 17 00:00:00 2001
+From: Austin Seipp <aseipp at pobox.com>
+Date: Fri, 12 Feb 2016 14:53:04 -0600
+Subject: [PATCH] cabal: loosen bound on ghc-prim
+
+Seems to work just fine with GHC 8.0.1-rc2.
+
+Closes #10. Closes #11.
+
+Signed-off-by: Austin Seipp <aseipp at pobox.com>
+
+Upstream-Status: Backport [https://github.com/thoughtpolice/hs-ed25519/commit/85d6ef17430daa2c81a7b9438e7b988a3b5a5f24]
+---
+ ed25519.cabal | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ed25519.cabal b/ed25519.cabal
+index 5e5f715..c16618f 100644
+--- a/ed25519.cabal
++++ b/ed25519.cabal
+@@ -60,7 +60,7 @@ flag no-donna
+ 
+ library
+   build-depends:
+-    ghc-prim    >= 0.1 && < 0.5,
++    ghc-prim    >= 0.1 && < 0.6,
+     base        >= 4   && < 5,
+     bytestring  >= 0.9 && < 0.11
+ 
diff --git a/devel/hs-hackage-security/Portfile b/devel/hs-hackage-security/Portfile
index e69de29bb2..352f0a749f 100644
--- a/devel/hs-hackage-security/Portfile
+++ b/devel/hs-hackage-security/Portfile
@@ -0,0 +1,32 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+
+PortSystem          1.0
+PortGroup           haskell 1.0
+
+haskell.setup       hackage-security 0.5.2.2
+checksums           rmd160  8d76f780eae4f53f2a3b7116c3e468515e0eeee3 \
+                    sha256  507a837851264a774c8f4d400f798c3dac5be11dc428fe72d33ef594ca533c41
+
+maintainers         cal openmaintainer
+platforms           darwin
+license             BSD
+
+description         Hackage security library
+long_description    \
+    The hackage security library provides both server and client utilities for \
+    securing the Hackage package server (http://hackage.haskell.org/). It is \
+    based on The Update Framework (http://theupdateframework.com/), a set of \
+    recommendations developed by security researchers at various universities \
+    in the US as well as developers on the Tor project \
+    (https://www.torproject.org/).
+
+depends_lib-append  port:hs-base16-bytestring \
+                    port:hs-base64-bytestring \
+                    port:hs-cryptohash-sha256 \
+                    port:hs-ed25519 \
+                    port:hs-mtl \
+                    port:hs-network \
+                    port:hs-network-uri \
+                    port:hs-parsec \
+                    port:hs-tar \
+                    port:hs-zlib
diff --git a/devel/hs-json/Portfile b/devel/hs-json/Portfile
index b3491b5a5e..592f3fce18 100644
--- a/devel/hs-json/Portfile
+++ b/devel/hs-json/Portfile
@@ -3,10 +3,10 @@
 PortSystem          1.0
 PortGroup           haskell 1.0
 
-haskell.setup       json 0.7
-revision            5
-checksums           rmd160  d3f9bdb2fcd0203d394e0c97a00353662209dcba \
-                    sha256  d3654272caa269bc65f6f2af82b583ef05434613fe5272d57053fb3bfada68a3
+haskell.setup       json 0.9.1
+checksums           rmd160  09bbf66e77003aefad3b1046aec58589da932176 \
+                    sha256  96b57e4d167e45dc80aeff872a922ae9cdb953a1ded29ebbb51019b68f0085a2 \
+                    size    22568
 
 maintainers         nomaintainer
 platforms           darwin
diff --git a/devel/hs-regex-tdfa/Portfile b/devel/hs-regex-tdfa/Portfile
index f7700fc22c..d2d7bb30b2 100644
--- a/devel/hs-regex-tdfa/Portfile
+++ b/devel/hs-regex-tdfa/Portfile
@@ -3,9 +3,10 @@
 PortSystem          1.0
 PortGroup           haskell 1.0
 
-haskell.setup       regex-tdfa 1.2.0
-checksums           rmd160  e726c156f360f087ee936785c005e7dd3cc61e31 \
-                    sha256  fc82ac14aae378c543a55cdac3f944aae5bff9918c4a342e1da87d38ba4ef401
+haskell.setup       regex-tdfa 1.2.2
+checksums           rmd160  75994647dfe0124af777e3c6024337c05b93f914 \
+                    sha256  cb12d675be7b31ed8086d8d022023d03eb553e55dbee6e1b7a4154933d471d39 \
+                    size    65969
 
 license             BSD
 maintainers         cal openmaintainer
diff --git a/devel/hs-scientific/Portfile b/devel/hs-scientific/Portfile
deleted file mode 100644
index 5896174067..0000000000
--- a/devel/hs-scientific/Portfile
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-
-PortSystem          1.0
-PortGroup           haskell 1.0
-
-epoch               1
-haskell.setup       scientific 0.2.0.2
-revision            1
-checksums           rmd160  fc0e643024a7e86102c136ab8ff6d186bc9cf495 \
-                    sha256  c0114a8809f34c1bc284e53ce0ce836a0f23ed2535ef9df06417e65a9c6a398f
-
-maintainers         nomaintainer
-platforms           darwin
-license             BSD
-
-description         Numbers represented using scientific notation
-long_description    \
-    Data.Scientific provides a space efficient and arbitrary precision \
-    scientific number type.
-
-depends_lib-append  port:hs-hashable \
-                    port:hs-text
diff --git a/devel/hs-tar/Portfile b/devel/hs-tar/Portfile
index ac6c6c4b6c..f730e68056 100644
--- a/devel/hs-tar/Portfile
+++ b/devel/hs-tar/Portfile
@@ -3,10 +3,9 @@
 PortSystem          1.0
 PortGroup           haskell 1.0
 
-haskell.setup       tar 0.4.0.1
-revision            3
-checksums           rmd160  87de253e69a99f6b6823944c1f2bfe93a182dfbf \
-                    sha256  a408274d8325f4e3144c5aa154d72f1ee7b0a7342570fd6805e3be3fe0d97a6d
+haskell.setup       tar 0.5.0.3
+checksums           rmd160  f4fd84c2f0cb18b9dcf7b59f04ea7de4f0e07586 \
+                    sha256  d8d9ad876365f88bdccd02073049e58715cd5ba94de06eb98e21d595244918a3
 
 license             BSD
 maintainers         cal openmaintainer
diff --git a/devel/hs-tf-random/Portfile b/devel/hs-tf-random/Portfile
deleted file mode 100644
index dd46bb0d41..0000000000
--- a/devel/hs-tf-random/Portfile
+++ /dev/null
@@ -1,21 +0,0 @@
-PortSystem          1.0
-PortGroup           haskell 1.0
-
-haskell.setup       tf-random 0.5
-checksums           rmd160  bd58a02f7e68c4fd4e51591fa4ddad93d416d717 \
-                    sha256  2e30cec027b313c9e1794d326635d8fc5f79b6bf6e7580ab4b00186dadc88510
-
-license             BSD
-maintainers         nomaintainer
-platforms           darwin
-
-depends_lib-append  port:hs-primitive \
-                    port:hs-random
-
-description         High-quality splittable pseudorandom number generator
-long_description    \
-    This package contains an implementation of a high-quality splittable \
-    pseudorandom number generator. The generator is based on a cryptographic \
-    hash function built on top of the ThreeFish block cipher. See the paper \
-    Splittable Pseudorandom Number Generators Using Cryptographic Hashing by \
-    Claessen, Pałka for details and the rationale of the design.
diff --git a/devel/shellcheck/Portfile b/devel/shellcheck/Portfile
index d020437604..9056d07e12 100644
--- a/devel/shellcheck/Portfile
+++ b/devel/shellcheck/Portfile
@@ -1,21 +1,21 @@
 PortSystem          1.0
 PortGroup           haskell 1.0
 
-haskell.setup       ShellCheck 0.3.8
+haskell.setup       ShellCheck 0.4.7
 name                shellcheck
-checksums           rmd160  18780082aa13e56f84fdd3bd0ddbcb98ccefb117 \
-                    sha256  c185b77166724c06531b3e07b7a8353c0451809a1f60e9f6756d29247853651a
+checksums           rmd160  17ed531070ac7e98a3b3a5b7e58dc1a90b30fb71 \
+                    sha256  184955264d42c5dca0300fb9688b9a6c9a1c70c345dbcd8e30bb48a049a70d7c \
+                    size    126593
 
 license             GPL-3+
 maintainers         cal openmaintainer
 platforms           darwin
 homepage            https://github.com/koalaman/shellcheck
 
-# needs hs-quickcheck >= 2.7.4
 depends_lib-append  port:hs-json \
                     port:hs-mtl \
                     port:hs-parsec \
-                    port:hs-quickcheck-devel \
+                    port:hs-quickcheck \
                     port:hs-regex-tdfa
 
 description         ShellCheck, a static analysis tool for shell scripts
diff --git a/lang/ghc-bootstrap/Portfile b/lang/ghc-bootstrap/Portfile
index 62886fc5fe..c999a61737 100644
--- a/lang/ghc-bootstrap/Portfile
+++ b/lang/ghc-bootstrap/Portfile
@@ -5,39 +5,43 @@ PortGroup           compiler_blacklist_versions 1.0
 
 name                ghc-bootstrap
 set canonicalname   ghc
-# Note: 7.6.3 doesn't have a i386 darwin version at http://www.haskell.org/ghc/dist/7.6.3
-version             7.6.2
-revision            2
+
+version             7.10.3
 categories          lang haskell
 maintainers         cal openmaintainer
 license             BSD
 platforms           darwin
-supported_archs     i386 x86_64
+
+# Warning: http://downloads.haskell.org/~ghc/7.10.3/ does not have a i386
+# darwin build and 7.6.2 (which seems to be the latest build that has it) is
+# affected by https://github.com/haskell/unix/pull/18, which causes the GHC
+# build to fail on El Capitan and later. This means that
+#  (a) I (or somebody else) would have to build a i386 ghc-bootstrap
+#  (b) i386 builds of GHC are no longer supported.
+# I'm going with (b) until somebody on i386 volunteers to build a ghc-bootstrap
+# or convinces upstream to do so.
+supported_archs     x86_64
+
 universal_variant   no
 installs_libs       no
 
 description         The Glorious Glasgow Haskell Compilation System
-long_description    \
-                    This is a package that installs a binary \
-                    bootstrap ghc compiler.
+long_description    This is a package that installs a binary GHC compiler for bootstrapping.
 
-homepage            http://haskell.org/${canonicalname}
-master_sites        ${homepage}/dist/${version}/
+homepage            https://haskell.org/${canonicalname}
+master_sites        https://downloads.haskell.org/~${canonicalname}/${version}/
 distname            ${canonicalname}-${version}-${build_arch}-apple-darwin
 worksrcdir          ${canonicalname}-${version}
-use_bzip2           yes
-
-checksums           ${canonicalname}-${version}-i386-apple-darwin${extract.suffix} \
-                        rmd160  232b3aa4ed9e2ff09d520f4ae02fa572a671178a \
-                        sha256  c1da502fa7d99f3d87370c65d705a7e8ee4c900fdb62df6f71696c5432047059 \
-                    ${canonicalname}-${version}-x86_64-apple-darwin${extract.suffix} \
-                        rmd160  b0870a4a292fae7248f9b0be485affa4a5a76a2d \
-                        sha256  eb0dd19bd5a6eede332d58de219437b9c2b186c72a1fc0c60fa1095b0c2d2789
-
-post-extract {
-    # Copy clang-wrapper for re-inplace during configure
-    xinstall -m 644 ${filespath}/clang-wrapper ${workpath}/clang-wrapper
-}
+use_xz              yes
+
+checksums           ${canonicalname}-${version}-x86_64-apple-darwin${extract.suffix} \
+                    rmd160  4f556937880d853448b482bfc7d7f1a6a0dd220f \
+                    sha256  852781d43d41cd55d02f818fe798bb4d1f7e52f488408167f413f7948cf1e7df
+
+#post-extract {
+#    # Copy clang-wrapper for re-inplace during configure
+#    xinstall -m 644 ${filespath}/clang-wrapper ${workpath}/clang-wrapper
+#}
 
 # Compilation (of the final non-bootstrap GHC, which uses the C compiler
 # configured in this port) fails with older versions of clang. clang-4.1 from
@@ -63,42 +67,52 @@ if { ${os.platform} eq "darwin" && ( ${os.major} < 13 || ${os.major} == 15 ) } {
 configure.pre_args  --prefix=${prefix}/share/ghc-bootstrap
 configure.args      --with-gcc=${configure.cc}
 
-pre-configure {
-    # OK so because this binary has been prebuilt for libraries
-    # in /usr/lib we search these before macports stuff so (hopefully)
-    # weird things don't happen
-    configure.ldflags  -L/usr/lib
-    configure.cppflags -I/usr/include
-
-    # patch clang-wrapper and make sure it is used by patching settings.in
-    reinplace "s#@clang@#${configure.cc}#g" ${workpath}/clang-wrapper
-    reinplace "s#@SettingsCCompilerCommand@#${prefix}/share/ghc-bootstrap/libexec/clang-wrapper#g" ${worksrcpath}/settings.in
-}
+#pre-configure {
+#    # OK so because this binary has been prebuilt for libraries
+#    # in /usr/lib we search these before macports stuff so (hopefully)
+#    # weird things don't happen
+#    configure.ldflags  -L/usr/lib
+#    configure.cppflags -I/usr/include
+#
+#    # patch clang-wrapper and make sure it is used by patching settings.in
+#    reinplace "s#@clang@#${configure.cc}#g" ${workpath}/clang-wrapper
+#    reinplace "s#@SettingsCCompilerCommand@#${prefix}/share/ghc-bootstrap/libexec/clang-wrapper#g" ${worksrcpath}/settings.in
+#}
 
 build {}
 
 post-destroot {
-    # install clang-wrapper to libexec
-    xinstall -d -m 755 ${destroot}${prefix}/share/ghc-bootstrap/libexec
-    xinstall -m 755 ${workpath}/clang-wrapper ${destroot}${prefix}/share/ghc-bootstrap/libexec
-
-    # Delete all .dylib files, because their load commands would have to be
-    # fixed or rev-upgrade complains and tries to rebuild the port. However, we
-    # cannot correctly fix all .dylibs, because the have not been built with
-    # -headerpad_max_install_names. Deleting them fixes the problem and GHC
-    # still seems to compile correctly.
-
-    # We also delete all the .html files, because we really don't need the
-    # documentation in a bootstrap port.
-
+    ## install clang-wrapper to libexec
+    #xinstall -d -m 755 ${destroot}${prefix}/share/ghc-bootstrap/libexec
+    #xinstall -m 755 ${workpath}/clang-wrapper ${destroot}${prefix}/share/ghc-bootstrap/libexec
+
+    # Delete all .dylib files, because some of them reference nonexistant
+    # libraries (e.g.
+    #   /opt/local/share/ghc-bootstrap/lib/ghc-7.10.3/Cabal_3ux67khMI118y6VpwrFnXN/libHSCabal-1.22.5.0-3ux67khMI118y6VpwrFnXN-ghc7.10.3.dylib
+    # references
+    #   /usr/local/lib/gcc/5/libgcc_s.1.dylib
+    # which does not exist) and rev-upgrade complains and tries to rebuild the
+    # port. Deleting them breaks bootstrapping using dynamic libraries in GHC,
+    # but since the static libraries are still there, that is not a serious
+    # problem.
+    set nametool "install_name_tool -change /usr/local/lib/gcc/5/libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib"
     fs-traverse f ${destroot}${prefix} {
         if {[file isfile ${f}]} {
             set ext [file extension ${f}]
-            if {${ext} eq ".html" || ${ext} eq ".dylib"} {
-                delete ${f}
+            if {${ext} eq ".dylib"} {
+                system "${nametool} ${f}"
             }
         }
     }
+    fs-traverse f ${destroot}${prefix}/share/ghc-bootstrap/lib/ghc-${version}/bin {
+        if {[file type $f] eq "file"} {
+            system "${nametool} ${f}"
+        }
+    }
+
+    # We also delete $prefix/share/ghc-bootstrap/share/doc, because we
+    # really don't need the documentation in a bootstrap port.
+    delete ${destroot}${prefix}/share/ghc-bootstrap/share/doc
 }
 
 livecheck.type      none
diff --git a/lang/ghc/Portfile b/lang/ghc/Portfile
index 6893629861..768b19b581 100644
--- a/lang/ghc/Portfile
+++ b/lang/ghc/Portfile
@@ -7,8 +7,8 @@ name                ghc
 # Do not update GHC separate from Haskell Platform.
 # When updating GHC, make sure to revbump all Haskell ports.
 # Also make sure to update the version in the Haskell PortGroup.
-version             7.8.3
-revision            6
+version             8.0.1
+revision            0
 categories          lang haskell
 maintainers         cal openmaintainer
 license             BSD
@@ -33,17 +33,17 @@ master_sites    ${homepage}/dist/${version}/
 distname        ${name}-${version}-src
 worksrcdir      ${name}-${version}
 
-use_bzip2       yes
+use_xz          yes
 
 distfiles       ${name}-${version}-src${extract.suffix} \
                 ${name}-${version}-testsuite${extract.suffix}
 
-checksums       ghc-7.8.3-src.tar.bz2 \
-                rmd160  464d31d924a8c1e23e94b3cae810c4e41dad4b75 \
-                sha256  2358826f8424bf571dcc313bd882422fe108a340d6e37db4339ff6d5d6ac3f37 \
-                ghc-7.8.3-testsuite.tar.bz2 \
-                rmd160  abc39b71e2f3926b80c681428c447f39599d7d83 \
-                sha256  9cfef874adf5b895701ae52e507f07049a64246af120ac15200e7bf612521122
+checksums       ghc-8.0.1-src.tar.xz \
+                rmd160  3ad5728492a7dd874de320fe0a3936fcd7681693 \
+                sha256  90fb20cd8712e3c0fbeb2eac8dab6894404c21569746655b9b12ca9684c7d1d2 \
+                ghc-8.0.1-testsuite.tar.xz \
+                rmd160  20e03e566d0842dfcd12f48fa0cc86c6d5a3caff \
+                sha256  bc57163656ece462ef61072559d491b72c5cdd694f3c39b80ac0f6b9a3dc8151
 
 depends_build   port:ghc-bootstrap \
                 port:libxslt
@@ -54,9 +54,8 @@ depends_lib     port:gmp           \
                 port:llvm-3.5       \
                 port:libffi
 
-patchfiles      patch-configure-workaround-bsdsed-incompatibility.diff \
-                patch-configure-disable-docs.diff \
-                patch-unix_lib_osx_sandbox_compatibility.diff
+patchfiles      patch-configure-link-ghc-pwd-against-system-libiconv.diff \
+                buildpath-abi-stability.patch
 
 if { ${os.platform} eq "darwin" && ${os.major} >= 16 } {
     patchfiles-append   patch-sierra-compatibility.diff
@@ -105,6 +104,16 @@ configure.args  --with-ghc=${bootstraproot}/bin/ghc \
                 --with-llc=${llvmPrefix}/bin/llc \
                 --with-opt=${llvmPrefix}/bin/opt
 
+# See https://ghc.haskell.org/trac/ghc/ticket/11744
+pre-configure {
+    try {
+        set nmclassic [exec -- xcrun --find nm-classic]
+        if {$nmclassic ne ""} {
+            configure.args-append   --with-nm=${nmclassic}
+        }
+    } catch {*} {}
+}
+
 # OK so because the bootstrap binary has been prebuilt for libraries in
 # /usr/lib we search these in addition to MacPorts' paths to prevent link
 # errors. GHC _should_ actually compile itself in stage2 using paths from the
@@ -112,8 +121,10 @@ configure.args  --with-ghc=${bootstraproot}/bin/ghc \
 compiler.cpath /usr/include
 compiler.library_path /usr/lib
 
-build.args      VERBOSE=1
-destroot.args   VERBOSE=1
+pre-configure {
+    file mkdir ${worksrcpath}/build
+    file copy -force ${filespath}/build.mk ${worksrcpath}/build/build.mk
+}
 
 pre-activate {
     set obsoletes [list]
diff --git a/lang/ghc/files/build.mk b/lang/ghc/files/build.mk
index e69de29bb2..f3c9dd44c8 100644
--- a/lang/ghc/files/build.mk
+++ b/lang/ghc/files/build.mk
@@ -0,0 +1,339 @@
+# -----------------------------------------------------------------------------
+# MacPorts GHC build configuration
+#
+# Uncomment one of the following BuildFlavour settings to get the desired
+# overall build type.
+
+# Disable building the documentation, we want to avoid the dependency
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+# -------- Build profiles -----------------------------------------------------
+# Uncomment one of these to select a build profile below:
+
+# Full build with max optimisation and everything enabled (very slow build)
+#BuildFlavour = perf
+
+# As above but build GHC using the LLVM backend
+#BuildFlavour = perf-llvm
+
+# Perf build configured for a cross-compiler
+#BuildFlavour = perf-cross
+
+# Fast build with optimised libraries, no profiling (RECOMMENDED):
+BuildFlavour = quick
+
+# Fast build with optimised libraries, no profiling, with LLVM:
+#BuildFlavour = quick-llvm
+
+# Fast build configured for a cross compiler
+#BuildFlavour  = quick-cross
+
+# Even faster build.  NOT RECOMMENDED: the libraries will be
+# completely unoptimised, so any code built with this compiler
+# (including stage2) will run very slowly:
+#BuildFlavour = quickest
+
+# Profile the stage2 compiler:
+#BuildFlavour = prof
+
+# A development build, working on the stage 1 compiler:
+#BuildFlavour = devel1
+
+# A development build, working on the stage 2 compiler:
+#BuildFlavour = devel2
+
+# A build with max optimisation that still builds the stage2 compiler
+# quickly. Compiled code will be the same as with "perf". Programs
+# will compile more slowly.
+#BuildFlavour = bench
+
+# As above but build GHC using the LLVM backend
+#BuildFlavour = bench-llvm
+
+# Bench build configured for a cross-compiler
+#BuildFlavour = bench-cross
+
+# Use the same settings as validate.
+#BuildFlavour = validate
+
+ifneq "$(BuildFlavour)" ""
+include mk/flavours/$(BuildFlavour).mk
+endif
+
+# -------- Miscellaneous variables --------------------------------------------
+
+# Set to V = 0 to get prettier build output.
+# Please use V=1 (the default) when reporting GHC bugs.
+V = 0
+
+# Should all enabled warnings (see mk/warnings.mk) be turned into errors while
+# building stage 2?
+#WERROR=-Werror
+
+# After stage 1 and the libraries have been built, you can uncomment this line:
+#stage=2
+
+# Then stage 1 will not be touched by the build system, until
+# you comment the line again.  This is a useful trick for when you're
+# working on stage 2 and want to freeze stage 1 and the libraries for
+# a while.
+
+# Build the "extra" packages (see ./packages). This enables more tests. See:
+# https://ghc.haskell.org/trac/ghc/wiki/Building/RunningTests/Running#AdditionalPackages
+#BUILD_EXTRA_PKGS=YES
+
+# Uncomment the following line to enable building DPH
+#BUILD_DPH=YES
+
+# Uncomment the following to force `integer-gmp` to use the in-tree GMP 5.0.4
+# (other sometimes useful configure-options: `--with-gmp-{includes,libraries}`)
+#libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-intree-gmp
+
+GhcLibWays = $(if $(filter $(DYNAMIC_GHC_PROGRAMS),YES),v dyn,v)
+
+# Only use -fasm by default on platforms that support it.
+GhcFAsm = $(if $(filter $(GhcWithNativeCodeGen),YES),-fasm,)
+
+# ----------- A Performance/Distribution build --------------------------------
+
+ifeq "$(BuildFlavour)" "perf"
+
+# perf matches the default settings, repeated here for comparison:
+
+SRC_HC_OPTS     = -O -H64m
+GhcStage1HcOpts = -O $(GhcFAsm)
+GhcStage2HcOpts = -O2 $(GhcFAsm)
+GhcHcOpts       = -Rghc-timing
+GhcLibHcOpts    = -O2
+GhcLibWays     += p
+
+ifeq "$(PlatformSupportsSharedLibs)" "YES"
+GhcLibWays += dyn
+endif
+
+endif
+
+# ---------------- Perf build using LLVM --------------------------------------
+
+ifeq "$(BuildFlavour)" "perf-llvm"
+
+SRC_HC_OPTS     = -O -H64m -fllvm
+GhcStage1HcOpts = -O -fllvm
+GhcStage2HcOpts = -O2 -fllvm
+GhcHcOpts       = -Rghc-timing
+GhcLibHcOpts    = -O2
+GhcLibWays     += p
+
+endif
+
+# ------- A Perf build configured for cross-compilation ----------------------
+
+ifeq "$(BuildFlavour)" "perf-cross"
+
+SRC_HC_OPTS     = -O -H64m -fllvm
+GhcStage1HcOpts = -O2
+GhcStage2HcOpts = -O2 -fllvm
+GhcHcOpts       = -Rghc-timing
+GhcLibHcOpts    = -O2
+GhcLibWays     += p
+INTEGER_LIBRARY    = integer-simple
+Stage1Only         = YES
+
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO
+
+endif
+
+# -------- A Fast build -------------------------------------------------------
+
+ifeq "$(BuildFlavour)" "quickest"
+
+SRC_HC_OPTS        = -H64m -O0 $(GhcFAsm)
+GhcStage1HcOpts    = -O $(GhcFAsm)
+GhcStage2HcOpts    = -O0 $(GhcFAsm)
+GhcLibHcOpts       = -O0 $(GhcFAsm)
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+endif
+
+# -------- A Fast build with optimised libs -----------------------------------
+
+ifeq "$(BuildFlavour)" "quick"
+
+SRC_HC_OPTS        = -H64m -O0 $(GhcFAsm)
+GhcStage1HcOpts    = -O $(GhcFAsm)
+GhcStage2HcOpts    = -O0 $(GhcFAsm)
+GhcLibHcOpts       = -O $(GhcFAsm)
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+endif
+
+# -------- A Fast build with optimised libs using LLVM ------------------------
+
+ifeq "$(BuildFlavour)" "quick-llvm"
+
+SRC_HC_OPTS        = -H64m -O0 -fllvm
+GhcStage1HcOpts    = -O -fllvm
+GhcStage2HcOpts    = -O0 -fllvm
+GhcLibHcOpts       = -O -fllvm
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+endif
+
+# -------- A Fast build configured for cross-compilation ----------------------
+
+ifeq "$(BuildFlavour)" "quick-cross"
+
+SRC_HC_OPTS        = -H64m -O0
+GhcStage1HcOpts    = -O
+GhcStage2HcOpts    = -O0 -fllvm
+GhcLibHcOpts       = -O -fllvm
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+INTEGER_LIBRARY    = integer-simple
+Stage1Only         = YES
+
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO
+
+endif
+
+# -------- Profile the stage2 compiler ----------------------------------------
+
+ifeq "$(BuildFlavour)" "prof"
+
+SRC_HC_OPTS        = -H64m -O0 $(GhcFAsm)
+GhcStage1HcOpts    = -O $(GhcFAsm)
+GhcStage2HcOpts    = -O $(GhcFAsm)
+GhcLibHcOpts       = -O $(GhcFAsm)
+
+GhcLibWays         += p
+GhcProfiled        = YES
+
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+endif
+
+# -------- A Development build (stage 1) --------------------------------------
+
+ifeq "$(BuildFlavour)" "devel1"
+
+SRC_HC_OPTS        = -H64m -O $(GhcFAsm)
+GhcLibHcOpts       = -O -dcore-lint
+GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
+GhcStage2HcOpts    = -Rghc-timing -O $(GhcFAsm)
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+LAX_DEPENDENCIES   = YES
+
+endif
+
+# -------- A Development build (stage 2) --------------------------------------
+
+ifeq "$(BuildFlavour)" "devel2"
+
+SRC_HC_OPTS        = -H64m -O $(GhcFAsm)
+GhcLibHcOpts       = -O -dcore-lint
+GhcStage1HcOpts    = -Rghc-timing -O $(GhcFAsm)
+GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+LAX_DEPENDENCIES   = YES
+
+endif
+
+# -------- A bench build with optimised libs -----------------------------------
+
+ifeq "$(BuildFlavour)" "bench"
+
+SRC_HC_OPTS        = -O -H64m
+GhcStage1HcOpts    = -O $(GhcFAsm)
+GhcStage2HcOpts    = -O0 $(GhcFAsm)
+GhcLibHcOpts       = -O2 $(GhcFAsm)
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+endif
+
+# ---------------- Bench build using LLVM --------------------------------------
+
+ifeq "$(BuildFlavour)" "bench-llvm"
+
+SRC_HC_OPTS        = -O -H64m
+GhcStage1HcOpts    = -O -fllvm
+GhcStage2HcOpts    = -O0 -fllvm
+GhcLibHcOpts       = -O2 -fllvm
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+endif
+
+# ------- A Bench build configured for cross-compilation ----------------------
+
+ifeq "$(BuildFlavour)" "bench-cross"
+
+SRC_HC_OPTS        = -O -H64m
+GhcStage1HcOpts    = -O $(GhcFAsm)
+GhcStage2HcOpts    = -O0 $(GhcFAsm)
+GhcLibHcOpts       = -O2 $(GhcFAsm)
+SplitObjs          = NO
+INTEGER_LIBRARY    = integer-simple
+Stage1Only         = YES
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO
+
+endif
+
+# -----------------------------------------------------------------------------
+# Other settings that might be useful
+
+# NoFib settings
+NoFibWays =
+STRIP_CMD = :
+
+# ghc-pwd needs to link against /usr/lib/libiconv.dylib explicitly, because
+# ghc-bootstrap's base library .a archive expects it
+utils/ghc-pwd_EXTRA_LIBRARIES += "/usr/lib/libiconv.dylib"
diff --git a/lang/ghc/files/buildpath-abi-stability.patch b/lang/ghc/files/buildpath-abi-stability.patch
index e69de29bb2..b0ac14e653 100644
--- a/lang/ghc/files/buildpath-abi-stability.patch
+++ b/lang/ghc/files/buildpath-abi-stability.patch
@@ -0,0 +1,35 @@
+Avoid leaking build path into ABI hashes
+
+GHC's build path leaks into the ABI hashes it generates by default. This
+causes problems because it means that recompiling GHC in a different path
+also requires recompiling all Haskell packages. Obviously, this is
+undesirable for a distribution.
+
+This patch originates from Debian's Joachim Breitner. See
+http://bugs.debian.org/785282 for the Debian bug report. It has been
+submitted upstream in https://ghc.haskell.org/trac/ghc/ticket/10424.
+
+Upstream-Status: Submitted [https://ghc.haskell.org/trac/ghc/ticket/10424]
+Index: ./compiler/iface/MkIface.hs
+===================================================================
+--- ./compiler/iface/MkIface.hs	2015-05-17 20:34:02.808643844 +0200
++++ ./compiler/iface/MkIface.hs	2015-05-17 20:34:02.804643799 +0200
+@@ -611,7 +611,7 @@
+    iface_hash <- computeFingerprint putNameLiterally
+                       (mod_hash,
+                        ann_fn (mkVarOcc "module"),  -- See mkIfaceAnnCache
+-                       mi_usages iface0,
++                       usages,
+                        sorted_deps,
+                        mi_hpc iface0)
+ 
+@@ -644,6 +644,9 @@
+     (non_orph_fis,   orph_fis)   = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
+     fix_fn = mi_fix_fn iface0
+     ann_fn = mkIfaceAnnCache (mi_anns iface0)
++    -- Do not allow filenames to affect the interface
++    usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
++
+ 
+ getOrphanHashes :: HscEnv -> [Module] -> IO [Fingerprint]
+ getOrphanHashes hsc_env mods = do
diff --git a/lang/ghc/files/patch-configure-disable-docs.diff b/lang/ghc/files/patch-configure-disable-docs.diff
deleted file mode 100644
index 73c548db9e..0000000000
--- a/lang/ghc/files/patch-configure-disable-docs.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- configure.orig	2014-09-17 23:12:43.000000000 +0200
-+++ configure	2014-09-17 23:13:29.000000000 +0200
-@@ -11943,6 +11943,9 @@
-     BUILD_DOCBOOK_PS=YES
-     BUILD_DOCBOOK_PDF=YES
- fi
-+BUILD_DOCBOOK_HTML=NO
-+BUILD_DOCBOOK_PS=NO
-+BUILD_DOCBOOK_PDF=NO
- 
- 
- 
diff --git a/lang/ghc/files/patch-configure-link-ghc-pwd-against-system-libiconv.diff b/lang/ghc/files/patch-configure-link-ghc-pwd-against-system-libiconv.diff
index e69de29bb2..6d64a7b1d7 100644
--- a/lang/ghc/files/patch-configure-link-ghc-pwd-against-system-libiconv.diff
+++ b/lang/ghc/files/patch-configure-link-ghc-pwd-against-system-libiconv.diff
@@ -0,0 +1,20 @@
+Fix initial build of ghc-pwd due to missing libiconv
+
+ghc-pwd fails to build because it is built using ghc-bootstrap, which ships
+libHSbase-$version.a, which references symbols from libiconv (and actually the
+system libiconv, because the MacPorts use uses _libiconv as symbol names, but
+the archive uses _iconv). Fix this by explicitly linking against the system
+libiconv for this initial build of ghc-pwd.
+
+Upstream-Status: Inappropriate (/usr/lib/libiconv.dylib is system-specific; a generic solution would be needed)
+--- configure.orig	2016-05-20 23:40:29.000000000 +0200
++++ configure	2016-05-20 23:41:06.000000000 +0200
+@@ -4149,7 +4149,7 @@
+ $as_echo "$as_me: Building in-tree ghc-pwd" >&6;}
+                 rm -rf utils/ghc-pwd/dist-boot
+     mkdir  utils/ghc-pwd/dist-boot
+-                GHC_LDFLAGS=`perl -e 'foreach (@ARGV) { print "-optl$_ " }' -- $LDFLAGS`
++                GHC_LDFLAGS=`perl -e 'foreach (@ARGV) { print "-optl$_ " }' -- $LDFLAGS /usr/lib/libiconv.dylib`
+         if ! "$WithGhc" $GHC_LDFLAGS -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd
+     then
+         as_fn_error $? "Building ghc-pwd failed" "$LINENO" 5
diff --git a/lang/ghc/files/patch-configure-workaround-bsdsed-incompatibility.diff b/lang/ghc/files/patch-configure-workaround-bsdsed-incompatibility.diff
deleted file mode 100644
index 8a3999acab..0000000000
--- a/lang/ghc/files/patch-configure-workaround-bsdsed-incompatibility.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig	2014-09-17 22:40:16.000000000 +0200
-+++ configure	2014-09-17 22:40:40.000000000 +0200
-@@ -4075,7 +4075,7 @@
- $as_echo "$as_me: Building in-tree ghc-pwd" >&6;}
-                 rm -rf utils/ghc-pwd/dist-boot
-     mkdir  utils/ghc-pwd/dist-boot
--                GHC_LDFLAGS=`echo $LDFLAGS | sed 's/\(^\| \)\([^ ]\)/\1-optl\2/g'`
-+                GHC_LDFLAGS= # this breaks our build with BSD sed, and we don't need the LDFLAGS here
-         if ! "$WithGhc" $GHC_LDFLAGS -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd
-     then
-         as_fn_error $? "Building ghc-pwd failed" "$LINENO" 5
diff --git a/lang/ghc/files/patch-unix_lib_osx_sandbox_compatibility.diff b/lang/ghc/files/patch-unix_lib_osx_sandbox_compatibility.diff
deleted file mode 100644
index 01251ad7cb..0000000000
--- a/lang/ghc/files/patch-unix_lib_osx_sandbox_compatibility.diff
+++ /dev/null
@@ -1,28 +0,0 @@
---- libraries/unix/System/Posix/Files.hsc.orig	2014-09-21 17:58:47.000000000 +0200
-+++ libraries/unix/System/Posix/Files.hsc	2014-09-21 17:59:31.000000000 +0200
-@@ -152,7 +152,8 @@
-     if (r == 0)
-         then return True
-         else do err <- getErrno
--                if (err == eACCES || err == eROFS || err == eTXTBSY)
-+                if (err == eACCES || err == eROFS || err == eTXTBSY ||
-+                    err == ePERM)
-                    then return False
-                    else throwErrnoPath "fileAccess" name
- 
---- libraries/unix/System/Posix/Files/ByteString.hsc.orig	2014-09-21 17:58:54.000000000 +0200
-+++ libraries/unix/System/Posix/Files/ByteString.hsc	2014-09-21 18:02:27.000000000 +0200
-@@ -158,9 +158,10 @@
-     if (r == 0)
- 	then return True
- 	else do err <- getErrno
--	        if (err == eACCES)
--		   then return False
--		   else throwErrnoPath "fileAccess" name
-+                if (err == eACCES || err == eROFS || err == eTXTBSY ||
-+                    err == ePERM)
-+                   then return False
-+                   else throwErrnoPath "fileAccess" name
- 
- 
- -- | @getFileStatus path@ calls gets the @FileStatus@ information (user ID,


More information about the macports-dev mailing list