Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Nov 2007 09:23:55 GMT
From:      Sunry Chen <sunrychen@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/118100: [PATCH]chinese/cxterm broken in 7.0
Message-ID:  <200711170923.lAH9Nta7000568@www.freebsd.org>
Resent-Message-ID: <200711170930.lAH9U108089238@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         118100
>Category:       ports
>Synopsis:       [PATCH]chinese/cxterm broken in 7.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 17 09:30:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Sunry Chen
>Release:        FreeBSD 7.0-Beta2 i386
>Organization:
Shenzhen Institute of Technology
>Environment:
FreeBSD freebsd7.0 7.0-BETA2 FreeBSD 7.0-BETA2 #0: Fri Nov  2 16:47:33 UTC 2007
    root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
As described here:
http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.7.2007110918/zh-cxterm-5.0.3_1.log

And marked as broken in Makefile:
.if ${OSVERSION} >= 700042
BROKEN=         Does not compile on GCC 4.2
.endif
>How-To-Repeat:
Compile it on GCC 4.2
>Fix:


Patch attached with submission follows:

diff -ruN cxterm.orig/Makefile cxterm/Makefile
--- cxterm.orig/Makefile	2007-07-03 09:32:54.000000000 +0000
+++ cxterm/Makefile	2007-11-17 16:10:34.000000000 +0000
@@ -10,14 +10,17 @@
 PORTVERSION=	5.0.3
 PORTREVISION=	1
 CATEGORIES=	chinese x11
-MASTER_SITES=	ftp://ftp.cuhk.hk/pub/chinese/ifcss/software/x-win/cxterm/
+MASTER_SITES=	ftp://ftp.cuhk.hk/pub/chinese/ifcss/software/x-win/cxterm/ \
+		http://www.525183.com/freebsd/cxterm/ \
+		http://www.chinatinco.com/freebsd/cxterm/ \
+		http://525183.serverbox.org/freebsd/cxterm/
 DISTNAME=	cxterm5.0.p3
 
 PATCH_SITES=	${MASTER_SITES}
 PATCHFILES=	cxterm-5.0.p3-color.patch.gz	# cxterm-5.0-hz-patch.gz
 PATCH_DIST_STRIP=	-p1
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	sunrychen@gmail.com
 COMMENT=	An xterm that speaks Chinese
 
 BUILD_DEPENDS=	bdftopcf:${X_CLIENTS_PORT}
@@ -40,10 +43,6 @@
 BROKEN=		"Coredump during build on ia64"
 .endif
 
-.if ${OSVERSION} >= 700042
-BROKEN=		Does not compile on GCC 4.2
-.endif
-
 post-install:
 	${INSTALL_SCRIPT} ${WRKDIR}/CXterm.sh ${PREFIX}/bin/CXterm
 	# standard X11 place
diff -ruN cxterm.orig/files/patch-ad cxterm/files/patch-ad
--- cxterm.orig/files/patch-ad	1997-04-24 02:21:45.000000000 +0000
+++ cxterm/files/patch-ad	1970-01-01 00:00:00.000000000 +0000
@@ -1,10 +0,0 @@
---- ./cxterm/HZutil.c.org	Tue Jan 17 02:57:30 1995
-+++ ./cxterm/HZutil.c	Wed Apr 23 03:44:24 1997
-@@ -153,6 +153,7 @@
- {
- 
- #if !defined(X_NOT_POSIX) || defined(SYSV) || defined(USG)
-+# include <sys/types.h>
- # include <dirent.h>
- #else
- # include <sys/dir.h>
diff -ruN cxterm.orig/files/patch-cxterm__HZutil.c cxterm/files/patch-cxterm__HZutil.c
--- cxterm.orig/files/patch-cxterm__HZutil.c	1970-01-01 00:00:00.000000000 +0000
+++ cxterm/files/patch-cxterm__HZutil.c	2007-11-17 14:53:13.000000000 +0000
@@ -0,0 +1,25 @@
+--- ./cxterm/HZutil.c.orig	1995-01-17 10:57:30.000000000 +0000
++++ ./cxterm/HZutil.c	2007-11-17 14:49:28.000000000 +0000
+@@ -148,11 +148,9 @@
+  * give NULL as "name" and "inputdir".  When no more match for this
+  * search, the function returns 0 (otherwise, 1 means successful).
+  */
+-int HZfindsuffix(new_suffix, new_inputdir, basename)
+-    char *new_suffix, *new_inputdir, *basename;
+-{
+ 
+ #if !defined(X_NOT_POSIX) || defined(SYSV) || defined(USG)
++# include <sys/types.h>
+ # include <dirent.h>
+ #else
+ # include <sys/dir.h>
+@@ -161,6 +159,9 @@
+ # endif 
+ #endif      
+ 
++int HZfindsuffix(new_suffix, new_inputdir, basename)
++    char *new_suffix, *new_inputdir, *basename;
++{
+   /* persistent variables for the search continuation */
+   static char *inputdir = NULL;
+   static char *suffix = NULL;
diff -ruN cxterm.orig/files/patch-utils__hzimctrl.c cxterm/files/patch-utils__hzimctrl.c
--- cxterm.orig/files/patch-utils__hzimctrl.c	1970-01-01 00:00:00.000000000 +0000
+++ cxterm/files/patch-utils__hzimctrl.c	2007-11-17 14:53:13.000000000 +0000
@@ -0,0 +1,20 @@
+--- ./utils/hzimctrl.c.orig	1995-01-17 10:59:17.000000000 +0000
++++ ./utils/hzimctrl.c	2007-11-17 14:51:55.000000000 +0000
+@@ -130,7 +130,7 @@
+ #ifdef CANT_OPEN_DEV_TTY
+ 	extern char *ttyname();
+ #endif
+-	static void Usage();
++	void Usage();
+ 
+ 	ptr = strrchr(myname = argv[0], '/');
+ 	if (ptr)
+@@ -215,7 +215,7 @@
+ 	exit(0);
+ }
+ 
+-static void Usage()
++void Usage()
+ {
+ 	fprintf(stderr,"Usage: %s [ -m input_method | -d HZINPUTDIR | -p parameters ]\n",
+ 		myname);


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711170923.lAH9Nta7000568>