summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-07-19 04:24:18 +0000
committerdholland <dholland@pkgsrc.org>2011-07-19 04:24:18 +0000
commit132909437370e3f3cd2f0ccb933bb14de942184f (patch)
treeb39b5defd85718b282a058f62c0373a833b3247b /games
parent1426b85db89bbfe3cee49cdee267c8d5b810498b (diff)
downloadpkgsrc-132909437370e3f3cd2f0ccb933bb14de942184f.tar.gz
Fix build with clang. While here, fix scorefile handling and add
DESTDIR support. PKGREVISION -> 3.
Diffstat (limited to 'games')
-rw-r--r--games/maelstrom-x11/Makefile29
-rw-r--r--games/maelstrom-x11/distinfo8
-rw-r--r--games/maelstrom-x11/patches/patch-ae62
-rw-r--r--games/maelstrom-x11/patches/patch-macres_cpp14
-rw-r--r--games/maelstrom-x11/patches/patch-maelstrom_sound_cpp14
-rw-r--r--games/maelstrom-x11/patches/patch-randtest_cpp14
-rw-r--r--games/maelstrom-x11/patches/patch-testlist_cpp14
7 files changed, 126 insertions, 29 deletions
diff --git a/games/maelstrom-x11/Makefile b/games/maelstrom-x11/Makefile
index f2cb22c78e3..936e803d73e 100644
--- a/games/maelstrom-x11/Makefile
+++ b/games/maelstrom-x11/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2008/05/26 02:13:19 joerg Exp $
+# $NetBSD: Makefile,v 1.22 2011/07/19 04:24:18 dholland Exp $
DISTNAME= Maelstrom-1.4.3-L2.0.6-src.tar.gz
PKGNAME= maelstrom-x11-2.0.6
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= games x11
MASTER_SITES+= ftp://ftp.devolution.com/pub/maelstrom/
MASTER_SITES+= ftp://ftp.devolution.com/pub/maelstrom/Maelstrom-binaries/
@@ -13,6 +13,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.ambrosiasw.com/Products/Maelstrom.html
COMMENT= High resolution graphics version of Asteroids (X11 version)
+PKG_DESTDIR_SUPPORT= user-destdir
+
ESOUND= Maelstrom-Sounds-L2.0.0.tar.gz
STREK= Star_Trek.tar.gz
SWARS= Star_Wars.tar.gz
@@ -30,19 +32,26 @@ MAKE_ENV+= GAMEOWN=${GAMEOWN} GAMEGRP=${GAMEGRP}
MAKE_ENV+= GAMEMODE=${GAMEMODE} GAMEDATAMODE=${GAMEDATAMODE}
MAKE_ENV+= VARBASE=${VARBASE}
-MAKE_DIRS_PERMS+= ${VARBASE}/games ${GAMEOWN} ${GAMEGRP} ${GAMEDIRMODE}
-CONF_FILES_PERMS+= ${PREFIX}/share/maelstrom/Maelstrom-Scores \
- ${VARBASE}/games/Maelstrom-Scores ${GAMEOWN} ${GAMEGRP} ${GAMEDATAMODE}
+USE_GAMESGROUP= yes
+SCOREDIR= ${VARBASE}/games
+SCOREFILE= ${SCOREDIR}/Maelstrom-Scores
+ORIGSCOREFILE= ${PREFIX}/share/maelstrom/Maelstrom-Scores
+MAKE_DIRS_PERMS+= ${SCOREDIR} ${GAMEDIR_PERMS}
+REQD_FILES_PERMS+= ${ORIGSCOREFILE} ${SCOREFILE} ${GAMEDATA_PERMS}
+BUILD_DEFS+= VARBASE SCOREFILE
+
+SPECIAL_PERMS+= bin/Maelstrom ${SETGID_GAMES_PERMS}
+
+INSTALLATION_DIRS+= bin share/maelstrom
post-install:
- cd ${PREFIX}/share/maelstrom && \
+ cd ${DESTDIR}${PREFIX}/share/maelstrom && \
pax -O -pm -zrf ${DISTDIR}/${ESOUND} && \
pax -O -pm -zrf ${DISTDIR}/${STREK} && \
pax -O -pm -zrf ${DISTDIR}/${SWARS}
- ${CHOWN} ${GAMEOWN}:${GAMEGRP} ${PREFIX}/bin/Maelstrom
- ${CHMOD} ${GAMEMODE} ${PREFIX}/bin/Maelstrom
- ${INSTALL_DATA} ${WRKSRC}/README.* ${PREFIX}/share/maelstrom
- ${INSTALL_PROGRAM} ${WRKSRC}/netplayd/netplayd ${PREFIX}/bin/Maelstrom_netplayd
+ ${INSTALL_DATA} ${WRKSRC}/README.* ${DESTDIR}${PREFIX}/share/maelstrom
+ ${INSTALL_PROGRAM} ${WRKSRC}/netplayd/netplayd \
+ ${DESTDIR}${PREFIX}/bin/Maelstrom_netplayd
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXpm/buildlink3.mk"
diff --git a/games/maelstrom-x11/distinfo b/games/maelstrom-x11/distinfo
index bbbd2799bcc..10840ea1e87 100644
--- a/games/maelstrom-x11/distinfo
+++ b/games/maelstrom-x11/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2006/06/26 08:56:37 rillig Exp $
+$NetBSD: distinfo,v 1.8 2011/07/19 04:24:19 dholland Exp $
SHA1 (Maelstrom-1.4.3-L2.0.6-src.tar.gz) = 66c81365104bfab9985919f0cba5a6d955727d79
RMD160 (Maelstrom-1.4.3-L2.0.6-src.tar.gz) = 071b36ecd31830f3b62e4b6e2f64b7f7d87b1386
@@ -16,10 +16,14 @@ SHA1 (patch-aa) = bf6a9c5394b5ac491a1b92d62d7dc716013ece23
SHA1 (patch-ab) = d767d9646f98f1d8b7ce5f471a8a789ed29d0e75
SHA1 (patch-ac) = 81ae36f64ea8db22ba81be8911e05f6c66459edc
SHA1 (patch-ad) = d5405b696f839c4965fb8e299108aff1b689399a
-SHA1 (patch-ae) = 8bda24b06ba07558ed3cbd46eb7e22d47795529b
+SHA1 (patch-ae) = 1e63b3f3ebe9e98b19c6fb08d6b4ea608a500fb4
SHA1 (patch-af) = 46b5ab4cfe3e20401fc5feaa9319c093b025ca1d
SHA1 (patch-ag) = 0accbc0a198e66a1cc2e86b62f32656e213d8de1
SHA1 (patch-ah) = b39ccc02f3e27e655d5169bb843554b7bdb323a9
SHA1 (patch-ai) = 153db1c1860e5d336a51aac2d86f753fc3858d31
SHA1 (patch-aj) = 5135031fbbfa06eb11d24859bb1589361b025ba4
SHA1 (patch-ak) = 40a94611f4051824f72e757a13a3cb03e141d1ac
+SHA1 (patch-macres_cpp) = bc9d2519da4332b4fc8dd03d0dfeedfeb9d95e7c
+SHA1 (patch-maelstrom_sound_cpp) = 6fcade9c4f816ba0560f34843b5b9982bc575c4e
+SHA1 (patch-randtest_cpp) = 9719c2942a95ca83e1d58ea42821d99741305f17
+SHA1 (patch-testlist_cpp) = be367726c1d5411397dd3b00daf4f1dada8673fd
diff --git a/games/maelstrom-x11/patches/patch-ae b/games/maelstrom-x11/patches/patch-ae
index 30b8e6db105..6e70cb60d1a 100644
--- a/games/maelstrom-x11/patches/patch-ae
+++ b/games/maelstrom-x11/patches/patch-ae
@@ -1,27 +1,55 @@
-$NetBSD: patch-ae,v 1.2 2006/06/26 08:56:37 rillig Exp $
+$NetBSD: patch-ae,v 1.3 2011/07/19 04:24:19 dholland Exp $
---- Makefile.orig 1997-02-05 14:12:18.000000000 +0100
-+++ Makefile 2006-06-26 10:50:45.000000000 +0200
-@@ -18,7 +18,7 @@ install: $(MAELSTROM)
- @echo "Installing binaries in $(BINDIR)..."
+- destdir support
+- use install -c
+
+--- Makefile.orig 1997-02-05 13:12:18.000000000 +0000
++++ Makefile
+@@ -10,32 +10,15 @@ include Makeflags
+
+
+ install: $(MAELSTROM)
+- @if [ "$(LIBDIR)" = "." ]; then \
+- echo " Nothing to do! (Install to current directory)"; \
+- exit 1; \
+- fi
+- @if [ ! -d "$(BINDIR)" ]; then mkdir $(BINDIR); fi
+- @echo "Installing binaries in $(BINDIR)..."
++ @echo "Installing binaries in $(DESTDIR)$(BINDIR)..."
@for i in $(MAELSTROM) ; do \
strip $$i; \
- $(INSTALL) -m 755 $$i $(BINDIR); \
-+ $(INSTALL) -c -m 755 $$i $(BINDIR); \
++ $(INSTALL) -c -m 755 $$i $(DESTDIR)$(BINDIR); \
done
- @if [ ! -d $(LIBDIR) ]; then \
- mkdir $(LIBDIR); chmod 755 $(LIBDIR); \
-@@ -26,11 +26,8 @@ install: $(MAELSTROM)
- @echo "Installing data files in $(LIBDIR) ..."
- @tar cf - $(DATAFILES) | (cd $(LIBDIR); tar xvf -)
- @chmod -R +r $(LIBDIR)
+- @if [ ! -d $(LIBDIR) ]; then \
+- mkdir $(LIBDIR); chmod 755 $(LIBDIR); \
+- fi
+- @echo "Installing data files in $(LIBDIR) ..."
+- @tar cf - $(DATAFILES) | (cd $(LIBDIR); tar xvf -)
+- @chmod -R +r $(LIBDIR)
- @if [ ! -f "$(LIBDIR)/Maelstrom-Scores" ]; then \
- echo "Installing Maelstrom high-scores file"; \
- $(INSTALL) -m 666 Maelstrom-Scores $(LIBDIR); \
- chmod 666 $(LIBDIR)/Maelstrom-Scores; \
- fi
-+ @chown -R ${BINOWN}:${BINGRP} $(LIBDIR)
-+ ${BSD_INSTALL_DATA} Maelstrom-Scores $(PREFIX)/share/maelstrom
- @-if [ "$(SYSTEM)" = "Linux" ]; then \
- echo "Fixing permissions for Maelstrom (set-uid root)"; \
- chown root $(BINDIR)/Maelstrom && \
+- @-if [ "$(SYSTEM)" = "Linux" ]; then \
+- echo "Fixing permissions for Maelstrom (set-uid root)"; \
+- chown root $(BINDIR)/Maelstrom && \
+- chmod u+s $(BINDIR)/Maelstrom; \
+- fi
++ @echo "Installing data files in $(DESTDIR)$(LIBDIR) ..."
++ @(umask 022; tar cf - $(DATAFILES) | (cd $(DESTDIR)$(LIBDIR); tar xvf -))
++ @chmod -R +r $(DESTDIR)$(LIBDIR)
++ ${BSD_INSTALL_DATA} Maelstrom-Scores $(DESTDIR)$(PREFIX)/share/maelstrom
+ @echo "Maelstrom installed!"
+ @echo ""
+ @echo "Make sure that $(BINDIR) is in your execution path"
+@@ -107,7 +90,7 @@ clobber: spotless
+
+ Maelstrom_Globals.h: Mac_Resource.h sound.h fontserv.h framebuf.h \
+ x11_framebuf.h vga_framebuf.h dga_framebuf.h \
+- Maelstrom.h Maelstrom_Inline.h
++ Maelstrom.h Maelstrom_Inline.h
+ @if [ -f "$@" ]; then touch "$@"; fi
+
+ # DO NOT DELETE
diff --git a/games/maelstrom-x11/patches/patch-macres_cpp b/games/maelstrom-x11/patches/patch-macres_cpp
new file mode 100644
index 00000000000..e6c9841b6f9
--- /dev/null
+++ b/games/maelstrom-x11/patches/patch-macres_cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-macres_cpp,v 1.1 2011/07/19 04:24:19 dholland Exp $
+
+Use valid C++.
+
+--- Macres.cpp~ 1996-10-25 09:53:10.000000000 +0000
++++ Macres.cpp
+@@ -2,6 +2,7 @@
+ #include <stdlib.h>
+ #include "Mac_Resource.h"
+
++int
+ main(int argc, char *argv[])
+ {
+ if ( ! argv[1] ) {
diff --git a/games/maelstrom-x11/patches/patch-maelstrom_sound_cpp b/games/maelstrom-x11/patches/patch-maelstrom_sound_cpp
new file mode 100644
index 00000000000..e10237d38f3
--- /dev/null
+++ b/games/maelstrom-x11/patches/patch-maelstrom_sound_cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-maelstrom_sound_cpp,v 1.1 2011/07/19 04:24:19 dholland Exp $
+
+Use valid C++.
+
+--- Maelstrom_sound.cpp~ 1997-05-25 21:18:08.000000000 +0000
++++ Maelstrom_sound.cpp
+@@ -43,6 +43,7 @@ void Handle_Signal(int sig)
+ exit(sig);
+ }
+
++int
+ main(int argc, char *argv[])
+ {
+ extern char *optarg;
diff --git a/games/maelstrom-x11/patches/patch-randtest_cpp b/games/maelstrom-x11/patches/patch-randtest_cpp
new file mode 100644
index 00000000000..ab6926b9095
--- /dev/null
+++ b/games/maelstrom-x11/patches/patch-randtest_cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-randtest_cpp,v 1.1 2011/07/19 04:24:19 dholland Exp $
+
+Use valid C++.
+
+--- randtest.cpp~ 1996-10-25 09:53:14.000000000 +0000
++++ randtest.cpp
+@@ -3,6 +3,7 @@
+
+ #include "fastrand.cc"
+
++int
+ main()
+ {
+ SeedRandom(1L);
diff --git a/games/maelstrom-x11/patches/patch-testlist_cpp b/games/maelstrom-x11/patches/patch-testlist_cpp
new file mode 100644
index 00000000000..e16cb154d71
--- /dev/null
+++ b/games/maelstrom-x11/patches/patch-testlist_cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-testlist_cpp,v 1.1 2011/07/19 04:24:19 dholland Exp $
+
+Use valid C++.
+
+--- testlist.cpp~ 1996-11-08 18:31:40.000000000 +0000
++++ testlist.cpp
+@@ -7,6 +7,7 @@ int findfirst(int *isit)
+ return(1);
+ }
+
++int
+ main(int argc, char *argv[])
+ {
+ /*