blob: 6964aa949c7c030a10e816c4e1ec399c485b4966 (
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-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
inherit eutils
DESCRIPTION="loads the microcode for Elite3D framebuffers to use X"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI="mirror://gentoo/${P}.tar.bz2"
IUSE=""
LICENSE="GPL-1"
SLOT="0"
KEYWORDS="-* sparc"
RDEPEND="${DEPEND}
sys-apps/util-linux"
src_unpack() {
unpack ${A}
##
# Patch rc.afb to handle both kernels 2.4.x and 2.6.x
einfo "Patching to handle both kernel 2.4.x and 2.6.x style afb identification"
cd "${S}"
epatch "${FILESDIR}"/rc.afb-${PVR}.patch || die "Cannot patch rc.afb init script"
einfo 'Patching afbinit.c to use MMAP_PUBLIC (needed for kernels > 2.6.14)'
epatch "${FILESDIR}"/afbinit-mmap-${PV}.patch || die "Cannot patch for mmap"
}
src_compile() {
emake || die "make failed"
}
src_install() {
dosbin afbinit
dosbin rc.afb
newinitd "${FILESDIR}"/afbinit.init afbinit
}
pkg_postinst() {
einfo "To use afbinit, you'll need the AFB microcode."
einfo "This is available via a Solaris install at /usr/lib/afb.ucode"
einfo "or via sun.com"
}
|