diff --git a/.gitignore b/.gitignore index 6e7a566..b8600b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /double-conversion-2.0.2.0.tar.gz +/double-conversion-2.0.4.2.tar.gz diff --git a/double-conversion-2.0.2.0.cabal b/double-conversion-2.0.2.0.cabal deleted file mode 100644 index 852eac6..0000000 --- a/double-conversion-2.0.2.0.cabal +++ /dev/null @@ -1,133 +0,0 @@ -name: double-conversion -version: 2.0.2.0 -x-revision: 1 -license: BSD3 -license-file: LICENSE -homepage: https://github.com/bos/double-conversion -bug-reports: https://github.com/bos/double-conversion/issues -category: Text -author: Bryan O'Sullivan -maintainer: Bryan O'Sullivan -stability: experimental -synopsis: Fast conversion between double precision floating point and text -cabal-version: >= 1.8 -build-type: Simple -description: - A library that performs fast, accurate conversion between double - precision floating point and text. - . - This library is implemented as bindings to the C++ - @double-conversion@ library written by Florian Loitsch at Google: - . - . - The 'Text' versions of these functions are about 30 times faster - than the default 'show' implementation for the 'Double' type. - . - The 'ByteString' versions are /slower/ than the 'Text' versions; - roughly half the speed. (This seems to be due to the cost of - allocating 'ByteString' values via @malloc@.) - . - As a final note, be aware that the @bytestring-show@ package is - about 50% slower than simply using 'show'. - -extra-source-files: - README.markdown - benchmarks/*.cabal - benchmarks/*.hs - double-conversion/*.cmake.in - double-conversion/AUTHORS - double-conversion/CMakeLists.txt - double-conversion/COPYING - double-conversion/Changelog - double-conversion/LICENSE - double-conversion/Makefile - double-conversion/README - double-conversion/SConstruct - double-conversion/src/*.cc - double-conversion/src/*.h - double-conversion/src/CMakeLists.txt - double-conversion/src/SConscript - double-conversion/test/CMakeLists.txt - double-conversion/test/cctest/*.cc - double-conversion/test/cctest/*.h - double-conversion/test/cctest/CMakeLists.txt - double-conversion/test/cctest/SConscript - include/*.h - tests/*.hs - -flag developer - description: operate in developer mode - default: False - manual: True - -library - c-sources: - cbits/hs-double-conversion.cc - double-conversion/src/bignum.cc - double-conversion/src/bignum-dtoa.cc - double-conversion/src/cached-powers.cc - double-conversion/src/diy-fp.cc - double-conversion/src/double-conversion.cc - double-conversion/src/fast-dtoa.cc - double-conversion/src/fixed-dtoa.cc - double-conversion/src/strtod.cc - - if os(windows) - if arch(x86_64) - extra-libraries: stdc++-6 gcc_s_seh-1 - else - extra-libraries: stdc++-6 gcc_s_dw2-1 - else - if os(darwin) - extra-libraries: c++ - else - extra-libraries: stdc++ - - include-dirs: - double-conversion/src - include - - exposed-modules: - Data.Double.Conversion.ByteString - Data.Double.Conversion.Text - - other-modules: - Data.Double.Conversion.FFI - - build-depends: - base == 4.*, - bytestring, - ghc-prim, - text >= 0.11.0.8 && < 1.3 - - if flag(developer) - ghc-options: -Werror - ghc-prof-options: -auto-all - else - cc-options: -DNDEBUG - - ghc-options: -Wall - -test-suite tests - type: exitcode-stdio-1.0 - hs-source-dirs: tests - main-is: Properties.hs - other-modules: Regressions - ghc-options: -Wall - build-depends: - HUnit, - base, - bytestring, - double-conversion, - test-framework, - test-framework-hunit, - test-framework-quickcheck2, - text - -source-repository head - type: git - location: https://github.com/bos/double-conversion - -source-repository head - type: mercurial - location: https://bitbucket.org/bos/double-conversion diff --git a/double-conversion-2.0.4.2.cabal b/double-conversion-2.0.4.2.cabal new file mode 100644 index 0000000..d7b254b --- /dev/null +++ b/double-conversion-2.0.4.2.cabal @@ -0,0 +1,160 @@ +cabal-version: 2.2 +name: double-conversion +version: 2.0.4.2 +x-revision: 2 +license: BSD-3-Clause +license-file: LICENSE +homepage: https://github.com/haskell/double-conversion +bug-reports: https://github.com/haskell/double-conversion/issues +category: Text +author: Bryan O'Sullivan +maintainer: Bryan O'Sullivan +stability: experimental +synopsis: Fast conversion between single and double precision floating point and text +build-type: Simple +description: + A library that performs fast, accurate conversion between + floating point and text. + . + This library is implemented as bindings to the C++ + @double-conversion@ library written by Florian Loitsch at Google: + . + . + Now it can convert single precision numbers, and also it can create + Builder, instead of bytestring or text. + . + The 'Text' versions of these functions are about 30 times faster + than the default 'show' implementation for the 'Double' type. + . + The 'ByteString' versions are have very close speed to the 'Text' versions; + . + Builder versions (both for Text and Bytestring) are slower on single value, + but they are much faster on large number of values + (up to 20x faster on list with 20000 doubles). + . + As a final note, be aware that the @bytestring-show@ package is + about 50% slower than simply using 'show'. + +extra-source-files: + README.markdown + benchmarks/*.cabal + benchmarks/*.hs + double-conversion/*.cmake.in + double-conversion/AUTHORS + double-conversion/CMakeLists.txt + double-conversion/COPYING + double-conversion/Changelog + double-conversion/LICENSE + double-conversion/Makefile + double-conversion/README + double-conversion/SConstruct + double-conversion/src/*.cc + double-conversion/src/*.h + double-conversion/src/CMakeLists.txt + double-conversion/src/SConscript + double-conversion/test/CMakeLists.txt + double-conversion/test/cctest/*.cc + double-conversion/test/cctest/*.h + double-conversion/test/cctest/CMakeLists.txt + double-conversion/test/cctest/SConscript + include/*.h + tests/*.hs + +flag developer + description: operate in developer mode + default: False + manual: True + +flag embedded_double_conversion + description: embed the C++ double_conversion library + default: True + +library + if impl(ghc >= 9.4) + build-depends: system-cxx-std-lib == 1.0 + + elif os(darwin) || os(freebsd) + extra-libraries: c++ + elif os(windows) + if arch(x86_64) && impl(ghc < 8.6.5) + extra-libraries: stdc++-6 gcc_s_seh-1 + elif arch(x86_64) + extra-libraries: stdc++ gcc_s_seh-1 + elif impl(ghc >= 8.6.5) + extra-libraries: stdc++ gcc_s_dw2-1 + else + extra-libraries: stdc++-6 gcc_s_dw2-1 + else + extra-libraries: stdc++ + + if flag(embedded_double_conversion) + c-sources: + cbits/hs-double-conversion-embed.cc + + double-conversion/src/bignum.cc + double-conversion/src/bignum-dtoa.cc + double-conversion/src/cached-powers.cc + double-conversion/src/diy-fp.cc + double-conversion/src/double-conversion.cc + double-conversion/src/fast-dtoa.cc + double-conversion/src/fixed-dtoa.cc + double-conversion/src/strtod.cc + include-dirs: double-conversion/src + else + extra-libraries: double-conversion + c-sources: + cbits/hs-double-conversion.cc + + include-dirs: + include + + exposed-modules: + Data.Double.Conversion.Convertable + Data.Double.Conversion.ByteString + Data.Double.Conversion.Text + + other-modules: + Data.Double.Conversion.Internal.FFI + Data.Double.Conversion.Internal.ByteString + Data.Double.Conversion.Internal.ByteStringBuilder + Data.Double.Conversion.Internal.Text + Data.Double.Conversion.Internal.TextBuilder + + build-depends: + -- Build failure with GHC <= 7.6 + -- https://github.com/haskell/double-conversion/issues/38 + base >= 4.7 && < 5, + bytestring, + ghc-prim, + text >= 0.11.0.8 + + if flag(developer) + ghc-options: -Werror + ghc-prof-options: -auto-all + else + cc-options: -DNDEBUG + + ghc-options: -Wall + + default-language: Haskell2010 + +test-suite tests + type: exitcode-stdio-1.0 + hs-source-dirs: tests + main-is: Properties.hs + other-modules: Regressions + ghc-options: -Wall + build-depends: + HUnit, + base, + bytestring, + double-conversion, + test-framework, + test-framework-hunit, + test-framework-quickcheck2, + text + default-language: Haskell2010 + +source-repository head + type: git + location: https://github.com/haskell/double-conversion diff --git a/ghc-double-conversion.spec b/ghc-double-conversion.spec index 0f2303d..a8875a3 100644 --- a/ghc-double-conversion.spec +++ b/ghc-double-conversion.spec @@ -7,9 +7,9 @@ # testsuite missing deps: test-framework test-framework-hunit test-framework-quickcheck2 Name: ghc-%{pkg_name} -Version: 2.0.2.0 -Release: 5%{?dist} -Summary: Fast conversion between double precision floating point and text +Version: 2.0.4.2 +Release: 1%{?dist} +Summary: Fast conversion between single and double precision floating point and text License: BSD-2-Clause Url: https://hackage.haskell.org/package/%{pkg_name} @@ -37,19 +37,24 @@ BuildRequires: gcc-c++ # End cabal-rpm deps %description -A library that performs fast, accurate conversion between double precision -floating point and text. +A library that performs fast, accurate conversion between floating point and +text. This library is implemented as bindings to the C++ 'double-conversion' library written by Florian Loitsch at Google: . +Now it can convert single precision numbers, and also it can create Builder, +instead of bytestring or text. + The 'Text' versions of these functions are about 30 times faster than the default 'show' implementation for the 'Double' type. -The 'ByteString' versions are /slower/ than the 'Text' versions; roughly half -the speed. (This seems to be due to the cost of allocating 'ByteString' values -via 'malloc'.) +The 'ByteString' versions are have very close speed to the 'Text' versions; + +Builder versions (both for Text and Bytestring) are slower on single value, but +they are much faster on large number of values (up to 20x faster on list with +20000 doubles). As a final note, be aware that the 'bytestring-show' package is about 50% slower than simply using 'show'. @@ -101,6 +106,7 @@ This package provides the Haskell %{pkg_name} profiling library. %setup -q -n %{pkgver} dos2unix -k -n %{SOURCE1} %{pkg_name}.cabal # End cabal-rpm setup +cabal-tweak-flag embedded_double_conversion False %patch0 -p1 -b .orig # remove bundled library @@ -141,6 +147,10 @@ rm -r double-conversion %changelog +* Sun Jan 22 2023 Jens Petersen - 2.0.4.2-1 +- https://hackage.haskell.org/package/double-conversion-2.0.4.2/changelog +- refresh to cabal-rpm-2.1.0 with SPDX migration + * Thu Jul 21 2022 Fedora Release Engineering - 2.0.2.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 572b1ed..1f91272 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (double-conversion-2.0.2.0.tar.gz) = 1713c4e8a28de2ee85e1f312dc12d30a9c6d7a139d89f04ea88048578ce65c8bdf62ded90b92bce011955b95867ca95a623a5109758276a29ba7b6843fbe37eb +SHA512 (double-conversion-2.0.4.2.tar.gz) = 00aaab567520813b80f603147ff2c745e0b01724f965e80c60bc6f8a13de9fd2288600afb8820c133600ddb69cee106a7b3d87dbd05871d094a886672e228267 diff --git a/use-system-lib.diff b/use-system-lib.diff index 009e093..6c2ba1c 100644 --- a/use-system-lib.diff +++ b/use-system-lib.diff @@ -1,37 +1,76 @@ --- a/cbits/hs-double-conversion.cc +++ b/cbits/hs-double-conversion.cc @@ -1,4 +1,4 @@ --#include "double-conversion.h" +-#include "double-conversion/double-conversion.h" +#include #include "hs-double-conversion.h" #include ---- double-conversion-2.0.2.0/double-conversion.cabal~ 2022-03-22 17:26:11.726199692 +0800 -+++ double-conversion-2.0.2.0/double-conversion.cabal 2022-03-22 17:47:44.654066156 +0800 -@@ -63,14 +63,6 @@ - library - c-sources: - cbits/hs-double-conversion.cc -- double-conversion/src/bignum.cc -- double-conversion/src/bignum-dtoa.cc -- double-conversion/src/cached-powers.cc -- double-conversion/src/diy-fp.cc -- double-conversion/src/double-conversion.cc -- double-conversion/src/fast-dtoa.cc -- double-conversion/src/fixed-dtoa.cc -- double-conversion/src/strtod.cc +--- double-conversion-2.0.4.2/double-conversion.cabal~ 2023-01-22 23:29:39.000000000 +0800 ++++ double-conversion-2.0.4.2/double-conversion.cabal 2023-01-24 21:09:34.724362392 +0800 +@@ -13,15 +13,15 @@ + synopsis: Fast conversion between single and double precision floating point and text + build-type: Simple + description: +- A library that performs fast, accurate conversion between ++ A library that performs fast, accurate conversion between + floating point and text. + . + This library is implemented as bindings to the C++ + @double-conversion@ library written by Florian Loitsch at Google: + . + . +- Now it can convert single precision numbers, and also it can create +- Builder, instead of bytestring or text. ++ Now it can convert single precision numbers, and also it can create ++ Builder, instead of bytestring or text. + . + The 'Text' versions of these functions are about 30 times faster + than the default 'show' implementation for the 'Double' type. +@@ -29,7 +29,7 @@ + The 'ByteString' versions are have very close speed to the 'Text' versions; + . + Builder versions (both for Text and Bytestring) are slower on single value, +- but they are much faster on large number of values ++ but they are much faster on large number of values + (up to 20x faster on list with 20000 doubles). + . + As a final note, be aware that the @bytestring-show@ package is +@@ -39,24 +39,6 @@ + README.markdown + benchmarks/*.cabal + benchmarks/*.hs +- double-conversion/*.cmake.in +- double-conversion/AUTHORS +- double-conversion/CMakeLists.txt +- double-conversion/COPYING +- double-conversion/Changelog +- double-conversion/LICENSE +- double-conversion/Makefile +- double-conversion/README +- double-conversion/SConstruct +- double-conversion/src/*.cc +- double-conversion/src/*.h +- double-conversion/src/CMakeLists.txt +- double-conversion/src/SConscript +- double-conversion/test/CMakeLists.txt +- double-conversion/test/cctest/*.cc +- double-conversion/test/cctest/*.h +- double-conversion/test/cctest/CMakeLists.txt +- double-conversion/test/cctest/SConscript + include/*.h + tests/*.hs - if os(windows) - if arch(x86_64) -@@ -81,10 +73,9 @@ - if os(darwin) - extra-libraries: c++ - else -- extra-libraries: stdc++ -+ extra-libraries: stdc++ double-conversion +@@ -82,10 +64,10 @@ + extra-libraries: stdc++ gcc_s_seh-1 + elif impl(ghc >= 8.6.5) + extra-libraries: stdc++ gcc_s_dw2-1 +- else ++ else + extra-libraries: stdc++-6 gcc_s_dw2-1 + else +- extra-libraries: stdc++ ++ extra-libraries: stdc++ double-conversion - include-dirs: -- double-conversion/src - include - - exposed-modules: + if flag(embedded_double_conversion) + c-sources: