aboutsummaryrefslogtreecommitdiffstats
path: root/games/pmars
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2005-08-01 03:33:40 +0800
committerlesi <lesi@FreeBSD.org>2005-08-01 03:33:40 +0800
commit541a7a54563e61dee19b460eca99ebb75a291106 (patch)
tree6e013432f0d77852a202e596267f9bf31f618474 /games/pmars
parent5488c79452958897a9a3353ae82c15d1817b838d (diff)
downloadfreebsd-ports-gnome-541a7a54563e61dee19b460eca99ebb75a291106.tar.gz
freebsd-ports-gnome-541a7a54563e61dee19b460eca99ebb75a291106.tar.zst
freebsd-ports-gnome-541a7a54563e61dee19b460eca99ebb75a291106.zip
* Update to version 0.9.6.
* Add OPTIONS and allow building of different interfaces. * Remove documentation (now in games/pmars-doc). * Remove pkg-plist. * Format pkg-descr. * Transfer maintainership to submitter. PR: ports/84353 Submitted by: Alejandro Pulver (new maintainer) Approved by: Gianmarco Giovannelli (previous maintainer)
Diffstat (limited to 'games/pmars')
-rw-r--r--games/pmars/Makefile125
-rw-r--r--games/pmars/distinfo4
-rw-r--r--games/pmars/files/patch-Makefile20
-rw-r--r--games/pmars/files/patch-aa25
-rw-r--r--games/pmars/pkg-descr17
-rw-r--r--games/pmars/pkg-plist9
6 files changed, 128 insertions, 72 deletions
diff --git a/games/pmars/Makefile b/games/pmars/Makefile
index dfa0d3ae9055..ca62468456b8 100644
--- a/games/pmars/Makefile
+++ b/games/pmars/Makefile
@@ -6,37 +6,106 @@
#
PORTNAME= pmars
-PORTVERSION= 0.8
+PORTVERSION= 0.9.2
CATEGORIES= games
-MASTER_SITES= http://www.koth.org/pmars/ \
- http://www.giovannelli.it/~gmarco/files/
-DISTFILES= pmars08s.tar.Z
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= corewar
-MAINTAINER= gmarco@giovannelli.it
+MAINTAINER= alejandro@varnet.biz
COMMENT= A portable corewar system with ICWS'94 extensions
-USE_XLIB= yes
-NO_WRKSUBDIR= yes
-MAKEFILE= makefile
-ALL_TARGET= pmars
-MAN6= pmars.6
+WRKSRC= ${WRKDIR}/${DISTNAME}/src
+
+OPTIONS= SERVER "Use the command-line interface" on \
+ CURSES "Use the console (graphical) interface" off \
+ X11 "Use the X11 (graphical) interface" off \
+ ICWS94 "Enable ICWS'94 support" on \
+ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
+ PERMUTATE "Enable the -P switch" on \
+ SMALLMEM "Use 16-bit addresses (smaller)" off
+
+MAKE_ARGS+= CFLAGS+="${CFLAGS}" \
+ CFLAGS+="-fno-builtin"
+
+PLIST_FILES= bin/${PORTNAME}${PKGNAMESUFFIX}
+
+EXTRACT_COOKIE= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g}
+CONFIGURE_COOKIE=${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g}
+INSTALL_COOKIE= ${WRKDIR}/.install_done.${PORTNAME}.${PREFIX:S/\//_/g}
+BUILD_COOKIE= ${WRKDIR}/.build_done.${PORTNAME}.${PREFIX:S/\//_/g}
+PATCH_COOKIE= ${WRKDIR}/.patch_done.${PORTNAME}.${PREFIX:S/\//_/g}
+PACKAGE_COOKIE= ${WRKDIR}/.package_done.${PORTNAME}.${PREFIX:S/\//_/g}
do-install:
- @${MKDIR} ${PREFIX}/share/games
- @${MKDIR} ${PREFIX}/share/games/corewars
- @${INSTALL_PROGRAM} ${WRKSRC}/pmars ${PREFIX}/bin
- @${INSTALL_DATA} ${WRKSRC}/pmars.6 ${PREFIX}/man/man6
- @${INSTALL_DATA} ${WRKSRC}/*.red ${PREFIX}/share/games/corewars
- @${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/games/corewars
- @${ECHO_MSG} ""
- @${ECHO_MSG} "You can try something like :"
- @${ECHO_MSG} "pmars -v 603 ${PREFIX}/share/games/corewars/rave.red ${PREFIX}/share/games/corewars/aeka.red"
- @${ECHO_MSG} "to see how the simulator works (rave.red and aeka.red are two sample warriors)"
- @${ECHO_MSG} ""
- @${ECHO_MSG} "Some other warriors are installed in : ${PREFIX}/share/games/corewars"
- @${ECHO_MSG} ""
- @${ECHO_MSG} "Plase read also ${PREFIX}/share/games/corewars/README file for more infos"
- @${ECHO_MSG} "on corewars and on the current version of pmars"
- @${ECHO_MSG} ""
-
-.include <bsd.port.mk>
+ @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \
+ ${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX}
+
+.include <bsd.port.pre.mk>
+
+# Interfaces (possibly conflictive options)
+INTERFACES= SERVER CURSES X11
+
+# Check for conflictive options
+.for f in ${INTERFACES}
+. if defined(WITH_${f})
+. if defined(INTERFACE_SET)
+INTERFACE_DUP= yes
+. else
+INTERFACE_SET= yes
+. endif
+. endif
+.endfor
+
+# Add options that conflict to a variable
+.if defined(INTERFACE_DUP)
+. for f in ${INTERFACES}
+. if defined(WITH_${f})
+CONFOPTS+= ${f}
+. endif
+. endfor
+.endif
+
+# Ask the user to remove conflicting options
+.if defined(CONFOPTS)
+IGNORE= Conflicting options: ${CONFOPTS}
+.endif
+
+# Use default interface if not set
+.if !defined(INTERFACE_SET)
+WITH_SERVER= yes
+.endif
+
+.if defined(WITH_ICWS94)
+MAKE_ARGS+= CFLAGS+="-DEXT94"
+.endif
+
+.if defined(WITH_OPTIMIZED_CFLAGS)
+MAKE_ARGS+= CFLAGS+="-O3 -fomit-frame-pointer"
+.endif
+
+.if defined(WITH_PERMUTATE)
+MAKE_ARGS+= CFLAGS+="-DPERMUTATE"
+.endif
+
+.if defined(WITH_SMALLMEM)
+MAKE_ARGS+= CFLAGS+="-DSMALLMEM"
+.endif
+
+.if defined(WITH_SERVER)
+PKGNAMESUFFIX= -server
+MAKE_ARGS+= CFLAGS+="-DSERVER"
+
+.elif defined(WITH_CURSES)
+PKGNAMESUFFIX= -curses
+MAKE_ARGS+= CFLAGS+="-DGRAPHX" \
+ LIB+="-lcurses"
+
+.elif defined(WITH_X11)
+PKGNAMESUFFIX= -x11
+USE_XLIB= yes
+MAKE_ARGS+= CFLAGS+="-DXWINGRAPHX" \
+ CFLAGS+="-I${X11BASE}/include" \
+ LIB+="-L${X11BASE}/lib -lX11"
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/games/pmars/distinfo b/games/pmars/distinfo
index df24bff16dae..e984d2ff286c 100644
--- a/games/pmars/distinfo
+++ b/games/pmars/distinfo
@@ -1,2 +1,2 @@
-MD5 (pmars08s.tar.Z) = ad1869ea0a388f5c5070c4cd33b09d25
-SIZE (pmars08s.tar.Z) = 226225
+MD5 (pmars-0.9.2.tar.gz) = a73943a34e9de8f0d3028fc4566cd558
+SIZE (pmars-0.9.2.tar.gz) = 158415
diff --git a/games/pmars/files/patch-Makefile b/games/pmars/files/patch-Makefile
new file mode 100644
index 000000000000..820f208029df
--- /dev/null
+++ b/games/pmars/files/patch-Makefile
@@ -0,0 +1,20 @@
+--- Makefile.orig Sun Dec 24 09:53:39 2000
++++ Makefile Wed Jul 6 20:33:52 2005
+@@ -1,5 +1,4 @@
+ # generic UNIX makefile
+-CC = gcc # req. for linux
+ #CC = cc # if you don't have gcc
+ # Configuration options:
+ #
+@@ -16,11 +15,8 @@
+ # (6) -DXWINGRAPHX 1 X-Windows graphics (UNIX)
+ # (7) -DPERMUTATE enables -P switch
+
+-CFLAGS = -O -DEXT94 -DXWINGRAPHX -DPERMUTATE
+-LFLAGS = -x
+ # LIB = -lcurses -ltermlib # enable this one for curses display
+ # LIB = -lvgagl -lvga # enable this one for Linux/SVGA
+-LIB = -L/usr/X11R6/lib -lX11 # enable this one for X11
+
+ .SUFFIXES: .o .c .c~ .man .doc .6
+ MAINFILE = pmars
diff --git a/games/pmars/files/patch-aa b/games/pmars/files/patch-aa
deleted file mode 100644
index 6d37fe3f04e1..000000000000
--- a/games/pmars/files/patch-aa
+++ /dev/null
@@ -1,25 +0,0 @@
---- makefile.orig Fri Oct 27 06:37:29 1995
-+++ makefile Sun Apr 11 20:36:53 1999
-@@ -1,6 +1,6 @@
- # generic UNIX makefile
- #CC = gcc # req. for linux
--CC = cc # if you don't have gcc
-+CC ?= cc # if you don't have gcc
- # Configuration options:
- #
- # No. Name Incompatible with Description
-@@ -15,11 +15,12 @@
- # (5) -DSMALLMEM 16-bit addresses, less memory
- # (6) -DXWINGRAPHX 1 X-Windows graphics (UNIX)
-
--CFLAGS = -O -DEXT94
-+CFLAGS ?= -O
-+CFLAGS += -I/usr/X11R6/include -DEXT94 -DGRAPHX -DXWINGRAPHX
- LFLAGS = -x
- LIB = -lcurses -ltermlib # enable this one for curses display
- # LIB = -lvgagl -lvga # enable this one for Linux/SVGA
--# LIB = -lX11 # enable this one for X11
-+LIB = -L/usr/X11R6/lib -lX11 # enable this one for X11
-
- .SUFFIXES: .o .c .c~ .man .doc .6
- MAINFILE = pmars
diff --git a/games/pmars/pkg-descr b/games/pmars/pkg-descr
index 55f62961af24..8db65d04b4bd 100644
--- a/games/pmars/pkg-descr
+++ b/games/pmars/pkg-descr
@@ -1,9 +1,12 @@
-pMARS (portable Memory Array Redcode Simulator) is a corewar
-interpreter with multi-platform support.
-pMARS implements the ICWS'94 draft standard, but can also be
-used in ICWS'88 mode.
-The base system includes a graphical core display for UNIX (curses,
-X11 and Linux svgalib), PC/DOS, and the Mac.
+pMARS (portable Memory Array Redcode Simulator) is a corewar interpreter with
+multi-platform support.
+
+pMARS implements the ICWS'94 draft standard, but can also be used in ICWS'88
+mode.
+
+The base system includes a graphical core display for UNIX (curses, X11 and
+Linux svgalib), PC/DOS, and the Mac.
+
A line-oriented debugger is included to help in writing warriors.
Contributors:
@@ -12,8 +15,6 @@ Contributors:
* Stefan Strack (stst@vuse.vanderbilt.edu)
* Mintardjo Wangsawidjaja (wangsawm@kira.csos.orst.edu)
-distfile: pmars08s.tar.Z (about 220kb)
-
WWW: http://www.koth.org/pmars/
-Gianmarco
diff --git a/games/pmars/pkg-plist b/games/pmars/pkg-plist
deleted file mode 100644
index a88abcdb91cb..000000000000
--- a/games/pmars/pkg-plist
+++ /dev/null
@@ -1,9 +0,0 @@
-bin/pmars
-share/games/corewars/aeka.red
-share/games/corewars/pspace.red
-share/games/corewars/validate.red
-share/games/corewars/rave.red
-share/games/corewars/flashpaper.red
-share/games/corewars/README
-@dirrm share/games/corewars
-@unexec /bin/rmdir %D/share/games >/dev/null 2>&1 || true