You may have had the same issue as i some time ago. You install a perl module from Portage but you have to modify the module’s code. Of course you don’t want to patch and install manually. Assuming the module is named “foobar” here’s how i solved it:
- Create a Portage Overlay (refer to the official documentation) and enable it in /etc/make.conf
- Create a new category directory within your overlay dir (mkdir /usr/local/portage/my-ebuilds)
- Create application directory (mkdir /usr/local/portage/my-ebuilds/foobar)
- Copy the existing ebuild to the new app directory
- Create a files directory and put the patch there
- Modify the ebuild to apply your patch
... # This is the magic line: PATCHES="${FILESDIR}/my_patch.patch" ...
After you finished these tasks you have to (re)generate the Manifest:
ebuild [OVERLAY_PATH]/my-ebuilds/foobar/foobar-1.0.0.ebuild digest
That’s it. If you have trouble feel free to contact me: daniel@linuxaddicted.de
