1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

- Fix build with clang on i386 arches [1]

- Support STAGEDIR

Reported by:	swills [1]
This commit is contained in:
Alex Kozlov 2014-05-23 04:15:41 +00:00
parent 813e908e87
commit d256cee350
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354909
3 changed files with 24 additions and 30 deletions

View File

@ -12,5 +12,4 @@ MASTERDIR= ${.CURDIR}/../${PORTNAME}
IOQ3= SERVER GAMELIBS
NO_STAGE= yes
.include "${MASTERDIR}/Makefile"

View File

@ -14,7 +14,6 @@ COMMENT?= Cleaned-up and enhanced version of Quake 3
USES= pkgconfig gmake
NO_STAGE= yes
# Port configuration flags:
# CLIENT SERVER TOOLS DLRENDERER GAMELIBS OPUS OPENGL2
IOQ3?= CLIENT TOOLS GAMELIBS
@ -226,18 +225,13 @@ PLIST_FILES+= ${inst:C/.*;//}
# Generate install target
do-install: ${Q3INSTALL}
.for dir in ${PLIST_DIRS}
${MKDIR} ${PREFIX}/${dir}
@${MKDIR} ${STAGEDIR}${PREFIX}/${dir}
.endfor
.for inst in ${IOQ3_INST}
${INSTALL_${inst:C/;.*//}} ${BUILDDIR}/${inst:C/[^;]*;//:C/;.*//} \
${PREFIX}/${inst:C/.*;//}
${STAGEDIR}${PREFIX}/${inst:C/.*;//}
.endfor
post-install:
@${JOT} -s '' -b= 78
@${CAT} ${PKGMESSAGE}
@${JOT} -s '' -b= 78
.if !defined(Q3TOTALCONV)
.include "${.CURDIR}/../quake3-data/Makefile.include"
.endif

View File

@ -1,5 +1,4 @@
--- Makefile.orig 2009-04-22 20:54:48.000000000 +0200
+++ Makefile 2011-11-04 20:42:56.000000000 +0100
Index: Makefile
@@ -187,6 +187,8 @@
# FIXME: introduce CLIENT_CFLAGS
SDL_CFLAGS=$(shell pkg-config --cflags sdl|sed 's/-Dmain=SDL_main//')
@ -9,7 +8,7 @@
endif
# version info
@@ -521,44 +523,25 @@
@@ -521,44 +523,30 @@
ifeq ($(PLATFORM),freebsd)
@ -39,16 +38,6 @@
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -ffast-math -funroll-loops \
- -fomit-frame-pointer -fexpensive-optimizations
- else
- ifeq ($(ARCH),i386)
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
- -march=pentium -fomit-frame-pointer -pipe -ffast-math \
- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
- -funroll-loops -fstrength-reduce
- HAVE_VM_COMPILED=true
- else
- BASE_CFLAGS += -DNO_VM_COMPILED
- endif
- endif
+ ifndef HOMEPATH
+ HOMEPATH = /.ioquake3
+ endif
@ -64,7 +53,19 @@
+ -DDEFAULT_LIBDIR=\\\"$(DEFAULT_LIBDIR)\\\" \
+ -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
+ CLIENT_CFLAGS += $(SDL_CFLAGS)
+ HAVE_VM_COMPILED = true
+ # disable vm on i386
ifeq ($(ARCH),i386)
- RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
- -march=pentium -fomit-frame-pointer -pipe -ffast-math \
- -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
- -funroll-loops -fstrength-reduce
- HAVE_VM_COMPILED=true
+ BASE_CFLAGS += -DNO_VM_COMPILED
else
- BASE_CFLAGS += -DNO_VM_COMPILED
- endif
+ HAVE_VM_COMPILED = true
endif
- DEBUG_CFLAGS=$(BASE_CFLAGS) -g
+ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
@ -72,7 +73,7 @@
SHLIBEXT=so
SHLIBCFLAGS=-fPIC
@@ -568,20 +551,52 @@
@@ -568,20 +556,52 @@
# don't need -ldl (FreeBSD)
LIBS=-lm
@ -107,8 +108,8 @@
+ ifneq ($(USE_LOCAL_HEADERS),1)
+ CLIENT_CFLAGS += $(VORBIS_CFLAGS)
+ endif
endif
+ endif
+
+ ifeq ($(BUILD_CLIENT),1)
+ BASE_CFLAGS += $(CLIENT_CFLAGS)
+ endif
@ -123,15 +124,15 @@
+ ifeq ($(CROSS_COMPILING),1)
+ BASE_CFLAGS += -m64
+ endif
+ endif
+
endif
+ RELEASE_CFLAGS = $(BASE_CFLAGS)
+ DEBUG_CFLAGS = $(BASE_CFLAGS) -g
+
else # ifeq freebsd
#############################################################################
@@ -1442,6 +1457,9 @@
@@ -1442,6 +1462,9 @@
ifeq ($(ARCH),x86_64)
Q3OBJ += $(B)/client/vm_x86_64.o $(B)/client/vm_x86_64_assembler.o
endif
@ -141,7 +142,7 @@
ifeq ($(ARCH),ppc)
Q3OBJ += $(B)/client/vm_powerpc.o $(B)/client/vm_powerpc_asm.o
endif
@@ -1591,6 +1609,9 @@
@@ -1591,6 +1614,9 @@
ifeq ($(ARCH),x86_64)
Q3DOBJ += $(B)/ded/vm_x86_64.o $(B)/ded/vm_x86_64_assembler.o
endif