Haskellでレンダラーを書いてみるテスト #00

libpolatsk開発に支障がでない範囲でまったりと。

目的

とりあえず命名

nyatr: nyaxt's yet another ray-tracer

環境整備: ghcインストール

MacPortで

$ sudo port install ghc
kouhei@snowshoe:~$ sudo port install ghc
--->  Fetching ghc
--->  Verifying checksum(s) for ghc
--->  Extracting ghc
--->  Applying patches to ghc
--->  Configuring ghc
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1" && ./configure --prefix=/opt/local --prefix=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local --mandir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/destroot//opt/local/share/man/ --with-readline-includes=/opt/local/include --with-readline-libraries=/opt/local/lib --disable-openal --disable-alut " returned error 1
Command output: checking build system type... i686-apple-darwin9.1.0
checking host system type... i686-apple-darwin9.1.0
checking target system type... i686-apple-darwin9.1.0
Canonicalised to: i386-apple-darwin
checking for path to top of build tree... /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_ghc/work/ghc-6.6.1
checking for ghc... no
checking for ghc-pkg matching ... no
checking for ghc-pkg... no
checking whether ghc has readline package... no
checking for nhc... no
checking for nhc98... no
checking for hbc... no
configure: error: GHC is required unless bootstrapping from .hc files.

Error: Status 1 encountered during processing.

ちょw

http://www.haskell.org/ghc/download_ghc_682.html#macosxintel
からバイナリ版をダウンロード。試す。

tar jxvfp ghc-6.8.2-i386-apple-darwin.tar.bz2 
cd ghc-6.8.2
sudo mkdir -p /opt/local/ghc
./configure --prefix=/opt/local/ghc
sudo make install

あとは/opt/local/ghcに適当にパスを通す。

つづく