From a463f46fb4df82499f87cd34db2847a8444863da Mon Sep 17 00:00:00 2001 From: Emanuel Haupt Date: Wed, 31 May 2006 13:48:58 +0000 Subject: [PATCH] Add zatacka 0.1.4, nibbles-like multiplayer game. PR: 94982 Submitted by: Dmitry Marakasov --- games/Makefile | 1 + games/zatacka/Makefile | 49 ++++++++++++++++++++++++++++++ games/zatacka/distinfo | 3 ++ games/zatacka/files/patch-Makefile | 35 +++++++++++++++++++++ games/zatacka/files/patch-fx.cpp | 11 +++++++ games/zatacka/pkg-descr | 6 ++++ games/zatacka/pkg-plist | 5 +++ 7 files changed, 110 insertions(+) create mode 100644 games/zatacka/Makefile create mode 100644 games/zatacka/distinfo create mode 100644 games/zatacka/files/patch-Makefile create mode 100644 games/zatacka/files/patch-fx.cpp create mode 100644 games/zatacka/pkg-descr create mode 100644 games/zatacka/pkg-plist diff --git a/games/Makefile b/games/Makefile index 5d4bf9f9d6b7..1d1fc0beede9 100644 --- a/games/Makefile +++ b/games/Makefile @@ -841,6 +841,7 @@ SUBDIR += yahtzee SUBDIR += yamsweeper SUBDIR += zangband + SUBDIR += zatacka SUBDIR += zephulor SUBDIR += znibbles SUBDIR += zoom diff --git a/games/zatacka/Makefile b/games/zatacka/Makefile new file mode 100644 index 000000000000..7058b44c48cc --- /dev/null +++ b/games/zatacka/Makefile @@ -0,0 +1,49 @@ +# New ports collection makefile for: zatacka +# Date created: 26 Mar 2006 +# Whom: Dmitry Marakasov +# +# $FreeBSD$ +# + +PORTNAME= zatacka +PORTVERSION= 0.1.4 +CATEGORIES= games +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +DISTNAME= ${PORTNAME}-${PORTVERSION}_src + +MAINTAINER= amdmi3@mail.ru +COMMENT= Nibbles-like multiplayer game + +USE_SDL= sdl ttf image +USE_GMAKE= yes + +WRKSRC= ${WRKDIR}/zatacka +MAKE_ARGS= CXX=${CXX} + +PORTDOCS= README + +post-patch: + @${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|font.ttf|${DATADIR}/font.ttf|' ${WRKSRC}/fx.h + @${REINPLACE_CMD} -e 's|SDL/|SDL11/|' ${WRKSRC}/SDL_prim.h \ + ${WRKSRC}/fx.h + @${REINPLACE_CMD} -e 's|barrier.jpg|${DATADIR}/barrier.jpg|' \ + ${WRKSRC}/fx.cpp + @${REINPLACE_CMD} -e 's|main_screen.jpg|${DATADIR}/main_screen.jpg|' \ + ${WRKSRC}/fx.cpp + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/main_screen.jpg ${WRKSRC}/barrier.jpg \ + ${WRKSRC}/font.ttf ${DATADIR} + +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} +.for f in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} +.endfor +.endif + +.include diff --git a/games/zatacka/distinfo b/games/zatacka/distinfo new file mode 100644 index 000000000000..69a554dbf8c3 --- /dev/null +++ b/games/zatacka/distinfo @@ -0,0 +1,3 @@ +MD5 (zatacka-0.1.4_src.tar.gz) = 3c00ea94811eb6886f58c5eac16fc22d +SHA256 (zatacka-0.1.4_src.tar.gz) = 949e96764fbfa5eb1349bd2d1d2cb90dace943090667d117564e0a6cd782cfdb +SIZE (zatacka-0.1.4_src.tar.gz) = 128061 diff --git a/games/zatacka/files/patch-Makefile b/games/zatacka/files/patch-Makefile new file mode 100644 index 000000000000..4732b64a19a8 --- /dev/null +++ b/games/zatacka/files/patch-Makefile @@ -0,0 +1,35 @@ +--- Makefile.orig Fri Dec 30 17:27:36 2005 ++++ Makefile Mon Mar 27 00:52:59 2006 +@@ -4,7 +4,7 @@ + # Copryright: GNU GPL (http://www.gnu.org/copyleft/gpl.html) + ##---------------------------------------------------------------------------- + rm=/bin/rm -f +-CC= g++ ++CXX?= g++ + DEFS= + PROGNAME= zatacka + INCLUDES= -I. +@@ -12,7 +12,7 @@ + + + DEFINES= $(INCLUDES) $(DEFS) -DSYS_UNIX=1 +-CFLAGS= -g $(DEFINES) `sdl-config --cflags` ++CXXFLAGS+= $(DEFINES) `sdl-config --cflags` + + SRCS = main.cpp fx.cpp SDL_prim.c + +@@ -20,12 +20,12 @@ + + .c.o: + $(rm) $@ +- $(CC) $(CFLAGS) -c $*.c ++ $(CXX) $(CXXFLAGS) -c $*.c + + all: $(PROGNAME) + + $(PROGNAME) : $(OBJS) +- $(CC) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS) ++ $(CXX) $(CXXFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS) + + clean: + $(rm) $(OBJS) $(PROGNAME) core *~ diff --git a/games/zatacka/files/patch-fx.cpp b/games/zatacka/files/patch-fx.cpp new file mode 100644 index 000000000000..0e09b32ad296 --- /dev/null +++ b/games/zatacka/files/patch-fx.cpp @@ -0,0 +1,11 @@ +--- fx.cpp.orig Mon Mar 27 00:43:47 2006 ++++ fx.cpp Mon Mar 27 00:47:47 2006 +@@ -46,8 +46,6 @@ + int i; + char* wd; + +- wd=GetAppPath(); //get path to aplication directory +- chdir(wd); //change working directory to aplication directory + + if((SDL_Init(SDL_INIT_VIDEO ))==-1){ //initialize SDL library + disperr("Error initializing SDL"); diff --git a/games/zatacka/pkg-descr b/games/zatacka/pkg-descr new file mode 100644 index 000000000000..42802a2365d4 --- /dev/null +++ b/games/zatacka/pkg-descr @@ -0,0 +1,6 @@ +Multiplayer game for 2-6 players on one keyboard and mouse. You handle your line +using two kays. When you hit any line, barrier or border of game field, you die +and other players get one point each. When leaves only one players in game, +he's a winner an round is finished. Each game has eleven rounds. + +WWW: http://zatacka.sourceforge.net/ diff --git a/games/zatacka/pkg-plist b/games/zatacka/pkg-plist new file mode 100644 index 000000000000..07205e6ae221 --- /dev/null +++ b/games/zatacka/pkg-plist @@ -0,0 +1,5 @@ +bin/zatacka +%%DATADIR%%/barrier.jpg +%%DATADIR%%/font.ttf +%%DATADIR%%/main_screen.jpg +@dirrm %%DATADIR%%