ghc-package.eclass: allow override of default ghc and ghc-pkg tools
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 14 Apr 2018 17:58:44 +0000 (18:58 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 14 Apr 2018 18:43:51 +0000 (19:43 +0100)
This is mostly useful for cross-compilation and bootstrapping
of ghc from non-standard compiler.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/ghc-package.eclass

index 737db1b362e55826c081c46295b6ffddf5e60189..bd08b01d04ca139b4fa97eac536418bab6ba7ab0 100644 (file)
@@ -16,14 +16,14 @@ inherit multiprocessing versionator
 # @DESCRIPTION:
 # returns the name of the ghc executable
 ghc-getghc() {
-       type -P ghc
+       type -P ${HC:-ghc}
 }
 
 # @FUNCTION: ghc-getghcpkg
 # @DESCRIPTION:
 # Internal function determines returns the name of the ghc-pkg executable
 ghc-getghcpkg() {
-       type -P ghc-pkg
+       type -P ${HC_PKG:-ghc-pkg}
 }
 
 # @FUNCTION: ghc-getghcpkgbin