Compare commits

...

8 Commits

Author SHA1 Message Date
Jens Petersen 7a42e0d97d update to newer 32bit issue 2023-03-16 18:09:56 +08:00
Jens Petersen d7b28ad7c9 disable i686 since it doesn't build with ghc-9.2 2023-03-16 17:48:07 +08:00
Jens Petersen f2c5a21b70 cborg Magic: ghc-9.2 no longer has GHC.IntWord64 2023-02-20 14:31:02 +08:00
Jens Petersen 6abd992513 upstream patch to fix 32bit build with ghc-9.2 2023-02-20 14:24:11 +08:00
Jens Petersen 814194f68c Convert to %autorelease and %autochangelog
[skip changelog]
2023-02-16 13:15:08 +08:00
Jens Petersen 71920aed3e disable tests 2023-01-29 23:02:15 +08:00
Jens Petersen f814445297 update to 0.2.8.0 2023-01-25 00:11:58 +08:00
Jens Petersen 5394accbc9 refresh to cabal-rpm-2.1.0 including SPDX migration 2023-01-22 01:16:54 +08:00
7 changed files with 280 additions and 42 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/cborg-0.2.3.0.tar.gz
/cborg-0.2.4.0.tar.gz
/cborg-0.2.5.0.tar.gz
/cborg-0.2.8.0.tar.gz

30
307.patch Normal file
View File

