From tkato432@yahoo.com  Sat Jan  5 18:00:28 2013
Return-Path: <tkato432@yahoo.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id 62D8BA05
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sat,  5 Jan 2013 18:00:25 +0000 (UTC)
	(envelope-from tkato432@yahoo.com)
Received: from msa101lp.auone-net.jp (msa101lp.auone-net.jp [222.3.140.164])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B08B991
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sat,  5 Jan 2013 18:00:25 +0000 (UTC)
Received: from localhost.localdomain (ZT034245.ppp.dion.ne.jp [59.128.34.245])
	by msa101lp.auone-net.jp (au one net msa) with ESMTP id 6DBE234034
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun,  6 Jan 2013 03:00:17 +0900 (JST)
Message-Id: <20130106023301.aaefe493216b1779dc74cdc1@yahoo.com>
Date: Sun, 6 Jan 2013 02:33:01 +0900
From: KATO Tsuguru <tkato432@yahoo.com>
To: FreeBSD-gnats-submit@FreeBSD.org
Subject: benchmarks/flops: Fix build with clang

>Number:         175010
>Category:       ports
>Synopsis:       benchmarks/flops: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    araujo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 05 18:10:00 UTC 2013
>Closed-Date:    Mon Feb 04 08:49:02 UTC 2013
>Last-Modified:  Mon Feb  4 08:50:00 UTC 2013
>Originator:     KATO Tsuguru
>Release:        FreeBSD 7.4-RELEASE-p10 i386
>Organization:
>Environment:
>Description:
- Fix build with clang

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/benchmarks/flops/Makefile benchmarks/flops/Makefile
--- /usr/ports/benchmarks/flops/Makefile	2012-11-08 08:17:19.000000000 +0900
+++ benchmarks/flops/Makefile	2013-01-02 02:26:50.000000000 +0900
@@ -1,34 +1,39 @@
-# New ports collection makefile for:	flops
-# Date created:				06 Jul 2005
-# Whom:					Alexey Dokuchaev <danfe@FreeBSD.org>
-#
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
 # $FreeBSD: head/benchmarks/flops/Makefile 300895 2012-07-14 12:56:14Z beat $
-#
 
 PORTNAME=	flops
 PORTVERSION=	2.0
 CATEGORIES=	benchmarks
 MASTER_SITES=	http://mbsd.msk.ru/dist/
 DISTFILES=	${PORTNAME}.c ${PORTNAME}.doc
+EXTRACT_ONLY=	#
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Floating point benchmark to give your MFLOPS rating
 
-PLIST_FILES=	bin/flops
+NO_WRKSUBDIR=	yes
+
 PORTDOCS=	flops.doc
+PLIST_FILES=	bin/flops
+
+.include <bsd.port.options.mk>
 
-do-extract: .SILENT
-	${MKDIR} ${WRKSRC}
-	${CP} ${DISTDIR}/flops.c ${DISTDIR}/flops.doc ${WRKSRC}
+post-extract:
+	@(cd ${DISTDIR} && ${TAR} -cf - ${DISTFILES}) | \
+		(cd ${WRKSRC} && ${TAR} -xf -)
+
+post-patch:
+	@${REINPLACE_CMD} -e \
+		's|^void main|int main|' ${WRKSRC}/flops.c
 
 do-build:
 	(cd ${WRKSRC} && ${CC} ${CFLAGS} -DUNIX -o flops flops.c)
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/flops ${PREFIX}/bin
-.if !defined(NOPORTDOCS)
+	(cd ${WRKSRC} && ${INSTALL_PROGRAM} flops ${PREFIX}/bin)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/flops.doc ${DOCSDIR}
+	(cd ${WRKSRC} && ${INSTALL_DATA} flops.doc ${DOCSDIR})
 .endif
 
 .include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->araujo 
Responsible-Changed-By: araujo 
Responsible-Changed-When: Fri Jan 18 06:07:33 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175010 
State-Changed-From-To: open->closed 
State-Changed-By: araujo 
State-Changed-When: Mon Feb 4 08:49:01 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/175010: commit references a PR
Date: Mon,  4 Feb 2013 08:49:23 +0000 (UTC)

 Author: araujo
 Date: Mon Feb  4 08:49:11 2013
 New Revision: 311582
 URL: http://svnweb.freebsd.org/changeset/ports/311582
 
 Log:
   - Fix build using CLANG.
   
   PR:		ports/175010
   Submitted by:	KATO Tsuguru <tkato432@yahoo.com>
 
 Modified:
   head/benchmarks/flops/Makefile   (contents, props changed)
 
 Modified: head/benchmarks/flops/Makefile
 ==============================================================================
 --- head/benchmarks/flops/Makefile	Mon Feb  4 08:47:40 2013	(r311581)
 +++ head/benchmarks/flops/Makefile	Mon Feb  4 08:49:11 2013	(r311582)
 @@ -1,32 +1,37 @@
 -# New ports collection makefile for:	flops
 -# Date created:				06 Jul 2005
 -# Whom:					Alexey Dokuchaev <danfe@FreeBSD.org>
 -#
 +# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
  # $FreeBSD$
 -#
  
  PORTNAME=	flops
  PORTVERSION=	2.0
  CATEGORIES=	benchmarks
  MASTER_SITES=	http://mbsd.msk.ru/dist/
  DISTFILES=	${PORTNAME}.c ${PORTNAME}.doc
 +EXTRACT_ONLY=	#
  
  MAINTAINER=	ports@FreeBSD.org
  COMMENT=	Floating point benchmark to give your MFLOPS rating
  
 -PLIST_FILES=	bin/flops
 +NO_WRKSUBDIR=	yes
 +
  PORTDOCS=	flops.doc
 +PLIST_FILES=	bin/flops
 +
 +.include <bsd.port.options.mk>
  
 -do-extract: .SILENT
 -	${MKDIR} ${WRKSRC}
 -	${CP} ${DISTDIR}/flops.c ${DISTDIR}/flops.doc ${WRKSRC}
 +post-extract:
 +	@(cd ${DISTDIR} && ${TAR} -cf - ${DISTFILES}) | \
 +		(cd ${WRKSRC} && ${TAR} -xf -)
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e \
 +		's|^void main|int main|' ${WRKSRC}/flops.c
  
  do-build:
  	(cd ${WRKSRC} && ${CC} ${CFLAGS} -DUNIX -o flops flops.c)
  
  do-install:
 -	${INSTALL_PROGRAM} ${WRKSRC}/flops ${PREFIX}/bin
 -.if !defined(NOPORTDOCS)
 +	${INSTALL_PROGRAM} ${WRKSRC}/flops ${PREFIX}/bin/
 +.if ${PORT_OPTIONS:MDOCS}
  	@${MKDIR} ${DOCSDIR}
  	${INSTALL_DATA} ${WRKSRC}/flops.doc ${DOCSDIR}
  .endif
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
