pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/915resolution Fix build on amd64, add destdir...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2ff4b5bda271
branches: trunk
changeset: 546256:2ff4b5bda271
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Aug 25 15:11:47 2008 +0000
description:
Fix build on amd64, add destdir support.
diffstat:
sysutils/915resolution/Makefile | 9 +-
sysutils/915resolution/distinfo | 6 +-
sysutils/915resolution/patches/patch-aa | 114 +++++++++++--------------------
sysutils/915resolution/patches/patch-ab | 4 +-
4 files changed, 53 insertions(+), 80 deletions(-)
diffs (197 lines):
diff -r 81666395f80e -r 2ff4b5bda271 sysutils/915resolution/Makefile
--- a/sysutils/915resolution/Makefile Mon Aug 25 14:46:29 2008 +0000
+++ b/sysutils/915resolution/Makefile Mon Aug 25 15:11:47 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2006/11/13 04:15:02 obache Exp $
+# $NetBSD: Makefile,v 1.3 2008/08/25 15:11:47 joerg Exp $
#
DISTNAME= 915resolution-0.5.2
@@ -9,6 +9,8 @@
HOMEPAGE= http://www.geocities.com/stomljen/
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
USE_TOOLS+= gmake
@@ -19,8 +21,9 @@
MAKE_ENV+= LDLIBS=-l${MACHINE_ARCH}
.endif
+INSTALLATION_DIRS= sbin share/doc/915resolution
+
post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/915resolution
- ${INSTALL_DATA} ${WRKSRC}/README.txt ${PREFIX}/share/doc/915resolution
+ ${INSTALL_DATA} ${WRKSRC}/README.txt ${DESTDIR}${PREFIX}/share/doc/915resolution
.include "../../mk/bsd.pkg.mk"
diff -r 81666395f80e -r 2ff4b5bda271 sysutils/915resolution/distinfo
--- a/sysutils/915resolution/distinfo Mon Aug 25 14:46:29 2008 +0000
+++ b/sysutils/915resolution/distinfo Mon Aug 25 15:11:47 2008 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.2 2006/11/13 04:15:02 obache Exp $
+$NetBSD: distinfo,v 1.3 2008/08/25 15:11:47 joerg Exp $
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-ab) = b65a38c9c7edd95f295619c9cdedc26449b3f177
+SHA1 (patch-aa) = a37e71ef741cc5c981376db8bcc1eff60c32e2db
+SHA1 (patch-ab) = 5e6a865e4f0707390bf0c602aed9f7fc3c2284b4
diff -r 81666395f80e -r 2ff4b5bda271 sysutils/915resolution/patches/patch-aa
--- a/sysutils/915resolution/patches/patch-aa Mon Aug 25 14:46:29 2008 +0000
+++ b/sysutils/915resolution/patches/patch-aa Mon Aug 25 15:11:47 2008 +0000
@@ -1,15 +1,13 @@
-$NetBSD: patch-aa,v 1.2 2006/11/13 04:15:02 obache Exp $
+$NetBSD: patch-aa,v 1.3 2008/08/25 15:11:47 joerg Exp $
---- 915resolution.c.orig 2006-02-02 23:28:34.000000000 +0900
+--- 915resolution.c.orig 2006-02-02 15:28:34.000000000 +0100
+++ 915resolution.c
-@@ -22,7 +22,22 @@
+@@ -22,11 +22,57 @@
#include <string.h>
#include <sys/mman.h>
#include <fcntl.h>
+#ifdef __linux__
#include <sys/io.h>
-+#define OUTL(a, b) outl(a, b)
-+#define OUTB(a, b) outb(a, b)
+#endif
+#ifdef __NetBSD__
+#include <machine/pio.h>
@@ -19,75 +17,47 @@
+# elif defined(__x86_64__)
+#define iopl(a) x86_64_iopl(a)
+# endif
-+#define OUTL(a, b) outl(b, a)
-+#define OUTB(a, b) outb(b, a)
+#endif
#include <unistd.h>
#include <assert.h>
-@@ -169,7 +184,7 @@ void initialize_system(char * filename)
- }
-
- cardinal get_chipset_id(void) {
-- outl(0x80000000, 0xcf8);
-+ OUTL(0x80000000, 0xcf8);
- return inl(0xcfc);
- }
+-
++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
-@@ -476,11 +491,11 @@ void unlock_vbios(vbios_map * map) {
- 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 +503,13 @@ void unlock_vbios(vbios_map * map) {
- 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 +541,8 @@ void relock_vbios(vbios_map * map) {
- 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 +550,9 @@ void relock_vbios(vbios_map * map) {
- 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;
- }
- }
+ #define NEW(a) ((a *)(calloc(1, sizeof(a))))
+ #define FREE(a) (free(a))
diff -r 81666395f80e -r 2ff4b5bda271 sysutils/915resolution/patches/patch-ab
--- a/sysutils/915resolution/patches/patch-ab Mon Aug 25 14:46:29 2008 +0000
+++ b/sysutils/915resolution/patches/patch-ab Mon Aug 25 15:11:47 2008 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.2 2006/11/13 04:15:02 obache Exp $
+$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
@@ -19,5 +19,5 @@
install: ${PRG}
- cp ${PRG} /usr/sbin
-+ ${BSD_INSTALL_PROGRAM} ${PRG} ${PREFIX}/sbin
++ ${BSD_INSTALL_PROGRAM} ${PRG} ${DESTDIR}${PREFIX}/sbin
Home |
Main Index |
Thread Index |
Old Index