summaryrefslogtreecommitdiff
path: root/sys-apps/gpu-detector/gpu-detector-2.6-r2.ebuild
blob: 290a2a037a4c96490695388b7b0840d47eadb1b2 (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
# Copyright 2004-2010 Sabayon
# Copyright 2015 Kogaion Team
# Distributed under the terms of the GNU General Public License v2

DESCRIPTION="Sabayon-based live tool for X.Org video driver configuration"
HOMEPAGE="http://www.rogentos.ro"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86 amd64 ppc"
IUSE=""

RDEPEND=">=app-misc/kogaion-live-1.0
	!>sys-apps/gpu-detector-2.6"
DEPEND=""

src_unpack () {
        cd "${WORKDIR}"
        cp "${FILESDIR}"/gpu-configuration . -p
}

src_install () {
	cd "${WORKDIR}"
	exeinto /sbin/
	doexe gpu-configuration
}

pkg_postinst() {
	local xorg_conf="${ROOT}/etc/X11/xorg.conf"
	if [ -f "${xorg_conf}" ]; then
		echo
		elog "Disabling UseEvents option in your xorg.conf if found"
		elog "This option is known to cause Segmentation Faults on"
		elog "NVIDIA GeForce 6xxx and 7xxx with >=nvidia-drivers-275.xx"
		echo
		# this is quite lame sed, but who cares
		sed -i "/Option.*UseEvents/ s/^/#/" "${xorg_conf}"
	fi
}