diff options
author | Renato Botelho <garga@FreeBSD.org> | 2005-10-04 11:07:34 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2005-10-04 11:07:34 +0000 |
commit | fb61ae157cfab813c13992fb74728b425af3ef01 (patch) | |
tree | 2411155769f463212dbe479ff1ea887206137957 /games/annelid | |
parent | 25c4d5203020277f7b5acc4ae0aff36ced402f76 (diff) | |
download | ports-fb61ae157cfab813c13992fb74728b425af3ef01.tar.gz ports-fb61ae157cfab813c13992fb74728b425af3ef01.zip |
Add annelid 1, remake of the ubiquitous "Snake" and "Worm" games.
PR: ports/84923
Submitted by: Alejandro Pulver <alejandro@varnet.biz>
Notes
Notes:
svn path=/head/; revision=144148
Diffstat (limited to 'games/annelid')
-rw-r--r-- | games/annelid/Makefile | 68 | ||||
-rw-r--r-- | games/annelid/distinfo | 4 | ||||
-rw-r--r-- | games/annelid/files/annelid-sh.in | 19 | ||||
-rw-r--r-- | games/annelid/files/patch-Makefile | 32 | ||||
-rw-r--r-- | games/annelid/pkg-descr | 14 | ||||
-rw-r--r-- | games/annelid/pkg-plist | 22 |
6 files changed, 159 insertions, 0 deletions
diff --git a/games/annelid/Makefile b/games/annelid/Makefile new file mode 100644 index 000000000000..bef77b66b775 --- /dev/null +++ b/games/annelid/Makefile @@ -0,0 +1,68 @@ +# New ports collection makefile for: annelid +# Date created: 11 Aug 2005 +# Whom: Alejandro Pulver <alejandro@varnet.biz> +# +# $FreeBSD$ +# + +PORTNAME= annelid +PORTVERSION= 1 +CATEGORIES= games +MASTER_SITES= http://www.garthgillespie.com/annelid/ +DISTFILES= ${PORTNAME}-src${EXTRACT_SUFX} \ + ${PORTNAME}-media${EXTRACT_SUFX} + +MAINTAINER= alejandro@varnet.biz +COMMENT= Remake of the ubiquitous "Snake" and "Worm" games + +RESTRICTED= No redistribution allowed + +USE_ZIP= yes +USE_GMAKE= yes +USE_SDL= sdl +USE_GL= yes +USE_REINPLACE= yes + +NO_WRKSUBDIR= yes + +OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" on + +SUB_FILES= ${PORTNAME}-sh + +DATAFILES= annelid.dat apple.tga apple.wav backd.tga backn.tga font.dat \ + font.tga front.tga grow.wav head.tga powerup.tga readme.txt \ + score.wav segment.tga shrink.wav slow.wav speed.wav title.tga \ + vortex.wav + +do-install: +# Script + @${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-sh ${PREFIX}/bin/${PORTNAME} + +# Program + @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/libexec + +# Data + @${MKDIR} ${DATADIR} +.for f in ${DATAFILES} + @${INSTALL_DATA} ${WRKSRC}/${f} ${DATADIR} +.endfor + +.include <bsd.port.pre.mk> + +post-patch: +# Fix Makefile + @${REINPLACE_CMD} -e 's|%%CFLAGS%%|${CFLAGS}| ; \ + s|%%X11BASE%%|${X11BASE}| ; \ + s|sdl-config|${SDL_CONFIG}|' \ + ${WRKSRC}/${MAKEFILE} + +# Fix SDL include statement + @${REINPLACE_CMD} -e 's|\(#include.*\)SDL/\(SDL.*\)|\1\2|' \ + ${WRKSRC}/*.cpp ${WRKSRC}/*.h + +# Enable/disable compilation optimizations +.if !defined(WITH_OPTIMIZED_CFLAGS) + @${REINPLACE_CMD} -e 's|$$(OPT)||' ${WRKSRC}/${MAKEFILE} +.endif + +.include <bsd.port.post.mk> diff --git a/games/annelid/distinfo b/games/annelid/distinfo new file mode 100644 index 000000000000..844100136d2b --- /dev/null +++ b/games/annelid/distinfo @@ -0,0 +1,4 @@ +MD5 (annelid-src.zip) = daaaac34057b9ecbe5e5edb98fd2ed1f +SIZE (annelid-src.zip) = 37783 +MD5 (annelid-media.zip) = 062040d11b3c944b0cc0b053557fc698 +SIZE (annelid-media.zip) = 450722 diff --git a/games/annelid/files/annelid-sh.in b/games/annelid/files/annelid-sh.in new file mode 100644 index 000000000000..6199a320986d --- /dev/null +++ b/games/annelid/files/annelid-sh.in @@ -0,0 +1,19 @@ +#!/bin/sh + +# The executable needs to be run from its data directory, and needs to store +# configuration in it. We therefore mirror the data directory hierarchy in +# ~/.annelid, and create symlinks to the data files. + +cd %%DATADIR%% || exit 1 + +mkdir -p ~/.annelid || exit 1 + +test -f ~/.annelid/annelid.dat || cp annelid.dat ~/.annelid && \ +chmod u+w ~/.annelid/annelid.dat + +find * -type f -exec ln -s %%DATADIR%%/{} ~/.annelid/{} \; 2>/dev/null || \ +exit 1 + +cd ~/.annelid || exit 1 + +exec %%PREFIX%%/libexec/annelid "$@" diff --git a/games/annelid/files/patch-Makefile b/games/annelid/files/patch-Makefile new file mode 100644 index 000000000000..1409572e7763 --- /dev/null +++ b/games/annelid/files/patch-Makefile @@ -0,0 +1,32 @@ +--- Makefile.orig Thu Jun 17 23:58:24 2004 ++++ Makefile Sun Jul 24 14:38:41 2005 +@@ -4,7 +4,6 @@ + # For more information, please visit http://www.garthgillespie.com/annelid/ . + + # Comment the next line for non-windows. This is not well tested. +-WINDOWS=1 + + ifdef WINDOWS + NAME=annelid.exe +@@ -14,16 +13,16 @@ + + OBJS=main.o mixer.o highscore.o texture.o centeredtexture.o fonttexture.o scrolltexture.o targa.o worm.o apple.o powerup.o visual.o + +-CC=gcc +-CCC=g++ +-CFLAGS=-I. `sdl-config --cflags` -c -Wall -ggdb -fomit-frame-pointer -O3 ++CCC=$(CXX) ++CFLAGS=%%CFLAGS%% -I. -I%%X11BASE%%/include `sdl-config --cflags` -c -Wall $(OPT) ++OPT = -fomit-frame-pointer -O3 + +-LD=g++ ++LD=$(CXX) + + ifdef WINDOWS + LIBS=-lopengl32 `sdl-config --libs` + else +-LIBS=-L/usr/X11R6/lib -lGL `sdl-config --libs` ++LIBS=-L%%X11BASE%%/lib -lGL `sdl-config --libs` + endif + + all: $(NAME) diff --git a/games/annelid/pkg-descr b/games/annelid/pkg-descr new file mode 100644 index 000000000000..dd423f81bcc7 --- /dev/null +++ b/games/annelid/pkg-descr @@ -0,0 +1,14 @@ +Analog Annelid is a remake of the ubiquitous "Snake" and "Worm" games in which +the player controls the movement of such a creature in an attempt to collect +apples, numbers, or whatever. Upon collecting these items, the creature grows +in length. This process continues until the creature collides with itself or +perhaps a wall or some other obstacle. + +Most of these games only allow the hapless forager to make 90 turns. This is +for the sake of easier programming both in the game itself and in the display +of graphics. + +Analog Annelid absolves itself of this stigma for a smooth, free-flowing game +world and more complex gameplay. + +WWW: http://www.garthgillespie.com/annelid/ diff --git a/games/annelid/pkg-plist b/games/annelid/pkg-plist new file mode 100644 index 000000000000..9e3529668c46 --- /dev/null +++ b/games/annelid/pkg-plist @@ -0,0 +1,22 @@ +bin/annelid +libexec/annelid +%%DATADIR%%/annelid.dat +%%DATADIR%%/apple.tga +%%DATADIR%%/apple.wav +%%DATADIR%%/backd.tga +%%DATADIR%%/backn.tga +%%DATADIR%%/font.dat +%%DATADIR%%/font.tga +%%DATADIR%%/front.tga +%%DATADIR%%/grow.wav +%%DATADIR%%/head.tga +%%DATADIR%%/powerup.tga +%%DATADIR%%/readme.txt +%%DATADIR%%/score.wav +%%DATADIR%%/segment.tga +%%DATADIR%%/shrink.wav +%%DATADIR%%/slow.wav +%%DATADIR%%/speed.wav +%%DATADIR%%/title.tga +%%DATADIR%%/vortex.wav +@dirrm %%DATADIR%% |