Sounds great hm? YES, it is - and it is possible :D
Since being under MacOSX (as you can read in my other
article) the package management, especially for CLI programs, really annoyed me. On the second day of my MacOSX life I wanted to install "latex" and I found multiple opportunities (fink, darwinports, i-installer)... Using multiple packaging systems didn't really satisfy me.
My favorite packaging system is gentoo-portage and my first steps ended in a "Parallels" installation which ran fine but wasn't too comfortible aside from consuming lots of CPU... So I ended up installing a Gentoo-MacOSX dualboot-system with "refit". Unfortunetely the hardware support for my MacBook is not that good and important things (for me at least) like sleeping/hibernating, wlan and dualheed did not work.
So I continued and downloaded a gentoo-stage archive hoping to use it in a chroot-environment which made me realize that MacOSX is not able to execute ELF binaries :D
Today I searched around and found an already existing project called
Gentoo Prefixed Portage (
NOTE: There are some other projects but this is the one I read further and I think it is the best one at the moment). I read around and got the impression that this project is in a pretty early stage and quite unusable. So I started contacting developers to find out more and it turned out that it is already working!!!!
Following this
step-by-step guide I was able to setup the environment (
NOTE: For all having a symlink from /Users to /Volumes/Home: $EPREFIX should be setted to /Volumes/Home/<your_path_to_portage> - otherwise unexpected errors may occur!)
To ensure a little more comfort I added this to my ~/.bashrc (or .bash_profile):
export EPREFIX="/Volumes/Home/swalkner/Gentoo"
export PATH=~/bin:$EPREFIX/usr/bin:$EPREFIX/bin:~/Gentoo/usr/portage/scripts:$PATH
alias unmerge="CONFIG_PROTECT=\"\" emerge -C"
NOTE: Because of having the portage paths before the "default" MacOSX paths the gentoo programs will be used if existing rather than the MacOSX binaries! Take "ls" for example. But this is a good thing :D. Imagine finally having vim-7 etc...
In $EPREFIX/usr/portage/scripts is a nice little script (made by
genstef who helped me a lot doing my first steps with this project - thx again!!) called "ecopy". I made a local portage overlay in $EPREFIX/usr/local/portage (add the path to the PORTDIR_OVERLAY variable in $EPREFIX/etc/make.conf) and whenever a package is missing in the official prefix-tree just type (in the overlay of course):
ecopy <category>/<packagename>
So the necessary ebuild files are downloaded. Recreate the digest:
ebuild <category>/<packagename>/<packagename-version.ebuild> digest
And the package is ready for being emerged :D and I had no problems so far...
The prefix-team is working hard on finally getting the prefix-API being added to the official portage-tree which would allow an even greater variety of ebuilds!
So much for now... Any questions will be certainly answered in the irc.freenode.net channel #gentoo-alt...