projects/aports·blob master · refs

31 lines · 1.1 KiB

1Patch-Source: https://cdn.netbsd.org/pub/pkgsrc/pkgsrc-2024Q1/pkgsrc/lang/ghc96/patches/patch-hadrian_bootstrap_src_Main.hs
2
3Reference: 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
7Fix build with cabal-install-parsers >= 0.6. This doesn't affect normal
8builds. It's only for creating Hadrian bootstrap source archives.
9
10https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11546
11
12--- a/hadrian/bootstrap/src/Main.hs
13+++ b/hadrian/bootstrap/src/Main.hs
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