summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-12-14 09:20:21 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2020-12-14 09:20:56 +0000
commit06572d76e2119c962282e71702902db1e0ba86fe (patch)
tree494a0e7fab63927f4e8755abe69a5c0fbf173cd8
parentx11-wm/icewm: Removed old (diff)
downloadgentoo-06572d76e2119c962282e71702902db1e0ba86fe.tar.gz
gentoo-06572d76e2119c962282e71702902db1e0ba86fe.tar.bz2
gentoo-06572d76e2119c962282e71702902db1e0ba86fe.zip
dev-haskell/abstract-deque: fix USE=usecas case
Reported-by: Toralf Förster Closes: https://bugs.gentoo.org/750206 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--dev-haskell/abstract-deque/abstract-deque-0.3.ebuild2
-rw-r--r--dev-haskell/abstract-deque/files/abstract-deque-0.3-atomic-primops.patch12
2 files changed, 14 insertions, 0 deletions
diff --git a/dev-haskell/abstract-deque/abstract-deque-0.3.ebuild b/dev-haskell/abstract-deque/abstract-deque-0.3.ebuild
index 540860f9876..74ca8d523de 100644
--- a/dev-haskell/abstract-deque/abstract-deque-0.3.ebuild
+++ b/dev-haskell/abstract-deque/abstract-deque-0.3.ebuild
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
>=dev-haskell/cabal-1.8
"
+PATCHES=("${FILESDIR}"/${P}-atomic-primops.patch)
+
src_configure() {
haskell-cabal_src_configure \
$(cabal_flag usecas usecas)
diff --git a/dev-haskell/abstract-deque/files/abstract-deque-0.3-atomic-primops.patch b/dev-haskell/abstract-deque/files/abstract-deque-0.3-atomic-primops.patch
new file mode 100644
index 00000000000..83d408fc7fe
--- /dev/null
+++ b/dev-haskell/abstract-deque/files/abstract-deque-0.3-atomic-primops.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/750206
+--- a/Data/Concurrent/Deque/Reference.hs
++++ b/Data/Concurrent/Deque/Reference.hs
+@@ -27,7 +27,7 @@ import Data.IORef
+
+ #ifdef USE_CAS
+ #warning "abstract-deque: reference implementation using CAS..."
+-import Data.CAS (atomicModifyIORefCAS)
++import Data.Atomics (atomicModifyIORefCAS)
+ -- Toggle these and compare performance:
+ modify = atomicModifyIORefCAS
+ _is_using_CAS = True