summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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