o Fix build error on 5.x.

o Use /dev/ttyv0 instead of /dev/vga on 5.x.
  Accordingly bump PORTREVISION.

Approved by:	portmgr (kris), shige (maintainer/blanket)
This commit is contained in:
Norikatsu Shigemura 2004-09-19 04:43:03 +00:00
parent 377caa3884
commit 1617bb3e15
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=118289
4 changed files with 77 additions and 31 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= kon2
PORTVERSION= 0.3
PORTREVISION= 1
PORTREVISION= 2
PKGNAMESUFFIX= -${KONFONT}
CATEGORIES+= japanese # '+=' is for slave ports
# note kon is only in first directory and fonts are only in second directory
@ -42,12 +42,6 @@ KON14FONT=Startup
@${FALSE}
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 502126
BROKEN= "Does not compile on FreeBSD >= 5.x"
.endif
pre-build:
${SED} -e 's,%%PREFIX%%,${PREFIX},' \
-e 's,%%DISTDIR%%,${DISTDIR},' \
@ -66,4 +60,4 @@ post-install:
${DOCDIR}
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
--- src/vc.c.orig Wed Jan 24 00:16:06 2001
+++ src/vc.c Wed Jan 24 00:16:55 2001
--- src/vc.c.orig Sat Jan 25 00:06:23 1997
+++ src/vc.c Sun Sep 19 04:39:05 2004
@@ -40,7 +40,13 @@
#include <termio.h>
#elif defined(__FreeBSD__)
@ -15,42 +15,48 @@
#endif
#include <sys/ioctl.h>
#ifdef linux
@@ -95,28 +101,26 @@
@@ -94,29 +100,22 @@
static
inline void blatch(void *head, int n)
{
-
- __asm__("\t clc\n"
+ __asm__ volatile("\t clc\n"
"1:\n"
"\t andb %%bl, (%%eax)\n"
"\t incl %%eax\n"
"\t loop 1b\n"
- "1:\n"
- "\t andb %%bl, (%%eax)\n"
- "\t incl %%eax\n"
- "\t loop 1b\n"
- :
- : "eax" ((long)head), "bl" (0x7F), "c" (n)
- : "bl", "cx" );
+ : "=bl" (head), "=c" (n)
+ : "eax" ((long)head), "0" (0x7F), "1" (n));
+ char *tmp = (char *)head;
+ do {
+ *tmp &= 0x7f;
+ tmp++;
+ } while( --n );
}
static
inline void llatch(void *head, int n)
{
-
- __asm__("\t clc\n"
+ __asm__ volatile("\t clc\n"
"1:\n"
"\t andl %%ebx, (%%eax)\n"
"\t addl $4, %%eax\n"
"\t loop 1b\n"
- "1:\n"
- "\t andl %%ebx, (%%eax)\n"
- "\t addl $4, %%eax\n"
- "\t loop 1b\n"
- :
- : "eax" ((long)head), "ebx" (0x7F7F7F7F), "c" (n>>2)
- : "ebx", "cx" );
+ : "=ebx" (head), "=c" (n)
+ : "eax" ((long)head), "0" (0x7F7F7F7F), "1" (n>>2));
+ int *tmp = (int *)head;
+ n /= 4;
+ do {
+ *tmp &= 0x7f7f7f7f;
+ tmp++;
+ } while( --n );
}
static inline u_int TextAddress(u_int x, u_int y)
@@ -266,12 +270,23 @@
@@ -266,12 +265,23 @@
{
struct vt_mode vtm;
@ -74,7 +80,7 @@
ioctl(0, VT_SETMODE, &vtm);
#if defined(__FreeBSD__)
ioctl(0, VT_RELDISP, 1);
@@ -297,6 +312,9 @@
@@ -297,6 +307,9 @@
vtm.waitv = 0;
vtm.relsig = SIGUSR1;
vtm.acqsig = SIGUSR2;
@ -84,7 +90,7 @@
ioctl(0, VT_SETMODE, &vtm);
vInfo.graph_mode();
if (useHardScroll)
@@ -816,21 +834,31 @@
@@ -816,21 +829,31 @@
static int ConfigBeep(const char *confstr)
{

View File

@ -1,5 +1,5 @@
--- src/term.c.orig Sat Jan 25 00:03:58 1997
+++ src/term.c Wed Jan 24 00:08:14 2001
+++ src/term.c Sun Sep 19 05:01:34 2004
@@ -33,7 +33,13 @@
#include <termio.h>
#elif defined(__FreeBSD__)
@ -31,3 +31,38 @@
if (FD_ISSET(mouseFd, &readFds) && con.active) {
i = read(mouseFd, buff, BUFSIZ);
if (i > 0) MouseGetPacket(buff, i);
@@ -449,11 +458,18 @@
PerrorExit("/dev/console");
}
#elif defined(__FreeBSD__)
+#if __FreeBSD_version >= 510100
+ cfd = open("/dev/ttyv0", O_WRONLY);
+ if (cfd < 0 && (cfd = open("/dev/ttyv0", O_RDONLY)) < 0) {
+ PerrorExit("/dev/ttyv0");
+ }
+#else
cfd = open("/dev/vga", O_WRONLY);
if (cfd < 0 && (cfd = open("/dev/vga", O_RDONLY)) < 0) {
PerrorExit("/dev/vga");
}
#endif
+#endif
ioctl(cfd, VT_ACTIVATE, orgVtNum);
close(cfd);
}
@@ -471,9 +487,15 @@
if (cfd < 0 && (cfd = open("/dev/console", O_RDONLY)) < 0)
fatal("can't open /dev/console");
#elif defined(__FreeBSD__)
+#if __FreeBSD_version >= 510100
+ cfd = open("/dev/ttyv0", O_WRONLY);
+ if (cfd < 0 && (cfd = open("/dev/ttyv0", O_RDONLY)) < 0)
+ fatal("can't open /dev/ttyv0");
+#else
cfd = open("/dev/vga", O_WRONLY);
if (cfd < 0 && (cfd = open("/dev/vga", O_RDONLY)) < 0)
fatal("can't open /dev/vga");
+#endif
#endif
ioctl(cfd, KDGETMODE, &mode);
if (mode == KD_TEXT) {

View File

@ -0,0 +1,11 @@
--- src/fnld.c.orig Fri Jan 24 09:36:30 1997
+++ src/fnld.c Sun Sep 19 04:10:25 2004
@@ -42,7 +42,7 @@
struct fontRegs *dbFReg, *sbFReg;
-u_char *GetShmem();
+u_char *GetShmem(char);
void FontDetach(bool down)
{