pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/855resolution Fix build on amd64, make destdi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/81666395f80e
branches:  trunk
changeset: 546255:81666395f80e
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Aug 25 14:46:29 2008 +0000

description:
Fix build on amd64, make destdir safe.

diffstat:

 sysutils/855resolution/Makefile         |   9 ++-
 sysutils/855resolution/distinfo         |   8 +-
 sysutils/855resolution/patches/patch-aa |  96 +--------------------------------
 sysutils/855resolution/patches/patch-ab |   4 +-
 sysutils/855resolution/patches/patch-ac |  25 ++++++++
 sysutils/855resolution/patches/patch-ad |  56 +++++++++++++++++++
 6 files changed, 95 insertions(+), 103 deletions(-)

diffs (260 lines):

diff -r 28ac142b712d -r 81666395f80e sysutils/855resolution/Makefile
--- a/sysutils/855resolution/Makefile   Mon Aug 25 12:52:00 2008 +0000
+++ b/sysutils/855resolution/Makefile   Mon Aug 25 14:46:29 2008 +0000
@@ -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 @@
 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 @@
 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 -r 28ac142b712d -r 81666395f80e sysutils/855resolution/distinfo
--- a/sysutils/855resolution/distinfo   Mon Aug 25 12:52:00 2008 +0000
+++ b/sysutils/855resolution/distinfo   Mon Aug 25 14:46:29 2008 +0000
@@ -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 -r 28ac142b712d -r 81666395f80e sysutils/855resolution/patches/patch-aa
--- a/sysutils/855resolution/patches/patch-aa   Mon Aug 25 12:52:00 2008 +0000
+++ b/sysutils/855resolution/patches/patch-aa   Mon Aug 25 14:46:29 2008 +0000
@@ -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 @@
  
  #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 -r 28ac142b712d -r 81666395f80e sysutils/855resolution/patches/patch-ab
--- a/sysutils/855resolution/patches/patch-ab   Mon Aug 25 12:52:00 2008 +0000
+++ b/sysutils/855resolution/patches/patch-ab   Mon Aug 25 14:46:29 2008 +0000
@@ -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 @@
  
  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 -r 28ac142b712d -r 81666395f80e sysutils/855resolution/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/855resolution/patches/patch-ac   Mon Aug 25 14:46:29 2008 +0000
@@ -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 -r 28ac142b712d -r 81666395f80e sysutils/855resolution/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/855resolution/patches/patch-ad   Mon Aug 25 14:46:29 2008 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index