[ GentooForMacOS ]
Other Languages
GentooForMacOSFr (Français), GentooForMacOSEs
Other pages on the wiki
- PantherChroot
- PortingTips
- FrequentlyAsked Questions
- ExtLinks
Using Gentoo for MacOS
Gentoo for Mac OS X is Gentoo's Portage running under Mac OS X, it's very new and very Alpha. Portage installs things in / and could possibly overwrite important packages that were installed by Mac OS X. Use this technology at your own risk!
Requirements
To use Gentoo for MacOS, you must have Macintosh OS 10.2 or higher. In addition, you need to have installed the XCode developer tools (version 1.2 or higher) which can be downloaded from the Apple Developer Connection member site.
Installing Portage
First you need to download the Gentoo for Mac OS X dmg installer. It can be found at http://www.metadistribution.org/macos Mount the dmg image (by double clicking on it) and run the installer. After the installer has finished, you will need to open Terminal.app. If you already have Terminal.app open, you will need to open a new shell/window
or this will not work. Also, be aware the using other shells besides bash is unsupported and probably won't work. You can change your default shell by clicking on Terminal->Preferences, chosing the "Execute this command" option and typing:
/bin/bash
Once in a console, you will need to be root to continue, so type "sudo su" and enter your administrator password at the prompt:
alex@powerbook alex $ sudo su Password:
To make sure that you have the latest fixes available, you'll need to perform a sync:
# emerge sync
We now need to tell portage a little about your version of OSX. Portage uses the files in /etc/make.profile to determine what files are installed, which packages are masked and its default configuration options. To set up this link on Panther or Jaguar:
# ln -s /usr/portage/profiles/default-macos-10.3 /etc/make.profileTo set up this link on Tiger:
# ln -s /usr/portage/profiles/default-macos-10.4 /etc/make.profile
Next you will need to emerge the system:
# emerge system
Finally, we need to set up gnu sed because the version of sed that comes with OSX does not support inline edits:
# emerge sedConcerning sed, if you have a problem, read the PortingTips.
Congratulations! Your new Gentoo for Mac OS X installation should be ready to go.
Note: If you get "emerge: command not found": The Gentoo for Mac OSX installer updates the /etc/profile file by adding /usr/lib/portage/bin to your PATH environment variable. In order to simply run "emerge ...", you may need to type "source /etc/profile" or log out and log back in in order to avoid having to type the full path (/usr/lib/portage/bin/<toolname>) to run Portage tools.
Emerging packages:
You should be able to emerge packages that have already been tested and updated to work with macos. Only a very small number of packages are not masked. If an ebuild hasn't had the macos keyword added to it, you will get a message similar to:
powerbook:/Users/alex root# emerge -p cowsay These are the packages that I would merge, in order: Calculating dependencies !! all ebuilds that could satisfy "cowsay" have been masked. !! possible candidates are: - games-misc/cowsay-3.03 (masked by: missing keyword)
To add the macos keyword to an ebuild, you use the ekeyword command (you must
have emerge'd gentoolkit-dev):
# emerge gentoolkit-dev # cd /usr/portage/games-misc/cowsay/ # ekeyword macos cowsay-3.03.ebuild
If the package successfully compiles, please submit a bug (http://bugs.gentoo.org) that notifies us that the package works (you should have macos in the subject/description line of the bug). If it doesn't work, submit a bug that shows us the error you recieve (usually there will be a lot of errors, copy beginning at the first compiler message that looks like an error until the end of the emerge.
You will need to install the X11 Developement files for most packages that need X11. See PackagesThatNeedX11 for Details. You should not try to emerge portage from the ebuilds. There is a workaround for packages that depend on portage, like gentoolkit. See PortageDeps.
Using CVS
The scripts in CVS has problems with case insensitive file systems like HFS, so to checkout the CVS tree you will need to create a UFS image (at least 750MB in size) to check portage out to. You can use the following command to create such a file system:
hdiutil create -size 750m <Imagename> -volname <Volumename> -fs UFS
Alternatively, you can use case-sensitive HFS to check portage out to. The Disk Utility that ships with Mac OS X client doesn't allow you to create a case-sensitive HFS file system, so you can use the following command to create
one:
hdiutil create -size 750m <Imagename> -volname <Volumename> -fs HFSX
Uninstalling Gentoo for Mac OS X
To uninstall Gentoo for Mac OS X, you can use the uninstall perl script (http://dev.gentoo.org/~alexander/files/uninstall.pl) which lets you choose whether or not you would like to unmerge the packages you installed with Gentoo for MacOS. Run the script as root:
perl uninstall.pl
Advanced topics
The newest Gentoo for MacOS installer features collision protection which prevents portage from overwriting files that it does not own. You can turn this off with the USE flag FEATURES="-collision-protection". For example (this is dangerous, do this at your own risk):
#FEATURES="-collision-protection" emerge autoconf
Gentoo for MacOS development teams
Project management
- Technical manager: pvdabeel
- Ops manager: dostrow
Documentation (incl. project page):
- Leader: alexander
- Members: alexander, dostrow, schlesi
- French translation: iznogoud
- Comments: alexander sets up a Wiki for documentation.
- More: When editing a page, please notify iznogoud (iznogoud_at_dlfp.org) so the translations can be updated.
Testing ebuilds:
- Leaders: j4rg0n, gongloo
- Members: j4rg0n, gongloo, liquidx, bubi
Portage:
- Leader: liquidx
- Members: liquidx, twk-b
GUI Team:
- Leader: not defined, candidates: hansmi, dostrow
- Members: hansmi, dostrow, twk-b
- Comments: There was a graphical installer, named iportage, written by ct. Putting metadata-support into the installer and system preferences for packages, like mySQL, was suggested.