aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2014-07-08 14:30:02 +0800
committerdanfe <danfe@FreeBSD.org>2014-07-08 14:30:02 +0800
commitd3f3bdc5f8b96dbd92b4c062d891edfa6b01845e (patch)
tree4df2e09f75fd70a350ad6f29dc30af01e2d02466 /games
parent6becbe70435923fc1e4b5089bd8113daee65ed5d (diff)
downloadfreebsd-ports-gnome-d3f3bdc5f8b96dbd92b4c062d891edfa6b01845e.tar.gz
freebsd-ports-gnome-d3f3bdc5f8b96dbd92b4c062d891edfa6b01845e.tar.zst
freebsd-ports-gnome-d3f3bdc5f8b96dbd92b4c062d891edfa6b01845e.zip
- Stagify the port, modernize LIB_DEPENDS, cleanup a bit
- Remove controversial optimization flags that are not supported by some modern compilers
Diffstat (limited to 'games')
-rw-r--r--games/q2p/Makefile39
-rw-r--r--games/q2p/files/patch-Makefile34
2 files changed, 35 insertions, 38 deletions
diff --git a/games/q2p/Makefile b/games/q2p/Makefile
index ca826c161f2c..54276cf1b50d 100644
--- a/games/q2p/Makefile
+++ b/games/q2p/Makefile
@@ -16,13 +16,13 @@ USE_XORG= xxf86dga xext xxf86vm x11
ALL_TARGET= release
MAKE_ENV= DATADIR="${Q2DIR}" LIBDIR="${LIBDIR}"
-PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
+PLIST_SUB= LIBDIR="${LIBDIR:S|${PREFIX}/||}"
LIBDIR= ${PREFIX}/lib/${PORTNAME}
PORTDOCS= Q2P_readme.txt Ogg_readme.txt
-OPTIONS_DEFINE= CLIENT CTF DEDICATED GAME GLX OPTIMIZED_CFLAGS OSS \
- SDL SDLGL DOCS
+OPTIONS_DEFINE= CLIENT CTF DEDICATED GAME GLX OPTIMIZED_CFLAGS OSS \
+ SDL SDLGL DOCS
OPTIONS_DEFAULT= CLIENT DEDICATED GLX OPTIMIZED_CFLAGS OSS SDL SDLGL
CLIENT_DESC= Build client
@@ -33,13 +33,12 @@ GLX_DESC= Build OpenGL renderer
SDL_DESC= Sound support via SDL
SDLGL_DESC= Build SDL OpenGL renderer
-NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGLX} || ${PORT_OPTIONS:MSDLGL}
+LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ libpng15.so:${PORTSDIR}/graphics/png
USE_GL= glu
-LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg \
- png15:${PORTSDIR}/graphics/png
.endif
.if ${PORT_OPTIONS:MSDL} || ${PORT_OPTIONS:MSDLGL}
@@ -47,7 +46,7 @@ USE_SDL= sdl
.endif
.if ${PORT_OPTIONS:MCLIENT}
-LIB_DEPENDS+= vorbis:${PORTSDIR}/audio/libvorbis
+LIB_DEPENDS+= libvorbis.so:${PORTSDIR}/audio/libvorbis
MAKE_ENV+= BUILD_Q2P=YES
PLIST_SUB+= CLIENT=""
Q2BIN+= ${PORTNAME}
@@ -109,32 +108,32 @@ PLIST_SUB+= SDL="@comment "
post-patch:
# Resolve name collision with jpeg-8
- ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
+ @${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
${WRKSRC}/ref_gl/gl_image.c
do-install:
.for bin in ${Q2BIN}
- ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${bin} ${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${bin} ${STAGEDIR}${PREFIX}/bin
.endfor
- @${MKDIR} ${LIBDIR}/baseq2
+ @${MKDIR} ${STAGEDIR}${LIBDIR}/baseq2
.for ref in ${Q2REF}
- ${INSTALL_PROGRAM} ${WRKSRC}/quake2/vid_${ref}.so ${LIBDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/vid_${ref}.so ${STAGEDIR}${LIBDIR}
.endfor
.for snd in ${Q2SND}
- ${INSTALL_PROGRAM} ${WRKSRC}/quake2/snd_${snd}.so ${LIBDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/snd_${snd}.so ${STAGEDIR}${LIBDIR}
.endfor
.if ${PORT_OPTIONS:MCTF}
- @${MKDIR} ${LIBDIR}/ctf
- ${INSTALL_PROGRAM} ${WRKSRC}/quake2/ctf/game.so ${LIBDIR}/ctf
+ @${MKDIR} ${STAGEDIR}${LIBDIR}/ctf
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/ctf/game.so \
+ ${STAGEDIR}${LIBDIR}/ctf
.endif
.if ${PORT_OPTIONS:MGAME}
- ${INSTALL_PROGRAM} ${WRKSRC}/quake2/baseq2/game.so ${LIBDIR}/baseq2
-.endif
- ${INSTALL_DATA} ${WRKSRC}/data/baseq2/* ${LIBDIR}/baseq2
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/baseq2/game.so \
+ ${STAGEDIR}${LIBDIR}/baseq2
.endif
+ ${INSTALL_DATA} ${WRKSRC}/data/baseq2/* ${STAGEDIR}${LIBDIR}/baseq2
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.mk>
diff --git a/games/q2p/files/patch-Makefile b/games/q2p/files/patch-Makefile
index c5a9b9d05cca..a03001ab490e 100644
--- a/games/q2p/files/patch-Makefile
+++ b/games/q2p/files/patch-Makefile
@@ -9,7 +9,7 @@
MARCH= $(shell uname -m)
OP_SYSTEM= $(shell uname -sr)
-@@ -27,75 +27,75 @@
+@@ -27,75 +27,75 @@ BUILD_RELEASE_DIR:=build_release
# verbose compilation #
# process. #
#===========================#
@@ -100,7 +100,7 @@
ifeq ($(OSTYPE),freebsd)
CD_API=cd_freebsd.c
endif
-@@ -107,22 +107,19 @@
+@@ -107,22 +107,19 @@ endif
# Enable XMMS/Audacious #
# support. Only one of them #
# at same time. #
@@ -127,7 +127,7 @@
CLIENT_DIR=$(MOUNT_DIR)/client
-@@ -133,24 +130,24 @@
+@@ -133,24 +130,24 @@ UNIX_DIR=$(MOUNT_DIR)/unix
GAME_DIR=$(MOUNT_DIR)/game
CTF_DIR=$(MOUNT_DIR)/ctf
@@ -161,28 +161,26 @@
+GAME_NAME=game.$(SHLIB_EXT)
BASE_CFLAGS+=-I$(LOCALBASE)/include \
- -I$(LOCALBASE)/include \
-@@ -168,15 +165,14 @@
+ -I$(X11BASE)/include \
+@@ -168,15 +165,11 @@ RELEASE_CFLAGS+=$(BASE_CFLAGS) \
ifeq ($(strip $(OPTIMIZE)),YES)
RELEASE_CFLAGS+=-O3 \
- -march=$(MARCH) \
-funroll-loops \
-fstrength-reduce \
-- -fexpensive-optimizations \
+ -fexpensive-optimizations \
- -falign-loops=2 \
-+ -fexpensive-optimizations -fomit-frame-pointer -ffast-math
-+ifeq ($(ARCH),i386)
-+ RELEASE_CFLAGS+=-falign-loops=2 \
- -falign-jumps=2 \
- -falign-functions=2
+- -falign-jumps=2 \
+- -falign-functions=2
-else
- RELEASE_CFLAGS+=-O2
-+endif
++ -fomit-frame-pointer \
++ -ffast-math
endif
ifeq ($(strip $(STRIP)),YES)
-@@ -263,7 +259,7 @@
+@@ -263,7 +256,7 @@ ifeq ($(strip $(BUILD_Q2P)),YES)
endif
ifeq ($(strip $(BUILD_DEDICATED)),YES)
@@ -191,7 +189,7 @@
DED_CFLAGS += -DDEDICATED_ONLY
endif
-@@ -292,11 +288,11 @@
+@@ -292,11 +285,11 @@ ifeq ($(strip $(BUILD_SDLGL)),YES)
endif
ifeq ($(strip $(BUILD_GAME)),YES)
@@ -205,7 +203,7 @@
endif
all:
-@@ -585,7 +581,7 @@
+@@ -585,7 +578,7 @@ $(BUILDDIR)/ded/sh_unix.o $(BUILDDIR)/d
$(BUILDDIR)/ded/q_shared.o $(BUILDDIR)/ded/pmove.o \
$(BUILDDIR)/ded/cl_null.o $(BUILDDIR)/ded/cd_null.o
@@ -214,7 +212,7 @@
@echo
@echo "**Built Q2P dedicated client with cflags:"
@echo "$(CC) $(CC_VERSION)";
-@@ -709,7 +705,7 @@
+@@ -709,7 +702,7 @@ $(BUILDDIR)/game/m_parasite.o $(BUILDDIR
$(BUILDDIR)/game/m_tank.o $(BUILDDIR)/game/p_hud.o $(BUILDDIR)/game/p_trail.o \
$(BUILDDIR)/game/p_view.o $(BUILDDIR)/game/p_weapon.o $(BUILDDIR)/game/m_flash.o
@@ -223,7 +221,7 @@
@echo
@echo "**Built $@ with cflags:"
@echo "$(CC) $(CC_VERSION) $(CFLAGS)";
-@@ -784,7 +780,7 @@
+@@ -784,7 +777,7 @@ $(BUILDDIR)/ctf/m_move.o $(BUILDDIR)/
$(BUILDDIR)/ctf/p_menu.o $(BUILDDIR)/ctf/p_trail.o $(BUILDDIR)/ctf/p_view.o \
$(BUILDDIR)/ctf/p_weapon.o $(BUILDDIR)/ctf/q_shared.o
@@ -232,7 +230,7 @@
@echo
@echo "**Built $@ with cflags:"
@echo "$(CC) $(CC_VERSION) $(CFLAGS)";
-@@ -935,4 +931,4 @@
+@@ -935,4 +928,4 @@ bz2:
@tar cjvf $(Q2P_VERSION_BZ2)-$(OSTYPE)-$(DATE).tar.bz2 $(BINDIR)
@printf ".... Done.\n"