pkgsrc-Users archive

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

915resolution support for DragonFly



Hi,

Here is the patch against pkgsrc-2006Q4.

Sergey

diff -rupN sysutils/915resolution.orig/Makefile sysutils/915resolution/Makefile
--- sysutils/915resolution.orig/Makefile        2007-02-05 01:43:38.000000000 
+0200
+++ sysutils/915resolution/Makefile     2007-02-05 05:12:40.000000000 +0200
@@ -9,7 +9,7 @@ MAINTAINER=     pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      http://www.geocities.com/stomljen/
 COMMENT=       BIOS VESA resolution utility for 8XX/9XX Intel chips
 
-ONLY_FOR_PLATFORM=     NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386
+ONLY_FOR_PLATFORM=     NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386 
DragonFly-*-i386
 
 USE_TOOLS+=    gmake
 
diff -rupN sysutils/915resolution.orig/distinfo sysutils/915resolution/distinfo
--- sysutils/915resolution.orig/distinfo        2006-11-13 06:15:02.000000000 
+0200
+++ sysutils/915resolution/distinfo     2007-02-05 05:15:53.000000000 +0200
@@ -3,5 +3,5 @@ $NetBSD: distinfo,v 1.2 2006/11/13 04:15
 SHA1 (915resolution-0.5.2.tar.gz) = 9f26eb1b728ca0b2d28c948207b034a49b477089
 RMD160 (915resolution-0.5.2.tar.gz) = 722b352a83f41f0e9822ed4e096e8064f239dcc1
 Size (915resolution-0.5.2.tar.gz) = 21183 bytes
-SHA1 (patch-aa) = 8556275046ccc2a9ebabe03b422b2b764bacbc9d
+SHA1 (patch-aa) = 2058751d7419ed6f9f1773e74de9273476d97209
 SHA1 (patch-ab) = b65a38c9c7edd95f295619c9cdedc26449b3f177
diff -rupN sysutils/915resolution.orig/patches/patch-aa 
sysutils/915resolution/patches/patch-aa
--- sysutils/915resolution.orig/patches/patch-aa        2006-11-13 
06:15:02.000000000 +0200
+++ sysutils/915resolution/patches/patch-aa     2007-02-05 05:12:01.000000000 
+0200
@@ -1,8 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2006/11/13 04:15:02 obache Exp $
-
---- 915resolution.c.orig       2006-02-02 23:28:34.000000000 +0900
-+++ 915resolution.c
-@@ -22,7 +22,22 @@
+--- 915resolution.c.orig       2006-02-02 16:28:34.000000000 +0200
++++ 915resolution.c    2007-02-05 05:06:58.000000000 +0200
+@@ -22,7 +22,28 @@
  #include <string.h>
  #include <sys/mman.h>
  #include <fcntl.h>
@@ -22,10 +20,29 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
 +#define OUTL(a, b)     outl(b, a)
 +#define OUTB(a, b)     outb(b, a)
 +#endif
++#ifdef __DragonFly__
++#include <cpu/cpufunc.h>
++#define OUTL(a, b)     outl(b, a)
++#define OUTB(a, b)     outb(b, a)
++#define memmem(a, b, c, d)      strstr(a, c)
++#endif
  #include <unistd.h>
  #include <assert.h>
  
-@@ -169,7 +184,7 @@ void initialize_system(char * filename) 
+@@ -161,7 +182,12 @@ typedef struct {
+ void initialize_system(char * filename) {
+ 
+     if (!filename) {
++#ifdef __DragonFly__
++        FILE *iof = fopen("/dev/io", "r");
++        if (iof == NULL) {
++#else
+         if (iopl(3) < 0) {
++#endif
+             perror("Unable to obtain the proper IO permissions");
+             exit(2);
+         }
+@@ -169,7 +195,7 @@ void initialize_system(char * filename) 
  }
  
  cardinal get_chipset_id(void) {
@@ -34,7 +51,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
      return inl(0xcfc);
  }
  
-@@ -476,11 +491,11 @@ void unlock_vbios(vbios_map * map) {
+@@ -476,11 +502,11 @@ void unlock_vbios(vbios_map * map) {
          case CT_UNKWN:
              break;
          case CT_855GM:
@@ -49,7 +66,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
              break;
          case CT_845G:
          case CT_865G:
-@@ -488,13 +503,13 @@ void unlock_vbios(vbios_map * map) {
+@@ -488,13 +514,13 @@ void unlock_vbios(vbios_map * map) {
          case CT_915GM:
          case CT_945G:
          case CT_945GM:
@@ -67,7 +84,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
              break;
          }
      }
-@@ -526,8 +541,8 @@ void relock_vbios(vbios_map * map) {
+@@ -526,8 +552,8 @@ void relock_vbios(vbios_map * map) {
          case CT_UNKWN:
              break;
          case CT_855GM:
@@ -78,7 +95,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
              break;
          case CT_845G:
          case CT_865G:
-@@ -535,9 +550,9 @@ void relock_vbios(vbios_map * map) {
+@@ -535,9 +561,9 @@ void relock_vbios(vbios_map * map) {
          case CT_915GM:
          case CT_945G:
          case CT_945GM:



Home | Main Index | Thread Index | Old Index