summaryrefslogtreecommitdiff
path: root/sysutils/vbetool
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2007-08-08 12:00:34 +0000
committerxtraeme <xtraeme>2007-08-08 12:00:34 +0000
commitbc8e781e74fd18bf32f91d50daa6560c7aaef046 (patch)
treefefce61855ff897161b1da542c27e2749ff59a0e /sysutils/vbetool
parent02c73c9e27227c94a29bd30bc82889a0c4c46dff (diff)
downloadpkgsrc-bc8e781e74fd18bf32f91d50daa6560c7aaef046.tar.gz
vbetool uses lrmi in order to run code from the video BIOS.
Currently, it is able to alter DPMS states, save/restore video card state and attempt to initialize the video card from scratch. -- Requested by jmcneill@.
Diffstat (limited to 'sysutils/vbetool')
-rw-r--r--sysutils/vbetool/DESCR3
-rw-r--r--sysutils/vbetool/Makefile23
-rw-r--r--sysutils/vbetool/PLIST3
-rw-r--r--sysutils/vbetool/distinfo8
-rw-r--r--sysutils/vbetool/patches/patch-aa16
-rw-r--r--sysutils/vbetool/patches/patch-ab65
-rw-r--r--sysutils/vbetool/patches/patch-ac27
7 files changed, 145 insertions, 0 deletions
diff --git a/sysutils/vbetool/DESCR b/sysutils/vbetool/DESCR
new file mode 100644
index 00000000000..03416e50d66
--- /dev/null
+++ b/sysutils/vbetool/DESCR
@@ -0,0 +1,3 @@
+vbetool uses lrmi in order to run code from the video BIOS.
+Currently, it is able to alter DPMS states, save/restore video card
+state and attempt to initialize the video card from scratch.
diff --git a/sysutils/vbetool/Makefile b/sysutils/vbetool/Makefile
new file mode 100644
index 00000000000..339ebbf7a99
--- /dev/null
+++ b/sysutils/vbetool/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
+#
+
+DISTNAME= vbetool_0.7-1
+PKGNAME= ${DISTNAME:S/_/-/}
+CATEGORIES= sysutils
+MASTER_SITES= http://www.srcf.ucam.org/~mjg59/vbetool/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://www.srcf.ucam.org/~mjg59/vbetool/
+COMMENT= Run real-mode video BIOS code to alter hardware state
+
+ONLY_FOR_PLATFORM+= Linux-*-i386 NetBSD-*-i386
+
+WRKSRC= ${WRKDIR}/vbetool-0.7
+USE_TOOLS+= gmake
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-x86emu
+
+LIBS.NetBSD+= -li386
+
+.include "../../sysutils/pciutils/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/vbetool/PLIST b/sysutils/vbetool/PLIST
new file mode 100644
index 00000000000..1b9572b68d0
--- /dev/null
+++ b/sysutils/vbetool/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
+sbin/vbetool
+man/man1/vbetool.1
diff --git a/sysutils/vbetool/distinfo b/sysutils/vbetool/distinfo
new file mode 100644
index 00000000000..b23f6cce3fc
--- /dev/null
+++ b/sysutils/vbetool/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
+
+SHA1 (vbetool_0.7-1.tar.gz) = 49c86aa6fb877f35a0b336d6aa1d6b204c2cc66f
+RMD160 (vbetool_0.7-1.tar.gz) = b5a5d3a0794f8dbb06c78373e15c26d9536d8303
+Size (vbetool_0.7-1.tar.gz) = 176277 bytes
+SHA1 (patch-aa) = d27a3dd8eb1943c3f30351996483a01638521e90
+SHA1 (patch-ab) = fdad8415986c84599d16e28ebcab524a231eaae3
+SHA1 (patch-ac) = 89b24bd2fadbf40ab614186b53dc339653029919
diff --git a/sysutils/vbetool/patches/patch-aa b/sysutils/vbetool/patches/patch-aa
new file mode 100644
index 00000000000..2f3e8c3b2c9
--- /dev/null
+++ b/sysutils/vbetool/patches/patch-aa
@@ -0,0 +1,16 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
+
+--- thunk.c.orig 2007-08-08 13:29:17.000000000 +0200
++++ thunk.c 2007-08-08 13:29:52.000000000 +0200
+@@ -11,7 +11,11 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <sys/mman.h>
++#ifdef __NetBSD__
++#include <machine/pio.h>
++#else
+ #include <sys/io.h>
++#endif
+ #include <string.h>
+ #include <sys/ipc.h>
+ #include <sys/shm.h>
diff --git a/sysutils/vbetool/patches/patch-ab b/sysutils/vbetool/patches/patch-ab
new file mode 100644
index 00000000000..ab441b80325
--- /dev/null
+++ b/sysutils/vbetool/patches/patch-ab
@@ -0,0 +1,65 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
+
+--- vbetool.c.orig 2007-08-08 13:30:13.000000000 +0200
++++ vbetool.c 2007-08-08 13:32:10.000000000 +0200
+@@ -8,19 +8,26 @@
+ version 2
+ */
+
+-#include <pci/pci.h>
+ #include <assert.h>
++#include <pciutils/pci.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
++#ifdef __linux__
+ #include <sys/io.h>
+ #include <sys/kd.h>
++#endif
+ #include <sys/stat.h>
+ #include <errno.h>
+
++#ifdef __NetBSD__
++#include <machine/sysarch.h>
++#include <machine/pio.h>
++#endif
++
+ #include "include/lrmi.h"
+ #include "vbetool.h"
+
+@@ -42,8 +49,12 @@
+ exit(1);
+ }
+
++#ifdef __NetBSD__
++ i386_iopl(3);
++#else
+ ioperm(0, 1024, 1);
+ iopl(3);
++#endif
+
+ pacc = pci_alloc();
+ pacc->numeric_ids = 1;
+@@ -256,7 +267,9 @@
+
+ LRMI_free_real(data);
+
++#ifdef __linux__
+ ioctl(0, KDSETMODE, KD_TEXT);
++#endif
+
+ }
+
+@@ -476,7 +489,9 @@
+ return 11;
+ }
+
++#ifdef __linux__
+ ioctl(0, KDSETMODE, KD_GRAPHICS);
++#endif
+ return 0;
+ }
+
diff --git a/sysutils/vbetool/patches/patch-ac b/sysutils/vbetool/patches/patch-ac
new file mode 100644
index 00000000000..bbfce058175
--- /dev/null
+++ b/sysutils/vbetool/patches/patch-ac
@@ -0,0 +1,27 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/08/08 12:00:34 xtraeme Exp $
+
+--- Makefile.in.orig 2006-07-26 03:26:30.000000000 +0200
++++ Makefile.in 2007-08-08 13:51:43.000000000 +0200
+@@ -57,9 +57,9 @@
+ @WITH_X86EMU_TRUE@am__objects_1 = thunk.$(OBJEXT) x86-common.$(OBJEXT)
+ am_vbetool_OBJECTS = vbetool.$(OBJEXT) $(am__objects_1)
+ vbetool_OBJECTS = $(am_vbetool_OBJECTS)
+-@WITH_X86EMU_FALSE@vbetool_DEPENDENCIES = $(libdir)/libpci.a
++@WITH_X86EMU_FALSE@vbetool_DEPENDENCIES = -lpciutils
+ @WITH_X86EMU_TRUE@vbetool_DEPENDENCIES = x86emu/libx86emu.a \
+-@WITH_X86EMU_TRUE@ $(libdir)/libpci.a
++@WITH_X86EMU_TRUE@ -lpciutils
+ DEFAULT_INCLUDES = -I. -I$(srcdir)
+ depcomp = $(SHELL) $(top_srcdir)/depcomp
+ am__depfiles_maybe = depfiles
+@@ -174,8 +174,8 @@
+ SUBDIRS = x86emu
+ @WITH_X86EMU_FALSE@x86 = lrmi.c x86-common.c
+ @WITH_X86EMU_TRUE@x86 = thunk.c x86-common.c
+-@WITH_X86EMU_FALSE@vbetool_LDADD = $(libdir)/libpci.a
+-@WITH_X86EMU_TRUE@vbetool_LDADD = x86emu/libx86emu.a $(libdir)/libpci.a
++@WITH_X86EMU_FALSE@vbetool_LDADD = -lpci -lpciutils
++@WITH_X86EMU_TRUE@vbetool_LDADD = x86emu/libx86emu.a -lpci -lpciutils
+ @WITH_X86EMU_FALSE@x86lib = ""
+ man_MANS = vbetool.1
+ vbetool_SOURCES = vbetool.c $(x86)