From nobody@FreeBSD.org  Thu Oct 15 07:32:03 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EAB3F106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Oct 2009 07:32:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DA1E08FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Oct 2009 07:32:03 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n9F7W3Sp079088
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Oct 2009 07:32:03 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n9F7W3Qs079087;
	Thu, 15 Oct 2009 07:32:03 GMT
	(envelope-from nobody)
Message-Id: <200910150732.n9F7W3Qs079087@www.freebsd.org>
Date: Thu, 15 Oct 2009 07:32:03 GMT
From: Vladimir Kushnir <vkushnir@bigmir.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: unbreak textproc/sdcv on amd64
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139633
>Category:       ports
>Synopsis:       unbreak textproc/sdcv on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 15 07:40:01 UTC 2009
>Closed-Date:    Tue Oct 20 09:40:33 UTC 2009
>Last-Modified:  Wed Oct 21 10:40:03 UTC 2009
>Originator:     Vladimir Kushnir
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
BITP
>Environment:
FreeBSD kushnir1.kiev.ua 9.0-CURRENT FreeBSD 9.0-CURRENT #2: Mon Oct  5 14:12:23 EEST 2009     root@kushnir1.kiev.ua:/usr/obj/usr/src/sys/KUSHNIR  amd64

>Description:
Console dictionary utility textproc/sdcv is marked as unbuildable on 64-bit platforms. The only source uf breakage - comparison of guint32 and sizeof() in function std::min() (src/lib/lib.cpp, line 516). Suggested fix unbreaks build. Tested under amd64 but seems to be valid for any 64-bit arch.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

*** /usr/ports/textproc/sdcv/Makefile	2009-08-31 13:31:17.000000000 +0300
--- Makefile	2009-10-15 10:12:43.000000000 +0300
***************
*** 35,44 ****
  
  .include <bsd.port.pre.mk>
  
- .if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
- BROKEN=		Doesn't build on 64-bit platforms
- .endif
- 
  post-patch:
  	@${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
  		${WRKSRC}/doc/sdcv.1
--- 35,40 ----
***************
*** 47,52 ****
--- 43,52 ----
  	@${REINPLACE_CMD} -e 's, getopt.h,,g' ${WRKSRC}/src/Makefile.in
  	@${REINPLACE_CMD} -e '146 s|()|(int, char * const [], const char *)|g' \
  		${WRKSRC}/src/getopt.h
+ .if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
+ 	@${REINPLACE_CMD} -e '516 s|sizeof|(guint32)sizeof|g' \
+ 		${WRKSRC}/src/lib/lib.cpp
+ .endif
  	@${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
  		${WRKSRC}/src/sdcv.cpp
  	@${REINPLACE_CMD} -e 's,@mandir@/uk,@mandir@,' \


>Release-Note:
>Audit-Trail:

From: Vladimir Kushnir <vkushnir@bigmir.net>
To: bug-followup@freebsd.org, vkushnir@bigmir.net
Cc:  
Subject: Re: ports/139633: unbreak textproc/sdcv on amd64 (sdcv's mainline fix)
Date: Thu, 15 Oct 2009 11:11:24 +0300

 Sorry, following up to myself.
 Better  fix was committed into sdcv's SVN trunk. A new patch:at the end of 
 this message.
 
 Regards,
 Vladimir
 
 *** /usr/ports/textproc/sdcv/Makefile	2009-08-31 13:31:17.000000000 +0300
 --- Makefile	2009-10-15 10:12:43.000000000 +0300
 ***************
 *** 35,44 ****
   
   .include <bsd.port.pre.mk>
   
 - .if ${ARCH} == "amd64" || ${ARCH} == "ia64" || ${ARCH} == "sparc64"
 - BROKEN=		Doesn't build on 64-bit platforms
 - .endif
 - 
   post-patch:
   	@${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
   		${WRKSRC}/doc/sdcv.1
 --- 35,40 ----
 ***************
 *** 47,52 ****
 --- 43,52 ----
   	@${REINPLACE_CMD} -e 's, getopt.h,,g' ${WRKSRC}/src/Makefile.in
   	@${REINPLACE_CMD} -e '146 s|()|(int, char * const [], const char *)|g' \
   		${WRKSRC}/src/getopt.h
  	@${REINPLACE_CMD} -e '516 s|page_size|static_cast<size_t>(page_size)|g' \
  		${WRKSRC}/src/lib/lib.cpp
   	@${REINPLACE_CMD} -e 's|/usr/share|${PREFIX}/share|g' \
   		${WRKSRC}/src/sdcv.cpp
   	@${REINPLACE_CMD} -e 's,@mandir@/uk,@mandir@,' \
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: miwi 
Responsible-Changed-When: Sun Oct 18 11:03:06 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139633 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Tue Oct 20 09:40:32 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/139633: commit references a PR
Date: Wed, 21 Oct 2009 10:35:07 +0000 (UTC)

 miwi        2009-10-21 10:34:53 UTC
 
   FreeBSD ports repository
 
   Modified files:
     textproc/sdcv        Makefile 
   Log:
   - Fix build on AMD64
   
   PR:             139633
   
   Revision  Changes    Path
   1.12      +4 -4      ports/textproc/sdcv/Makefile
 _______________________________________________
 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:
