pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/misc/cabal-install Update to cabal-install-3.6.2.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f1242af1b1c2
branches:  trunk
changeset: 373515:f1242af1b1c2
user:      pho <pho%pkgsrc.org@localhost>
date:      Fri Feb 11 17:49:05 2022 +0000

description:
Update to cabal-install-3.6.2.0

3.6.2.0 Emily Pillmore <emilypi%cohomolo.gy@localhost> October 2021
* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.6.2.0.md

3.6.0.0 Emily Pillmore <emilypi%cohomolo.gy@localhost> August 2021
* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.6.0.0.md

diffstat:

 misc/cabal-install/Makefile                                             |   5 +-
 misc/cabal-install/distinfo                                             |  13 +-
 misc/cabal-install/patches/patch-Distribution_Client_HashValue.hs       |  18 ----
 misc/cabal-install/patches/patch-Distribution_Client_HttpUtils.hs       |  17 ----
 misc/cabal-install/patches/patch-cabal-install.cabal                    |  31 +++++--
 misc/cabal-install/patches/patch-src_Distribution_Client_FileMonitor.hs |  40 ++++++++++
 6 files changed, 71 insertions(+), 53 deletions(-)

diffs (164 lines):

diff -r e3c2f97c1592 -r f1242af1b1c2 misc/cabal-install/Makefile
--- a/misc/cabal-install/Makefile       Fri Feb 11 17:46:20 2022 +0000
+++ b/misc/cabal-install/Makefile       Fri Feb 11 17:49:05 2022 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2022/01/18 02:48:19 pho Exp $
+# $NetBSD: Makefile,v 1.7 2022/02/11 17:49:05 pho Exp $
 
-DISTNAME=      cabal-install-3.4.0.0
+DISTNAME=      cabal-install-3.6.2.0
 PKGNAME=       ${DISTNAME}
-PKGREVISION=   2
 CATEGORIES=    misc
 
 MAINTAINER=    pho%cielonegro.org@localhost
diff -r e3c2f97c1592 -r f1242af1b1c2 misc/cabal-install/distinfo
--- a/misc/cabal-install/distinfo       Fri Feb 11 17:46:20 2022 +0000
+++ b/misc/cabal-install/distinfo       Fri Feb 11 17:49:05 2022 +0000
@@ -1,8 +1,7 @@
-$NetBSD: distinfo,v 1.5 2021/10/26 10:58:58 nia Exp $
+$NetBSD: distinfo,v 1.6 2022/02/11 17:49:05 pho Exp $
 
