Content-type: text/html
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
inherit some_eclass another_eclass
DESCRIPTION="Super-useful stream editor (sed)"
HOMEPAGE="http://www.gnu.org/software/sed/sed.html"
SRC_URI="ftp://alpha.gnu.org/pub/gnu/sed/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE=""
DEPEND="virtual/libc"
RDEPEND="virtual/libc"
src_compile() {
econf || die "could not configure"
emake || die "emake failed"
}
src_install() {
into /usr
doinfo doc/sed.info
doman doc/sed.1
into /
dobin sed/sed || die "dobin sed failed"
dodir /usr/bin
dosym /bin/sed /usr/bin/sed
dodoc NEWS README* THANKS TODO AUTHORS BUGS ANNOUNCE
}
sys-apps/sed sys-libs/zlib net-misc/dhcp
sys-apps/sed-4.0.5 sys-libs/zlib-1.1.4-r1 net-misc/dhcp-3.0_p2
Versions are normally made up of two or three numbers separated by periods, such as 1.2 or 4.5.2. This string may be followed by a character such as 1.2a or 4.5.2z. Note that this letter is not meant to indicate alpha, beta, etc... status. For that, use the optional suffix; either _alpha, _beta, _pre (pre-release), _rc (release candidate), or _p (patch). This means for the 3rd pre-release of a package, you would use something like 1.2_pre3.
>media-libs/libgd-1.6 >=media-libs/libgd-1.6 =media-libs/libgd-1.6 <=media-libs/libgd-1.6 <media-libs/libgd-1.6
!app-text/dos2unix =dev-libs/glib-2* !=net-fs/samba-2* ~net-libs/libnet-1.0.2a
! means block packages from being installed at the same time.
* means match any version of the package so long as the specified base
is matched. So with a version of '2*', we can match '2.1', '2.2', '2.2.1',
etc... and not match version '1.0', '3.0', '4.1', etc...
~ means match any revision of the base version specified. So in the
above example, we would match versions '1.0.2a', '1.0.2a-r1', '1.0.2a-r2',
etc...
|| ( app-games/unreal-tournament app-games/unreal-tournament-goty )Here we see that unreal-tournament has a normal version and it has a goty version. Since they provide the same base set of files, another package can use either. Adding a virtual is inappropriate due to the small scope of it.
|| ( sdl? ( media-libs/libsdl ) svga? ( media-libs/svgalib ) opengl? ( virtual/opengl ) ggi? ( media-libs/libggi ) virtual/x11 )Here only one of the packages will be chosen, and the order of preference is determined by the order in which they appear. So sdl has the best chance of being chosen, followed by svga, then opengl, then ggi, with a default of X if the user does not specify any of the previous choices.
if useq gnome ; then
guiconf="--enable-gui=gnome --with-x"
elif useq gtk ; then
guiconf="--enable-gui=gtk --with-x"
elif useq X ; then
guiconf="--enable-gui=athena --with-x"
else
# No gui version will be built
guiconf=""
fi
USE="jpeg" myconf="$(use_with jpeg libjpeg)" (myconf now has the value "--with-libjpeg") USE="" myconf="$(use_with jpeg libjpeg)" (myconf now has the value "--without-libjpeg") USE="opengl" myconf="$(use_with opengl") (myconf now has the value "--with-opengl")
configure \
--prefix=/usr \
--host=${CHOST} \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
${EXTRA_ECONF} \
configure options
Note that the EXTRA_ECONF is for users only, not for ebuild
writers. If you wish to pass more options to configure, just pass the
extra arguements to econf.
***warning***
if you are going to use emake, make sure your build is happy with
parallel makes (make -j2). It should be tested thoroughly as parallel
makes are notorious for failing _sometimes_ but not always.
make \
prefix=${D}/usr \
datadir=${D}/usr/share \
infodir=${D}/usr/share/info \
localstatedir=${D}/var/lib \
mandir=${D}/usr/share/man \
sysconfdir=${D}/etc \
${EXTRA_EINSTALL} \
make options \
install
Please do not use this in place of 'make install DESTDIR=${D}'.
That is the preferred way of installing make-based packages. Also, do
not utilize the EXTRA_EINSTALL variable since it is for users.
Achim Gottinger <achim@gentoo.org> Mark Guertin <gerk@gentoo.org> Nicholas Jones <carpaski@gentoo.org> Mike Frysinger <vapier@gentoo.org>