2012-05-16 18:24:05 +04:00
|
|
|
# Copyright 1999-2011 Gentoo Foundation
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
|
|
|
EAPI=4
|
|
|
|
|
2012-05-16 18:16:01 +04:00
|
|
|
EGIT_REPO_URI="git://github.com/backbone/snail.git"
|
2012-05-16 18:24:05 +04:00
|
|
|
|
2012-05-16 18:21:07 +04:00
|
|
|
[[ 9999 == ${PV} ]] && vcs=git-2
|
2012-05-16 18:16:01 +04:00
|
|
|
|
|
|
|
inherit $vcs eutils
|
|
|
|
|
|
|
|
if [[ 9999 != ${PV} ]]; then
|
2012-05-16 18:24:05 +04:00
|
|
|
SRC_URI="ftp://backbone.ws/projects/snail/${P}.tar.bz2"
|
|
|
|
KEYWORDS="-* ~x86 ~amd64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
DESCRIPTION="Snail - nVidia Optimus support"
|
|
|
|
HOMEPAGE="https://chili.backbone.ws/projects/snail"
|
|
|
|
|
|
|
|
LICENSE="GPL-3"
|
2012-05-16 18:16:01 +04:00
|
|
|
SLOT="0"
|
2012-05-16 18:24:05 +04:00
|
|
|
IUSE=""
|
|
|
|
|
|
|
|
DEPEND="x11-drivers/nvidia-drivers
|
|
|
|
sys-power/bbswitch
|
|
|
|
sys-apps/dmidecode"
|
|
|
|
|
|
|
|
RDEPEND="${DEPEND}"
|
|
|
|
|
|
|
|
src_prepare() {
|
2012-05-16 18:16:01 +04:00
|
|
|
if [[ 9999 == ${PV} ]] ; then
|
2012-05-16 18:24:05 +04:00
|
|
|
# Allow user patches to be applied without modifying the ebuild
|
|
|
|
epatch_user
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2012-05-16 18:16:01 +04:00
|
|
|
if [[ 9999 == ${PV} ]] ; then
|
2012-05-16 18:24:05 +04:00
|
|
|
emake install DESTDIR="${D}"
|
|
|
|
else
|
|
|
|
emake install DESTDIR="${D}" || die
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
snail.configure
|
|
|
|
}
|