-BLAKE2s (cabal-install-3.4.0.0.tar.gz) = e2f35f1d5733d630de30c056bd196b199923a42986ad03918b9d85e6b95976b2
-SHA512 (cabal-install-3.4.0.0.tar.gz) = 0fd93c86c59e3c626341be3c67e69a1502f1ce1413b4a456cd930d5449cabdaeb033ac5f47673db0e708fc194aadf8ab0aa2904b6b0f195b57907c5b40588323
-Size (cabal-install-3.4.0.0.tar.gz) = 640775 bytes
-SHA1 (patch-Distribution_Client_HashValue.hs) = 95e627979748e5e697959c89ddee22127784a079
-SHA1 (patch-Distribution_Client_HttpUtils.hs) = d3979223eebba0ac20cce1f81ad083b3d490e66d
-SHA1 (patch-cabal-install.cabal) = 21d95449ded3b7f7576fa55578d9dbad511b10f9
+BLAKE2s (cabal-install-3.6.2.0.tar.gz) = 1aa26188bfd8afa31f589f1276546b2f304359667f36d268306591b510f7302b
+SHA512 (cabal-install-3.6.2.0.tar.gz) = a02d72fd7d0bf7778b1d4f2925e0b78f6c321cb29d59d559da758bfa6a0cd17fc776bd64911db8d28a208189b35db50aceae109782a1011e059446c4c2d77ad3
+Size (cabal-install-3.6.2.0.tar.gz) = 633319 bytes
+SHA1 (patch-cabal-install.cabal) = 0f993bc694658c409b585a640fe42b6d1b82d129
+SHA1 (patch-src_Distribution_Client_FileMonitor.hs) = e68ac117c20aa698033af2ab4fd0407b99b8542d
diff -r e3c2f97c1592 -r f1242af1b1c2 misc/cabal-install/patches/patch-Distribution_Client_HashValue.hs
--- a/misc/cabal-install/patches/patch-Distribution_Client_HashValue.hs Fri Feb 11 17:46:20 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-$NetBSD: patch-Distribution_Client_HashValue.hs,v 1.1 2021/04/25 13:43:44 pho Exp $
-
-Fix build with base16-bytestring-1.0.*
-
---- Distribution/Client/HashValue.hs.orig      2021-04-25 13:09:32.521615949 +0000
-+++ Distribution/Client/HashValue.hs
-@@ -71,9 +71,8 @@ hashFromTUF (Sec.Hash hashstr) =
-     --TODO: [code cleanup] either we should get TUF to use raw bytestrings or
-     -- perhaps we should also just use a base16 string as the internal rep.
-     case Base16.decode (BS.pack hashstr) of
--      (hash, trailing) | not (BS.null hash) && BS.null trailing
--        -> HashValue hash
--      _ -> error "hashFromTUF: cannot decode base16 hash"
-+      Right hash -> HashValue hash
-+      Left  _    -> error "hashFromTUF: cannot decode base16 hash"
- 
- 
- -- | Truncate a 32 byte SHA256 hash to
diff -r e3c2f97c1592 -r f1242af1b1c2 misc/cabal-install/patches/patch-Distribution_Client_HttpUtils.hs
--- a/misc/cabal-install/patches/patch-Distribution_Client_HttpUtils.hs Fri Feb 11 17:46:20 2022 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-$NetBSD: patch-Distribution_Client_HttpUtils.hs,v 1.1 2021/04/25 13:43:44 pho Exp $
-
-Fix build with base16-bytestring-1.0.*
-
---- Distribution/Client/HttpUtils.hs.orig      2021-04-25 13:14:42.533821044 +0000
-+++ Distribution/Client/HttpUtils.hs
-@@ -182,7 +182,9 @@ downloadURI transport verbosity uri path
-     fragmentParser = do
-         _ <- P.string "#sha256="
-         str <- some P.hexDigit
--        return (fst (Base16.decode (BS8.pack str)))
-+        case Base16.decode (BS8.pack str) of
-+            Right b16 -> return b16
-+            Left err  -> fail err
- 
- ------------------------------------------------------------------------------
- -- Utilities for repo url management
diff -r e3c2f97c1592 -r f1242af1b1c2 misc/cabal-install/patches/patch-cabal-install.cabal
--- a/misc/cabal-install/patches/patch-cabal-install.cabal      Fri Feb 11 17:46:20 2022 +0000
+++ b/misc/cabal-install/patches/patch-cabal-install.cabal      Fri Feb 11 17:49:05 2022 +0000
@@ -1,18 +1,33 @@
-$NetBSD: patch-cabal-install.cabal,v 1.2 2021/04/25 13:43:44 pho Exp $
+$NetBSD: patch-cabal-install.cabal,v 1.3 2022/02/11 17:49:05 pho Exp $
 
-Fix build with GHC 9
-Fix build with base16-bytestring-1.0.*
+Fix build with GHC 9.2
 
 --- cabal-install.cabal.orig   2001-09-09 01:46:40.000000000 +0000
 +++ cabal-install.cabal
-@@ -336,8 +336,8 @@ executable cabal
+@@ -266,7 +266,7 @@ executable cabal
      build-depends:
          async      >= 2.0      && < 2.3,
          array      >= 0.4      && < 0.6,
 -        base       >= 4.8      && < 4.15,
--        base16-bytestring >= 0.1.1 && < 0.2,
 +        base       >= 4.8      && < 5,
-+        base16-bytestring >= 0.1.1 && < 1.1,
+         base16-bytestring >= 0.1.1 && < 1.1.0.0,
          binary     >= 0.7.3    && < 0.9,
