Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Feb 2013 08:49:11 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r311582 - head/benchmarks/flops
Message-ID:  <201302040849.r148nBq8058272@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302040849.r148nBq8058272>