ports/81107: [PATCH] chinese/big5con: fix build error on 5.x
chinsan
chinsan at mail2000.com.tw
Mon May 16 12:50:12 UTC 2005
>Number: 81107
>Category: ports
>Synopsis: [PATCH] chinese/big5con: fix build error on 5.x
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon May 16 12:50:07 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: chinsan
>Release: FreeBSD 5.3-RELEASE i386
>Organization:
FreeBSD Taiwan
>Environment:
System: FreeBSD chinsan.twbbs.org 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root at harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
- fix build error on 5.x
- the maintainer on SourceForge is CC'd
>How-To-Repeat:
===> Vulnerability check disabled, database not found
===> Extracting for zh-big5con-0.92h
===> Vulnerability check disabled, database not found
=> Checksum OK for big5con-0.92h.tar.gz.
===> Patching for zh-big5con-0.92h
===> Configuring for zh-big5con-0.92h
===> Building for zh-big5con-0.92h
making all in lib
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c sockface.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c getcap.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c mem.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c font.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c coding.c
ar rc libgon.a sockface.o getcap.o mem.o font.o coding.o
ranlib libgon.a
making all in src
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c vt.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c sock.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c fnld.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c mouse.c
gcc -O -pipe -O2 -pipe -march=i686 -march=pentium4 -O2 -pipe -march=i686 -march=pentium4 -DCONFIG_NAME=\"/usr/local/etc/big5con.cfg\" -I../include -DXCIN_DIR=\"/usr/local/lib/xcin\" -DDELETE_K=1 -DHAS_MOUSE -c vc.c
vc.c: In function extMoveDown':
vc.c:78: error: sm' operand requires impossible reload
*** Error code 1
Stop in /usr/ports/chinese/big5con/work/big5con-0.92h/src.
*** Error code 1
Stop in /usr/ports/chinese/big5con/work/big5con-0.92h.
*** Error code 1
Stop in /usr/ports/chinese/big5con.
*** Error code 1
Stop in /usr/ports/chinese/big5con.
>Fix:
Because Big5 console was ported from japanese/kon2,
so I adopt some patch from japanese/kon2-16dot.
It seems works well.
--- big5con.patch begins here ---
diff -ruN big5con.orig/Makefile big5con/Makefile
--- big5con.orig/Makefile Mon May 16 13:47:56 2005
+++ big5con/Makefile Mon May 16 13:49:58 2005
@@ -7,6 +7,7 @@
PORTNAME= big5con
PORTVERSION= 0.92h
+PORTREVISION= 1
CATEGORIES= chinese
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff -ruN big5con.orig/files/patch-src-fnld.c big5con/files/patch-src-fnld.c
--- big5con.orig/files/patch-src-fnld.c Thu Jan 1 08:00:00 1970
+++ big5con/files/patch-src-fnld.c Mon May 16 14:05:30 2005
@@ -0,0 +1,11 @@
+--- src/fnld.c.orig Mon May 16 14:04:51 2005
++++ src/fnld.c Mon May 16 14:04:51 2005
+@@ -21,7 +21,7 @@
+
+ struct fontRegs *dbFReg, *sbFReg;
+
+-u_char *GetShmem();
++u_char *GetShmem(char);
+
+ void
+ FontDetach(bool down)
diff -ruN big5con.orig/files/patch-src-vc.c big5con/files/patch-src-vc.c
--- big5con.orig/files/patch-src-vc.c Thu Jan 1 08:00:00 1970
+++ big5con/files/patch-src-vc.c Mon May 16 13:49:38 2005
@@ -0,0 +1,42 @@
+--- src/vc.c.orig Mon May 16 13:33:11 2005
++++ src/vc.c Mon May 16 13:33:11 2005
+@@ -60,28 +60,23 @@
+ inline void
+ blatch(void *head, int n)
+ {
+-
+- __asm__ volatile ("\t clc\n"
+- "1:\n"
+- "\t andb %%bl, (%%eax)\n"
+- "\t incl %%eax\n"
+- "\t loop 1b\n"
+- : "=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__ volatile ("\t clc\n"
+- "1:\n"
+- "\t andl %%ebx, (%%eax)\n"
+- "\t addl $4, %%eax\n"
+- "\t loop 1b\n"
+- : "=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
--- big5con.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list