summaryrefslogtreecommitdiff
blob: e9ac9f0f9e597e039c3097c72a419ec297d568e0 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/libfaketime/libfaketime-0.9.1.ebuild,v 1.1 2012/10/23 22:26:58 radhermit Exp $

EAPI=5

inherit eutils toolchain-funcs multilib-minimal

DESCRIPTION="Report faked system time to programs"
HOMEPAGE="http://www.code-wizards.com/projects/libfaketime/"
SRC_URI="http://www.code-wizards.com/projects/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

src_prepare() {
	epatch "${FILESDIR}"/${P}-makefile.patch
	epatch "${FILESDIR}"/${PN}-0.9-as-needed.patch
	epatch "${FILESDIR}"/${P}-us-zero.patch
	epatch "${FILESDIR}"/${P}-us-zero-stat.patch
	tc-export CC
	multilib_copy_sources
}

multilib_src_test() {
	if [[ ${ABI} == ${DEFAULT_ABI} ]]; then
		default_src_test
	else
		einfo "not running tests for ${ABI}"
		echo ${DEFAULT_ABI}
	fi
}

multilib_src_install() {
	dobin src/faketime
	exeinto /usr/$(get_libdir)/faketime
	doexe src/${PN}*.so.*
	dosym ${PN}.so.1 /usr/$(get_libdir)/faketime/${PN}.so
	dosym ${PN}MT.so.1 /usr/$(get_libdir)/faketime/${PN}MT.so
}

src_install() {
	multilib-minimal_src_install
	doman man/faketime.1
	dodoc NEWS README TODO
}