aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDejan Lesjak <lesi@FreeBSD.org>2005-07-25 01:36:04 +0000
committerDejan Lesjak <lesi@FreeBSD.org>2005-07-25 01:36:04 +0000
commitfe34be1887c5b4310d9914feb09ce76d1116eb62 (patch)
tree8aa930858acd727edbc844d82f9171f2a4e583dd /games
parent7737418647d9c8a7c07e8f0ac107717888621c81 (diff)
downloadports-fe34be1887c5b4310d9914feb09ce76d1116eb62.tar.gz
ports-fe34be1887c5b4310d9914feb09ce76d1116eb62.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/exmars/Makefile26
-rw-r--r--games/exmars/pkg-descr1
2 files changed, 25 insertions, 2 deletions
diff --git a/games/exmars/Makefile b/games/exmars/Makefile
index d41634f61db9..8f27e09ea025 100644
--- a/games/exmars/Makefile
+++ b/games/exmars/Makefile
@@ -14,10 +14,11 @@ MAINTAINER= alejandro@varnet.biz
COMMENT= Memory Array Redcode Simulator, just like exhaust and pMARS
USE_REINPLACE= yes
+REINPLACE_ARGS= -i ''
ALL_TARGET= ${PORTNAME}
-OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" off
+OPTIONS= OPTIMIZED_CFLAGS "Use optimized cflags (for FreeBSD >= 5.X)" on
do-install:
# Program
@@ -30,6 +31,22 @@ do-install:
.include <bsd.port.pre.mk>
+# Adjust optimization flags for all architectures
+.if ${ARCH} != "i386"
+BADCFLAGS+= -malign-double
+.endif
+
+.if ${ARCH} != "amd64" && ${ARCH} != "ia64"
+BADCFLAGS+= -maccumulate-outgoing-args \
+ -minline-all-stringops \
+ -mno-align-stringops
+.endif
+
+.if ${ARCH} == "alpha"
+BADCFLAGS+= -ffast-math \
+ -fprefetch-loop-arrays
+.endif
+
post-patch:
# Fix bench.sh
@${REINPLACE_CMD} -e 's|pmars|pmars-server| ; \
@@ -38,8 +55,13 @@ post-patch:
# Enable/disable compilation optimizations
@${REINPLACE_CMD} -e 's|\($${OPT}\)|${CFLAGS} \1|' ${WRKSRC}/${MAKEFILE}
-.if !defined(WITH_OPTIMIZED_CFLAGS)
+.if !defined(WITH_OPTIMIZED_CFLAGS) || ${OSVERSION} < 500035
@${REINPLACE_CMD} -e 's|$${OPT}||' ${WRKSRC}/${MAKEFILE}
.endif
+# Adjust optimization flags for all architectures
+.for f in ${BADCFLAGS}
+ @${REINPLACE_CMD} -e 's|${f}||g' ${WRKSRC}/${MAKEFILE}
+.endfor
+
.include <bsd.port.post.mk>
diff --git a/games/exmars/pkg-descr b/games/exmars/pkg-descr
index b9bebf1d5c2e..170e2151d0d1 100644
--- a/games/exmars/pkg-descr
+++ b/games/exmars/pkg-descr
@@ -15,6 +15,7 @@ The resulting program has the following main features:
options).
* Rewritten the code in a more object oriented way, which allows different
Mars at the same time in the same program, it should also be thread save.
+* To get Ruby interface you can install games/ruby-exmars port.
Author: Martin Ankerl