diff options
author | joerg <joerg@pkgsrc.org> | 2007-10-29 18:41:24 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2007-10-29 18:41:24 +0000 |
commit | 5c0f407982e9f5d0f60d26a3d910a03313ab8261 (patch) | |
tree | b15468898daa9fdfa0e068bd4d9ad8d2a78f2c67 /sysutils | |
parent | 6aaeebc51c9559e1931a0f1dc9f0bdd923f49ac8 (diff) | |
download | pkgsrc-5c0f407982e9f5d0f60d26a3d910a03313ab8261.tar.gz |
Don't expect the OS to provide inb/outb, just define the assembler
functions directly. Fixes build on NetBSD current. Add DESTDIR support.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/vbetool/Makefile | 4 | ||||
-rw-r--r-- | sysutils/vbetool/distinfo | 4 | ||||
-rw-r--r-- | sysutils/vbetool/patches/patch-ab | 44 |
3 files changed, 32 insertions, 20 deletions
diff --git a/sysutils/vbetool/Makefile b/sysutils/vbetool/Makefile index f5effa1188a..d4fa3a89f8b 100644 --- a/sysutils/vbetool/Makefile +++ b/sysutils/vbetool/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2007/08/08 17:12:44 xtraeme Exp $ +# $NetBSD: Makefile,v 1.5 2007/10/29 18:41:24 joerg Exp $ # DISTNAME= vbetool_0.7-1 @@ -11,6 +11,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://www.srcf.ucam.org/~mjg59/vbetool/ COMMENT= Run real-mode video BIOS code to alter hardware state +PKG_DESTDIR_SUPPORT= user-destdir + ONLY_FOR_PLATFORM+= Linux-*-i386 NetBSD-*-i386 NetBSD-*-x86_64 WRKSRC= ${WRKDIR}/vbetool-0.7 diff --git a/sysutils/vbetool/distinfo b/sysutils/vbetool/distinfo index e9381afb7f5..f11058f3a95 100644 --- a/sysutils/vbetool/distinfo +++ b/sysutils/vbetool/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ +$NetBSD: distinfo,v 1.4 2007/10/29 18:41:24 joerg 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) = 1b5b041ec8dac282a0e8305b82af2c0fe325e1e8 +SHA1 (patch-ab) = 16e42e95d69b98b5ec5886a84bbc294aea942056 SHA1 (patch-ac) = 89b24bd2fadbf40ab614186b53dc339653029919 diff --git a/sysutils/vbetool/patches/patch-ab b/sysutils/vbetool/patches/patch-ab index d1bd911637f..8044bac4f11 100644 --- a/sysutils/vbetool/patches/patch-ab +++ b/sysutils/vbetool/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ +$NetBSD: patch-ab,v 1.4 2007/10/29 18:41:24 joerg Exp $ --- vbetool.c.orig 2006-07-26 03:27:21.000000000 +0200 -+++ vbetool.c 2007-08-08 19:07:18.000000000 +0200 -@@ -8,19 +8,29 @@ ++++ vbetool.c +@@ -8,19 +8,39 @@ This program is released under the terms version 2 */ @@ -24,16 +24,26 @@ $NetBSD: patch-ab,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ +#ifdef __NetBSD__ +#include <machine/sysarch.h> -+#include <machine/pio.h> +#endif + -+/* out* arguments are swapped between NetBSD and linux */ -+#define __outb(v, p) outb((p), (v)) ++static uint8_t ++asm_inb(unsigned port) ++{ ++ uint8_t data; ++ __asm volatile("inb %w1,%0" : "=a" (data) : "d" (port)); ++ return data; ++} ++ ++static __inline void ++asm_outb(uint8_t data, unsigned port) ++{ ++ __asm volatile("outb %0,%w1" : : "a" (data), "d" (port)); ++} + #include "include/lrmi.h" #include "vbetool.h" -@@ -42,8 +52,16 @@ +@@ -42,8 +62,16 @@ int vbetool_init (void) { exit(1); } @@ -50,7 +60,7 @@ $NetBSD: patch-ab,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ pacc = pci_alloc(); pacc->numeric_ids = 1; -@@ -256,7 +274,9 @@ +@@ -256,7 +284,9 @@ void restore_state_from(char *data) LRMI_free_real(data); @@ -60,7 +70,7 @@ $NetBSD: patch-ab,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ } -@@ -476,23 +496,25 @@ +@@ -476,23 +506,25 @@ int check_console() return 11; } @@ -75,10 +85,10 @@ $NetBSD: patch-ab,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ - outb(0x01 | inb(0x3C3), 0x3C3); - outb(0x08 | inb(0x46e8), 0x46e8); - outb(0x01 | inb(0x102), 0x102); -+ __outb(0x03 | inb(0x3CC), 0x3C2); -+ __outb(0x01 | inb(0x3C3), 0x3C3); -+ __outb(0x08 | inb(0x46e8), 0x46e8); -+ __outb(0x01 | inb(0x102), 0x102); ++ asm_outb(0x03 | asm_inb(0x3CC), 0x3C2); ++ asm_outb(0x01 | asm_inb(0x3C3), 0x3C3); ++ asm_outb(0x08 | asm_inb(0x46e8), 0x46e8); ++ asm_outb(0x01 | asm_inb(0x102), 0x102); return 0; } @@ -87,10 +97,10 @@ $NetBSD: patch-ab,v 1.3 2007/08/08 17:12:44 xtraeme Exp $ - outb(~0x01 & inb(0x3C3), 0x3C3); - outb(~0x08 & inb(0x46e8), 0x46e8); - outb(~0x01 & inb(0x102), 0x102); -+ __outb(~0x03 & inb(0x3CC), 0x3C2); -+ __outb(~0x01 & inb(0x3C3), 0x3C3); -+ __outb(~0x08 & inb(0x46e8), 0x46e8); -+ __outb(~0x01 & inb(0x102), 0x102); ++ asm_outb(~0x03 & asm_inb(0x3CC), 0x3C2); ++ asm_outb(~0x01 & asm_inb(0x3C3), 0x3C3); ++ asm_outb(~0x08 & asm_inb(0x46e8), 0x46e8); ++ asm_outb(~0x01 & asm_inb(0x102), 0x102); return 0; } |