summaryrefslogtreecommitdiff
path: root/sysutils/i810switch
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-10-01 22:32:11 +0000
committerdholland <dholland@pkgsrc.org>2011-10-01 22:32:11 +0000
commit81075bff0be895d17454abe10f3d738825b25c7d (patch)
tree03d7093d1e45707310298a61cf16ded77fb528b7 /sysutils/i810switch
parentc83c29ac054ef9bd43b71ae65ff15b7710927076 (diff)
downloadpkgsrc-81075bff0be895d17454abe10f3d738825b25c7d.tar.gz
- fix amd64 build (use size_t, not int, with getline)
- provide getline only for older netbsd - don't install executable man pages
Diffstat (limited to 'sysutils/i810switch')
-rw-r--r--sysutils/i810switch/distinfo8
-rw-r--r--sysutils/i810switch/patches/patch-aa9
-rw-r--r--sysutils/i810switch/patches/patch-ab7
-rw-r--r--sysutils/i810switch/patches/patch-ac44
4 files changed, 38 insertions, 30 deletions
diff --git a/sysutils/i810switch/distinfo b/sysutils/i810switch/distinfo
index 2fceed5a68b..368bbb36516 100644
--- a/sysutils/i810switch/distinfo
+++ b/sysutils/i810switch/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.3 2009/11/30 01:01:56 dholland Exp $
+$NetBSD: distinfo,v 1.4 2011/10/01 22:32:11 dholland Exp $
SHA1 (i810switch-0.6.5.tar.gz) = 437adeb38f6530b5e68810fc5ee65fb5adaafd97
RMD160 (i810switch-0.6.5.tar.gz) = 4acaea0c7c4197cdff30885a51f65cda3d3a6df9
Size (i810switch-0.6.5.tar.gz) = 24287 bytes
-SHA1 (patch-aa) = 91401a0908fc7298c0c15dd21b8b2d693d291bc7
-SHA1 (patch-ab) = 2f1635cc81e409043a6cd63d0609983428564f68
-SHA1 (patch-ac) = 7fab3fadeaabb34372a63b8bd0b7f10492a7fffe
+SHA1 (patch-aa) = 3ce603e429331362679a3becd2c7bfa71d5a8ac2
+SHA1 (patch-ab) = 6257493b9b399d1c2a4ebce29a51f8e5f2fd193f
+SHA1 (patch-ac) = f54352d697787feded8af74043a0f97eabb131f3
diff --git a/sysutils/i810switch/patches/patch-aa b/sysutils/i810switch/patches/patch-aa
index c329957b379..35e2412c78e 100644
--- a/sysutils/i810switch/patches/patch-aa
+++ b/sysutils/i810switch/patches/patch-aa
@@ -1,16 +1,17 @@
-$NetBSD: patch-aa,v 1.3 2009/11/30 01:01:56 dholland Exp $
+$NetBSD: patch-aa,v 1.4 2011/10/01 22:32:11 dholland Exp $
--- Makefile.orig 2003-12-31 09:51:40.000000000 -0500
+++ Makefile 2006-12-03 23:40:16.000000000 -0500
-@@ -1,7 +1,4 @@
+@@ -1,7 +1,5 @@
-OBJECTS = i810switch.o
-
-%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+OBJECTS = i810switch.o getline.o
++MANMODE?=644
all: i810switch
-@@ -9,16 +6,20 @@
+@@ -9,16 +7,20 @@
$(CC) $(CFLAGS) -o $@ $(OBJECTS)
install: i810switch
@@ -23,7 +24,7 @@ $NetBSD: patch-aa,v 1.3 2009/11/30 01:01:56 dholland Exp $
+ install -d ${DESTDIR}$(PREFIX)/man/man1
+ install i810switch ${DESTDIR}$(PREFIX)/sbin
+ ln -s i810switch ${DESTDIR}$(PREFIX)/sbin/i810rotate
-+ install i810switch.1.gz i810rotate.1.gz ${DESTDIR}$(PREFIX)/man/man1
++ install -m $(MANMODE) i810switch.1.gz i810rotate.1.gz ${DESTDIR}$(PREFIX)/man/man1
+ gunzip ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man1/i810switch.1.gz
+ gunzip ${DESTDIR}$(PREFIX)/${PKGMANDIR}/man1/i810rotate.1.gz
diff --git a/sysutils/i810switch/patches/patch-ab b/sysutils/i810switch/patches/patch-ab
index 83a5d07b634..51544f01755 100644
--- a/sysutils/i810switch/patches/patch-ab
+++ b/sysutils/i810switch/patches/patch-ab
@@ -1,9 +1,10 @@
-$NetBSD: patch-ab,v 1.1 2006/12/04 04:42:03 christos Exp $
+$NetBSD: patch-ab,v 1.2 2011/10/01 22:32:11 dholland Exp $
--- getline.c 1969-12-31 19:00:00.000000000 -0500
+++ getline.c 2006-12-03 23:16:23.000000000 -0500
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,21 @@
++#include <sys/param.h>
+#include <stdio.h>
-+#ifdef __NetBSD__
++#if defined(__NetBSD__) && __NetBSD_Version__ < 599001600
+int
+getline(char **buf, size_t *len, FILE *fp)
+{
diff --git a/sysutils/i810switch/patches/patch-ac b/sysutils/i810switch/patches/patch-ac
index 53937f5fed2..c1aa74b7b5a 100644
--- a/sysutils/i810switch/patches/patch-ac
+++ b/sysutils/i810switch/patches/patch-ac
@@ -1,6 +1,7 @@
-$NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
---- i810switch.c 2005-06-12 00:36:36.000000000 -0400
-+++ i810switch.c 2006-12-03 23:12:44.000000000 -0500
+$NetBSD: patch-ac,v 1.2 2011/10/01 22:32:11 dholland Exp $
+
+--- i810switch.c.orig 2005-06-12 04:36:36.000000000 +0000
++++ i810switch.c
@@ -1,3 +1,4 @@
+#include <assert.h>
#include <stdarg.h>
@@ -18,7 +19,7 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
static const char *Opt_lcd = NULL;
static const char *Opt_crt = NULL;
-@@ -49,19 +54,31 @@
+@@ -49,19 +54,31 @@ struct i810_par {
/* PCI IDs */
@@ -62,7 +63,12 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
/* I810 registers */
#define I810_HVSYNC 0x05000
-@@ -247,43 +264,25 @@
+@@ -243,62 +260,48 @@ void probe_card_I830(struct i810_par *pa
+ i810_readl(par->mmio, I830_DSPBSTRIDE));
+ }
+
+-char *i810_chip(char **buff_ptr, int *len_ptr, FILE *pci_f, int* chiptype)
++char *i810_chip(char **buff_ptr, size_t *len_ptr, FILE *pci_f, int* chiptype)
{
int i;
char *p;
@@ -122,7 +128,10 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
}
}
return NULL;
-@@ -293,12 +292,16 @@
+ }
+
+-unsigned long i810_addr(char **buff_ptr, int *len_ptr, FILE *pci_f)
++unsigned long i810_addr(char **buff_ptr, size_t *len_ptr, FILE *pci_f)
{
char *p;
@@ -140,8 +149,13 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
return 0;
}
-@@ -319,7 +322,11 @@
- int i, crt = -1, lcd = -1, probe = 0, err = 0, count = 0, chiptype, len = 0;
+@@ -316,10 +319,15 @@ int main (int argc, char *argv[])
+ {
+ struct i810_par par;
+ unsigned long addr;
+- int i, crt = -1, lcd = -1, probe = 0, err = 0, count = 0, chiptype, len = 0;
++ int i, crt = -1, lcd = -1, probe = 0, err = 0, count = 0, chiptype;
++ size_t len = 0;
FILE *pci_f;
char *buff = NULL;
+#ifdef __NetBSD__
@@ -152,7 +166,7 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
char *chip;
putenv("PATH=/sbin:/usr/sbin:/bin:/usr/bin");
-@@ -357,7 +364,11 @@
+@@ -357,7 +365,11 @@ int main (int argc, char *argv[])
}
}
@@ -165,7 +179,7 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
if (!pci_f) {
fprintf(stderr, "Something is wrong with lspci.\n");
exit(1);
-@@ -369,6 +380,19 @@
+@@ -369,6 +381,19 @@ int main (int argc, char *argv[])
}
pclose(pci_f);
@@ -185,7 +199,7 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
{
char *p = strstr(lspcistr, "xxxx:xxxx");
if (p == 0) {
-@@ -376,16 +400,17 @@
+@@ -376,9 +401,10 @@ int main (int argc, char *argv[])
exit(1);
}
memcpy(p, chip, 9);
@@ -197,11 +211,3 @@ $NetBSD: patch-ac,v 1.1 2006/12/04 04:42:03 christos Exp $
if (!pci_f) {
fprintf(stderr, "Something is wrong with lspci.\n");
exit(1);
- }
- addr = i810_addr(&buff, &len, pci_f);
- if (addr == 0) {
-- fprintf(stderr, "Something is wrong with lspci.\n");
-+ fprintf(stderr, "Something is wrong with lspci.\n");
- exit(1);
- }
- pclose(pci_f);