Engineer as a Lifestyle @tenkoma

What We Find Changes Who We Become -- Peter Morville『アンビエント・ファインダビリティ 』

MacPortsでgitをインストール

sudo port selfupdate
sudo port upgrade vim

長い間アップデートしていなかったので7.1.126〜7.1.330まで適用されました。

% port search git
cogito                         devel/cogito   0.18.2       Git core and cogito tools to provide a fully-distributed SCM
git-core                       devel/git-core 1.5.6.2      A fast version control system
qgit                           devel/qgit     2.1          A graphical interface to git repositories
stgit                          devel/stgit    0.14.1       Push/pop utility on top of GIT
cgit                           www/cgit       0.7.1        A fast web interface for the git source code management system

いくつかブログを見てみる*1 *2と git-core と cogito を入れている人が多い。次にvariantsを調べる。

% port variants git-core
git-core has the variants:
        universal
        doc: Install HTML and plaintext documentation
        gitweb: Install gitweb.cgi
        svn: Bi-directional subversion repository support
        bash_completion: Bash completion support
[~] 
% port variants cogito
cogito has the variants:
        universal

gitweb と svn を指定している人が多い。同じようにやってみる

% sudo port install git-core +gitweb +svn
Password:
--->  Fetching openssh
--->  Attempting to fetch DVG-5142987_launchd_DISPLAY_for_X11.patch from http://www.opensource.apple.com/darwinsource/10.5/OpenSSH-87/patches/
--->  Attempting to fetch openssh-5.0p1.tar.gz from http://mirror.roothell.org/pub/OpenBSD/OpenSSH/portable
--->  Verifying checksum(s) for openssh
--->  Extracting openssh
--->  Applying patches to openssh
--->  Configuring openssh
--->  Building openssh with target all
--->  Staging openssh into destroot
--->  Creating launchd control script
###########################################################
# A startup item has been generated that will aid in
# starting openssh with launchd. It is disabled
# by default. Execute the following command to start it,
# and to cause it to launch at startup:
#
# sudo launchctl load -w /Library/LaunchDaemons/org.macports.OpenSSH.plist
###########################################################
--->  Installing openssh 5.0p1_0+darwin_9
--->  Activating openssh 5.0p1_0+darwin_9
--->  Cleaning openssh
--->  Fetching p5-error
--->  Attempting to fetch Error-0.17012.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/Error
--->  Verifying checksum(s) for p5-error
--->  Extracting p5-error
--->  Configuring p5-error
--->  Building p5-error with target all
--->  Staging p5-error into destroot
--->  Installing p5-error 0.17012_0
--->  Activating p5-error 0.17012_0
--->  Cleaning p5-error
--->  Fetching p5-compress-raw-zlib
--->  Attempting to fetch Compress-Raw-Zlib-2.011.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/Compress
--->  Verifying checksum(s) for p5-compress-raw-zlib
--->  Extracting p5-compress-raw-zlib
--->  Configuring p5-compress-raw-zlib
--->  Building p5-compress-raw-zlib with target all
--->  Staging p5-compress-raw-zlib into destroot
--->  Installing p5-compress-raw-zlib 2.011_0
--->  Activating p5-compress-raw-zlib 2.011_0
--->  Cleaning p5-compress-raw-zlib
--->  Fetching p5-io-compress-base
--->  Attempting to fetch IO-Compress-Base-2.011.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/IO
--->  Verifying checksum(s) for p5-io-compress-base
--->  Extracting p5-io-compress-base
--->  Configuring p5-io-compress-base
--->  Building p5-io-compress-base with target all
--->  Staging p5-io-compress-base into destroot
--->  Installing p5-io-compress-base 2.011_0
--->  Activating p5-io-compress-base 2.011_0
--->  Cleaning p5-io-compress-base
--->  Fetching p5-io-compress-zlib
--->  Attempting to fetch IO-Compress-Zlib-2.011.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/IO
--->  Verifying checksum(s) for p5-io-compress-zlib
--->  Extracting p5-io-compress-zlib
--->  Configuring p5-io-compress-zlib
--->  Building p5-io-compress-zlib with target all
--->  Staging p5-io-compress-zlib into destroot
--->  Installing p5-io-compress-zlib 2.011_0
--->  Activating p5-io-compress-zlib 2.011_0
--->  Cleaning p5-io-compress-zlib
--->  Fetching p5-compress-zlib
--->  Attempting to fetch Compress-Zlib-2.011.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/Compress
--->  Verifying checksum(s) for p5-compress-zlib
--->  Extracting p5-compress-zlib
--->  Configuring p5-compress-zlib
--->  Building p5-compress-zlib with target all
--->  Staging p5-compress-zlib into destroot
--->  Installing p5-compress-zlib 2.011_0
--->  Activating p5-compress-zlib 2.011_0
--->  Cleaning p5-compress-zlib
--->  Fetching p5-html-tagset
--->  Attempting to fetch HTML-Tagset-3.20.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/HTML
--->  Verifying checksum(s) for p5-html-tagset
--->  Extracting p5-html-tagset
--->  Configuring p5-html-tagset
--->  Building p5-html-tagset with target all
--->  Staging p5-html-tagset into destroot
--->  Installing p5-html-tagset 3.20_0
--->  Activating p5-html-tagset 3.20_0
--->  Cleaning p5-html-tagset
--->  Fetching p5-html-parser
--->  Attempting to fetch HTML-Parser-3.56.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/HTML
--->  Verifying checksum(s) for p5-html-parser
--->  Extracting p5-html-parser
--->  Configuring p5-html-parser
--->  Building p5-html-parser with target all
--->  Staging p5-html-parser into destroot
--->  Installing p5-html-parser 3.56_0
--->  Activating p5-html-parser 3.56_0
--->  Cleaning p5-html-parser
--->  Fetching p5-uri
--->  Attempting to fetch URI-1.35.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/URI
--->  Verifying checksum(s) for p5-uri
--->  Extracting p5-uri
--->  Configuring p5-uri
--->  Building p5-uri with target all
--->  Staging p5-uri into destroot
--->  Installing p5-uri 1.35_1
--->  Activating p5-uri 1.35_1
--->  Cleaning p5-uri
--->  Fetching p5-libwww-perl
--->  Attempting to fetch libwww-perl-5.813.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/LWP
--->  Verifying checksum(s) for p5-libwww-perl
--->  Extracting p5-libwww-perl
--->  Configuring p5-libwww-perl
--->  Building p5-libwww-perl with target all
--->  Staging p5-libwww-perl into destroot
--->  Installing p5-libwww-perl 5.813_0
--->  Activating p5-libwww-perl 5.813_0
--->  Cleaning p5-libwww-perl
--->  Fetching apr
--->  Attempting to fetch apr-1.3.2.tar.bz2 from http://www.apache.org/dist/apr
--->  Verifying checksum(s) for apr
--->  Extracting apr
--->  Configuring apr
--->  Building apr with target all
--->  Staging apr into destroot
--->  Installing apr 1.3.2_0+darwin_9
--->  Activating apr 1.3.2_0+darwin_9
--->  Cleaning apr
--->  Fetching db46
--->  Attempting to fetch patch.4.6.21.1 from http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/
--->  Attempting to fetch db-4.6.21.tar.gz from http://download-west.oracle.com/berkeley-db/
--->  Verifying checksum(s) for db46
--->  Extracting db46
--->  Applying patches to db46
--->  Configuring db46
--->  Building db46 with target all
--->  Staging db46 into destroot
--->  Installing db46 4.6.21_1
--->  Activating db46 4.6.21_1
--->  Cleaning db46
--->  Fetching gmake
--->  Attempting to fetch make-3.81.tar.bz2 from http://ftp.gnu.org/gnu/make
--->  Verifying checksum(s) for gmake
--->  Extracting gmake
--->  Configuring gmake
--->  Building gmake with target all
--->  Staging gmake into destroot
--->  Installing gmake 3.81_0
--->  Activating gmake 3.81_0
--->  Cleaning gmake
--->  Fetching sqlite3
--->  Attempting to fetch sqlite-3.5.9.tar.gz from http://www.sqlite.org/
--->  Verifying checksum(s) for sqlite3
--->  Extracting sqlite3
--->  Configuring sqlite3
--->  Building sqlite3 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_databases_sqlite3/work/sqlite-3.5.9" && gnumake all " returned error 2
Command output: sed -e s/--VERS--/3.5.9/ ./src/sqlite.h.in | \
        sed -e s/--VERSION-NUMBER--/3005009/ >sqlite3.h
