summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2021-12-25 11:34:39 +0900
committerHiroki Tagato <tagattie@FreeBSD.org>2021-12-25 11:34:39 +0900
commita7bca39bced2daee9b144193caa8e7ff7baeeb6f (patch)
treeb42d35f2aecfcd311c3bd3e7d36d1a19a070bf28 /games
parentnet-p2p/bazarr-devel: update to 1.0.2-beta.11 (diff)
games/seabattle: update to 1.1 and unbreak on FreeBSD 13+
After having sent a number of FreeBSD patches to the author, he updated the project and incorporated them. So this is mainly a patch release. Port changes: - remove patches incorporated by upstream - unbreak build on FreeBSD 13+ - set LICENSE to MIT - depend on audio/alsa-utils if audio output is desired - take up maintainership of this unmaintained port PR: 260633 Reported by: Robert Clausecker <fuz@fuz.su> (new maintainer)
Diffstat (limited to 'games')
-rw-r--r--games/seabattle/Makefile24
-rw-r--r--games/seabattle/distinfo5
-rw-r--r--games/seabattle/files/patch-Makefile29
-rw-r--r--games/seabattle/files/patch-batt.c11
-rw-r--r--games/seabattle/files/patch-batt.h20
-rw-r--r--games/seabattle/files/patch-bdb.c31
-rw-r--r--games/seabattle/files/patch-binp.c41
-rw-r--r--games/seabattle/pkg-plist3
8 files changed, 18 insertions, 146 deletions
diff --git a/games/seabattle/Makefile b/games/seabattle/Makefile
index 3b1749e2d1a0..092014fc05a8 100644
--- a/games/seabattle/Makefile
+++ b/games/seabattle/Makefile
@@ -1,27 +1,29 @@
# Created by: Andrey Zakhvatov
PORTNAME= seabattle
-PORTVERSION= 1.0
-PORTREVISION= 2
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.1
CATEGORIES= games
-MASTER_SITES= SUNSITE/games/strategy/ \
- http://www.deater.net/weave/vmwprod/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= fuz@fuz.su
COMMENT= Curses based battleship type game
-BROKEN_FreeBSD_13= ld: error: duplicate symbol: current_player
-BROKEN_FreeBSD_14= ld: error: duplicate symbol: current_player
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= ncurses
+USES= gmake ncurses
+USE_GITHUB= yes
+GH_ACCOUNT= deater
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= DOCS ALSA
+OPTIONS_DEFAULT= ALSA
+ALSA_RUN_DEPENDS= aplay:audio/alsa-utils
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/seabattle ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${PREFIX}/share/seabattle
- ${INSTALL_DATA} ${WRKSRC}/*.au ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/share/seabattle/*.au ${STAGEDIR}${DATADIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/readme.txt ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/readme.historical ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/games/seabattle/distinfo b/games/seabattle/distinfo
index 3a24b5b76d04..08087838bf8f 100644
--- a/games/seabattle/distinfo
+++ b/games/seabattle/distinfo
@@ -1,2 +1,3 @@
-SHA256 (seabattle-1.0.tar.gz) = 080bb5706e67f9f1834016edc8ae30224e28417ea60ae86120f858cca0a3101e
-SIZE (seabattle-1.0.tar.gz) = 39093
+TIMESTAMP = 1640337906
+SHA256 (deater-seabattle-v1.1_GH0.tar.gz) = 1f65ab9589e0df8552a19ad66f8239c66f1422ea7d6ef53bc9609b72cb8f0c44
+SIZE (deater-seabattle-v1.1_GH0.tar.gz) = 42683
diff --git a/games/seabattle/files/patch-Makefile b/games/seabattle/files/patch-Makefile
deleted file mode 100644
index a125f8c34ba8..000000000000
--- a/games/seabattle/files/patch-Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
---- Makefile.orig 1997-05-13 17:53:34 UTC
-+++ Makefile
-@@ -8,7 +8,7 @@
- ##############################################################
-
- #Your compiler. If gcc doesn't work, try CC
--CC = gcc
-+#CC = gcc
- #CC = cc
-
- #On Suns, SGIs, and other Unix systems uncomment the following
-@@ -17,12 +17,12 @@ CC = gcc
- #C_OPTS =
- #L_OPTS = -lcurses
-
--#On Linux, uncomment the following
-+#On FreeBSD/Linux, uncomment the following
- #
--PLATFORM = Linux
--C_OPTS = -O2 -Wall
--L_OPTS = -lncurses
--
-+PLATFORM = FreeBSD/Linux
-+DATADIR = ${PREFIX}/share/seabattle
-+C_OPTS = ${CFLAGS} -DDATADIR=\"${DATADIR}\"
-+L_OPTS = $(LDFLAGS) -lncurses
-
- #For Dos/Windows DJGPP (you need the curses lib)
- #PLATFORM = DOS_DJGPP
diff --git a/games/seabattle/files/patch-batt.c b/games/seabattle/files/patch-batt.c
deleted file mode 100644
index 2a489dd45311..000000000000
--- a/games/seabattle/files/patch-batt.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./batt.c.orig 1997-05-13 15:45:51.000000000 +0000
-+++ ./batt.c 2013-05-28 08:46:50.000000000 +0000
-@@ -13,7 +13,7 @@
- int salvo_play=0; /* paramaters uncluttered*/
- int first_time=0;
-
--int main(int argc, char *argv)
-+int main(int argc, char **argv)
- {
- MAIN_THINGY *main_thing;
-
diff --git a/games/seabattle/files/patch-batt.h b/games/seabattle/files/patch-batt.h
deleted file mode 100644
index 5a75ce1abeac..000000000000
--- a/games/seabattle/files/patch-batt.h
+++ /dev/null
@@ -1,20 +0,0 @@
---- batt.h.orig 1997-05-13 19:58:17 UTC
-+++ batt.h
-@@ -2,7 +2,7 @@
- * batt.h Part of the SEABATTLE game by Vince Weaver *
- ************************************************************************/
-
--#include <curses.h> /* Slang support is good for rxvt in linux */
-+#include <ncurses.h> /* Slang support is good for rxvt in linux */
- #include <stdio.h>
- #include <ctype.h>
- #include <stdlib.h>
-@@ -54,7 +54,7 @@ DATA *current_player;
-
- /* binp.c */
- void init_curses(void); /* All the function declarations */
--void exit_curses(void);
-+void exit_curses_(void);
- void set_color(int color,int bold);
- void printxy(int x,int y,char *tempst);
- void draw_opening(void);
diff --git a/games/seabattle/files/patch-bdb.c b/games/seabattle/files/patch-bdb.c
deleted file mode 100644
index 65c6ab62ed7c..000000000000
--- a/games/seabattle/files/patch-bdb.c
+++ /dev/null
@@ -1,31 +0,0 @@
---- bdb.c.orig Wed May 14 04:49:59 1997
-+++ bdb.c Fri Feb 2 04:22:00 2001
-@@ -325,8 +325,8 @@
- char names[10][100],text[100];
- int ch,scores[10],i;
- /* If not there, create one */
-- if( (fff=fopen("hiscore.sea","r+"))==NULL ){
-- if ( (fff=fopen("hiscore.sea","a+"))!=NULL) {
-+ if( (fff=fopen(DATADIR "/hiscore.sea","r+"))==NULL ){
-+ if ( (fff=fopen(DATADIR "/hiscore.sea","a+"))!=NULL) {
- fprintf(fff,"Vince\n50\nMarie\n55\nJohn\n56\n");
- fprintf(fff,"Gus\n57\nLizann\n58\nKevin\n59\n");
- fprintf(fff,"Hal\n60\nHairold\n61\nChipper\n62\nBob\n63\n");
-@@ -335,7 +335,7 @@
- }
- else fclose(fff);
-
-- if ( (fff=fopen("hiscore.sea","r"))!=NULL) {
-+ if ( (fff=fopen(DATADIR "/hiscore.sea","r"))!=NULL) {
- for(i=0;i<10;i++)
- fscanf(fff,"%s%i",names[i],&scores[i]);
- fclose(fff);
-@@ -355,7 +355,7 @@
- set_color(C_WHITE,C_BOLD);
- sprintf(text,"%s got a new High Score, #%i",name,i+1);
- printxy(20,1,text);
-- if ( (fff=fopen("hiscore.sea","w+"))!=NULL) {
-+ if ( (fff=fopen(DATADIR "/hiscore.sea","w+"))!=NULL) {
- for(i=0;i<10;i++) fprintf(fff,"%s\n%i",names[i],scores[i]);
- fclose(fff);
- }
diff --git a/games/seabattle/files/patch-binp.c b/games/seabattle/files/patch-binp.c
deleted file mode 100644
index 05de31168bb6..000000000000
--- a/games/seabattle/files/patch-binp.c
+++ /dev/null
@@ -1,41 +0,0 @@
---- binp.c.orig 1997-05-13 17:51:00 UTC
-+++ binp.c
-@@ -42,7 +42,7 @@ void printxy(int x,int y,char *tempst) /* Simple f
- }
-
-
--void exit_curses(void) /* Shutdown curses nicely so the */
-+void exit_curses_(void) /* Shutdown curses nicely so the */
- { /* terminal works properly */
- clear();
- refresh();
-@@ -129,15 +129,15 @@ void do_sound(int which_one) /* Plays ap
- /* Incomplete as of yet */
- if (which_one==1)
- if (sound_device)
-- if(rand()%2) system("cat hit1.au > /dev/audio ");
-- else system("cat hit2.au > /dev/audio ");
-+ if(rand()%2) system("cat " DATADIR "/hit1.au > /dev/audio ");
-+ else system("cat " DATADIR "/hit2.au > /dev/audio ");
- else beep();
- if (which_one==2)
- if (sound_device)
-- if(rand()%2) system("cat miss1.au > /dev/audio ");
-- else system("cat miss2.au > /dev/audio ");
-+ if(rand()%2) system("cat " DATADIR "/miss1.au > /dev/audio ");
-+ else system("cat " DATADIR "/miss2.au > /dev/audio ");
- if (which_one==3)
-- if (sound_device) system("cat sunkit.au > /dev/audio ");
-+ if (sound_device) system("cat " DATADIR "/sunkit.au > /dev/audio ");
- else beep();
- }
-
-@@ -330,7 +330,7 @@ void quit(void) /* Create a
- wclear(quit_window);
- wrefresh(quit_window);
- delwin(quit_window);
-- if ((ch=='Y') || (ch=='y')) {exit_curses(); exit(0); }
-+ if ((ch=='Y') || (ch=='y')) {exit_curses_(); exit(0); }
- #ifndef BROKEN_CURSES
- redrawwin(stdscr);
- #endif
diff --git a/games/seabattle/pkg-plist b/games/seabattle/pkg-plist
index ceb3f8c57c7d..7c3431d3c454 100644
--- a/games/seabattle/pkg-plist
+++ b/games/seabattle/pkg-plist
@@ -1,5 +1,6 @@
bin/seabattle
-%%PORTDOCS%%%%DOCSDIR%%/readme.txt
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/readme.historical
%%DATADIR%%/hit1.au
%%DATADIR%%/hit2.au
%%DATADIR%%/miss1.au