From dee3d7419b14c15240ff8704f0bd3c7b2e20d53e Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Sun, 13 Apr 2014 12:47:12 +0000 Subject: [PATCH] - Add staging support - Convert to new LIB_DEPENDS format - Use options helpers, subs - Fix linking with clang (fixes build on 10+) MFH: 2014Q2 --- games/ezquake/Makefile | 38 ++++++++++++------------------ games/ezquake/files/patch-Makefile | 13 ++++++++-- games/ezquake/pkg-plist | 2 +- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/games/ezquake/Makefile b/games/ezquake/Makefile index a46dad1a7b2a..4b610484ff84 100644 --- a/games/ezquake/Makefile +++ b/games/ezquake/Makefile @@ -18,9 +18,9 @@ COMMENT= Modern QuakeWorld client EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip \ 7z:${PORTSDIR}/archivers/p7zip -LIB_DEPENDS= expat.6:${PORTSDIR}/textproc/expat2 \ - pcre.3:${PORTSDIR}/devel/pcre \ - png15:${PORTSDIR}/graphics/png +LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \ + libpcre.so:${PORTSDIR}/devel/pcre \ + libpng15.so:${PORTSDIR}/graphics/png USES= gmake tcl dos2unix DOS2UNIX_GLOB= *.[ch] Makefile* @@ -35,31 +35,25 @@ OPTIONS_MULTI= OUTPUT OPTIONS_MULTI_OUTPUT= X11 OPENGL OPTIONS_DEFINE= OPTIMIZED_CFLAGS OPTIONS_DEFAULT= OPENGL X11 OPTIMIZED_CFLAGS +OPTIONS_SUB= yes + +OPENGL_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg +OPENGL_USE= GL=yes + +X11_USE= XORG=xxf86dga + +BROKEN_powerpc= Does not install on powerpc: signal 2 -NO_STAGE= yes .include "${.CURDIR}/../quake-data/Makefile.include" .include -.if ${ARCH} == "powerpc" -BROKEN= Does not install on powerpc: signal 2 -.endif - .if ${PORT_OPTIONS:MOPENGL} -LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg -USE_GL= yes ALL_TARGET+= glx -PLIST_SUB+= GLX="" -.else -PLIST_SUB+= GLX="@comment " .endif .if ${PORT_OPTIONS:MX11} -USE_XORG= xxf86dga ALL_TARGET+= x11 -PLIST_SUB+= X11="" -.else -PLIST_SUB+= X11="@comment " .endif .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} @@ -81,17 +75,15 @@ post-patch: ${WRKSRC}/embed_tcl.h do-install: -.for dir in ezquake qw - ${MKDIR} ${DATADIR}/${dir} - ${CP} -r ${WRKDIR}/${dir}/* ${DATADIR}/${dir} -.endfor + @${MKDIR} ${STAGEDIR}${DATADIR} + (cd ${WRKDIR} && ${COPYTREE_SHARE} "ezquake qw" ${STAGEDIR}${DATADIR}) .if ${PORT_OPTIONS:MOPENGL} ${INSTALL_PROGRAM} ${WRKSRC}/release/ezquake-gl.glx \ - ${PREFIX}/bin/ezquake-glx + ${STAGEDIR}${PREFIX}/bin/ezquake-glx .endif .if ${PORT_OPTIONS:MX11} ${INSTALL_PROGRAM} ${WRKSRC}/release/ezquake.x11 \ - ${PREFIX}/bin/ezquake-x11 + ${STAGEDIR}${PREFIX}/bin/ezquake-x11 .endif .include diff --git a/games/ezquake/files/patch-Makefile b/games/ezquake/files/patch-Makefile index 0a277a1d1a30..688c4222c643 100644 --- a/games/ezquake/files/patch-Makefile +++ b/games/ezquake/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 2008-04-27 17:51:52.000000000 -0300 -+++ Makefile 2008-04-29 22:27:42.000000000 -0300 +--- Makefile.orig 2014-04-13 13:48:18.000000000 +0200 ++++ Makefile 2014-04-13 13:49:38.000000000 +0200 @@ -6,7 +6,7 @@ # compilation tool and detection of targets/achitecture @@ -93,3 +93,12 @@ ifeq ($(OS),freebsd) X11BASE ?= /usr/X11R6 +@@ -149,7 +141,7 @@ + GLX_C_OBJS = $(addprefix $(GLX_DIR)/, $(addsuffix .o, $(GLX_C_FILES))) + GLX_S_OBJS = $(addprefix $(GLX_DIR)/, $(addsuffix .o, $(GLX_S_FILES))) + GLX_CFLAGS = $(CFLAGS) $(GLCFLAGS) +-GLX_LDFLAGS = $(LDFLAGS) -lGL -lXxf86dga -lXxf86vm ++GLX_LDFLAGS = $(LDFLAGS) -lGL -lXxf86dga -lXxf86vm -lX11 + + glx: _DIR = $(GLX_DIR) + glx: _OBJS = $(GLX_C_OBJS) $(GLX_S_OBJS) $(COMMON_LIBS) $(GL_LIBS) diff --git a/games/ezquake/pkg-plist b/games/ezquake/pkg-plist index 7b49c0688bf8..d93554e70ffb 100644 --- a/games/ezquake/pkg-plist +++ b/games/ezquake/pkg-plist @@ -1,4 +1,4 @@ -%%GLX%%bin/ezquake-glx +%%OPENGL%%bin/ezquake-glx %%X11%%bin/ezquake-x11 %%DATADIR%%/ezquake/cfg/cams.cfg %%DATADIR%%/ezquake/cfg/cams.tcl