@ -0,0 +1,30 @@
From 7b94c5ac957cfa9d51815747d48dbec2d57a9aaa Mon Sep 17 00:00:00 2001
From: Jakub Janczak <jakub.janczak@scrive.com>
Date: Wed, 8 Feb 2023 21:33:24 +0100
Subject: [PATCH] Fix for machines with 64bit word and base >= 4.17
---
cborg/src/Codec/CBOR/Magic.hs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cborg/src/Codec/CBOR/Magic.hs b/cborg/src/Codec/CBOR/Magic.hs
index 1b497a2..cdeb455 100644
--- a/cborg/src/Codec/CBOR/Magic.hs
+++ b/cborg/src/Codec/CBOR/Magic.hs
@@ -257,11 +257,15 @@ grabWord64 (Ptr ip#) =
#endif
#if WORD_SIZE_IN_BITS == 64
+#if MIN_VERSION_base(4,17,0)
+-- case taken from Codec.CBOR.Decoding
+ w64 w# = W64# (wordToWord64# (toWord w#))
+#else
w64 w# = W64# (toWord w#)
+#endif
#else
w64 w# = W64# (wordToWord64# (toWord w#))
#endif
-
#endif
--------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
--- cborg-0.2.8.0/src/Codec/CBOR/Magic.hs~ 2023-02-20 14:23:51.412201820 +0800
+++ cborg-0.2.8.0/src/Codec/CBOR/Magic.hs 2023-02-20 14:28:57.892166311 +0800
@@ -121,7 +121,7 @@
#endif
#if defined(ARCH_32bit)
-import GHC.IntWord64 (wordToWord64#, word64ToWord#,
+import GHC.Exts (wordToWord64#, word64ToWord#,
intToInt64#, int64ToInt#,
leWord64#, ltWord64#, word64ToInt64#)

170
cborg-0.2.8.0.cabal Normal file
View File

@ -0,0 +1,170 @@
name: cborg
version: 0.2.8.0
x-revision: 1
synopsis: Concise Binary Object Representation (CBOR)
license: BSD3
license-file: LICENSE.txt
author: Duncan Coutts
maintainer: duncan@community.haskell.org, ben@smart-cactus.org
bug-reports: https://github.com/well-typed/cborg/issues
copyright: 2015-2019 Duncan Coutts,
2015-2019 Well-Typed LLP,
2015 IRIS Connect Ltd
category: Codec
build-type: Simple
cabal-version: >= 1.10
tested-with:
GHC == 8.4.4,
GHC == 8.6.5,
GHC == 8.8.3,
GHC == 8.10.7,
GHC == 9.0.1,
GHC == 9.2.2,
GHC == 9.4.2
extra-source-files:
ChangeLog.md
description:
This package provides an efficient implementation of the Concise
Binary Object Representation (CBOR), as specified by
[RFC 7049](https://tools.ietf.org/html/rfc7049).
.
If you are looking for a library for serialisation of Haskell values,
have a look at the [serialise](/package/serialise) package, which is
built upon this library.
.
An implementation of the standard bijection between CBOR and JSON is
provided by the [cborg-json](/package/cborg-json) package. Also see
[cbor-tool](/package/cbor-tool) for a convenient command-line utility
for working with CBOR data.
.
This package was formerly known as @binary-serialise-cbor@.
extra-source-files:
src/cbits/cbor.h
tests/test-vectors/appendix_a.json
tests/test-vectors/README.md
source-repository head
type: git
location: https://github.com/well-typed/cborg.git
--------------------------------------------------------------------------------
-- Flags
flag optimize-gmp
default: True
manual: False
description: Use optimized code paths for integer-gmp
--------------------------------------------------------------------------------
-- Library
library
default-language: Haskell2010
ghc-options: -Wall
include-dirs: src/cbits
hs-source-dirs: src
exposed-modules:
Codec.CBOR
Codec.CBOR.Decoding
Codec.CBOR.Encoding
Codec.CBOR.FlatTerm
Codec.CBOR.Magic
Codec.CBOR.Pretty
Codec.CBOR.Read
Codec.CBOR.Write
Codec.CBOR.Term
Codec.CBOR.ByteArray
Codec.CBOR.ByteArray.Sliced
other-modules:
Codec.CBOR.ByteArray.Internal
other-extensions:
CPP, ForeignFunctionInterface, MagicHash,
UnboxedTuples, BangPatterns, DeriveDataTypeable,
RankNTypes
build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.18,
bytestring >= 0.10.4 && < 0.12,
containers >= 0.5 && < 0.7,
deepseq >= 1.0 && < 1.5,
ghc-prim >= 0.3.1.0 && < 0.10,
half >= 0.2.2.3 && < 0.4,
primitive >= 0.5 && < 0.8,
text >= 1.1 && < 1.3 || >= 2.0 && <2.1
if flag(optimize-gmp)
cpp-options: -DOPTIMIZE_GMP
if impl(ghc >= 9.0)
cpp-options: -DHAVE_GHC_BIGNUM
build-depends: ghc-bignum >= 1.0 && < 2.0
else
build-depends: integer-gmp >= 1.0 && < 2.0
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances
else
build-depends:
-- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8
fail == 4.9.*,
semigroups >= 0.18 && < 0.21,
-- the `PS` pattern synonym in bytestring 0.11 is unavailable with GHC < 8.0
bytestring < 0.11
test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Main.hs
default-language: Haskell2010
ghc-options:
-Wall -fno-warn-orphans
-threaded -rtsopts "-with-rtsopts=-N2"
other-modules:
Tests.UnitTests
Tests.Properties
Tests.Boundary
Tests.ByteOffset
Tests.Canonical
Tests.PreEncoded
Tests.Regress
Tests.Regress.Issue160
Tests.Regress.Issue162
Tests.Regress.FlatTerm
Tests.Reference
Tests.Reference.Implementation
Tests.Reference.Generators
Tests.Reference.TestVectors
Tests.Term
Tests.UTF8
Tests.Util
build-depends:
array >= 0.4 && < 0.6,
base >= 4.11 && < 4.18,
base-orphans,
bytestring >= 0.10.4 && < 0.12,
text >= 1.1 && < 2.1,
cborg,
aeson >= 0.7 && < 2.2,
base64-bytestring >= 1.0 && < 1.3,
base16-bytestring >= 1.0 && < 1.1,
deepseq >= 1.0 && < 1.5,
half >= 0.2.2.3 && < 0.4,
QuickCheck >= 2.9 && < 2.15,
random,
scientific >= 0.3 && < 0.4,
tasty >= 0.11 && < 1.5,
tasty-hunit >= 0.9 && < 0.11,
tasty-quickcheck >= 0.8 && < 0.11,
vector >= 0.10 && < 0.14
if !impl(ghc >= 8.0)
build-depends:
fail >= 4.9.0.0 && < 4.10

40
changelog Normal file
View File

@ -0,0 +1,40 @@
* Sun Jan 22 2023 Jens Petersen <petersen@redhat.com> - 0.2.8.0-1
- https://hackage.haskell.org/package/cborg-0.2.8.0/changelog
- refresh to cabal-rpm-2.1.0 with SPDX migration
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jun 19 2022 Jens Petersen <petersen@redhat.com> - 0.2.5.0-3
- rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Aug 5 2021 Jens Petersen <petersen@redhat.com> - 0.2.5.0-1
- update to 0.2.5.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 16 2020 Jens Petersen <petersen@redhat.com> - 0.2.4.0-1
- update to 0.2.4.0
* Sat Jun 27 2020 Jens Petersen <petersen@redhat.com> - 0.2.3.0-1
- update to 0.2.3.0
* Thu Jun 4 2020 Jens Petersen <petersen@redhat.com> - 0.2.2.1-2
- fix permissions of ChangeLog.md (#1795526)
* Tue Mar 03 2020 Jens Petersen <petersen@redhat.com> - 0.2.2.1-1
- update to 0.2.2.1
- testsuite fails on 32bit archs and s390x
* Tue Jan 28 2020 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.2.1.0-1
- spec file generated by cabal-rpm-2.0.0

View File

@ -1,4 +1,4 @@
# generated by cabal-rpm-2.0.12
# generated by cabal-rpm-2.1.0
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%global pkg_name cborg
@ -6,31 +6,49 @@
# https://github.com/well-typed/cborg/issues/207
%ifnarch i686 armv7hl s390x
%bcond_without tests
%bcond_with tests
%endif
Name: ghc-%{pkg_name}
Version: 0.2.5.0
Release: 4%{?dist}
Version: 0.2.8.0
Release: %autorelease
Summary: Concise Binary Object Representation (CBOR)
License: BSD
License: BSD-3-Clause
Url: https://hackage.haskell.org/package/%{pkg_name}
# https://github.com/well-typed/cborg/issues/309
ExcludeArch: %{ix86}
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
Source1: https://hackage.haskell.org/package/%{pkgver}/%{pkg_name}.cabal#/%{pkgver}.cabal
# End cabal-rpm sources
Patch0: https://patch-diff.githubusercontent.com/raw/well-typed/cborg/pull/307.patch
Patch1: cborg-0.2.8.0-Magic-IntWord64.patch
# Begin cabal-rpm deps:
BuildRequires: dos2unix
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-array-devel
BuildRequires: ghc-base-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-ghc-bignum-devel
BuildRequires: ghc-half-devel
BuildRequires: ghc-primitive-devel
BuildRequires: ghc-text-devel
%if %{with ghc_prof}
BuildRequires: ghc-array-prof
BuildRequires: ghc-base-prof
BuildRequires: ghc-bytestring-prof
BuildRequires: ghc-containers-prof
BuildRequires: ghc-deepseq-prof
BuildRequires: ghc-ghc-bignum-prof
BuildRequires: ghc-half-prof
BuildRequires: ghc-primitive-prof
BuildRequires: ghc-text-prof
%endif
%if %{with tests}
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-aeson-devel
@ -101,7 +119,10 @@ This package provides the Haskell %{pkg_name} profiling library.
%prep
# Begin cabal-rpm setup:
%setup -q -n %{pkgver}
dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal
# End cabal-rpm setup
%patch0 -p2 -b .orig
%patch1 -p1 -b .orig
%build
@ -144,39 +165,4 @@ This package provides the Haskell %{pkg_name} profiling library.
%changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sun Jun 19 2022 Jens Petersen <petersen@redhat.com> - 0.2.5.0-3
- rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Aug 5 2021 Jens Petersen <petersen@redhat.com> - 0.2.5.0-1
- update to 0.2.5.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jul 16 2020 Jens Petersen <petersen@redhat.com> - 0.2.4.0-1
- update to 0.2.4.0
* Sat Jun 27 2020 Jens Petersen <petersen@redhat.com> - 0.2.3.0-1
- update to 0.2.3.0
* Thu Jun 4 2020 Jens Petersen <petersen@redhat.com> - 0.2.2.1-2
- fix permissions of ChangeLog.md (#1795526)
* Tue Mar 03 2020 Jens Petersen <petersen@redhat.com> - 0.2.2.1-1
- update to 0.2.2.1
- testsuite fails on 32bit archs and s390x
* Tue Jan 28 2020 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.2.1.0-1
- spec file generated by cabal-rpm-2.0.0
%autochangelog

View File

@ -1 +1 @@
SHA512 (cborg-0.2.5.0.tar.gz) = 8cadb1dfb0402bf913ef400627fc8f0dff6e3cd588480a0034100d042ef0bbfacf42801aba9c0bfa799a0c5e41adfc8adba4714ede8b405d56435dc9f7c72fc9
SHA512 (cborg-0.2.8.0.tar.gz) = 415afe049475deac12914c06ae94225268163a5a1d59e0783b0dcce529cfb9cfd6aed2c43f67b0ae7c0eac62f222671595daca49ef2d0cb31313c16955bf592d