Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
915resolution is a tool to modify the video BIOS of the 800 and 900 series
Intel graphics chipsets. This includes the 845G, 855G, and 865G chipsets,
as well as 915G, 915GM, and 945G chipsets. This modification is neccessary
to allow the display of certain graphics resolutions for an Xorg or XFree86
graphics server.
915resolution's modifications of the BIOS are transient. There is no risk
of permanent modification of the BIOS. This also means that 915resolution
must be run every time the computer boots in order for it's changes to
take effect.
915resolution is derived from the tool 855resolution. However, the code
differs substantially. 915resolution's code base is much simpler.
915resolution also allows the modification of bits per pixel.
+29
View File
@@ -0,0 +1,29 @@
# $NetBSD: Makefile,v 1.7 2012/10/23 19:50:50 asau Exp $
#
DISTNAME= 915resolution-0.5.3
CATEGORIES= sysutils
MASTER_SITES= ${HOMEPAGE:Q}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://915resolution.mango-lang.org/
COMMENT= BIOS VESA resolution utility for 8XX/9XX Intel chips
LICENSE= public-domain
ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386
ONLY_FOR_PLATFORM+= FreeBSD-*-i386 FreeBSD-*-x86_64 DragonFly-*-i386
USE_TOOLS+= gmake
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
MAKE_ENV+= LDLIBS=-l${MACHINE_ARCH}
.endif
INSTALLATION_DIRS= sbin share/doc/915resolution
post-install:
${INSTALL_DATA} ${WRKSRC}/README.txt ${DESTDIR}${PREFIX}/share/doc/915resolution
.include "../../mk/bsd.pkg.mk"
+3
View File
@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.2 2009/06/14 18:16:00 joerg Exp $
sbin/915resolution
share/doc/915resolution/README.txt
+7
View File
@@ -0,0 +1,7 @@
$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) = 63c4cb0a697e18c29129fd1fab6cde8844e69108
SHA1 (patch-ab) = 5e6a865e4f0707390bf0c602aed9f7fc3c2284b4
+75
View File
@@ -0,0 +1,75 @@
$NetBSD: patch-aa,v 1.4 2010/06/20 11:06:03 wiz Exp $
--- 915resolution.c.orig 2007-04-15 10:46:56.000000000 +0000
+++ 915resolution.c
@@ -22,11 +22,57 @@
#include <string.h>
#include <sys/mman.h>
#include <fcntl.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
#include <unistd.h>
#include <assert.h>
+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
#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);
}
+23
View File
@@ -0,0 +1,23 @@
$NetBSD: patch-ab,v 1.3 2008/08/25 15:11:47 joerg Exp $
--- Makefile.orig 2006-02-02 23:01:38.000000000 +0900
+++ Makefile
@@ -1,9 +1,10 @@
PRG=915resolution
+PREFIX?=/usr
SRCS=915resolution.c
OBJS=${SRCS:.c=.o}
-CFLAGS:=-s -Wall -ggdb
+all: ${PRG}
${PRG}: ${OBJS}
@@ -11,5 +12,5 @@ clean:
rm -f ${OBJS} ${PRG} *~
install: ${PRG}
- cp ${PRG} /usr/sbin
+ ${BSD_INSTALL_PROGRAM} ${PRG} ${DESTDIR}${PREFIX}/sbin