Discussion:
Portage - how to edit source code?
(too old to reply)
Bartosz Chodorowski
2006-10-31 13:31:25 UTC
Permalink
Hello group,

I would like to use portage to download source code of some program,
then edit its source and compile and install. How can I do it? TIA.
--
Bartosz 'chomzee' Chodorowski http://chomzee.bandyta.pl/
My GnuPG key is available here: http://chomzee.bandyta.pl/chomzee-gnupg.asc
Pawel Kraszewski
2006-10-31 14:12:12 UTC
Permalink
Post by Bartosz Chodorowski
Hello group,
I would like to use portage to download source code of some program,
then edit its source and compile and install. How can I do it? TIA.
1. Download source with "emerge -f packagename"
2. Unpack source with "ebuild /path/to/package.ebuild unpack"
3. Copy unpacked (and probably gentoo-patched) version into /tmp
4. Edit copy in /tmp
5. Make a diff file between your version and original
6. Make a new ebuild in overlay directory incorporating your patch after
gentoo patches (if any). Name it with suffix -p0 (-p1 and so on for
successive versions of patch). So category/package-10.0.ebuild turns into
category/package-10.0-p0.ebuild and so on.


For #2 - man ebuild
For #3 - the files will be in /var/tmp/portage/<category>/<package>/work
For #5 - man diff, especially for "unified" format.
For #6 - find and inspect some .ebuild files with patches (so ending
with -p<number>.ebuild)
--
Pawel Kraszewski
www.kraszewscy.net
Loading...