Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/
Date: Tue, 20 Apr 2021 19:31:29
Message-Id: 1618947081.efe8d14608f9b047bf92652c347fe9eb2a775400.slyfox@gentoo
1 commit: efe8d14608f9b047bf92652c347fe9eb2a775400
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 20 19:30:38 2021 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 20 19:31:21 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=efe8d146
7
8 dev-lang/ghc: use ${EPYTHON}
9
10 Reported-by: Agostino Sarubbo
11 Closes: https://bugs.gentoo.org/774141
12 Package-Manager: Portage-3.0.18, Repoman-3.0.3
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 dev-lang/ghc/ghc-8.10.4.ebuild | 19 +++++++++++++++++--
16 dev-lang/ghc/ghc-8.8.4.ebuild | 22 +++++++++++++++++++---
17 dev-lang/ghc/ghc-9.0.1.ebuild | 19 +++++++++++++++++--
18 3 files changed, 53 insertions(+), 7 deletions(-)
19
20 diff --git a/dev-lang/ghc/ghc-8.10.4.ebuild b/dev-lang/ghc/ghc-8.10.4.ebuild
21 index 26565839933..3e4cfb0d0db 100644
22 --- a/dev-lang/ghc/ghc-8.10.4.ebuild
23 +++ b/dev-lang/ghc/ghc-8.10.4.ebuild
24 @@ -13,6 +13,8 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
25 fi
26 fi
27
28 +PYTHON_COMPAT=( python3_{7..9} )
29 +inherit python-any-r1
30 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
31 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
32 inherit check-reqs
33 @@ -105,14 +107,23 @@ PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
34
35 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
36
37 -DEPEND="${RDEPEND}
38 +DEPEND="${RDEPEND}"
39 +BDEPEND="
40 virtual/pkgconfig
41 doc? ( app-text/docbook-xml-dtd:4.2
42 app-text/docbook-xml-dtd:4.5
43 app-text/docbook-xsl-stylesheets
44 dev-python/sphinx
45 >=dev-libs/libxslt-1.1.2 )
46 - !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
47 + !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
48 + test? ( ${PYTHON_DEPS} )
49 +"
50 +
51 +needs_python() {
52 + # test driver is written in python
53 + use test && return 0
54 + return 1
55 +}
56
57 # we build binaries without profiling support
58 REQUIRED_USE="
59 @@ -380,6 +391,10 @@ pkg_setup() {
60 die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
61 fi
62 fi
63 +
64 + if needs_python; then
65 + python-any-r1_pkg_setup
66 + fi
67 }
68
69 src_unpack() {
70
71 diff --git a/dev-lang/ghc/ghc-8.8.4.ebuild b/dev-lang/ghc/ghc-8.8.4.ebuild
72 index 2b7cd22116b..8bf1fa84bbb 100644
73 --- a/dev-lang/ghc/ghc-8.8.4.ebuild
74 +++ b/dev-lang/ghc/ghc-8.8.4.ebuild
75 @@ -13,6 +13,8 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
76 fi
77 fi
78
79 +PYTHON_COMPAT=( python3_{7..9} )
80 +inherit python-any-r1
81 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
82 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
83 inherit check-reqs
84 @@ -104,14 +106,23 @@ PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
85
86 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
87
88 -DEPEND="${RDEPEND}
89 +DEPEND="${RDEPEND}"
90 +BDEPEND="
91 virtual/pkgconfig
92 doc? ( app-text/docbook-xml-dtd:4.2
93 app-text/docbook-xml-dtd:4.5
94 app-text/docbook-xsl-stylesheets
95 dev-python/sphinx
96 >=dev-libs/libxslt-1.1.2 )
97 - !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
98 + !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
99 + test? ( ${PYTHON_DEPS} )
100 +"
101 +
102 +needs_python() {
103 + # test driver is written in python
104 + use test && return 0
105 + return 1
106 +}
107
108 # we build binaries without profiling support
109 REQUIRED_USE="
110 @@ -389,6 +400,10 @@ pkg_setup() {
111 die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
112 fi
113 fi
114 +
115 + if needs_python; then
116 + python-any-r1_pkg_setup
117 + fi
118 }
119
120 src_unpack() {
121 @@ -436,6 +451,7 @@ src_prepare() {
122 pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
123 use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
124 use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
125 + use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
126 use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
127 popd > /dev/null
128
129 @@ -640,7 +656,7 @@ src_configure() {
130 # using ${GTARGET}'s libffi is not supported yet:
131 # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
132 econf_args+=(--with-system-libffi)
133 - econf_args+=(--with-ffi-includes=$($(tc-getPKG_CONFIG) libffi --cflags-only-I | sed -e 's@^-I@@'))
134 + econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
135 fi
136
137 einfo "Final mk/build.mk:"
138
139 diff --git a/dev-lang/ghc/ghc-9.0.1.ebuild b/dev-lang/ghc/ghc-9.0.1.ebuild
140 index 3a1b5e9d9a8..9f33f2d0b49 100644
141 --- a/dev-lang/ghc/ghc-9.0.1.ebuild
142 +++ b/dev-lang/ghc/ghc-9.0.1.ebuild
143 @@ -13,6 +13,8 @@ if [[ ${CTARGET} = ${CHOST} ]] ; then
144 fi
145 fi
146
147 +PYTHON_COMPAT=( python3_{7..9} )
148 +inherit python-any-r1
149 inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
150 inherit multilib multiprocessing pax-utils toolchain-funcs prefix
151 inherit check-reqs
152 @@ -105,14 +107,23 @@ PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
153
154 RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
155
156 -DEPEND="${RDEPEND}
157 +DEPEND="${RDEPEND}"
158 +BDEPEND="
159 virtual/pkgconfig
160 doc? ( app-text/docbook-xml-dtd:4.2
161 app-text/docbook-xml-dtd:4.5
162 app-text/docbook-xsl-stylesheets
163 dev-python/sphinx
164 >=dev-libs/libxslt-1.1.2 )
165 - !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
166 + !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )
167 + test? ( ${PYTHON_DEPS} )
168 +"
169 +
170 +needs_python() {
171 + # test driver is written in python
172 + use test && return 0
173 + return 1
174 +}
175
176 # we build binaries without profiling support
177 REQUIRED_USE="
178 @@ -380,6 +391,10 @@ pkg_setup() {
179 die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
180 fi
181 fi
182 +
183 + if needs_python; then
184 + python-any-r1_pkg_setup
185 + fi
186 }
187
188 src_unpack() {