diff options
| author | Tobias C. Berner <tcberner@FreeBSD.org> | 2018-02-10 08:03:22 +0000 |
|---|---|---|
| committer | Tobias C. Berner <tcberner@FreeBSD.org> | 2018-02-10 08:03:22 +0000 |
| commit | 932e6dc413857ca66802dc4fbe28f5477d4abc11 (patch) | |
| tree | 595a1c21749cc18bad532e9f0d057b340bc9d7c3 /devel/hs-ncurses/files/patch-lib_UI_NCurses.chs | |
| parent | databases/sqlcipher: update 3.4.1 -> 3.4.2 to fix build with libressl (diff) | |
Switch C compiler used to compile GHC to base Clang.
This removes build dependency on gcc and runtime dependency on gcc's runtime libraries.
Big thanks to Gleb for working on this.
PR: 225185
Submitted by: Gleb Popov <6yearold@gmail.com>
Exp-run by: antoine
Reviewed by: pgj
Differential Revision: https://reviews.freebsd.org/D12043
Diffstat (limited to 'devel/hs-ncurses/files/patch-lib_UI_NCurses.chs')
| -rw-r--r-- | devel/hs-ncurses/files/patch-lib_UI_NCurses.chs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/devel/hs-ncurses/files/patch-lib_UI_NCurses.chs b/devel/hs-ncurses/files/patch-lib_UI_NCurses.chs new file mode 100644 index 000000000000..55c52891e718 --- /dev/null +++ b/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 |
