<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ab891551d4693be90aa6492b0f4e5b8d98cebf29">https://github.com/macports/macports-ports/commit/ab891551d4693be90aa6492b0f4e5b8d98cebf29</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ab891551d46 ghc: Bugfixes for test and iconv linking
</span>ab891551d46 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ab891551d4693be90aa6492b0f4e5b8d98cebf29
</span>Author: Steven Thomas Smith <s.t.smith@ieee.org>
AuthorDate: Thu Sep 24 21:25:43 2020 -0400
<span style='display:block; white-space:pre;color:#404040;'> ghc: Bugfixes for test and iconv linking
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes:
</span><span style='display:block; white-space:pre;color:#404040;'> * https://trac.macports.org/ticket/61223
</span><span style='display:block; white-space:pre;color:#404040;'> * https://trac.macports.org/ticket/61222
</span><span style='display:block; white-space:pre;color:#404040;'> * https://trac.macports.org/ticket/61221
</span><span style='display:block; white-space:pre;color:#404040;'> * https://trac.macports.org/ticket/61220
</span><span style='display:block; white-space:pre;color:#404040;'> * https://trac.macports.org/ticket/60171
</span>---
lang/ghc/Portfile | 106 ++++++++++++++++++++++++++++++++++--------------------
1 file changed, 68 insertions(+), 38 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/ghc/Portfile b/lang/ghc/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 7882b6319d3..ef225d65804 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/ghc/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/ghc/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortGroup gpg_verify 1.0
</span>
name ghc
version 8.10.2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories lang haskell
maintainers {ieee.org:s.t.smith @essandess} openmaintainer
license BSD
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,18 +13,18 @@ platforms darwin
</span> supported_archs x86_64
description The Glorious Glasgow Haskell Compilation System
<span style='display:block; white-space:pre;background:#ffe0e0;'>-long_description The Glasgow Haskell Compiler is a robust,\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- fully-featured, optimising compiler and\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- interactive environment for Haskell 98, GHC\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- compiles Haskell to either native code or C. It\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- implements numerous experimental language\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extensions to Haskell 98, for example:\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- concurrency, a foreign language interface,\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- multi-parameter type classes, scoped type\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variables, existential and universal\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- quantification, unboxed types, exceptions, weak\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pointers, and so on. GHC comes with a\
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- generational garbage collector, and a space and\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description The Glasgow Haskell Compiler is a robust, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fully-featured, optimising compiler and \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ interactive environment for Haskell 98, GHC \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiles Haskell to either native code or C. It \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ implements numerous experimental language \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extensions to Haskell 98, for example: \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ concurrency, a foreign language interface, \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ multi-parameter type classes, scoped type \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variables, existential and universal \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ quantification, unboxed types, exceptions, weak \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pointers, and so on. GHC comes with a \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ generational garbage collector, and a space and \
</span> time profiler.
homepage http://haskell.org/${name}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -94,6 +94,14 @@ set srcpath ${workpath}/src
</span>
if { [variant_isset "prebuilt"] } {
set bootstrap_dir ${destroot}${prefix}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # install the initial bootstrap compiler to destroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.pre_args \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --prefix=${bootstrap_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the PATH environment must provide the bootstrap path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PATH=$env(PATH):${bootstrap_dir}/bin"
</span> } else {
set bootstrap_dir ${workpath}/bootstrap
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -118,26 +126,52 @@ if { [variant_isset "prebuilt"] } {
</span> port:texlive-fonts-recommended \
port:texlive-latex-extra
<span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-configure {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 -d ${bootstrap_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add these MacPorts dependencies after this issue is fixed:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://gitlab.haskell.org/ghc/ghc/-/issues/18752
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # depends_lib-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # port:gmp \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # port:libffi \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # port:libiconv
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # test: move extracted testsuite directory to src
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0755 -d ${srcpath}/${distname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ move ${worksrcpath}/testsuite ${srcpath}/${distname}/testsuite
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # libHSbase shipped with GHC links against system libiconv, which provides the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # 'iconv' symbol, but not the 'libiconv' symbol. Because the compilation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # process statically links libHSbase.a, we must have /usr/lib in the library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # search path first :/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.library_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compiler.cpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # install the initial bootstrap compiler to destroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.pre_args \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --prefix=${bootstrap_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add these MacPorts dependencies after this issue is fixed:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://gitlab.haskell.org/ghc/ghc/-/issues/18752
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # --with-ffi-includes=${prefix}/include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # --with-ffi-libraries=${prefix}/lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # --with-gmp-includes=${prefix}/include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # --with-gmp-libraries=${prefix}/lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # --with-iconv-includes=${prefix}/include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # --with-iconv-libraries=${prefix}/lib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # add the bootstrap binary and the sphinx-build binary to PATH
configure.env-append \
GHC=${bootstrap_dir}/bin/ghc \
"PATH=$env(PATH):${bootstrap_dir}/bin:${frameworks_dir}/Python.framework/Versions/${python3_version}/bin"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # overwrite `build.env`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0755 -d ${bootstrap_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the PATH environment must provide the bootstrap path
</span> build.env \
"PATH=$env(PATH):${bootstrap_dir}/bin:${frameworks_dir}/Python.framework/Versions/${python3_version}/bin"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-build {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # test: move extracted testsuite directory to src
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 -d ${srcpath}/${distname}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- move ${test.dir} ${srcpath}/${distname}/testsuite
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- test.dir ${srcpath}/${distname}/testsuite
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> post-build {
# bootstrap build/destroot from ${distname}-src${extract.suffix}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -177,14 +211,15 @@ if { [variant_isset "prebuilt"] } {
</span> system -W ${srcpath}/${distname} "patch -p0 < ${filespath}/patch-gmp-ghc.mk.diff"
system -W ${srcpath}/${distname} \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- "export PATH=$env(PATH):${bootstrap_dir}/bin:${frameworks_dir}/Python.framework/Versions/${python3_version}/bin ;\
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "export ${configure.env} ;\
</span> ./boot"
# configure
# install the final compiler to destroot
<span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.pre_args \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- --prefix=${destroot}${prefix}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.dir ${srcpath}/${distname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.pre_args-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --prefix=${bootstrap_dir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --prefix=${destroot}${prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.dir ${srcpath}/${distname}
</span> system -W ${srcpath}/${distname} \
"export ${configure.env};\
${configure.cmd} ${configure.pre_args}"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -199,15 +234,6 @@ if { [variant_isset "prebuilt"] } {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# install the initial bootstrap compiler to destroot
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.pre_args --prefix=${bootstrap_dir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# the PATH environment must provide the bootstrap path
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# note: this command does not change the destroot PATH environment, so export
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# PATH explicitly in the necessary system command below
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-build.env-append \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "PATH=$env(PATH):${bootstrap_dir}/bin"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # Note: `make install` in bootstrap build cannot use a parallel build
use_parallel_build no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -232,9 +258,13 @@ post-activate {
</span> system "${prefix}/bin/ghc-pkg recache"
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-test {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PATH=$env(PATH):${bootstrap_dir}/bin:${frameworks_dir}/Python.framework/Versions/${python3_version}/bin"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> test.run yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-test.env-append "PATH=$env(PATH):${bootstrap_dir}/bin"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-test.dir ${worksrcpath}/testsuite
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test.dir ${srcpath}/${distname}/testsuite
</span> test.target test
notes "The GHC User Manual is available at:
</pre><pre style='margin:0'>
</pre>