summaryrefslogtreecommitdiff
path: root/sys-fs/vdfuse/vdfuse-82a.ebuild
blob: 0d71cccbac95377c42b5e6db4820dffccd6c53dc (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright 1999-2010 Tiziano Müller
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit multilib toolchain-funcs

VB_V="4.1.18"
VB_P="VirtualBox-${VB_V}"

DESCRIPTION="Fuse module to open a VBox supported VD image file and mount it."
HOMEPAGE="https://forums.virtualbox.org/viewtopic.php?f=26&t=33355"
SRC_URI="http://pkg.rogentos.ro/~rogentos/distro/${CATEGORY}/${PN}/${PN}-v${PV}.tar.bz2
	http://pkg3.rogentos.ro/~noxis/distro/${CATEGORY}/${PN}/${PN}-v${PV}.tar.bz2"

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

RDEPEND=">=app-emulation/virtualbox-bin-${VB_V}
	sys-fs/fuse"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

S="${WORKDIR}"
incdir="${S}/include"
infile="${PN}-v${PV}.c"
outfile="${PN}"

pkg_setup() {
	ewarn "You may have to make /opt/VirtualBox/VBox{DDU,RT}.so"
	ewarn "readable for everyone first."

	if [ -z "${INSTALL_DIR}" ]; then
		if [ -e "/etc/vbox/vbox.cfg" ]; then
			. /etc/vbox/vbox.cfg
		elif [ -d "/usr/lib/virtualbox" ]; then
			INSTALL_DIR="/usr/lib/virtualbox"
		elif [ -z "${INSTALL_DIR}" ]; then
			echo "INSTALL_DIR not defined"
			exit 1
		fi
	fi

}

src_unpack() {
	unpack "${A}" || die "unpacking sources failed"
}

src_compile() {
	$(tc-getCC) \
		${CFLAGS} \
		$(pkg-config --cflags --libs fuse) \
		${LDFLAGS} \
		${infile} -o ${outfile} \
		-I${incdir} \
		-Wl,-rpath,${INSTALL_DIR} \
		-l:${INSTALL_DIR}/VBoxDDU.so \
		-Wall \
		|| die "building vdfuse failed"
}

src_install() {
	dobin vdfuse
}