summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2010-06-20 11:06:03 +0000
committerwiz <wiz@pkgsrc.org>2010-06-20 11:06:03 +0000
commitfdf2165477647760a73a7aa9b1a692b09a68e14c (patch)
tree1e55ba7e0675cdcc6cef48d8511a9b3ceddb2e51 /sysutils
parentea637edfd42b998f4a82d5dc0ec87ec2ed5d031a (diff)
downloadpkgsrc-fdf2165477647760a73a7aa9b1a692b09a68e14c.tar.gz
Fix build on DragonFly and FreeBSD, by Alexander Polakov in PR 43487.
Enable on FreeBSD-*-i386 FreeBSD-*-x86_64 DragonFly-*-i386.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/915resolution/Makefile3
-rw-r--r--sysutils/915resolution/distinfo4
-rw-r--r--sysutils/915resolution/patches/patch-aa20
3 files changed, 20 insertions, 7 deletions
diff --git a/sysutils/915resolution/Makefile b/sysutils/915resolution/Makefile
index 0e4611477f0..18501d1e5e6 100644
--- a/sysutils/915resolution/Makefile
+++ b/sysutils/915resolution/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2009/08/19 08:41:45 ghen Exp $
+# $NetBSD: Makefile,v 1.5 2010/06/20 11:06:03 wiz Exp $
#
DISTNAME= 915resolution-0.5.3
@@ -12,6 +12,7 @@ COMMENT= BIOS VESA resolution utility for 8XX/9XX Intel chips
PKG_DESTDIR_SUPPORT= user-destdir
ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386
+ONLY_FOR_PLATFORM+= FreeBSD-*-i386 FreeBSD-*-x86_64 DragonFly-*-i386
USE_TOOLS+= gmake
diff --git a/sysutils/915resolution/distinfo b/sysutils/915resolution/distinfo
index f536973a7fa..d3d1e3e6340 100644
--- a/sysutils/915resolution/distinfo
+++ b/sysutils/915resolution/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.4 2009/08/19 08:41:45 ghen Exp $
+$NetBSD: distinfo,v 1.5 2010/06/20 11:06:03 wiz Exp $
SHA1 (915resolution-0.5.3.tar.gz) = 377a32d33f1987adf372341c8c6664d5673da9b8
RMD160 (915resolution-0.5.3.tar.gz) = a406c6810bbfcf94c5352ea1b1e9178af4078589
Size (915resolution-0.5.3.tar.gz) = 22583 bytes
-SHA1 (patch-aa) = a37e71ef741cc5c981376db8bcc1eff60c32e2db
+SHA1 (patch-aa) = 63c4cb0a697e18c29129fd1fab6cde8844e69108
SHA1 (patch-ab) = 5e6a865e4f0707390bf0c602aed9f7fc3c2284b4
diff --git a/sysutils/915resolution/patches/patch-aa b/sysutils/915resolution/patches/patch-aa
index f40626f99e4..ec95bad2422 100644
--- a/sysutils/915resolution/patches/patch-aa
+++ b/sysutils/915resolution/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.3 2008/08/25 15:11:47 joerg Exp $
+$NetBSD: patch-aa,v 1.4 2010/06/20 11:06:03 wiz Exp $
---- 915resolution.c.orig 2006-02-02 15:28:34.000000000 +0100
+--- 915resolution.c.orig 2007-04-15 10:46:56.000000000 +0000
+++ 915resolution.c
@@ -22,11 +22,57 @@
#include <string.h>
@@ -21,7 +21,6 @@ $NetBSD: patch-aa,v 1.3 2008/08/25 15:11:47 joerg Exp $
#include <unistd.h>
#include <assert.h>
--
+static uint8_t
+asm_inb(unsigned port)
+{
@@ -43,7 +42,7 @@ $NetBSD: patch-aa,v 1.3 2008/08/25 15:11:47 joerg Exp $
+ __asm volatile("inl %w1,%0" : "=a" (data) : "d" (port));
+ return data;
+}
-+
+
+static __inline void
+asm_outl(uint32_t data, unsigned port)
+{
@@ -61,3 +60,16 @@ $NetBSD: patch-aa,v 1.3 2008/08/25 15:11:47 joerg Exp $
#define NEW(a) ((a *)(calloc(1, sizeof(a))))
#define FREE(a) (free(a))
+@@ -165,7 +211,12 @@ typedef struct {
+ void initialize_system(char * filename) {
+
+ if (!filename) {
++#if !defined(__FreeBSD__) & !defined(__DragonFly__)
+ if (iopl(3) < 0) {
++#else
++ FILE *iof = fopen("/dev/io", "r");
++ if(iof == NULL) {
++#endif
+ perror("Unable to obtain the proper IO permissions");
+ exit(2);
+ }