1 |
commit: 92016a52ffcaa768e18543a95f5b86b1b8c4abf5 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 5 10:05:55 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 5 10:12:34 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92016a52 |
7 |
|
8 |
ghc-package.eclass: drop support for pre-ghc-8 compilers |
9 |
|
10 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
11 |
|
12 |
eclass/ghc-package.eclass | 39 +++++++-------------------------------- |
13 |
1 file changed, 7 insertions(+), 32 deletions(-) |
14 |
|
15 |
diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass |
16 |
index e1a8d65be3e..5decbaa228e 100644 |
17 |
--- a/eclass/ghc-package.eclass |
18 |
+++ b/eclass/ghc-package.eclass |
19 |
@@ -58,30 +58,11 @@ ghc-getghcpkg() { |
20 |
# because for some reason the global package file |
21 |
# must be specified |
22 |
ghc-getghcpkgbin() { |
23 |
- if ver_test "$(ghc-version)" -ge "7.9.20141222"; then |
24 |
- # ghc-7.10 stopped supporting single-file database |
25 |
- local empty_db="${T}/empty.conf.d" ghc_pkg="$(ghc-libdir)/bin/ghc-pkg" |
26 |
- if [[ ! -d ${empty_db} ]]; then |
27 |
- "${ghc_pkg}" init "${empty_db}" || die "Failed to initialize empty global db" |
28 |
- fi |
29 |
- echo "$(ghc-libdir)/bin/ghc-pkg" "--global-package-db=${empty_db}" |
30 |
- |
31 |
- elif ver_test "$(ghc-version)" -ge "7.7.20121101"; then |
32 |
- # the ghc-pkg executable changed name in ghc 6.10, as it no longer needs |
33 |
- # the wrapper script with the static flags |
34 |
- # was moved to bin/ subtree by: |
35 |
- # http://www.haskell.org/pipermail/cvs-ghc/2012-September/076546.html |
36 |
- echo '[]' > "${T}/empty.conf" |
37 |
- echo "$(ghc-libdir)/bin/ghc-pkg" "--global-package-db=${T}/empty.conf" |
38 |
- |
39 |
- elif ver_test "$(ghc-version)" -ge "7.5.20120516"; then |
40 |
- echo '[]' > "${T}/empty.conf" |
41 |
- echo "$(ghc-libdir)/ghc-pkg" "--global-package-db=${T}/empty.conf" |
42 |
- |
43 |
- else |
44 |
- echo '[]' > "${T}/empty.conf" |
45 |
- echo "$(ghc-libdir)/ghc-pkg" "--global-conf=${T}/empty.conf" |
46 |
+ local empty_db="${T}/empty.conf.d" ghc_pkg="$(ghc-libdir)/bin/ghc-pkg" |
47 |
+ if [[ ! -d ${empty_db} ]]; then |
48 |
+ "${ghc_pkg}" init "${empty_db}" || die "Failed to initialize empty global db" |
49 |
fi |
50 |
+ echo "$(ghc-libdir)/bin/ghc-pkg" "--global-package-db=${empty_db}" |
51 |
} |
52 |
|
53 |
# @FUNCTION: ghc-version |
54 |
@@ -117,15 +98,9 @@ ghc-pm-version() { |
55 |
# @DESCRIPTION: |
56 |
# return version of the Cabal library bundled with ghc |
57 |
ghc-cabal-version() { |
58 |
- if ver_test "$(ghc-version)" -ge "7.9.20141222"; then |
59 |
- # outputs in format: 'version: 1.18.1.5' |
60 |
- set -- `$(ghc-getghcpkg) --package-db=$(ghc-libdir)/package.conf.d.initial field Cabal version` |
61 |
- echo "$2" |
62 |
- else |
63 |
- local cabal_package=`echo "$(ghc-libdir)"/Cabal-*` |
64 |
- # /path/to/ghc/Cabal-${VER} -> ${VER} |
65 |
- echo "${cabal_package/*Cabal-/}" |
66 |
- fi |
67 |
+ # outputs in format: 'version: 1.18.1.5' |
68 |
+ set -- `$(ghc-getghcpkg) --package-db=$(ghc-libdir)/package.conf.d.initial field Cabal version` |
69 |
+ echo "$2" |
70 |
} |
71 |
|
72 |
# @FUNCTION: ghc-is-dynamic |