- Update to 1.17

- Unbreak for FreeBSD 5.X

PR:		ports/80584
Submitted by:	Igor Pokrovsky <ip@doom.homeunix.org> (maintainer)
This commit is contained in:
Pav Lucistnik 2005-05-04 12:42:28 +00:00
parent 40b78f6951
commit 79e81fd27d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=134592
14 changed files with 285 additions and 550 deletions

View File

@ -6,15 +6,17 @@
#
PORTNAME= vavoom
PORTVERSION= 1.15.3
PORTVERSION= 1.17
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= v115_${PORTVERSION:E}_src
DISTNAME= v${PORTVERSION:S/.//}_src
MAINTAINER= ip@doom.homeunix.org
COMMENT= Doom, Doom II, Heretic, Hexen and Strife source port
LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
.ifdef (WITH_OPENAL)
LIB_DEPENDS+= openal.0:${PORTSDIR}/audio/openal
.endif
@ -28,17 +30,14 @@ ALL_TARGET= all sv
ONLY_FOR_ARCHS= i386
EXTRACT_AFTER_ARGS= -d ${WRKSRC}
MAKE_ARGS= "USE_SDL=1"
.ifdef (WITH_OPENAL)
MAKE_ARGS= "USE_AL=1"
MAKE_ARGS+= "USE_AL=1"
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 502126
BROKEN= "Does not compile on FreeBSD >= 5.x"
.endif
.ifndef (WITH_OPENAL)
pre-everything::
@${ECHO_CMD} "********************************************************************"
@ -47,8 +46,11 @@ pre-everything::
.endif
post-patch:
cd ${WRKSRC} && ${TR} -d '\r' <${WRKSRC}/fixunix.sh | ${SH}
@${REINPLACE_CMD} -e 's|SDL\/||g' ${WRKSRC}/source/*.cpp
@${REINPLACE_CMD} -i '' -e 's|SDL\/||g' ${WRKSRC}/source/*.cpp
.if ${OSVERSION} >= 502126
@${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/utils/acc/parse.c \
${WRKSRC}/utils/acc/strlist.c
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/Vavoom ${PREFIX}/bin

View File

@ -1,2 +1,2 @@
MD5 (v115_3_src.zip) = ba834b78d74947bc31182009f5c13580
SIZE (v115_3_src.zip) = 4328768
MD5 (v117_src.zip) = 97f4eea73c7cf83a8686e237f52aba9b
SIZE (v117_src.zip) = 4207773

View File

@ -1,118 +1,102 @@
--- Makefile.orig
+++ Makefile
@@ -8,7 +8,7 @@
#DEBUG = 1
# Uncomment to compile using SDL
-#USE_SDL = 1
+USE_SDL = 1
# Uncomment to compile without OpenGL driver
#NOGL = 1
@@ -63,7 +63,7 @@
ifdef USE_SDL
#-- Linux with SDL --
SYS_OBJS = \
- obj/cd_linux.o \
+ obj/cd_bsd.o \
obj/d_sdl.o \
obj/in_sdl.o \
obj/net_bsd.o \
@@ -73,7 +73,7 @@
obj/sys_i386.o \
obj/sys_sdl.o
GL_SYS_OBJ = obj/gl_sdl.o
-LIBS := `sdl-config --libs` -lSDL_mixer -lm -lstdc++
+LIBS := `${SDL_CONFIG} --libs` -lSDL_mixer -lm -lstdc++
else
#-- Linux with Allegro --
SYS_OBJS = \
@@ -213,7 +213,7 @@
ifdef MESAGL
LIBS := -lMesaGL $(LIBS)
else
-LIBS := -lGL $(LIBS)
+LIBS := -lGL -L${X11BASE}/lib $(LIBS)
endif
endif
@@ -317,11 +317,11 @@
# ---------------------------------------
-ARCH ?= -march=pentiumpro
-export ARCH
-C_ARGS = -c -W -Wall $(ARCH) -ffast-math
-CPP_ARGS = -c -W -Wall $(ARCH) -ffast-math
-ASM_ARGS = -c -W -Wall $(ARCH) -x assembler-with-cpp
+#ARCH ?= -march=pentiumpro
+#export ARCH
+C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
+CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
+ASM_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -x assembler-with-cpp
LINK_ARGS = -Wall
ifdef DEBUG
@@ -348,7 +348,7 @@
exe: Vavoom$(EXE)
Vavoom$(EXE): $(OBJ_FILES) $(LIB_FILES)
- gcc $(LINK_ARGS) -o $@ $^ $(LIBS)
+ ${CC} $(LINK_ARGS) -o $@ $^ $(LIBS)
suid:
chown root.root Vavoom
@@ -358,13 +358,13 @@
addr2line -e Vavoom -f < crash.txt >> basev/debug.txt
obj/%.o : source/%.c
- gcc $(C_ARGS) -o $@ $<
+ ${CC} $(C_ARGS) -o $@ $<
obj/%.o : source/%.cpp source/*.h
- gcc $(CPP_ARGS) -o $@ $<
+ ${CC} $(CPP_ARGS) -o $@ $<
obj/%.o : source/%.s source/asm_i386.h
- gcc $(ASM_ARGS) -o $@ $<
+ ${CC} $(ASM_ARGS) -o $@ $<
# ---------------------------------------
@@ -381,16 +381,16 @@
svexe: VavoomSV$(EXE)
VavoomSV$(EXE): $(SV_OBJ_FILES)
- gcc $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS)
+ ${CC} $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS)
obj/sv/%.o : source/%.c
- gcc $(C_ARGS) -DSERVER -o $@ $<
+ ${CC} $(C_ARGS) -DSERVER -o $@ $<
obj/sv/%.o : source/%.cpp source/*.h
- gcc $(CPP_ARGS) -DSERVER -o $@ $<
+ ${CC} $(CPP_ARGS) -DSERVER -o $@ $<
obj/sv/%.o : source/%.s
- gcc $(ASM_ARGS) -DSERVER -o $@ $<
+ ${CC} $(ASM_ARGS) -DSERVER -o $@ $<
# ---------------------------------------
@@ -433,11 +433,11 @@
# ---------------------------------------
ifndef INSTALL
-INSTALL = ginstall
+INSTALL = install -c
endif
ifndef INSTALL_DIR
-INSTALL_DIR = /usr/local/games/Vavoom
+INSTALL_DIR = ${DATADIR}
endif
ifndef INSTALL_GROUP
@@ -529,8 +529,8 @@
asm: $(ASM_FILES)
source/%.asm : source/%.s source/asm_i386.h source/gas2tasm.exe
- gcc -x assembler-with-cpp -E -P -DGAS2TASM $< -o - | source/gas2tasm.exe > $@
+ ${CC} -x assembler-with-cpp -E -P -DGAS2TASM $< -o - | source/gas2tasm.exe > $@
source/gas2tasm.exe : source/gas2tasm.c
- gcc -O3 -ffast-math -fomit-frame-pointer -s -o $@ $<
+ ${CC} -O3 -ffast-math -fomit-frame-pointer -s -o $@ $<
obj/sys_i386.o \
obj/sys_sdl.o
GL_SYS_OBJ = obj/gl_sdl.o
-LIBS := `sdl-config --libs` -lSDL_mixer -lpng -lz -lm -lstdc++
+LIBS := `${SDL_CONFIG} --libs` -lSDL_mixer -lpng -lz -lm -lstdc++
else
#-- Linux with Allegro --
SYS_OBJS = \
@@ -215,7 +215,7 @@
ifdef MESAGL
LIBS := -lMesaGL $(LIBS)
else
-LIBS := -lGL $(LIBS)
+LIBS := -lGL -L${X11BASE}/lib $(LIBS)
endif
endif
@@ -319,11 +319,11 @@
# ---------------------------------------
-ARCH ?= -march=pentiumpro
-export ARCH
-C_ARGS = -c -W -Wall $(ARCH) -ffast-math
-CPP_ARGS = -c -W -Wall $(ARCH) -ffast-math
-ASM_ARGS = -c -W -Wall $(ARCH) -x assembler-with-cpp
+#ARCH ?= -march=pentiumpro
+#export ARCH
+C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
+CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
+ASM_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -x assembler-with-cpp
LINK_ARGS = -Wall
ifdef DEBUG
@@ -350,7 +350,7 @@
exe: Vavoom$(EXE)
Vavoom$(EXE): $(OBJ_FILES) $(LIB_FILES)
- gcc $(LINK_ARGS) -o $@ $^ $(LIBS)
+ ${CC} $(LINK_ARGS) -o $@ $^ $(LIBS)
suid:
chown root.root Vavoom
@@ -360,13 +360,13 @@
addr2line -e Vavoom -f < crash.txt >> basev/debug.txt
obj/%.o : source/%.c
- gcc $(C_ARGS) -o $@ $<
+ ${CC} $(C_ARGS) -o $@ $<
obj/%.o : source/%.cpp source/*.h
- gcc $(CPP_ARGS) -o $@ $<
+ ${CC} $(CPP_ARGS) -o $@ $<
obj/%.o : source/%.s source/asm_i386.h
- gcc $(ASM_ARGS) -o $@ $<
+ ${CC} $(ASM_ARGS) -o $@ $<
# ---------------------------------------
@@ -383,16 +383,16 @@
svexe: VavoomSV$(EXE)
VavoomSV$(EXE): $(SV_OBJ_FILES)
- gcc $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS)
+ ${CC} $(LINK_ARGS) -o $@ $(SV_OBJ_FILES) $(SV_LIBS)
obj/sv/%.o : source/%.c
- gcc $(C_ARGS) -DSERVER -o $@ $<
+ ${CC} $(C_ARGS) -DSERVER -o $@ $<
obj/sv/%.o : source/%.cpp source/*.h
- gcc $(CPP_ARGS) -DSERVER -o $@ $<
+ ${CC} $(CPP_ARGS) -DSERVER -o $@ $<
obj/sv/%.o : source/%.s
- gcc $(ASM_ARGS) -DSERVER -o $@ $<
+ ${CC} $(ASM_ARGS) -DSERVER -o $@ $<
# ---------------------------------------
@@ -439,7 +439,7 @@
endif
ifndef INSTALL_DIR
-INSTALL_DIR = /usr/local/games/Vavoom
+INSTALL_DIR = ${DATADIR}
endif
ifndef INSTALL_GROUP

View File

@ -1,18 +0,0 @@
--- source/asm_i386.h.orig Mon Jan 19 09:45:14 2004
+++ source/asm_i386.h Mon Jan 19 09:46:32 2004
@@ -27,13 +27,13 @@
#define USEASM
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
#define C(label) label // ELF format
#else
#define C(label) _##label // COFF format
#endif
-#if !defined GAS2TASM && (defined DJGPP || defined __linux__)
+#if !defined GAS2TASM && (defined DJGPP || defined __linux__ || defined __FreeBSD__)
#define Align4 .p2align 2
#define Align8 .p2align 3
#define Align16 .p2align 4

View File

@ -1,186 +0,0 @@
--- source/cd_linux.cpp.orig Fri Jan 23 14:59:01 2004
+++ source/cd_linux.cpp Fri Jan 23 14:59:04 2004
@@ -32,7 +32,7 @@
#include <fcntl.h>
#include <time.h>
#include <errno.h>
-#include <linux/cdrom.h>
+#include <sys/cdio.h>
#include "gamedefs.h"
#include "s_local.h"
@@ -137,7 +137,8 @@
void CD_Update(void)
{
guard(CD_Update);
- struct cdrom_subchnl subchnl;
+ struct ioc_read_subchannel subchnl;
+ struct cd_sub_channel_info data;
static time_t lastchk;
if (!cd_started)
@@ -149,15 +150,18 @@
if (playing && lastchk < time(NULL))
{
lastchk = time(NULL) + 2; //two seconds between chks
- subchnl.cdsc_format = CDROM_MSF;
- if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 )
+ subchnl.data = &data;
+ subchnl.data_len = sizeof(data);
+ subchnl.address_format = CD_MSF_FORMAT;
+ subchnl.data_format = CD_CURRENT_POSITION;
+ if (ioctl(cdfile, CDIOCREADSUBCHANNEL, (char*) &subchnl) == -1 )
{
- GCon->Log(NAME_Dev, "ioctl cdromsubchnl failed");
+ GCon->Log(NAME_Dev, "ioctl CDIOCREADSUBCHANNEL failed");
playing = false;
return;
}
- if (subchnl.cdsc_audiostatus != CDROM_AUDIO_PLAY &&
- subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED)
+ if (subchnl.data->header.audio_status != CD_AS_PLAY_IN_PROGRESS &&
+ subchnl.data->header.audio_status != CD_AS_PLAY_PAUSED)
{
playing = false;
if (playLooping)
@@ -337,24 +341,24 @@
static void CD_GetInfo(void)
{
- struct cdrom_tochdr tochdr;
+ struct ioc_toc_header tochdr;
cdValid = false;
- if (ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1)
+ if (ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1)
{
- GCon->Log(NAME_Dev, "ioctl cdromreadtochdr failed");
+ GCon->Log(NAME_Dev, "ioctl CDIOREADTOCHEADER failed");
return;
}
- if (tochdr.cdth_trk0 < 1)
+ if (tochdr.starting_track < 1)
{
GCon->Log(NAME_Dev, "CDAudio: no music tracks");
return;
}
cdValid = true;
- maxTrack = tochdr.cdth_trk1;
+ maxTrack = tochdr.ending_track;
}
//==========================================================================
@@ -365,8 +369,8 @@
static void CD_Play(int track, boolean looping)
{
- struct cdrom_tocentry entry;
- struct cdrom_ti ti;
+ struct ioc_read_toc_single_entry entry;
+ struct ioc_play_track ti;
if (!cdValid)
{
@@ -383,6 +387,7 @@
return;
}
+/*
// don't try to play a non-audio track
entry.cdte_track = track;
entry.cdte_format = CDROM_MSF;
@@ -396,7 +401,7 @@
GCon->Logf("CDAudio: track %d is not audio", track);
return;
}
-
+*/
if (playing)
{
if (playTrack == track)
@@ -404,19 +409,19 @@
CD_Stop();
}
- ti.cdti_trk0 = track;
- ti.cdti_trk1 = track;
- ti.cdti_ind0 = 1;
- ti.cdti_ind1 = 99;
+ ti.start_track = track;
+ ti.end_track = track;
+ ti.start_index = 1;
+ ti.end_index = 99;
- if (ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1)
+ if (ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1)
{
- GCon->Log(NAME_Dev, "ioctl cdromplaytrkind failed");
+ GCon->Log(NAME_Dev, "ioctl CDIOCPLAYTRACKS failed");
return;
}
- if (ioctl(cdfile, CDROMRESUME) == -1)
- GCon->Log(NAME_Dev, "ioctl cdromresume failed");
+ if (ioctl(cdfile, CDIOCRESUME) == -1)
+ GCon->Log(NAME_Dev, "ioctl CDIOCRESUME failed");
playLooping = looping;
playTrack = track;
@@ -434,8 +439,8 @@
if (!playing)
return;
- if (ioctl(cdfile, CDROMPAUSE) == -1)
- GCon->Log(NAME_Dev, "ioctl cdrompause failed");
+ if (ioctl(cdfile, CDIOCPAUSE) == -1)
+ GCon->Log(NAME_Dev, "ioctl CDIOCPAUSE failed");
wasPlaying = playing;
playing = false;
@@ -452,8 +457,8 @@
if (!wasPlaying)
return;
- if (ioctl(cdfile, CDROMRESUME) == -1)
- GCon->Log(NAME_Dev, "ioctl cdromresume failed");
+ if (ioctl(cdfile, CDIOCRESUME) == -1)
+ GCon->Log(NAME_Dev, "ioctl CDIOCRESUME failed");
playing = true;
}
@@ -469,8 +474,8 @@
if (!playing)
return;
- if (ioctl(cdfile, CDROMSTOP) == -1)
- GCon->Log(NAME_Dev, "ioctl cdromstop failed");
+ if (ioctl(cdfile, CDIOCSTOP) == -1)
+ GCon->Log(NAME_Dev, "ioctl CDIOCSTOP failed");
wasPlaying = false;
playing = false;
@@ -484,8 +489,8 @@
static void CD_OpenDoor(void)
{
- if (ioctl(cdfile, CDROMEJECT) == -1)
- GCon->Log(NAME_Dev, "ioctl cdromeject failed");
+ if (ioctl(cdfile, CDIOCEJECT) == -1)
+ GCon->Log(NAME_Dev, "ioctl CDIOCEJECT failed");
}
//==========================================================================
@@ -496,8 +501,8 @@
static void CD_CloseDoor(void)
{
- if (ioctl(cdfile, CDROMCLOSETRAY) == -1)
- GCon->Log(NAME_Dev, "ioctl cdromclosetray failed");
+ if (ioctl(cdfile, CDIOCCLOSE) == -1)
+ GCon->Log(NAME_Dev, "ioctl CDIOCCLOSE failed");
}
//**************************************************************************

