1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

Patch so freebsd-games no longer needs to link against libcompat. It still

requires the old sgtty headers, though.

PR:		ports/68260 (based on)
Submitted by:	Stephen J. Roznowski <sjr@comcast.net>
This commit is contained in:
Sam Lawrance 2006-04-16 12:01:03 +00:00
parent aea3722c89
commit 1478838482
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159693
18 changed files with 196 additions and 18 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= freebsd-games
PORTVERSION= 5.1.1
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=markm
@ -15,7 +15,6 @@ MASTER_SITE_SUBDIR=markm
MAINTAINER= ports@FreeBSD.org
COMMENT= FreeBSD-modified "Standard" BSD games
USE_REINPLACE= yes
USE_BZIP2= yes
MAN6= \
@ -64,6 +63,8 @@ post-patch:
@${FIND} ${WRKSRC} -name '*.c' -or -name '*.h' -or -name '*.6' -or \
-name 'index' | ${XARGS} ${REINPLACE_CMD} -e \
's|share/games|local/share/games|g'
@${FIND} ${WRKSRC} -name 'Makefile' | \
${XARGS} ${REINPLACE_CMD} 's|$${LIBCOMPAT}||g;;s|-lcompat||g'
@for f in ${PATHNAME_FILES}; do \
${REINPLACE_CMD} -e 's|/usr/local/local/local|${PREFIX}|g' \
${WRKSRC}/$${f}; \

View File

@ -0,0 +1,11 @@
--- backgammon/backgammon/main.c.orig Tue Nov 11 10:46:54 2003
+++ backgammon/backgammon/main.c Sun Apr 16 21:21:01 2006
@@ -53,6 +53,8 @@
#include <signal.h>
#include "back.h"
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
#define MVPAUSE 5 /* time to sleep when stuck */
#define MAXUSERS 35 /* maximum number of users */

View File

@ -0,0 +1,11 @@
--- backgammon/common_source/subs.c.orig Mon Apr 22 23:44:18 2002
+++ backgammon/common_source/subs.c Sun Apr 16 21:27:43 2006
@@ -44,6 +44,8 @@
#include <string.h>
#include "back.h"
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+
int buffnum;
char outbuff[BUFSIZ];

View File

@ -0,0 +1,11 @@
--- backgammon/teachgammon/teach.c.orig Sat Feb 2 20:37:20 2002
+++ backgammon/teachgammon/teach.c Sun Apr 16 21:22:11 2006
@@ -52,6 +52,8 @@
#include <signal.h>
#include "back.h"
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
extern char *hello[];
extern char *list[];
extern char *intro1[];

View File

@ -0,0 +1,13 @@
--- hack/hack.tty.c Wed Jun 23 21:36:26 2004
+++ hack/hack.tty.c Wed Jun 23 21:50:12 2004
@@ -95,8 +95,8 @@
#define CBRKMASK CBREAK
#define CBRKON /* empty */
#define OSPEED(x) (x).sg_ospeed
-#define GTTY(x) (gtty(0, x))
-#define STTY(x) (stty(0, x))
+#define GTTY(x) (ioctl(0, TIOCGETP, x))
+#define STTY(x) (ioctl(0, TIOCSETP, x))
#endif /* USG */

View File

@ -1,8 +1,6 @@
$FreeBSD$
--- larn/io.c 24 Jan 2004 21:00:14 -0000 1.3
+++ larn/io.c 21 Jun 2004 02:28:34 -0000 1.4
@@ -25,7 +25,7 @@
--- larn/io.c.orig Thu May 9 06:39:10 2002
+++ larn/io.c Sun Apr 16 20:40:41 2006
@@ -24,7 +24,7 @@
* FILE INPUT ROUTINES
*
* long lgetc() read one character from input buffer
@ -11,7 +9,17 @@ $FreeBSD$
* lrfill(address,number) put input bytes into a buffer
* char *lgetw() get a whitespace ended word from input
* char *lgetl() get a \n or EOF ended line from input
@@ -343,7 +343,7 @@
@@ -75,6 +75,9 @@
#define CBREAK RAW /* V7 has no CBREAK */
#endif
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
#define doraw(_a) (_a.sg_flags |= CBREAK,_a.sg_flags &= ~ECHO)
#define unraw(_a) (_a.sg_flags &= ~CBREAK,_a.sg_flags |= ECHO)
#include <sgtty.h>
@@ -345,7 +348,7 @@
}
/*
@ -20,7 +28,7 @@ $FreeBSD$
*
* +---------+---------+---------+---------+
* | high | | | low |
@@ -355,7 +355,7 @@
@@ -357,7 +360,7 @@
* The save order is low order first, to high order (4 bytes total)
* Returns the int read
*/

View File

@ -0,0 +1,12 @@
--- snake/snake/move.c.orig Wed May 29 02:54:00 2002
+++ snake/snake/move.c Sun Apr 16 21:04:37 2006
@@ -103,6 +103,9 @@
#include "snake.h"
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
int CMlength;
int NDlength;
int BSlength;

View File

@ -0,0 +1,11 @@
--- snake/snake/snake.c.orig Tue Nov 11 10:47:06 2003
+++ snake/snake/snake.c Sun Apr 16 21:04:54 2006
@@ -68,6 +68,8 @@
#include "snake.h"
#include "pathnames.h"
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+
#define PENALTY 10 /* % penalty for invoking spacewarp */
#define EOT '\004'

View File

@ -0,0 +1,11 @@
--- trek/main.c.orig Mon Jun 24 04:29:52 2002
+++ trek/main.c Sun Apr 16 21:26:44 2006
@@ -51,6 +51,8 @@
# include <setjmp.h>
# include <stdlib.h>
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
# define PRIO 00 /* default priority */
int Mother = 51 + (51 << 8);

