aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/vbetool
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2008-12-06 08:40:46 +0800
committerjkim <jkim@FreeBSD.org>2008-12-06 08:40:46 +0800
commita61a6ccb2990665fc38c13c3701c8f012ccd95b2 (patch)
treeaa69ba3b4ca926944350b94bd17438daef2ed3c4 /sysutils/vbetool
parent6211288173ca43e7f359be52e7c5decb38ab63aa (diff)
downloadfreebsd-ports-gnome-a61a6ccb2990665fc38c13c3701c8f012ccd95b2.tar.gz
freebsd-ports-gnome-a61a6ccb2990665fc38c13c3701c8f012ccd95b2.tar.zst
freebsd-ports-gnome-a61a6ccb2990665fc38c13c3701c8f012ccd95b2.zip
vbetool is a small application that executes code from the BIOS of your
video card. This is mostly useful for reinitialising the hardware, for instance after ACPI suspend/resuming. WWW: http://www.codon.org.uk/~mjg59/vbetool/
Diffstat (limited to 'sysutils/vbetool')
-rw-r--r--sysutils/vbetool/Makefile28
-rw-r--r--sysutils/vbetool/distinfo3
-rw-r--r--sysutils/vbetool/files/patch-vbetool.c60
-rw-r--r--sysutils/vbetool/pkg-descr5
4 files changed, 96 insertions, 0 deletions
diff --git a/sysutils/vbetool/Makefile b/sysutils/vbetool/Makefile
new file mode 100644
index 000000000000..ecc787698b91
--- /dev/null
+++ b/sysutils/vbetool/Makefile
@@ -0,0 +1,28 @@
+# Ports collection makefile for: vbetool
+# Date created: 2008-12-05
+# Whom: Jung-uk Kim <jkim@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= vbetool
+PORTVERSION= 1.1
+CATEGORIES= sysutils
+MASTER_SITES= http://www.codon.org.uk/~mjg59/vbetool/download/
+DISTNAME= ${PORTNAME}-${PORTVERSION}
+
+MAINTAINER= jkim@FreeBSD.org
+COMMENT= An application for executing video card BIOS code
+
+LIB_DEPENDS= pci.2:${PORTSDIR}/devel/libpci \
+ x86.1:${PORTSDIR}/devel/libx86
+
+PLIST_FILES= sbin/vbetool
+
+MAN1= vbetool.1
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+=--with-x86emu
+CFLAGS+= -I${PREFIX}/include -L${PREFIX}/lib
+
+.include <bsd.port.mk>
diff --git a/sysutils/vbetool/distinfo b/sysutils/vbetool/distinfo
new file mode 100644
index 000000000000..99154b1ee52e
--- /dev/null
+++ b/sysutils/vbetool/distinfo
@@ -0,0 +1,3 @@
+MD5 (vbetool-1.1.tar.gz) = ffb03b118867a02296d7449019ad8846
+SHA256 (vbetool-1.1.tar.gz) = 4d26ddc43144593742349e69481e3536ce3482faaa9ad4494fdc7c8b7662f954
+SIZE (vbetool-1.1.tar.gz) = 182826
diff --git a/sysutils/vbetool/files/patch-vbetool.c b/sysutils/vbetool/files/patch-vbetool.c
new file mode 100644
index 000000000000..97eb7d0f3870
--- /dev/null
+++ b/sysutils/vbetool/files/patch-vbetool.c
@@ -0,0 +1,60 @@
+--- vbetool.c 2008-05-16 08:56:30.000000000 -0400
++++ vbetool.c 2008-12-03 19:50:36.000000000 -0500
+@@ -16,8 +16,12 @@
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
++#ifdef __FreeBSD__
++#include <machine/cpufunc.h>
++#else
+ #include <sys/io.h>
+ #include <sys/kd.h>
++#endif
+ #include <sys/stat.h>
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -37,6 +41,9 @@
+ #define DPMS_STATE_LOW 0x0800
+
+ static struct pci_access *pacc;
++#ifdef __FreeBSD__
++#define DEV_IO_PATH "/dev/io"
++#endif
+
+ int vbetool_init (void) {
+ if (!LRMI_init()) {
+@@ -44,7 +51,14 @@
+ exit(1);
+ }
+
++#ifdef __FreeBSD__
++ if (open(DEV_IO_PATH, O_RDONLY) < 0) {
++ fprintf(stderr, "Failed to open %s.\n", DEV_IO_PATH);
++ exit(1);
++ }
++#else
+ iopl(3);
++#endif
+
+ pacc = pci_alloc();
+ pacc->numeric_ids = 1;
+@@ -267,7 +281,9 @@
+
+ LRMI_free_real(data);
+
++#ifdef __linux__
+ ioctl(0, KDSETMODE, KD_TEXT);
++#endif
+
+ }
+
+@@ -489,7 +505,9 @@
+ return 11;
+ }
+
++#ifdef __linux__
+ ioctl(0, KDSETMODE, KD_GRAPHICS);
++#endif
+ return 0;
+ }
+
diff --git a/sysutils/vbetool/pkg-descr b/sysutils/vbetool/pkg-descr
new file mode 100644
index 000000000000..b7c78a5688f8
--- /dev/null
+++ b/sysutils/vbetool/pkg-descr
@@ -0,0 +1,5 @@
+vbetool is a small application that executes code from the BIOS of your
+video card. This is mostly useful for reinitialising the hardware,
+for instance after ACPI suspend/resuming.
+
+WWW: http://www.codon.org.uk/~mjg59/vbetool/