From bd685e87f7a2cc6a16bcc0b103aa62b6f1c19a28 Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 4 Feb 2013 08:49:11 +0000 Subject: - Fix build using CLANG. PR: ports/175010 Submitted by: KATO Tsuguru --- benchmarks/flops/Makefile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'benchmarks/flops') diff --git a/benchmarks/flops/Makefile b/benchmarks/flops/Makefile index 67b3c549d068..621367fc0e2e 100644 --- a/benchmarks/flops/Makefile +++ b/benchmarks/flops/Makefile @@ -1,32 +1,37 @@ -# New ports collection makefile for: flops -# Date created: 06 Jul 2005 -# Whom: Alexey Dokuchaev -# +# Created by: Alexey Dokuchaev # $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 + +post-extract: + @(cd ${DISTDIR} && ${TAR} -cf - ${DISTFILES}) | \ + (cd ${WRKSRC} && ${TAR} -xf -) -do-extract: .SILENT - ${MKDIR} ${WRKSRC} - ${CP} ${DISTDIR}/flops.c ${DISTDIR}/flops.doc ${WRKSRC} +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 -- cgit