From fujiwara@f.pyon.org  Wed Jul 16 16:36:41 2008
Return-Path: <fujiwara@f.pyon.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B332710656A0
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jul 2008 16:36:41 +0000 (UTC)
	(envelope-from fujiwara@f.pyon.org)
Received: from sakura.pyon.org (pyon.org [202.222.31.169])
	by mx1.freebsd.org (Postfix) with SMTP id 4BC338FC13
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 Jul 2008 16:36:41 +0000 (UTC)
	(envelope-from fujiwara@f.pyon.org)
Received: (qmail 80653 invoked from network); 17 Jul 2008 01:10:00 +0900
Received: from 73.162.192.61.tokyo.global.alpha-net.ne.jp (HELO f.pyon.org) (61.192.162.73)
  by pyon.org with SMTP; 17 Jul 2008 01:10:00 +0900
Received: (qmail 26928 invoked by uid 100); 16 Jul 2008 16:09:58 -0000
Message-Id: <20080716160958.26927.qmail@f.pyon.org>
Date: 16 Jul 2008 16:09:58 -0000
From: Kazunori_Fujiwara <fujiwara@wide.ad.jp>
Reply-To: Kazunori_Fujiwara <fujiwara@wide.ad.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc: fujiwara@wide.ad.jp
Subject: ports/japanese/edict does not work on 7.0/i386, 7.0/amd64
X-Send-Pr-Version: 3.113
X-GNATS-Notify: jhanna@shaw.ca

>Number:         125683
>Category:       ports
>Synopsis:       ports/japanese/edict does not work on 7.0/i386, 7.0/amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 16 16:40:01 UTC 2008
>Closed-Date:    Sun Jul 27 18:44:23 UTC 2008
>Last-Modified:  Sun Jul 27 18:50:00 UTC 2008
>Originator:     Kazunori_Fujiwara
>Release:        FreeBSD 7.0-STABLE amd64
>Organization:
WIDE Project
>Environment:
System: FreeBSD f.pyon.org 7.0-STABLE FreeBSD 7.0-STABLE #1: Sun Jun 29 01:18:10 JST 2008 fujiwara@f.pyon.org:/usr/obj/usr/src/sys/SC7 amd64

ports-current on FreeBSD 7.0 i386
ports-current on FreeBSD 7.0 amd64

>Description:

pors/japanese/edict has two problems.

1. It does not work on FreeBSD 7.0 i386.
   xjdic cannot handle input characters from tty on FreeBSD 7.0.

   Adding "new.c_cc[VMIN] = 1;" for tcsetattr() solves this problem.

2. Marked as BROKEN for amd64

   Patch to xjdxgen.c solves this problem.

	-  indlen = (diclen * 3)/4;
	+  indlen = (diclen * 3*(sizeof(void *)/4))/4; 

>How-To-Repeat:
>Fix:


Index: Makefile
===================================================================
RCS file: /ncvs/ports/japanese/edict/Makefile,v
retrieving revision 1.23
diff -u -b -r1.23 Makefile
--- Makefile	14 Mar 2008 19:07:39 -0000	1.23
+++ Makefile	16 Jul 2008 14:21:55 -0000
@@ -60,10 +60,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} != "i386"
-BROKEN=		Does not build
-.endif
-
 do-extract:
 	@${RM} -rf ${WRKDIR}
 	@${MKDIR} ${WRKDIR}
Index: files/patch-xjdfrontend.c
===================================================================
RCS file: /ncvs/ports/japanese/edict/files/patch-xjdfrontend.c,v
retrieving revision 1.1
diff -u -b -r1.1 patch-xjdfrontend.c
--- files/patch-xjdfrontend.c	15 Feb 2008 22:05:09 -0000	1.1
+++ files/patch-xjdfrontend.c	19 Jun 2008 09:29:34 -0000
@@ -16,7 +16,7 @@
 +#elif defined(__POSIX__)
 +    tcgetattr(0, &orig); tcgetattr(0, &new);
 +    new.c_lflag &= ~ICANON; new.c_lflag &= ~ISIG; new.c_lflag &= ~ECHO;
