aboutsummaryrefslogtreecommitdiff
path: root/games/ivan
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2013-11-18 22:49:32 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2013-11-18 22:49:32 +0000
commit3699070f4d7a3673a3d25238afdee4f7362a451a (patch)
tree5bdef968dbca0e08180ff5831ba4738387b4e6e3 /games/ivan
parentd6a5e1f87cad64bd01b95f0ce0ff67a14985dca2 (diff)
downloadports-3699070f4d7a3673a3d25238afdee4f7362a451a.tar.gz
ports-3699070f4d7a3673a3d25238afdee4f7362a451a.zip
- Support staging
- Convert USE_GMAKE to USES
Notes
Notes: svn path=/head/; revision=334269
Diffstat (limited to 'games/ivan')
-rw-r--r--games/ivan/Makefile18
-rw-r--r--games/ivan/files/patch-FeLib-Include-festring.h20
-rw-r--r--games/ivan/files/patch-FeLib-Source-festring.cpp83
-rw-r--r--games/ivan/pkg-install4
-rw-r--r--games/ivan/pkg-plist27
5 files changed, 111 insertions, 41 deletions
diff --git a/games/ivan/Makefile b/games/ivan/Makefile
index 8f89da073373..66f42a66e799 100644
--- a/games/ivan/Makefile
+++ b/games/ivan/Makefile
@@ -11,16 +11,15 @@ MAINTAINER= amdmi3@FreeBSD.org
COMMENT= A graphical roguelike game
USE_SDL= sdl
-USE_GMAKE= yes
+USES= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir=/var/games
-STATEDIR= /var/games/ivan
-
PORTSCOUT= skipv:0.301,0.310,0.311,0.401,0.410,0.420,0.430
-NO_STAGE= yes
+PORTDATA= *
+
post-patch:
@${REINPLACE_CMD} -e 's|IvanSave|.IvanSave|g' ${WRKSRC}/Main/Source/game.cpp
@${REINPLACE_CMD} -Ee 's|(fearray<type>::~?fearray)<type>|\1|' \
@@ -34,15 +33,4 @@ post-patch:
${WRKSRC}/Main/Include/stack.h ${WRKSRC}/Main/Source/lsquare.cpp \
${WRKSRC}/Main/Source/lterras.cpp
-post-install:
- ${CHGRP} games ${PREFIX}/bin/ivan
- ${CHMOD} g+s ${PREFIX}/bin/ivan
-.if !exists(${STATEDIR})
- ${MKDIR} ${STATEDIR}
- ${TOUCH} ${STATEDIR}/ivan-highscore.scores
- ${MKDIR} ${STATEDIR}/Bones
- ${CHGRP} -R games ${STATEDIR}
- ${CHMOD} -R g+w ${STATEDIR}
-.endif
-
.include <bsd.port.mk>
diff --git a/games/ivan/files/patch-FeLib-Include-festring.h b/games/ivan/files/patch-FeLib-Include-festring.h
new file mode 100644
index 000000000000..786997e3efa9
--- /dev/null
+++ b/games/ivan/files/patch-FeLib-Include-festring.h
@@ -0,0 +1,20 @@
+--- FeLib/Include/festring.h.orig 2004-10-26 23:35:44.000000000 +0400
++++ FeLib/Include/festring.h 2013-11-08 16:54:09.080772415 +0400
+@@ -142,7 +142,7 @@
+ inline festring::festring(sizetype N)
+ : Size(N), OwnsData(true), Reserved(N|FESTRING_PAGE)
+ {
+- char* Ptr = 4 + new char[Reserved + 5];
++ char* Ptr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(Ptr) = 0;
+ Data = Ptr;
+ }
+@@ -150,7 +150,7 @@
+ inline festring::festring(sizetype N, char C)
+ : Size(N), OwnsData(true), Reserved(N|FESTRING_PAGE)
+ {
+- char* Ptr = 4 + new char[Reserved + 5];
++ char* Ptr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(Ptr) = 0;
+ Data = Ptr;
+ memset(Ptr, C, N);
diff --git a/games/ivan/files/patch-FeLib-Source-festring.cpp b/games/ivan/files/patch-FeLib-Source-festring.cpp
index 8adca22b33d4..8950b6714f5d 100644
--- a/games/ivan/files/patch-FeLib-Source-festring.cpp
+++ b/games/ivan/files/patch-FeLib-Source-festring.cpp
@@ -1,5 +1,5 @@
--- FeLib/Source/festring.cpp.orig 2004-11-11 20:27:44.000000000 +0300
-+++ FeLib/Source/festring.cpp 2013-09-14 02:16:26.736227688 +0400
++++ FeLib/Source/festring.cpp 2013-11-08 16:54:46.925772448 +0400
@@ -11,6 +11,7 @@
*/
@@ -8,3 +8,84 @@
#include "festring.h"
#include "allocate.h"
+@@ -116,7 +117,7 @@
+ {
+ Size = N;
+ Reserved = N|FESTRING_PAGE;
+- char* Ptr = 4 + new char[Reserved + 5];
++ char* Ptr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(Ptr) = 0;
+ Data = Ptr;
+ memcpy(Ptr, CStr, N);
+@@ -137,7 +138,7 @@
+ DeletePtr = &REFS(OldPtr);
+
+ Reserved = NewSize|FESTRING_PAGE;
+- char* NewPtr = 4 + new char[Reserved + 5];
++ char* NewPtr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(NewPtr) = 0;
+ Data = NewPtr;
+ memcpy(NewPtr, OldPtr, OldSize);
+@@ -150,7 +151,7 @@
+ {
+ Size = 1;
+ Reserved = FESTRING_PAGE;
+- char* Ptr = 4 + new char[FESTRING_PAGE + 5];
++ char* Ptr = sizeof(ulong) + new char[FESTRING_PAGE + 5];
+ REFS(Ptr) = 0;
+ Ptr[0] = Char;
+ Data = Ptr;
+@@ -174,7 +175,7 @@
+ DeletePtr = &REFS(OldPtr);
+
+ Reserved = NewSize|FESTRING_PAGE;
+- char* NewPtr = 4 + new char[Reserved + 5];
++ char* NewPtr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(NewPtr) = 0;
+ Data = NewPtr;
+ memcpy(NewPtr, OldPtr, OldSize);
+@@ -205,7 +206,7 @@
+ }
+
+ Reserved = N|FESTRING_PAGE;
+- Ptr = 4 + new char[Reserved + 5];
++ Ptr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(Ptr) = 0;
+ Data = Ptr;
+ memset(Ptr, C, N);
+@@ -240,7 +241,7 @@
+ }
+
+ Reserved = N|FESTRING_PAGE;
+- NewPtr = 4 + new char[Reserved + 5];
++ NewPtr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(NewPtr) = 0;
+ Data = NewPtr;
+ memcpy(NewPtr, OldPtr, OldSize);
+@@ -259,7 +260,7 @@
+ --REFS(OldPtr);
+
+ Reserved = N|FESTRING_PAGE;
+- NewPtr = 4 + new char[Reserved + 5];
++ NewPtr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(NewPtr) = 0;
+ Data = NewPtr;
+ memcpy(NewPtr, OldPtr, N);
+@@ -362,7 +363,7 @@
+ sizetype NewSize = MoveReq ? OldSize - Length : Pos;
+ Size = NewSize;
+ Reserved = NewSize|FESTRING_PAGE;
+- char* Ptr = 4 + new char[Reserved + 5];
++ char* Ptr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(Ptr) = 0;
+ Data = Ptr;
+ OwnsData = true;
+@@ -411,7 +412,7 @@
+ }
+
+ Reserved = NewSize|FESTRING_PAGE;
+- char* NewPtr = 4 + new char[Reserved + 5];
++ char* NewPtr = sizeof(ulong) + new char[Reserved + 5];
+ REFS(NewPtr) = 0;
+ Data = NewPtr;
+ memcpy(NewPtr, OldPtr, Pos);
diff --git a/games/ivan/pkg-install b/games/ivan/pkg-install
index 96fe89ac6077..d3a81f914d2e 100644
--- a/games/ivan/pkg-install
+++ b/games/ivan/pkg-install
@@ -8,8 +8,8 @@ STATEDIR="/var/games/ivan"
echo "Creating state directory..."
-mkdir "$STATEDIR"
+mkdir -p "$STATEDIR"
touch "$STATEDIR/ivan-highscore.scores"
-mkdir "$STATEDIR/Bones"
+mkdir -p "$STATEDIR/Bones"
chgrp -R games "$STATEDIR"
chmod -R g+w "$STATEDIR"
diff --git a/games/ivan/pkg-plist b/games/ivan/pkg-plist
index e52dd91d06c9..18adaf7fd62a 100644
--- a/games/ivan/pkg-plist
+++ b/games/ivan/pkg-plist
@@ -1,24 +1,5 @@
+@group games
+@mode 2555
bin/ivan
-%%DATADIR%%/Script/char.dat
-%%DATADIR%%/Script/define.dat
-%%DATADIR%%/Script/dungeon.dat
-%%DATADIR%%/Script/glterra.dat
-%%DATADIR%%/Script/item.dat
-%%DATADIR%%/Script/material.dat
-%%DATADIR%%/Script/olterra.dat
-%%DATADIR%%/Graphics/Char.pcx
-%%DATADIR%%/Graphics/Cursor.pcx
-%%DATADIR%%/Graphics/Effect.pcx
-%%DATADIR%%/Graphics/Font.pcx
-%%DATADIR%%/Graphics/FOW.pcx
-%%DATADIR%%/Graphics/GLTerra.pcx
-%%DATADIR%%/Graphics/Humanoid.pcx
-%%DATADIR%%/Graphics/Icon.bmp
-%%DATADIR%%/Graphics/Item.pcx
-%%DATADIR%%/Graphics/Menu.pcx
-%%DATADIR%%/Graphics/OLTerra.pcx
-%%DATADIR%%/Graphics/Symbol.pcx
-%%DATADIR%%/Graphics/WTerra.pcx
-@dirrm %%DATADIR%%/Graphics
-@dirrm %%DATADIR%%/Script
-@dirrm %%DATADIR%%
+@mode
+@group