ports/175010: benchmarks/flops: Fix build with clang
KATO Tsuguru
tkato432 at yahoo.com
Sat Jan 5 18:10:01 UTC 2013
>Number: 175010
>Category: ports
>Synopsis: benchmarks/flops: Fix build with clang
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 05 18:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>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 at FreeBSD.org>
-#
+# Created by: Alexey Dokuchaev <danfe at 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 at 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:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list