-# Disable file splitting until pkgsrc has been improved.
-pre-build:
- ${ECHO} "SplitObjs=NO" > ${WRKSRC}/mk/build.mk
+# Disable file splitting until pkgsrc gets improved.
+ ${RUN} ${ECHO} "SplitObjs = NO" >> ${WRKSRC}/mk/build.mk
+# If we don't explicitly disable HsColour, PLIST gets changed
+# depending on whether we have installed it or not.
+ ${RUN} ${ECHO} "HSCOLOUR_SRCS = NO" >> ${WRKSRC}/mk/build.mk
+
+# Substitutions for INSTALL and DEINSTALL.
+FILES_SUBST+= DISTNAME=${DISTNAME}
+
+# There is an unused script which don't pass the portability test.
+CHECK_PORTABILITY_SKIP+= distrib/prep-bin-dist-mingw
+
+# GHC currently *requires* ${PREFIX}/lib to be in
+# "/etc/ld-elf.so.conf". See
+# http://hackage.haskell.org/trac/ghc/ticket/2933
+CHECK_SHLIBS_SUPPORTED= no
+
+# I guess pdcurses works well but not tested.
+USE_NCURSES= yes
+.include "../../devel/ncurses/buildlink3.mk"