今回は備忘録も兼ねて、前回の記事で紹介しきれなかった
MacPorts利用のTipsについて扱います。
依存関係を調べる
$ sudo port deps gcc48 Full Name: gcc48 @4.8.1_3 Library Dependencies: gmp, mpfr, libiconv, libmpc, cloog, libgcc Runtime Dependencies: gcc_select, ld64, cctools 172-1-1-21:macports shironoryouta$ port installed The following ports are currently installed: cctools @839_2+llvm33 (active) cctools-headers @839_0 (active) cloog @0.18.0_0 (active) gcc48 @4.8.1_3 (active) gcc_select @0.1_8 (active) gmp @5.1.2_0 (active) isl @0.12_0 (active) ld64 @136_2+llvm33 (active) libffi @3.0.13_0 (active) libgcc @4.8.1_3 (active) libiconv @1.14_0 (active) libmpc @1.0.1_0 (active) llvm-3.3 @3.3_1 (active) llvm_select @0.2_0 (active) mpfr @3.1.1-p2_0 (active)
導入したモノを確認。
以下の例はgccの場合
$ port select --list gcc Available versions for gcc: llvm-gcc42 mp-gcc48 none (active)
アンインストール
gcc48を消したい場合は
$ sudo port -f uninstall gcc48
MacPortsそのものと、インストール済みのモノをアンインストールしたい場合は
気の利いた抹殺コマンドなどないので力技で
$ sudo port -fp uninstall --follow-dependents installed sudo rm -rf \ /opt/local \ /Applications/DarwinPorts \ /Applications/MacPorts \ /Library/LaunchDaemons/org.macports.* \ /Library/Receipts/DarwinPorts*.pkg \ /Library/Receipts/MacPorts*.pkg \ /Library/StartupItems/DarwinPortsStartup \ /Library/Tcl/darwinports1.0 \ /Library/Tcl/macports1.0 \ ~/.macports
導入時に以下のようなPATHを設定した場合はそれも念のため削除
export PATH=/opt/local/bin:/opt/local/sbin:$PATH