Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Nov 2009 01:38:38 GMT
From:      Chris Petrik <chris@officialunix.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/140233: Fix compile for games/doom
Message-ID:  <200911030138.nA31cca4090057@www.freebsd.org>
Resent-Message-ID: <200911030140.nA31e2YZ095331@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         140233
>Category:       ports
>Synopsis:       Fix compile for games/doom
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 03 01:40:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Chris Petrik
>Release:        FreeBSD RC2
>Organization:
Officialunix
>Environment:
FreeBSD RC2
>Description:
Remove some patches as I added them as REINPLACE_
Rename the patches to make them less confusing
Add a hack to replace all %%LOCALBASE%% to ${LOCALBASE}


>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: doom/Makefile
===================================================================
RCS file: /usr/ncvs/ports/games/doom/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- doom/Makefile	19 Sep 2009 11:42:22 -0000	1.37
+++ doom/Makefile	3 Nov 2009 01:37:46 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	doom
 PORTVERSION=	1.10
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_IDSOFTWARE:S|$|source/|}
 DISTNAME=	doomsrc
@@ -30,6 +30,24 @@
 	@cd ${WRKDIR} && ${TAR} xzf linuxdoom-1.10.src.tgz && ${TAR} xzf sndserv.tgz
 
 post-patch:
+	${REINPLACE_CMD} 's|<linux/soundcard.h>|<sys/soundcard.h>|g'\
+			${WRKSRC}/sndserv/linux.c \
+			${WRKSRC}/linuxdoom-1.10/i_sound.c
+	${REINPLACE_CMD} 's|<errnos.h>|<errno.h>|g' \
+			${WRKSRC}/linuxdoom-1.10/i_video.c
+	${REINPLACE_CMD} 's|#include  <alloca.h>|//#include  <alloca.h>|g'\
+			${WRKSRC}/linuxdoom-1.10/r_data.c
+	${REINPLACE_CMD} 's|#include <alloca.h>|//#include <alloca.h>|g'\
+			${WRKSRC}/linuxdoom-1.10/w_wad.c
+	${REINPLACE_CMD} 's|<malloc.c>|<stdlib.h>|g'\
+			${WRKSRC}/linuxdoom-1.10/w_wad.c \
+			${WRKSRC}/sndserv/soundsrv.c \
+			${WRKSRC}/sndserv/wadread.c
+	${REINPLACE_CMD} 's|<values.h>|<limits.h>|g'\
+			${WRKSRC}/linuxdoom-1.10/m_bbox.h \
+			${WRKSRC}/linuxdoom-1.10/doomtype.h
+	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g'\
+			${WRKSRC}/linuxdoom-1.10/Makefile
 	@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} \
 		-E -e 's|#include +<malloc.h>|#include <stdlib.h>|g'
 