View File

@ -1,74 +0,0 @@
--- source/sys_sdl.cpp.orig Wed Jan 21 15:22:13 2004
+++ source/sys_sdl.cpp Wed Jan 21 15:29:23 2004
@@ -45,7 +45,7 @@
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
-#ifdef __i386__
+#if defined(__i386__)
extern "C" {
void Sys_SetFPCW(void);
@@ -61,8 +61,10 @@
// PUBLIC DATA DEFINITIONS -------------------------------------------------
+#ifndef __FreeBSD__
jmp_buf __Context::Env;
const char* __Context::ErrToThrow;
+#endif
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@@ -256,6 +258,7 @@
void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
{
+#ifndef __FreeBSD__
int r;
unsigned long addr;
int psize = getpagesize();
@@ -268,6 +271,7 @@
{
Sys_Error("Protection change failed\n");
}
+#endif
}
//**************************************************************************
@@ -726,6 +730,7 @@
{
signal(s, SIG_IGN); // Ignore future instances of this signal.
+#ifndef __FreeBSD__
switch (s)
{
case SIGABRT:
@@ -756,6 +761,27 @@
__Context::ErrToThrow = "Terminated by signal";
}
longjmp(__Context::Env, 1);
+#else
+ switch (s)
+ {
+ case SIGABRT: throw VavoomError("Abnormal termination triggered by abort call");
+ case SIGFPE: throw VavoomError("Floating Point Exception");
+ case SIGILL: throw VavoomError("Illegal Instruction");
+ case SIGINT: throw VavoomError("Interrupted by User");
+ case SIGSEGV: throw VavoomError("Segmentation Violation");
+ case SIGTERM: throw VavoomError("Software termination signal from kill");
+#ifdef SIGKILL
+ case SIGKILL: throw VavoomError("Killed");
+#endif
+#ifdef SIGQUIT
+ case SIGQUIT: throw VavoomError("Quited");
+#endif
+#ifdef SIGNOFP
+ case SIGNOFP: throw VavoomError("VAVOOM requires a floating-point processor");
+#endif
+ default: throw VavoomError("Terminated by signal");
+ }
+#endif
}
//==========================================================================

View File

@ -0,0 +1,57 @@
--- source/sys_sdl.cpp.orig
+++ source/sys_sdl.cpp
@@ -61,8 +61,8 @@
// PUBLIC DATA DEFINITIONS -------------------------------------------------
-jmp_buf __Context::Env;
-const char* __Context::ErrToThrow;
+//jmp_buf __Context::Env;
+//const char* __Context::ErrToThrow;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@@ -733,33 +733,33 @@
switch (s)
{
case SIGABRT:
- __Context::ErrToThrow = "Aborted";
+ throw VavoomError("Aborted");
break;
case SIGFPE:
- __Context::ErrToThrow = "Floating Point Exception";
+ throw VavoomError("Floating Point Exception");
break;
case SIGILL:
- __Context::ErrToThrow = "Illegal Instruction";
+ throw VavoomError("Illegal Instruction");
break;
case SIGSEGV:
- __Context::ErrToThrow = "Segmentation Violation";
+ throw VavoomError("Segmentation Violation");
break;
case SIGTERM:
- __Context::ErrToThrow = "Terminated";
+ throw VavoomError("Terminated");
break;
case SIGINT:
- __Context::ErrToThrow = "Interrupted by User";
+ throw VavoomError("Interrupted by User");
break;
case SIGKILL:
- __Context::ErrToThrow = "Killed";
+ throw VavoomError("Killed");
break;
case SIGQUIT:
- __Context::ErrToThrow = "Quited";
+ throw VavoomError("Quited");
break;
default:
- __Context::ErrToThrow = "Terminated by signal";
+ throw VavoomError("Terminated by signal");
}
- longjmp(__Context::Env, 1);
+// longjmp(__Context::Env, 1);
}
//==========================================================================

