| 1 | Patch-Source: https://cdn.netbsd.org/pub/pkgsrc/pkgsrc-2024Q1/pkgsrc/lang/ghc96/patches/patch-hadrian_bootstrap_src_Main.hs
|
| 2 |
|
| 3 | Reference: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12603#note_565099
|
| 4 | --
|
| 5 | $NetBSD: patch-hadrian_bootstrap_src_Main.hs,v 1.2 2023/11/02 15:29:31 pho Exp $
|
| 6 |
|
| 7 | Fix build with cabal-install-parsers >= 0.6. This doesn't affect normal
|
| 8 | builds. It's only for creating Hadrian bootstrap source archives.
|
| 9 |
|
| 10 | https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11546
|
| 11 |
|
| 12 | |
| 13 | |
| 14 | @@ -1,3 +1,5 @@
|
| 15 | +{-# Language CPP #-}
|
| 16 | +
|
| 17 | module Main (main) where
|
| 18 |
|
| 19 | import Control.Monad (when)
|
| 20 | @@ -85,7 +87,11 @@ main2 meta plan = do
|
| 21 | return
|
| 22 | ( Hackage
|
| 23 | , Just $ fromIntegral (I.riRevision relInfo)
|
| 24 | +#if MIN_VERSION_cabal_install_parsers(0, 6, 0)
|
| 25 | + , P.sha256FromByteString $ I.getSHA256 $ I.riCabalHash relInfo
|
| 26 | +#else
|
| 27 | , P.sha256FromByteString $ I.getSHA256 $ I.riCabal relInfo
|
| 28 | +#endif
|
| 29 | )
|
| 30 |
|
| 31 | Nothing -> case P.uType unit of
|