mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Build native nstead of installing a linux binary.
Bump PORTREVISION for this change. PR: ports/104434 Approved by: Remington L <mrl0lz@gmail.com> (maintainer)
This commit is contained in:
parent
112ac451c9
commit
a99581e394
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=175719
3 changed files with 97 additions and 7 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
PORTNAME= 915resolution
|
||||
PORTVERSION= 0.5.2
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://www.geocities.com/stomljen/ \
|
||||
|
@ -15,14 +16,14 @@ MASTER_SITE_SUBDIR= ehaupt
|
|||
MAINTAINER= MrL0Lz@gmail.com
|
||||
COMMENT= Resolution tool for Intel i915 video cards
|
||||
|
||||
USE_LINUX= yes
|
||||
NO_BUILD= yes
|
||||
ONLY_FOR_ARCHS= i386
|
||||
|
||||
PLIST_FILES= bin/915resolution
|
||||
ALL_TARGET= 915resolution
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && \
|
||||
${CC} ${CFLAGS} 915resolution.c -o 915resolution
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/915resolution ${PREFIX}/bin
|
||||
${BRANDELF} -t Linux ${PREFIX}/bin/915resolution
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
90
sysutils/915resolution/files/patch-915resolution.c
Normal file
90
sysutils/915resolution/files/patch-915resolution.c
Normal file
|
@ -0,0 +1,90 @@
|
|||
--- 915resolution.c.orig Fri Feb 3 01:28:34 2006
|
||||
+++ 915resolution.c Sun Oct 15 20:39:56 2006
|
||||
@@ -21,8 +21,10 @@
|
||||
#define __USE_GNU
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
+#include <machine/cpufunc.h>
|
||||
+#define OUTB(a, b) outb(b, a)
|
||||
+#define OUTL(a, b) outl(b, a)
|
||||
#include <fcntl.h>
|
||||
-#include <sys/io.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -161,7 +163,8 @@
|
||||
void initialize_system(char * filename) {
|
||||
|
||||
if (!filename) {
|
||||
- if (iopl(3) < 0) {
|
||||
+ FILE* iof = fopen("/dev/io", "r");
|
||||
+ if (iof == NULL) {
|
||||
perror("Unable to obtain the proper IO permissions");
|
||||
exit(2);
|
||||
}
|
||||
@@ -169,7 +172,7 @@
|
||||
}
|
||||
|
||||
cardinal get_chipset_id(void) {
|
||||
- outl(0x80000000, 0xcf8);
|
||||
+ OUTL(0x80000000, 0xcf8);
|
||||
return inl(0xcfc);
|
||||
}
|
||||
|
||||
@@ -476,11 +479,11 @@
|
||||
case CT_UNKWN:
|
||||
break;
|
||||
case CT_855GM:
|
||||
- outl(0x8000005a, 0xcf8);
|
||||
+ OUTL(0x8000005a, 0xcf8);
|
||||
map->b1 = inb(0xcfe);
|
||||
|
||||
- outl(0x8000005a, 0xcf8);
|
||||
- outb(0x33, 0xcfe);
|
||||
+ OUTL(0x8000005a, 0xcf8);
|
||||
+ OUTB(0x33, 0xcfe);
|
||||
break;
|
||||
case CT_845G:
|
||||
case CT_865G:
|
||||
@@ -488,13 +491,13 @@
|
||||
case CT_915GM:
|
||||
case CT_945G:
|
||||
case CT_945GM:
|
||||
- outl(0x80000090, 0xcf8);
|
||||
+ OUTL(0x80000090, 0xcf8);
|
||||
map->b1 = inb(0xcfd);
|
||||
map->b2 = inb(0xcfe);
|
||||
|
||||
- outl(0x80000090, 0xcf8);
|
||||
- outb(0x33, 0xcfd);
|
||||
- outb(0x33, 0xcfe);
|
||||
+ OUTL(0x80000090, 0xcf8);
|
||||
+ OUTB(0x33, 0xcfd);
|
||||
+ OUTB(0x33, 0xcfe);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -526,8 +529,8 @@
|
||||
case CT_UNKWN:
|
||||
break;
|
||||
case CT_855GM:
|
||||
- outl(0x8000005a, 0xcf8);
|
||||
- outb(map->b1, 0xcfe);
|
||||
+ OUTL(0x8000005a, 0xcf8);
|
||||
+ OUTB(map->b1, 0xcfe);
|
||||
break;
|
||||
case CT_845G:
|
||||
case CT_865G:
|
||||
@@ -535,9 +538,9 @@
|
||||
case CT_915GM:
|
||||
case CT_945G:
|
||||
case CT_945GM:
|
||||
- outl(0x80000090, 0xcf8);
|
||||
- outb(map->b1, 0xcfd);
|
||||
- outb(map->b2, 0xcfe);
|
||||
+ OUTL(0x80000090, 0xcf8);
|
||||
+ OUTB(map->b1, 0xcfd);
|
||||
+ OUTB(map->b2, 0xcfe);
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
This is a resolution hack for Intel 915 based video cards. Based on code
|
||||
written by Alain Poirer for Linux, modified by Steve Tomljenovic. Binary
|
||||
install, source code included.
|
||||
written by Alain Poirer for Linux, modified by Steve Tomljenovic.
|
||||
|
||||
WWW: http://www.geocities.com/stomljen/
|
||||
|
|
Loading…
Add table
Reference in a new issue