/usr/bin/gcc-4.0 -O2 -o mkkeywordhash  ./tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
/usr/bin/gcc-4.0 -O2 -o lemon ./tool/lemon.c
cp ./tool/lempar.c .
cp ./src/parse.y .
./lemon  parse.y
mv parse.h parse.h.temp
f ./addopcodes.awk parse.h.temp >parse.h
/bin/sh: f: command not found
gnumake: [parse.c] Error 127 (ignored)
cat parse.h ./src/vdbe.c |  -f ./mkopcodeh.awk >opcodes.h
/bin/sh: -f: command not found
cat: stdout: Broken pipe
gnumake: *** [opcodes.h] Error 127

Error: The following dependencies failed to build: p5-svn-simple subversion-perlbindings apr-util sqlite3 cyrus-sasl2 serf subversion p5-term-readkey rsync
Error: Status 1 encountered during processing.

SQLite3でエラーになる。トラブルシューティング2008-05-03 - akimatterで知り、同じようにやる。
一度cleanしてからインストールし直すとうまくいったりするのは常識なのかなー

% sudo port clean sqlite3
--->  Cleaning sqlite3
[~] 
% sudo port install sqlite3
--->  Fetching sqlite3
--->  Verifying checksum(s) for sqlite3
--->  Extracting sqlite3
--->  Configuring sqlite3
--->  Building sqlite3 with target all
--->  Staging sqlite3 into destroot
--->  Installing sqlite3 3.5.9_0
--->  Activating sqlite3 3.5.9_0
--->  Cleaning sqlite3

