Clean-up: respect CC/CFLAGS, kill useless docs, etc.
This commit is contained in:
parent
dba71b1357
commit
25a33fdcdc
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.16 2002/05/13 18:50:42 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.17 2002/08/02 20:27:17 naddy Exp $
|
||||
#
|
||||
|
||||
COMMENT= "GNU version of Shogi"
|
||||
@ -6,7 +6,6 @@ COMMENT= "GNU version of Shogi"
|
||||
DISTNAME= gnushogi-1.2p03
|
||||
PKGNAME= gnushogi-1.2.3
|
||||
CATEGORIES= games
|
||||
NEED_VERSION= 1.515
|
||||
|
||||
MAINTAINER= Angelos D. Keromytis <angelos@openbsd.org>
|
||||
|
||||
@ -18,30 +17,22 @@ PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_GNU:=gnushogi/}
|
||||
|
||||
DOCFILES= BOOKFILES CHANGES CONTRIB COPYING GENERAL INSTALL PORTING \
|
||||
README-FIRST listserv.ref shogi.rules tutorial1.gam tutorial2.gam
|
||||
WRKSRC= ${WRKDIST}/src
|
||||
|
||||
post-configure:
|
||||
echo "DISTDIR=${WRKDIR}" >> ${WRKSRC}/src/Makefile
|
||||
echo "prefix=${PREFIX}" >> ${WRKSRC}/src/Makefile
|
||||
NO_REGRESS= Yes
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/src; \
|
||||
${MAKE} gnushogir; \
|
||||
${MAKE} gnushogi.bbk; \
|
||||
${MAKE} gnushogi; \
|
||||
${MAKE} gnushogix
|
||||
DOCFILES= shogi.rules tutorial1.gam tutorial2.gam
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/gnushogi
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/gnushogi ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/gnushogir ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/src/gnushogix ${PREFIX}/libexec
|
||||
${INSTALL_DATA} ${WRKSRC}/src/gnushogi.bbk ${PREFIX}/share/gnushogi
|
||||
${INSTALL_MAN} ${WRKSRC}/doc/gnushogi.1 ${PREFIX}/man/man6/gnushogi.6
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/gnushogi ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/gnushogir ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/gnushogix ${PREFIX}/libexec
|
||||
${INSTALL_DATA} ${WRKSRC}/gnushogi.bbk ${PREFIX}/share/gnushogi
|
||||
${INSTALL_MAN} ${WRKDIST}/doc/gnushogi.1 ${PREFIX}/man/man6/gnushogi.6
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/gnushogi
|
||||
.for doc in ${DOCFILES}
|
||||
${INSTALL_DATA} ${WRKSRC}/doc/${doc} ${PREFIX}/share/doc/gnushogi
|
||||
${INSTALL_DATA} ${WRKDIST}/doc/${doc} ${PREFIX}/share/doc/gnushogi
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,19 +0,0 @@
|
||||
*** src/dspcom.c.orig Tue May 19 23:37:20 1998
|
||||
--- src/dspcom.c Tue May 19 23:38:08 1998
|
||||
***************
|
||||
*** 1567,1573 ****
|
||||
#ifdef NONDSP
|
||||
s[0] = sx[0] = '\0';
|
||||
while (!sx[0])
|
||||
! (void) gets (sx);
|
||||
#else
|
||||
fflush (stdout);
|
||||
#if defined MSDOS || defined THINK_C
|
||||
--- 1567,1573 ----
|
||||
#ifdef NONDSP
|
||||
s[0] = sx[0] = '\0';
|
||||
while (!sx[0])
|
||||
! (void) fgets (sx, 79, stdin);
|
||||
#else
|
||||
fflush (stdout);
|
||||
#if defined MSDOS || defined THINK_C
|
@ -1,42 +0,0 @@
|
||||
*** src/nondsp.c.orig Wed May 24 09:54:13 1995
|
||||
--- src/nondsp.c Tue May 19 23:41:58 1998
|
||||
***************
|
||||
*** 292,301 ****
|
||||
|
||||
NewGame ();
|
||||
|
||||
! gets (s); /* skip "setup" command */
|
||||
for (r = NO_ROWS-1; r >= 0; r--)
|
||||
{
|
||||
! gets (s);
|
||||
for (c = 0; c <= (NO_COLS-1); c++)
|
||||
{
|
||||
ch = s[c];
|
||||
--- 292,301 ----
|
||||
|
||||
NewGame ();
|
||||
|
||||
! fgets (s, 79, stdin); /* skip "setup" command */
|
||||
for (r = NO_ROWS-1; r >= 0; r--)
|
||||
{
|
||||
! fgets (s, 79, stdin);
|
||||
for (c = 0; c <= (NO_COLS-1); c++)
|
||||
{
|
||||
ch = s[c];
|
||||
***************
|
||||
*** 645,651 ****
|
||||
for(;*p != 'X';*q++ = *p++);
|
||||
*q = '\0';
|
||||
/* line empty ask for input */
|
||||
! if(!T[0]){ printz (CP[61]); gets(T); strcat(T,"XX"); }
|
||||
/* skip blackspace */
|
||||
for (p = T; *p == ' '; p++) ;
|
||||
/* could be moves or a fischer clock */
|
||||
--- 645,651 ----
|
||||
for(;*p != 'X';*q++ = *p++);
|
||||
*q = '\0';
|
||||
/* line empty ask for input */
|
||||
! if(!T[0]){ printz (CP[61]); fgets(T, NO_SQUARES-1, stdin); strcat(T,"XX"); }
|
||||
/* skip blackspace */
|
||||
for (p = T; *p == ' '; p++) ;
|
||||
/* could be moves or a fischer clock */
|
@ -1,12 +1,14 @@
|
||||
--- src/Makefile.orig Wed May 24 07:05:26 1995
|
||||
+++ src/Makefile Fri Jan 3 02:57:59 1997
|
||||
@@ -41,22 +41,22 @@
|
||||
$OpenBSD: patch-src_Makefile,v 1.1 2002/08/02 20:27:18 naddy Exp $
|
||||
--- src/Makefile.orig Wed May 24 16:05:26 1995
|
||||
+++ src/Makefile Fri Aug 2 22:11:00 2002
|
||||
@@ -41,22 +41,23 @@ VERS= 1.2p03
|
||||
DIST= ../README-$(VERS) ../doc ../misc ../src
|
||||
|
||||
# Installation directory
|
||||
-prefix=/usr/local
|
||||
+#prefix=/usr/local
|
||||
#prefix=/public/projects/shogi
|
||||
+prefix=${PREFIX}
|
||||
|
||||
# Change these to something less transitory, like /usr/games, and then
|
||||
# compile. Ask your system admin / unix guru to put gnushogi.{hsh,lng,tbk}
|
||||
@ -27,17 +29,27 @@
|
||||
|
||||
# Programs being distributed
|
||||
PROGS=gnushogi-$(VERS)
|
||||
@@ -96,7 +96,8 @@
|
||||
@@ -76,7 +77,7 @@ LCURSES=-lcurses -ltermcap
|
||||
#CC= c89 $(OPT) $(GENOPT)
|
||||
# Use this if you are lucky enough to have GNU CC.
|
||||
#CC= /usr/pub/bin/gcc -fsigned-char $(OPT) $(GENOPT)
|
||||
-CC= gcc -W -fsigned-char $(OPT) $(GENOPT)
|
||||
+#CC= gcc -W -fsigned-char $(OPT) $(GENOPT)
|
||||
#CC= cc $(OPT) $(GENOPT)
|
||||
|
||||
# Miscellaneous CFLAGS. Uncomment the one you need and comment the other
|
||||
@@ -96,7 +97,9 @@ CC= gcc -W -fsigned-char $(OPT) $(GENOPT
|
||||
#CFLAGS= -O2 -funroll-loops -traditional-cpp -DNO_STRING_INCLUDE -DNOFIONREAD # gnu cc 2.00 (hawk)
|
||||
#CFLAGS= -O2 -funroll-loops -DSEVENBIT # djgpp
|
||||
#CFLAGS= -g -funroll-loops # gnu cc 2.00 on SunOS with debug
|
||||
-CFLAGS= -O2 -funroll-loops # gnu cc 2.00 on SunOS
|
||||
+#CFLAGS= -O2 -funroll-loops # gnu cc 2.00 on SunOS
|
||||
+CFLAGS= -O2 -pipe -fno-strength-reduce # -m486
|
||||
+#CFLAGS= -O2 -pipe -fno-strength-reduce # -m486
|
||||
+CFLAGS+= $(OPT) $(GENOPT)
|
||||
|
||||
# flags for DJGPP package
|
||||
#COFF2EXE= coff2exe $(GNUSHOGI)
|
||||
@@ -454,3 +455,4 @@
|
||||
@@ -454,3 +457,4 @@ clean:
|
||||
-rm -f $(DISTDIR)/gnushogi-$(VERS)/src/gnushogi.bbk
|
||||
-find $(DISTDIR)/gnushogi-$(VERS) \( -name '*.o' -o -name '*~' -o -name 'CL*' -o -name 'PATCH*' -o -name '#*#' -o -name '%*%' -o -name '*orig' -o -name 'CL*' -o -name '*prt' -o -name '*bak' -o -name '*BAK' \) -exec rm -f {} \;
|
||||
|
12
games/gnushogi/patches/patch-src_dspcom_c
Normal file
12
games/gnushogi/patches/patch-src_dspcom_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-src_dspcom_c,v 1.1 2002/08/02 20:27:18 naddy Exp $
|
||||
--- src/dspcom.c.orig Mon May 22 16:56:39 1995
|
||||
+++ src/dspcom.c Fri Aug 2 22:03:33 2002
|
||||
@@ -1567,7 +1567,7 @@ Sdepth = 0;
|
||||
#ifdef NONDSP
|
||||
s[0] = sx[0] = '\0';
|
||||
while (!sx[0])
|
||||
- (void) gets (sx);
|
||||
+ (void) fgets (sx, 79, stdin);
|
||||
#else
|
||||
fflush (stdout);
|
||||
#if defined MSDOS || defined THINK_C
|
25
games/gnushogi/patches/patch-src_nondsp_c
Normal file
25
games/gnushogi/patches/patch-src_nondsp_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-src_nondsp_c,v 1.1 2002/08/02 20:27:18 naddy Exp $
|
||||
--- src/nondsp.c.orig Wed May 24 15:54:13 1995
|
||||
+++ src/nondsp.c Fri Aug 2 22:03:33 2002
|
||||
@@ -292,10 +292,10 @@ SetupBoard (void)
|
||||
|
||||
NewGame ();
|
||||
|
||||
- gets (s); /* skip "setup" command */
|
||||
+ fgets (s, 79, stdin); /* skip "setup" command */
|
||||
for (r = NO_ROWS-1; r >= 0; r--)
|
||||
{
|
||||
- gets (s);
|
||||
+ fgets (s, 79, stdin);
|
||||
for (c = 0; c <= (NO_COLS-1); c++)
|
||||
{
|
||||
ch = s[c];
|
||||
@@ -645,7 +645,7 @@ SelectLevel (char *sx)
|
||||
for(;*p != 'X';*q++ = *p++);
|
||||
*q = '\0';
|
||||
/* line empty ask for input */
|
||||
- if(!T[0]){ printz (CP[61]); gets(T); strcat(T,"XX"); }
|
||||
+ if(!T[0]){ printz (CP[61]); fgets(T, NO_SQUARES-1, stdin); strcat(T,"XX"); }
|
||||
/* skip blackspace */
|
||||
for (p = T; *p == ' '; p++) ;
|
||||
/* could be moves or a fischer clock */
|
@ -1,17 +1,8 @@
|
||||
@comment $OpenBSD: PLIST,v 1.2 2002/04/07 01:54:49 naddy Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.3 2002/08/02 20:27:18 naddy Exp $
|
||||
bin/gnushogi
|
||||
bin/gnushogir
|
||||
libexec/gnushogix
|
||||
man/man6/gnushogi.6
|
||||
share/doc/gnushogi/BOOKFILES
|
||||
share/doc/gnushogi/CHANGES
|
||||
share/doc/gnushogi/CONTRIB
|
||||
share/doc/gnushogi/COPYING
|
||||
share/doc/gnushogi/GENERAL
|
||||
share/doc/gnushogi/INSTALL
|
||||
share/doc/gnushogi/PORTING
|
||||
share/doc/gnushogi/README-FIRST
|
||||
share/doc/gnushogi/listserv.ref
|
||||
share/doc/gnushogi/shogi.rules
|
||||
share/doc/gnushogi/tutorial1.gam
|
||||
share/doc/gnushogi/tutorial2.gam
|
||||
|
Loading…
Reference in New Issue
Block a user