aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games/doom/Makefile42
-rw-r--r--games/doom/distinfo5
-rw-r--r--games/doom/files/patch-aa782
-rw-r--r--games/doom/files/patch-ab14
-rw-r--r--games/doom/files/patch-ac11
-rw-r--r--games/doom/files/patch-ad11
-rw-r--r--games/doom/files/patch-ae26
-rw-r--r--games/doom/files/patch-af11
-rw-r--r--games/doom/files/patch-ag11
-rw-r--r--games/doom/files/patch-ah22
-rw-r--r--games/doom/files/patch-ai8
-rw-r--r--games/doom/pkg-comment2
-rw-r--r--games/doom/pkg-descr11
-rw-r--r--games/doom/pkg-plist12
14 files changed, 149 insertions, 819 deletions
diff --git a/games/doom/Makefile b/games/doom/Makefile
index dd5f147484f6..58e2d1415cb2 100644
--- a/games/doom/Makefile
+++ b/games/doom/Makefile
@@ -1,36 +1,38 @@
# New ports collection makefile for: games
# Version required: 1.8
-# Date created: Mon Dec 9 09:42:37 CST 1996
-# Whom: erich@rrnet.com
+# Date created: Mon Dec 14 21:03:01 MET 1998
+# Whom: jmz
#
-# $Id: Makefile,v 1.6 1998/12/13 08:47:40 asami Exp $
+# $Id: Makefile,v 1.4 1998/12/18 12:26:09 asami Exp $
#
-DISTNAME= doom-1.8
+DISTNAME= doomsrc-1.8
CATEGORIES= games
-MASTER_SITES= ${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR= games/doom
-DISTFILES= linux-doom-1.8.tar.gz musserver.tgz smooth-joystick4doom.tgz
+MASTER_SITES= ftp://ftp.idsoftware.com/idstuff/source/ \
+ ftp://ftp.stomped.com/pub/idmirror/idstuff/source/ \
+ ftp://ftp.cdrom.com/pub/idgames/idstuff/source/ \
+ ftp://ftp.gamesnet.net/idsoftware/source/
+DISTFILES= doomsrc.zip
-MAINTAINER= erich@FreeBSD.org
+MAINTAINER= jmz@FreeBSD.org
-BUILD_DEPENDS= /compat/linux/lib/ld.so:${PORTSDIR}/emulators/linux_lib
-RUN_DEPENDS= /compat/linux/lib/libc.so.5:${PORTSDIR}/emulators/linux_lib
-
-ONLY_FOR_ARCHS= i386
+BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
USE_XLIB= yes
+EXTRACT_CMD= unzip
+EXTRACT_ARGS= -q
NO_WRKSUBDIR= yes
-PKGINSTALL= ${WRKDIR}/INSTALL
+USE_GMAKE= yes
-post-patch:
- @(cd ${WRKSRC}/joystick4doom; make clean)
- @(cd ${WRKSRC}/musserver; make clean)
+post-extract:
+ @cd ${WRKDIR} && tar xzf linuxdoom-1.10.src.tgz && tar xzf sndserv.tgz
-pre-install:
- @sed 's,@PREFIX@,${PREFIX},' ${PKGDIR}/INSTALL.in > ${PKGINSTALL}
+do-build:
+ @cd ${WRKDIR}/linuxdoom-1.10 && ${GMAKE}
+ @cd ${WRKDIR}/sndserv && ${GMAKE}
-post-install:
- @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+do-install:
+ @${INSTALL_PROGRAM} ${WRKDIR}/linuxdoom-1.10/linux/linuxxdoom ${PREFIX}/bin/doom
+ @${INSTALL_PROGRAM} ${WRKDIR}/sndserv/linux/sndserver ${PREFIX}/bin/sndserver
.include <bsd.port.mk>
diff --git a/games/doom/distinfo b/games/doom/distinfo
index 6abdf69f98a4..04e8bab13778 100644
--- a/games/doom/distinfo
+++ b/games/doom/distinfo
@@ -1,4 +1 @@
-MD5 (linux-doom-1.8.tar.gz) = 001ef27d21857092a4bca59168c0a6d4
-MD5 (musserver.tgz) = 485127ba03066955b3af822e921ad9f1
-MD5 (smooth-joystick4doom.tgz) = 06d8c4e053b90037584d6d750e53aef2
-MD5 (sndserver.gz) = 62f21cc6d54df7388ba2fa5981463531
+MD5 (doomsrc.zip) = 80b3fe460c59ca7bb809c56eec876515
diff --git a/games/doom/files/patch-aa b/games/doom/files/patch-aa
index 6e6d548ce572..0c04d896c27a 100644
--- a/games/doom/files/patch-aa
+++ b/games/doom/files/patch-aa
@@ -1,781 +1,11 @@
-diff -ruN ../virgin/Makefile ./Makefile
---- ../virgin/Makefile Wed Dec 31 18:00:00 1969
-+++ ./Makefile Tue Dec 10 11:42:20 1996
-@@ -0,0 +1,24 @@
-+
-+SUBDIR+= joystick4doom
-+SUBDIR+= musserver
-+
-+all: doom.sh
-+
-+install:
-+ mkdir -p ${PREFIX}/libexec/doom
-+ mkdir -p ${PREFIX}/share/doom
-+ install -c -m 755 doom.sh ${PREFIX}/bin/doom
-+ for i in xdoom sndserver; do \
-+ install -c -m 755 doom-1.8/$$i ${PREFIX}/libexec/doom; \
-+ done
-+ for i in doom1.wad README README.config README.linuxx; do \
-+ install -c -m 644 doom-1.8/$$i ${PREFIX}/share/doom; \
-+ done
-+ (cd musserver; make install)
-+ (cd joystick4doom; make install)
-+
-+.include <bsd.subdir.mk>
-+
-+doom.sh:
-+ sed "s,@PREFIX@,${PREFIX}," doom.sh.in >doom.sh
-+
-Binary files ../virgin/doom-1.8/pat and ./doom-1.8/pat differ
-Binary files ../virgin/doom-1.8/sdoom and ./doom-1.8/sdoom differ
-Binary files ../virgin/doom-1.8/xdoom and ./doom-1.8/xdoom differ
-diff -ruN ../virgin/doom.sh.in ./doom.sh.in
---- ../virgin/doom.sh.in Wed Dec 31 18:00:00 1969
-+++ ./doom.sh.in Wed Dec 11 09:58:06 1996
-@@ -0,0 +1,20 @@
-+#!/bin/sh
-+
-+if [ -e /dev/joy0 ]; then
-+ if sh -c 'exec 9</dev/joy0' 2>/dev/null; then
-+ echo using joystick
-+ exec 9>&-
-+ [ -f /tmp/joystick4doom.pid ] && @PREFIX@/libexec/doom/joystick4xdoom -k
-+ @PREFIX@/libexec/doom/joystick4xdoom /dev/joy0 Control Space &
-+ fi
-+fi
-+
-+DOOMWADDIR=@PREFIX@/share/doom; export DOOMWADDIR
-+PATH=@PREFIX@/libexec/doom:${PATH}
-+
-+cd @PREFIX@/libexec/doom
-+@PREFIX@/libexec/doom/xdoom $*
-+[ -f /tmp/joystick4doom.pid ] && @PREFIX@/libexec/doom/joystick4xdoom -k
-+
-+ipcrm $(ipcs -m |sed -n 's,^\(m *[0-9][0-9]*\).*,-\1,p')
-+
-diff -ruN ../virgin/joystick4doom/Makefile ./joystick4doom/Makefile
---- ../virgin/joystick4doom/Makefile Wed Dec 14 01:27:14 1994
-+++ ./joystick4doom/Makefile Tue Dec 10 11:39:26 1996
-@@ -13,8 +13,8 @@
- # Define this to be the file where the joystick settings are saved.
- DATFILE = \"/usr/local/lib/joystick.dat\"
-
--CFLAGS = -O2 $(DEBUG) $(THRESHOLD) -I. -DJOYSTICK_DAT=$(DATFILE)
--XLDPATH = -L/usr/X11R6/lib
-+CFLAGS = -O2 $(DEBUG) $(THRESHOLD) -I${X11BASE}/include -DJOYSTICK_DAT=$(DATFILE)
-+XLDPATH = -L${X11BASE}/lib
- LDFLAGS = -s
- XLIBS = -lX11
-
-@@ -22,15 +22,16 @@
- OBJS = joystick4doom.o
- XBIN = joystick4xdoom
- SBIN = joystick4sdoom
--PRGS = $(XBIN) $(SBIN)
-+PRGS = $(XBIN)
-
- all: $(PRGS) $(SRCS)
-
- $(XBIN):
- $(CC) -DX11 $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(XBIN) $(XLDPATH) $(XLIBS)
-
--$(SBIN):
-- $(CC) $(CFLAGS) $(LDFLAGS) $(SRCS) -o $(SBIN)
--
- clean:
- $(RM) $(OBJS) $(PRGS)
-+
-+install: ${XBIN}
-+ install -cs ${XBIN} ${PREFIX}/libexec/doom
-+
-diff -ruN ../virgin/joystick4doom/README.FreeBSD ./joystick4doom/README.FreeBSD
---- ../virgin/joystick4doom/README.FreeBSD Wed Dec 31 18:00:00 1969
-+++ ./joystick4doom/README.FreeBSD Tue Dec 10 11:20:58 1996
-@@ -0,0 +1,27 @@
-+Sun Nov 12 23:52:35 PST 1995
-+Hi,
-+
-+The Linux Joystick for doom has been ported to FreeBSD and it is at:
-+rah.star-gate.com:/pub/joystick4doom.tar.gz
-+
-+I have included in the tar file the original FreeBSD joystick.c
-+test program . joystick.c is not part of the original linux's
-+joystick tar distribution.
-+
-+to compile the joystick4doom:
-+
-+ cc -o joystick4doom -I/usr/X11R6/include -DX11 joystick4doom.c -L/usr/X11R6/lib -lX11 -lm
-+
-+now calibrate it:
-+./joystick4doom -c /dev/joy0
-+
-+To run, I use the following command:
-+./joystick4doom /dev/joy0 Control Space
-+
-+Now run xdoom and have a ball 8)
-+
-+ Amancio
-+
-+
-+
-+
-diff -ruN ../virgin/joystick4doom/joystick.c ./joystick4doom/joystick.c
---- ../virgin/joystick4doom/joystick.c Wed Dec 31 18:00:00 1969
-+++ ./joystick4doom/joystick.c Tue Dec 10 11:20:58 1996
-@@ -0,0 +1,320 @@
-+/*
-+ * Joystick test program for FreeBSD
-+ *
-+ * Compile with: cc -o joystick joystick.c -lncurses
-+ *
-+ *
-+ * (C) Copyright 1995 Dave Bodenstab
-+ * All rights reserved.
-+ *
-+ * This program and/or source code may be used or distributed without
-+ * restriction provided this copyright notice is preserved, no fee is
-+ * charged, and this source code is included with any binary distribution.
-+ * Commercial use (i.e. you make money using this software) is prohibited
-+ * without the express written consent of the author. The author may be
-+ * contacted at the following address:
-+ *
-+ * Dave Bodenstab
-+ * 22W451 Oldwoods Drive
-+ * Naperville, Illinois 60565
-+ * USA
-+ */
-+#include <stdio.h>
-+#include <fcntl.h>
-+#include <ncurses.h>
-+#include <machine/joystick.h>
-+
-+const char m_align_ul[] ="Move stick to upper left corner and press a button";
-+const char m_align_lr[] ="Move stick to lower right corner and press a button";
-+const char m_button[] ="Press a button to continue";
-+
-+main( int argc, char **argv )
-+{
-+ int js, x, y, button1, button2;
-+ int xLeft, xRight, yTop, yBotton;
-+ int quitLeftX, quitTopY, quitRightX, quitBottomY;
-+ WINDOW *winMovement, *winButton1Outline, *winButton2Outline, *winButton1, *winButton2, *winQuit;
-+ struct joystick joystick;
-+ char buffer[100];
-+
-+ if ( (js = open("/dev/joy0",O_RDONLY)) == -1 )
-+ {
-+ perror( "/dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ initscr();
-+ curs_set( 0 );
-+ leaveok( stdscr, TRUE );
-+ border( 0, 0, 0, 0, 0, 0, 0, 0 );
-+
-+ /*
-+ * Align the stick...
-+ */
-+ x = (COLS - 2 - strlen( m_align_ul )) / 2;
-+ y = (LINES - 2) / 2;
-+ mvaddstr( y, x, (char*)m_align_ul );
-+ refresh();
-+
-+ for( ; ; napms(100) ) /* Wait for a button press... */
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( joystick.b1 || joystick.b2 )
-+ {
-+ xLeft = joystick.x;
-+ yTop = joystick.y;
-+
-+ /* Wait for the button(s) to be released... */
-+ for( ; ; napms(100) )
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( ! (joystick.b1 || joystick.b2) )
-+ break;
-+ }
-+
-+ break;
-+ }
-+ }
-+
-+ x = (COLS - 2 - strlen( m_align_lr )) / 2;
-+ mvaddstr( y + 1, x, (char*)m_align_lr );
-+ refresh();
-+
-+ for( ; ; napms(100) ) /* Wait for a button press... */
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( joystick.b1 || joystick.b2 )
-+ {
-+ xRight = joystick.x;
-+ yBotton = joystick.y;
-+
-+ /* Wait for the button(s) to be released... */
-+ for( ; ; napms(100) )
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( ! (joystick.b1 || joystick.b2) )
-+ break;
-+ }
-+
-+ break;
-+ }
-+ }
-+
-+ sprintf( buffer, "Upper left = (%d,%d)", xLeft, yTop );
-+ x = (COLS - 2 - strlen( buffer )) / 2;
-+ mvaddstr( y+2, x, buffer );
-+ sprintf( buffer, "Lower right = (%d,%d)", xRight, yBotton );
-+ x = (COLS - 2 - strlen( buffer )) / 2;
-+ mvaddstr( y+3, x, buffer );
-+ x = (COLS - 2 - strlen( m_button )) / 2;
-+ mvaddstr( y+4, x, (char*)m_button );
-+ refresh();
-+
-+ if ( xLeft >= xRight || yTop >= yBotton )
-+ {
-+ endwin();
-+
-+ printf( "The stick cannot be aligned properly. Either you didn't align the\n"
-+ "stick properly in the upper-left and lower-right corners, or your\n"
-+ "hardware is not working.\n" );
-+
-+ exit( 1 );
-+ }
-+
-+ /* Wait for a button press... */
-+ for( ; ; napms(100) )
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( joystick.b1 || joystick.b2 )
-+ {
-+ /* Wait for the button(s) to be released... */
-+ for( ; ; napms(100) )
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( ! (joystick.b1 || joystick.b2) )
-+ break;
-+ }
-+
-+ break;
-+ }
-+ }
-+
-+ /*
-+ * Create the button windows, the movement window, and the QUIT window
-+ */
-+ x = (COLS - 2 - 2*7) / 3;
-+ winButton1Outline = subwin( stdscr, 3, 7, LINES-3, x+1 );
-+ wborder( winButton1Outline, 0, 0, 0, 0, 0, 0, ACS_BTEE, ACS_BTEE );
-+ winButton1 = derwin( winButton1Outline, 1, 5, 1, 1 );
-+
-+ winButton2Outline = subwin( stdscr, 3, 7, LINES-3, COLS-1 - x - 1 - (7 - 1) );
-+ wborder( winButton2Outline, 0, 0, 0, 0, 0, 0, ACS_BTEE, ACS_BTEE );
-+ winButton2 = derwin( winButton2Outline, 1, 5, 1, 1 );
-+
-+ winMovement = subwin( stdscr, LINES-4, COLS-2, 1, 1 );
-+ werase( winMovement );
-+
-+ winQuit = newwin( 5, 10, (LINES-4)/3 - 5/2, (COLS-2)/2 - 10/2 );
-+ getbegyx( winQuit, quitTopY, quitLeftX );
-+ getmaxyx( winQuit, quitBottomY, quitRightX );
-+ quitRightX += quitLeftX - 1;
-+ quitBottomY += quitTopY - 1;
-+ wborder( winQuit, 0, 0, 0, 0, 0, 0, 0, 0 );
-+ mvwaddstr( winQuit, 2, 3, "QUIT" );
-+ overwrite( winQuit, winMovement );
-+
-+ touchwin( stdscr );
-+ refresh();
-+
-+ /*
-+ * Read the joystick, moving an '*' around the movement window. When a
-+ * button is pressed, highlight the corresponding button window. If the
-+ * current position is within the QUIT window and a button is pressed,
-+ * exit the program.
-+ */
-+ button1 = 0;
-+ button2 = 0;
-+ x = (COLS-2) / 2;
-+ y = (LINES-4) / 2;
-+ mvwaddch( winMovement, y, x, '*' );
-+ wrefresh( winMovement );
-+
-+ for( ; ; napms(100) )
-+ {
-+ if ( read(js,&joystick,sizeof(joystick)) != sizeof(joystick) )
-+ {
-+ endwin();
-+ perror( "read /dev/joy0" );
-+ exit( 1 );
-+ }
-+
-+ if ( button1 != joystick.b1 ) /* Check for button 1 */
-+ {
-+ touchwin( winMovement );
-+
-+ switch( button1 = joystick.b1 )
-+ {
-+ case 0:
-+ wattroff( winButton1, A_REVERSE );
-+ break;
-+ case 1:
-+ wattron( winButton1, A_REVERSE );
-+ break;
-+ }
-+
-+ mvwaddstr( winButton1, 0, 0, " " );
-+ wrefresh( winButton1 );
-+ }
-+
-+ if ( button2 != joystick.b2 ) /* Check for button 2 */
-+ {
-+ touchwin( winMovement );
-+
-+ switch( button2 = joystick.b2 )
-+ {
-+ case 0:
-+ wattroff( winButton2, A_REVERSE );
-+ break;
-+ case 1:
-+ wattron( winButton2, A_REVERSE );
-+ break;
-+ }
-+
-+ mvwaddstr( winButton2, 0, 0, " " );
-+ wrefresh( winButton2 );
-+ }
-+
-+ if ( joystick.x != x || joystick.y != y ) /* Check for movement */
-+ {
-+ int nx, ny;
-+
-+ /* Scale the actual coordinates to the nearest character coordinate */
-+ nx = ((joystick.x - xLeft) * (COLS-2 - 1)) / (xRight - xLeft);
-+ if ( nx < 0 )
-+ nx = 0;
-+ else
-+ if ( nx > COLS-2 - 1 )
-+ nx = COLS-2 - 1;
-+
-+ ny = ((joystick.y - yTop) * (LINES-4 - 1)) / (yBotton - yTop);
-+ if ( ny < 0 )
-+ ny = 0;
-+ else
-+ if ( ny > LINES-4 - 1 )
-+ ny = LINES-4 - 1;
-+
-+ if ( x != nx || y != ny ) /* Check for visible movement */
-+ {
-+ mvwaddch( winMovement, y, x, ' ' );
-+
-+ /*
-+ * If the old (x,y) was within the QUIT window, then it must be
-+ * refreshed to restore any character that was overwritten by the
-+ * '*'
-+ */
-+ if ( x+1 >= quitLeftX && x+1 <= quitRightX && y+1 >= quitTopY && y+1 <= quitBottomY )
-+ {
-+ touchwin( stdscr );
-+ overwrite( winQuit, winMovement );
-+ }
-+
-+ mvwaddch( winMovement, y = ny, x = nx, '*' );
-+ wrefresh( winMovement );
-+
-+ /* Show the current coordinates */
-+ sprintf( buffer, "[%3d,%3d]", x, y );
-+ mvaddstr( LINES-2, COLS-1 -3 - strlen(buffer), buffer );
-+ refresh();
-+ }
-+
-+ /*
-+ * If (x,y) is within the QUIT window, then we exit if either button
-+ * is pressed
-+ */
-+ if ( x+1 >= quitLeftX && x+1 <= quitRightX && y+1 >= quitTopY && y+1 <= quitBottomY )
-+ {
-+ if ( button1 || button2 )
-+ break;
-+ }
-+ }
-+ }
-+
-+ endwin();
-+ exit( 0 );
-+}
-diff -ruN ../virgin/joystick4doom/joystick4doom.c ./joystick4doom/joystick4doom.c
---- ../virgin/joystick4doom/joystick4doom.c Wed Dec 14 01:26:42 1994
-+++ ./joystick4doom/joystick4doom.c Tue Dec 10 11:20:58 1996
-@@ -24,7 +24,7 @@
+--- sndserv/linux.c~ Sun Jan 26 08:45:01 1997
++++ sndserv/linux.c Mon Dec 14 21:15:21 1998
+@@ -40,7 +40,7 @@
+ #include <fcntl.h>
#include <unistd.h>
- #include <string.h>
- #include <signal.h>
--
-+#include <machine/joystick.h>
- #ifdef X11
- #define XK_MISCELLANY
- #define XK_LATIN1
-@@ -41,19 +41,19 @@
- #define FALSE 0
- #endif /* X11 */
-
--#include <linux/joystick.h>
-+/*#include <linux/joystick.h> */
-
- #define PIDFILE "/tmp/joystick4doom.pid"
- #ifndef JOYSTICK_DAT
--#define JOYSTICK_DAT "/usr/local/lib/joystick.dat"
-+#define JOYSTICK_DAT "/usr/local/share/doom/joystick.dat"
- #endif
-
- #define PAUSETIME 100000
-
- #define RELEASED 0
- #define PRESSED 1
--#define HOLDDOWN 2
--#define UNPRESSED 3
-+#define HOLDDOWN 1
-+#define UNPRESSED -1
-
- #define FIRST_BUTTON 0
- #define SECOND_BUTTON 1
-@@ -99,13 +99,15 @@
- char *progname;
- int joystick_device;
- char *device_name;
--struct JS_DATA_TYPE js;
-+/*struct JS_DATA_TYPE js; */
-+ struct joystick js;
- int button[2];
- int xpos_left, xpos_middle, xpos_right, xpos_actual;
- int ypos_upper,ypos_middle, ypos_lower, ypos_actual;
- int i,j;
-
- /* Keep track of where the joystick is */
-+#define JS_RETURN 16
- #define CENTERED 0x00
- #define CUTRIGHT 0x01
- #define CUTLEFT 0x02
-@@ -182,9 +184,10 @@
- "left", 0x69, 0xe9,
- };
- #endif /* X11 */
--
-+
- fprintf(stdout, "Joystick4Doom, 1994 by Artsoft Development\n");
--
-+ button[0] = 0;
-+ button[1] = 0;
- /* Kill an existing joystick process if requested */
- if ( (argc == 2) && (strcmp(argv[1], "-k") == 0) ) {
- if ( (pidfile=fopen(PIDFILE, "r")) != NULL ) {
-@@ -300,7 +303,7 @@
-
- for(i=0;i<2;i++)
- {
-- if (button[i]==PRESSED)
-+ if (button[i]==1)
- {
- #ifdef X11
- SendKeyEvent(KeyPress,joykey[key[i]].pressed,joykey[key[i]].key);
-@@ -321,7 +324,7 @@
- #endif
- }
- }
-- if (button[i]==RELEASED)
-+ if (button[i]==0)
- {
- #ifdef X11
- SendKeyEvent(KeyRelease,joykey[key[i]].released,joykey[key[i]].key);
-@@ -492,7 +495,7 @@
- WaitButton();
- xpos_left =js.x;
- ypos_upper=js.y;
-- fprintf(stdout, "xpos_left = %d\nypos_upper = %d\n", js.x, js.y);
-+
-
- fprintf(stdout, "Move joystick to the lower right and press any button!\n");
- WaitButton();
-@@ -524,13 +527,14 @@
- exit(-1);
- }
-
-- for(i=0;i<2;i++)
-- {
-- if (js.buttons & (1<<i))
-- button[i] = (JB_UNPRESSED(i) ? PRESSED : HOLDDOWN);
-- else
-- button[i] = (JB_PRESSED(i) ? RELEASED : UNPRESSED);
-- }
-+ if (button[0] == 0 && js.b1 == 0 ) {
-+ button[0] = -1;
-+ } else button[0]= js.b1;
-+
-+ if (button[1] == 0 && js.b2 == 0 ) {
-+ button[1] = -1;
-+ } else button[1]= js.b2;
-+
-
- xpos_actual=js.x;
- ypos_actual=js.y;
-@@ -583,8 +587,11 @@
- #else
- void SendKeyEvent(char key)
- {
-+
- if ( ioctl(console, TIOCSTI, &key) < 0 )
- perror("ioctl(TIOCSTI)");
- }
- #endif /* X11 */
-+
-+
-Binary files ../virgin/joystick4doom/joystick4sdoom and ./joystick4doom/joystick4sdoom differ
-Binary files ../virgin/joystick4doom/joystick4xdoom and ./joystick4doom/joystick4xdoom differ
-diff -ruN ../virgin/joystick4doom/linux/joystick.h ./joystick4doom/linux/joystick.h
---- ../virgin/joystick4doom/linux/joystick.h Tue Nov 8 02:11:32 1994
-+++ ./joystick4doom/linux/joystick.h Tue Dec 10 11:20:59 1996
-@@ -1,12 +1,11 @@
-
--#include <linux/sched.h>
--#include <linux/errno.h>
--#include <linux/major.h>
--#include <asm/io.h>
-+/*#include <linux/sched.h> */
-+#include <errno.h>
-+/*#include <asm/io.h>
- #include <asm/segment.h>
- #include <asm/system.h>
- #include <linux/module.h>
--
-+*/
- #define JS_RETURN sizeof(struct JS_DATA_TYPE) /*number of bytes returned by js_read*/
- #define JS_TRUE 1
- #define JS_FALSE 0
-diff -ruN ../virgin/joystick4doom/linux/joystick.h~ ./joystick4doom/linux/joystick.h~
---- ../virgin/joystick4doom/linux/joystick.h~ Wed Dec 31 18:00:00 1969
-+++ ./joystick4doom/linux/joystick.h~ Tue Dec 10 11:20:59 1996
-@@ -0,0 +1,58 @@
-+
-+#include <linux/sched.h>
-+#include <linux/errno.h>
-+#include <linux/major.h>
-+#include <asm/io.h>
-+#include <asm/segment.h>
-+#include <asm/system.h>
-+#include <linux/module.h>
-+
-+#define JS_RETURN sizeof(struct JS_DATA_TYPE) /*number of bytes returned by js_read*/
-+#define JS_TRUE 1
-+#define JS_FALSE 0
-+#define JS_PORT 0x201 /*io port for joystick operations*/
-+#define JS_DEF_TIMEOUT 0x1300 /*default timeout value for js_read()*/
-+#define JS_DEF_CORR 0 /*default correction factor*/
-+#define JS_DEF_TIMELIMIT 10L /*default data valid time =10 jiffies == 100ms*/
-+#define JS_X_0 0x01 /*bit mask for x-axis js0*/
-+#define JS_Y_0 0x02 /*bit mask for y-axis js0*/
-+#define JS_X_1 0x04 /*bit mask for x-axis js1*/
-+#define JS_Y_1 0x08 /*bit mask for y-axis js1*/
-+#define JS_MAX 2 /*Max number of joysticks*/
-+#define PIT_MODE 0x43 /*io port for timer 0*/
-+#define PIT_COUNTER_0 0x40 /*io port for timer 0*/
-+#define JS_SET_CAL 0x01 /*ioctl cmd to set joystick correction factor*/
-+#define JS_GET_CAL 0x02 /*ioctl cmd to get joystick correction factor*/
-+#define JS_SET_TIMEOUT 0x03 /*ioctl cmd to set maximum number of iterations
-+ to wait for a timeout*/
-+#define JS_GET_TIMEOUT 0x04 /*as above, to get*/
-+#define JS_SET_TIMELIMIT 0x05 /*set data retention time*/
-+#define JS_GET_TIMELIMIT 0x06 /*get data retention time*/
-+#define JS_GET_ALL 0x07 /*get the whole JS_DATA[minor] struct*/
-+#define JS_SET_ALL 0x08 /*set the whole JS_DATA[minor] struct
-+ except JS_BUSY!*/
-+
-+/*This union is used for the ioctl to set the scaling factor and to return
-+ the current values for a joystick. 'buttons' is ignored on the ioctl call*/
-+
-+struct JS_DATA_TYPE {
-+ int buttons;
-+ int x;
-+ int y;
-+};
-+
-+/* This struct is used for misc data about the joystick*/
-+struct JS_DATA_SAVE_TYPE {
-+ int JS_TIMEOUT; /*timeout*/
-+ int BUSY; /*joystick is in use*/
-+ long JS_EXPIRETIME; /*Time when stick after which stick must be re-read*/
-+ long JS_TIMELIMIT; /*Max time before data is invalid*/
-+ struct JS_DATA_TYPE JS_SAVE; /*last read data*/
-+ struct JS_DATA_TYPE JS_CORR; /*correction factor*/
-+};
-+
-+#define LATCH (1193180L/HZ) /*initial timer 0 value*/
-+#define DELTA_TIME(X,Y) ((X)-(Y)+(((X)>=(Y))?0:LATCH))
-+#define CURRENT_JIFFIES (jiffies)
-+
-+#define JOYSTICK_MAJOR 15
-diff -ruN ../virgin/musserver/Makefile ./musserver/Makefile
---- ../virgin/musserver/Makefile Fri Jul 28 01:30:47 1995
-+++ ./musserver/Makefile Tue Dec 10 11:43:30 1996
-@@ -7,12 +7,12 @@
-
- # Uncomment this line for extra debugging output
- #CFLAGS = -g -DDEBUG -I. -Wall -O2 -m486
--CFLAGS = -g -I. -Wall -O2 -m486
-+CFLAGS = -I. -Wall -O2 -m486
- #CFLAGS = -I. -Wall
- LIBS = -s
-
- INSTALL = install
--DESTDIR = /usr/local/bin
-+DESTDIR = /usr/local/libexec/doom
- SHELL = /bin/sh
-
- #############################################
-@@ -21,16 +21,25 @@
-
- OBJS = musserver.o readwad.o playmus.o sequencer.o
-
--musserver: $(OBJS)
-+musserver.bin: $(OBJS)
- $(CC) $(LIBS) -o $@ $(OBJS)
-
-+musserver.sh: musserver.sh.in
-+ sed "s,@PREFIX@,${PREFIX}," musserver.sh.in >$@
-+
- clean:
-- rm -f $(OBJS) ipc.o ipc musserver
-+ rm -f $(OBJS) ipc.o ipc musserver.bin
-
--all: musserver
-+all: musserver.bin musserver.sh doom-patch
-
- install: all
-- $(INSTALL) musserver $(DESTDIR)
-+ $(INSTALL) -cs musserver.bin $(DESTDIR)
-+ ${INSTALL} -c -m 755 musserver.sh ${DESTDIR}/musserver
-
- ipc: ipc.o
- $(CC) -o $@ ipc.o
-+
-+doom-patch:
-+ zcat doompat.tgz |(cd ../doom-1.8; pax -rv)
-+ @cd ../doom-1.8; ./pat @mus11.pat@xdoom || (/usr/bin/linux; ./pat @mus11.pat@xdoom)
-+ touch doom-patch
-Binary files ../virgin/musserver/musserver and ./musserver/musserver differ
-diff -ruN ../virgin/musserver/musserver.c ./musserver/musserver.c
---- ../virgin/musserver/musserver.c Tue Aug 22 20:50:56 1995
-+++ ./musserver/musserver.c Tue Dec 10 11:20:57 1996
-@@ -28,6 +28,7 @@
- #include <sys/ipc.h>
- #include <sys/msg.h>
- #include "musserver.h"
-+#include <sys/errno.h>
-
- extern int use_synth;
- extern int seqfd;
-diff -ruN ../virgin/musserver/musserver.h ./musserver/musserver.h
---- ../virgin/musserver/musserver.h Wed Aug 9 04:18:00 1995
-+++ ./musserver/musserver.h Tue Dec 10 11:20:57 1996
-@@ -18,7 +18,7 @@
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *************************************************************************/
-
--#include <sys/soundcard.h>
+-#include <linux/soundcard.h>
+#include <machine/soundcard.h>
- struct mus_header { /* header of music lump */
- char id[4];
-diff -ruN ../virgin/musserver/musserver.sh.in ./musserver/musserver.sh.in
---- ../virgin/musserver/musserver.sh.in Wed Dec 31 18:00:00 1969
-+++ ./musserver/musserver.sh.in Tue Dec 10 11:20:57 1996
-@@ -0,0 +1,2 @@
-+#!/bin/sh
-+exec @PREFIX@/libexec/doom/musserver.bin -f $*
-diff -ruN ../virgin/musserver/playmus.c ./musserver/playmus.c
---- ../virgin/musserver/playmus.c Tue Aug 22 20:14:30 1995
-+++ ./musserver/playmus.c Tue Dec 10 11:20:57 1996
-@@ -29,6 +29,7 @@
- #include <string.h>
- #include <ctype.h>
- #include "musserver.h"
-+#include <sys/errno.h>
-
- void seqbuf_dump(void);
- void reset_midi(void);
-@@ -52,6 +53,8 @@
-
- int returnval = 0;
+ #include "soundsrv.h"
-+#define msgbuf mymsg
-+
- static char *doom2names[] = {
- "D_RUNNIN", "D_STALKS", "D_COUNTD", "D_BETWEE", "D_DOOM", "D_THE_DA",
- "D_SHAWN", "D_DDTBLU", "D_IN_CIT", "D_DEAD", "D_STLKS2", "D_THEDA2",
-@@ -152,6 +155,7 @@
- }
- cleanup(1);
- break;
-+#if 0
- case EIDRM:
- if (verbose)
- {
-@@ -160,6 +164,7 @@
- }
- cleanup(1);
- break;
-+#endif
- case EINTR:
- if (verbose)
- printf("Could not receive IPC message: received an interrupt signal\n");
-@@ -172,8 +177,10 @@
- }
- cleanup(1);
- break;
-+#if 0
- case ENOMSG:
- break;
-+#endif
- }
- free(recv);
- }
diff --git a/games/doom/files/patch-ab b/games/doom/files/patch-ab
new file mode 100644
index 000000000000..55f3865ba76c
--- /dev/null
+++ b/games/doom/files/patch-ab
@@ -0,0 +1,14 @@
+--- linuxdoom-1.10/Makefile~ Mon Dec 22 20:55:36 1997
++++ linuxdoom-1.10/Makefile Mon Dec 14 03:20:27 1998
+@@ -6,9 +6,9 @@
+ #
+ CC= gcc # gcc or g++
+
+-CFLAGS=-g -Wall -DNORMALUNIX -DLINUX # -DUSEASM
++CFLAGS=-g -O -I/usr/X11R6/include -Wall -DNORMALUNIX -DSNDSERV -DSNDSRV # -DUSEASM
+ LDFLAGS=-L/usr/X11R6/lib
+-LIBS=-lXext -lX11 -lnsl -lm
++LIBS=-lXext -lX11 -lm
+
+ # subdirectory for objects
+ O=linux
diff --git a/games/doom/files/patch-ac b/games/doom/files/patch-ac
new file mode 100644
index 000000000000..1bce7c6db233
--- /dev/null
+++ b/games/doom/files/patch-ac
@@ -0,0 +1,11 @@
+--- linuxdoom-1.10/i_sound.c~ Mon Dec 22 20:57:15 1997
++++ linuxdoom-1.10/i_sound.c Mon Dec 14 03:22:43 1998
+@@ -42,7 +42,7 @@
+ #include <sys/ioctl.h>
+
+ // Linux voxware output.
+-#include <linux/soundcard.h>
++#include <machine/soundcard.h>
+
+ // Timer stuff. Experimental.
+ #include <time.h>
diff --git a/games/doom/files/patch-ad b/games/doom/files/patch-ad
new file mode 100644
index 000000000000..7fa020ce9223
--- /dev/null
+++ b/games/doom/files/patch-ad
@@ -0,0 +1,11 @@
+--- linuxdoom-1.10/i_video.c~ Mon Dec 22 21:39:01 1997
++++ linuxdoom-1.10/i_video.c Mon Dec 14 03:24:45 1998
+@@ -46,7 +46,7 @@
+ #include <sys/socket.h>
+
+ #include <netinet/in.h>
+-#include <errnos.h>
++#include <errno.h>
+ #include <signal.h>
+
+ #include "doomstat.h"
diff --git a/games/doom/files/patch-ae b/games/doom/files/patch-ae
new file mode 100644
index 000000000000..c6e61a70e106
--- /dev/null
+++ b/games/doom/files/patch-ae
@@ -0,0 +1,26 @@
+--- linuxdoom-1.10/i_net.c~ Mon Dec 22 21:37:46 1997
++++ linuxdoom-1.10/i_net.c Mon Dec 14 03:26:41 1998
+@@ -23,6 +23,7 @@
+ static const char
+ rcsid[] = "$Id: patch-ae,v 1.1.1.1 1998/12/14 21:18:25 jmz Exp $";
+
++#include <sys/types.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdio.h>
+@@ -51,6 +52,7 @@
+
+
+
++#if 0
+ // For some odd reason...
+ #define ntohl(x) \
+ ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
+@@ -64,6 +66,7 @@
+
+ #define htonl(x) ntohl(x)
+ #define htons(x) ntohs(x)
++#endif
+
+ void NetSend (void);
+ boolean NetListen (void);
diff --git a/games/doom/files/patch-af b/games/doom/files/patch-af
new file mode 100644
index 000000000000..c1e24c29b060
--- /dev/null
+++ b/games/doom/files/patch-af
@@ -0,0 +1,11 @@
+--- linuxdoom-1.10/r_data.c~ Mon Dec 22 21:57:47 1997
++++ linuxdoom-1.10/r_data.c Mon Dec 14 03:27:49 1998
+@@ -42,7 +42,7 @@
+ #include "r_sky.h"
+
+ #ifdef LINUX
+-#include <alloca.h>
++//#include <alloca.h>
+ #endif
+
+
diff --git a/games/doom/files/patch-ag b/games/doom/files/patch-ag
new file mode 100644
index 000000000000..872a38f425ce
--- /dev/null
+++ b/games/doom/files/patch-ag
@@ -0,0 +1,11 @@
+--- linuxdoom-1.10/w_wad.c~ Mon Dec 22 22:05:36 1997
++++ linuxdoom-1.10/w_wad.c Mon Dec 14 03:29:18 1998
+@@ -34,7 +34,7 @@
+ #include <malloc.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+-#include <alloca.h>
++//#include <alloca.h>
+ #define O_BINARY 0
+ #endif
+
diff --git a/games/doom/files/patch-ah b/games/doom/files/patch-ah
new file mode 100644
index 000000000000..79e10190498d
--- /dev/null
+++ b/games/doom/files/patch-ah
@@ -0,0 +1,22 @@
+--- linuxdoom-1.10/m_bbox.h~ Mon Dec 22 21:12:16 1997
++++ linuxdoom-1.10/m_bbox.h Mon Dec 14 03:31:32 1998
+@@ -23,7 +23,7 @@
+ #ifndef __M_BBOX__
+ #define __M_BBOX__
+
+-#include <values.h>
++#include <limits.h>
+
+ #include "m_fixed.h"
+
+--- linuxdoom-1.10/doomtype.h~ Mon Dec 22 21:05:27 1997
++++ linuxdoom-1.10/doomtype.h Mon Dec 14 03:31:14 1998
+@@ -39,7 +39,7 @@
+
+ // Predefined with some OS.
+ #ifdef LINUX
+-#include <values.h>
++#include <limits.h>
+ #else
+ #define MAXCHAR ((char)0x7f)
+ #define MAXSHORT ((short)0x7fff)
diff --git a/games/doom/files/patch-ai b/games/doom/files/patch-ai
new file mode 100644
index 000000000000..f42019167834
--- /dev/null
+++ b/games/doom/files/patch-ai
@@ -0,0 +1,8 @@
+--- linuxdoom-1.10/m_bbox.c~ Mon Dec 22 21:40:50 1997
++++ linuxdoom-1.10/m_bbox.c Mon Dec 14 03:44:53 1998
+@@ -1,3 +1,5 @@
++#define MAXINT 0x7fffffff
++#define MININT 0x80000000
+ // Emacs style mode select -*- C++ -*-
+ //-----------------------------------------------------------------------------
+ //
diff --git a/games/doom/pkg-comment b/games/doom/pkg-comment
index c1e4a627207b..faa6eb3de5fb 100644
--- a/games/doom/pkg-comment
+++ b/games/doom/pkg-comment
@@ -1 +1 @@
-Id Software's Doom for linux
+DOOM: the game and the sound server.
diff --git a/games/doom/pkg-descr b/games/doom/pkg-descr
index da31315718a6..becd337cf62f 100644
--- a/games/doom/pkg-descr
+++ b/games/doom/pkg-descr
@@ -1,7 +1,4 @@
-This package contains all of the items you'll need to play DOOM
-under Linux/FreeBSD, except for an X server if you want to use the X
-version. These files are for Linux DOOM version 1.8.
-
-doom1.wad is the shareware DOOM wad for version 1.8. If you have
-DOOM or DOOM II for MS-DOS, then you can use those files instead.
-
+Here it is, at long last. The DOOM source code is released for your
+non-profit use. You still need real DOOM data to work with this code.
+If you don't actually own a real copy of one of the DOOMs, you should
+still be able to find them at software stores.
diff --git a/games/doom/pkg-plist b/games/doom/pkg-plist
index 83df9dc6413d..8f9862bded4b 100644
--- a/games/doom/pkg-plist
+++ b/games/doom/pkg-plist
@@ -1,12 +1,2 @@
bin/doom
-share/doom/doom1.wad
-share/doom/README
-share/doom/README.config
-share/doom/README.linuxx
-libexec/doom/xdoom
-libexec/doom/sndserver
-libexec/doom/musserver.bin
-libexec/doom/musserver
-libexec/doom/joystick4xdoom
-@dirrm share/doom
-@dirrm libexec/doom
+bin/sndserver