Tiger に DarwinPorts をインストールする
いろいろあって、Mac OS X Tiger が入っている、Mac mini に DarwinPorts をインストールすることにした。
DarwinPorts を使って、UNIX 由来のソフトウェアをインストールする。いくつかググったサイトを見てみたが、そこまで完成度は高くはないのかな?でも、FreeBSD の Ports Collection と同じで便利なように思えます。
とりあえず、X11 と Xcode Tools は入っている環境なんで、DarwinPorts のインストールをおこなう。DarwinPorts サイトのダウンロードページからさくっとダウンロード。ダウンロードしたファイルはホームディレクトリにつくった src ディレクトリに置いておく。
$ ls -l
total 1496
-rw-r--r-- 1 hoge hoge 764490 8 18 22:33 DarwinPorts-1.3.2.tar.bz2
次にこれを解凍する。
$ tar xjf DarwinPorts-1.3.2.tar.bz2
$ ls
DarwinPorts-1.3.2 DarwinPorts-1.3.2.tar.bz2
特にインストール先(デフォルトでは /opt/local)を変更する必要もないので、そのまま configure して make する。もし、インストール先を変更したい(例えば /dp)ときは、configure のオプション --prefix を使う(/dp 以下にインストールしたいときは --prefix=/dp)。
$ ./configure
checking build system type... powerpc-apple-darwin8.7.0
checking host system type... powerpc-apple-darwin8.7.0
checking target system type... powerpc-apple-darwin8.7.0
<中略>
config.status: creating src/programs/Makefile
config.status: creating src/darwinports1.0/darwinports_fastload.tcl
config.status: creating src/config.h
$ make
===> making all in config
make[1]: Nothing to be done for `all'.
===> making all in doc
make[1]: Nothing to be done for `all'.
===> making all in src
===> making all in src/darwinports1.0
gcc -c -DUSE_TCL_STUBS -g -O2 -W -Wall -pedantic -g -Os -DHAVE_CONFIG_H -I.. -I. -I"/usr/include" -DTCL_THREADS=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DHAVE_READDIR_R=1 -DMAC_OSX_TCL=1 -DHAVE_CFBUNDLE=1 -DUSE_VFORK=1 -DTCL_DEFAULT_ENCODING=¥"utf-8¥" -DTCL_WIDE_INT_TYPE=long¥ long -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_PUTENV_THAT_COPIES=1 -DHAVE_LANGINFO=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -fno-common darwinports.c -o darwinports.o
<中略>
===> making all in src/programs/daemondo
mkdir -p build
gcc -g -O2 -W -Wall -Wno-unused-parameter -g -Os -DHAVE_CONFIG_H -I.. -I. -I"/usr/include" -DHAVE_CONFIG_H -I.. -I. -I"/usr/include" -c -o main.o main.c
gcc -g -O2 -W -Wall -Wno-unused-parameter -g -Os -DHAVE_CONFIG_H -I.. -I. -I"/usr/include" -o build/daemondo -framework CoreFoundation -framework SystemConfiguration -framework IOKit main.o
===> making all in portmgr
sed -e 's,@PREFIX¥@,/opt/local,g' -e 's,@TCL_PACKAGE_DIR¥@,/Library/Tcl,g' PortIndex2MySQL.tcl > PortIndex2MySQL
$ sudo make install
Password:
===> making install in config
/usr/bin/install -c -d -o root -g admin -m 0775 /opt/local/etc/ports
/usr/bin/install -c -o root -g admin -m 644 dp_version /opt/local/etc/ports
<中略>
if test -d /opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate1 ¥
-a ! -d /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate1; then ¥
mv /opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate1 ¥
/opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate1; ¥
fi
Congratulations, you have successfully installed the DarwinPorts system.
To get the Portfiles and update the system run:
sudo port selfupdate
Please read README_RELEASE1 and port(1).
とりあえず、インストールは完了。
Port Tree(というのか?)の更新は sudo port -d selfupdate で。