aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Loeser <halcy0n@gentoo.org>2006-03-19 08:37:56 +0000
committerMark Loeser <halcy0n@gentoo.org>2006-03-19 08:37:56 +0000
commit004ec650689d413b383d7ceec51b7c128214315e (patch)
treeb6fe90279ea3ead4dba2e9d29c9559ba2d70ec5f /function-reference
parentAdd src_compile, fix valigns. (diff)
downloaddevmanual-004ec650689d413b383d7ceec51b7c128214315e.tar.gz
devmanual-004ec650689d413b383d7ceec51b7c128214315e.tar.bz2
devmanual-004ec650689d413b383d7ceec51b7c128214315e.zip
Function and eclass references are done. I changed some of the eclass stuff where arguments were specified so it is more readable, in my opinion
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/devmanual/trunk@26 176d3534-300d-0410-8db8-84e73ed771c3
Diffstat (limited to 'function-reference')
-rw-r--r--function-reference/build-functions/text.xml58
-rw-r--r--function-reference/install-functions/text.xml360
-rw-r--r--function-reference/message-functions/text.xml109
-rw-r--r--function-reference/query-functions/text.xml115
-rw-r--r--function-reference/sandbox-functions/text.xml70
-rw-r--r--function-reference/text.xml26
6 files changed, 738 insertions, 0 deletions
diff --git a/function-reference/build-functions/text.xml b/function-reference/build-functions/text.xml
new file mode 100644
index 0000000..ec5e33d
--- /dev/null
+++ b/function-reference/build-functions/text.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<guide self="function-reference/build-functions/">
+<chapter>
+<title>Build Functions Reference</title>
+
+<body>
+
+<p>
+The following functions, which are all provided by <c>ebuild.sh</c>, are useful
+during the unpack and compile stages.
+</p>
+
+<table>
+ <tr>
+ <th>
+ Function
+ </th>
+ <th>
+ Details
+ </th>
+ </tr>
+ <tr>
+ <ti>
+ <c>unpack archives</c>
+ </ti>
+ <ti>
+ Unpack the specified archives.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>econf args</c>
+ </ti>
+ <ti>
+ Wrapper for <c>./configure</c>. Passes on all <c>args</c>.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>emake args</c>
+ </ti>
+ <ti>
+ Wrapper for <c>make</c>. Passes on all <c>args</c>.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>einstall args</c>
+ </ti>
+ <ti>
+ Wrapper for <c>make install</c>, only to be used if <c>make DESTDIR="${D}"</c> is unsuitable.
+ </ti>
+ </tr>
+</table>
+
+</body>
+</chapter>
+</guide>
diff --git a/function-reference/install-functions/text.xml b/function-reference/install-functions/text.xml
new file mode 100644
index 0000000..a884acd
--- /dev/null
+++ b/function-reference/install-functions/text.xml
@@ -0,0 +1,360 @@
+<?xml version="1.0"?>
+<guide self="function-reference/install-functions/">
+<chapter>
+<title>Install Functions Reference</title>
+<body>
+
+<p>
+The following functions, which are all provided <c>ebuild.sh</c> and the standard
+library, handle various install-related tasks. <c>${D}</c> is automatically handled
+for all of these functions.
+</p>
+
+<table>
+ <tr>
+ <th>
+ Function
+ </th>
+ <th>
+ Details
+ </th>
+ </tr>
+ <tr>
+ <ti>
+ <c>insinto</c>
+ </ti>
+ <ti>
+ Change install location for <c>doins</c>, <c>newins</c> etc
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>exeinto</c>
+ </ti>
+ <ti>
+ Change install location for <c>doexe</c>, <c>newexe</c> etc
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>docinto</c>
+ </ti>
+ <ti>
+ Change install location for <c>dodoc</c>, <c>newdoc</c> etc
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>insopts</c>
+ </ti>
+ <ti>
+ Specify arguments passed to <c>install</c> (eg <c>-s</c>, <c>-m644</c>).
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>diropts</c>
+ </ti>
+ <ti>
+ Specify arguments passed to <c>install</c> for directories
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>exeopts</c>
+ </ti>
+ <ti>
+ Specify arguments passed to <c>install</c> for executables
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>libopts</c>
+ </ti>
+ <ti>
+ Specify arguments passed to <c>install</c> for libraries
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dobin</c>
+ </ti>
+ <ti>
+ Install a binary
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doconfd</c>
+ </ti>
+ <ti>
+ Install an <c>/etc/conf.d</c> file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dodir</c>
+ </ti>
+ <ti>
+ Install a directory
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dodoc</c>
+ </ti>
+ <ti>
+ Install a documentation file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doenvd</c>
+ </ti>
+ <ti>
+ Install an <c>/etc/env.d</c> file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doexe</c>
+ </ti>
+ <ti>
+ Install an executable
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dohard</c>
+ </ti>
+ <ti>
+ Create a hardlink to the first argument from the second argument
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dohtml</c>
+ </ti>
+ <ti>
+ Install an HTML documentation file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doinfo</c>
+ </ti>
+ <ti>
+ Install a GNU Info document
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doinitd</c>
+ </ti>
+ <ti>
+ Install an <c>/etc/init.d</c> file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doins</c>
+ </ti>
+ <ti>
+ Install a miscellaneous file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dojar</c>
+ </ti>
+ <ti>
+ Install a <c>.jar</c> file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dolib</c>
+ </ti>
+ <ti>
+ Install a library file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dolib.a</c>
+ </ti>
+ <ti>
+ Install a library (<c>.a</c>) file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dolib.so</c>
+ </ti>
+ <ti>
+ Install a library (shared object) file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>doman</c>
+ </ti>
+ <ti>
+ Install a man page
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>domo</c>
+ </ti>
+ <ti>
+ Install a Gettext <c>.mo</c> file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dopython</c>
+ </ti>
+ <ti>
+ Install a Python file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dosbin</c>
+ </ti>
+ <ti>
+ Install an <c>sbin/</c> file
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>dosym</c>
+ </ti>
+ <ti>
+ Create a symlink from the second parameter to the first parameter
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>fowners</c>
+ </ti>
+ <ti>
+ Call <c>chown</c> with the first argument as the mode on all additional arguments.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>fperms</c>
+ </ti>
+ <ti>
+ Call <c>chown</c> with the first argument as the user on all additional arguments.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>keepdir</c>
+ </ti>
+ <ti>
+ Create a directory with an empty <c>.keep</c> file in it.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newbin</c>
+ </ti>
+ <ti>
+ Install a binary using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newconfd</c>
+ </ti>
+ <ti>
+ Install an <c>/etc/conf.d</c> entry using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newdoc</c>
+ </ti>
+ <ti>
+ Install a documentation file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newenvd</c>
+ </ti>
+ <ti>
+ Install an <c>/etc/env.d</c> file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newexe</c>
+ </ti>
+ <ti>
+ Install an executable file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newinitd</c>
+ </ti>
+ <ti>
+ Install an <c>/etc/init.d</c> file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newins</c>
+ </ti>
+ <ti>
+ Install a miscellaneous file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newlib.a</c>
+ </ti>
+ <ti>
+ Install a <c>.a</c> library file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newlib.so</c>
+ </ti>
+ <ti>
+ Install a <c>.so</c> library file using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newman</c>
+ </ti>
+ <ti>
+ Install a manual page using the second argument as the name.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>newsbin</c>
+ </ti>
+ <ti>
+ Install an <c>sbin</c> file using the second argument as the name.
+ </ti>
+ </tr>
+</table>
+
+<p>
+The <c>do*</c> functions, when given multiple arguments, will work upon multiple
+targets. The <c>new*</c> functions take exactly two arguments (except as noted) <d />
+the first is the source name, the second the name to use when installing.
+</p>
+
+</body>
+</chapter>
+</guide>
diff --git a/function-reference/message-functions/text.xml b/function-reference/message-functions/text.xml
new file mode 100644
index 0000000..d702264
--- /dev/null
+++ b/function-reference/message-functions/text.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<guide self="function-reference/message-functions/">
+<chapter>
+<title>Message Functions Reference</title>
+<body>
+
+<p>
+The following functions, which are provided by <c>functions.sh</c>, can be used for
+displaying informational messages.
+</p>
+
+<table>
+ <tr>
+ <th>
+ Function
+ </th>
+ <th>
+ Details
+ </th>
+ </tr>
+ <tr>
+ <ti>
+ <c>einfo</c>
+ </ti>
+ <ti>
+ Display an informational message.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>einfon</c>
+ </ti>
+ <ti>
+ Display an informational message with no trailing newline.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>ewarn</c>
+ </ti>
+ <ti>
+ Display a warning message.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>eerror</c>
+ </ti>
+ <ti>
+ Display an error message.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>ebegin</c>
+ </ti>
+ <ti>
+ Display the message for the start of an action block.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>eend</c>
+ </ti>
+ <ti>
+ Display the end of an action block.
+ </ti>
+ </tr>
+</table>
+
+<p>
+The following are available from <c>eutils.eclass</c>:
+</p>
+
+<table>
+ <tr>
+ <th>
+ Function
+ </th>
+ <th>
+ Details
+ </th>
+ </tr>
+ <tr>
+ <ti>
+ <c>epause</c>
+ </ti>
+ <ti>
+ Pause for the specified number (must be a positive integer) of seconds.
+ Defaults to a sane value.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>ebeep</c>
+ </ti>
+ <ti>
+ Beep the specified number (must be a positive integer) of times. Defaults to a sane value.
+ </ti>
+ </tr>
+</table>
+
+<p>
+See <uri link="::ebuild-writing/messages"/> for a detailed discussion.
+</p>
+
+</body>
+</chapter>
+</guide>
diff --git a/function-reference/query-functions/text.xml b/function-reference/query-functions/text.xml
new file mode 100644
index 0000000..51da5c2
--- /dev/null
+++ b/function-reference/query-functions/text.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<guide self="function-reference/query-functions/">
+<chapter>
+<title>Query Functions Reference</title>
+<body>
+
+<p>
+The following functions, which are provided by <c>ebuild.sh</c>, can be used to
+query variables and similar state.
+</p>
+
+<table>
+ <tr>
+ <th>
+ Function
+ </th>
+ <th>
+ Details
+ </th>
+ </tr>
+ <tr>
+ <ti>
+ <c>use flagname</c>
+ </ti>
+ <ti>
+ Returns a true value if and only if <c>flagname</c> is included in <c>USE</c>
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>useq flagname</c>
+ </ti>
+ <ti>
+ As <c>use</c>, guaranteed to produce no output.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>usev flagname</c>
+ </ti>
+ <ti>
+ As <c>use</c>, echoes <c>flagname</c> upon success.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>use_enable flag str</c>
+ </ti>
+ <ti>
+ Echoes either <c>--enable-str</c> or <c>--disable-str</c> depending upon <c>useq flag</c>.
+ If <c>str</c> is not specified, uses <c>flag</c> instead.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>use_with flag str</c>
+ </ti>
+ <ti>
+ As <c>use_enable</c>, but <c>--with-</c> or <c>without-</c>.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>has flag string</c>
+ </ti>
+ <ti>
+ Returns true if <c>flag</c> is included in the flag list <c>string</c> (example:
+ <c>if has ccache $FEATURES ; then</c>).
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>hasq flag string</c>
+ </ti>
+ <ti>
+ As <c>has</c>, guaranteed quiet.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>hasv flag string</c>
+ </ti>
+ <ti>
+ As <c>has</c>, echoes <c>flag</c> on success.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>portageq</c>
+ </ti>
+ <ti>
+ Wrapper for <c>portageq</c>
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>best_version pkg</c>
+ </ti>
+ <ti>
+ Echoes the 'best' version of <c>pkg</c> which is currently installed.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>has_version pkg</c>
+ </ti>
+ <ti>
+ True if <c>pkg</c> (can include version specifiers) is installed.
+ </ti>
+ </tr>
+</table>
+
+</body>
+</chapter>
+</guide>
diff --git a/function-reference/sandbox-functions/text.xml b/function-reference/sandbox-functions/text.xml
new file mode 100644
index 0000000..557210f
--- /dev/null
+++ b/function-reference/sandbox-functions/text.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<guide self="function-reference/sandbox-functions/">
+<chapter>
+<title>Sandbox Functions Reference</title>
+<body>
+
+<p>
+The following functions, which are all provided by <c>ebuild.sh</c>, handle working
+with the sandbox.
+</p>
+
+<table>
+ <tr>
+ <th>
+ Function
+ </th>
+ <th>
+ Details
+ </th>
+ </tr>
+ <tr>
+ <ti>
+ <c>addread</c>
+ </ti>
+ <ti>
+ Add one single additional item to the sandbox allowed read list.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>addwrite</c>
+ </ti>
+ <ti>
+ Add one single additional item to the sandbox allowed write list. <b>Note</b>:
+ If at all possible, use <c>addpredict</c> instead. Using <c>addwrite</c> is <b>not</b> an
+ appropriate alternative to making your package build sandbox-friendly.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>adddeny</c>
+ </ti>
+ <ti>
+ Add one single additional item to the sandbox deny write list.
+ </ti>
+ </tr>
+ <tr>
+ <ti>
+ <c>addpredict</c>
+ </ti>
+ <ti>
+ Add one single additional item to the sandbox predict (pretend to allow write) list.
+ </ti>
+ </tr>
+</table>
+
+<p>
+None of these functions accept multiple arguments in one call. The sandbox is
+recursive, so to allow predicted writes to <c>/foo/bar</c> and <c>/foo/baz</c>,
+<c>addpredict /foo</c> would be sufficient.
+</p>
+
+<p>
+See <uri link="::general-concepts/sandbox"/> for details on how the sandbox works.
+See `Handling Access Violations`_ for how to handle sandbox-related build problems.
+</p>
+
+</body>
+</chapter>
+</guide>
diff --git a/function-reference/text.xml b/function-reference/text.xml
new file mode 100644
index 0000000..336321d
--- /dev/null
+++ b/function-reference/text.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<guide self="function-reference/">
+<chapter>
+<title>Function Reference</title>
+
+<body>
+<p>
+The following functions are available for use in ebuilds:
+</p>
+</body>
+
+<section>
+<title>Contents</title>
+<body>
+<contentsTree/>
+</body>
+</section>
+</chapter>
+
+<include href="build-functions/"/>
+<include href="install-functions/"/>
+<include href="message-functions/"/>
+<include href="query-functions/"/>
+<include href="sandbox-functions/"/>
+
+</guide>