Install Gentoo Prefix
連結
http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-solaris.xml
需求:安裝 Xcode,在 Preference 的 Downloads 項目下,選擇安裝 Command Line Tools。
指定安裝目錄,以及設定 PATH 環境變數
$ export EPREFIX="$HOME/gentoo"
$ export PATH="$EPREFIX/usr/bin:$EPREFIX/bin:$EPREFIX/tmp/usr/bin:$EPREFIX/tmp/bin:$PATH"
下載 bootstrap script http://overlays.gentoo.org/proj/alt/browser/trunk/prefix-overlay/scripts/bootstrap-prefix.sh?format=txt.
執行 stage1 安裝,注意目錄名稱
$ chmod 755 bootstrap-prefix.sh
$ ./bootstrap-prefix.sh $EPREFIX/tmp stage1
在執行時,會顥示出系統的變數。
* host: x86_64-apple-darwin12
若要改用 32位元的環境,可以在執行前設定 CHOST 的環境變數。
export CHOST="i686-apple-darwin12"
不過,很不幸的,無法裝起來。
執行 stage2 和 stage3 安裝,再做 hash。
stage2: bootstrap Portage and its tree
stage3: bootstrap a self-hosted Portage
Finally, doing the final system installation
$ ./bootstrap-prefix.sh $EPREFIX stage2
$ ./bootstrap-prefix.sh $EPREFIX stage3
$ hash -r
$ emerge -e system
Creating a start-script
$ cd $EPREFIX/usr/portage/scripts
$ ./bootstrap-prefix.sh $EPREFIX startscript
After running this, a script startprefix will be present in $EPREFIX. You can freely move the script to e.g. your homedir for convenience. Running the script will drop you into a Prefix shell, where for example emerge is directly at your disposal.
安裝套件時,會碰到有下列訊息。
The following keyword changes are necessary to proceed:
在 emerge 指令,必須使用 --autounmask-write 的選項。然後,執行 etc-update 修改 etc/portage 下的相關檔案。
雖然,有一些軟體能成功的安裝,但大多失敗,只好再去試 MacPorts。