多分じきに修正されて腐る内容だが、MacPorts の port にパッチする方法としてまとめておく。 会社を辞めたので久方ぶりにブログを書こうと思い、pandoc をインストールしようとしたところ GHC のビルドがコケた。 ログをみると GetTime.c というファイルのコンパイルに失敗している。MacPorts の Trac を検索してみると果たして 既知の問題 だった。「Haskell 処理系とそれに依存する全パッケージがインストールできない」問題が四ヶ月前に報告されていまだに直っていないという大らかさ。 幸いチケット内に パッチ が提案されていたのでこれを適用してことなきを得た。 まずローカルに GHC の port をコピーし、MacPorts の ports tree として登録する: $ sudo -i Password: # mkdir -p /usr/local/ports/lang/ && cd /usr/local/ports/lang/ # cp -r $(port dir ghc) ./ # cd ghc && port lint # cp /opt/local/etc/macports/sources.conf{,.orig} # vi /opt/local/etc/macports/sources.conf # 作成したディレクトリをデフォルトの ports tree の前に追記する # diff -u /opt/local/etc/macports/sources.conf{.orig,} --- /opt/local/etc/macports/sources.conf.orig 2017-02-10 14:10:00.000000000 +0900 +++ /opt/local/etc/macports/sources.conf 2017-02-10 14:11:04.000000000 +0900 @@ -29,4 +29,5 @@ # sites, etc.), the primary MacPorts source must always be tagged # "[default]", even if switched from the def...