Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Aug 2010 17:00:17 GMT
From:      Anonymous <swell.k@gmail.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/149406: [patch] games/connect4: fix amd64 segfault
Message-ID:  <201008071700.o77H0HOh087272@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/149406; it has been noted by GNATS.

From: Anonymous <swell.k@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149406: [patch] games/connect4: fix amd64 segfault
Date: Sat, 07 Aug 2010 20:49:57 +0400

 - store game scores under /var/games, like emacs (snake, tetris)
 - don't remove non-emty scores
 
 --- c.diff begins here ---
 diff --git games/connect4/Makefile games/connect4/Makefile
 index 1ed5a14..edf5a49 100644
 --- games/connect4/Makefile
 +++ games/connect4/Makefile
 @@ -23,9 +23,13 @@ EXTRACT_CMD=		${GZCAT}
  EXTRACT_BEFORE_ARGS=	# empty
  EXTRACT_AFTER_ARGS=	| gunshar
  
 +MAKE_ENV+=	DATADIR=${DATADIR}
 +DATADIR=	/var/games/${PORTNAME}
 +
  NO_WRKSUBDIR=	yes
  MAN6=		connect4.6
  
 +SHAREOWN?=	games
  SHAREGRP?=	games
  SHAREMODE?=	664
  
 @@ -36,7 +40,7 @@ BINMODE?=	2555
  
  do-install:
  	${INSTALL_PROGRAM} ${WRKSRC}/c4 ${PREFIX}/bin/connect4
 -	${MKDIR} ${DATADIR}
 +	${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m 775 ${DATADIR}
  	${INSTALL_DATA} /dev/null ${DATADIR}/scores
  	${INSTALL_MAN} ${FILESDIR}/connect4.6 ${MANPREFIX}/man/man6
  
 diff --git games/connect4/files/patch-aa games/connect4/files/patch-aa
 index aac6263..a7567f7 100644
 --- games/connect4/files/patch-aa
 +++ games/connect4/files/patch-aa
 @@ -18,7 +18,7 @@
  + # Joel Sutton <suttonj@interconnect.com.au>
  + # 15th April, 1997
    
 -! CFLAGS += -DSCOREFILE=\"$(PREFIX)/share/connect4/scores\" 
 +! CFLAGS += -DSCOREFILE=\"$(DATADIR)/scores\" 
    CURSES = -lcurses -ltermcap
    
  + all:	c4
 diff --git games/connect4/pkg-plist games/connect4/pkg-plist
 index 0ea74e7..b4c2e07 100644
 --- games/connect4/pkg-plist
 +++ games/connect4/pkg-plist
 @@ -1,3 +1,3 @@
  bin/connect4
 -%%DATADIR%%/scores
 -@dirrm %%DATADIR%%
 +@unexec if [ ! -s /var/games/connect4/scores ]; then rm -f /var/games/connect4/scores; fi
 +@unexec rmdir /var/games/connect4 2>/dev/null || true
 --- c.diff ends here ---



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