The upstream Darwin bindist is built against the SDK iconv, whose
entry points are named iconv*. MacPorts builds can put ${prefix}/lib
ahead of the SDK library path, causing downstream GHC links to
resolve against MacPorts libiconv, which exports libiconv* instead.
This broke builds of Haskell ports such as cabal with undefined
_iconv, _iconv_open, and _iconv_close symbols from ghc-internal.
When installing the prebuilt GHC, rewrite ghc-internal's iconv
object in the static archives and the ghc-internal dylibs to
reference libiconv* symbols. Also rewrite the dylib load command to
use ${prefix}/lib/libiconv.2.dylib, add ${prefix}/lib to
ghc-internal's package metadata library search paths, and recache the
package database.
This makes ghc +prebuilt internally consistent with its MacPorts
libiconv dependency and allows cabal to build successfully with
ghc @9.14.1_2+prebuilt.
Closes: https://trac.macports.org/ticket/73535
* Add `ghc +prebuilt` variant as fallback for cases where `ghc` cannot be compiled
* Note: subport `ghc-prebuilt` is necessary to bootstrap Haskell build tools, including port `ghc`, and (nearly equivalent) port `ghc +prebuilt` is simply a fallback option when `ghc` cannot be compiled
* Add proc `ghc_prebuilt_commands` with common commands for subport `ghc-prebuilt` and port `ghc +prebuilt` variant
* Make `ghc +prebuilt` the default on macOS Tahoe until upstream compile is fixed
* Fix `livecheck` settings
* Remove unnecessary destroot artifacts from prebuilt that would create conflicts between subport `ghc-prebuilt` and port `ghc +prebuilt` variant
* Add explanatory notes on intended purpose of subport `ghc-prebuilt` and port `ghc +prebuilt` variant
* Add description for subport `hadrian`
* Minor whitespace alignment fixes
* See: https://trac.macports.org/ticket/72773