- Switch to upstream versioning

- Add LICENSE
- Add missing depends
- Fix segfault due to buffer overflow
This commit is contained in:
Dmitry Marakasov 2016-10-11 10:42:05 +00:00
parent 9c7991a9e1
commit 4a5325bf46
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423757
3 changed files with 39 additions and 16 deletions

View File

@ -2,27 +2,21 @@
# $FreeBSD$
PORTNAME= wmtictactoe
PORTVERSION= 1.1
DISTVERSIONSUFFIX= -1
PORTREVISION= 3
DISTVERSION= 1.1-1
CATEGORIES= games windowmaker afterstep
MASTER_SITES= LOCAL/jim
MAINTAINER= ports@FreeBSD.org
COMMENT= Dockable TicTacToe game for WindowMaker and AfterStep
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/../COPYING
WRKSRC= ${WRKDIR}/wmtictactoe.app/wmtictactoe
USE_XORG= xpm
USE_XORG= x11 xext xpm
USES= gmake
PLIST_FILES= bin/wmtictactoe
post-patch:
@${REINPLACE_CMD} -e \
's|^void .*main|int main|' ${WRKSRC}/wmtictactoe.c
post-install:
@${ECHO_MSG} "===> Run 'wmtictactoe --help' for the available options"
.include <bsd.port.mk>

View File

@ -1,5 +1,5 @@
--- Makefile.orig Mon Mar 29 07:41:40 1999
+++ Makefile Sat Jun 26 18:00:10 1999
--- Makefile.orig 1999-08-30 14:14:17 UTC
+++ Makefile
@@ -1,14 +1,17 @@
-LIBDIR = -L/usr/X11R6/lib
+CC ?= gcc
@ -21,10 +21,10 @@
clean:
for i in $(OBJS) ; do \
@@ -17,5 +20,4 @@
rm wmtictactoe
@@ -17,5 +20,4 @@ clean:
rm -rf wmtictactoe core *~
install:
- /usr/bin/install -c -o 0 -g 0 -s -m 755 wmtictactoe /usr/local/bin/wmtictactoe
-
+ @/usr/bin/install -c -s -m 755 wmtictactoe ${DESTDIR}${PREFIX}/bin/wmtictactoe
+ ${BSD_INSTALL_PROGRAM} wmtictactoe ${DESTDIR}${PREFIX}/bin/wmtictactoe

View File

@ -0,0 +1,29 @@
--- wmtictactoe.c.orig 1999-08-30 14:25:10 UTC
+++ wmtictactoe.c
@@ -123,7 +123,7 @@ int wmtictactoe_mask_height = 64;
// ----------------------------------------------------------
// declaracao das funcoes do sistema
-void main (int argc, char *argv[]);
+int main (int argc, char *argv[]);
void usage (void);
void printversion (void);
void readfile (void);
@@ -168,7 +168,7 @@ void game_over (void);
// in: argc - numero de argumentos passados por linha d comando
// argv - vetor com os argumentos
// out: nada
-void main (int argc, char *argv[])
+int main (int argc, char *argv[])
{
int i;
@@ -544,7 +544,7 @@ escreve_placar ()
int coluna_xpm = 65;
int coluna_score[6] =
{8, 15, 26, 33, 43, 50 };
- char placar[6];
+ char placar[7];
if (isDeadmatch){
copyXPMArea(97, 74, 13, 9, 43, 88);