diff options
author | joerg <joerg> | 2008-08-25 14:46:29 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-08-25 14:46:29 +0000 |
commit | 4d0b064235955ab34f84f5b7441a4dbf4384aafc (patch) | |
tree | a43b47a964f24d5539e3677a7fda71b43a641522 /sysutils/855resolution | |
parent | 5fcad943f9146b4a8196aa56d49e09c50204cfa0 (diff) | |
download | pkgsrc-4d0b064235955ab34f84f5b7441a4dbf4384aafc.tar.gz |
Fix build on amd64, make destdir safe.
Diffstat (limited to 'sysutils/855resolution')
-rw-r--r-- | sysutils/855resolution/Makefile | 9 | ||||
-rw-r--r-- | sysutils/855resolution/distinfo | 8 | ||||
-rw-r--r-- | sysutils/855resolution/patches/patch-aa | 96 | ||||
-rw-r--r-- | sysutils/855resolution/patches/patch-ab | 4 | ||||
-rw-r--r-- | sysutils/855resolution/patches/patch-ac | 25 | ||||
-rw-r--r-- | sysutils/855resolution/patches/patch-ad | 56 |
6 files changed, 95 insertions, 103 deletions
diff --git a/sysutils/855resolution/Makefile b/sysutils/855resolution/Makefile index 0695e37d035..1c5f376d1d2 100644 --- a/sysutils/855resolution/Makefile +++ b/sysutils/855resolution/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2006/11/13 15:00:56 obache Exp $ +# $NetBSD: Makefile,v 1.9 2008/08/25 14:46:29 joerg Exp $ # DISTNAME= 855resolution-0.4 @@ -11,6 +11,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://perso.orange.fr/apoirier/ COMMENT= BIOS VESA resolution utility for 855/865/915 Intel chips +PKG_DESTDIR_SUPPORT= user-destdir + ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386 WRKSRC= ${WRKDIR}/855resolution @@ -22,8 +24,9 @@ USE_TOOLS+= gmake MAKE_ENV+= EXTRA_LIBS=-l${MACHINE_ARCH} .endif +INSTALLATION_DIRS= sbin share/doc/855resolution + post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/855resolution - ${INSTALL_DATA} ${WRKSRC}/README.txt ${PREFIX}/share/doc/855resolution + ${INSTALL_DATA} ${WRKSRC}/README.txt ${DESTDIR}${PREFIX}/share/doc/855resolution .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/855resolution/distinfo b/sysutils/855resolution/distinfo index 2af3c4831e4..02f0cd01d91 100644 --- a/sysutils/855resolution/distinfo +++ b/sysutils/855resolution/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.4 2006/11/13 15:00:56 obache Exp $ +$NetBSD: distinfo,v 1.5 2008/08/25 14:46:29 joerg Exp $ SHA1 (855resolution-0.4.tgz) = aabba504d0592cac676188f1ce73bd25389d8fda RMD160 (855resolution-0.4.tgz) = d075d239257b778f509c8fd96619bfd810194d3b Size (855resolution-0.4.tgz) = 6740 bytes -SHA1 (patch-aa) = b230470c91957efc67b448233140b91a600e7def -SHA1 (patch-ab) = bb8c918da7af28567f05072399170c7cf4293f58 +SHA1 (patch-aa) = 130589b5a08f13fa1186e6b3ed95203f69e5b6f0 +SHA1 (patch-ab) = 0b7dfd0889d5070d21c8a7ce64cfd2ebaecb5435 +SHA1 (patch-ac) = 189eb0b045caeb0389b5d8dfc099d76b9692ef5b +SHA1 (patch-ad) = f81a001140a0439502fcc274974829bc145e0f76 diff --git a/sysutils/855resolution/patches/patch-aa b/sysutils/855resolution/patches/patch-aa index 8f722932b9d..940f2393bf7 100644 --- a/sysutils/855resolution/patches/patch-aa +++ b/sysutils/855resolution/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.3 2006/11/13 15:00:56 obache Exp $ +$NetBSD: patch-aa,v 1.4 2008/08/25 14:46:29 joerg Exp $ --- 855resolution.c 2005-05-08 15:46:02.000000000 -0400 +++ 855resolution.c 2005-10-11 17:24:05.000000000 -0400 @@ -49,97 +49,3 @@ $NetBSD: patch-aa,v 1.3 2006/11/13 15:00:56 obache Exp $ #include "../plugin.h" ---- vbios.c 2005-05-08 15:47:08.000000000 -0400 -+++ vbios.c 2005-10-11 17:21:17.000000000 -0400 -@@ -18,7 +18,6 @@ - #include <string.h> - #include <sys/mman.h> - #include <fcntl.h> --#include <sys/io.h> - - #include "vbios.h" - -@@ -40,7 +39,7 @@ - static unsigned char b1, b2; - - static unsigned int get_chipset(void) { -- outl(0x80000000, 0xcf8); -+ OUTL(0x80000000, 0xcf8); - return inl(0xcfc); - } - -@@ -75,35 +74,35 @@ - void unlock_bios(void) { - if(get_chipset() == CHIPSET_855) - { -- outl(0x8000005a, 0xcf8); -+ OUTL(0x8000005a, 0xcf8); - b1 = inb(0xcfe); - -- outl(0x8000005a, 0xcf8); -- outb(0x33, 0xcfe); -+ OUTL(0x8000005a, 0xcf8); -+ OUTB(0x33, 0xcfe); - } - else - { -- outl(0x80000090, 0xcf8); -+ OUTL(0x80000090, 0xcf8); - b1 = inb(0xcfd); - b2 = inb(0xcfe); - -- outl(0x80000090, 0xcf8); -- outb(0x33, 0xcfd); -- outb(0x33, 0xcfe); -+ OUTL(0x80000090, 0xcf8); -+ OUTB(0x33, 0xcfd); -+ OUTB(0x33, 0xcfe); - } - } - - void relock_bios(void) { - if(get_chipset() == CHIPSET_855) - { -- outl(0x8000005a, 0xcf8); -- outb(b1, 0xcfe); -+ OUTL(0x8000005a, 0xcf8); -+ OUTB(b1, 0xcfe); - } - else - { -- outl(0x80000090, 0xcf8); -- outb(b1, 0xcfd); -- outb(b2, 0xcfe); -+ OUTL(0x80000090, 0xcf8); -+ OUTB(b1, 0xcfd); -+ OUTB(b2, 0xcfe); - } - } - ---- vbios.h 2005-05-08 15:47:45.000000000 -0400 -+++ vbios.h 2005-10-11 17:21:51.000000000 -0400 -@@ -16,6 +16,24 @@ - - #define VBIOS_SIZE 0x10000 - -+#include <sys/types.h> -+#ifdef __linux__ -+#include <sys/io.h> -+#define OUTL(a, b) outl(a, b) -+#define OUTB(a, b) outb(a, b) -+#endif -+#ifdef __NetBSD__ -+#include <machine/pio.h> -+#include <machine/sysarch.h> -+# if defined(__i386__) -+#define iopl(a) i386_iopl(a) -+# elif defined(__x86_64__) -+#define iopl(a) x86_64_iopl(a) -+# endif -+#define OUTL(a, b) outl(b, a) -+#define OUTB(a, b) outb(b, a) -+#endif -+ - struct vbios_mode { - unsigned char mode; - unsigned char bits_per_pixel; diff --git a/sysutils/855resolution/patches/patch-ab b/sysutils/855resolution/patches/patch-ab index 3de8d49a5ee..9f2cdd26518 100644 --- a/sysutils/855resolution/patches/patch-ab +++ b/sysutils/855resolution/patches/patch-ab @@ -1,4 +1,4 @@ -$NetBSD: patch-ab,v 1.2 2006/11/13 15:00:56 obache Exp $ +$NetBSD: patch-ab,v 1.3 2008/08/25 14:46:29 joerg Exp $ --- Makefile.orig 2005-05-08 11:27:59.000000000 -0400 +++ Makefile 2005-10-11 18:12:19.000000000 -0400 @@ -25,7 +25,7 @@ $NetBSD: patch-ab,v 1.2 2006/11/13 15:00:56 obache Exp $ install: ${PRG} - cp ${PRG} /usr/sbin -+ ${BSD_INSTALL_PROGRAM} ${PRG} ${PREFIX}/sbin ++ ${BSD_INSTALL_PROGRAM} ${PRG} ${DESTDIR}${PREFIX}/sbin distrib: clean tar -C .. -zcvf /tmp/${PRG}-`cat VERSION.txt`.tgz --exclude '.*' ${PRG} diff --git a/sysutils/855resolution/patches/patch-ac b/sysutils/855resolution/patches/patch-ac new file mode 100644 index 00000000000..85c3a9610bd --- /dev/null +++ b/sysutils/855resolution/patches/patch-ac @@ -0,0 +1,25 @@ +$NetBSD: patch-ac,v 1.1 2008/08/25 14:46:29 joerg Exp $ + +--- vbios.h.orig 2005-05-08 19:47:45.000000000 +0000 ++++ vbios.h +@@ -16,6 +16,20 @@ + + #define VBIOS_SIZE 0x10000 + ++#include <sys/types.h> ++#ifdef __linux__ ++#include <sys/io.h> ++#endif ++#ifdef __NetBSD__ ++#include <machine/pio.h> ++#include <machine/sysarch.h> ++# if defined(__i386__) ++#define iopl(a) i386_iopl(a) ++# elif defined(__x86_64__) ++#define iopl(a) x86_64_iopl(a) ++# endif ++#endif ++ + struct vbios_mode { + unsigned char mode; + unsigned char bits_per_pixel; diff --git a/sysutils/855resolution/patches/patch-ad b/sysutils/855resolution/patches/patch-ad new file mode 100644 index 00000000000..711f75e912c --- /dev/null +++ b/sysutils/855resolution/patches/patch-ad @@ -0,0 +1,56 @@ +$NetBSD: patch-ad,v 1.1 2008/08/25 14:46:29 joerg Exp $ + +--- vbios.c.orig 2005-05-08 19:47:08.000000000 +0000 ++++ vbios.c +@@ -18,7 +18,6 @@ + #include <string.h> + #include <sys/mman.h> + #include <fcntl.h> +-#include <sys/io.h> + + #include "vbios.h" + +@@ -34,6 +33,43 @@ + #define VBIOS_OFFSET_IN_FILE 0 + #endif + ++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)); ++} ++ ++static uint32_t ++asm_inl(unsigned port) ++{ ++ uint32_t data; ++ __asm volatile("inl %w1,%0" : "=a" (data) : "d" (port)); ++ return data; ++} ++ ++static __inline void ++asm_outl(uint32_t data, unsigned port) ++{ ++ __asm volatile("outl %0,%w1" : : "a" (data), "d" (port)); ++} ++ ++#undef inb ++#undef outb ++#define inb asm_inb ++#define outb asm_outb ++#undef inl ++#undef outl ++#define inl asm_inl ++#define outl asm_outl ++ + unsigned char *bios = 0; + + static int biosfd = 0; |