aboutsummaryrefslogtreecommitdiff
path: root/games/powder
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-06-07 23:24:33 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-06-07 23:24:33 +0000
commitf7a11c9fe5c07fe37996d0ed1de3a027bea6189e (patch)
tree501a9eb1f16b6a3d967656eb62aa9ac0a104049a /games/powder
parentf96e3758e01717f2e02c253b1fca0f145ef7ff65 (diff)
downloadports-f7a11c9fe5c07fe37996d0ed1de3a027bea6189e.tar.gz
ports-f7a11c9fe5c07fe37996d0ed1de3a027bea6189e.zip
Notes
Diffstat (limited to 'games/powder')
-rw-r--r--games/powder/Makefile43
-rw-r--r--games/powder/distinfo3
-rw-r--r--games/powder/files/patch-gfx-rebuild.sh15
-rw-r--r--games/powder/files/patch-port-linux-linuxmain.cpp27
-rw-r--r--games/powder/pkg-descr3
5 files changed, 91 insertions, 0 deletions
diff --git a/games/powder/Makefile b/games/powder/Makefile
new file mode 100644
index 000000000000..4b597be31b15
--- /dev/null
+++ b/games/powder/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: powder
+# Date created: 29 Dec 2008
+# Whom: Dmitry Marakasov <amdmi3@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= powder
+PORTVERSION= 111
+CATEGORIES= games
+MASTER_SITES= http://www.zincland.com/powder/release/ \
+ http://mirror.amdmi3.ru/
+DISTNAME= ${PORTNAME}${PORTVERSION}_src
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Graphical dungeon crawling game
+
+USE_GMAKE= yes
+USE_SDL= sdl
+
+BUILD_WRKSRC= ${WRKSRC}/port/linux
+
+PLIST_FILES= bin/powder
+
+PORTDOCS= README.TXT LICENSE.TXT CREDITS.TXT
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|bin/bash|bin/sh|' \
+ ${WRKSRC}/rooms/buildrooms.bash \
+ ${WRKSRC}/gfx/rebuild.sh
+ @${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|' \
+ ${BUILD_WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/powder ${PREFIX}/bin/
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/games/powder/distinfo b/games/powder/distinfo
new file mode 100644
index 000000000000..eaf92e3b116d
--- /dev/null
+++ b/games/powder/distinfo
@@ -0,0 +1,3 @@
+MD5 (powder111_src.tar.gz) = 6b4ae441bb8a08da2985381b1dc00313
+SHA256 (powder111_src.tar.gz) = fc76270137941d028586cc3ba95d23bdc524dbfa30e0f6dea247eefe3b085eec
+SIZE (powder111_src.tar.gz) = 1389349
diff --git a/games/powder/files/patch-gfx-rebuild.sh b/games/powder/files/patch-gfx-rebuild.sh
new file mode 100644
index 000000000000..60e93354d514
--- /dev/null
+++ b/games/powder/files/patch-gfx-rebuild.sh
@@ -0,0 +1,15 @@
+--- gfx/rebuild.sh.orig 2009-02-06 04:42:17.000000000 +0300
++++ gfx/rebuild.sh 2009-06-08 00:18:29.000000000 +0400
+@@ -3,10 +3,10 @@
+ echo Rebuilding Graphics Files
+
+ for tileset in classic adambolt nethack ascii ibsongrey akoimeexx; do
+- pushd $tileset
++ cd $tileset
+ echo Building tiles...
+ ../../support/tile2c/tile2c
+- popd
++ cd -
+ done
+
+ echo Building Background images..
diff --git a/games/powder/files/patch-port-linux-linuxmain.cpp b/games/powder/files/patch-port-linux-linuxmain.cpp
new file mode 100644
index 000000000000..897faae5d86f
--- /dev/null
+++ b/games/powder/files/patch-port-linux-linuxmain.cpp
@@ -0,0 +1,27 @@
+--- port/linux/linuxmain.cpp.orig 2008-01-10 06:26:42.000000000 +0300
++++ port/linux/linuxmain.cpp 2009-06-08 00:37:41.000000000 +0400
+@@ -1,4 +1,8 @@
+ #include <SDL.h>
++#include <err.h>
++#include <stdlib.h>
++#include <sys/stat.h>
++#include <unistd.h>
+
+ #ifdef main
+ #undef main
+@@ -11,6 +15,15 @@
+
+ int main(int argc, char **argv)
+ {
++ {
++ if (chdir(getenv("HOME")) != 0)
++ err(1, "cannot cd to $HOME");
++ if (mkdir(".powder", 0755) != 0 && errno != EEXIST)
++ err(1, "cannot mkdir $HOME/.powder");
++ if (chdir(".powder") != 0)
++ err(1, "cannot cd to $HOME/.powder");
++ }
++
+ // Call our main.
+ gba_main();
+
diff --git a/games/powder/pkg-descr b/games/powder/pkg-descr
new file mode 100644
index 000000000000..da5ea3a7533d
--- /dev/null
+++ b/games/powder/pkg-descr
@@ -0,0 +1,3 @@
+Graphical roguelike originally developed for Gameboy Advance.
+
+WWW: http://www.zincland.com/powder/