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

View File

@@ -0,0 +1 @@
List/set the BIOS VESA resolution for 855/865/915 Intel graphics chips.

View File

@@ -0,0 +1,30 @@
# $NetBSD: Makefile,v 1.10 2012/10/23 19:50:50 asau Exp $
#
DISTNAME= 855resolution-0.4
PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ${HOMEPAGE}
EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://perso.orange.fr/apoirier/
COMMENT= BIOS VESA resolution utility for 855/865/915 Intel chips
ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386
WRKSRC= ${WRKDIR}/855resolution
USE_TOOLS+= gmake
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD"
MAKE_ENV+= EXTRA_LIBS=-l${MACHINE_ARCH}
.endif
INSTALLATION_DIRS= sbin share/doc/855resolution
post-install:
${INSTALL_DATA} ${WRKSRC}/README.txt ${DESTDIR}${PREFIX}/share/doc/855resolution
.include "../../mk/bsd.pkg.mk"

View File

@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.4 2009/06/14 18:16:00 joerg Exp $
sbin/855resolution
share/doc/855resolution/README.txt

View File

@@ -0,0 +1,9 @@
$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) = 130589b5a08f13fa1186e6b3ed95203f69e5b6f0
SHA1 (patch-ab) = 0b7dfd0889d5070d21c8a7ce64cfd2ebaecb5435
SHA1 (patch-ac) = 189eb0b045caeb0389b5d8dfc099d76b9692ef5b
SHA1 (patch-ad) = f81a001140a0439502fcc274974829bc145e0f76

View File

@@ -0,0 +1,51 @@
$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
@@ -15,7 +15,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/io.h>
#include "vbios.h"
#include "plugin.h"
@@ -169,7 +168,7 @@
modes = find_modes(&plugin);
if(plugin == NULL)
{
- fprintf(stderr, "Unknow VBIOS structure\n");
+ fprintf(stderr, "Unknown VBIOS structure\n");
close_bios();
return 2;
}
--- plugins/plugin1.c 2005-05-08 15:56:35.000000000 -0400
+++ plugins/plugin1.c 2005-10-11 17:22:30.000000000 -0400
@@ -12,7 +12,6 @@
*/
#include <stdio.h>
-#include <sys/io.h>
#include "../plugin.h"
--- plugins/plugin2.c 2005-05-08 15:55:57.000000000 -0400
+++ plugins/plugin2.c 2005-10-11 17:22:34.000000000 -0400
@@ -14,7 +14,6 @@
/* VBIOS as found on the Dell 510m */
#include <stdio.h>
-#include <sys/io.h>
#include "../plugin.h"
--- plugins/plugin3.c 2005-05-08 15:55:55.000000000 -0400
+++ plugins/plugin3.c 2005-10-11 17:22:38.000000000 -0400
@@ -12,7 +12,6 @@
*/
#include <stdio.h>
-#include <sys/io.h>
#include "../plugin.h"

View File

@@ -0,0 +1,31 @@
$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
@@ -3,14 +3,15 @@
# Uncomment this line if you want to test with a VBIOS image file
# VBIOS_FILE:=-DVBIOS_FILE='"../dump/vbios-865.dmp"'
+PREFIX?=/usr
PLUGINS_SRCS:=${shell ls plugins/*.c}
SRCS=855resolution.c vbios.c plugin.c ${PLUGINS_SRCS}
OBJS=${SRCS:.c=.o}
-PLUGINS_LIST:=${shell cd plugins;ls -x *.c | sed -e 's/.c//g' -e 's/ */,/g' }
+PLUGINS_LIST:=${shell cd plugins;ls -x *.c | sed -e 's/.c/,/g' -e 's/,[ ]*$$//g' }
PLUGINS_ADDR:=${shell echo ${PLUGINS_LIST} | sed -e 's/^/\&/g' -e 's/,/,\&/g' }
VERSION:=${shell cat VERSION.txt}
-LDLIBS:=-lm
+LDLIBS:=-lm ${EXTRA_LIBS}
CFLAGS:=-Wall -I`pwd` -DVERSION='"${VERSION}"' -DPLUGINS='${PLUGINS_LIST}' -DREF_PLUGINS='${PLUGINS_ADDR}' ${VBIOS_FILE}
LDFLAGS:=-s
@@ -23,7 +24,7 @@
rm -f ${OBJS} ${PRG} *~ plugins/*~
install: ${PRG}
- cp ${PRG} /usr/sbin
+ ${BSD_INSTALL_PROGRAM} ${PRG} ${DESTDIR}${PREFIX}/sbin
distrib: clean
tar -C .. -zcvf /tmp/${PRG}-`cat VERSION.txt`.tgz --exclude '.*' ${PRG}

View File

@@ -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;

View File

@@ -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;