summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFerris McCormick <fmccor@gentoo.org>2008-03-18 18:16:25 +0000
committerFerris McCormick <fmccor@gentoo.org>2008-03-18 18:16:25 +0000
commit8f92c70193e656cd495c57cc61083639b4a4ab73 (patch)
tree759965d767d13f1f73e829e9f1ba60187a451e2c /x11-misc/afbinit
parentExperimental branch version bump. (diff)
downloadgentoo-2-8f92c70193e656cd495c57cc61083639b4a4ab73.tar.gz
gentoo-2-8f92c70193e656cd495c57cc61083639b4a4ab73.tar.bz2
gentoo-2-8f92c70193e656cd495c57cc61083639b4a4ab73.zip
Relax tests for Elite framebuffers to help with initrd systems. Please see ChangeLog.
(Portage version: 2.2_pre4)
Diffstat (limited to 'x11-misc/afbinit')
-rw-r--r--x11-misc/afbinit/ChangeLog15
-rw-r--r--x11-misc/afbinit/afbinit-1.0.1-r7.ebuild45
-rw-r--r--x11-misc/afbinit/files/rc.afb-1.0.1-r7.patch61
-rw-r--r--x11-misc/afbinit/metadata.xml8
4 files changed, 126 insertions, 3 deletions
diff --git a/x11-misc/afbinit/ChangeLog b/x11-misc/afbinit/ChangeLog
index 8d878fb88b2e..982980fb5dbd 100644
--- a/x11-misc/afbinit/ChangeLog
+++ b/x11-misc/afbinit/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for x11-misc/afbinit
-# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/afbinit/ChangeLog,v 1.22 2007/10/31 16:52:29 fmccor Exp $
+# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/afbinit/ChangeLog,v 1.23 2008/03/18 18:16:23 fmccor Exp $
+
+*afbinit-1.0.1-r7 (18 Mar 2008)
+
+ 18 Mar 2008; Ferris McCormick <fmccor@gentoo.org>
+ +files/rc.afb-1.0.1-r7.patch, metadata.xml, +afbinit-1.0.1-r7.ebuild:
+ Version bump to 1.0.1-r7 to help with systems using an initram. It can happen
+ on these systems that the AFB information is gone from the dmesg output by the
+ time that afbinit wants to load the microcode. If this happens, older
+ versions will not see the Elite frame buffer and so the load will fail. In
+ this version, with current kernels we just look unconditionally at any
+ /proc/fb devices.
*afbinit-1.0.1-r6 (31 Oct 2007)
diff --git a/x11-misc/afbinit/afbinit-1.0.1-r7.ebuild b/x11-misc/afbinit/afbinit-1.0.1-r7.ebuild
new file mode 100644
index 000000000000..aeea8c55e714
--- /dev/null
+++ b/x11-misc/afbinit/afbinit-1.0.1-r7.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/afbinit/afbinit-1.0.1-r7.ebuild,v 1.1 2008/03/18 18:16:23 fmccor Exp $
+
+inherit eutils
+
+DESCRIPTION="loads the microcode for Elite3D framebuffers to use X"
+HOMEPAGE="I dont have a home :("
+SRC_URI="http://cvs.gentoo.org/~weeve/files/${P}.tar.bz2"
+IUSE=""
+
+LICENSE="GPL-1"
+SLOT="0"
+KEYWORDS="-* ~sparc"
+
+DEPEND="virtual/libc"
+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"
+}
diff --git a/x11-misc/afbinit/files/rc.afb-1.0.1-r7.patch b/x11-misc/afbinit/files/rc.afb-1.0.1-r7.patch
new file mode 100644
index 000000000000..0105a2aeef4a
--- /dev/null
+++ b/x11-misc/afbinit/files/rc.afb-1.0.1-r7.patch
@@ -0,0 +1,61 @@
+--- rc.afb- 1999-09-08 06:42:36.000000000 +0000
++++ rc.afb 2008-03-18 17:55:11.000000000 +0000
+@@ -10,11 +10,6 @@
+ exit 0
+ fi
+
+-if [ `/bin/dmesg | /bin/grep -c "Elite 3D"` -eq 0 ]
+-then
+- exit 0
+-fi
+-
+ # The microcode loader binary and the microcode
+ # itself must exist.
+ if [ ! -x /usr/sbin/afbinit -o ! -f /usr/lib/afb.ucode ]
+@@ -22,13 +17,37 @@
+ exit 0
+ fi
+
+-# Make FB device list.
+-afb_devs=`/bin/dmesg | /bin/egrep -i "Elite 3D" | /bin/sed 's/\:.*//'`
++# Make FB device list, depending on which kind of kernel we have.
++# First, try kernel 2.4.x
++
++if [ `/bin/dmesg | /bin/grep -c "Elite 3D"` -gt 0 ]
++then
++
++ afb_devs=`/bin/dmesg | /bin/egrep -i "Elite 3D" | /bin/sed 's/\:.*//'`
++
++ # Load microcode onto each card.
++ for AFB in ${afb_devs}
++ do
++ echo -n "${AFB}: Loading Elite3D microcode... "
++ /usr/sbin/afbinit /dev/${AFB} /usr/lib/afb.ucode
++ echo "done."
++ done
++ exit 0
++else
++##
++# OK, we're not kernel 2.4.x
++# try kernel 2.6.x
++
++## if [ `/bin/dmesg | /bin/grep -c "AFB"` -gt 0 ]
++## then
+
+-# Load microcode onto each card.
+-for AFB in ${afb_devs}
+-do
+- echo -n "${AFB}: Loading Elite3D microcode... "
+- /usr/sbin/afbinit /dev/${AFB} /usr/lib/afb.ucode
+- echo "done."
+-done
++ afb_devs=`/bin/more -s /proc/fb | /bin/egrep -i "Elite 3D" | /bin/sed 's/\ .*//'`
++ # Load microcode onto each card.
++ for AFB in ${afb_devs}
++ do
++ echo -n "/dev/fb${AFB}: Loading Elite3D microcode... "
++ /usr/sbin/afbinit /dev/fb${AFB} /usr/lib/afb.ucode
++ echo "done."
++ done
++ exit 0
++fi
diff --git a/x11-misc/afbinit/metadata.xml b/x11-misc/afbinit/metadata.xml
index 40838bc36783..fb1d65b68b23 100644
--- a/x11-misc/afbinit/metadata.xml
+++ b/x11-misc/afbinit/metadata.xml
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<herd>desktop-misc</herd>
+
+ <herd>desktop-misc</herd>
+
+ <maintainer>
+ <email>fmccor@gentoo.org</email>
+ </maintainer>
+
</pkgmetadata>