aboutsummaryrefslogtreecommitdiff
path: root/games/digger-vgl
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2003-08-05 06:00:06 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2003-08-05 06:00:06 +0000
commit18f52f09f9712396e86a983ad087894167171c94 (patch)
tree0a86aabe232fb81d05a6db637b171d688924b3dc /games/digger-vgl
parent9dcb4e0a06e4d414e9f8c703b5155903330622a7 (diff)
downloadports-18f52f09f9712396e86a983ad087894167171c94.tar.gz
ports-18f52f09f9712396e86a983ad087894167171c94.zip
Notes
Diffstat (limited to 'games/digger-vgl')
-rw-r--r--games/digger-vgl/Makefile33
-rw-r--r--games/digger-vgl/distinfo2
-rw-r--r--games/digger-vgl/files/patch-aa39
-rw-r--r--games/digger-vgl/files/patch-ab34
-rw-r--r--games/digger-vgl/files/patch-ac13
-rw-r--r--games/digger-vgl/files/patch-ad15
-rw-r--r--games/digger-vgl/files/patch-sdl_kbd.c43
-rw-r--r--games/digger-vgl/files/patch-sdl_snd.c13
-rw-r--r--games/digger-vgl/files/patch-sdl_vid.c157
-rw-r--r--games/digger-vgl/files/patch-sdl_vid.h10
-rw-r--r--games/digger-vgl/files/patch-sound.c15
-rw-r--r--games/digger-vgl/pkg-plist6
12 files changed, 18 insertions, 362 deletions
diff --git a/games/digger-vgl/Makefile b/games/digger-vgl/Makefile
index d8867f6ad987..5c88f02a8abb 100644
--- a/games/digger-vgl/Makefile
+++ b/games/digger-vgl/Makefile
@@ -6,45 +6,38 @@
#
PORTNAME= digger
-PORTVERSION= 1.0
-PORTREVISION= 1
+PORTVERSION= 20020314
CATEGORIES= games
MASTER_SITES= http://www.digger.org/
-DISTNAME= ${PORTNAME}-${DIGREL}
+DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= FreeBSD graphics console (VGL) version of the famous Digger game
-.if defined(WITH_SOUND)
-SDL_CONFIG?= ${LOCALBASE}/bin/sdl11-config
-LIB_DEPENDS= SDL-1.1.5:${PORTSDIR}/devel/sdl12
-MAKE_ENV= SOUND=yes \
- SDL_CONFIG=${SDL_CONFIG}
-.endif
-
ONLY_FOR_ARCHS= i386 # Alphas don't have libvgl yet...
-DIGREL= 20000407
-WRKSRC= ${WRKDIR}/${PORTNAME}-${DIGREL}
MAKEFILE= Makefile.fbsd
+.if defined(WITH_SOUND)
+USE_SDL= yes
+MAKE_ENV= SOUND=yes
+.endif
+
+pre-everything::
.if !defined(WITH_SOUND)
-post-extract:
- @${ECHO_MSG}
+ @${ECHO_MSG} ""
@${ECHO_MSG} "Please use \"make -DWITH_SOUND\" if you want to build the game with sound support."
- @${ECHO_MSG}
+ @${ECHO_MSG} ""
.endif
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/digger ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/digger ${PREFIX}/bin
@${MKDIR} /var/games/digger
.if !defined(NOPORTDOCS)
- @${MKDIR} ${PREFIX}/share/doc/digger
- @${INSTALL_MAN} ${WRKSRC}/digger.txt ${PREFIX}/share/doc/digger
+ @${MKDIR} ${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/digger.txt ${DOCSDIR}
.endif
-
.if defined(WITH_SOUND)
-post-install:
@${ECHO_MSG}
@${ECHO_MSG} "Use \"digger /A\" command to run Digger with sound enabled."
@${ECHO_MSG}
diff --git a/games/digger-vgl/distinfo b/games/digger-vgl/distinfo
index 0959ef44aa04..bba268aec657 100644
--- a/games/digger-vgl/distinfo
+++ b/games/digger-vgl/distinfo
@@ -1 +1 @@
-MD5 (digger-20000407.tar.gz) = 6b91314193ebdefcc22337b46458e950
+MD5 (digger-20020314.tar.gz) = 76c1e8ae3c4566dad65e91adbfe29570
diff --git a/games/digger-vgl/files/patch-aa b/games/digger-vgl/files/patch-aa
deleted file mode 100644
index 1b34a4543ed1..000000000000
--- a/games/digger-vgl/files/patch-aa
+++ /dev/null
@@ -1,39 +0,0 @@
-
-$FreeBSD$
-
---- Makefile.fbsd.orig Mon Apr 3 23:42:48 2000
-+++ Makefile.fbsd Sat Sep 22 23:07:01 2001
-@@ -4,24 +4,28 @@
- newsnd.c ini.c input.c monster.c bags.c alpha.c vgagrafx.c \
- title_gz.c
-
--CFLAGS= -g -O -Wall -pedantic -DFREEBSD
-+CFLAGS+= -DFREEBSD
-
- LDADD+= -lz
-
-+SDL_CONFIG?= sdl-config
-+
- .if !defined(SDL)
- CFLAGS+= -D_VGL
- LDADD+= -lvgl
- SRCS+= fbsd_sup.c fbsd_vid.c fbsd_kbd.c fbsd_timer.c
- .if defined(SOUND)
- SRCS+= sdl_snd.c
--CFLAGS+= -D_SDL_SOUND `sdl-config --cflags`
--LDADD+= `sdl-config --libs`
-+SDL_CFLAGS!= ${SDL_CONFIG} --cflags
-+SDL_LDFLAGS!= ${SDL_CONFIG} --libs
-+CFLAGS+= -D_SDL_SOUND ${SDL_CFLAGS}
-+LDADD+= ${SDL_LDFLAGS}
- .else # NO SOUND
- SRCS+= fbsd_snd.c
- .endif # SOUND
- .else # SDL
--CFLAGS+= -D_SDL `sdl-config --cflags`
--LDADD+= `sdl-config --libs`
-+CFLAGS+= -D_SDL `${SDL_CONFIG} --cflags`
-+LDADD+= `${SDL_CONFIG} --libs`
- SRCS+= fbsd_sup.c sdl_vid.c sdl_timer.c sdl_kbd.c sdl_snd.c icon.c
- .endif
-
diff --git a/games/digger-vgl/files/patch-ab b/games/digger-vgl/files/patch-ab
deleted file mode 100644
index 3ad9055a5eda..000000000000
--- a/games/digger-vgl/files/patch-ab
+++ /dev/null
@@ -1,34 +0,0 @@
-
-$FreeBSD$
-
---- fbsd_vid.c.orig Mon Apr 3 23:42:44 2000
-+++ fbsd_vid.c Sat Sep 22 22:18:25 2001
-@@ -1,4 +1,18 @@
--#include <machine/console.h>
-+/*
-+ * ---------------------------------------------------------------------------
-+ * "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): Maxim
-+ * Sobolev <sobomax@altavista.net> wrote this file. As long as you retain
-+ * this notice you can do whatever you want with this stuff. If we meet
-+ * some day, and you think this stuff is worth it, you can buy me a beer in
-+ * return.
-+ *
-+ * Maxim Sobolev
-+ * ---------------------------------------------------------------------------
-+ */
-+
-+#include <sys/fbio.h>
-+#include <sys/kbio.h>
-+#include <sys/consio.h>
- #include <vgl.h>
- #include <signal.h>
- #include <osreldate.h>
-@@ -272,6 +286,8 @@
- Sint4 w = 3, h = 12, size;
- Sint4 i;
-
-+ if(((ch - 32) >= 0x5f) || (ch < 32))
-+ return;
- tmp = ch2bmap(alphas[ch - 32], w, h);
- size = tmp->Xsize * tmp->Ysize;
- copy = malloc(size);
diff --git a/games/digger-vgl/files/patch-ac b/games/digger-vgl/files/patch-ac
deleted file mode 100644
index 1c539cf4d90f..000000000000
--- a/games/digger-vgl/files/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-
-$FreeBSD$
-
---- fbsd_kbd.c.orig Mon Apr 3 23:42:46 2000
-+++ fbsd_kbd.c Sat Sep 22 22:19:37 2001
-@@ -1,4 +1,6 @@
--#include <machine/console.h>
-+#include <sys/fbio.h>
-+#include <sys/kbio.h>
-+#include <sys/consio.h>
- #include <vgl.h>
-
- #include "def.h"
diff --git a/games/digger-vgl/files/patch-ad b/games/digger-vgl/files/patch-ad
deleted file mode 100644
index 2aa7e4e905cb..000000000000
--- a/games/digger-vgl/files/patch-ad
+++ /dev/null
@@ -1,15 +0,0 @@
-
-$FreeBSD$
-
---- fbsd_timer.c.orig Mon Apr 3 23:42:44 2000
-+++ fbsd_timer.c Sat Sep 22 22:20:03 2001
-@@ -2,7 +2,8 @@
- #include <stdlib.h>
- #include <time.h>
- #include <sys/time.h>
--#include <machine/console.h>
-+#include <sys/fbio.h>
-+#include <sys/consio.h>
- #include <vgl.h>
-
- #include "def.h"
diff --git a/games/digger-vgl/files/patch-sdl_kbd.c b/games/digger-vgl/files/patch-sdl_kbd.c
deleted file mode 100644
index cd48e52d0380..000000000000
--- a/games/digger-vgl/files/patch-sdl_kbd.c
+++ /dev/null
@@ -1,43 +0,0 @@
-
-$FreeBSD$
-
---- sdl_kbd.c 2001/09/12 21:53:57 1.1
-+++ sdl_kbd.c 2001/09/12 21:54:03
-@@ -1,3 +1,15 @@
-+/*
-+ * ---------------------------------------------------------------------------
-+ * "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): Maxim
-+ * Sobolev <sobomax@altavista.net> wrote this file. As long as you retain
-+ * this notice you can do whatever you want with this stuff. If we meet
-+ * some day, and you think this stuff is worth it, you can buy me a beer in
-+ * return.
-+ *
-+ * Maxim Sobolev
-+ * ---------------------------------------------------------------------------
-+ */
-+
- #include <SDL.h>
-
- #include "def.h"
-@@ -14,8 +26,12 @@
- if(klen == KBLEN) /* Buffer is full, drop some pieces */
- memcpy(kbuffer, kbuffer + 1, --klen);
- kbuffer[klen++] = event->key.keysym.sym;
-- }
-
-+ /* ALT + Enter handling (fullscreen/windowed operation) */
-+ if((event->key.keysym.sym == SDLK_RETURN || event->key.keysym.sym == SDLK_KP_ENTER) &&
-+ ((event->key.keysym.mod & KMOD_ALT) != 0))
-+ switchmode();
-+ }
- if(event->type == SDL_QUIT)
- exit(0);
-
-@@ -28,7 +44,6 @@
-
- SDL_PumpEvents();
- keys = SDL_GetKeyState(NULL);
--
- if (keys[key] == SDL_PRESSED )
- return(TRUE);
- else
diff --git a/games/digger-vgl/files/patch-sdl_snd.c b/games/digger-vgl/files/patch-sdl_snd.c
deleted file mode 100644
index c1e7a1527d18..000000000000
--- a/games/digger-vgl/files/patch-sdl_snd.c
+++ /dev/null
@@ -1,13 +0,0 @@
-
-$FreeBSD$
-
---- sdl_snd.c 2001/09/22 19:20:28 1.1
-+++ sdl_snd.c 2001/09/22 19:20:38
-@@ -15,7 +15,6 @@
-
- bool initsounddevice(void)
- {
--// SDL_PauseAudio(0);
- return(TRUE);
- }
-
diff --git a/games/digger-vgl/files/patch-sdl_vid.c b/games/digger-vgl/files/patch-sdl_vid.c
deleted file mode 100644
index 926b6e3c6f3e..000000000000
--- a/games/digger-vgl/files/patch-sdl_vid.c
+++ /dev/null
@@ -1,157 +0,0 @@
-
-$FreeBSD$
-
---- sdl_vid.c.orig Mon Apr 3 23:42:42 2000
-+++ sdl_vid.c Thu Sep 13 01:24:35 2001
-@@ -1,5 +1,18 @@
--#include <stdlib.h>
-+/*
-+ * ---------------------------------------------------------------------------
-+ * "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): Maxim
-+ * Sobolev <sobomax@altavista.net> wrote this file. As long as you retain
-+ * this notice you can do whatever you want with this stuff. If we meet
-+ * some day, and you think this stuff is worth it, you can buy me a beer in
-+ * return.
-+ *
-+ * Maxim Sobolev
-+ * ---------------------------------------------------------------------------
-+ */
-
-+/* malloc() and friends */
-+#include <stdlib.h>
-+/* Lovely SDL */
- #include <SDL.h>
-
- #include "def.h"
-@@ -48,8 +61,11 @@
- SDL_Color *ipalettes[] = {vga16_pal1i, vga16_pal2i};
- Sint4 currpal=0;
-
-+Uint32 addflag=0;
-+
- SDL_Surface *screen = NULL;
-
-+/* Data structure holding pending updates */
- struct PendNode {
- void *prevnode;
- void *nextnode;
-@@ -77,6 +93,46 @@
- {
- }
-
-+bool setmode(void)
-+{
-+ if((screen = SDL_SetVideoMode(640, 400, 8, \
-+ SDL_HWSURFACE | SDL_HWPALETTE | addflag)) == NULL)
-+ return(FALSE);
-+ else
-+ return(TRUE);
-+}
-+
-+void switchmode(void)
-+{
-+ Uint32 saved;
-+ SDL_Surface *tmp = NULL;
-+ SDL_Surface *oldscreen;
-+
-+ vgageti(0, 0, (Uint3 *)&tmp, 80, 200);
-+ oldscreen = screen;
-+ saved = addflag;
-+
-+ if(addflag == 0)
-+ addflag = SDL_FULLSCREEN;
-+ else
-+ addflag = 0;
-+ if(setmode() == FALSE) {
-+ addflag = saved;
-+ if(setmode() == FALSE) {
-+ fprintf(stderr, "Fatal: failed to change videomode and"\
-+ "fallback mode failed as well. Exitting.\n");
-+ exit(1);
-+ }
-+ }
-+
-+ SDL_SetColors(screen, tmp->format->palette->colors, 0, \
-+ tmp->format->palette->ncolors);
-+ vgaputi(0, 0, (Uint3 *)&tmp, 80, 200);
-+ SDL_FreeSurface(tmp);
-+ SDL_FreeSurface(oldscreen);
-+}
-+
-+
- void vgainit(void)
- {
- SDL_Surface *tmp = NULL;
-@@ -92,7 +148,7 @@
- }
- SDL_WM_SetCaption("D I G G E R", NULL);
- SDL_WM_SetIcon(tmp, NULL);
-- if ((screen = SDL_SetVideoMode(640, 400, 8, SDL_HWSURFACE | SDL_HWPALETTE)) == NULL) {
-+ if(setmode() == FALSE) {
- fprintf(stderr, "Couldn't set 640x480x8 video mode: %s\n", SDL_GetError());
- exit(1);
- }
-@@ -131,7 +187,6 @@
- {
- struct PendNode *p;
-
-- SDL_UnlockSurface(screen);
- for(p=First;p!=NULL;)
- {
- SDL_UpdateRect(screen,p->rect.x,p->rect.y,p->rect.w,p->rect.h);
-@@ -139,7 +194,6 @@
- free(p);
- p = First;
- }
-- SDL_LockSurface(screen);
- pendnum = 0;
- }
-
-@@ -161,12 +215,26 @@
- tmp->format->palette = screen->format->palette;
- SDL_BlitSurface(tmp, NULL, screen, &new->rect);
- tmp->format->palette = reserv;
-+/*
-+ * Following piece of code comparing already pending updates with current with
-+ * main goal to prevent redrawing overlapping rectangles several times.
-+ */
-
- for(ptr=First;ptr!=NULL;ptr=ptr->nextnode) {
- if((new->rect.x >= ptr->rect.x) &&
- (new->rect.y >= ptr->rect.y) &&
-- ((new->rect.x+new->rect.w)<=(ptr->rect.x+ptr->rect.w)) &&
-- ((new->rect.y+new->rect.h)<=(ptr->rect.y+ptr->rect.h))) {
-+ ((new->rect.x+new->rect.w) <= (ptr->rect.x+ptr->rect.w)) &&
-+ ((new->rect.y+new->rect.h) <= (ptr->rect.y+ptr->rect.h))) {
-+ free(new);
-+ return;
-+ } else if((new->rect.x <= ptr->rect.x) &&
-+ (new->rect.y <= ptr->rect.y) &&
-+ ((new->rect.x+new->rect.w) >= (ptr->rect.x+ptr->rect.w)) &&
-+ ((new->rect.y+new->rect.h) >= (ptr->rect.y+ptr->rect.h))) {
-+ ptr->rect.x = new->rect.x;
-+ ptr->rect.y = new->rect.y;
-+ ptr->rect.w = new->rect.w;
-+ ptr->rect.h = new->rect.h;
- free(new);
- return;
- }
-@@ -211,6 +279,9 @@
- Sint4 rval = 0;
- Uint8 *pixels;
-
-+ if ((x > 319) || (y > 199))
-+ return (0xff);
-+
- vgageti(x, y, (Uint3 *)&tmp, 1, 1);
- pixels = (Uint8 *)tmp->pixels;
- for (yi=0;yi<tmp->h;yi++)
-@@ -260,6 +331,8 @@
- Sint4 w=3, h=12, size;
- Sint4 i;
-
-+ if(((ch - 32) >= 0x5f) || (ch < 32))
-+ return;
- tmp = ch2bmap(alphas[ch-32], w, h);
- size = tmp->w*tmp->h;
- copy = malloc(size);
diff --git a/games/digger-vgl/files/patch-sdl_vid.h b/games/digger-vgl/files/patch-sdl_vid.h
deleted file mode 100644
index a579b9c2a1f2..000000000000
--- a/games/digger-vgl/files/patch-sdl_vid.h
+++ /dev/null
@@ -1,10 +0,0 @@
-
-$FreeBSD$
-
---- sdl_vid.h 2001/09/12 21:54:45 1.1
-+++ sdl_vid.h 2001/09/12 21:54:59
-@@ -1,2 +1,3 @@
--void doscreenupdate();
-+void doscreenupdate(void);
-+void switchmode(void);
-
diff --git a/games/digger-vgl/files/patch-sound.c b/games/digger-vgl/files/patch-sound.c
deleted file mode 100644
index c19804552fc2..000000000000
--- a/games/digger-vgl/files/patch-sound.c
+++ /dev/null
@@ -1,15 +0,0 @@
-
-$FreeBSD$
-
---- sound.c.orig Mon Apr 3 23:42:42 2000
-+++ sound.c Sat Sep 22 22:18:55 2001
-@@ -172,6 +172,9 @@
- if (!wave_device_available)
- soundlevdoneflag=FALSE;
- #endif
-+#if defined _SDL || defined _SDL_SOUND
-+ SDL_Delay(10); /* Let some CPU time go away */
-+#endif
- #ifdef ARM
- gretrace();
- soundint();
diff --git a/games/digger-vgl/pkg-plist b/games/digger-vgl/pkg-plist
index acc7a47f49df..38e56b1c72b2 100644
--- a/games/digger-vgl/pkg-plist
+++ b/games/digger-vgl/pkg-plist
@@ -1,3 +1,5 @@
bin/digger
-share/doc/digger/digger.txt
-@dirrm share/doc/digger
+%%PORTDOCS%%%%DOCSDIR%%/digger.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@unexec rmdir /var/games/digger 2>/dev/null || true
+@exec mkdir -p /var/games/digger