Skip to content

Commit

Permalink
- Convert to new options framework
Browse files Browse the repository at this point in the history
- Trim Makefile header

While here:
- Whitespace alignment
- Respect MANPREFIX
- Remove STRIP_CMD as this is done by INSTALL_PROGRAM
- Merge duplicate post-patch targets into one

PR:		ports/173548
Submitted by:	Edward <is.a.relay@gmail.com>
Approved by:	maintainer
Feature safe:	yes
  • Loading branch information
BSDKaffee committed Nov 13, 2012
1 parent 9001ecd commit 7b530b9
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions benchmarks/iozone/Makefile
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,5 @@
# New ports collection makefile for: iozone # Created by: jmz
# Date created: 26 September 1994
# Whom: jmz
#
# $FreeBSD$ # $FreeBSD$
#


PORTNAME= iozone PORTNAME= iozone
PORTVERSION= 3.397 PORTVERSION= 3.397
Expand All @@ -27,29 +23,29 @@ MAKE_JOBS_UNSAFE= yes
MAN1= iozone.1 MAN1= iozone.1
PLIST_FILES= bin/iozone PLIST_FILES= bin/iozone


OPTIONS= THREADS "Enable threading (uses pthreads)" on \ OPTIONS_DEFINE= SSH THREADS
SSH "Use ssh in distributed measurement" on OPTIONS_DEFAULT=SSH THREADS


.include <bsd.port.pre.mk> SSH_DESC= Use ssh in distributed measurement
THREADS_DESC= Enable threading (uses pthreads)


.if defined (WITH_THREADS) .include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MTHREADS}
CFLAGS+= ${PTHREAD_CFLAGS} CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS} LDFLAGS+= ${PTHREAD_LIBS}
.else .else
CFLAGS+=-DNO_THREADS CFLAGS+= -DNO_THREADS
.endif .endif


.if defined (WITH_SSH) post-patch:
post-patch:: .if ${PORT_OPTIONS:MSSH}
@${REINPLACE_CMD} -e 's|shell\,\"rsh\"|shell\,\"ssh\"|' ${WRKSRC}/iozone.c @${REINPLACE_CMD} -e 's|shell\,\"rsh\"|shell\,\"ssh\"|' ${WRKSRC}/iozone.c
.endif .endif

post-patch::
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/makefile @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/makefile


do-install: do-install:
${STRIP_CMD} ${WRKSRC}/iozone
${INSTALL_PROGRAM} ${WRKSRC}/iozone ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/iozone ${PREFIX}/bin
${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/docs/iozone.1 ${PREFIX}/man/man1 ${INSTALL_MAN} ${WRKDIR}/${DISTNAME}/docs/iozone.1 ${MANPREFIX}/man/man1


.include <bsd.port.post.mk> .include <bsd.port.mk>

0 comments on commit 7b530b9

Please sign in to comment.