ports/69251: [PATCH] chinese/xsim does not compile with coming GCC 3.4

Jie Gao gaoj at cpsc.ucalgary.ca
Sun Jul 18 22:10:18 UTC 2004


>Number:         69251
>Category:       ports
>Synopsis:       [PATCH] chinese/xsim does not compile with coming GCC 3.4
>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:   Sun Jul 18 22:10:17 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jie Gao
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD aibsd-current 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Jul 15 10:00:38 MDT 2004 gaoj at aibsd-current:/usr/obj/usr/src/sys/AIBSD i386


	
>Description:
	
chinese/xsim does not compile when using GCC 3.4 because of an internal change
in GCC. Besides, there are several other issues with this port. The patch 
included fix the following problems:

 1. Compilation failure when using GCC 3.4
 2. Does not respect ${CFLAGS}
 3. Dependancy problem: This port has preference on db4 over db3.3, i.e. when
    both are present, it uses db4. So change the dependancy from db3.3 to db4.
 4. The default installation does not create user settings, which causes write
    attempt to global settings and the consequent failure confuses users.
 5. Locale zh_CN.EUC is not present on 5.x. Swith to zh_CN.eucCN.

>How-To-Repeat:
	
>Fix:

	

--- patch-xsim begins here ---
diff -ruN xsim.old/Makefile xsim/Makefile
--- xsim.old/Makefile	Sun Jul 18 14:38:25 2004
+++ xsim/Makefile	Sun Jul 18 15:52:46 2004
@@ -16,12 +16,12 @@
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	A simple and fast GBK Chinese XIM server
 
-LIB_DEPENDS=	db3.3:${PORTSDIR}/databases/db3
+LIB_DEPENDS=	db4:${PORTSDIR}/databases/db4
 
 USE_REINPLACE=	yes
 USE_XLIB=	yes
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--with-cn-locale=EUC
+CONFIGURE_ARGS=	--with-cn-locale=eucCN
 
 .include <bsd.port.pre.mk>
 
@@ -34,9 +34,14 @@
 		${WRKSRC}/xsim/IMdkit/IMConn.c
 	@${FIND} ${WRKSRC} -name xsimrc.in -or -name Makefile.in | ${XARGS} \
 		${REINPLACE_CMD} -Ee 's, at prefix@/(plugins|dat|bin),${DATADIR}/\1,g'
+	@${FIND} ${WRKSRC} ! -type d \
+		-exec ${GREP} -q _CPP_BITS_IOSBASE_H '{}' \; \
+		-exec ${REINPLACE_CMD} 's/#ifdef _CPP_BITS_IOSBASE_H/#if defined(_IOS_BASE_H) || defined(_CPP_BITS_IOSBASE_H)/g' '{}' \;
+	@${REINPLACE_CMD} "s/-O2/${CFLAGS}/g" ${WRKSRC}/configure
 
 post-install:
-	@${LN} -s ${DATADIR}/bin/xsim ${PREFIX}/bin/xsim
+	@${SED} "s|%%PREFIX%%|${PREFIX}|g" <${FILESDIR}/xsim.sh \
+		>${PREFIX}/bin/xsim && ${CHMOD} 555 ${PREFIX}/bin/xsim
 	@${MKDIR} ${DATADIR}/dat
 	@${CP} -R ${WRKDIR}/usr/local/xsim/dat/* ${DATADIR}/dat
 	@${SED} -e 's,%%X11BASE%%,${X11BASE},g' < ${PKGMESSAGE}
diff -ruN xsim.old/files/xsim.sh xsim/files/xsim.sh
--- xsim.old/files/xsim.sh	Wed Dec 31 17:00:00 1969
+++ xsim/files/xsim.sh	Sun Jul 18 15:32:37 2004
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# Install user settings directory if it does not exist
+if [ ! -d ${HOME}/.xsim ]
+then
+	mkdir ${HOME}/.xsim
+	cp %%PREFIX%%/share/xsim/dat/* ${HOME}/.xsim/
+	sed "/^DICT_LOCAL/s|%%PREFIX%%/share/xsim/dat|${HOME}/.xsim|g" \
+		%%PREFIX%%/etc/xsimrc > ${HOME}/.xsim/xsimrc
+fi
+
+# Start xsim
+exec %%PREFIX%%/share/xsim/bin/xsim $*
diff -ruN xsim.old/pkg-message xsim/pkg-message
--- xsim.old/pkg-message	Sun Jul 18 14:38:25 2004
+++ xsim/pkg-message	Sun Jul 18 15:34:00 2004
@@ -12,5 +12,5 @@
 Remember to set environment varible XMODIFIERS:
  csh/tcsh: setenv XMODIFIERS @im=XSIM
  sh/bash:  export XMODIFIERS='@im=XSIM'
-and set LANG, LC_CTYPE to zh_CN.EUC.
+and set LANG, LC_CTYPE to zh_CN.eucCN.
 -------------------------------------------------------------------------------
--- patch-xsim ends here ---


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



More information about the freebsd-ports-bugs mailing list