View File

@ -1,21 +1,21 @@
--- utils/acc/Makefile.orig
+++ utils/acc/Makefile
@@ -6,7 +6,7 @@
#LIBS=-lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
OBJS = \
acc.o \
#LIBS=-lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
OBJS = \
acc.o \
@@ -21,7 +21,7 @@
all: ../bin/acc$(EXE)
../bin/acc$(EXE): $(OBJS)
- gcc -s -o $@ $^ $(LIBS)
+ ${CC} -s -o $@ $^ $(LIBS)
%.o : %.c *.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<
all: ../bin/acc$(EXE)
../bin/acc$(EXE): $(OBJS)
- gcc -s -o $@ $^ $(LIBS)
+ ${CC} -s -o $@ $^ $(LIBS)
%.o : %.c *.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<

View File

@ -1,11 +0,0 @@
--- utils/acc/misc.c.orig
+++ utils/acc/misc.c
@@ -12,7 +12,7 @@
#else
#include <fcntl.h>
#include <stdlib.h>
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__FreeBSD__)
#include <io.h>
#endif
#include <sys/stat.h>

View File

@ -1,11 +0,0 @@
--- utils/acc/token.c.orig
+++ utils/acc/token.c
@@ -10,7 +10,7 @@
#ifdef __NeXT__
#include <libc.h>
#else
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__FreeBSD__)
#include <io.h>
#endif
#include <fcntl.h>

