diff options
author | alepulver <alepulver@FreeBSD.org> | 2006-05-30 04:54:58 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2006-05-30 04:54:58 +0800 |
commit | 20a3106e293fc0d743b6059e5247d7d5971d9737 (patch) | |
tree | 4a3b10fa6cdccc34331f49057b0f58bfcc6f47e4 /games/tremor | |
parent | 11292926774f4f2096384eba7d36469d07df5125 (diff) | |
download | freebsd-ports-gnome-20a3106e293fc0d743b6059e5247d7d5971d9737.tar.gz freebsd-ports-gnome-20a3106e293fc0d743b6059e5247d7d5971d9737.tar.zst freebsd-ports-gnome-20a3106e293fc0d743b6059e5247d7d5971d9737.zip |
- Fix building on non i386 architectures.
Approved by: garga (mentor, implicitly)
Diffstat (limited to 'games/tremor')
-rw-r--r-- | games/tremor/Makefile | 14 | ||||
-rw-r--r-- | games/tremor/files/patch-Makefile | 58 | ||||
-rw-r--r-- | games/tremor/files/patch-src__r_part.c | 11 |
3 files changed, 57 insertions, 26 deletions
diff --git a/games/tremor/Makefile b/games/tremor/Makefile index 3d4585edea59..4c38d594f4a8 100644 --- a/games/tremor/Makefile +++ b/games/tremor/Makefile @@ -47,9 +47,13 @@ PLIST_SUB+= GOODIES="" PLIST_SUB+= GOODIES="@comment " .endif -.if !defined(WITHOUT_OPTIMIZED_CFLAGS) -MAKE_ENV+= OPTIMIZED_CFLAGS=YES -.endif +.for f in OPTIMIZED_CFLAGS X86_ASM +. if !defined(WITHOUT_${f}) +MAKE_ENV+= USE_${f}=YES +. else +MAKE_ENV+= USE_${f}=NO +. endif +.endfor .if !defined(WITHOUT_SDL) USE_SDL= sdl @@ -66,10 +70,6 @@ PLIST_SUB+= TEXTURES="" PLIST_SUB+= TEXTURES="@comment " .endif -.if !defined(WITHOUT_X86_ASM) -MAKE_ENV+= X86_ASM=YES -.endif - post-extract: @${UNZIP_CMD} -q ${DISTDIR}/${DIST_SUBDIR}/tremor_3.2.4-bin.zip \ base/*.cfg.bak base/tremor0.pak "base/textures/*" -d ${WRKDIR} diff --git a/games/tremor/files/patch-Makefile b/games/tremor/files/patch-Makefile index 2bb7f2ec8dac..2a846d3940b1 100644 --- a/games/tremor/files/patch-Makefile +++ b/games/tremor/files/patch-Makefile @@ -1,5 +1,5 @@ ---- ./Makefile.orig Thu Nov 10 09:57:12 2005 -+++ ./Makefile Tue May 16 14:59:52 2006 +--- Makefile.orig Thu Nov 10 09:57:12 2005 ++++ Makefile Mon May 29 16:46:29 2006 @@ -9,9 +9,9 @@ #
@@ -35,17 +35,11 @@ +CC?=gcc
-BASE_CFLAGS=-Dstricmp=strcasecmp -Did386 -funsigned-char #-Wall
-+BASE_CFLAGS=$(CFLAGS) -I$(LOCALBASE)/include -DDATADIR='"$(Q1DIR)"' -Dstricmp=strcasecmp -funsigned-char #-Wall
-+
-+ifeq ($(ARCH),i386)
-+ ifdef X86_ASM
-+BASE_CFLAGS+=-Did386
-+ endif
-+endif
++BASE_CFLAGS=$(CFLAGS) -I$(LOCALBASE)/include -DDATADIR='"$(Q1DIR)"' -Dstricmp=strcasecmp -funsigned-char
+
+RELEASE_CFLAGS=$(BASE_CFLAGS)
+
-+ifdef OPTIMIZED_CFLAGS
++ifeq ($(strip $(USE_OPTIMIZED_CFLAGS)),YES)
+RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops \
+ -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing
+endif
@@ -55,23 +49,32 @@ -
DEBUG_CFLAGS=$(BASE_CFLAGS) -g
++LDFLAGS+=-L$(LOCALBASE)/lib -lm
-LDFLAGS=-lm -ldl
-+LDFLAGS+=-L$(LOCALBASE)/lib -lm
++ifeq ($(ARCH),i386)
++USE_X86_ASM ?= YES
++else
++USE_X86_ASM = NO
++endif
- ifeq ($(strip $(BUILD_SDL)),YES)
+-ifeq ($(strip $(BUILD_SDL)),YES)
- LDFLAGS += \
- -lSDL
- BASE_CFLAGS += \
- -D_SDL_FIX -D_SDL_BIN
+- BASE_CFLAGS += \
+- -D_SDL_FIX -D_SDL_BIN
++ifeq ($(strip $(USE_X86_ASM)),YES)
++BASE_CFLAGS+=-Did386
endif
ifeq ($(strip $(BUILD_SDL)),YES)
-SDLCFLAGS=$(shell sdl-config --cflags)
-SDLLDFLAGS=$(shell sdl-config --libs)
-+SDLCFLAGS=$(shell $(SDL_CONFIG) --cflags)
-+SDLLDFLAGS=$(shell $(SDL_CONFIG) --libs)
++ BASE_CFLAGS += \
++ -D_SDL_FIX -D_SDL_BIN
++ SDLCFLAGS=$(shell $(SDL_CONFIG) --cflags)
++ SDLLDFLAGS=$(shell $(SDL_CONFIG) --libs)
endif
-GLLDFLAGS=-L/usr/X11R6/lib -L/usr/lib -L/usr/local/lib -lGL -lGLU -lX11 -lXext -ldl -lXxf86dga -lXxf86vm -lm -lpng -lz -ljpeg
@@ -90,11 +93,28 @@ ifeq ($(strip $(BUILD_SDL)),YES)
- TARGETS +=$(BUILDDIR)/tremor-sdl.glx
-+ TARGETS +=$(BUILDDIR)/tremor-sdl
++ TARGETS += $(BUILDDIR)/tremor-sdl
endif
all:
-@@ -183,10 +187,10 @@ +@@ -166,11 +170,14 @@ + $(BUILDDIR)/glquake/sys_linux.o \
+ $(BUILDDIR)/glquake/snd_dma.o \
+ $(BUILDDIR)/glquake/snd_mem.o \
+- $(BUILDDIR)/glquake/snd_mix.o \
+- \
++ $(BUILDDIR)/glquake/snd_mix.o
++
++ifeq ($(strip $(USE_X86_ASM)),YES)
++GLQUAKE_OBJS+= \
+ $(BUILDDIR)/glquake/math.o \
+ $(BUILDDIR)/glquake/snd_mixa.o \
+ $(BUILDDIR)/glquake/sys_x86.o
++endif
+
+ GLQUAKE_LNX_OBJS = \
+ $(BUILDDIR)/glquake/cd_linux.o \
+@@ -183,10 +190,10 @@ GLX_OBJS=$(BUILDDIR)/glquake/vid_glx.o \
$(BUILDDIR)/glquake/vid_common_gl.o
@@ -107,7 +127,7 @@ $(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(GLQUAKE_SDL_OBJS) $(GLX_OBJS) $(GLLDFLAGS) $(LDFLAGS) $(SDLLDFLAGS)
$(BUILDDIR)/glquake/cl_demo.o : $(MOUNT_DIR)/cl_demo.c
-@@ -395,4 +399,4 @@ +@@ -395,4 +402,4 @@ $(GLX_OBJS) \
$(GLQUAKE_LNX_OBJS) \
$(GLQUAKE_SDL_OBJS)
diff --git a/games/tremor/files/patch-src__r_part.c b/games/tremor/files/patch-src__r_part.c new file mode 100644 index 000000000000..bc558933b4b3 --- /dev/null +++ b/games/tremor/files/patch-src__r_part.c @@ -0,0 +1,11 @@ +--- src/r_part.c.orig Fri Mar 25 17:50:30 2005 ++++ src/r_part.c Mon May 29 17:46:46 2006 +@@ -59,7 +59,7 @@ + + vec3_t r_pright, r_pup, r_ppn; + +-#if !id386 ++#if 0 + + /* + ============== |