なんとなく GRASS を入れてみようとしたがうまくいかなかった。
標題通り、なんとなく入れて、失敗しました。
portsには i18n版とそうでない版がありました。前者は PostgreSQL 対応してくれてないっぽくて、そうでない版は PostgreSQL を新たにインストールしようとする。ということで、ソースからコンパイルしてみました。
configureでは、tlctk と freetype で引っかかりました。どちらも --with-*-includes で単一のパスしか指定できないための問題。
ということで、次のように、-Iのパスに引っかかってくれるように、シンボリックリンクでごまかす。
cd /usr/local/include mkdir tcltk8.4 cd tcltk8.4 ln -s ../tcl8.4/*.h . ln -s ../tk8.4/*.h . cd /usr/local/freetype2 ln -s ../ft2build.h
それから、/usr/local/include, /usr/local/lib がそれぞれの探索パスに入っていなかったので、探索パスに入れてやる。
setenv CCFLAGS "-O2 -I/usr/local/include" setenv LDFLAGS "-L/usr/local/lib"
で、再configure。この際、オプションの一部を次のように変更しました。
--with-tcltk-includes=/usr/local/tcltk8.4 \ --with-freetype-includes=/usr/local/include/freetype2
まとめると、次のようにしました。
./configure \ --prefix=/usr/local/grass \ --with-nls \ --with-readline \ --with-gdal=/usr/local/bin/gdal-config \ --with-zlibs=/usr/local \ --with-freetype \ --with-readline-includes=/usr/local/include \ --with-readline-libs=/usr/local/lib \ --with-jpeg-includes=/usr/local/include \ --with-jpeg-libs=/usr/local/lib \ --with-tiff-includes=/usr/local/include \ --with-tiff-libs=/usr/local/lib \ --with-png-includes=/usr/local/include \ --with-png-libs=/usr/local/lib \ --with-tcltk-includes=/usr/local/include/tcltk8.4 \ --with-tcltk-libs=/usr/local/lib \ --with-postgres-includes=/usr/local/pgsql/include \ --with-postgres-libs=/usr/local/pgsql/lib \ --with-opengl-includes=/usr/X11R6/include \ --with-opengl-libs=/usr/X11R6/lib \ --with-fftw-includes=/usr/local/include \ --with-fftw-libs=/usr/local/lib \ --with-freetype-includes=/usr/local/include/freetype2 \ --with-freetype-libs=/usr/local/lib \ --with-proj-includes=/usr/local/include \ --with-proj-libs=/usr/local/lib
(ちょっと postgresql が特殊なパスになっていますが、適宜変えてください)
で、gmake (GNU make でないといけない)、gmake install でインストール完了。