benchmarks/fhourstones: New MASTER_SITES to unbreak, move executable

This port was broken due to being unfetchable.  While finding a new
source location, switch the executable from lib/fhourstones to
libexec/fhourstones.  Also, use "sed" and "echo" to eliminate the
need for patches.

Some changes were made to the submitted patch by me, but they were minor.

PR:		200293
Submitted by:	Ports Fury
This commit is contained in:
John Marino 2015-05-19 08:37:43 +00:00
parent f30318a865
commit fe8803e74a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=386748
4 changed files with 22 additions and 29 deletions

View file

@ -3,26 +3,36 @@
PORTNAME= fhourstones
PORTVERSION= 3.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= benchmarks
MASTER_SITES= http://homepages.cwi.nl/~tromp/c4/
MASTER_SITES= http://tromp.github.io/c4/
DISTNAME= Fhourstones
MAINTAINER= ports@FreeBSD.org
COMMENT= The Fhourstones Benchmark
COMMENT= Integrated benchmark program
BROKEN= Unfetchable
NO_WRKSUBDIR= yes
PLIST_FILES= bin/fhourstones lib/fhourstones/SearchGame lib/fhourstones/inputs
PLIST_FILES= bin/fhourstones \
libexec/fhourstones/SearchGame \
share/fhourstones/inputs
post-patch:
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/fhourstones
@${REINPLACE_CMD} -e \
's| = -O3| +=|' ${WRKSRC}/Makefile
post-build:
${ECHO_CMD} '#!${SH}' > ${WRKSRC}/fhourstones
${ECHO_CMD} 'libexecdir=${PREFIX}/libexec/fhourstones' \
>> ${WRKSRC}/fhourstones
${ECHO_CMD} 'datadir=${DATADIR}' >> ${WRKSRC}/fhourstones
${ECHO_CMD} 'exec $${libexecdir}/SearchGame < $${datadir}/inputs' \
>> ${WRKSRC}/fhourstones
do-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/fhourstones
${INSTALL_SCRIPT} ${WRKDIR}/fhourstones ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKDIR}/SearchGame ${STAGEDIR}${PREFIX}/lib/fhourstones
${INSTALL_DATA} ${WRKDIR}/inputs ${STAGEDIR}${PREFIX}/lib/fhourstones
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/fhourstones ${STAGEDIR}${DATADIR}
${INSTALL_SCRIPT} ${WRKSRC}/fhourstones ${STAGEDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/inputs ${STAGEDIR}${DATADIR}
${INSTALL_PROGRAM} ${WRKSRC}/SearchGame \
${STAGEDIR}${PREFIX}/libexec/fhourstones
.include <bsd.port.mk>

View file

@ -1,10 +0,0 @@
--- Makefile.orig 2008-06-17 21:47:28.000000000 +0200
+++ Makefile 2008-06-17 21:47:37.000000000 +0200
@@ -1,6 +1,6 @@
# GNU Makefile
-CFLAGS = -O3 -Wextra -Wall
+CFLAGS += -Wextra -Wall
CFILES = SearchGame.c TransGame.c Game.c
JAVAFILES = SearchGame.java Connect4.java Game.java TransGame.java
HASKELLFILES = Main.hs Connect4.hs GameTreeSearch.hs

View file

@ -1,7 +0,0 @@
--- /dev/null Thu Nov 23 08:52:26 2006
+++ fhourstones Thu Nov 23 08:45:21 2006
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec %%PREFIX%%/lib/fhourstones/SearchGame < %%PREFIX%%/lib/fhourstones/inputs
+

View file

@ -2,4 +2,4 @@ This integer benchmark solves positions in the game of connect-4,
as played on a vertical 7x6 board. This takes about 10 minutes
on contemporary PCs.
WWW: http://homepages.cwi.nl/~tromp/c4/fhour.html
WWW: http://tromp.github.io/c4/fhour.html