View File

@ -1,24 +1,24 @@
--- utils/glbsp/Plugin.mak.orig
+++ utils/glbsp/Plugin.mak
@@ -6,9 +6,9 @@
OUTNAME=libglbsp.a
-CC=gcc
-CFLAGS=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
-AR=ar rc
+#CC=gcc
+CFLAGS+=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
+#AR=ar rc
RANLIB=ranlib
OBJS=$(MAIN)/analyze.o \
OUTNAME=libglbsp.a
-CC=gcc
-CFLAGS=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
-AR=ar rc
+#CC=gcc
+CFLAGS+=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
+#AR=ar rc
RANLIB=ranlib
OBJS=$(MAIN)/analyze.o \
@@ -31,7 +31,7 @@
rm -f $(OUTNAME) $(MAIN)/*.o
$(OUTNAME): $(OBJS)
- $(AR) $(OUTNAME) $(OBJS)
+ $(AR) rc $(OUTNAME) $(OBJS)
$(RANLIB) $(OUTNAME)
.PHONY: all clean
rm -f $(OUTNAME) $(MAIN)/*.o
$(OUTNAME): $(OBJS)
- $(AR) $(OUTNAME) $(OBJS)
+ $(AR) rc $(OUTNAME) $(OBJS)
$(RANLIB) $(OUTNAME)
.PHONY: all clean

View File

@ -1,31 +1,30 @@
--- utils/glvis/Makefile.orig
+++ utils/glvis/Makefile
@@ -6,7 +6,7 @@
LIBS=-lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
LIB_OBJS = cmdlib.o wadlib.o level.o flow.o
OBJS = glvis.o
LIBS += -lm
LIBS=-lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
LIB_OBJS = cmdlib.o wadlib.o level.o flow.o
OBJS = glvis.o
LIBS += -lm
@@ -14,15 +14,15 @@
all: ../bin/glvis$(EXE)
../bin/glvis$(EXE): $(OBJS) libglvis.a
- gcc -s -o $@ $^ $(LIBS)
+ ${CC} -s -o $@ $^ $(LIBS)
libglvis.a: $(LIB_OBJS)
- ar rc $@ $^
+ ${AR} rc $@ $^
ranlib $@
%.o: %.cpp *.h ../common/*.h
- gcc $(CFLAGS) -I../common -c -o $@ $<
+ ${CC} $(CFLAGS) -I../common -c -o $@ $<
%.o: ../common/%.cpp ../common/*.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<
all: ../bin/glvis$(EXE)
../bin/glvis$(EXE): $(OBJS) libglvis.a
- gcc -s -o $@ $^ $(LIBS)
+ ${CC} -s -o $@ $^ $(LIBS)
libglvis.a: $(LIB_OBJS)
ar rc $@ $^
ranlib $@
%.o: %.cpp *.h ../common/*.h
- gcc $(CFLAGS) -I../common -c -o $@ $<
+ ${CC} $(CFLAGS) -I../common -c -o $@ $<
%.o: ../common/%.cpp ../common/*.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<

View File

@ -1,41 +1,34 @@
--- utils/vcc/Makefile.orig
+++ utils/vcc/Makefile
@@ -6,7 +6,7 @@
LIBS=-lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
OBJS = \
cmdlib.o \
@@ -35,19 +35,23 @@
all: ../bin/vcc$(EXE)
-../bin/vcc$(EXE): $(OBJS) vcpp/libcpp.a
- gcc -s -o $@ $^ $(LIBS)
+../bin/vcc$(EXE): $(OBJS) clean_libcpp vcpp/libcpp.a
+ ${CC} -s -o $@ $(OBJS) vcpp/libcpp.a $(LIBS)
+.PHONY: all clean_libcpp
+clean_libcpp:
+ ${RM} -rf vcpp/*.o vcpp/libcpp.a
+
vcpp/libcpp.a: $(CPP_OBJS)
- ar rc $@ $^
+ ${AR} rc $@ $^
ranlib $@
%.o : %.cpp vcc.h ../../source/progdefs.h ../common/cmdlib.h
- gcc $(CFLAGS) -I../common -c -o $@ $<
+ ${CC} $(CFLAGS) -I../common -c -o $@ $<
%.o : ../common/%.cpp ../common/cmdlib.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<
vcpp/%.o : vcpp/%.cpp vcpp/cpp.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<
@@ -8,7 +8,7 @@
#CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
#CFLAGS = -Wall -O2 -ffast-math
-CFLAGS = -Wall -g
+CFLAGS += -Wall -g
OBJS = \
cmdlib.o \
@@ -38,17 +38,17 @@
all: ../bin/vcc$(EXE)
../bin/vcc$(EXE): $(OBJS) vcpp/libcpp.a
- gcc -s -o $@ $^ $(LIBS)
+ ${CC} -s -o $@ $^ $(LIBS)
vcpp/libcpp.a: $(CPP_OBJS)
- ar rc $@ $^
+ ${AR} rc $@ $^
ranlib $@
%.o : %.cpp vcc.h ../../source/progdefs.h ../common/cmdlib.h
- gcc $(CFLAGS) -I../common -c -o $@ $<
+ ${CC} $(CFLAGS) -I../common -c -o $@ $<
%.o : ../common/%.cpp ../common/cmdlib.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<
vcpp/%.o : vcpp/%.cpp vcpp/cpp.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<

View File

@ -1,24 +1,24 @@
--- utils/vlumpy/Makefile.orig
+++ utils/vlumpy/Makefile
@@ -6,17 +6,17 @@
LIBS=-lm -lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
OBJS = cmdlib.o imglib.o scrlib.o wadlib.o vlumpy.o
all: ../bin/vlumpy$(EXE)
../bin/vlumpy$(EXE): $(OBJS)
- gcc -s -o $@ $(OBJS) $(LIBS)
+ ${CC} -s -o $@ $(OBJS) $(LIBS)
%.o: %.cpp ../common/*.h
- gcc $(CFLAGS) -I../common -c -o $@ $<
+ ${CC} $(CFLAGS) -I../common -c -o $@ $<
%.o: ../common/%.cpp ../common/*.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<
LIBS=-lm -lstdc++
endif
-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
+CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
OBJS = cmdlib.o imglib.o scrlib.o wadlib.o vlumpy.o
all: ../bin/vlumpy$(EXE)
../bin/vlumpy$(EXE): $(OBJS)
- gcc -s -o $@ $(OBJS) $(LIBS)
+ ${CC} -s -o $@ $(OBJS) $(LIBS)
%.o: %.cpp ../common/*.h
- gcc $(CFLAGS) -I../common -c -o $@ $<
+ ${CC} $(CFLAGS) -I../common -c -o $@ $<
%.o: ../common/%.cpp ../common/*.h
- gcc $(CFLAGS) -c -o $@ $<
+ ${CC} $(CFLAGS) -c -o $@ $<