From 4c84693fc4a11d82add25a547663b8db66e1b7e561a4be07ea8111314343c698 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 19 Jun 2024 21:01:07 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.8.x package:ghc-unicode-collation revision:3, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-unicode-collation?expand=0&rev=15 --- ghc-unicode-collation.changes | 6 ++ ghc-unicode-collation.spec | 4 +- unicode-collation.cabal | 153 ++++++++++++++++++++++++++++++++++ 3 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 unicode-collation.cabal diff --git a/ghc-unicode-collation.changes b/ghc-unicode-collation.changes index 25615ef..cf2fdb1 100644 --- a/ghc-unicode-collation.changes +++ b/ghc-unicode-collation.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 18 01:33:39 UTC 2024 - Peter Simons + +- Update unicode-collation to version 0.1.3.6 revision 1. + Upstream has revised the Cabal build instructions on Hackage. + ------------------------------------------------------------------- Wed Dec 20 19:13:59 UTC 2023 - Peter Simons diff --git a/ghc-unicode-collation.spec b/ghc-unicode-collation.spec index 04c5430..4616f6f 100644 --- a/ghc-unicode-collation.spec +++ b/ghc-unicode-collation.spec @@ -1,7 +1,7 @@ # # spec file for package ghc-unicode-collation # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ Summary: Haskell implementation of the Unicode Collation Algorithm License: BSD-2-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/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-base-devel BuildRequires: ghc-base-prof @@ -91,6 +92,7 @@ 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 diff --git a/unicode-collation.cabal b/unicode-collation.cabal new file mode 100644 index 0000000..a35c53e --- /dev/null +++ b/unicode-collation.cabal @@ -0,0 +1,153 @@ +cabal-version: 2.2 +name: unicode-collation +version: 0.1.3.6 +x-revision: 1 +synopsis: Haskell implementation of the Unicode Collation Algorithm +description: This library provides a pure Haskell implementation of + the Unicode Collation Algorithm described at + . It is not + as fully-featured or as performant as @text-icu@, but + it avoids a dependency on a large C library. + Locale-specific tailorings are also provided. + +homepage: https://github.com/jgm/unicode-collation +bug-reports: https://github.com/jgm/unicode-collation/issues +license: BSD-2-Clause +license-file: LICENSE +author: John MacFarlane +maintainer: John MacFarlane +copyright: 2021 John MacFarlane +category: Text +build-type: Simple +extra-doc-files: README.md + CHANGELOG.md +extra-source-files: stack.yaml + data/allkeys.txt + data/UnicodeData.txt + data/tailorings/*.txt + data/cjk/*.txt + test/uca-collation-test/*.txt +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 + GHC == 9.6.3 + GHC == 9.8.1 + +source-repository head + type: git + location: https://github.com/jgm/unicode-collation.git + +flag doctests + Description: Run doctests as part of test suite. + Use with: @--write-ghc-environment-files=always@. + Default: False + +flag executable + Description: Build the unicode-collate executable. + Default: False + +common common-options + build-depends: base >= 4.11 && < 4.21 + + ghc-options: -Wall + -Wcompat + -Widentities + -Wincomplete-uni-patterns + -Wincomplete-record-updates + +RTS -A8m -RTS + if impl(ghc >= 8.0) + ghc-options: -Wredundant-constraints + if impl(ghc >= 8.2) + ghc-options: -fhide-source-paths + if impl(ghc >= 8.4) + ghc-options: -Wpartial-fields + + default-language: Haskell2010 + other-extensions: CPP, TemplateHaskell + +library + import: common-options + hs-source-dirs: src + exposed-modules: Text.Collate + Text.Collate.Lang + Text.Collate.Normalize + other-modules: Text.Collate.Trie + Text.Collate.Collation + Text.Collate.Collator + Text.Collate.CanonicalCombiningClass + Text.Collate.TH + Text.Collate.Tailorings + Text.Collate.UnicodeData + build-depends: bytestring + , template-haskell + , th-lift-instances + , containers + , binary + , text >= 1.2 && < 2.2 + , parsec + + other-extensions: TemplateHaskell + + +executable unicode-collate + import: common-options + hs-source-dirs: app + main-is: Main.hs + build-depends: unicode-collation + , containers + , text + ghc-options: -threaded + -rtsopts + -with-rtsopts=-N + if flag(executable) + buildable: True + else + buildable: False + +test-suite unit + import: common-options + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: unit.hs + build-depends: unicode-collation + , bytestring + , tasty + , tasty-quickcheck + , tasty-hunit + , unicode-transforms >= 0.3.7.1 + , text + ghc-options: -threaded + -rtsopts + -with-rtsopts=-N + +test-suite doctests + import: common-options + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: doctests.hs + build-depends: doctest >= 0.8 + , th-lift-instances + ghc-options: -threaded + -rtsopts + -with-rtsopts=-N + if flag(doctests) + buildable: True + else + buildable: False + +benchmark benchmark + import: common-options + type: exitcode-stdio-1.0 + hs-source-dirs: benchmark + main-is: Main.hs + build-depends: tasty-bench + , unicode-collation + , text + , text-icu >= 0.8 + , quickcheck-instances + , QuickCheck + ghc-options: -rtsopts -with-rtsopts=-A8m