From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jul 18 22:10:18 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42E7016A4CF for ; Sun, 18 Jul 2004 22:10:18 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34FB643D46 for ; Sun, 18 Jul 2004 22:10:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i6IMAI9J011943 for ; Sun, 18 Jul 2004 22:10:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6IMAIYE011940; Sun, 18 Jul 2004 22:10:18 GMT (envelope-from gnats) Resent-Date: Sun, 18 Jul 2004 22:10:18 GMT Resent-Message-Id: <200407182210.i6IMAIYE011940@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jie Gao Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69A2616A4CE for ; Sun, 18 Jul 2004 22:08:32 +0000 (GMT) Received: from ensc.cpsc.ucalgary.ca (ensc.cpsc.ucalgary.ca [136.159.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11EB743D46 for ; Sun, 18 Jul 2004 22:08:32 +0000 (GMT) (envelope-from gaoj@cpsc.ucalgary.ca) Received: from imgw1.cpsc.ucalgary.ca (imgw1.cpsc.ucalgary.ca [136.159.5.9]) i6IM47eB028789 for ; Sun, 18 Jul 2004 16:04:07 -0600 (MDT) Received: from aibsd (sana-sa [136.159.7.231])i6IM42pi014670 for ; Sun, 18 Jul 2004 16:04:02 -0600 Received: by aibsd (sSMTP sendmail emulation); Sun, 18 Jul 2004 16:04:02 -0600 Message-Id: <200407182204.i6IM42pi014670@imgw1.cpsc.ucalgary.ca> Date: Sun, 18 Jul 2004 16:04:02 -0600 From: "Jie Gao" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/69251: [PATCH] chinese/xsim does not compile with coming GCC 3.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jie Gao List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2004 22:10:18 -0000 >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@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@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 @@ -34,9 +34,14 @@ ${WRKSRC}/xsim/IMdkit/IMConn.c @${FIND} ${WRKSRC} -name xsimrc.in -or -name Makefile.in | ${XARGS} \ ${REINPLACE_CMD} -Ee 's,@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: