From a3e9be6a62ba117788e19c8831250ca75cc8c43b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 30 Oct 2023 09:12:40 +0000 Subject: automatic import of ghc-unicode-transforms --- .gitignore | 1 + ghc-unicode-transforms.spec | 96 +++++++++++++++++++ sources | 1 + unicode-transforms.cabal | 220 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 318 insertions(+) create mode 100644 ghc-unicode-transforms.spec create mode 100644 sources create mode 100755 unicode-transforms.cabal diff --git a/.gitignore b/.gitignore index e69de29..a1879e4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/unicode-transforms-0.4.0.1.tar.gz diff --git a/ghc-unicode-transforms.spec b/ghc-unicode-transforms.spec new file mode 100644 index 0000000..8e36ec3 --- /dev/null +++ b/ghc-unicode-transforms.spec @@ -0,0 +1,96 @@ +%global pkg_name unicode-transforms +%global pkgver %{pkg_name}-%{version} +%bcond_with tests + +Name: ghc-%{pkg_name} +Version: 0.4.0.1 +Release: 1 +Summary: Unicode normalization +License: BSD-3-Clause +URL: https://hackage.haskell.org/package/%{pkg_name} +Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/3.cabal#/%{pkg_name}.cabal +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-base-devel +BuildRequires: ghc-base-prof +BuildRequires: ghc-bytestring-devel +BuildRequires: ghc-bytestring-prof +BuildRequires: ghc-rpm-macros +BuildRequires: ghc-text-devel +BuildRequires: ghc-text-prof +BuildRequires: ghc-unicode-data-devel +BuildRequires: ghc-unicode-data-prof +ExcludeArch: %{ix86} +%if %{with tests} +BuildRequires: ghc-QuickCheck-devel +BuildRequires: ghc-QuickCheck-prof +BuildRequires: ghc-deepseq-devel +BuildRequires: ghc-deepseq-prof +BuildRequires: ghc-hspec-devel +BuildRequires: ghc-hspec-prof +BuildRequires: ghc-split-devel +BuildRequires: ghc-split-prof +%endif + +%description +Fast Unicode 14.0.0 normalization in Haskell (NFC, NFKC, NFD, NFKD). + +%package devel +Summary: Haskell %{pkg_name} library development files +Requires: %{name} = %{version}-%{release} +Requires: ghc-compiler = %{ghc_version} +Requires(post): ghc-compiler = %{ghc_version} +Requires(postun): ghc-compiler = %{ghc_version} + +%description devel +This package provides the Haskell %{pkg_name} library development +files. + +%package -n ghc-%{pkg_name}-help +Summary: Haskell %{pkg_name} library documentation +BuildArch: noarch + +%description -n ghc-%{pkg_name}-help +This package provides the Haskell %{pkg_name} library documentation. + +%package -n ghc-%{pkg_name}-prof +Summary: Haskell %{pkg_name} profiling library +Requires: ghc-%{pkg_name}-devel = %{version}-%{release} +Supplements: (ghc-%{pkg_name}-devel and ghc-prof) + +%description -n ghc-%{pkg_name}-prof +This package provides the Haskell %{pkg_name} profiling library. + +%prep +%autosetup -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal + +%build +%ghc_lib_build + +%install +%ghc_lib_install + +%check +%cabal_test + +%post devel +%ghc_pkg_recache + +%postun devel +%ghc_pkg_recache + +%files -f %{name}.files +%license LICENSE + +%files devel -f %{name}-devel.files +%doc Changelog.md README.md + +%files -n ghc-%{pkg_name}-help -f ghc-%{pkg_name}-help.files +%license LICENSE + +%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files + +%changelog +* Tue Aug 22 2023 Lin Runze 0.4.0.1-1 +- Initial packaging (Version 0.4.0.1) diff --git a/sources b/sources new file mode 100644 index 0000000..e2c1435 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +ef5d12f3b74d30bf585a99dcebb4da58 unicode-transforms-0.4.0.1.tar.gz diff --git a/unicode-transforms.cabal b/unicode-transforms.cabal new file mode 100755 index 0000000..c017e9d --- /dev/null +++ b/unicode-transforms.cabal @@ -0,0 +1,220 @@ +cabal-version: 2.2 + +name: unicode-transforms +version: 0.4.0.1 +x-revision: 3 +synopsis: Unicode normalization +description: Fast Unicode 14.0.0 normalization in Haskell (NFC, NFKC, NFD, NFKD). +category: Data,Text,Unicode +stability: Experimental +homepage: http://github.com/composewell/unicode-transforms +bug-reports: https://github.com/composewell/unicode-transforms/issues +author: Harendra Kumar +maintainer: harendra.kumar@gmail.com +copyright: 2016-2017 Harendra Kumar, + 2014–2015 Antonio Nikishaev +license: BSD-3-Clause +license-file: LICENSE +tested-with: GHC==8.0.2 + , GHC==8.2.2 + , GHC==8.4.4 + , GHC==8.6.5 + , GHC==8.8.4 + , GHC==8.10.7 + , GHC==9.0.2 + , GHC==9.2.7 + , GHC==9.4.4 + , GHC==9.6.1 +build-type: Simple +extra-source-files: + Changelog.md + MAINTAINING.md + NOTES.md + README.md + download-ucd-files.sh + benchmark/README.md + benchmark/NormalizeFile.hs + benchmark/data/AllChars.txt + benchmark/data/Deutsch.txt + benchmark/data/Devanagari.txt + benchmark/data/English.txt + benchmark/data/Japanese.txt + benchmark/data/Korean.txt + benchmark/data/Vietnamese.txt + test/data/NormalizationTest.txt + test/data/extra/NormalizationTest.txt + +source-repository head + type: git + location: https://github.com/composewell/unicode-transforms + +flag dev + description: Developer build + manual: True + default: False + +flag bench-show + description: Use bench-show to compare benchmarks + manual: True + default: False + +flag has-icu + description: Use text-icu for benchmark and test comparisons + manual: True + default: False + +flag has-llvm + description: Use llvm backend (faster) for compilation + manual: True + default: False + +flag use-gauge + description: Use gauge instead of tasty-bench for benchmarking + manual: True + default: False + +library + exposed-modules: + Data.Unicode.Types + Data.Text.Normalize + + -- Deprecated + Data.ByteString.UTF8.Normalize + other-modules: + Data.Unicode.Internal.NormalizeStream + hs-source-dirs: . + ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs + build-depends: + base >= 4.8 && < 4.19 + , unicode-data >= 0.2 && < 0.5 + , bytestring >= 0.9 && < 0.12 + , ghc-prim >= 0.2 && < 0.11 + + -- We depend on a lot of internal modules in text. We keep the upper bound + -- inclusive of the latest stable version. + , text >=1.1.1 && <=1.2.5.0 || >=2.0 && <2.1 + if flag(dev) + ghc-options: -O0 + else + ghc-options: -O2 -funbox-strict-fields -fspec-constr-count=10 + if flag(has-llvm) + ghc-options: -fllvm + default-language: Haskell2010 + +test-suite extras + type: exitcode-stdio-1.0 + main-is: Extra.hs + other-modules: + QuickCheckUtils + hs-source-dirs: + test + ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs + build-depends: + QuickCheck >=2.1 && <2.15 + , base + , deepseq >=1.1 && <1.5 + , text + , unicode-transforms + if flag(dev) + ghc-options: -O0 + else + ghc-options: -O2 -funbox-strict-fields + if flag(has-llvm) + ghc-options: -fllvm + default-language: Haskell2010 + +test-suite quickcheck + type: exitcode-stdio-1.0 + main-is: Properties.hs + other-modules: + QuickCheckUtils + hs-source-dirs: + test + ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs + build-depends: + QuickCheck + , unicode-data + , base + , deepseq + , hspec >= 2.0 && < 3 + , text + , unicode-transforms + if flag(dev) + ghc-options: -O0 + else + ghc-options: -O2 -funbox-strict-fields + if flag(has-llvm) + ghc-options: -fllvm + if flag(has-icu) + cpp-options: -DHAS_ICU + build-depends: + text-icu >=0.6.2.1 && <0.9 + default-language: Haskell2010 + +test-suite ucd + type: exitcode-stdio-1.0 + main-is: NormalizationTest.hs + hs-source-dirs: + test + ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs + build-depends: + base + , bytestring + , split >=0.2 && <0.3 + , text + , unicode-transforms + if flag(dev) + ghc-options: -O0 + else + ghc-options: -O2 -funbox-strict-fields + if flag(has-llvm) + ghc-options: -fllvm + default-language: Haskell2010 + +benchmark bench + type: exitcode-stdio-1.0 + main-is: Benchmark.hs + hs-source-dirs: + benchmark + ghc-options: -Wall -fwarn-identities -fwarn-incomplete-record-updates -fwarn-incomplete-uni-patterns -fwarn-tabs + build-depends: + base + , deepseq + , filepath >=1.0 && <2 + , path >=0.0.0 && <0.9 + , path-io >=0.1.0 && <1.7 + , text + , unicode-transforms + if flag(use-gauge) + build-depends: gauge >=0.2.0 && <0.3 + else + build-depends: tasty-bench>= 0.2.5 && <0.4 + mixins: tasty-bench (Test.Tasty.Bench as Gauge.Main) + if flag(dev) + ghc-options: -O0 + else + ghc-options: -O2 -funbox-strict-fields + if flag(has-llvm) + ghc-options: -fllvm + if flag(has-icu) + cpp-options: -DBENCH_ICU + build-depends: + text-icu + if impl(ghc < 7.10) + build-depends: + path (<0.5.12 || >0.5.12) + default-language: Haskell2010 + +executable chart + default-language: Haskell2010 + hs-source-dirs: benchmark + main-is: Chart.hs + if flag(bench-show) + buildable: True + build-Depends: + base + , bench-show >= 0.3 && < 0.4 + , split + , transformers >= 0.4 && < 0.6 + else + buildable: False -- cgit v1.2.3