Index: doom/files/patch-Makefile
===================================================================
RCS file: doom/files/patch-Makefile
diff -N doom/files/patch-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ doom/files/patch-Makefile	3 Nov 2009 01:15:08 -0000
@@ -0,0 +1,26 @@
+--- linuxdoom-1.10/Makefile.orig	Mon Dec 22 20:55:36 1997
++++ linuxdoom-1.10/Makefile	Fri Oct 28 12:44:09 2005
+@@ -4,11 +4,12 @@
+ #
+ # $Log:$
+ #
+-CC=  gcc  # gcc or g++
++CC?=  gcc  # gcc or g++
+ 
+-CFLAGS=-g -Wall -DNORMALUNIX -DLINUX # -DUSEASM 
+-LDFLAGS=-L/usr/X11R6/lib
+-LIBS=-lXext -lX11 -lnsl -lm
++CFLAGS?= -O
++CFLAGS+=-g -I%%LOCALBASE%%/include -Wall -DNORMALUNIX -DSNDSERV -DSNDSRV # -DUSEASM 
++LDFLAGS=-L%%LOCALBASE%%/lib
++LIBS=-lXext -lX11 -lm
+ 
+ # subdirectory for objects
+ O=linux
+@@ -92,4 +93,4 @@
+ 
+ #############################################################
+ #
+-#############################################################
+\ No newline at end of file
++#############################################################
Index: doom/files/patch-aa
===================================================================
RCS file: doom/files/patch-aa
diff -N doom/files/patch-aa
--- doom/files/patch-aa	24 Jul 2002 12:16:00 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- 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 <linux/soundcard.h>
-+#include <sys/soundcard.h>
- 
- #include "soundsrv.h"
- 
Index: doom/files/patch-ab
===================================================================
RCS file: doom/files/patch-ab
diff -N doom/files/patch-ab
--- doom/files/patch-ab	19 Apr 2008 17:48:56 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
---- linuxdoom-1.10/Makefile.orig	Mon Dec 22 20:55:36 1997
-+++ linuxdoom-1.10/Makefile	Fri Oct 28 12:44:09 2005
-@@ -4,11 +4,12 @@
- #
- # $Log:$
- #
--CC=  gcc  # gcc or g++
-+CC?=  gcc  # gcc or g++
- 
--CFLAGS=-g -Wall -DNORMALUNIX -DLINUX # -DUSEASM 
--LDFLAGS=-L/usr/X11R6/lib
--LIBS=-lXext -lX11 -lnsl -lm
-+CFLAGS?= -O
-+CFLAGS+=-g -I${LOCALBASE}/include -Wall -DNORMALUNIX -DSNDSERV -DSNDSRV # -DUSEASM 
-+LDFLAGS=-L${LOCALBASE}/lib
-+LIBS=-lXext -lX11 -lm
- 
- # subdirectory for objects
- O=linux
-@@ -92,4 +93,4 @@
- 
- #############################################################
- #
--#############################################################
-\ No newline at end of file
-+#############################################################
Index: doom/files/patch-ac
===================================================================
RCS file: doom/files/patch-ac
diff -N doom/files/patch-ac
--- doom/files/patch-ac	24 Jul 2002 12:16:00 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
---- linuxdoom-1.10/i_sound.c.orig	Mon Dec 22 20:57:15 1997
-+++ linuxdoom-1.10/i_sound.c	Wed Feb 10 04:18:53 1999
-@@ -42,7 +42,7 @@
- #include <sys/ioctl.h>
- 
- // Linux voxware output.
--#include <linux/soundcard.h>
-+#include <sys/soundcard.h>
- 
- // Timer stuff. Experimental.
- #include <time.h>
-@@ -740,11 +740,13 @@
- #ifdef SNDSERV
-   char buffer[256];
-   
-+#if jmz
-   if (getenv("DOOMWADDIR"))
-     sprintf(buffer, "%s/%s",
- 	    getenv("DOOMWADDIR"),
- 	    sndserver_filename);
-   else
-+#endif
-     sprintf(buffer, "%s", sndserver_filename);
-   
-   // start sound process
Index: doom/files/patch-ad
===================================================================
RCS file: doom/files/patch-ad
diff -N doom/files/patch-ad
--- doom/files/patch-ad	15 Jan 1999 02:54:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- 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"
Index: doom/files/patch-ae
===================================================================
RCS file: doom/files/patch-ae
diff -N doom/files/patch-ae
--- doom/files/patch-ae	24 Jul 2002 12:16:00 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
---- linuxdoom-1.10/i_net.c~	Mon Dec 22 21:37:46 1997
-+++ linuxdoom-1.10/i_net.c	Mon Jul 22 10:06:25 2002
-@@ -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);
-@@ -73,7 +76,7 @@
- // NETWORKING
- //
- 
--int	DOOMPORT =	(IPPORT_USERRESERVED +0x1d );
-+int	DOOMPORT =	5029;
- 
- int			sendsocket;
- int			insocket;
Index: doom/files/patch-af
===================================================================
RCS file: doom/files/patch-af
diff -N doom/files/patch-af
--- doom/files/patch-af	15 Jan 1999 02:54:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- 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
- 
- 
Index: doom/files/patch-ag
===================================================================
RCS file: doom/files/patch-ag
diff -N doom/files/patch-ag
--- doom/files/patch-ag	10 Oct 2005 11:33:30 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
---- 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
-@@ -32,9 +32,9 @@
- #include <string.h>
- #include <unistd.h>
--#include <malloc.h>
-+#include <stdlib.h>
- #include <fcntl.h>
- #include <sys/stat.h>
--#include <alloca.h>
-+//#include <alloca.h>
- #define O_BINARY		0
- #endif
- 
Index: doom/files/patch-ah
===================================================================
RCS file: doom/files/patch-ah
diff -N doom/files/patch-ah
--- doom/files/patch-ah	15 Jan 1999 02:54:20 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
---- 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)
Index: doom/files/patch-ai
===================================================================
RCS file: doom/files/patch-ai
diff -N doom/files/patch-ai
--- doom/files/patch-ai	15 Jan 1999 02:54:21 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
---- 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++ -*- 
- //-----------------------------------------------------------------------------
- //
Index: doom/files/patch-aj
===================================================================
RCS file: doom/files/patch-aj
diff -N doom/files/patch-aj
--- doom/files/patch-aj	7 Feb 2000 00:53:21 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
---- sndserv/Makefile.orig	Sun Feb  6 16:36:56 2000
-+++ sndserv/Makefile	Sun Feb  6 16:37:13 2000
-@@ -6,8 +6,9 @@
- #
- #
- 
--CC=gcc
--CFLAGS=-O -DNORMALUNIX -DLINUX
-+CC?=gcc
-+CFLAGS?=-O
-+CFLAGS+=-DNORMALUNIX -DLINUX
- LDFLAGS=
- LIBS=-lm
- 
Index: doom/files/patch-i_net.c
===================================================================
RCS file: doom/files/patch-i_net.c
diff -N doom/files/patch-i_net.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ doom/files/patch-i_net.c	3 Nov 2009 01:04:17 -0000
@@ -0,0 +1,35 @@
+--- linuxdoom-1.10/i_net.c~	Mon Dec 22 21:37:46 1997
++++ linuxdoom-1.10/i_net.c	Mon Jul 22 10:06:25 2002
+@@ -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);
+@@ -73,7 +76,7 @@
+ // NETWORKING
+ //
+ 
+-int	DOOMPORT =	(IPPORT_USERRESERVED +0x1d );
++int	DOOMPORT =	5029;
+ 
+ int			sendsocket;
+ int			insocket;
Index: doom/files/patch-i_sound.c
===================================================================
RCS file: doom/files/patch-i_sound.c
diff -N doom/files/patch-i_sound.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ doom/files/patch-i_sound.c	3 Nov 2009 01:05:08 -0000
@@ -0,0 +1,25 @@
+--- linuxdoom-1.10/i_sound.c.orig	Mon Dec 22 20:57:15 1997
++++ linuxdoom-1.10/i_sound.c	Wed Feb 10 04:18:53 1999
+@@ -42,7 +42,7 @@
+ #include <sys/ioctl.h>
+ 
+ // Linux voxware output.
+-#include <linux/soundcard.h>
++#include <sys/soundcard.h>
+ 
+ // Timer stuff. Experimental.
+ #include <time.h>
+@@ -740,11 +740,13 @@
+ #ifdef SNDSERV
+   char buffer[256];
+   
++#if jmz
+   if (getenv("DOOMWADDIR"))
+     sprintf(buffer, "%s/%s",
+ 	    getenv("DOOMWADDIR"),
+ 	    sndserver_filename);
+   else
++#endif
+     sprintf(buffer, "%s", sndserver_filename);
+   
+   // start sound process
Index: doom/files/patch-m_bbox.c
===================================================================
RCS file: doom/files/patch-m_bbox.c
diff -N doom/files/patch-m_bbox.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ doom/files/patch-m_bbox.c	3 Nov 2009 01:06:13 -0000
@@ -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++ -*- 
+ //-----------------------------------------------------------------------------
+ //
Index: doom/files/patch-sndserv-Makefile
===================================================================
RCS file: doom/files/patch-sndserv-Makefile
diff -N doom/files/patch-sndserv-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ doom/files/patch-sndserv-Makefile	3 Nov 2009 01:07:25 -0000
@@ -0,0 +1,14 @@
+--- sndserv/Makefile.orig	Sun Feb  6 16:36:56 2000
++++ sndserv/Makefile	Sun Feb  6 16:37:13 2000
+@@ -6,8 +6,9 @@
+ #
+ #
+ 
+-CC=gcc
+-CFLAGS=-O -DNORMALUNIX -DLINUX
++CC?=gcc
++CFLAGS?=-O
++CFLAGS+=-DNORMALUNIX -DLINUX
+ LDFLAGS=
+ LIBS=-lm
+ 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911030138.nA31cca4090057>