Using custom ebuilds with Gentoo Linux

In some cases you may want to install software in Gentoo Linux that is not available in the Portage tree or any software overlay. This page briefly outlines how to use such a custom ebuild and where to obtain obsolete Gentoo ebuilds.

Use a custom ebuild

  • Set up local portage tree, e.g.:
    mkdir /usr/local/portage
  • Add it to make.conf:
    PORTDIR_OVERLAY="/usr/local/portage"
  • Create a subdir using the same layout as the main portage tree in /usr/portageand copy your ebuild there:
    /usr/local/portage/category/program/program-version.ebuild
  • Change to the ebuild directory and check whether the ebuild contains any patches, etc.:
    grep FILESDIR *.ebuild
  • If so, copy them from the portage tree:
    cp -pr /usr/portage/category/program/files /usr/local/portage/category/program/
  • Read the ebuild, see if it makes sense and can be run with root permissions
  • Create the manifest:
    ebuild file.ebuild manifest

    This will also download the source

  • If you use eix, update its database:
    update-eix
  • Check whether you need to (un)mask packages (in /etc/portage/package.keyword) and emerge the package as usual
    emerge -va category/program-version
  • For much more detail, see the Third-party ebuilds howto on the Gentoo Wiki Archives

Obtain discarded Gentoo ebuilds

  • Go to the Gentoo CVS Attic
  • Click your way through the tree to the package you’re looking for
  • At the top of the page, after Files shown: <nn>, click on (Show <nn> dead files)
  • You might also need patches et cetera from the files subdirectory
Advertisements
This entry was posted in All, Software and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s