diff options
author | garga <garga@FreeBSD.org> | 2005-10-05 01:11:27 +0800 |
---|---|---|
committer | garga <garga@FreeBSD.org> | 2005-10-05 01:11:27 +0800 |
commit | 7efaf48d561b6730bb1ba7511864bcc05b1723d1 (patch) | |
tree | 90710a9ee83e278bc3703cf0e346d71a53e5c090 /games/pmars | |
parent | 5442b8e2dc75adbd21ca6a41d4606b28f2b819e9 (diff) | |
download | freebsd-ports-gnome-7efaf48d561b6730bb1ba7511864bcc05b1723d1.tar.gz freebsd-ports-gnome-7efaf48d561b6730bb1ba7511864bcc05b1723d1.tar.zst freebsd-ports-gnome-7efaf48d561b6730bb1ba7511864bcc05b1723d1.zip |
- Allow installing different interfaces at once.
- Install documentation, obsoleting "games/pmars-doc"
PR: ports/86895
Submitted by: maintainer
Diffstat (limited to 'games/pmars')
-rw-r--r-- | games/pmars/Makefile | 104 | ||||
-rw-r--r-- | games/pmars/pkg-descr | 2 | ||||
-rw-r--r-- | games/pmars/pkg-plist | 26 |
3 files changed, 74 insertions, 58 deletions
diff --git a/games/pmars/Makefile b/games/pmars/Makefile index ca62468456b8..cc821c0438b6 100644 --- a/games/pmars/Makefile +++ b/games/pmars/Makefile @@ -16,63 +16,23 @@ COMMENT= A portable corewar system with ICWS'94 extensions 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 \ +OPTIONS= CURSES "Build the console (graphical) interface" on \ 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 + SERVER "Build the command-line interface" on \ + SMALLMEM "Use 16-bit addresses (smaller)" off \ + X11 "Build the X11 (graphical) interface" on 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: - @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \ - ${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX} +MAN6= pmars.6 .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 +.if !defined(WITH_CURSES) && !defined(WITH_SERVER) && !defined(WITH_X11) +IGNORE= Please select at least one interface .endif .if defined(WITH_ICWS94) @@ -91,21 +51,51 @@ MAKE_ARGS+= CFLAGS+="-DPERMUTATE" 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" \ +.if defined(WITH_CURSES) +TARGETS+= curses +CURSES_ARGS+= CFLAGS+="-DGRAPHX" \ LIB+="-lcurses" +PLIST_SUB+= CURSES="" +.else +PLIST_SUB+= CURSES="@comment " +.endif -.elif defined(WITH_X11) -PKGNAMESUFFIX= -x11 +.if defined(WITH_SERVER) +TARGETS+= server +SERVER_ARGS+= CFLAGS+="-DSERVER" +PLIST_SUB+= SERVER="" +.else +PLIST_SUB+= SERVER="@comment " +.endif + +.if defined(WITH_X11) USE_XLIB= yes -MAKE_ARGS+= CFLAGS+="-DXWINGRAPHX" \ +TARGETS+= x11 +X11_ARGS+= CFLAGS+="-DXWINGRAPHX" \ CFLAGS+="-I${X11BASE}/include" \ LIB+="-L${X11BASE}/lib -lX11" +PLIST_SUB+= X11="" +.else +PLIST_SUB+= X11="@comment " +.endif + +do-build: +.for f in ${TARGETS} + @(cd ${BUILD_WRKSRC}; ${MAKE} ${MAKE_ARGS} ${${f:U}_ARGS} \ + ${ALL_TARGET} clean) + @(cd ${BUILD_WRKSRC}; ${MV} ${PORTNAME} ${PORTNAME}-${f}) +.endfor + +do-install: +.for f in ${TARGETS} + @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-${f} ${PREFIX}/bin +.endfor +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +. for f in README config doc warriors + @${CP} -R ${WRKSRC}/../${f} ${DOCSDIR} +. endfor + @${INSTALL_MAN} ${WRKSRC}/../doc/pmars.6 ${PREFIX}/man/man6 .endif .include <bsd.port.post.mk> diff --git a/games/pmars/pkg-descr b/games/pmars/pkg-descr index 8db65d04b4bd..9ef8a5e80a72 100644 --- a/games/pmars/pkg-descr +++ b/games/pmars/pkg-descr @@ -17,5 +17,5 @@ Contributors: WWW: http://www.koth.org/pmars/ --Gianmarco +- Gianmarco gmarco@giovannelli.it diff --git a/games/pmars/pkg-plist b/games/pmars/pkg-plist new file mode 100644 index 000000000000..6234735470ca --- /dev/null +++ b/games/pmars/pkg-plist @@ -0,0 +1,26 @@ +%%CURSES%%bin/pmars-curses +%%SERVER%%bin/pmars-server +%%X11%%bin/pmars-x11 +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/config/94x.opt +%%PORTDOCS%%%%DOCSDIR%%/config/icws.opt +%%PORTDOCS%%%%DOCSDIR%%/config/mw.mac +%%PORTDOCS%%%%DOCSDIR%%/config/pmars.mac +%%PORTDOCS%%%%DOCSDIR%%/config/x.opt +%%PORTDOCS%%%%DOCSDIR%%/doc/Makefile +%%PORTDOCS%%%%DOCSDIR%%/doc/corewar-faq.html +%%PORTDOCS%%%%DOCSDIR%%/doc/makedoc.ex +%%PORTDOCS%%%%DOCSDIR%%/doc/pmars.6 +%%PORTDOCS%%%%DOCSDIR%%/doc/primer.94 +%%PORTDOCS%%%%DOCSDIR%%/doc/primer.cdb +%%PORTDOCS%%%%DOCSDIR%%/doc/redcode.ref +%%PORTDOCS%%%%DOCSDIR%%/doc/whatsnew.080 +%%PORTDOCS%%%%DOCSDIR%%/warriors/aeka.red +%%PORTDOCS%%%%DOCSDIR%%/warriors/flashpaper.red +%%PORTDOCS%%%%DOCSDIR%%/warriors/pspace.red +%%PORTDOCS%%%%DOCSDIR%%/warriors/rave.red +%%PORTDOCS%%%%DOCSDIR%%/warriors/validate.red +%%PORTDOCS%%@dirrm %%DOCSDIR%%/warriors +%%PORTDOCS%%@dirrm %%DOCSDIR%%/config +%%PORTDOCS%%@dirrm %%DOCSDIR%%/doc +%%PORTDOCS%%@dirrm %%DOCSDIR%% |