diff options
author | 2006-03-19 08:37:56 +0000 | |
---|---|---|
committer | 2006-03-19 08:37:56 +0000 | |
commit | 004ec650689d413b383d7ceec51b7c128214315e (patch) | |
tree | b6fe90279ea3ead4dba2e9d29c9559ba2d70ec5f | |
parent | Add src_compile, fix valigns. (diff) | |
download | devmanual-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
-rw-r--r-- | eclass-reference/bash-completion.eclass/text.xml | 47 | ||||
-rw-r--r-- | eclass-reference/cvs.eclass/text.xml | 11 | ||||
-rw-r--r-- | eclass-reference/eutils.eclass/text.xml | 220 | ||||
-rw-r--r-- | eclass-reference/fdo-mime.eclass/text.xml | 41 | ||||
-rw-r--r-- | eclass-reference/flag-o-matic.eclass/text.xml | 119 | ||||
-rw-r--r-- | eclass-reference/rpm.eclass/text.xml | 78 | ||||
-rw-r--r-- | eclass-reference/subversion.eclass/text.xml | 143 | ||||
-rw-r--r-- | eclass-reference/text.xml | 29 | ||||
-rw-r--r-- | function-reference/build-functions/text.xml | 58 | ||||
-rw-r--r-- | function-reference/install-functions/text.xml | 360 | ||||
-rw-r--r-- | function-reference/message-functions/text.xml | 109 | ||||
-rw-r--r-- | function-reference/query-functions/text.xml | 115 | ||||
-rw-r--r-- | function-reference/sandbox-functions/text.xml | 70 | ||||
-rw-r--r-- | function-reference/text.xml | 26 | ||||
-rw-r--r-- | text.xml | 2 |
15 files changed, 1428 insertions, 0 deletions
diff --git a/eclass-reference/bash-completion.eclass/text.xml b/eclass-reference/bash-completion.eclass/text.xml new file mode 100644 index 0000000..cc183e2 --- /dev/null +++ b/eclass-reference/bash-completion.eclass/text.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/bash-completion.eclass/"> +<chapter> +<title><c>bash-completion.eclass</c> Reference</title> +<body> + +<p> +The <c>bash-completion</c> eclass provides functions for installing contributed +bash-completion scripts. See <uri link="::tasks-reference/completion"/> for how +to write completion scripts. +</p> + +<table> + <tr> + <th> + Function + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>dobashcompletion</c> + </ti> + <ti> + Install a bash completion file if and only if the user has + <c>USE="bash-completion"</c>. If <c>BASH_COMPLETION_NAME</c> is set, + this will be used for deciding the application name. Otherwise, the second + argument will be used (if present), or failing that, <c>${PN}</c>. + </ti> + </tr> + <tr> + <ti> + <c>bash-completion_pkg_postinst</c> + </ti> + <ti> + If the user has <c>USE="bash-completion"</c>, + displays a message explaining how to activate + the completion for this package. + </ti> + </tr> +</table> + +</body> +</chapter> +</guide> diff --git a/eclass-reference/cvs.eclass/text.xml b/eclass-reference/cvs.eclass/text.xml new file mode 100644 index 0000000..4e0c6b5 --- /dev/null +++ b/eclass-reference/cvs.eclass/text.xml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/cvs.eclass/"> +<chapter> +<title><c>cvs.eclass</c> Reference</title> +<body> + +<todo>Needs to be written</todo> + +</body> +</chapter> +</guide> diff --git a/eclass-reference/eutils.eclass/text.xml b/eclass-reference/eutils.eclass/text.xml new file mode 100644 index 0000000..256a81c --- /dev/null +++ b/eclass-reference/eutils.eclass/text.xml @@ -0,0 +1,220 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/eutils.eclass/"> +<chapter> +<title><c>eutils.eclass</c> Reference</title> +<body> + +<p> +The <c>eutils</c> eclass provides various useful functions. For full documentation, +see `eutils.eclass-5`_. +</p> + +<table> + <tr> + <th> + Function + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>epause</c> + </ti> + <ti> + See <uri link="::function-reference/message-functions"/> and + <uri link="::ebuild-writing/messages"/> + </ti> + </tr> + <tr> + <ti> + <c>ebeep</c> + </ti> + <ti> + See <uri link="::function-reference/message-functions"/> and + <uri link="::ebuild-writing/messages"/> + </ti> + </tr> + <tr> + <ti> + <c>gen_usr_ldscript</c> + </ti> + <ti> + Generate a linker script in <c>/usr/lib</c> for dynamic + libraries in <c>/lib</c> + </ti> + </tr> + <tr> + <ti> + <c>draw_line</c> + </ti> + <ti> + Draw a line the same length as the arguments. Do not + use this for messages. + </ti> + </tr> + <tr> + <ti> + <c>epatch</c> + </ti> + <ti> + Apply a patch (see `eutils.eclass-5`_ and + <uri link="::ebuild-writing/functions/src_unpack/epatch"/>). + </ti> + </tr> + <tr> + <ti> + <c>have_NPTL</c> + </ti> + <ti> + True if we are using NPTL (threads). + </ti> + </tr> + <tr> + <ti> + <c>get_number_of_jobs</c> + </ti> + <ti> + Try to get the number of jobs to use when compiling. + </ti> + </tr> + <tr> + <ti> + <c>emktemp</c> + </ti> + <ti> + Replacement for <c>mktemp</c>. + </ti> + </tr> + <tr> + <ti> + <c>egetent</c> + </ti> + <ti> + Wrapper for <c>getent</c>. + </ti> + </tr> + <tr> + <ti> + <c>enewuser</c> + </ti> + <ti> + See <uri link="::ebuild-writing/users-and-groups"/>. + </ti> + </tr> + <tr> + <ti> + <c>enewgroup</c> + </ti> + <ti> + See <uri link="::ebuild-writing/users-and-groups"/>. + </ti> + </tr> + <tr> + <ti> + <c>edos2unix</c> + </ti> + <ti> + Fix one or more files to use Unix line endings. + </ti> + </tr> + <tr> + <ti> + <c>make_desktop_entry</c> + </ti> + <ti> + Create a <c>.desktop</c> file. Args are the binary, + the name, the icon, the application type and the startup + path. + </ti> + </tr> + <tr> + <ti> + <c>make_session_desktop</c> + </ti> + <ti> + Create a GDM session file. Arguments are the title and + the command. + </ti> + </tr> + <tr> + <ti> + <c>domenu</c> + </ti> + <ti> + Install a menu file. + </ti> + </tr> + <tr> + <ti> + <c>doicon</c> + </ti> + <ti> + Install an icon file. + </ti> + </tr> + <tr> + <ti> + <c>check_license</c> + </ti> + <ti> + Display a license for the user to accept. Argument is + the license to use. + </ti> + </tr> + <tr> + <ti> + <c>cdrom_get_cds</c> + </ti> + <ti> + See `eutils.eclass-5`_. + </ti> + </tr> + <tr> + <ti> + <c>cdrom_load_next_cd</c> + </ti> + <ti> + See `eutils.eclass-5`_. + </ti> + </tr> + <tr> + <ti> + <c>strip-linguas</c> + </ti> + <ti> + Make sure <c>LINGUAS</c> contains only allowed values. + See <uri link="::general-concepts/linguas"/>. + </ti> + </tr> + <tr> + <ti> + <c>built_with_use</c> + </ti> + <ti> + Check that a package was built with a given USE flag + enabled. + </ti> + </tr> + <tr> + <ti> + <c>dopamd</c> + </ti> + <ti> + Install a pam auth config file. + </ti> + </tr> + <tr> + <ti> + <c>newpamd</c> + </ti> + <ti> + Install a pam auth config file (two arg version). + </ti> + </tr> +</table> + +</body> +</chapter> +</guide> diff --git a/eclass-reference/fdo-mime.eclass/text.xml b/eclass-reference/fdo-mime.eclass/text.xml new file mode 100644 index 0000000..a0c7717 --- /dev/null +++ b/eclass-reference/fdo-mime.eclass/text.xml @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/fdo-mime.eclass/"> +<chapter> +<title><c>fdo-mime.eclass</c> Reference</title> +<body> + +<p> +The <c>fdo-mime</c> eclass provides functions for working with the FreeDesktop MIME +database. +</p> + +<table> + <tr> + <th> + Function + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>fdo-mime_desktop_database_update</c> + </ti> + <ti> + Updates the desktop database. Should be called after modifying desktop entries. + </ti> + </tr> + <tr> + <ti> + <c>fdo-mime_mime_database_update</c> + </ti> + <ti> + Updates the MIME database. Should be called after modifying MIME entries. + </ti> + </tr> +</table> + +</body> +</chapter> +</guide> diff --git a/eclass-reference/flag-o-matic.eclass/text.xml b/eclass-reference/flag-o-matic.eclass/text.xml new file mode 100644 index 0000000..a9646ab --- /dev/null +++ b/eclass-reference/flag-o-matic.eclass/text.xml @@ -0,0 +1,119 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/flag-o-matic.eclass/"> +<chapter> +<title><c>flag-o-matic.eclass</c> Reference</title> +<body> + +<p> +The <c>flag-o-matic</c> eclass provides functions for manipulating <c>CFLAGS</c>, +<c>CXXFLAGS</c>, <c>LDFLAGS</c> and similar. See +<uri link="::ebuild-writing/functions/src_compile/build-environment"/> for +examples. +</p> + +<table> + <tr> + <th> + Function + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>filter-flags</c> <e><flags></e> + </ti> + <ti> + Removes any occurances of <e>flags</e> in <c>CFLAGS</c>, <c>CXXFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>append-flags</c> <e><flags></e> + </ti> + <ti> + Appends <e>flags</e> to <c>CFLAGS</c> and <c>CXXFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>replace-flags</c> <e><orig.flag></e> <e><new.flag></e> + </ti> + <ti> + Replaces <e>orig.flag</e> (if present) with <e>new.flag</e> in <c>CFLAGS</c> + and <c>CXXFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>replace-cpu-flags</c> <e><old.cpus></e> <e><new.cpu></e> + </ti> + <ti> + Replaces <c>-mtune=</c>, <c>-mcpu=</c> and <c>-march=</c> flags with any of + <e>old.cpus</e> with <e>new.cpu</e> in <c>CFLAGS</c> and <c>CXXFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>is-flag</c> <e><flag></e> + </ti> + <ti> + Tests whether <e>flag</e> is a valid flag with the current compiler + </ti> + </tr> + <tr> + <ti> + <c>strip-flags</c> + </ti> + <ti> + Removes all non-safe flags from <c>CFLAGS</c> and <c>CXXFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>strip-unsupported-flags</c> + </ti> + <ti> + Removes any flags in <c>CFLAGS</c> and <c>CXXFLAGS</c> which are not supported + by the active compiler + </ti> + </tr> + <tr> + <ti> + <c>get-flag</c> <e><flag></e> + </ti> + <ti> + Finds and echoes the value of the specified flag + </ti> + </tr> + <tr> + <ti> + <c>filter-mfpmath</c> <e><math types></e> + </ti> + <ti> + Removes the specified maths types from the fpmath specification (if + present) in <c>CFLAGS</c> and <c>CXXFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>append-ldflags</c> + </ti> + <ti> + Appends the specified flags to <c>LDFLAGS</c> + </ti> + </tr> + <tr> + <ti> + <c>filter-ldflags</c> <e><flags></e> + </ti> + <ti> + Remove the specified flags (if present) from <c>LDFLAGS</c> + </ti> + </tr> +</table> + +</body> +</chapter> +</guide> diff --git a/eclass-reference/rpm.eclass/text.xml b/eclass-reference/rpm.eclass/text.xml new file mode 100644 index 0000000..5dd7e1e --- /dev/null +++ b/eclass-reference/rpm.eclass/text.xml @@ -0,0 +1,78 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/rpm.eclass/"> +<chapter> +<title><c>rpm.eclass</c> Reference</title> +<body> + +<p> +The <c>rpm</c> eclass provides RPM unpacking services for packages that must +extract a source tarball from an RPM. +</p> + +<subsection> +<title><c>rpm.eclass</c> Variables</title> +<body> + +<table> + <tr> + <th> + Variables + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>USE_RPMOFFSET_ONLY</c> + </ti> + <ti> + <c>rpm_unpack</c> normally will use rpm2cpio over rpmoffset if both exist. + If this variable is set to 1, <c>rpm_unpack</c> will use rpmoffset. + </ti> + </tr> +</table> + +</body> +</subsection> + +<subsection> +<title><c>rpm.eclass</c> Functions</title> +<body> + +<table> + <tr> + <th> + Functions + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>rpm_unpack</c> <e><file></e> + </ti> + <ti> + Unpacks an RPM. Behaves in the same fashion as <c>unpack</c> + (see <uri link="::ebuild-writing/functions/src_unpack"/>). + </ti> + </tr> + <tr> + <ti> + <c>rpm_src_unpack</c> + </ti> + <ti> + Default <c>src_unpack</c> that loops through <c>${A}</c> + calling <c>rpm_unpack</c> for RPM's and <c>unpack</c> for + everything else. + </ti> + </tr> +</table> + +</body> +</subsection> + +</body> +</chapter> +</guide> diff --git a/eclass-reference/subversion.eclass/text.xml b/eclass-reference/subversion.eclass/text.xml new file mode 100644 index 0000000..a0c6d3f --- /dev/null +++ b/eclass-reference/subversion.eclass/text.xml @@ -0,0 +1,143 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/subversion.eclass/"> +<chapter> +<title><c>subversion.eclass</c> Reference</title> +<body> + +<p> +The <c>subversion</c> eclass provides functions that enable the ebuild author to +create 'live' ebuilds that fetch the program's sources from a subversion +repository. +</p> + +<p> +See <uri link="::ebuild-writing/functions/src_unpack/svn-sources"/> for an introduction. +</p> + +<subsection> +<title><c>subversion.eclass</c> Variables</title> +<body> + +<table> + <tr> + <th> + Variables + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>ESVN_REPO_URI</c> + </ti> + <ti> + URI from which the sources will be fetched. Valid + protocols: http, https, and svn. At a minimum, this + variable <e>must</e> be set. + </ti> + </tr> + <tr> + <ti> + <c>ESVN_STORE_DIR</c> + </ti> + <ti> + Location fetched sources will be kept. Defaults to <c>${DISTDIR}/svn-src</c>. + </ti> + </tr> + <tr> + <ti> + <c>ESVN_FETCH_CMD</c> + </ti> + <ti> + Command used for initial checkout. Defaults to <c>svn checkout</c>. + </ti> + </tr> + <tr> + <ti> + <c>ESVN_UPDATE_CMD</c> + </ti> + <ti> + Command used for updating sources. Defaults to <c>svn update</c>. + </ti> + </tr> + <tr> + <ti> + <c>ESVN_PROJECT</c> + </ti> + <ti> + Name of the project. Defaults to <c>${PN/-svn}</c>. + </ti> + </tr> + <tr> + <ti> + <c>ESVN_BOOTSTRAP</c> + </ti> + <ti> + Name of bootstrap script. This variable is empty by + default. './' is automatically prepended. + </ti> + </tr> + <tr> + <ti> + <c>ESVN_PATCHES</c> + </ti> + <ti> + List of patches to apply prior to fetching the sources. + In addition to literal filenames, you may also use globbing + such as *.diff. This variable is empty by default. + </ti> + </tr> +</table> +</body> +</subsection> + +<subsection> +<title><c>subversion.eclass</c> Functions</title> +<body> + +<table> + <tr> + <th> + Functions + </th> + <th> + Details + </th> + </tr> + <tr> + <ti> + <c>subversion_src_unpack</c> + </ti> + <ti> + The default <c>src_unpack</c> that runs <c>subversion_svn_fetch</c> and + <c>subversion_bootstrap</c>. + </ti> + </tr> + <tr> + <ti> + <c>subversion_svn_fetch</c> + </ti> + <ti> + Fetches the program's sources from the URI specified by <c>ESVN_REPO_URI</c> + and copies to <c>${S}</c>. + </ti> + </tr> + <tr> + <ti> + <c>subversion_bootstrap</c> + </ti> + <ti> + Applies any patches specified by <c>ESVN_PATCHES</c> and executes the bootstrap + script specified by <c>ESVN_BOOTSTRAP</c>. + </ti> + </tr> +</table> + +</body> +</subsection> + +</body> +</chapter> +</guide> + diff --git a/eclass-reference/text.xml b/eclass-reference/text.xml new file mode 100644 index 0000000..4ac8dce --- /dev/null +++ b/eclass-reference/text.xml @@ -0,0 +1,29 @@ +<?xml version="1.0"?> +<guide self="eclass-reference/"> +<chapter> +<title>Eclass Reference</title> + +<body> +<p> +This section provides a reference for some of the more commonly used eclasses. +Note that most eclasses have an accompanying manual page -- see `Manual Pages`_. +</p> +</body> + +<section> +<title>Contents</title> +<body> +<contentsTree/> +</body> +</section> +</chapter> + +<include href="bash-completion.eclass/"/> +<include href="cvs.eclass/"/> +<include href="eutils.eclass/"/> +<include href="fdo-mime.eclass/"/> +<include href="flag-o-matic.eclass/"/> +<include href="rpm.eclass/"/> +<include href="subversion.eclass/"/> + +</guide> 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> @@ -40,4 +40,6 @@ section for how to get started. <include href="profiles/"/> <include href="keywording/"/> <include href="tasks-reference/"/> +<include href="function-reference/"/> +<include href="eclass-reference/"/> </guide> |