Page MenuHomeFreeBSD

D12043.id32304.diff
No OneTemporary

D12043.id32304.diff

Index: devel/hs-ncurses/files/patch-lib_UI_NCurses.chs
===================================================================
--- /dev/null
+++ devel/hs-ncurses/files/patch-lib_UI_NCurses.chs
@@ -0,0 +1,26 @@
+--- lib/UI/NCurses.chs.orig 2016-08-29 01:09:37 UTC
++++ lib/UI/NCurses.chs
+@@ -435,12 +435,12 @@ setColor (ColorID pair) = withWindow_ "s
+ -- | Add some text to the window, at the current cursor position.
+ drawString :: String -> Update ()
+ drawString str = withWindow_ "drawString" $ \win ->
+- withCWString str ({# call waddwstr #} win)
++ withCWString str $ \s -> ({# call waddwstr #} win) (castPtr s)
+
+ -- | Add some text to the window, at the current cursor position.
+ drawText :: T.Text -> Update ()
+ drawText txt = withWindow_ "drawText" $ \win ->
+- withCWString (T.unpack txt) ({# call waddwstr #} win)
++ withCWString (T.unpack txt) $ \s -> ({# call waddwstr #} win) (castPtr s)
+
+ drawGlyph :: Glyph -> Update ()
+ drawGlyph glyph = withWindow_ "drawGlyph" $ \win ->
+@@ -718,7 +718,7 @@ withGlyph (Glyph char attrs) io =
+ let cAttrs = foldl' (\acc a -> acc .|. attrToInt a) 0 attrs in
+ withCWStringLen [char] $ \(cChars, cCharsLen) ->
+ allocaBytes {# sizeof cchar_t #} $ \pBuf -> do
+- {# call hsncurses_init_cchar_t #} (CCharT pBuf) cAttrs cChars (fromIntegral cCharsLen)
++ {# call hsncurses_init_cchar_t #} (CCharT pBuf) cAttrs (castPtr cChars) (fromIntegral cCharsLen)
+ io (CCharT pBuf)
+
+ -- | Upper left corner
Index: lang/ghc/Makefile
===================================================================
--- lang/ghc/Makefile
+++ lang/ghc/Makefile
@@ -93,13 +93,6 @@
DISTFILES+= ghc-${BOOT_GHC_VERSION}-boot-${ARCH}-freebsd${EXTRACT_SUFX}:boot
.endif # MBOOT
-# LLVM is still not properly supported, further it does not make sense to have
-# to depend on old llvm ports that will be removed from the ports soon.
-# So for now, stick to GCC.
-# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
-# We should however investigate whether base's clang is enough to build ghc&co.
-# This will likely require some modifications to compiler/main/*hs
-USE_GCC= yes
CONFIGURE_ARGS+= -with-gcc=${CC}
.if empty(PORT_OPTIONS:MBOOT)
CONFIGURE_ARGS_BOOT+= --with-gcc=${CC}
Index: lang/ghc/bsd.cabal.mk
===================================================================
--- lang/ghc/bsd.cabal.mk
+++ lang/ghc/bsd.cabal.mk
@@ -96,13 +96,6 @@
BUILD_DEPENDS+= ghc>=${GHC_VERSION}:lang/ghc
.endif
-# LLVM is still not properly supported, further it does not make sense to have
-# to depend on old llvm ports that will be removed from the ports soon.
-# So for now, stick to GCC -- this might change with ghc-8.4.
-# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
-# We should however investigate whether base's clang is enough to build ghc&co.
-USE_GCC= yes
-
CONFIGURE_ARGS+= --with-gcc=${CC} --with-ld=${LD} --with-ar=${AR}
Index: lang/ghc/files/patch-compiler_main_SysTools.hs
===================================================================
--- /dev/null
+++ lang/ghc/files/patch-compiler_main_SysTools.hs
@@ -0,0 +1,12 @@
+--- compiler/main/SysTools.hs.orig 2017-08-12 09:25:57 UTC
++++ compiler/main/SysTools.hs
+@@ -907,6 +907,9 @@ getCompilerInfo' dflags = do
+ -- Regular clang
+ | any ("clang version" `isInfixOf`) stde =
+ return Clang
++ -- FreeBSD clang
++ | any ("FreeBSD clang version" `isInfixOf`) stde =
++ return Clang
+ -- XCode 5.1 clang
+ | any ("Apple LLVM version 5.1" `isPrefixOf`) stde =
+ return AppleClang51
Index: lang/ghc/files/patch-rts_Linker.c
===================================================================
--- /dev/null
+++ lang/ghc/files/patch-rts_Linker.c
@@ -0,0 +1,11 @@
+--- rts/Linker.c.orig 2017-08-12 09:22:13 UTC
++++ rts/Linker.c
+@@ -797,7 +797,7 @@ initLinker_ (int retain_cafs)
+ # endif /* RTLD_DEFAULT */
+
+ compileResult = regcomp(&re_invalid,
+- "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short)",
++ "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format)",
+ REG_EXTENDED);
+ if (compileResult != 0) {
+ barf("Compiling re_invalid failed");

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 20, 7:33 AM (18 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30007412
Default Alt Text
D12043.id32304.diff (4 KB)

Event Timeline