[arch-commits] Commit in cabal-install/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Thu Dec 24 09:40:48 UTC 2020
Date: Thursday, December 24, 2020 @ 09:40:47
Author: felixonmars
Revision: 786937
archrelease: copy trunk to community-staging-x86_64
Added:
cabal-install/repos/community-staging-x86_64/
cabal-install/repos/community-staging-x86_64/PKGBUILD
(from rev 786936, cabal-install/trunk/PKGBUILD)
cabal-install/repos/community-staging-x86_64/cabal-install-base16-bytestring1.0.patch
(from rev 786936, cabal-install/trunk/cabal-install-base16-bytestring1.0.patch)
------------------------------------------+
PKGBUILD | 49 +++++++++++++++++++++++++++++
cabal-install-base16-bytestring1.0.patch | 38 ++++++++++++++++++++++
2 files changed, 87 insertions(+)
Copied: cabal-install/repos/community-staging-x86_64/PKGBUILD (from rev 786936, cabal-install/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-12-24 09:40:47 UTC (rev 786937)
@@ -0,0 +1,49 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Dziedzic <gostrc at gmail.com>
+# Contributor: Vesa Kaihlavirta <vesa at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=cabal-install
+pkgver=3.2.0.0
+pkgrel=126
+pkgdesc="The command-line interface for Cabal and Hackage."
+url="https://hackage.haskell.org/package/cabal-install"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-async' 'haskell-base16-bytestring' 'haskell-cryptohash-sha256'
+ 'haskell-echo' 'haskell-edit-distance' 'haskell-hackage-security' 'haskell-hashable'
+ 'haskell-http' 'haskell-network' 'haskell-network-uri' 'haskell-random' 'haskell-resolv'
+ 'haskell-tar' 'haskell-zlib' 'haskell-lukko')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/package/cabal-install-${pkgver}/cabal-install-${pkgver}.tar.gz"
+ $pkgname-ghc8.10.patch::https://github.com/haskell/cabal/pull/6711.patch
+ $pkgname-base16-bytestring1.0.patch)
+sha512sums=('ad937b2df42b688e4608aa2b91a25daf1042e5573626202e5182cbfeca9acc5933194853405a6396c60d0d28d6d0d5c5276fd85cb6acf4be2c8cd12afe747062'
+ '9e7245f5080e9c1609994b21d13ecbacb78fa9314d80425464f714f9bd68910d3fb4a5101b582461a89ec0b7115ef6acb2eb4ffba7a2477f65dca192f1eac1e7'
+ '391356a85d78a147a909e9dee5981b46b1f2c5ffa251c070f3bef700d8ac490e02f5fa45ea9674f5fb4e3d3067809dfd72494753dc5d20b01e64c11d6320367f')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p2 -i ../$pkgname-ghc8.10.patch || :
+ patch -p2 -i ../$pkgname-base16-bytestring1.0.patch
+ sed -i 's/< *1.2/<2/' $pkgname.cabal
+}
+
+build() {
+ cd $pkgname-$pkgver
+
+ runhaskell Setup configure -O --prefix=/usr --enable-executable-dynamic --disable-library-vanilla \
+ --docdir="/usr/share/doc/${pkgname}"
+ runhaskell Setup build $MAKEFLAGS
+}
+
+package() {
+ cd $pkgname-$pkgver
+ runhaskell Setup copy --destdir="${pkgdir}"
+
+ install -Dm644 LICENSE \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -Dm644 bash-completion/cabal \
+ "${pkgdir}/usr/share/bash-completion/completions/cabal"
+}
Copied: cabal-install/repos/community-staging-x86_64/cabal-install-base16-bytestring1.0.patch (from rev 786936, cabal-install/trunk/cabal-install-base16-bytestring1.0.patch)
===================================================================
--- community-staging-x86_64/cabal-install-base16-bytestring1.0.patch (rev 0)
+++ community-staging-x86_64/cabal-install-base16-bytestring1.0.patch 2020-12-24 09:40:47 UTC (rev 786937)
@@ -0,0 +1,38 @@
+diff --git a/cabal-install/Distribution/Client/HashValue.hs b/cabal-install/Distribution/Client/HashValue.hs
+index 54b8aee9e..11e647c1c 100644
+--- a/cabal-install/Distribution/Client/HashValue.hs
++++ b/cabal-install/Distribution/Client/HashValue.hs
+@@ -1,3 +1,4 @@
++{-# LANGUAGE CPP #-}
+ {-# LANGUAGE DeriveDataTypeable #-}
+ {-# LANGUAGE DeriveGeneric #-}
+ module Distribution.Client.HashValue (
+@@ -72,10 +73,14 @@ 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
++#if MIN_VERSION_base16_bytestring(1,0,0)
++ Right hash -> HashValue hash
++ Left _ -> error "hashFromTUF: cannot decode base16"
++#else
+ (hash, trailing) | not (BS.null hash) && BS.null trailing
+ -> HashValue hash
+ _ -> error "hashFromTUF: cannot decode base16 hash"
+-
++#endif
+
+ -- | Truncate a 32 byte SHA256 hash to
+ --
+diff --git a/cabal-install/cabal-install.cabal b/cabal-install/cabal-install.cabal
+index ee49fe245..6d423fdb3 100644
+--- a/cabal-install/cabal-install.cabal
++++ b/cabal-install/cabal-install.cabal
+@@ -319,7 +319,7 @@ executable cabal
+ async >= 2.0 && < 2.3,
+ array >= 0.4 && < 0.6,
+ base >= 4.8 && < 4.15,
+- base16-bytestring >= 0.1.1 && < 0.2,
++ base16-bytestring >= 0.1.1 && < 1.1.0.0,
+ binary >= 0.7.3 && < 0.9,
+ bytestring >= 0.10.6.0 && < 0.11,
+ Cabal == 3.2.*,
More information about the arch-commits
mailing list