気を取り直してもう一度やる。インストールできた部分はもう表示されない。

% sudo port install git-core +gitweb +svn
--->  Fetching apr-util
--->  Attempting to fetch apr-util-1.3.2.tar.bz2 from http://www.apache.org/dist/apr
--->  Verifying checksum(s) for apr-util
--->  Extracting apr-util
--->  Configuring apr-util
--->  Building apr-util with target all
--->  Staging apr-util into destroot
--->  Installing apr-util 1.3.2_0
--->  Activating apr-util 1.3.2_0
--->  Cleaning apr-util
--->  Fetching cyrus-sasl2
--->  Attempting to fetch cyrus-sasl-2.1.21.tar.gz from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail
--->  Verifying checksum(s) for cyrus-sasl2
--->  Extracting cyrus-sasl2
--->  Applying patches to cyrus-sasl2
--->  Configuring cyrus-sasl2
--->  Building cyrus-sasl2 with target all
--->  Staging cyrus-sasl2 into destroot
--->  Installing cyrus-sasl2 2.1.21_0+kerberos
--->  Activating cyrus-sasl2 2.1.21_0+kerberos
--->  Cleaning cyrus-sasl2
--->  Fetching serf
--->  Attempting to fetch serf-0.2.0.tar.bz2 from http://serf.googlecode.com/files/
--->  Verifying checksum(s) for serf
--->  Extracting serf
--->  Configuring serf
--->  Building serf with target all
--->  Staging serf into destroot
--->  Installing serf 0.2.0_0
--->  Activating serf 0.2.0_0
--->  Cleaning serf
--->  Fetching subversion
--->  Attempting to fetch subversion-1.5.0.tar.bz2 from http://subversion.tigris.org/downloads/
--->  Verifying checksum(s) for subversion
--->  Extracting subversion
--->  Applying patches to subversion
--->  Configuring subversion
--->  Building subversion with target all
--->  Staging subversion into destroot
--->  Installing subversion 1.5.0_1
--->  Activating subversion 1.5.0_1
--->  Cleaning subversion
--->  Fetching subversion-perlbindings
--->  Verifying checksum(s) for subversion-perlbindings
--->  Extracting subversion-perlbindings
--->  Configuring subversion-perlbindings
--->  Building subversion-perlbindings with target swig-pl
--->  Staging subversion-perlbindings into destroot
--->  Installing subversion-perlbindings 1.5.0_1
--->  Activating subversion-perlbindings 1.5.0_1
--->  Cleaning subversion-perlbindings
--->  Fetching p5-svn-simple
--->  Attempting to fetch SVN-Simple-0.27.tar.gz from http://cpan.perl.org/authors/id/C/CL/CLKAO/
--->  Verifying checksum(s) for p5-svn-simple
--->  Extracting p5-svn-simple
--->  Configuring p5-svn-simple
--->  Building p5-svn-simple with target all
--->  Staging p5-svn-simple into destroot
--->  Installing p5-svn-simple 0.27_0
--->  Activating p5-svn-simple 0.27_0
--->  Cleaning p5-svn-simple
--->  Fetching p5-term-readkey
--->  Attempting to fetch TermReadKey-2.30.tar.gz from http://ftp.ucr.ac.cr/Unix/CPAN/modules/by-module/Term
--->  Verifying checksum(s) for p5-term-readkey
--->  Extracting p5-term-readkey
--->  Configuring p5-term-readkey
--->  Building p5-term-readkey with target all
--->  Staging p5-term-readkey into destroot
--->  Installing p5-term-readkey 2.30_0
--->  Activating p5-term-readkey 2.30_0
--->  Cleaning p5-term-readkey
--->  Fetching rsync
--->  Attempting to fetch fileflags.diff from http://rsync.samba.org/ftp/rsync/patches/
--->  Attempting to fetch crtimes.diff from http://rsync.samba.org/ftp/rsync/patches/
--->  Attempting to fetch rsync-3.0.3.tar.gz from http://rsync.samba.org/ftp/rsync/
--->  Verifying checksum(s) for rsync
--->  Extracting rsync
--->  Applying patches to rsync
--->  Configuring rsync
--->  Building rsync with target all
--->  Staging rsync into destroot
--->  Installing rsync 3.0.3_1
--->  Activating rsync 3.0.3_1
--->  Cleaning rsync
--->  Fetching git-core
--->  Attempting to fetch git-1.5.6.2.tar.bz2 from http://www.kernel.org/pub/software/scm/git/
--->  Attempting to fetch git-manpages-1.5.6.2.tar.bz2 from http://www.kernel.org/pub/software/scm/git/
--->  Attempting to fetch git-htmldocs-1.5.6.2.tar.bz2 from http://www.kernel.org/pub/software/scm/git/
--->  Verifying checksum(s) for git-core
--->  Extracting git-core
--->  Applying patches to git-core
--->  Configuring git-core
--->  Building git-core with target all gitweb/gitweb.cgi
--->  Staging git-core into destroot
--->  Installing git-core 1.5.6.2_0+doc+gitweb+svn
--->  Activating git-core 1.5.6.2_0+doc+gitweb+svn
--->  Cleaning git-core

Subversion1.5.0がインストールされたが、特に問題はない。cogitoもインストール

% sudo port install cogito
Password:
--->  Fetching cogito
--->  Attempting to fetch cogito-0.18.2.tar.bz2 from http://kernel.org/pub/software/scm/cogito/
--->  Verifying checksum(s) for cogito
--->  Extracting cogito
--->  Applying patches to cogito
--->  Configuring cogito
--->  Building cogito with target all
--->  Staging cogito into destroot
--->  Installing cogito 0.18.2_1
--->  Activating cogito 0.18.2_1
--->  Cleaning cogito

使えそうかチェック

% git --version
git version 1.5.6.2

OK.