mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
dev-haskell/temporary: add 1.3-r1
Signed-off-by: hololeap <hololeap@protonmail.com> Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
46
dev-haskell/temporary/files/temporary-1.3-smp-flag.patch
Normal file
46
dev-haskell/temporary/files/temporary-1.3-smp-flag.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From 7f448b41589fccd3ac883c6fb3865f8dbedcb14d Mon Sep 17 00:00:00 2001
|
||||
From: hololeap <hololeap@users.noreply.github.com>
|
||||
Date: Sun, 30 Oct 2022 12:45:29 -0600
|
||||
Bug: https://github.com/UnkindPartition/temporary/pull/15
|
||||
Subject: [PATCH] Add smp flag
|
||||
|
||||
This flag will toggle the use of some `ghc-options` in the test suite.
|
||||
It is set to `default: True`.
|
||||
|
||||
This is needed for tests to run on some GHC builds which do not support
|
||||
a threaded runtime.
|
||||
|
||||
Reported-by: matoro <https://github.com/matoro>
|
||||
Signed-off-by: hololeap <hololeap@users.noreply.github.com>
|
||||
---
|
||||
temporary.cabal | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/temporary.cabal b/temporary.cabal
|
||||
index 67163d1..ca54604 100644
|
||||
--- a/temporary.cabal
|
||||
+++ b/temporary.cabal
|
||||
@@ -15,6 +15,11 @@ source-repository head
|
||||
type: git
|
||||
location: git://github.com/feuerbach/temporary.git
|
||||
|
||||
+flag smp
|
||||
+ description: Use flags that depend on GHC supporting a multicore runtime (tests only)
|
||||
+ manual: True
|
||||
+ default: True
|
||||
+
|
||||
Library
|
||||
default-language:
|
||||
Haskell2010
|
||||
@@ -37,7 +42,10 @@ test-suite test
|
||||
tests
|
||||
main-is:
|
||||
test.hs
|
||||
- ghc-options: -threaded -with-rtsopts=-N2
|
||||
+ if flag(smp)
|
||||
+ ghc-options: -threaded -with-rtsopts=-N2
|
||||
+ else
|
||||
+ ghc-options: -threaded
|
||||
build-depends:
|
||||
base >= 4.3 && < 5
|
||||
, directory
|
||||
@@ -5,13 +5,8 @@
|
||||
<email>haskell@gentoo.org</email>
|
||||
<name>Gentoo Haskell</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
The functions for creating temporary files and directories in the base library are quite limited. The unixutils
|
||||
package contains some good ones, but they aren't portable to Windows.
|
||||
This library just repackages the Cabal implementations of its own temporary file and folder functions so that
|
||||
you can use them without linking against Cabal or depending on it being installed.
|
||||
</longdescription>
|
||||
<upstream>
|
||||
<remote-id type="github">batterseapower/temporary</remote-id>
|
||||
<remote-id type="hackage">temporary</remote-id>
|
||||
<remote-id type="github">feuerbach/temporary</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
||||
44
dev-haskell/temporary/temporary-1.3-r1.ebuild
Normal file
44
dev-haskell/temporary/temporary-1.3-r1.ebuild
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# ebuild generated by hackport 0.7.3.0
|
||||
|
||||
CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite"
|
||||
inherit ghc-package haskell-cabal
|
||||
|
||||
DESCRIPTION="Portable temporary file and directory support"
|
||||
HOMEPAGE="https://github.com/feuerbach/temporary"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.3-smp-flag.patch"
|
||||
)
|
||||
|
||||
RDEPEND="
|
||||
>=dev-haskell/random-1.1:=[profile?]
|
||||
>=dev-lang/ghc-8.10.1:=
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-3.2.0.0
|
||||
test? (
|
||||
dev-haskell/base-compat
|
||||
dev-haskell/tasty
|
||||
dev-haskell/tasty-hunit
|
||||
)
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
if ghc-supports-smp; then
|
||||
local smp_flag=smp
|
||||
else
|
||||
local smp_flag=-smp
|
||||
fi
|
||||
|
||||
haskell-cabal_src_configure \
|
||||
--flag="${smp_flag}"
|
||||
}
|
||||
Reference in New Issue
Block a user