summaryrefslogtreecommitdiff
blob: 47a0cfa3e87b14d6f64f463db4c347b3e2142e0c (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header $

EAPI="4"
EGIT_REPO_URI="http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-util.git"
EGIT_BRANCH="aufs2.1"
EGIT_COMMIT="${EGIT_BRANCH}"
EGIT_HAS_SUBMODULES=true
[ -n "${EVCS_OFFLINE}" ] || EGIT_REPACK=true
inherit base git-2 linux-info multilib

DESCRIPTION="Userspace tools for aufs"
HOMEPAGE="http://aufs.sourceforge.net/"

LICENSE="GPL-2"
SLOT="0"
# Since this is a live ebuild, we require ACCEPT_KEYWORDS='**'
#KEYWORDS="~amd64 ~x86"
KEYWORDS=""
IUSE=""
PROPERTIES="live"

RDEPEND=""
DEPEND="dev-vcs/git[curl]"

src_prepare() {
	local i l
	ln -s "${KERNEL_DIR}"/include local_kernel
	set -- local_kernel/linux/aufs*.h
	test -e "${1}" || {
		eerror "It seems you do not have installed aufs into your kernel tree."
		die "You might need to emerge >=sys-fs/aufs-99999999::mv"
	}
	l="s|/usr/lib|$(get_libdir)|"
	sed -i -e "1iCFLAGS += -I./local_kernel" -e "${l}" Makefile || \
		die "Patching Makefile failed"
	for i in lib*/Makefile
	do	test -e "${i}" || continue
		sed -i -e "1iCFLAGS += -I../local_kernel" -e "${l}" "${i}" || \
			die "Patching ${i} failed"
	done
	base_src_prepare
}