mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-05 20:32:58 +02:00
git-annex: update to 10.20250630.
This commit is contained in:
parent
c02e05f875
commit
788167281a
5 changed files with 521 additions and 45 deletions
|
@ -1,30 +0,0 @@
|
||||||
flags:
|
|
||||||
git-annex:
|
|
||||||
production: true
|
|
||||||
assistant: true
|
|
||||||
pairing: true
|
|
||||||
torrentparser: true
|
|
||||||
magicmime: false
|
|
||||||
dbus: false
|
|
||||||
debuglocks: false
|
|
||||||
benchmark: true
|
|
||||||
gitlfs: true
|
|
||||||
packages:
|
|
||||||
- '.'
|
|
||||||
resolver: lts-19.0
|
|
||||||
extra-deps:
|
|
||||||
- IfElse-0.85
|
|
||||||
- aws-0.22
|
|
||||||
- bloomfilter-2.0.1.0
|
|
||||||
- git-lfs-1.2.0
|
|
||||||
- http-client-restricted-0.0.4
|
|
||||||
- network-multicast-0.3.2
|
|
||||||
- sandi-0.5
|
|
||||||
- torrent-10000.1.1
|
|
||||||
- base16-bytestring-0.1.1.7
|
|
||||||
- base64-bytestring-1.0.0.3
|
|
||||||
- bencode-0.6.1.1
|
|
||||||
- aeson-1.5.6.0@sha256:5003bb6fd260d2e2d5a51dee2bf5c8e8f29e4e0e0288fef805c22dcc80ecab06,6788
|
|
||||||
- http-client-0.7.11@sha256:3f59ac8ffe2a3768846cdda040a0d1df2a413960529ba61c839861c948871967,5756
|
|
||||||
explicit-setup-deps:
|
|
||||||
git-annex: true
|
|
242
srcpkgs/git-annex/patches/basement.patch
Normal file
242
srcpkgs/git-annex/patches/basement.patch
Normal file
|
@ -0,0 +1,242 @@
|
||||||
|
From 38be2c93acb6f459d24ed6c626981c35ccf44095 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sylvain Henry <sylvain@haskus.fr>
|
||||||
|
Date: Thu, 16 Feb 2023 15:40:45 +0100
|
||||||
|
Subject: [PATCH] Fix build on 32-bit architectures
|
||||||
|
|
||||||
|
---
|
||||||
|
basement/Basement/Bits.hs | 4 ++++
|
||||||
|
basement/Basement/From.hs | 24 -----------------------
|
||||||
|
basement/Basement/Numerical/Additive.hs | 4 ++++
|
||||||
|
basement/Basement/Numerical/Conversion.hs | 20 +++++++++++++++++++
|
||||||
|
basement/Basement/PrimType.hs | 6 +++++-
|
||||||
|
basement/Basement/Types/OffsetSize.hs | 22 +++++++++++++++++++--
|
||||||
|
6 files changed, 53 insertions(+), 27 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/basement/Basement/Bits.hs b/basement/Basement/Bits.hs
|
||||||
|
index 7eeea0f5..24520ed7 100644
|
||||||
|
--- a/basement/Basement/Bits.hs
|
||||||
|
+++ b/basement/Basement/Bits.hs
|
||||||
|
@@ -54,8 +54,12 @@ import GHC.Int
|
||||||
|
import Basement.Compat.Primitive
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+import GHC.Exts
|
||||||
|
+#else
|
||||||
|
import GHC.IntWord64
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-- | operation over finite bits
|
||||||
|
class FiniteBitsOps bits where
|
||||||
|
diff --git a/basement/Basement/From.hs b/basement/Basement/From.hs
|
||||||
|
index 7bbe141c..80014b3e 100644
|
||||||
|
--- a/basement/Basement/From.hs
|
||||||
|
+++ b/basement/Basement/From.hs
|
||||||
|
@@ -272,23 +272,11 @@ instance (NatWithinBound (CountOf ty) n, KnownNat n, PrimType ty)
|
||||||
|
tryFrom = BlockN.toBlockN . UArray.toBlock . BoxArray.mapToUnboxed id
|
||||||
|
|
||||||
|
instance (KnownNat n, NatWithinBound Word8 n) => From (Zn64 n) Word8 where
|
||||||
|
-#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
- from = narrow . unZn64 where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||||
|
-#else
|
||||||
|
from = narrow . unZn64 where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# w))
|
||||||
|
-#endif
|
||||||
|
instance (KnownNat n, NatWithinBound Word16 n) => From (Zn64 n) Word16 where
|
||||||
|
-#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
- from = narrow . unZn64 where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||||
|
-#else
|
||||||
|
from = narrow . unZn64 where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# w))
|
||||||
|
-#endif
|
||||||
|
instance (KnownNat n, NatWithinBound Word32 n) => From (Zn64 n) Word32 where
|
||||||
|
-#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
- from = narrow . unZn64 where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||||
|
-#else
|
||||||
|
from = narrow . unZn64 where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# w))
|
||||||
|
-#endif
|
||||||
|
instance From (Zn64 n) Word64 where
|
||||||
|
from = unZn64
|
||||||
|
instance From (Zn64 n) Word128 where
|
||||||
|
@@ -297,23 +285,11 @@ instance From (Zn64 n) Word256 where
|
||||||
|
from = from . unZn64
|
||||||
|
|
||||||
|
instance (KnownNat n, NatWithinBound Word8 n) => From (Zn n) Word8 where
|
||||||
|
-#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
- from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||||
|
-#else
|
||||||
|
from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W8# (wordToWord8# (word64ToWord# w))
|
||||||
|
-#endif
|
||||||
|
instance (KnownNat n, NatWithinBound Word16 n) => From (Zn n) Word16 where
|
||||||
|
-#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
- from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||||
|
-#else
|
||||||
|
from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W16# (wordToWord16# (word64ToWord# w))
|
||||||
|
-#endif
|
||||||
|
instance (KnownNat n, NatWithinBound Word32 n) => From (Zn n) Word32 where
|
||||||
|
-#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
- from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# (GHC.Prim.word64ToWord# w)))
|
||||||
|
-#else
|
||||||
|
from = narrow . naturalToWord64 . unZn where narrow (W64# w) = W32# (wordToWord32# (word64ToWord# w))
|
||||||
|
-#endif
|
||||||
|
instance (KnownNat n, NatWithinBound Word64 n) => From (Zn n) Word64 where
|
||||||
|
from = naturalToWord64 . unZn
|
||||||
|
instance (KnownNat n, NatWithinBound Word128 n) => From (Zn n) Word128 where
|
||||||
|
diff --git a/basement/Basement/Numerical/Additive.hs b/basement/Basement/Numerical/Additive.hs
|
||||||
|
index d0dfb973..8ab65aa0 100644
|
||||||
|
--- a/basement/Basement/Numerical/Additive.hs
|
||||||
|
+++ b/basement/Basement/Numerical/Additive.hs
|
||||||
|
@@ -30,8 +30,12 @@ import qualified Basement.Types.Word128 as Word128
|
||||||
|
import qualified Basement.Types.Word256 as Word256
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+import GHC.Exts
|
||||||
|
+#else
|
||||||
|
import GHC.IntWord64
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-- | Represent class of things that can be added together,
|
||||||
|
-- contains a neutral element and is commutative.
|
||||||
|
diff --git a/basement/Basement/Numerical/Conversion.hs b/basement/Basement/Numerical/Conversion.hs
|
||||||
|
index db502c07..fddc8232 100644
|
||||||
|
--- a/basement/Basement/Numerical/Conversion.hs
|
||||||
|
+++ b/basement/Basement/Numerical/Conversion.hs
|
||||||
|
@@ -26,8 +26,12 @@ import GHC.Word
|
||||||
|
import Basement.Compat.Primitive
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+import GHC.Exts
|
||||||
|
+#else
|
||||||
|
import GHC.IntWord64
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
intToInt64 :: Int -> Int64
|
||||||
|
#if WORD_SIZE_IN_BITS == 64
|
||||||
|
@@ -96,11 +100,22 @@ int64ToWord64 (I64# i) = W64# (int64ToWord64# i)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS == 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+word64ToWord# :: Word64# -> Word#
|
||||||
|
+word64ToWord# i = word64ToWord# i
|
||||||
|
+#else
|
||||||
|
word64ToWord# :: Word# -> Word#
|
||||||
|
word64ToWord# i = i
|
||||||
|
+#endif
|
||||||
|
{-# INLINE word64ToWord# #-}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+word64ToWord32# :: Word64# -> Word32#
|
||||||
|
+word64ToWord32# i = wordToWord32# (word64ToWord# i)
|
||||||
|
+{-# INLINE word64ToWord32# #-}
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
-- | 2 Word32s
|
||||||
|
data Word32x2 = Word32x2 {-# UNPACK #-} !Word32
|
||||||
|
{-# UNPACK #-} !Word32
|
||||||
|
@@ -113,9 +128,14 @@ word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (uncheckedShiftRL# (G
|
||||||
|
word64ToWord32s (W64# w64) = Word32x2 (W32# (wordToWord32# (uncheckedShiftRL# w64 32#))) (W32# (wordToWord32# w64))
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+word64ToWord32s :: Word64 -> Word32x2
|
||||||
|
+word64ToWord32s (W64# w64) = Word32x2 (W32# (word64ToWord32# (uncheckedShiftRL64# w64 32#))) (W32# (word64ToWord32# w64))
|
||||||
|
+#else
|
||||||
|
word64ToWord32s :: Word64 -> Word32x2
|
||||||
|
word64ToWord32s (W64# w64) = Word32x2 (W32# (word64ToWord# (uncheckedShiftRL64# w64 32#))) (W32# (word64ToWord# w64))
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
wordToChar :: Word -> Char
|
||||||
|
wordToChar (W# word) = C# (chr# (word2Int# word))
|
||||||
|
diff --git a/basement/Basement/PrimType.hs b/basement/Basement/PrimType.hs
|
||||||
|
index f8ca2926..a888ec91 100644
|
||||||
|
--- a/basement/Basement/PrimType.hs
|
||||||
|
+++ b/basement/Basement/PrimType.hs
|
||||||
|
@@ -54,7 +54,11 @@ import Basement.Nat
|
||||||
|
import qualified Prelude (quot)
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
-import GHC.IntWord64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+import GHC.Exts
|
||||||
|
+#else
|
||||||
|
+import GHC.IntWord64
|
||||||
|
+#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef FOUNDATION_BOUNDS_CHECK
|
||||||
|
diff --git a/basement/Basement/Types/OffsetSize.hs b/basement/Basement/Types/OffsetSize.hs
|
||||||
|
index cd944927..1ea80dad 100644
|
||||||
|
--- a/basement/Basement/Types/OffsetSize.hs
|
||||||
|
+++ b/basement/Basement/Types/OffsetSize.hs
|
||||||
|
@@ -70,8 +70,12 @@ import Data.List (foldl')
|
||||||
|
import qualified Prelude
|
||||||
|
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+import GHC.Exts
|
||||||
|
+#else
|
||||||
|
import GHC.IntWord64
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-- | File size in bytes
|
||||||
|
newtype FileSize = FileSize Word64
|
||||||
|
@@ -225,20 +229,26 @@ countOfRoundUp alignment (CountOf n) = CountOf ((n + (alignment-1)) .&. compleme
|
||||||
|
|
||||||
|
csizeOfSize :: CountOf Word8 -> CSize
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+csizeOfSize (CountOf (I# sz)) = CSize (W32# (wordToWord32# (int2Word# sz)))
|
||||||
|
+#else
|
||||||
|
csizeOfSize (CountOf (I# sz)) = CSize (W32# (int2Word# sz))
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
csizeOfSize (CountOf (I# sz)) = CSize (W64# (wordToWord64# (int2Word# sz)))
|
||||||
|
-
|
||||||
|
#else
|
||||||
|
csizeOfSize (CountOf (I# sz)) = CSize (W64# (int2Word# sz))
|
||||||
|
-
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
csizeOfOffset :: Offset8 -> CSize
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+csizeOfOffset (Offset (I# sz)) = CSize (W32# (wordToWord32# (int2Word# sz)))
|
||||||
|
+#else
|
||||||
|
csizeOfOffset (Offset (I# sz)) = CSize (W32# (int2Word# sz))
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
csizeOfOffset (Offset (I# sz)) = CSize (W64# (wordToWord64# (int2Word# sz)))
|
||||||
|
@@ -250,7 +260,11 @@ csizeOfOffset (Offset (I# sz)) = CSize (W64# (int2Word# sz))
|
||||||
|
sizeOfCSSize :: CSsize -> CountOf Word8
|
||||||
|
sizeOfCSSize (CSsize (-1)) = error "invalid size: CSSize is -1"
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+sizeOfCSSize (CSsize (I32# sz)) = CountOf (I# (int32ToInt# sz))
|
||||||
|
+#else
|
||||||
|
sizeOfCSSize (CSsize (I32# sz)) = CountOf (I# sz)
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
sizeOfCSSize (CSsize (I64# sz)) = CountOf (I# (int64ToInt# sz))
|
||||||
|
@@ -261,7 +275,11 @@ sizeOfCSSize (CSsize (I64# sz)) = CountOf (I# sz)
|
||||||
|
|
||||||
|
sizeOfCSize :: CSize -> CountOf Word8
|
||||||
|
#if WORD_SIZE_IN_BITS < 64
|
||||||
|
+#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
+sizeOfCSize (CSize (W32# sz)) = CountOf (I# (word2Int# (word32ToWord# sz)))
|
||||||
|
+#else
|
||||||
|
sizeOfCSize (CSize (W32# sz)) = CountOf (I# (word2Int# sz))
|
||||||
|
+#endif
|
||||||
|
#else
|
||||||
|
#if __GLASGOW_HASKELL__ >= 904
|
||||||
|
sizeOfCSize (CSize (W64# sz)) = CountOf (I# (word2Int# (word64ToWord# sz)))
|
212
srcpkgs/git-annex/patches/cborg.patch
Normal file
212
srcpkgs/git-annex/patches/cborg.patch
Normal file
|
@ -0,0 +1,212 @@
|
||||||
|
commit 9d1418bb8b38cb9a438d7f18835b1ef7ef12b234
|
||||||
|
Author: amesgen <amesgen@amesgen.de>
|
||||||
|
Date: Sun Sep 10 20:03:40 2023 +0200
|
||||||
|
|
||||||
|
Fix compilation and support GHC >=9.2 on 32bit
|
||||||
|
|
||||||
|
diff --git a/cborg/src/Codec/CBOR/Decoding.hs b/cborg/src/Codec/CBOR/Decoding.hs
|
||||||
|
index a7d774c..bf68e68 100644
|
||||||
|
--- a/cborg/src/Codec/CBOR/Decoding.hs
|
||||||
|
+++ b/cborg/src/Codec/CBOR/Decoding.hs
|
||||||
|
@@ -315,11 +315,16 @@ getDecodeAction (Decoder k) = k (\x -> return (Done x))
|
||||||
|
toInt8 :: Int# -> Int8
|
||||||
|
toInt16 :: Int# -> Int16
|
||||||
|
toInt32 :: Int# -> Int32
|
||||||
|
-toInt64 :: Int# -> Int64
|
||||||
|
toWord8 :: Word# -> Word8
|
||||||
|
toWord16 :: Word# -> Word16
|
||||||
|
toWord32 :: Word# -> Word32
|
||||||
|
+#if defined(ARCH_64bit)
|
||||||
|
+toInt64 :: Int# -> Int64
|
||||||
|
toWord64 :: Word# -> Word64
|
||||||
|
+#else
|
||||||
|
+toInt64 :: Int64# -> Int64
|
||||||
|
+toWord64 :: Word64# -> Word64
|
||||||
|
+#endif
|
||||||
|
#if MIN_VERSION_ghc_prim(0,8,0)
|
||||||
|
toInt8 n = I8# (intToInt8# n)
|
||||||
|
toInt16 n = I16# (intToInt16# n)
|
||||||
|
@@ -327,8 +332,7 @@ toInt32 n = I32# (intToInt32# n)
|
||||||
|
toWord8 n = W8# (wordToWord8# n)
|
||||||
|
toWord16 n = W16# (wordToWord16# n)
|
||||||
|
toWord32 n = W32# (wordToWord32# n)
|
||||||
|
-#if WORD_SIZE_IN_BITS == 64
|
||||||
|
-#if MIN_VERSION_base(4,17,0)
|
||||||
|
+#if MIN_VERSION_base(4,17,0) && defined(ARCH_64bit)
|
||||||
|
toInt64 n = I64# (intToInt64# n)
|
||||||
|
toWord64 n = W64# (wordToWord64# n)
|
||||||
|
#else
|
||||||
|
@@ -336,10 +340,6 @@ toInt64 n = I64# n
|
||||||
|
toWord64 n = W64# n
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
-toInt64 n = I64# (intToInt64# n)
|
||||||
|
-toWord64 n = W64# (wordToWord64# n)
|
||||||
|
-#endif
|
||||||
|
-#else
|
||||||
|
toInt8 n = I8# n
|
||||||
|
toInt16 n = I16# n
|
||||||
|
toInt32 n = I32# n
|
||||||
|
@@ -986,7 +986,7 @@ type ByteOffset = Int64
|
||||||
|
-- @since 0.2.2.0
|
||||||
|
peekByteOffset :: Decoder s ByteOffset
|
||||||
|
peekByteOffset = Decoder (\k -> return (PeekByteOffset (\off# -> k (I64#
|
||||||
|
-#if MIN_VERSION_base(4,17,0)
|
||||||
|
+#if MIN_VERSION_base(4,17,0) && !defined(ARCH_32bit)
|
||||||
|
(intToInt64# off#)
|
||||||
|
#else
|
||||||
|
off#
|
||||||
|
diff --git a/cborg/src/Codec/CBOR/Magic.hs b/cborg/src/Codec/CBOR/Magic.hs
|
||||||
|
index cdeb455..bfae638 100644
|
||||||
|
--- a/cborg/src/Codec/CBOR/Magic.hs
|
||||||
|
+++ b/cborg/src/Codec/CBOR/Magic.hs
|
||||||
|
@@ -120,7 +120,7 @@ import qualified Numeric.Half as Half
|
||||||
|
import Data.Bits ((.|.), unsafeShiftL)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(ARCH_32bit)
|
||||||
|
+#if defined(ARCH_32bit) && !MIN_VERSION_ghc_prim(0,8,0)
|
||||||
|
import GHC.IntWord64 (wordToWord64#, word64ToWord#,
|
||||||
|
intToInt64#, int64ToInt#,
|
||||||
|
leWord64#, ltWord64#, word64ToInt64#)
|
||||||
|
@@ -173,7 +173,7 @@ grabWord64 (Ptr ip#) = W64# (wordToWord64# (byteSwap# (word64ToWord# (indexWord6
|
||||||
|
grabWord64 (Ptr ip#) = W64# (byteSwap# (indexWord64OffAddr# ip# 0#))
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
-grabWord64 (Ptr ip#) = W64# (byteSwap64# (word64ToWord# (indexWord64OffAddr# ip# 0#)))
|
||||||
|
+grabWord64 (Ptr ip#) = W64# (byteSwap64# (indexWord64OffAddr# ip# 0#))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#elif defined(MEM_UNALIGNED_OPS) && \
|
||||||
|
@@ -484,7 +484,7 @@ word16ToInt (W16# w#) = I# (word2Int# (word16ToWord# w#))
|
||||||
|
word32ToInt (W32# w#) = I# (word2Int# (word32ToWord# w#))
|
||||||
|
#else
|
||||||
|
word32ToInt (W32# w#) =
|
||||||
|
- case isTrue# (w# `ltWord#` 0x80000000##) of
|
||||||
|
+ case isTrue# (word32ToWord# w# `ltWord#` 0x80000000##) of
|
||||||
|
True -> Just (I# (word2Int# (word32ToWord# w#)))
|
||||||
|
False -> Nothing
|
||||||
|
#endif
|
||||||
|
@@ -530,6 +530,19 @@ word64ToInt (W64# w#) =
|
||||||
|
{-# INLINE word64ToInt #-}
|
||||||
|
|
||||||
|
#if defined(ARCH_32bit)
|
||||||
|
+#if MIN_VERSION_ghc_prim(0,8,0)
|
||||||
|
+word8ToInt64 (W8# w#) = I64# (intToInt64# (word2Int# (word8ToWord# w#)))
|
||||||
|
+word16ToInt64 (W16# w#) = I64# (intToInt64# (word2Int# (word16ToWord# w#)))
|
||||||
|
+word32ToInt64 (W32# w#) = I64# (word64ToInt64# (wordToWord64# (word32ToWord# w#)))
|
||||||
|
+word64ToInt64 (W64# w#) =
|
||||||
|
+ case isTrue# (w# `ltWord64#` uncheckedShiftL64# (wordToWord64# 1##) 63#) of
|
||||||
|
+ True -> Just (I64# (word64ToInt64# w#))
|
||||||
|
+ False -> Nothing
|
||||||
|
+
|
||||||
|
+word8ToWord64 (W8# w#) = W64# (wordToWord64# (word8ToWord# w#))
|
||||||
|
+word16ToWord64 (W16# w#) = W64# (wordToWord64# (word16ToWord# w#))
|
||||||
|
+word32ToWord64 (W32# w#) = W64# (wordToWord64# (word32ToWord# w#))
|
||||||
|
+#else
|
||||||
|
word8ToInt64 (W8# w#) = I64# (intToInt64# (word2Int# w#))
|
||||||
|
word16ToInt64 (W16# w#) = I64# (intToInt64# (word2Int# w#))
|
||||||
|
word32ToInt64 (W32# w#) = I64# (word64ToInt64# (wordToWord64# w#))
|
||||||
|
@@ -541,6 +554,7 @@ word64ToInt64 (W64# w#) =
|
||||||
|
word8ToWord64 (W8# w#) = W64# (wordToWord64# w#)
|
||||||
|
word16ToWord64 (W16# w#) = W64# (wordToWord64# w#)
|
||||||
|
word32ToWord64 (W32# w#) = W64# (wordToWord64# w#)
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
{-# INLINE word8ToInt64 #-}
|
||||||
|
{-# INLINE word16ToInt64 #-}
|
||||||
|
diff --git a/cborg/src/Codec/CBOR/Read.hs b/cborg/src/Codec/CBOR/Read.hs
|
||||||
|
index 6546575..c4dc761 100644
|
||||||
|
--- a/cborg/src/Codec/CBOR/Read.hs
|
||||||
|
+++ b/cborg/src/Codec/CBOR/Read.hs
|
||||||
|
@@ -63,7 +63,7 @@ import qualified Data.Text as T
|
||||||
|
import qualified Data.Text.Encoding as T
|
||||||
|
import Data.Word
|
||||||
|
import GHC.Word
|
||||||
|
-#if defined(ARCH_32bit)
|
||||||
|
+#if defined(ARCH_32bit) && !MIN_VERSION_ghc_prim(0,8,0)
|
||||||
|
import GHC.IntWord64
|
||||||
|
#endif
|
||||||
|
import GHC.Exts
|
||||||
|
@@ -510,8 +510,8 @@ go_fast !bs da@(ConsumeNegWord64Canonical k) =
|
||||||
|
go_fast !bs da@(ConsumeInt64Canonical k) =
|
||||||
|
case tryConsumeInt64 (BS.unsafeHead bs) bs of
|
||||||
|
DecodeFailure -> go_fast_end bs da
|
||||||
|
- DecodedToken sz i@(I64# i#)
|
||||||
|
- | isInt64Canonical sz i -> k i# >>= go_fast (BS.unsafeDrop sz bs)
|
||||||
|
+ DecodedToken sz (I64# i#)
|
||||||
|
+ | isInt64Canonical sz i# -> k i# >>= go_fast (BS.unsafeDrop sz bs)
|
||||||
|
| otherwise -> go_fast_end bs da
|
||||||
|
|
||||||
|
go_fast !bs da@(ConsumeListLen64Canonical k) =
|
||||||
|
@@ -994,8 +994,8 @@ go_fast_end !bs (ConsumeNegWord64Canonical k) =
|
||||||
|
go_fast_end !bs (ConsumeInt64Canonical k) =
|
||||||
|
case tryConsumeInt64 (BS.unsafeHead bs) bs of
|
||||||
|
DecodeFailure -> return $! SlowFail bs "expected int64"
|
||||||
|
- DecodedToken sz i@(I64# i#)
|
||||||
|
- | isInt64Canonical sz i -> k i# >>= go_fast_end (BS.unsafeDrop sz bs)
|
||||||
|
+ DecodedToken sz (I64# i#)
|
||||||
|
+ | isInt64Canonical sz i# -> k i# >>= go_fast_end (BS.unsafeDrop sz bs)
|
||||||
|
| otherwise -> return $! SlowFail bs "non-canonical int64"
|
||||||
|
|
||||||
|
go_fast_end !bs (ConsumeListLen64Canonical k) =
|
||||||
|
@@ -1271,7 +1271,7 @@ go_slow da bs !offset = do
|
||||||
|
|
||||||
|
SlowPeekByteOffset bs' k ->
|
||||||
|
lift
|
||||||
|
-#if MIN_VERSION_base(4,17,0)
|
||||||
|
+#if MIN_VERSION_base(4,17,0) && !defined(ARCH_32bit)
|
||||||
|
(k (int64ToInt# off#))
|
||||||
|
#else
|
||||||
|
(k off#)
|
||||||
|
@@ -1381,7 +1381,7 @@ go_slow_overlapped da sz bs_cur bs_next !offset =
|
||||||
|
SlowPeekByteOffset bs_empty k ->
|
||||||
|
assert (BS.null bs_empty) $ do
|
||||||
|
lift
|
||||||
|
-#if MIN_VERSION_base(4,17,0)
|
||||||
|
+#if MIN_VERSION_base(4,17,0) && !defined(ARCH_32bit)
|
||||||
|
(k (int64ToInt# off#))
|
||||||
|
#else
|
||||||
|
(k off#)
|
||||||
|
@@ -1565,17 +1565,17 @@ isIntCanonical sz i
|
||||||
|
{-# INLINE isWord64Canonical #-}
|
||||||
|
isWord64Canonical :: Int -> Word64 -> Bool
|
||||||
|
isWord64Canonical sz w
|
||||||
|
- | sz == 2 = w > 0x17)
|
||||||
|
- | sz == 3 = w > 0xff)
|
||||||
|
- | sz == 5 = w > 0xffff)
|
||||||
|
- | sz == 9 = w > 0xffffffff)
|
||||||
|
+ | sz == 2 = w > 0x17
|
||||||
|
+ | sz == 3 = w > 0xff
|
||||||
|
+ | sz == 5 = w > 0xffff
|
||||||
|
+ | sz == 9 = w > 0xffffffff
|
||||||
|
| otherwise = True
|
||||||
|
|
||||||
|
{-# INLINE isInt64Canonical #-}
|
||||||
|
isInt64Canonical :: Int -> Int64# -> Bool
|
||||||
|
isInt64Canonical sz i#
|
||||||
|
- | isTrue# (i# `ltInt64#` intToInt64# 0#) = isWord64Canonical sz (not64# w#)
|
||||||
|
- | otherwise = isWord64Canonical sz w#
|
||||||
|
+ | isTrue# (i# `ltInt64#` intToInt64# 0#) = isWord64Canonical sz (W64# (not64# w#))
|
||||||
|
+ | otherwise = isWord64Canonical sz (W64# w#)
|
||||||
|
where
|
||||||
|
w# = int64ToWord64# i#
|
||||||
|
#endif
|
||||||
|
@@ -1796,7 +1796,7 @@ tryConsumeInteger hdr !bs = case word8ToWord hdr of
|
||||||
|
0x1b -> let !w = eatTailWord64 bs
|
||||||
|
sz = 9
|
||||||
|
#if defined(ARCH_32bit)
|
||||||
|
- in DecodedToken sz (BigIntToken (isWord64Canonical sz (word64ToWord w)) $! toInteger w)
|
||||||
|
+ in DecodedToken sz (BigIntToken (isWord64Canonical sz w) $! toInteger w)
|
||||||
|
#else
|
||||||
|
in DecodedToken sz (BigIntToken (isWordCanonical sz (word64ToWord w)) $! toInteger w)
|
||||||
|
#endif
|
||||||
|
@@ -1838,7 +1838,7 @@ tryConsumeInteger hdr !bs = case word8ToWord hdr of
|
||||||
|
0x3b -> let !w = eatTailWord64 bs
|
||||||
|
sz = 9
|
||||||
|
#if defined(ARCH_32bit)
|
||||||
|
- in DecodedToken sz (BigIntToken (isWord64Canonical sz (word64ToWord w)) $! (-1 - toInteger w))
|
||||||
|
+ in DecodedToken sz (BigIntToken (isWord64Canonical sz w) $! (-1 - toInteger w))
|
||||||
|
#else
|
||||||
|
in DecodedToken sz (BigIntToken (isWordCanonical sz (word64ToWord w)) $! (-1 - toInteger w))
|
||||||
|
#endif
|
36
srcpkgs/git-annex/patches/memory.patch
Normal file
36
srcpkgs/git-annex/patches/memory.patch
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
From 2738929ce15b4c8704bbbac24a08539b5d4bf30e Mon Sep 17 00:00:00 2001
|
||||||
|
From: sternenseemann <sternenseemann@systemli.org>
|
||||||
|
Date: Mon, 14 Aug 2023 10:51:30 +0200
|
||||||
|
Subject: [PATCH] Data.Memory.Internal.CompatPrim64: fix 32 bit with GHC >= 9.4
|
||||||
|
|
||||||
|
Since 9.4, GHC.Prim exports Word64# operations like timesWord64# even on
|
||||||
|
i686 whereas GHC.IntWord64 no longer exists. Therefore, we can just use
|
||||||
|
the ready made solution.
|
||||||
|
|
||||||
|
Closes #98, as it should be the better solution.
|
||||||
|
---
|
||||||
|
Data/Memory/Internal/CompatPrim64.hs | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Data/Memory/Internal/CompatPrim64.hs b/Data/Memory/Internal/CompatPrim64.hs
|
||||||
|
index b9eef8a..a134c88 100644
|
||||||
|
--- a/memory/Data/Memory/Internal/CompatPrim64.hs
|
||||||
|
+++ b/memory/Data/Memory/Internal/CompatPrim64.hs
|
||||||
|
@@ -150,6 +150,7 @@ w64# :: Word# -> Word# -> Word# -> Word64#
|
||||||
|
w64# w _ _ = w
|
||||||
|
|
||||||
|
#elif WORD_SIZE_IN_BITS == 32
|
||||||
|
+#if __GLASGOW_HASKELL__ < 904
|
||||||
|
import GHC.IntWord64
|
||||||
|
import GHC.Prim (Word#)
|
||||||
|
|
||||||
|
@@ -158,6 +159,9 @@ timesWord64# a b =
|
||||||
|
let !ai = word64ToInt64# a
|
||||||
|
!bi = word64ToInt64# b
|
||||||
|
in int64ToWord64# (timesInt64# ai bi)
|
||||||
|
+#else
|
||||||
|
+import GHC.Prim
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
w64# :: Word# -> Word# -> Word# -> Word64#
|
||||||
|
w64# _ hw lw =
|
|
@ -1,32 +1,48 @@
|
||||||
# Template file for 'git-annex'
|
# Template file for 'git-annex'
|
||||||
pkgname=git-annex
|
pkgname=git-annex
|
||||||
version=10.20221103
|
version=10.20250630
|
||||||
revision=1
|
revision=1
|
||||||
build_style=haskell-stack
|
build_style=gnu-makefile
|
||||||
|
build_helper=haskell
|
||||||
|
make_check_target=test
|
||||||
|
make_use_env=yes
|
||||||
|
hostmakedepends="cabal-install"
|
||||||
makedepends="curl file-devel gnupg gnutls-devel gsasl-devel libxml2-devel
|
makedepends="curl file-devel gnupg gnutls-devel gsasl-devel libxml2-devel
|
||||||
lsof rsync git ncurses-devel bup borg nocache git-remote-gcrypt"
|
lsof rsync git ncurses-devel bup borg nocache git-remote-gcrypt"
|
||||||
# depends are utilities required by git-annex
|
|
||||||
depends="git rsync curl lsof gnupg>=2"
|
depends="git rsync curl lsof gnupg>=2"
|
||||||
short_desc="Git addon for managing large files"
|
short_desc="Git addon for managing large files"
|
||||||
maintainer="Evan Deaubl <evan@deaubl.name>"
|
maintainer="Evan Deaubl <evan@deaubl.name>"
|
||||||
license="AGPL-3.0-or-later, MIT, BSD-2-Clause, GPL-3.0-or-later, custom:Expat, custom:MIT-twitter, GPL-2.0-only, custom:icon-license"
|
license="AGPL-3.0-or-later, MIT, BSD-2-Clause, GPL-3.0-or-later, custom:Expat, custom:MIT-twitter, GPL-2.0-only, custom:icon-license"
|
||||||
homepage="https://git-annex.branchable.com"
|
homepage="https://git-annex.branchable.com"
|
||||||
changelog="https://git.joeyh.name/index.cgi/git-annex.git/plain/CHANGELOG"
|
changelog="https://git.joeyh.name/index.cgi/git-annex.git/plain/CHANGELOG"
|
||||||
distfiles="https://hackage.haskell.org/package/${pkgname}-${version}/${pkgname}-${version}.tar.gz"
|
# The hackage distribution is missing the makefile and build tools
|
||||||
checksum=f549c31264d6da3bb544755795e7fc29882ebec45014905bc2ea0ade28398f3b
|
distfiles="https://git.joeyh.name/index.cgi/git-annex.git/snapshot/git-annex-${version}.tar.gz
|
||||||
|
https://hackage.haskell.org/package/basement-0.0.16/basement-0.0.16.tar.gz
|
||||||
|
https://hackage.haskell.org/package/memory-0.18.0/memory-0.18.0.tar.gz
|
||||||
|
https://hackage.haskell.org/package/cborg-0.2.10.0/cborg-0.2.10.0.tar.gz"
|
||||||
|
checksum="f798e07707ab2eb7c8fe76b9821ba6b2878d4bae2a03ae5a8cac69eb315bcd98
|
||||||
|
7fb77e249aef76ba5aed3059d556800ce02b614597c488ba01f0a16449146300
|
||||||
|
fd4eb6f638e24b81b4e6cdd68772a531726f2f67686c8969d3407d82f7862e3e
|
||||||
|
17fe070c38fc498cab49bcb9d6215b7747d53bedf96502e9bcce9cad73b9c797"
|
||||||
nopie_files="/usr/bin/git-annex"
|
nopie_files="/usr/bin/git-annex"
|
||||||
nocross=yes
|
nocross=yes
|
||||||
|
skip_extraction="basement-0.0.16.tar.gz memory-0.18.0.tar.gz cborg-0.2.10.0.tar.gz"
|
||||||
|
disable_parallel_build=yes
|
||||||
|
|
||||||
|
post_extract() {
|
||||||
|
vsrcextract -C basement basement-0.0.16.tar.gz
|
||||||
|
vsrcextract -C memory memory-0.18.0.tar.gz
|
||||||
|
vsrcextract -C cborg cborg-0.2.10.0.tar.gz
|
||||||
|
}
|
||||||
|
|
||||||
|
export BUILDERCOMMONOPTIONS="-f servant --index-state=2025-07-04T05:45:32Z"
|
||||||
|
export GHC="cabal exec -- ghc"
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
echo 'packages: ./basement ./memory ./cborg .' > cabal.project
|
||||||
|
cabal update
|
||||||
|
}
|
||||||
|
|
||||||
# These install steps are pulled from the install target in the
|
|
||||||
# git-annex Makefile. The target can't be called directly because it is
|
|
||||||
# comingled with the Cabal build, and we're using Stackage instead
|
|
||||||
# Make sure they are in sync with each version upgrade
|
|
||||||
post_install() {
|
post_install() {
|
||||||
ln -sf git-annex ${DESTDIR}/usr/bin/git-annex-shell
|
|
||||||
ln -sf git-annex ${DESTDIR}/usr/bin/git-remote-tor-annex
|
|
||||||
|
|
||||||
vmkdir usr/share/man/man1
|
|
||||||
vcopy man/*.1 usr/share/man/man1
|
|
||||||
|
|
||||||
vlicense doc/license/AGPL
|
vlicense doc/license/AGPL
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue