Home > gentoo > Portage overlay example under Gentoo 2007.0

Portage overlay example under Gentoo 2007.0

November 25th, 2007 admin Leave a comment Go to comments

In this example I am applying the PGP-verbose-MIME patch to Mutt 1.5.16:

# first search portage for the package name
emerge -s mutt

this returns the following block:
* mail-client/mutt
Latest version available: 1.5.16
Latest version installed: 1.5.16
Size of files: 3,558 kB
Homepage: http://www.mutt.org
Description: a small but very powerful text-based mail client
License: GPL-2
where ‘mail-client/mutt’ is the package name.

# create overlay directory using the above package name
mkdir -p /usr/local/portage/mail-client/mutt

# from this point onwards the commands are relative to
/usr/local/portage/mail-client/mutt so change to this directory
cd /usr/local/portage/mail-client/mutt

# copy ebuild script & portage files to overlay directory
cp /usr/portage/mail-client/mutt/mutt-1.5.16.ebuild ./
cp -R /usr/portage/mail-client/mutt/files ./

# copy patch to newly copied ‘files’ directory -
patch in this example: /src_dir/patch-1.5.4.vk.pgp_verbose_mime
cp /src_dir/patch-1.5.4.vk.pgp_verbose_mime ./files

# create an ebuild digest – checksums the content of ‘files’
ebuild mutt-1.5.16.ebuild digest

# edit mutt-1.5.16.ebuild & add epatch intruction
nano -w mutt-1.5.16.ebuild

# first ensure that the following is included at top of the file
inherit eutils

# in the src_unpack() {} function add a new epatch instruction
and save changes – in this case
epatch “${FILESDIR}”/patch-1.5.4.vk.pgp_verbose_mime

# delete any previous builds from the cache with
/var/tmp/portage/mail-client/mutt-1.5.16

# finally, run the following commands in sequence
ebuild mutt-1.5.16.ebuild fetch
ebuild mutt-1.5.16.ebuild unpack
ebuild mutt-1.5.16.ebuild compile
ebuild mutt-1.5.16.ebuild install
ebuild mutt-1.5.16.ebuild qmerge

That’s it: the patch should now be applied.

With mutt you can check this with the mutt -v command.

The mutt patch was downloaded from:
http://www.doorstop.net/mutt/patch-1.5.4.vk.pgp_verbose_mime

Categories: gentoo Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.