From deb27fb20d4798d4ebb764a2a82f74899b77104f Mon Sep 17 00:00:00 2001 From: swallace Date: Mon, 2 Jan 1995 20:42:17 +0000 Subject: Add MANSUFFIX=6 to Imakefile. Change LIBDIR to $(PREFIX)/lib/X11 Switch to real uid before XOpenDisplay call and back afterwards so won't get can't opend display since u+s games. --- games/jetpack/files/patch-ac | 27 +++++++++++---------------- games/jetpack/files/patch-ad | 27 +++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 20 deletions(-) (limited to 'games/jetpack') diff --git a/games/jetpack/files/patch-ac b/games/jetpack/files/patch-ac index 84864dd557f5..4aa8fe94f089 100644 --- a/games/jetpack/files/patch-ac +++ b/games/jetpack/files/patch-ac @@ -1,5 +1,5 @@ *** Imakefile.orig Mon Apr 6 12:59:31 1992 ---- Imakefile Thu Oct 6 08:43:31 1994 +--- Imakefile Mon Jan 2 11:51:53 1995 *************** *** 1,54 **** ! SRCS = bitmap.c bonus.c collision.c demo.c draw.c erase.c events.c\ @@ -49,14 +49,14 @@ DependTarget() DependDependency() - InstallNonExec(levels/000,$(LEVELFILE)000) +! InstallNonExec(levels/000,$(LEVELFILE)000) - # oops, I can't figure how to override the template default to install the - # man page as jetpack.1, so I install both and remove the bad one. - install.man:: jetpack.man +! # oops, I can't figure how to override the template default to install the +! # man page as jetpack.1, so I install both and remove the bad one. +! install.man:: jetpack.man ! $(INSTALL) -c $(INSTMANFLAGS) jetpack.man $(MANDIR)/jetpack.1 ! @rm -f $(MANDIR)/jetpack.n ---- 1,58 ---- +--- 1,53 ---- ! SRCS = bitmap.c bonus.c collision.c demo.c draw.c erase.c events.c\ gameover.c initx.c main.c maze.c message.c normal.c quitx.c scores.c\ setinmaze.c setup.c special.c time.c update.c windowx.c @@ -67,8 +67,9 @@ ! PROGRAMS = jetpack ! BINDIR = $(PREFIX)/bin -! LIBDIR = $(PREFIX)/lib/jetpack +! LIBDIR = $(PREFIX)/lib/X11/jetpack ! MANDIR = $(PREFIX)/man/man6 +! MANSUFFIX = 6 # These defines override the template defaults. Trash em if you want to # use the template locations @@ -105,13 +106,7 @@ DependTarget() DependDependency() -+ install:: -+ MakeDir($(LIBDIR)) -+ - InstallNonExec(levels/000,$(LEVELFILE)000) +! install:: +! MakeDir($(LIBDIR)) - # oops, I can't figure how to override the template default to install the - # man page as jetpack.1, so I install both and remove the bad one. - install.man:: jetpack.man -! $(INSTALL) -c $(INSTMANFLAGS) jetpack.man $(MANDIR)/jetpack.6 -! @rm -f $(MANDIR)/jetpack.1* +! InstallNonExec(levels/000,$(LEVELFILE)000) diff --git a/games/jetpack/files/patch-ad b/games/jetpack/files/patch-ad index df82fbde7a9a..308b486b33f0 100644 --- a/games/jetpack/files/patch-ad +++ b/games/jetpack/files/patch-ad @@ -1,7 +1,7 @@ -*** initx.c.orig Mon Nov 8 15:16:00 1993 ---- initx.c Wed Sep 21 00:32:35 1994 +*** initx.c.orig Mon Apr 6 12:59:29 1992 +--- initx.c Mon Jan 2 12:14:16 1995 *************** -*** 44,50 **** +*** 44,57 **** resulting fontname right into the code. */ @@ -9,7 +9,14 @@ static char *bigfontname = "-*-courier-bold-r-normal--*-180-*-*-m-150-*-*"; /* init_X opens the display and sets up all the color stuff ---- 44,50 ---- + */ + init_X() + { +! display = XOpenDisplay(NULL); + if (display == NULL) { + fprintf(stderr, "Jetpack : Cannot connect to X Server %s\n", + XDisplayName(NULL)); +--- 44,62 ---- resulting fontname right into the code. */ @@ -17,3 +24,15 @@ static char *bigfontname = "-*-courier-bold-r-normal--*-180-*-*-m-150-*-*"; /* init_X opens the display and sets up all the color stuff + */ + init_X() + { +! int saved_euid; +! +! saved_euid = geteuid(); +! seteuid(getuid()); +! display = XOpenDisplay(""); +! seteuid(saved_euid); + if (display == NULL) { + fprintf(stderr, "Jetpack : Cannot connect to X Server %s\n", + XDisplayName(NULL)); -- cgit