From a84362bc332dd3c782ac646f6c804ee38da25402 Mon Sep 17 00:00:00 2001 From: Christian Faulhammer Date: Sat, 4 Apr 2009 18:17:08 +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. --- Makefile | 8 ++- cheatsheet/eapi_cheatsheet.tex | 133 ++++++++++++++++++++++++++++++++++++++++ credits.tex | 3 +- pms.tex | 4 +- 4 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 cheatsheet/eapi_cheatsheet.tex diff --git a/Makefile b/Makefile index 8b49437..351a4c6 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,14 @@ clean : rm -f *~ *.pdf *.dvi *.log *.aux *.bbl *.blg *.toc *.lol *.loa *.lox \ *.lot *.out *.html *.css *.png *.4ct *.4tc *.idv *.lg *.tmp *.xref vc.tex || true -LATEXFILES = $(shell ls *.tex) +LATEXFILES = $(shell find -name '*.tex') LISTINGFILES = $(shell ls *.listing) SOURCEFILES = $(LATEXFILES) $(LISTINGFILES) -pms.pdf: $(SOURCEFILES) pms.bbl vc.tex +pms.pdf: $(SOURCEFILES) pms.bbl vc.tex eapi_cheatsheet.pdf pdflatex pms pdflatex pms + pdflatex cheatsheet/eapi_cheatsheet pdflatex pms pms.html: $(SOURCEFILES) pms.bbl @@ -31,6 +32,9 @@ pms.bbl: pms.bib pms.tex vc.tex latex pms bibtex pms +eapi_cheatsheet.pdf: vc.tex + pdflatex cheatsheet/eapi_cheatsheet + vc.tex: pms.tex /bin/sh ./vc diff --git a/cheatsheet/eapi_cheatsheet.tex b/cheatsheet/eapi_cheatsheet.tex new file mode 100644 index 0000000..619d5a1 --- /dev/null +++ b/cheatsheet/eapi_cheatsheet.tex @@ -0,0 +1,133 @@ +\documentclass[a4paper,notumble]{leaflet} +\input{vc} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{ + url, + hyperref, + listings, + ifthen, + fancyref, + xr-hyper +} +\usepackage[orig,english]{isodate} +\newcommand{\code}[1]{\texttt{#1}} +\newcommand{\version}{0.2} +\renewcommand{\familydefault}{\sfdefault} +\urlstyle{sf} +\externaldocument{pms} + +\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:cs: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:cs:eapi1} +\subsection{Additions/Changes} +\label{sec:cs: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. \Fref{tab:iuse-defaults-table}. +\item[Named SLOT dependencies] Dependencies can explicitely request a + specific slot by using the \code{dev-libs/foo:SLOT} syntax. + \Fref{tab:slot-deps-table}. +\end{description} +\section{EAPI 2 (2008-09-25)} +\label{sec:cs:eapi2} +\subsection{Additions/Changes} +\label{sec:cs: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. \Fref{tab:uri-arrows-table}. +\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. \Fref{tab:use-deps-table}. + \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. \Fref{tab:bang-strength-table} +\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}. + \Fref{tab:src-prepare-table} and \fref{tab:src-configure-table}. +\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. + \Fref{tab:default-phase-function-table} and + \fref{tab:default-function-table}. +\item[\code{doman} language support] The \code{doman} installation + function recognizes lanugage specific man page extensions and + behaves accordingly. \Fref{tab:doman-table}. +\end{description} +\newpage +\section{EAPI 3} +\label{sec:cs:eapi3} +\subsection{Additions/Changes} +\label{sec:cs:eapi3-additions} +\subsection{Removals/Bans} +\label{sec:cs:eapi3-removalsbans} +\end{document} diff --git a/credits.tex b/credits.tex index 8494516..77d40bd 100644 --- a/credits.tex +++ b/credits.tex @@ -3,7 +3,8 @@ Thanks to Mike Kelly (package manager provided utilities, section~\ref{sec:pkg-mgr-commands}), Danny van Dyk (ebuild functions, section~\ref{sec:ebuild-functions}), David Leverton (various sections) and Petteri Räty (environment state, section~\ref{sec:ebuild-env-state}) for contributions. Thanks to -Christian Faulhammer for fixing some of the more horrible formatting screwups. Thanks also to Mike +Christian Faulhammer for fixing some of the more horrible formatting +screwups and providing the EAPI cheat sheet. Thanks also to Mike Frysinger and Brian Harring for proof-reading and suggestions for fixes and/or clarification. \section*{Copyright and Licence} diff --git a/pms.tex b/pms.tex index 8a14f30..fb7bc7e 100644 --- a/pms.tex +++ b/pms.tex @@ -18,7 +18,8 @@ parskip, verbatim, algorithm, - algorithmic + algorithmic, + pdfpages } \usepackage[orig,english]{isodate} \usepackage[DIV13]{typearea} @@ -162,6 +163,7 @@ \bibliography{pms} +\includepdf[pages=-,landscape]{eapi_cheatsheet} \end{document} % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : -- 1.6.0.6