Bug 175010 - benchmarks/flops: Fix build with clang
Summary: benchmarks/flops: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marcelo Araujo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 18:10 UTC by tkato432
Modified: 2013-02-04 08:50 UTC (History)
0 users

See Also:


Attachments
file.diff (1.54 KB, patch)
2013-01-05 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-01-05 18:10:00 UTC
- Fix build with clang
Comment 1 Marcelo Araujo freebsd_committer freebsd_triage 2013-01-18 06:07:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->araujo

I'll take it.
Comment 2 Marcelo Araujo freebsd_committer freebsd_triage 2013-02-04 08:49:01 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-02-04 08:49:23 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"