aboutsummaryrefslogtreecommitdiff
path: root/games/kartofel
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-01-19 18:42:25 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-01-19 18:42:25 +0000
commitd43762e4eda9cd6e41ba492dac0dc7b11e659651 (patch)
treede9cf122caeba2bd851fe4869b28463d55acfdf0 /games/kartofel
parentd8c335791329f2c1938128b63db199c1c309cd4e (diff)
downloadports-d43762e4eda9cd6e41ba492dac0dc7b11e659651.tar.gz
ports-d43762e4eda9cd6e41ba492dac0dc7b11e659651.zip
Notes
Diffstat (limited to 'games/kartofel')
-rw-r--r--games/kartofel/Makefile38
-rw-r--r--games/kartofel/distinfo3
-rw-r--r--games/kartofel/files/patch-play.cc28
-rw-r--r--games/kartofel/pkg-descr4
-rw-r--r--games/kartofel/pkg-plist41
5 files changed, 114 insertions, 0 deletions
diff --git a/games/kartofel/Makefile b/games/kartofel/Makefile
new file mode 100644
index 000000000000..f038a05c1743
--- /dev/null
+++ b/games/kartofel/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: kartofel
+# Date created: 19 Jan 2009
+# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= kartofel
+PORTVERSION= 1.1
+CATEGORIES= games
+MASTER_SITES= http://kartofel.jfedor.org/downloads/ \
+ http://mirror.amdmi3.ru/
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Connect the dots in order without crossing over yourself
+
+LIB_DEPENDS= curl.4:${PORTSDIR}/ftp/curl
+
+USE_GMAKE= yes
+USE_SDL= sdl gfx mixer image ttf
+
+ALL_TARGET= default
+
+DATA_DIRS= sounds fonts music images levels
+
+post-patch:
+ @${REINPLACE_CMD} -e '/^CXXOPTIONS/ d; s|g++|${CXX} ${CXXFLAGS}|; \
+ s|sdl-config|${SDL_CONFIG}|' ${WRKSRC}/Makefile
+.for d in ${DATA_DIRS}
+ @${REINPLACE_CMD} -e 's|$d/|${DATADIR}/&|' ${WRKSRC}/config.h
+.endfor
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/kartofel ${PREFIX}/bin
+ ${MKDIR} ${DATADIR}
+ cd ${WRKSRC} && ${COPYTREE_SHARE} "${DATA_DIRS}" ${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/games/kartofel/distinfo b/games/kartofel/distinfo
new file mode 100644
index 000000000000..a9d68b535c1a
--- /dev/null
+++ b/games/kartofel/distinfo
@@ -0,0 +1,3 @@
+MD5 (kartofel-1.1.tar.gz) = 92805243802745d65697e9bc9699ab70
+SHA256 (kartofel-1.1.tar.gz) = dd561a27c9e3e5136e162f14d5c25f8cef2f013ea6507038bd492d3aaf057be7
+SIZE (kartofel-1.1.tar.gz) = 9314571
diff --git a/games/kartofel/files/patch-play.cc b/games/kartofel/files/patch-play.cc
new file mode 100644
index 000000000000..601dfe35a4cb
--- /dev/null
+++ b/games/kartofel/files/patch-play.cc
@@ -0,0 +1,28 @@
+--- play.cc.orig 2009-01-18 01:21:03.000000000 +0300
++++ play.cc 2009-01-19 08:14:26.000000000 +0300
+@@ -30,6 +30,9 @@
+ #include "SDL_mixer.h"
+ #include "SDL_thread.h"
+ #include "SDL_ttf.h"
++#include <unistd.h>
++#include <err.h>
++#include <sys/stat.h>
+
+ #include "config.h"
+ #include "game.h"
+@@ -2028,6 +2031,15 @@
+
+ int main(int argc, char** argv)
+ {
++ {
++ if (chdir(getenv("HOME")) != 0)
++ err(1, "cannot cd to $HOME");
++ if (mkdir(".kartofel", 0755) != 0 && errno != EEXIST)
++ err(1, "cannot mkdir $HOME/.kartofel");
++ if (chdir(".kartofel") != 0)
++ err(1, "cannot cd to $HOME/.kartofel");
++ }
++
+ kartofel::Run();
+ return 0;
+ }
diff --git a/games/kartofel/pkg-descr b/games/kartofel/pkg-descr
new file mode 100644
index 000000000000..a610cc4339cf
--- /dev/null
+++ b/games/kartofel/pkg-descr
@@ -0,0 +1,4 @@
+Kartofel is a game of skill and logic. The objective is to connect
+the numbered dots in order, without crossing over yourself.
+
+WWW: http://kartofel.jfedor.org/
diff --git a/games/kartofel/pkg-plist b/games/kartofel/pkg-plist
new file mode 100644
index 000000000000..9aabdc12a7fe
--- /dev/null
+++ b/games/kartofel/pkg-plist
@@ -0,0 +1,41 @@
+bin/kartofel
+%%DATADIR%%/fonts/Cyklop-Regular.ttf
+%%DATADIR%%/fonts/FreeSans.ttf
+%%DATADIR%%/images/Cliffs-1024x768.png
+%%DATADIR%%/images/icon256x256.png
+%%DATADIR%%/images/icon32x32.png
+%%DATADIR%%/levels/1.txt
+%%DATADIR%%/levels/10.txt
+%%DATADIR%%/levels/11.txt
+%%DATADIR%%/levels/12.txt
+%%DATADIR%%/levels/13.txt
+%%DATADIR%%/levels/14.txt
+%%DATADIR%%/levels/15.txt
+%%DATADIR%%/levels/16.txt
+%%DATADIR%%/levels/17.txt
+%%DATADIR%%/levels/18.txt
+%%DATADIR%%/levels/19.txt
+%%DATADIR%%/levels/2.txt
+%%DATADIR%%/levels/20.txt
+%%DATADIR%%/levels/21.txt
+%%DATADIR%%/levels/3.txt
+%%DATADIR%%/levels/4.txt
+%%DATADIR%%/levels/5.txt
+%%DATADIR%%/levels/6.txt
+%%DATADIR%%/levels/7.txt
+%%DATADIR%%/levels/8.txt
+%%DATADIR%%/levels/9.txt
+%%DATADIR%%/music/moonlight.mp3
+%%DATADIR%%/sounds/click01.wav
+%%DATADIR%%/sounds/click02.wav
+%%DATADIR%%/sounds/click03.wav
+%%DATADIR%%/sounds/sound_crash.wav
+%%DATADIR%%/sounds/sound_dot_lit.wav
+%%DATADIR%%/sounds/sound_level_success.wav
+%%DATADIR%%/sounds/sound_out_of_time.wav
+@dirrm %%DATADIR%%/sounds
+@dirrm %%DATADIR%%/music
+@dirrm %%DATADIR%%/levels
+@dirrm %%DATADIR%%/images
+@dirrm %%DATADIR%%/fonts
+@dirrm %%DATADIR%%