Source useflag
From Gentoo Linux Wiki
| Definitions • Listings • Licenses • Other |
[edit] Implementing the source useflag
Since IDE's like Eclipse and Netbeans allow it to attach the source code if applications as a zip file, we're going to add support for the source useflag to nearly all java based ebuilds. To make integrating easier for us, we have a little eclass function called dosrc. If you want to integrate support for the source useflag into an ebuild, you have to do the following things:
- Make sure you inherit from the java-pkg eclass
- Add the source useflag to IUSE
- Add a conditional compile time dependency for zip to DEPEND: source? ( app-arch/zip )
- Call java-pkg_dosrc in src_compile(), make sure the source directory exists: java-pkg_dosrc src/java/*, java-pkg_dosrc src/*, etc
This is a great improvement and since it's very easy to implement into ebuild this should be added to every ebuild of the java herd.
