| 1 |
robbat2 |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
ranger |
1.8 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/keyutils/keyutils-1.5.5.ebuild,v 1.7 2012/05/30 19:07:10 maekke Exp $
|
| 4 |
robbat2 |
1.1 |
|
| 5 |
|
|
EAPI="3"
|
| 6 |
|
|
|
| 7 |
|
|
inherit multilib eutils toolchain-funcs
|
| 8 |
|
|
|
| 9 |
|
|
DESCRIPTION="Linux Key Management Utilities"
|
| 10 |
|
|
HOMEPAGE="http://people.redhat.com/dhowells/keyutils/"
|
| 11 |
|
|
SRC_URI="http://people.redhat.com/dhowells/${PN}/${P}.tar.bz2"
|
| 12 |
|
|
|
| 13 |
|
|
LICENSE="GPL-2 LGPL-2.1"
|
| 14 |
|
|
SLOT="0"
|
| 15 |
ranger |
1.8 |
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux"
|
| 16 |
robbat2 |
1.1 |
IUSE=""
|
| 17 |
|
|
|
| 18 |
|
|
DEPEND="!prefix? ( >=sys-kernel/linux-headers-2.6.11 )"
|
| 19 |
|
|
|
| 20 |
|
|
src_prepare() {
|
| 21 |
|
|
epatch "${FILESDIR}"/${PN}-1.5.5-makefile-fixup.patch
|
| 22 |
|
|
sed -i \
|
| 23 |
|
|
-e '1iRPATH=' \
|
| 24 |
|
|
-e '/^C.*FLAGS/s|:=|+=|' \
|
| 25 |
|
|
-e 's:-Werror::' \
|
| 26 |
|
|
-e '/^BUILDFOR/s:=.*:=:' \
|
| 27 |
|
|
-e "/^LIBDIR/s:=.*:=/usr/$(get_libdir):" \
|
| 28 |
|
|
-e '/^USRLIBDIR/s:=.*:=$(LIBDIR):' \
|
| 29 |
|
|
Makefile || die
|
| 30 |
vapier |
1.2 |
|
| 31 |
|
|
# The lsb check is useless, so avoid spurious command not found messages.
|
| 32 |
|
|
sed -i -e 's,lsb_release,:,' tests/prepare.inc.sh || die
|
| 33 |
|
|
# All the test files are bash, but try to execute via `sh`.
|
| 34 |
|
|
sed -i -r \
|
| 35 |
|
|
-e 's:([[:space:]])sh([[:space:]]):\1bash\2:' \
|
| 36 |
|
|
tests/{Makefile*,*.sh} || die
|
| 37 |
|
|
find tests/ -name '*.sh' -exec sed -i '1s:/sh$:/bash:' {} +
|
| 38 |
|
|
# Some tests call the kernel which calls userspace, but that will
|
| 39 |
|
|
# run the install keyutils rather than the locally compiled one,
|
| 40 |
|
|
# so disable round trip tests.
|
| 41 |
|
|
rm -rf tests/keyctl/requesting/{bad-args,piped,valid}
|
| 42 |
robbat2 |
1.1 |
}
|
| 43 |
|
|
|
| 44 |
|
|
src_configure() {
|
| 45 |
|
|
tc-export CC
|
| 46 |
|
|
}
|
| 47 |
|
|
|
| 48 |
vapier |
1.2 |
src_test() {
|
| 49 |
|
|
# Execute the locally compiled code rather than the
|
| 50 |
|
|
# older versions already installed in the system.
|
| 51 |
|
|
LD_LIBRARY_PATH=${S} \
|
| 52 |
|
|
PATH="${S}:${PATH}" \
|
| 53 |
|
|
emake test || die
|
| 54 |
|
|
}
|
| 55 |
|
|
|
| 56 |
robbat2 |
1.1 |
src_install() {
|
| 57 |
|
|
emake DESTDIR="${ED}" install || die
|
| 58 |
|
|
dodoc README
|
| 59 |
|
|
gen_usr_ldscript -a keyutils
|
| 60 |
|
|
}
|