Skip to content

Commit

Permalink
Upgrade to 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel YU committed Feb 24, 2024
1 parent 3ec5461 commit d75bc2d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 38 deletions.
54 changes: 28 additions & 26 deletions crc32c.cabal
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
cabal-version: 2.2

-- This file has been generated from package.yaml by hpack version 0.36.0.
--
-- see: https://github.com/sol/hpack

name: crc32c
version: 0.2.0
description: Haskell bindings for crc32c
version: 0.2.1
synopsis: crc32c
description: Haskell bindings for crc32c
category: FFI, Raw
homepage: https://github.com/leptonyu/crc32c#readme
author: Daniel YU
Expand All @@ -14,7 +18,6 @@ license-file: LICENSE
build-type: Simple
extra-source-files:
README.md
ChangeLog.md
include/LICENSE
include/crc32c_arm64.h
include/crc32c_arm64_check.h
Expand All @@ -30,49 +33,48 @@ extra-source-files:
library
exposed-modules:
Data.Digest.CRC32C
other-modules:
Data.Digest.CRC32C.Internal
hs-source-dirs:
src
build-depends:
base >=4.9 && <5
, bytestring >=0.11.5
default-language: Haskell2010

cxx-options: -std=c++11
include-dirs:
include
cxx-sources:
c-sources:
include/crc32c.cc
include/crc32c_arm64.cc
include/crc32c_portable.cc
include/crc32c_sse42.cc
extra-libraries:
stdc++
cxx-options: -std=c++11
if (arch(x86_64) && !os(windows))
build-tools:
c2hs
build-depends:
base >=4.9 && <5
, bytestring >=0.11.5
default-language: Haskell2010
if arch(x86_64) && !os(windows))
cxx-options: -DHAVE_SSE42=1 -msse4.2
if arch(arm)
cxx-options: -DHAVE_ARM64_CRC32C=1
else
if arch(arm)
cxx-options: -DHAVE_ARM64_CRC32C=1
else
cxx-options: -DHAVE_ARM64_CRC32C=0

test-suite crc32c-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_crc32c
autogen-modules:
Paths_crc32c
hs-source-dirs:
test
build-depends:
QuickCheck
, base
, bytestring
, base >=4.9 && <5
, bytestring >=0.11.5 && <0.12
, crc32c
, hspec
, hspec-core
default-language: Haskell2010

benchmark crc32c-bench
type: exitcode-stdio-1.0
main-is: Bench.hs
hs-source-dirs: bench
build-depends:
base
, bytestring
, crc32c
, criterion
default-language: Haskell2010
21 changes: 11 additions & 10 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: crc32c
version: 0.2.0
synopsis: Haskell bindings for crc32c
# description:
version: 0.2.1
synopsis: crc32c
description: Haskell bindings for crc32c
homepage: https://github.com/leptonyu/crc32c#readme
license: BSD3
license: BSD-3-Clause
author: Daniel YU
maintainer: [email protected]
copyright: (c) Daniel YU
Expand All @@ -24,30 +24,31 @@ library:
source-dirs: src
dependencies:
- base >= 4.9 && < 5
- bytestring >=0.10.8.2
- bytestring >=0.11.5
include-dirs:
- include
c-sources:
- include/*.cc
cxx-options: -std=c++11
when:
- condition: arch(x86_64)
- condition: arch(x86_64) && !os(windows))
then:
cc-options: -std=c++11 -D__HAVE_SSE42=1 -D__HAVE_ARM64_CRC32C=0 -msse4.2
cxx-options: -DHAVE_SSE42=1 -msse4.2
else:
when:
- condition: arch(arm)
then:
cc-options: -std=c++11 -D__HAVE_SSE42=0 -D__HAVE_ARM64_CRC32C=1
cxx-options: -DHAVE_ARM64_CRC32C=1
else:
cc-options: -std=c++11 -D__HAVE_SSE42=0 -D__HAVE_ARM64_CRC32C=0
cxx-options: -DHAVE_ARM64_CRC32C=0

tests:
crc32c-test:
source-dirs: test
main: Spec.hs
dependencies:
- base >= 4.9 && < 5
- bytestring >=0.10.8.2 && <0.12
- bytestring >=0.11.5 && <0.12
- crc32c
- hspec
- hspec-core
Expand Down
4 changes: 2 additions & 2 deletions stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: lts-20.11
compiler: ghc-9.2.5
resolver: lts-22.11
compiler: ghc-9.4.8
packages:
- .

0 comments on commit d75bc2d

Please sign in to comment.