dev-lang/ghc: add check for disk space requirement, bug #611866
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 8 Jul 2017 11:59:44 +0000 (12:59 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 8 Jul 2017 11:59:52 +0000 (12:59 +0100)
Reported-by: Mike Limansky
Bug: https://bugs.gentoo.org/611866
Package-Manager: Portage-2.3.6, Repoman-2.3.2

dev-lang/ghc/ghc-8.0.2.ebuild

index 61c62ccf6fae6a199019a877877b53639dbafce6..4ba077cf90b915c76d5ab16da82815ffc3bcef50 100644 (file)
@@ -16,7 +16,7 @@ fi
 
 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
 inherit multilib pax-utils toolchain-funcs versionator prefix
-
+inherit check-reqs
 DESCRIPTION="The Glasgow Haskell Compiler"
 HOMEPAGE="http://www.haskell.org/ghc/"
 
@@ -327,7 +327,21 @@ relocate_ghc() {
        rm "$gp_back"
 }
 
+pkg_pretend() {
+       # These are pessimistic values (slightly bigger than worst-case)
+       # Worst case is UNREG USE=profile ia64. See bug #611866 for some
+       # numbers on various arches.
+       CHECKREQS_DISK_BUILD=8G
+       CHECKREQS_DISK_USR=2G
+       # USE=binary roughly takes
+       use binary && CHECKREQS_DISK_BUILD=4G
+
+       check-reqs_pkg_pretend
+}
+
 pkg_setup() {
+       check-reqs_pkg_setup
+
        # quiet portage about prebuilt binaries
        use binary && QA_PREBUILT="*"