summaryrefslogtreecommitdiff
blob: 16011610a038f344ce2fbbca46bf3bb3ea6ff9a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-rescue/freebsd-rescue-6.0.ebuild,v 1.2 2006/04/20 07:17:17 flameeyes Exp $

inherit bsdmk freebsd

DESCRIPTION="FreeBSD's rescue binaries"
SLOT="0"
KEYWORDS="~x86-fbsd"

IUSE="atm nis"

SRC_URI="mirror://gentoo/${UBIN}.tar.bz2
		mirror://gentoo/${CONTRIB}.tar.bz2
		mirror://gentoo/${LIB}.tar.bz2
		mirror://gentoo/${BIN}.tar.bz2
		mirror://gentoo/${SBIN}.tar.bz2
		mirror://gentoo/${USBIN}.tar.bz2
		mirror://gentoo/${GNU}.tar.bz2
		mirror://gentoo/${SYS}.tar.bz2
		mirror://gentoo/${LIBEXEC}.tar.bz2
		mirror://gentoo/${RESCUE}.tar.bz2"

RDEPEND=""
DEPEND="sys-devel/flex
	=sys-freebsd/freebsd-sources-${RV}*
	=sys-freebsd/freebsd-mk-defs-${RV}*"

S="${WORKDIR}/rescue"

pkg_setup() {
	use atm || mymakeopts="${mymakeopts} NOATM= "
	use nis || mymakeopts="${mymakeopts} NO_NIS= "

	for flag in atm nis; do
		if use ${flag} && ! built_with_use sys-libs/freebsd-lib ${flag}; then
			die "You can't add ${flag} support here without adding it to sys-libs/freebsd-lib"
		fi
	done
}

src_unpack() {
	freebsd_src_unpack

	# As they are patches from ${WORKDIR} apply them by hand
	cd ${WORKDIR}
	epatch ${FILESDIR}/${PN}-5.4-gentoo.patch
	epatch ${FILESDIR}/${PN}-5.4-sbin-gentoo.patch
}