MacPorts

MacPortsを導入
http://d.hatena.ne.jp/hakobe932/20061208/1165646618
を参考に。

XcodeToolsをインストールディスクからインストール。
MacPortsdmgを下記から落としてきてマウントしてMacPortsをインストール
http://svn.macosforge.org/repository/macports/downloads/DarwinPorts-1.3.1/
DarwinPorts-1.3.1-10.4.dmg

.bashrcにPATHを追加して環境変数を整える。

export PATH=/opt/local/bin:/opt/local/sbin/:$PATH
export MANPATH=/opt/local/man:$MANPATH

Mac Portsのアップデート

sudo port -d selfupdate
sudo port -d sync

とりあず、今回は、PHP5をインストール。

$ port search php

py-graphpath python/py-graphpath 0.7 small language for ananlysing graph-structured data in Python
midgard-php4 www/midgard-php4 1.8.0 {A content management system}
php4 www/php4 4.4.4 PHP: Hypertext Preprocessor
php5 www/php5 5.2.0 PHP: Hypertext Preprocessor
phpbb www/phpbb 2.0.19 A PHP-based bulletin board / discussion forum system
phpicalendar www/phpicalendar 2.0.1 web-based iCal viewer
phpmyadmin www/phpmyadmin 2.8.0.3 A tool written in PHP intended to handle the administration of MySQL over the Web.

依存関係を調べる*1

$ port deps php5*2

php5 has library dependencies on:
libxml2
libxslt
openssl
tidy
zlib
libiconv
expat
gettext
tiff
mhash
libmcrypt
cclient
curl
jpeg
libpng
freetype

インストール


$ port variants php5*3

php5 has the variants:
darwin_6
darwin_7
darwin_8
freebsd
macosx
apache
apache2
fastcgi
snmp
macports_snmp
mysql3
mysql4
mysql5
postgresql
pear

apache2 と pearをつけてインストール

$ sudo port install php5 +apache2 +pear

今回は、この辺で。

*1:修正

*2:依存関係を調査

*3:コンパイルオプションを渡す