From e5ae6d1e3b229305e2d7b12eabff5277d58a2a97 Mon Sep 17 00:00:00 2001 From: Christian Faulhammer Date: Tue, 31 Mar 2009 17:04:07 +0200 Subject: [PATCH] Desk reference for quick look-up This contains a short summary of all EAPI features so far, similar to appendix E of PMS, but with more information. --- cheatsheet/eapi_cheatsheet.tex | 125 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 cheatsheet/eapi_cheatsheet.tex diff --git a/cheatsheet/eapi_cheatsheet.tex b/cheatsheet/eapi_cheatsheet.tex new file mode 100644 index 0000000..370edbf --- /dev/null +++ b/cheatsheet/eapi_cheatsheet.tex @@ -0,0 +1,125 @@ +\documentclass[a4paper,notumble]{leaflet} +\input{vc} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{ + url, + listings, + ifthen +} +\usepackage[orig,english]{isodate} +\newcommand{\code}[1]{\texttt{#1}} +\newcommand{\version}{0.2} +\renewcommand{\familydefault}{\sfdefault} +\urlstyle{sf} + +\title{EAPI Cheat Sheet} +\author{Christian Faulhammer\thanks{fauli@gentoo.org}} +\ifthenelse{\equal{\VCDateISO}{}} +{ + \date{Version \version{}, generated on: \\\today} +}{ + \date{Version \version\\\printdate{\VCDateISO}} +} +\CutLine*{1} +\CutLine*{3} +\CutLine*{4} +\CutLine*{6} +\begin{document} +\maketitle +\thispagestyle{empty} +\begin{abstract} + This overview is meant for quick reference of the main EAPI features + found in Gentoo. It is intended for everyone having to write + ebuilds regularly, it is neither a full ebuild reference nor + complete regarding EAPI changes. For the latter, refer to the + official Package Manager + specification\footnote{\url{http://www.gentoo.org/proj/en/qa/pms/}}. + + Official EAPIs are consecutively numbered (other characters are + allowed though) and do usually stack, meaning that an EAPI contains + all features found in the previous one. This is no requirement as + two EAPIs can in theory be totally different from one another, but + for ease of use this is not wanted for the official EAPIs. + Situations where this is not the case will be noted in the + appropriate sections. + + Please report mistakes or enhancements to this document via the + Gentoo bug tracking system\footnote{\url{http://bugs.gentoo.org/}} + to the original author or the PMS team. + + This document is released under the Creative Commons + Attribution-Share Alike 3.0 + Licence\footnote{\url{http://creativecommons.org/licenses/by-sa/3.0/}}. +\end{abstract} +\section{EAPI 0} +\label{sec:eapi0} +If there is no EAPI explicitely specified, EAPI 0 is taken. + +Currently there is no full specification what EAPI 0 includes. +Portage, official ebuild documentation and existing ebuilds set the +standard here, although obvious errors are still errors. +\newpage +\section{EAPI 1} +\label{sec:eapi1} +\subsection{Additions/Changes} +\label{sec:eapi1-additions} +\begin{description} +\item[IUSE defaults] An USE flag can be marked as mandatory (if not + disabled explicitely by user configuration) with a "+" sign in + front. +\item[Named SLOT dependencies] Dependencies can explicitely request a + specific slot by using the \code{dev-libs/foo:SLOT} syntax. +\end{description} +\section{EAPI 2 (2008-09-25)} +\label{sec:eapi2} +\subsection{Additions/Changes} +\label{sec:eapi2-additions} +\begin{description} +\item[\code{SRC\_URI} arrows] Allows redirection of upstream file + naming scheme by using an "arrow" (\code{->}) to a new file name in + DISTDIR. +\item[USE dependencies] Dependencies can be specified to be built with + or without a specific USE flag, thus getting rid of countless + \code{built\_with\_use} checks. A more sophisticated syntax is to + be found in EAPI 3. + \begin{description} + \item{[opt]} The flag must be enabled. + \item{[opt=]} The flag must be enabled if the flag is enabled for the + package with the dependency, or disabled otherwise. + \item{[!opt=]} The flag must be disabled if the flag is enabled for + the package with the dependency, or enabled otherwise. + \item{[opt?]} The flag must be enabled if the flag is enabled for the + package with the dependency. + \item{[!opt?]} The flag must be disabled if the use flag is disabled + for the package with the dependency. + \item{[-opt]} The flag must be disabled. + \end{description} +\item[Blocker syntax] A single exclamation mark as a blocker may be + ignored by the package manager as long as the stated package is + uninstalled later on. Two exclamation marks are a strong blocker + and will always be respected. +\item[\code{src\_configure, src\_prepare}] Both new functions provide + finer granularity in the ebuild's structure. Configure calls should + be moved from \code{src\_compile} to \code{src\_configure}. + Patching and other preparing tasks must no longer take place in + \code{src\_unpack} but in \code{src\_prepare}. +\item[Default functions] The default functions for + \code{pkg\_nofetch}, \code{src\_unpack}, \code{src\_prepare}, + \code{src\_configure}, \code{src\_compile} and \code{src\_test} can + be called via \code{default\_\emph{phasename}}, so small additions + you need won't be accompanied by a complete reimplementation of the phase. + Additionally as a shorthand for the current phase's default + definition \code{default} can be invoked. +\item[\code{doman} language support] The \code{doman} installation + function recognizes lanugage specific man page extensions and + behaves accordingly. +\end{description} +\newpage +\section{EAPI 3} +\label{sec:eapi3} +\subsection{Additions/Changes} +\label{sec:eapi3-additions} +\subsection{Removals/Bans} +\label{sec:eapi3-removalsbans} +\end{document} -- 1.6.0.6