aboutsummaryrefslogtreecommitdiff
path: root/games/patapizza-tetris
diff options
context:
space:
mode:
authorBoris Samorodov <bsam@FreeBSD.org>2012-09-22 16:22:48 +0000
committerBoris Samorodov <bsam@FreeBSD.org>2012-09-22 16:22:48 +0000
commit7280544d12fe02c58857b669cbf7c34bd6405970 (patch)
treeb09de2a829cd181df5137693289bf832fae718be /games/patapizza-tetris
parent005028e1640b377213450724a0e59fd3a1519699 (diff)
downloadports-7280544d12fe02c58857b669cbf7c34bd6405970.tar.gz
ports-7280544d12fe02c58857b669cbf7c34bd6405970.zip
Notes
Diffstat (limited to 'games/patapizza-tetris')
-rw-r--r--games/patapizza-tetris/Makefile64
-rw-r--r--games/patapizza-tetris/distinfo2
-rw-r--r--games/patapizza-tetris/files/patapizza-tetris.sh.in7
-rw-r--r--games/patapizza-tetris/files/patch-Makefile11
-rw-r--r--games/patapizza-tetris/files/patch-tetris.c10
-rw-r--r--games/patapizza-tetris/pkg-descr4
6 files changed, 98 insertions, 0 deletions
diff --git a/games/patapizza-tetris/Makefile b/games/patapizza-tetris/Makefile
new file mode 100644
index 000000000000..69fe04823af3
--- /dev/null
+++ b/games/patapizza-tetris/Makefile
@@ -0,0 +1,64 @@
+# Created by: nemysis@gmx.ch
+# $FreeBSD$
+
+PORTNAME= patapizza-tetris
+PORTVERSION= 1.0
+CATEGORIES= games
+MASTER_SITES= https://github.com/patapizza/tetris/downloads/
+DISTNAME= ${PORTNAME:S/patapizza-//}-${DISTVERSION}
+
+MAINTAINER= nemysis@gmx.ch
+COMMENT= Unofficial clone of the original Tetris game
+
+LICENSE= GPLv3
+
+OPTIONS_DEFINE= DATA
+OPTIONS_DEFAULT=DATA
+
+FETCH_ARGS?= -Fpr
+USE_GMAKE= yes
+USE_SDL= sdl image gfx ttf
+
+PLIST_FILES= bin/${PORTNAME} \
+ share/pixmaps/${PORTNAME}.png
+
+PORTDATA= *
+PORTDOCS= README.md
+
+SUB_FILES= ${PORTNAME}.sh
+
+post-patch:
+ ${REINPLACE_CMD} -e 's:%%PREFIX%%:${PREFIX}:g' ${WRKSRC}/Makefile
+
+.include <bsd.port.options.mk>
+
+do-build:
+ cd ${WRKSRC} && ${CC} -o ${PORTNAME} ${CFLAGS} \
+ -DDATA_PREFIX=\"${DATADIR}/\" \
+ -lm `${SDL_CONFIG} --cflags --libs` -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lm tetris.c
+
+do-install:
+# Scripts
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/bin/${PORTNAME}
+
+# Executable
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${DATADIR}
+
+# Data
+.if ${PORT_OPTIONS:MDATA}
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} images ${DATADIR})
+.endif
+
+# Pixmaps
+ ${INSTALL_DATA} ${WRKSRC}/images/logo.png ${PREFIX}/share/pixmaps/${PORTNAME}.png
+
+# Documentation
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${DOCSDIR}
+. for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+. endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/patapizza-tetris/distinfo b/games/patapizza-tetris/distinfo
new file mode 100644
index 000000000000..170641d5a41b
--- /dev/null
+++ b/games/patapizza-tetris/distinfo
@@ -0,0 +1,2 @@
+SHA256 (tetris-1.0.tar.gz) = 06945705ca0b5242f4c3e7c86c1e6111e452a47a11919a549e0fb19bbb78210e
+SIZE (tetris-1.0.tar.gz) = 47115
diff --git a/games/patapizza-tetris/files/patapizza-tetris.sh.in b/games/patapizza-tetris/files/patapizza-tetris.sh.in
new file mode 100644
index 000000000000..008fc6d10fd5
--- /dev/null
+++ b/games/patapizza-tetris/files/patapizza-tetris.sh.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+echo "patapizza Tetris: Starting up..."
+cd "%%DATADIR%%"
+./patapizza-tetris
diff --git a/games/patapizza-tetris/files/patch-Makefile b/games/patapizza-tetris/files/patch-Makefile
new file mode 100644
index 000000000000..727cd0ea5e30
--- /dev/null
+++ b/games/patapizza-tetris/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig 2012-04-09 13:32:21.000000000 +0200
++++ Makefile 2012-08-17 00:24:43.000000000 +0200
+@@ -1,6 +1,6 @@
+ SHELL = /bin/sh
+-CC = gcc
+-prefix = /usr
++CC = g++
++prefix = %%PREFIX%%
+ includedir = $(prefix)/include
+ tetris: tetris.c
+ $(CC) -Wall -I$(includedir)/SDL $< -o $@ -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lm
diff --git a/games/patapizza-tetris/files/patch-tetris.c b/games/patapizza-tetris/files/patch-tetris.c
new file mode 100644
index 000000000000..3a824a5fe0b9
--- /dev/null
+++ b/games/patapizza-tetris/files/patch-tetris.c
@@ -0,0 +1,10 @@
+--- tetris.c.orig 2012-04-09 13:32:21.000000000 +0200
++++ tetris.c 2012-08-17 00:10:28.000000000 +0200
+@@ -20,7 +20,6 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+-#include <malloc.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
diff --git a/games/patapizza-tetris/pkg-descr b/games/patapizza-tetris/pkg-descr
new file mode 100644
index 000000000000..b6792d24275b
--- /dev/null
+++ b/games/patapizza-tetris/pkg-descr
@@ -0,0 +1,4 @@
+This game is an unofficial clone of the original Tetris game
+and is not endorsed by the registered trademark owners The Tetris Company, Inc.
+
+WWW: https://github.com/patapizza/tetris