From d08fd81564e39cca3bbf89db0131d92d467510c21a09c612616e9f76dbe91ff2 Mon Sep 17 00:00:00 2001
From: Peter Simons <peter.simons@suse.com>
Date: Fri, 5 Apr 2024 21:00:53 +0000
Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-9.8.x
 package:ghc-hashable revision:2, using keep-link

OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-hashable?expand=0&rev=92
---
 ghc-hashable.changes    |  9 +++++++++
 ghc-hashable.spec       |  6 ++++--
 hashable-1.4.3.0.tar.gz |  3 ---
 hashable-1.4.4.0.tar.gz |  3 +++
 hashable.cabal          | 31 ++++++++++++++++++++++++-------
 5 files changed, 40 insertions(+), 12 deletions(-)
 delete mode 100644 hashable-1.4.3.0.tar.gz
 create mode 100644 hashable-1.4.4.0.tar.gz

diff --git a/ghc-hashable.changes b/ghc-hashable.changes
index 845de26..b2e8360 100644
--- a/ghc-hashable.changes
+++ b/ghc-hashable.changes
@@ -1,3 +1,12 @@
+-------------------------------------------------------------------
+Wed Apr  3 13:35:27 UTC 2024 - Peter Simons <psimons@suse.com>
+
+- Update hashable to version 1.4.4.0 revision 1.
+  ## Version 1.4.4.0
+
+    * Depend on `os-string-2` for GHC-9.2+
+    * Support `filepath-1.5`
+
 -------------------------------------------------------------------
 Tue Oct  3 20:15:46 UTC 2023 - Peter Simons <psimons@suse.com>
 
diff --git a/ghc-hashable.spec b/ghc-hashable.spec
index ffb4c0b..41ca777 100644
--- a/ghc-hashable.spec
+++ b/ghc-hashable.spec
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-hashable
 #
-# 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
@@ -20,7 +20,7 @@
 %global pkgver %{pkg_name}-%{version}
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.4.3.0
+Version:        1.4.4.0
 Release:        0
 Summary:        A class for types that can be converted to a hash value
 License:        BSD-3-Clause
@@ -38,6 +38,8 @@ BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-deepseq-prof
 BuildRequires:  ghc-filepath-devel
 BuildRequires:  ghc-filepath-prof
+BuildRequires:  ghc-os-string-devel
+BuildRequires:  ghc-os-string-prof
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-text-prof
diff --git a/hashable-1.4.3.0.tar.gz b/hashable-1.4.3.0.tar.gz
deleted file mode 100644
index b45431c..0000000
--- a/hashable-1.4.3.0.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:32efb16c2891786209b7cbe5c39df9b3a9ae51e836f1a54f646bc4602b7ab0f5
-size 25601
diff --git a/hashable-1.4.4.0.tar.gz b/hashable-1.4.4.0.tar.gz
new file mode 100644
index 0000000..6957a36
--- /dev/null
+++ b/hashable-1.4.4.0.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1fa3d64548440942b2b38b99c76d8dcaa94fa2ea3912cd7a6354ea4ec4af4758
+size 26197
diff --git a/hashable.cabal b/hashable.cabal
index d7258b5..33dcf02 100644
--- a/hashable.cabal
+++ b/hashable.cabal
@@ -1,6 +1,6 @@
 cabal-version:      1.12
 name:               hashable
-version:            1.4.3.0
+version:            1.4.4.0
 x-revision:         1
 synopsis:           A class for types that can be converted to a hash value
 description:
@@ -38,9 +38,10 @@ tested-with:
    || ==9.0.1
    || ==9.0.2
    || ==9.2.8
-   || ==9.4.7
-   || ==9.6.3
-   || ==9.8.1
+   || ==9.4.8
+   || ==9.6.4
+   || ==9.8.2
+   || ==9.10.1
 
 extra-source-files:
   CHANGES.md
@@ -80,14 +81,26 @@ library
   include-dirs:     include
   hs-source-dirs:   src
   build-depends:
-      base        >=4.10.1.0 && <4.20
+      base        >=4.10.1.0 && <4.21
     , bytestring  >=0.10.8.2 && <0.13
-    , containers  >=0.5.10.2 && <0.7
+    , containers  >=0.5.10.2 && <0.8
     , deepseq     >=1.4.3.0  && <1.6
-    , filepath    >=1.4.1.2  && <1.5
     , ghc-prim
     , text        >=1.2.3.0  && <1.3  || >=2.0 && <2.2
 
+  if impl(ghc >=9.2)
+    -- depend on os-string on newer GHCs only.
+    -- os-string has tight lower bound on bytestring, which prevents
+    -- using bundled version on older GHCs.
+    build-depends: os-string >=2.0.2
+
+    -- we also ensure that we can get filepath-1.5 only with GHC-9.2
+    -- therefore there is else-branch with stricter upper bound.
+    build-depends: filepath >=1.4.1.2 && <1.6
+
+  else
+    build-depends: filepath >=1.4.1.2 && <1.5
+
   if !impl(ghc >=9.2)
     build-depends: base-orphans >=0.8.6 && <0.10
 
@@ -152,6 +165,7 @@ test-suite hashable-tests
   build-depends:
       base
     , bytestring
+    , filepath
     , ghc-prim
     , hashable
     , HUnit
@@ -162,6 +176,9 @@ test-suite hashable-tests
     , test-framework-quickcheck2  >=0.2.9
     , text                        >=0.11.0.5
 
+  if impl(ghc >=9.2)
+    build-depends: os-string
+
   if !os(windows)
     build-depends:    unix
     cpp-options:      -DHAVE_MMAP