ports/186966: [PATCH] games/doomlegacy: Add an option to disable IPX support
Steve Wills
swills at FreeBSD.org
Sun Feb 23 00:00:01 UTC 2014
>Number: 186966
>Category: ports
>Synopsis: [PATCH] games/doomlegacy: Add an option to disable IPX support
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 23 00:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Steve Wills
>Release: FreeBSD 11.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD meatwad.mouf.net 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r260369M: Sat Jan 18 14:51:04 UTC
>Description:
- Add an option to disable IPX support
For those who have removed it from base via WITHOUT_IPX in src.conf
Port maintainer (danfe at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 1.00.2014.02.11 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:
--- doomlegacy-1.44.a4.patch begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 345682)
+++ Makefile (working copy)
@@ -31,8 +31,10 @@
SVN_REV= 999
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= DOCS IPX
OPTIONS_DEFINE_i386= ASM
+OPTIONS_DEFAULT= IPX
+IPX_DESC= Support for IPX networking
NO_STAGE= yes
.include <bsd.port.options.mk>
@@ -42,6 +44,12 @@
MAKE_ENV= USEASM=1 OLD_DEPENDENCIES=1
.endif
+.if ${PORT_OPTIONS:MIPX}
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Makefile-ipx
+.else
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-Makefile-noipx
+.endif
+
post-patch: .SILENT
${REINPLACE_CMD} -e 's|<malloc|<stdlib|' ${WRKSRC}/p_setup.c \
${WRKSRC}/r_data.c ${WRKSRC}/w_wad.c
@@ -58,6 +66,10 @@
${REINPLACE_CMD} -e "s|s\[0\] ==[^)]*|strchr(s, '/')|" \
${WRKSRC}/d_main.c
${RM} ${WRKSRC}/_doc/LICENSE.txt
+.if ! ${PORT_OPTIONS:MIPX}
+ ${REINPLACE_CMD} -e 's,#define USE_IPX,// #define USE_IPX,' \
+ ${WRKSRC}/doomdef.h
+.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/../bin/doomlegacy ${PREFIX}/bin
Index: files/extra-patch-Makefile-noipx
===================================================================
--- files/extra-patch-Makefile-noipx (revision 0)
+++ files/extra-patch-Makefile-noipx (working copy)
@@ -0,0 +1,88 @@
+--- Makefile.orig 2012-07-03 19:19:51.000000000 +0000
++++ Makefile 2014-02-22 19:09:41.243466020 +0000
+@@ -84,7 +84,7 @@
+ # std=c89, does not support // commments, no inline, no asm
+
+ # gcc or g++
+-CC=gcc
++CC?=gcc
+ ifdef CC_WATCOM
+ CC=WATCOMC
+ endif
+@@ -135,7 +135,7 @@
+ LIBS := -lopengl32 -lglu32 -lwsock32 -lm
+ else
+ # default is Linux, for all unix SDL
+- OPTS := -DLINUX
++ OPTS := -DLINUX -DFREEBSD
+ LDFLAGS=-L/usr/X11R6/lib
+ LIBS := -lGL -lGLU -lm
+ # -L/usr/X11R6/lib is needed by Linux 2.4 and others that still have
+@@ -267,7 +267,7 @@
+ ifdef X
+ OPTS := $(OPTS) $(POLL_POINTER) -I. -I/usr/X11R6/include
+ LDFLAGS=-L/usr/X11R6/lib
+- LIBS=-lXext -lX11 -lm -lXxf86vm -lipx -lkvm -pthread
++ LIBS=-lXext -lX11 -lm -lXxf86vm -lkvm -pthread
+ # name of the exefile
+ EXENAME=llxdoom
+ SFLAGS=-g $(OPTS)
+@@ -275,7 +275,7 @@
+ else #ifdef X
+ OPTS := $(OPTS) -DVID_GGI -I. -I/usr/local/include
+ LDFLAGS=
+- LIBS=-lggi -lm -lipx
++ LIBS=-lggi -lm
+ # name of the exefile
+ EXENAME=llggidoom
+ SFLAGS=-g $(OPTS)
+@@ -392,7 +392,7 @@
+ endif
+
+ # compiler and linker flags
+-CFLAGS = $(WFLAGS)
++#CFLAGS = $(WFLAGS)
+
+ ifdef PROFILEMODE
+ # build with gprof profiling information
+@@ -405,7 +405,7 @@
+ else
+ # build a normal optimized version
+ #CFLAGS += -O3
+- CFLAGS += $(OPTLEV) -fomit-frame-pointer
++ #CFLAGS += $(OPTLEV) -fomit-frame-pointer
+ endif
+ endif
+
+@@ -583,7 +583,7 @@
+
+ # executable
+ $(BIN)/$(EXENAME): $(O) $(OBJS) $(MAINOBJ) versionstring
+-# @mkdir $(BIN)
++ @mkdir -p $(BIN)
+ @echo Linking...
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(MAINOBJ) \
+ -o $(BIN)/$(EXENAME) $(LIBS)
+@@ -651,7 +651,7 @@
+ ../dep/main2.dep : i*.c m*.c p*.c
+ ../dep/main3.dep : q*.c r*.c s*.c t*.c v*.c z*.c
+ # none: e*.c j*.c k*.c l*.c n*.c o*.c
+-../dep/hardware.dep : hardware/*.c hardware/*/*.c
++../dep/hardware.dep : hardware/*.c hardware/r_opengl/*.c
+ # $(INTERFACE).dep : $(INTERFACE)/*.c
+ ../dep/djgppdos.dep : djgppdos/*.c
+ ../dep/linux_x.dep : linux_x/*.c linux_x/musserv/*.c linux_x/sndserv/*.c
+@@ -673,11 +673,10 @@
+ ../dep :
+ @mkdir ../dep;
+
+-%.dep :
++%.dep : ../dep
+ @echo "Making dependencies $(@F)"
+- if test ! -d ../dep; then mkdir ../dep; fi
+ $(CC) $(CFLAGS) -MM $^ > ../dep/$(@F)
+- sed --separate -e "s@^[a-zA-Z0-9_]*.o:@\$$(O)/&@" ../dep/$(@F) > sed.dep
++ sed -e "s@^[a-zA-Z0-9_]*.o:@\$$(O)/&@" ../dep/$(@F) > sed.dep
+ mv sed.dep ../dep/$(@F)
+ endif
+
Property changes on: files/extra-patch-Makefile-noipx
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Index: files/patch-Makefile
===================================================================
--- files/patch-Makefile (revision 345682)
+++ files/patch-Makefile (working copy)
@@ -1,73 +0,0 @@
---- Makefile.orig
-+++ Makefile
-@@ -84,7 +84,7 @@
- # std=c89, does not support // commments, no inline, no asm
-
- # gcc or g++
--CC=gcc
-+CC?=gcc
- ifdef CC_WATCOM
- CC=WATCOMC
- endif
-@@ -135,9 +135,9 @@
- LIBS := -lopengl32 -lglu32 -lwsock32 -lm
- else
- # default is Linux, for all unix SDL
-- OPTS := -DLINUX
-+ OPTS := -DLINUX -DFREEBSD
- LDFLAGS=-L/usr/X11R6/lib
-- LIBS := -lGL -lGLU -lm
-+ LIBS := -lGL -lGLU -lm -lipx
- # -L/usr/X11R6/lib is needed by Linux 2.4 and others that still have
- # the GLU libraries in an X11 directory.
- # -lm is needed for pow, powf, and other MATH1 functions.
-@@ -392,7 +392,7 @@
- endif
-
- # compiler and linker flags
--CFLAGS = $(WFLAGS)
-+#CFLAGS = $(WFLAGS)
-
- ifdef PROFILEMODE
- # build with gprof profiling information
-@@ -405,7 +405,7 @@
- else
- # build a normal optimized version
- #CFLAGS += -O3
-- CFLAGS += $(OPTLEV) -fomit-frame-pointer
-+ #CFLAGS += $(OPTLEV) -fomit-frame-pointer
- endif
- endif
-
-@@ -583,7 +583,7 @@
-
- # executable
- $(BIN)/$(EXENAME): $(O) $(OBJS) $(MAINOBJ) versionstring
--# @mkdir $(BIN)
-+ @mkdir -p $(BIN)
- @echo Linking...
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(MAINOBJ) \
- -o $(BIN)/$(EXENAME) $(LIBS)
-@@ -651,7 +651,7 @@
- ../dep/main2.dep : i*.c m*.c p*.c
- ../dep/main3.dep : q*.c r*.c s*.c t*.c v*.c z*.c
- # none: e*.c j*.c k*.c l*.c n*.c o*.c
--../dep/hardware.dep : hardware/*.c hardware/*/*.c
-+../dep/hardware.dep : hardware/*.c hardware/r_opengl/*.c
- # $(INTERFACE).dep : $(INTERFACE)/*.c
- ../dep/djgppdos.dep : djgppdos/*.c
- ../dep/linux_x.dep : linux_x/*.c linux_x/musserv/*.c linux_x/sndserv/*.c
-@@ -673,11 +673,10 @@
- ../dep :
- @mkdir ../dep;
-
--%.dep :
-+%.dep : ../dep
- @echo "Making dependencies $(@F)"
-- if test ! -d ../dep; then mkdir ../dep; fi
- $(CC) $(CFLAGS) -MM $^ > ../dep/$(@F)
-- sed --separate -e "s@^[a-zA-Z0-9_]*.o:@\$$(O)/&@" ../dep/$(@F) > sed.dep
-+ sed -e "s@^[a-zA-Z0-9_]*.o:@\$$(O)/&@" ../dep/$(@F) > sed.dep
- mv sed.dep ../dep/$(@F)
- endif
-
--- doomlegacy-1.44.a4.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list