Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2003 00:18:00 +0900
From:      KATO Tsuguru <tkato@prontomail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/55243: Update port: games/digger-vgl to 20020314
Message-ID:  <20030805001800.2a667f65.tkato@prontomail.com>
Resent-Message-ID: <200308041520.h74FKBP1052463@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         55243
>Category:       ports
>Synopsis:       Update port: games/digger-vgl to 20020314
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 04 08:20:11 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
>Description:
- Update to version 20020314

Remove file:
files/patch-aa
files/patch-ab
files/patch-ac
files/patch-ad
files/patch-sdl_kbd.c
files/patch-sdl_snd.c
files/patch-sdl_vid.c
files/patch-sdl_vid.h

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/digger-vgl/Makefile games/digger-vgl/Makefile
--- /usr/ports/games/digger-vgl/Makefile	Tue Jul 29 21:32:04 2003
+++ games/digger-vgl/Makefile	Sun Aug  3 22:40:23 2003
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	digger
-PORTVERSION=	1.0
-PORTREVISION=	1
+PORTVERSION=	20020314
 CATEGORIES=	games
 MASTER_SITES=	http://www.digger.org/
 DISTNAME=	${PORTNAME}-${DIGREL}
@@ -15,36 +14,30 @@
 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 -urN /usr/ports/games/digger-vgl/distinfo games/digger-vgl/distinfo
--- /usr/ports/games/digger-vgl/distinfo	Tue May 23 00:00:13 2000
+++ games/digger-vgl/distinfo	Sun Aug  3 22:36:31 2003
@@ -1 +1 @@
-MD5 (digger-20000407.tar.gz) = 6b91314193ebdefcc22337b46458e950
+MD5 (digger-20020314.tar.gz) = 76c1e8ae3c4566dad65e91adbfe29570
diff -urN /usr/ports/games/digger-vgl/files/patch-aa games/digger-vgl/files/patch-aa
--- /usr/ports/games/digger-vgl/files/patch-aa	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-aa	Thu Jan  1 09:00:00 1970
@@ -1,39 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-aa,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-ab games/digger-vgl/files/patch-ab
--- /usr/ports/games/digger-vgl/files/patch-ab	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-ab	Thu Jan  1 09:00:00 1970
@@ -1,34 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-ab,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-ac games/digger-vgl/files/patch-ac
--- /usr/ports/games/digger-vgl/files/patch-ac	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-ac	Thu Jan  1 09:00:00 1970
@@ -1,13 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-ac,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-ad games/digger-vgl/files/patch-ad
--- /usr/ports/games/digger-vgl/files/patch-ad	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-ad	Thu Jan  1 09:00:00 1970
@@ -1,15 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-ad,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-sdl_kbd.c games/digger-vgl/files/patch-sdl_kbd.c
--- /usr/ports/games/digger-vgl/files/patch-sdl_kbd.c	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-sdl_kbd.c	Thu Jan  1 09:00:00 1970
@@ -1,43 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-sdl_kbd.c,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-sdl_snd.c games/digger-vgl/files/patch-sdl_snd.c
--- /usr/ports/games/digger-vgl/files/patch-sdl_snd.c	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-sdl_snd.c	Thu Jan  1 09:00:00 1970
@@ -1,13 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-sdl_snd.c,v 1.1 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-sdl_vid.c games/digger-vgl/files/patch-sdl_vid.c
--- /usr/ports/games/digger-vgl/files/patch-sdl_vid.c	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-sdl_vid.c	Thu Jan  1 09:00:00 1970
@@ -1,157 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-sdl_vid.c,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-sdl_vid.h games/digger-vgl/files/patch-sdl_vid.h
--- /usr/ports/games/digger-vgl/files/patch-sdl_vid.h	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-sdl_vid.h	Thu Jan  1 09:00:00 1970
@@ -1,10 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-sdl_vid.h,v 1.2 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/files/patch-sound.c games/digger-vgl/files/patch-sound.c
--- /usr/ports/games/digger-vgl/files/patch-sound.c	Sun Sep 23 05:35:22 2001
+++ games/digger-vgl/files/patch-sound.c	Thu Jan  1 09:00:00 1970
@@ -1,15 +0,0 @@
-
-$FreeBSD: ports/games/digger-vgl/files/patch-sound.c,v 1.1 2001/09/22 20:35:22 sobomax Exp $
-
---- 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 -urN /usr/ports/games/digger-vgl/pkg-plist games/digger-vgl/pkg-plist
--- /usr/ports/games/digger-vgl/pkg-plist	Tue May 23 00:00:13 2000
+++ games/digger-vgl/pkg-plist	Sun Aug  3 22:35:23 2003
@@ -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
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030805001800.2a667f65.tkato>