summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/notes.txt')
-rw-r--r--eclass/notes.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/eclass/notes.txt b/eclass/notes.txt
new file mode 100644
index 000000000000..3d02ac14479c
--- /dev/null
+++ b/eclass/notes.txt
@@ -0,0 +1,32 @@
+Notes about moving deps from ebuilds into eclasses
+--------------------------------------------------
+
+1. eclasses may define depends, but they sually do so without mentioning specific versions. The kde eclass depends on
+x11-libs/qt-x11. howevr kde 2.2.1 depends on >=qt-x11-2.3.0, whih will have to be specified in the kdelibs ebuild.
+The same applies to dependnig on kdelibs. the kde eclass includes a kdelibs dep, yet nearly all kde apps inheriting from
+it are forced to specify it again with a minimal version. Expect a kde-base eclass in the near future which will inherit from
+kde and be better suited for kde-base/* ebuilds of a specific kde version.
+
+2. More about depends of eclasses. Since kdelibs depends on qt and kde app foo depends on kdelibs, there is no need for foo
+to explicitly require qt, just kdelibs. However we now move the qt depend from the kdelibs ebuild to the kde eclass, which is
+inherited by both kdelibs and foo. So that they both depend on qt explicitly. This shouldn't be a problem, but it is a
+change from the current situation.
+
+3. Most euilds don't define deps which they need such as gcc, glibc, ld.so, autoconf/make, gzip/bzip2/unzip/tar for extracting
+the source archives. It'd be nice to have eclasses defnie all these common deps, but it will make some unneeded deps show up
+in some cases. For now I have the c eclass and the autoonf eclass, but these are more for testing of multiple inheritance
+than for any real use.
+
+
+Notes for writig inheritig eclasses
+-----------------------------------
+1. Make sure to extend your variables and functions, not relpace them. In particular always use DEPEND=$DEPEND"..."
+and the same for RDEPEND.
+2. Remember to inherit virtual first, to EXPORT_FUNCTIONS and then to extend your functions.
+3. Problem:
+kde originally inherited base,c,autoconf. Of these three only base defines any functions, so you'd think the base functions
+are the ones kde gets by default. However, because base, c and autoconf all inherit from virtual, they do, in fact,
+implement empty funcions. So, if kde inherits base,c,autoconf in that order, it gets the virtual functions. This isn't
+what we want, so kde should inherit base last.
+In fact, kde should also inheit virtual first, like all eclasses, but that's a formality.
+BEWARE OF MULTIPLE INHERITANCE, ESPECIALLY IN EBUILDS!