Project:Prefix/ecopy

How to import ebuilds from main Gentoo into Gentoo Prefix

Introduction
Ebuilds for Gentoo Prefix need some minor modifications from those that exist in the "regular" Gentoo tree (known as the gentoo-x86 tree). Spelling out those modifications is out of scope for this document, feel free to browse here: http://www.gentoo.org/proj/en/gentoo-alt/prefix/techdocs.xml

The ecopy script
is a script created by the Gentoo Prefix team, and located in. Its intention is to save people time and is mainly a wrapper for other scripts which will be discussed later. Its usage can be described by running:  (without options).

expects the following:


 * Expects to be ran from the root of your overlay If you do not know about overlays then please see: http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap6.
 * Expects to have one and only one valid category and package as an argument. It should be in the form of "/" ie..
 * Expects an up-to-date Prefix tree to reliably have the latest scripts.

The use of  is best explained by a simple example.

ecopy example

What is  doing? In that above code snippet,  first directly downloads the required files from. Then,  runs   on the ebuild. basically does the needed gentoo-x86 -> Prefix conversion. This can generally be automated and works right the first time about 85% of the time. After , some keyword cleanup is done by   to make it match the Prefix keywords. The Prefix keywords are more strictly defined than those of the gentoo-x86 tree. For more information on that see GLEP 53. Last,  re-digests the ebuild to accommodate any changes. Let it be known that you can do all this manually as well because  is just a wrapper script in itself.

While  (the tool that does the actual transformation of the ebuild) succeeds doing its job in many cases, it cannot be trusted to always do the right thing. Common mistakes made by  are related to either adding or omission of the   for some component in the ebuild. doesn't catch all instances of what needs to be changed. If there is e.g. any path hardcoded in the configure call you will need to prepend  to it. Also,  can be improperly expanded to   in certain cases. Manual review is always necessary. For more details on these issues see the Ebuild modifications chapter of the Gentoo Prefix Techdocs page.

Bug Reporting
Great, your package works...now what? The Gentoo Prefix team relies on users submitting bug reports stating if a new package works. We simply do not have the man power to get to our goal of having most of the packages in the Prefix tree without your help.

When submitting bug reports, please follow these guidelines:


 * Use the "Gentoo/Alt" Product with the "Prefix Support" component.
 * Include the method of your porting efforts. Did you use ecopy, manually, etc.
 * Include which changes you made *after* ecopy, preferably using a diff -u
 * Include which patches you added, preferably attached uncompressed, not bundled with anything else.
 * Include emerge --info, or at least what ARCH you are on. Otherwise, we will commit the package and have to re-visit it to add your arch.
 * Do not submit reports about  not porting your package correctly, it is a best effort script only! Manual work probably is needed.

Acknowledgements
We would like to thank the following authors and editors for their contributions to this guide:


 * Jeremy Olexa