forked from tahoe-lafs/zfec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzfex.cabal
95 lines (85 loc) · 3.3 KB
/
zfex.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
Cabal-Version: 2.2
name: zfex
version: 0.1.1
license: GPL-2.0-or-later
license-file: README.rst
author: Adam Langley <[email protected]>
maintainer: Adam Langley <[email protected]>, Wojciech Migda
description: This code, based on zfex by Migda, based on zfec by Zooko,
based on code by Luigi Rizzo implements an erasure code, or forward error
correction code. The most widely known example of an erasure
code is the RAID-5 algorithm which makes it so that in the
event of the loss of any one hard drive, the stored data can
be completely recovered. The algorithm in the zfec package
has a similar effect, but instead of recovering from the loss
of only a single element, it can be parameterized to choose in
advance the number of elements whose loss it can tolerate.
homepage: https://github.com/WojciechMigda/zfex
synopsis: Forward error correction of ByteStrings
category: Codec
stability: provisional
tested-with: GHC == 6.8.2
, GHC == 6.8.5
, GHC == 9.2.2
extra-source-files:
zfex/zfex.h,
zfex/zfex_pp.h, zfex/zfex_macros.h, zfex/zfex_bytemask.h, zfex/zfex_status.h,
haskell/Codec/ZFEXStatus.chs,
COPYING.GPL, COPYING.TGPPL.rst
flag speed
description: Enable highest level optimizations for speed
default: False
manual: True
flag ssse3
description: Enable SSSE3 SIMD optimizations
default: False
manual: True
flag neon
description: Enable NEON SIMD optimizations
default: False
manual: True
Library
build-type: Simple
hs-source-dirs: haskell
build-depends: base, bytestring>=0.9, entropy
exposed-modules: Codec.ZFEX
other-modules: Codec.ZFEXStatus
ghc-options: -Wall -v
c-sources: zfex/zfex.c
x-extra-c2hs-options: --cppopts=-Izfex
include-dirs: zfex
default-extensions:
ForeignFunctionInterface
-- GHC's Windows toolchain is based on clang/libc++ in GHC 9.4 and later
if (!os(windows)) || (os(windows) && impl(ghc >= 9.4))
cc-options: -std=c99
if flag(ssse3)
if arch(x86_64) && (os(linux) || os(darwin) || (os(windows) && impl(ghc >= 9.4)))
cc-options: -mssse3 -DZFEX_USE_INTEL_SSSE3
elif arch(x86_64) && os(windows)
cc-options: /arch:SSE2 /DZFEX_USE_INTEL_SSSE3
if flag(neon)
if arch(arm) && (os(linux) || os(darwin) || (os(windows) && impl(ghc >= 9.4)))
cc-options: -DZFEX_USE_ARM_NEON -mfpu=neon
elif arch(arm) && os(windows)
cc-options: /DZFEX_USE_ARM_NEON
if flag(speed)
if os(linux) || os(darwin) || (os(windows) && impl(ghc >= 9.4))
cc-options: -O3
elif os(windows)
cc-options: /O2
Test-Suite quickcheck-tests
type: exitcode-stdio-1.0
hs-source-dirs:
haskell/test
main-is: ZFEXTest.hs
build-depends:
base
, bytestring>=0.9
, QuickCheck
, random
, entropy
, zfex
source-repository head
type: git
location: https://github.com/WojciechMigda/zfex.git