-         bytestring >= 0.10.6.0 && < 0.11,
-         Cabal      == 3.4.*,
+         bytestring >= 0.10.6.0 && < 0.12,
+@@ -278,7 +278,7 @@ executable cabal
+         echo       >= 0.1.3    && < 0.2,
+         edit-distance >= 0.2.2 && < 0.3,
+         filepath   >= 1.4.0.0  && < 1.5,
+-        hashable   >= 1.0      && < 1.4,
++        hashable   >= 1.0      && < 1.5,
+         HTTP       >= 4000.1.5 && < 4000.4,
+         mtl        >= 2.0      && < 2.3,
+         network-uri >= 2.6.0.2 && < 2.7,
+@@ -287,7 +287,7 @@ executable cabal
+         random     >= 1.2      && < 1.3,
+         stm        >= 2.0      && < 2.6,
+         tar        >= 0.5.0.3  && < 0.6,
+-        time       >= 1.5.0.1  && < 1.11,
++        time       >= 1.5.0.1  && < 1.12,
+         transformers >= 0.4.2.0 && < 0.6,
+         zlib       >= 0.5.3    && < 0.7,
+         hackage-security >= 0.6.0.1 && < 0.7,
diff -r e3c2f97c1592 -r f1242af1b1c2 misc/cabal-install/patches/patch-src_Distribution_Client_FileMonitor.hs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/cabal-install/patches/patch-src_Distribution_Client_FileMonitor.hs   Fri Feb 11 17:49:05 2022 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_Distribution_Client_FileMonitor.hs,v 1.1 2022/02/11 17:49:05 pho Exp $
+
+Cabal-3.6.0.0 shipped with GHC 9.2.1 exports neither Tag nor
+structuredDecodeTriple so we have no choice but to kill the entire
+file-watching machinery. pho@ has no idea how it ended up in this
+situation. The upstream has never released Cabal with this broken
+Distribution.Utils.Structured apparently???
+
+--- src/Distribution/Client/FileMonitor.hs.orig        2022-02-08 02:09:01.086511380 +0000
++++ src/Distribution/Client/FileMonitor.hs
+@@ -63,7 +63,7 @@ import           Distribution.Compat.Tim
+ import           Distribution.Client.Glob
+ import           Distribution.Simple.Utils (handleDoesNotExist, writeFileAtomic)
+ import           Distribution.Client.Utils (mergeBy, MergeResult(..))
+-import           Distribution.Utils.Structured (structuredEncode, Tag (..))
++import           Distribution.Utils.Structured (structuredEncode)
+ import           System.FilePath
+ import           System.Directory
+ import           System.IO
+@@ -508,19 +508,7 @@ checkFileMonitorChanged
+ structuredDecodeTriple
+   :: forall a b c. (Structured a, Structured b, Structured c, Binary.Binary a, Binary.Binary b, Binary.Binary c)
+   => BS.ByteString -> Either String (a, b, Either String c)
+-structuredDecodeTriple lbs =
+-  let partialDecode =
+-         (`runGetOrFail` lbs) $ do
+-            (_ :: Tag (a,b,c)) <- Binary.get
+-            (a :: a) <- Binary.get
+-            (b :: b) <- Binary.get
+-            pure (a, b)
+-      cleanEither (Left (_, pos, msg)) = Left ("Data.Binary.Get.runGet at position " ++ show pos ++ ": " ++ msg)
+-      cleanEither (Right (_,_,v))     = Right v
+-
+-  in case partialDecode of
+-       Left (_, pos, msg) ->  Left ("Data.Binary.Get.runGet at position " ++ show pos ++ ": " ++ msg)
+-       Right (lbs', _, (x,y)) -> Right (x, y, cleanEither $ runGetOrFail (Binary.get :: Binary.Get c) lbs')
++structuredDecodeTriple _ = Left "cabal-install cannot currently monitor changes in files"
+ 
+ -- | Helper for reading the cache file.
+ --



Home | Main Index | Thread Index | Old Index