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.
This commit is contained in:
parent
28f858e1b9
commit
0ded0df8cb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=663
@ -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)
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user