From 12c930bc3fb7e49b4ab45792284a85c5846ca80b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 3 Sep 2008 21:27:21 +0000 Subject: [PATCH] Add a new "EAPI 2 Draft" section which unifies the content of the EAPI 2_pre* sections. svn path=/main/trunk/; revision=11487 --- doc/package/ebuild/eapi/2.docbook | 291 +++++++++++++++++++++++++++++- 1 file changed, 285 insertions(+), 6 deletions(-) diff --git a/doc/package/ebuild/eapi/2.docbook b/doc/package/ebuild/eapi/2.docbook index 20f7434df..b2f9e4127 100644 --- a/doc/package/ebuild/eapi/2.docbook +++ b/doc/package/ebuild/eapi/2.docbook @@ -274,15 +274,294 @@ src_compile() { -
- EAPI 2_pre3 -
+
+ EAPI 2 Draft +
+ Helpers +
+ doman + + Language codes in file names are now used for path translation. + + Man Page Path Translation + + + + + + Source + Destination + + + + + foo.1 + /usr/share/man/man1/foo.1 + + + foo.lang.1 + /usr/share/man/lang/man1/foo.1 + + + +
+
+
+
+ USE Dependencies +
+ Unconditional USE Dependencies + Syntax Examples + + + + + + Example + Meaning + + + + + foo[bar] + foo must have bar enabled + + + foo[bar,baz] + foo must have both bar and baz enabled + + + foo[-bar,baz] + foo must have bar disabled and baz enabled + + + +
+
+
+ Conditional USE Dependencies + Syntax Examples + + + + + + Compact Form + Equivalent Expanded Form + + + + + foo[bar?] + bar? ( foo[bar] ) !bar? ( foo ) + + + foo[!bar?] + bar? ( foo ) !bar? ( foo[-bar] ) + + + foo[bar=] + bar? ( foo[bar] ) !bar? ( foo[-bar] ) + + + foo[!bar=] + bar? ( foo[-bar] ) !bar? ( foo[bar] ) + + + +
+
+
+
Phases -
+
New src_prepare Phase Function - A new src_prepare function is called in-between the src_unpack and - src_configure functions, with cwd initially set to $S. + A new src_prepare function is called after the src_unpack + function, with cwd initially set to $S. + +
+
+ New src_configure Phase Function + + The configure portion of the src_compile function has been + split into a separate function which is named src_configure. The + src_configure function is called in-between the src_prepare and + src_compile functions. + + +src_configure() { + if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then + econf + fi +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ] ; then + emake || die "emake failed" + fi +} + +
+
+ Execution Order of Phase Functions + Execution Order of Phase Functions + + + + + Phase Function Name + + + + + pkg_setup + + + src_unpack + + + src_prepare + + + src_configure + + + src_compile + + + src_test + + + src_install + + + pkg_preinst + + + pkg_postinst + + + pkg_prerm + + + pkg_postrm + + + +
+
+
+ Default Phase Functions + + The default pkg_nofetch and src_* phase functions are now + accessible via a function having a name + that begins with default_ and + ends with the respective phase function name. For example, + a call to a function with the name default_src_compile is + equivalent to a call to the default src_compile + implementation. + + Default Phase Functions + + + + + Function Name + + + + + default_pkg_nofetch + + + default_src_unpack + + + default_src_prepare + + + default_src_configure + + + default_src_compile + + + default_src_test + + + +
+ + The default phase functions for a particular EAPI are also + accessible as functions having names that start with 'eapi' + followed by the EAPI value. For example, a call to a function + named eapi0_src_compile is equivalent to a call to the + default src_compile implementation that is provided with EAPI 0. + + Default EAPI Phase Functions + + + + + Function Name + + + + + eapi0_pkg_nofetch + + + eapi0_src_unpack + + + eapi0_src_compile + + + eapi0_src_test + + + eapi1_pkg_nofetch + + + eapi1_src_unpack + + + eapi1_src_compile + + + eapi1_src_test + + + eapi2_pkg_nofetch + + + eapi2_src_unpack + + + eapi2_src_prepare + + + eapi2_src_configure + + + eapi2_src_compile + + + eapi2_src_test + + + +
+
+
+ Default Phase Function Alias + + A function named "default" is redefined for each phase so that it + will call the default_* function corresponding to the current phase. + For example, a call to the function named "default" during the + src_compile phase is equivalent to a call to the function named + default_src_compile.
-- 2.26.2