aboutsummaryrefslogtreecommitdiffstats
path: root/games/exmars
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2005-07-25 09:36:04 +0800
committerlesi <lesi@FreeBSD.org>2005-07-25 09:36:04 +0800
commit4cd074eaecc2a545b35268b52d674aea6a32d50c (patch)
tree39300b350f7fd3e5526713e80ce509b056645099 /games/exmars
parent6eac7b9e6ce6d699039cea6b2884f5b91172bd48 (diff)
downloadfreebsd-ports-gnome-4cd074eaecc2a545b35268b52d674aea6a32d50c.tar.gz
freebsd-ports-gnome-4cd074eaecc2a545b35268b52d674aea6a32d50c.tar.zst
freebsd-ports-gnome-4cd074eaecc2a545b35268b52d674aea6a32d50c.zip
* Change option OPTIMIZED_CFLAGS to ON.
* Adjust optimizations for all architectures. * Use optimizations if GCC >= 3.X (OSVERSION >= 500035). * Note how to install Ruby interface. PR: ports/84024 Submitted by: Alejandro Pulver (maintainer)
Diffstat (limited to 'games/exmars')
-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