View File

@ -7,7 +7,7 @@
PORTNAME= freebsd-games
PORTVERSION= 5.1.1
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=markm
@ -15,7 +15,6 @@ MASTER_SITE_SUBDIR=markm
MAINTAINER= ports@FreeBSD.org
COMMENT= FreeBSD-modified "Standard" BSD games
USE_REINPLACE= yes
USE_BZIP2= yes
MAN6= \
@ -64,6 +63,8 @@ post-patch:
@${FIND} ${WRKSRC} -name '*.c' -or -name '*.h' -or -name '*.6' -or \
-name 'index' | ${XARGS} ${REINPLACE_CMD} -e \
's|share/games|local/share/games|g'
@${FIND} ${WRKSRC} -name 'Makefile' | \
${XARGS} ${REINPLACE_CMD} 's|$${LIBCOMPAT}||g;;s|-lcompat||g'
@for f in ${PATHNAME_FILES}; do \
${REINPLACE_CMD} -e 's|/usr/local/local/local|${PREFIX}|g' \
${WRKSRC}/$${f}; \

View File

@ -0,0 +1,11 @@
--- backgammon/backgammon/main.c.orig Tue Nov 11 10:46:54 2003
+++ backgammon/backgammon/main.c Sun Apr 16 21:21:01 2006
@@ -53,6 +53,8 @@
#include <signal.h>
#include "back.h"
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
#define MVPAUSE 5 /* time to sleep when stuck */
#define MAXUSERS 35 /* maximum number of users */

View File

@ -0,0 +1,11 @@
--- backgammon/common_source/subs.c.orig Mon Apr 22 23:44:18 2002
+++ backgammon/common_source/subs.c Sun Apr 16 21:27:43 2006
@@ -44,6 +44,8 @@
#include <string.h>
#include "back.h"
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+
int buffnum;
char outbuff[BUFSIZ];

View File

@ -0,0 +1,11 @@
--- backgammon/teachgammon/teach.c.orig Sat Feb 2 20:37:20 2002
+++ backgammon/teachgammon/teach.c Sun Apr 16 21:22:11 2006
@@ -52,6 +52,8 @@
#include <signal.h>
#include "back.h"
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
extern char *hello[];
extern char *list[];
extern char *intro1[];

View File

@ -0,0 +1,13 @@
--- hack/hack.tty.c Wed Jun 23 21:36:26 2004
+++ hack/hack.tty.c Wed Jun 23 21:50:12 2004
@@ -95,8 +95,8 @@
#define CBRKMASK CBREAK
#define CBRKON /* empty */
#define OSPEED(x) (x).sg_ospeed
-#define GTTY(x) (gtty(0, x))
-#define STTY(x) (stty(0, x))
+#define GTTY(x) (ioctl(0, TIOCGETP, x))
+#define STTY(x) (ioctl(0, TIOCSETP, x))
#endif /* USG */

View File

@ -1,8 +1,6 @@
$FreeBSD$
--- larn/io.c 24 Jan 2004 21:00:14 -0000 1.3
+++ larn/io.c 21 Jun 2004 02:28:34 -0000 1.4
@@ -25,7 +25,7 @@
--- larn/io.c.orig Thu May 9 06:39:10 2002
+++ larn/io.c Sun Apr 16 20:40:41 2006
@@ -24,7 +24,7 @@
* FILE INPUT ROUTINES
*
* long lgetc() read one character from input buffer
@ -11,7 +9,17 @@ $FreeBSD$
* lrfill(address,number) put input bytes into a buffer
* char *lgetw() get a whitespace ended word from input
* char *lgetl() get a \n or EOF ended line from input
@@ -343,7 +343,7 @@
@@ -75,6 +75,9 @@
#define CBREAK RAW /* V7 has no CBREAK */
#endif
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
#define doraw(_a) (_a.sg_flags |= CBREAK,_a.sg_flags &= ~ECHO)
#define unraw(_a) (_a.sg_flags &= ~CBREAK,_a.sg_flags |= ECHO)
#include <sgtty.h>
@@ -345,7 +348,7 @@
}
/*
@ -20,7 +28,7 @@ $FreeBSD$
*
* +---------+---------+---------+---------+
* | high | | | low |
@@ -355,7 +355,7 @@
@@ -357,7 +360,7 @@
* The save order is low order first, to high order (4 bytes total)
* Returns the int read
*/

View File

@ -0,0 +1,12 @@
--- snake/snake/move.c.orig Wed May 29 02:54:00 2002
+++ snake/snake/move.c Sun Apr 16 21:04:37 2006
@@ -103,6 +103,9 @@
#include "snake.h"
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
int CMlength;
int NDlength;
int BSlength;

View File

@ -0,0 +1,11 @@
--- snake/snake/snake.c.orig Tue Nov 11 10:47:06 2003
+++ snake/snake/snake.c Sun Apr 16 21:04:54 2006
@@ -68,6 +68,8 @@
#include "snake.h"
#include "pathnames.h"
+#define stty(_a,_b) ioctl(_a,TIOCSETP,_b)
+
#define PENALTY 10 /* % penalty for invoking spacewarp */
#define EOT '\004'

View File

@ -0,0 +1,11 @@
--- trek/main.c.orig Mon Jun 24 04:29:52 2002
+++ trek/main.c Sun Apr 16 21:26:44 2006
@@ -51,6 +51,8 @@
# include <setjmp.h>
# include <stdlib.h>
+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
+
# define PRIO 00 /* default priority */
int Mother = 51 + (51 << 8);