-+    new.c_lflag &= ~IXON;
++    new.c_lflag &= ~IXON; new.c_cc[VMIN] = 1;
 +    new.c_cc[4] = 1; new.c_cc[5] = 0;   tcsetattr(0, TCSANOW, &new);
  #else
      ioctl(0, TCGETA, &orig); ioctl(0, TCGETA, &new);



files/patch-64bit:

--- xjdxgen.c	2008-06-19 17:51:17.000000000 +0900
+++ xjdxgen.c-	2008-06-19 17:50:47.000000000 +0900
@@ -154,7 +154,7 @@
   db[diclen] = 10;
   db[0] = 10;
   printf("Dictionary size: %ld bytes.\n",dbyte);
-  indlen = (diclen * 3)/4;
+  indlen = (diclen * 3*(sizeof(void *)/4))/4;
   jindex = (unsigned long *)malloc(indlen);
   if(jindex == NULL)
   {
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Jul 16 16:40:11 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125683 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: jhanna@shaw.ca
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/125683: ports/japanese/edict does not work on 7.0/i386, 7.0/amd64
Date: Wed, 16 Jul 2008 16:40:10 UT

 Maintainer of japanese/edict,
 
 Please note that PR ports/125683 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/125683
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Jonathan Hanna <jhanna@shaw.ca>
To: bug-followup@FreeBSD.org
Cc: Kazunori_Fujiwara <fujiwara@wide.ad.jp>
Subject: Re: ports/125683: ports/japanese/edict does not work on 7.0/i386,
 7.0/amd64
Date: Mon, 21 Jul 2008 11:09:00 -0700

 Edwin Groothuis wrote:
 > Maintainer of japanese/edict,
 >
 > Please note that PR ports/125683 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/125683
 >
 
 It looks like in:
 
 files/patch-64bit:
 --- xjdxgen.c    2008-06-19 17:51:17.000000000 +0900
 +++ xjdxgen.c-   2008-06-19 17:50:47.000000000 +0900
 @@ -154,7 +154,7 @@
   db[diclen] = 10;
   db[0] = 10;
   printf("Dictionary size: %ld bytes.\n",dbyte);
 -  indlen = (diclen * 3)/4;
 +  indlen = (diclen * 3*(sizeof(void *)/4))/4;
   jindex = (unsigned long *)malloc(indlen);
   if(jindex == NULL)
   {
 
 that
 indlen = (diclen * 3*(sizeof(long)/4))/4;
 
 is better, as the bounds checks in the code read:
 
 if (indptr > indlen/sizeof(long))
   ...
 
 
 Otherwise looks good. I would be happy if some else took maintainership too...
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Mon Jul 21 22:37:30 UTC 2008 
State-Changed-Why:  
Approved, with some changes.  Note that maintainer is willing to give 
up maintainership. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125683 
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Sun Jul 27 18:44:18 UTC 2008 
State-Changed-Why:  
committed, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125683 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/125683: commit references a PR
Date: Sun, 27 Jul 2008 18:44:14 +0000 (UTC)

 arved       2008-07-27 18:44:06 UTC
 
   FreeBSD ports repository
 
   Modified files:
     japanese/edict       Makefile 
     japanese/edict/files patch-xjdfrontend.c patch-xjdxgen.c 
   Log:
   Unbreak on amd64
   Set maintainership back to ports
   
   PR:             125683
   Submitted by:   Kazunori_Fujiwara <fujiwara@wide.ad.jp>
   Approved by:    maintainer
   
   Revision  Changes    Path
   1.24      +1 -5      ports/japanese/edict/Makefile
   1.2       +1 -1      ports/japanese/edict/files/patch-xjdfrontend.c
   1.2       +11 -2     ports/japanese/edict/files/patch-xjdxgen.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
