Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix broken ghc port, and add a patch to make it work on Sierra.
  • Loading branch information
agraef authored and neverpanic committed Feb 15, 2017
1 parent b385383 commit d7385a7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lang/ghc/Portfile
Expand Up @@ -8,7 +8,7 @@ name ghc
# 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 4
revision 5
categories lang haskell
maintainers cal openmaintainer
license BSD
Expand Down Expand Up @@ -51,13 +51,17 @@ depends_build port:ghc-bootstrap \
depends_lib port:gmp \
port:ncurses \
port:libiconv \
port:llvm-3.9 \
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

platform darwin 16 {
patchfiles-append patch-sierra-compatibility.diff
}

livecheck.type none
test.run yes

Expand All @@ -77,7 +81,7 @@ compiler.blacklist-append \
macports-clang-3.3

set bootstraproot ${prefix}/share/ghc-bootstrap
set llvmPrefix ${prefix}/libexec/llvm-3.9
set llvmPrefix ${prefix}/libexec/llvm-3.5
configure.args --with-ghc=${bootstraproot}/bin/ghc \
--with-iconv-includes=${prefix}/include \
--with-iconv-libraries=${prefix}/lib \
Expand Down
13 changes: 13 additions & 0 deletions lang/ghc/files/patch-sierra-compatibility.diff
@@ -0,0 +1,13 @@
--- rts/posix/GetTime.c.orig 2017-02-15 08:41:47.000000000 +0100
+++ rts/posix/GetTime.c 2017-02-15 08:43:42.000000000 +0100
@@ -25,6 +25,10 @@
# include <papi.h>
#endif

+#ifdef darwin_HOST_OS
+#include <mach/mach_time.h>
+#endif
+
#if ! ((defined(HAVE_GETRUSAGE) && !irix_HOST_OS) || defined(HAVE_TIMES))
#error No implementation for getProcessCPUTime() available.
#endif

0 comments on commit d7385a7

Please sign in to comment.