security/hs-cryptonite: Update to 0.30
* Fix some C symbol blake2b prefix to be cryptonite_ prefix (fix mixing with other C library) * add hmac-lazy * Fix compilation with GHC 9.2 * Drop support for GHC8.0, GHC8.2, GHC8.4, GHC8.6
This commit is contained in:
parent
5156013449
commit
3f9caabd96
4 changed files with 9 additions and 61 deletions
|
@ -1,7 +1,6 @@
|
|||
# $NetBSD: Makefile,v 1.7 2022/02/26 03:58:21 pho Exp $
|
||||
# $NetBSD: Makefile,v 1.8 2022/09/07 00:58:45 pho Exp $
|
||||
|
||||
DISTNAME= cryptonite-0.29
|
||||
PKGREVISION= 2
|
||||
DISTNAME= cryptonite-0.30
|
||||
CATEGORIES= security
|
||||
|
||||
MAINTAINER= pho@cielonegro.org
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# $NetBSD: buildlink3.mk,v 1.7 2022/02/26 03:58:21 pho Exp $
|
||||
# $NetBSD: buildlink3.mk,v 1.8 2022/09/07 00:58:45 pho Exp $
|
||||
|
||||
BUILDLINK_TREE+= hs-cryptonite
|
||||
|
||||
.if !defined(HS_CRYPTONITE_BUILDLINK3_MK)
|
||||
HS_CRYPTONITE_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.hs-cryptonite+= hs-cryptonite>=0.29
|
||||
BUILDLINK_ABI_DEPENDS.hs-cryptonite+= hs-cryptonite>=0.29nb2
|
||||
BUILDLINK_API_DEPENDS.hs-cryptonite+= hs-cryptonite>=0.30
|
||||
BUILDLINK_ABI_DEPENDS.hs-cryptonite+= hs-cryptonite>=0.30
|
||||
BUILDLINK_PKGSRCDIR.hs-cryptonite?= ../../security/hs-cryptonite
|
||||
|
||||
.include "../../devel/hs-basement/buildlink3.mk"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
$NetBSD: distinfo,v 1.5 2022/02/11 13:10:15 pho Exp $
|
||||
$NetBSD: distinfo,v 1.6 2022/09/07 00:58:45 pho Exp $
|
||||
|
||||
BLAKE2s (cryptonite-0.29.tar.gz) = 2fd21184176bc46bdcad80c9194c66d6dbecd159b1ecdcc436d854922bc435ef
|
||||
SHA512 (cryptonite-0.29.tar.gz) = 7f80268e429a9f700709ebdb00da1e2831f2edca064feaa06a9050060fea572abc2fdfee976f60b18a4085cf3a3533e70129104c82e7b050358a97e8575928f2
|
||||
Size (cryptonite-0.29.tar.gz) = 622119 bytes
|
||||
SHA1 (patch-Crypto_Internal_CompatPrim.hs) = 8828755bbae0cd36e3e934a83216876be5b93138
|
||||
BLAKE2s (cryptonite-0.30.tar.gz) = 00b434b71d9c3c1d8808186d0cf036e5497bdd2858ecd8b3f936456b9fc3d4fe
|
||||
SHA512 (cryptonite-0.30.tar.gz) = 519120263fb7c2b9f910e48cf43feaca07f7e705ea70c578da362dafa637b654cab90e3b9484497e33a6fdd5b8f867c0ede60d0dddba02602044b9b3de502d16
|
||||
Size (cryptonite-0.30.tar.gz) = 621062 bytes
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
$NetBSD: patch-Crypto_Internal_CompatPrim.hs,v 1.1 2022/02/11 13:10:15 pho Exp $
|
||||
|
||||
Fix build on GHC 9.2:
|
||||
https://github.com/haskell-crypto/cryptonite/pull/354
|
||||
|
||||
--- Crypto/Internal/CompatPrim.hs.orig 2022-02-07 13:27:20.338888456 +0000
|
||||
+++ Crypto/Internal/CompatPrim.hs
|
||||
@@ -31,7 +31,11 @@ import Data.Memory.Endian (getSystemEndi
|
||||
-- | Byteswap Word# to or from Big Endian
|
||||
--
|
||||
-- On a big endian machine, this function is a nop.
|
||||
+#if MIN_VERSION_base(4,16,0)
|
||||
+be32Prim :: Word32# -> Word32#
|
||||
+#else
|
||||
be32Prim :: Word# -> Word#
|
||||
+#endif
|
||||
#ifdef ARCH_IS_LITTLE_ENDIAN
|
||||
be32Prim = byteswap32Prim
|
||||
#elif defined(ARCH_IS_BIG_ENDIAN)
|
||||
@@ -43,7 +47,11 @@ be32Prim w = if getSystemEndianness == L
|
||||
-- | Byteswap Word# to or from Little Endian
|
||||
--
|
||||
-- On a little endian machine, this function is a nop.
|
||||
+#if MIN_VERSION_base(4,16,0)
|
||||
+le32Prim :: Word32# -> Word32#
|
||||
+#else
|
||||
le32Prim :: Word# -> Word#
|
||||
+#endif
|
||||
#ifdef ARCH_IS_LITTLE_ENDIAN
|
||||
le32Prim w = w
|
||||
#elif defined(ARCH_IS_BIG_ENDIAN)
|
||||
@@ -54,6 +62,10 @@ le32Prim w = if getSystemEndianness == L
|
||||
|
||||
-- | Simple compatibility for byteswap the lower 32 bits of a Word#
|
||||
-- at the primitive level
|
||||
+#if MIN_VERSION_base(4,16,0)
|
||||
+byteswap32Prim :: Word32# -> Word32#
|
||||
+byteswap32Prim w = wordToWord32# (byteSwap32# (word32ToWord# w))
|
||||
+#else
|
||||
byteswap32Prim :: Word# -> Word#
|
||||
#if __GLASGOW_HASKELL__ >= 708
|
||||
byteswap32Prim w = byteSwap32# w
|
||||
@@ -65,6 +77,7 @@ byteswap32Prim w =
|
||||
!d = and# (uncheckedShiftRL# w 24#) 0x000000ff##
|
||||
in or# a (or# b (or# c d))
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
-- | Combine 4 word8 [a,b,c,d] to a word32 representing [a,b,c,d]
|
||||
convert4To32 :: Word# -> Word# -> Word# -> Word#
|
Loading…
Reference in a new issue