aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2015-05-07 04:38:19 +0800
committermakc <makc@FreeBSD.org>2015-05-07 04:38:19 +0800
commitcfe17d045087c06f751fca22eb3a38021ec211ec (patch)
tree7f27dba43909200dcba3ee6d76f14e6e03d16cc5 /games
parentc1551ba3c7df802722cb919361a91c30e116c700 (diff)
downloadfreebsd-ports-gnome-cfe17d045087c06f751fca22eb3a38021ec211ec.tar.gz
freebsd-ports-gnome-cfe17d045087c06f751fca22eb3a38021ec211ec.tar.zst
freebsd-ports-gnome-cfe17d045087c06f751fca22eb3a38021ec211ec.zip
games/darkplaces:
- Update to 20140513 - Make dependencies unconditional, as they're required by any option - Rename options, use self-explanatory option names - Build with SDL v2.0 by default, add option for SDL v1.2 - Install icons, tweak DESKTOP_ENTRIES - Convert to plist
Diffstat (limited to 'games')
-rw-r--r--games/darkplaces/Makefile72
-rw-r--r--games/darkplaces/distinfo4
-rw-r--r--games/darkplaces/files/patch-makefile13
-rw-r--r--games/darkplaces/files/patch-makefile.inc69
-rw-r--r--games/darkplaces/pkg-plist11
5 files changed, 67 insertions, 102 deletions
diff --git a/games/darkplaces/Makefile b/games/darkplaces/Makefile
index a4b40a00323f..019959b52434 100644
--- a/games/darkplaces/Makefile
+++ b/games/darkplaces/Makefile
@@ -2,70 +2,72 @@
# $FreeBSD$
PORTNAME= darkplaces
-PORTVERSION= 20110628
-PORTREVISION= 4
+PORTVERSION= 20140513
CATEGORIES= games
-MASTER_SITES= http://offload1.icculus.org:9090/twilight/darkplaces/files/
+MASTER_SITES= http://icculus.org/twilight/darkplaces/files/
DISTNAME= ${PORTNAME}engine${PORTVERSION}
MAINTAINER= makc@FreeBSD.org
COMMENT= Quake engine modification
-USES= dos2unix gmake zip:infozip
+# Loads libraries at run-time, thus RUN_DEPENDS.
+RUN_DEPENDS= ${LOCALBASE}/lib/libjpeg.so:${PORTSDIR}/graphics/jpeg \
+ ${LOCALBASE}/lib/libvorbis.so:${PORTSDIR}/audio/libvorbis
+
+USES= gmake zip:infozip
USE_XORG= xxf86dga xpm
-DOS2UNIX_FILES= darkplaces.txt
-MAKE_ENV= DP_FS_BASEDIR="${Q1DIR}"
+MAKE_ENV= DP_FS_BASEDIR="${Q1DIR}" DP_LINK_JPEG=dlopen
WRKSRC= ${WRKDIR}/${PORTNAME}
MAKEFILE= makefile
ALL_TARGET= #
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= DOCS SDL1
OPTIONS_MULTI= MODULE
-OPTIONS_MULTI_MODULE= CLIENT DEDICATED SDL
+MODULE_DESC= Components
+OPTIONS_MULTI_MODULE= GLX SDL SERVER
OPTIONS_DEFAULT= ${OPTIONS_MULTI_MODULE}
+OPTIONS_SUB= yes
-CLIENT_DESC= Build GLX client
-DEDICATED_DESC= Build dedicated server
+GLX_DESC= Build GLX client
SDL_DESC= Build SDL client
-
-PLIST_FILES= %%DATADIR%%/dummy
-PLIST_DIRS= %%DATADIR%%
-PORTDOCS= darkplaces.txt
+SDL1_DESC= Use SDL v1.2 instead of v2.0
+SERVER_DESC= Build dedicated server
.include "${.CURDIR}/../quake-data/Makefile.include"
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSDL}
+.if ${PORT_OPTIONS:MGLX} || ${PORT_OPTIONS:MSDL}
USE_GL= glu
-# Loads libraries at run-time, thus RUN_DEPENDS.
-RUN_DEPENDS+= ${LOCALBASE}/lib/libjpeg.so:${PORTSDIR}/graphics/jpeg \
- ${LOCALBASE}/lib/libvorbis.so:${PORTSDIR}/audio/libvorbis
+PLIST_SUB+= CLIENT=""
+.else
+PLIST_SUB+= CLIENT="@comment "
.endif
-.if ${PORT_OPTIONS:MCLIENT}
+.if ${PORT_OPTIONS:MGLX}
ALL_TARGET+= cl-release
EXE_TARGETS+= ${PORTNAME}-glx
-PLIST_SUB+= CLIENT=""
-PLIST_FILES+= bin/${PORTNAME}-glx
-DESKTOP_ENTRIES+="Darkplaces GLX Client" "" "" "darkplaces-glx" \
- "" "false"
+DESKTOP_ENTRIES+="Darkplaces (GLX client)" "Quake engine modification (GLX)" \
+ darkplaces darkplaces-glx "Game;Shooter;" false
.endif
-.if ${PORT_OPTIONS:MDEDICATED}
+.if ${PORT_OPTIONS:MSERVER}
ALL_TARGET+= sv-release
EXE_TARGETS+= ${PORTNAME}-dedicated
-PLIST_FILES+= bin/${PORTNAME}-dedicated
.endif
.if ${PORT_OPTIONS:MSDL}
+. if ${PORT_OPTIONS:MSDL1}
USE_SDL= sdl
ALL_TARGET+= sdl-release
+. else
+USE_SDL= sdl2
+ALL_TARGET+= sdl2-release
+. endif
EXE_TARGETS+= ${PORTNAME}-sdl
-PLIST_FILES+= bin/${PORTNAME}-sdl
-DESKTOP_ENTRIES+="Darkplaces SDL Client" "" "" "darkplaces-sdl" \
- "" "false"
+DESKTOP_ENTRIES+="Darkplaces (SDL client)" "Quake engine modification (SDL)" \
+ darkplaces darkplaces-sdl "Game;Shooter;" false
.endif
post-extract:
@@ -73,14 +75,26 @@ post-extract:
${WRKDIR}/${PORTNAME}enginesource${PORTVERSION}.zip \
-d ${WRKDIR}
+post-patch:
+ ${REINPLACE_CMD} 's,/usr/X11R6,${LOCALBASE},g' \
+ ${WRKSRC}/makefile \
+ ${WRKSRC}/makefile.inc \
+ ${WRKSRC}/BSDmakefile
+
do-install:
${INSTALL_PROGRAM} ${EXE_TARGETS:S,^,${WRKSRC}/,} ${STAGEDIR}${PREFIX}/bin
@${MKDIR} ${STAGEDIR}${DATADIR}
- @${TOUCH} ${STAGEDIR}${DATADIR}/dummy
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/darkplaces.txt ${STAGEDIR}${DOCSDIR}
.endif
+.if ${PORT_OPTIONS:MGLX} || ${PORT_OPTIONS:MSDL}
+.for i in 16 24 32 48 64 72
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/ && \
+ ${INSTALL_DATA} ${WRKSRC}/darkplaces${i}x${i}.png \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/darkplaces.png
+.endfor
+.endif
BROKEN_ia64= does not compile: unrecognized command line option "-msse2"
BROKEN_powerpc= ${BROKEN_ia64}
diff --git a/games/darkplaces/distinfo b/games/darkplaces/distinfo
index 77d38487182d..662b1b41cce6 100644
--- a/games/darkplaces/distinfo
+++ b/games/darkplaces/distinfo
@@ -1,2 +1,2 @@
-SHA256 (darkplacesengine20110628.zip) = d2464c681e3fdcc66cb090e79c44c0c173a43b6f181a12e500b0b1fd7d73ffce
-SIZE (darkplacesengine20110628.zip) = 23377408
+SHA256 (darkplacesengine20140513.zip) = 69e5a50991884196e403bd6aab4a33bba553a934a167be366672ab4e223b06c9
+SIZE (darkplacesengine20140513.zip) = 28113487
diff --git a/games/darkplaces/files/patch-makefile b/games/darkplaces/files/patch-makefile
deleted file mode 100644
index 60de05ccbe3c..000000000000
--- a/games/darkplaces/files/patch-makefile
+++ /dev/null
@@ -1,13 +0,0 @@
---- makefile.orig 2011-10-22 23:23:36.000000000 +0400
-+++ makefile 2011-10-22 23:36:14.000000000 +0400
-@@ -171,8 +171,8 @@
- EXE_SDLNEXUIZ=$(EXE_UNIXSDLNEXUIZ)
-
- # libjpeg dependency (set these to "" if you want to use dynamic loading instead)
-- CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG
-- LIB_JPEG=-ljpeg
-+ CFLAGS_LIBJPEG=""
-+ LIB_JPEG=""
- endif
-
- # Win32 configuration
diff --git a/games/darkplaces/files/patch-makefile.inc b/games/darkplaces/files/patch-makefile.inc
index 008af2629177..4f218579877f 100644
--- a/games/darkplaces/files/patch-makefile.inc
+++ b/games/darkplaces/files/patch-makefile.inc
@@ -1,69 +1,22 @@
---- makefile.inc.orig 2011-06-01 14:47:42.000000000 +0400
-+++ makefile.inc 2011-10-23 00:50:35.000000000 +0400
-@@ -201,8 +201,8 @@
- #OPTIM_RELEASE=-O2 -fno-strict-aliasing -ffast-math -funroll-loops $(CPUOPTIMIZATIONS)
+--- makefile.inc.orig 2014-04-05 10:07:18 UTC
++++ makefile.inc
+@@ -189,7 +189,7 @@ OPTIM_DEBUG=$(CPUOPTIMIZATIONS)
#OPTIM_RELEASE=-O2 -fno-strict-aliasing -fno-math-errno -fno-trapping-math -ffinite-math-only -fno-signaling-nans -fcx-limited-range -funroll-loops $(CPUOPTIMIZATIONS)
#OPTIM_RELEASE=-O2 -fno-strict-aliasing -funroll-loops $(CPUOPTIMIZATIONS)
--#OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
+ #OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
-OPTIM_RELEASE=-O3 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
+OPTIM_RELEASE=$(CPUOPTIMIZATIONS)
-+#OPTIM_RELEASE=-O3 -fno-strict-aliasing $(CPUOPTIMIZATIONS)
# NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
DO_CC=$(CC) $(CFLAGS) -c $< -o $@
-@@ -219,7 +219,7 @@
- OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_SOUND) $(OBJ_CD) $(OBJ_COMMON)
-
- LDFLAGS_UNIXCOMMON=-lm $(LIB_ODE) $(LIB_JPEG) $(LIB_CRYPTO) $(LIB_CRYPTO_RIJNDAEL)
--LDFLAGS_UNIXCL=-L$(UNIX_X11LIBPATH) -lX11 -lXpm -lXext -lXxf86dga -lXxf86vm -pthread $(LIB_SOUND)
-+LDFLAGS_UNIXCL=-L$(LOCALBASE)/lib -lX11 -lXpm -lXext -lXxf86dga -lXxf86vm -pthread $(LIB_SOUND)
- LDFLAGS_UNIXCL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lmodplug
- LDFLAGS_UNIXSV_PRELOAD=-lz -ljpeg -lpng -lcurl
- LDFLAGS_UNIXSDL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lmodplug
-@@ -453,8 +453,8 @@
- @echo "========== $(EXE) (debug) =========="
- $(MAKE) $(EXE) \
- DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \
-- CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)"\
-- LDFLAGS="$(LDFLAGS_DEBUG) $(LDFLAGS_COMMON)" LEVEL=2
-+ CFLAGS+="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)"\
-+ LDFLAGS+="$(LDFLAGS_DEBUG) $(LDFLAGS_COMMON)" LEVEL=2
-
- bin-profile :
- $(CHECKLEVEL1)
-@@ -462,8 +462,8 @@
- @echo "========== $(EXE) (profile) =========="
- $(MAKE) $(EXE) \
- DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \
-- CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)"\
-- LDFLAGS="$(LDFLAGS_PROFILE) $(LDFLAGS_COMMON)" LEVEL=2
-+ CFLAGS+="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)"\
-+ LDFLAGS+="$(LDFLAGS_PROFILE) $(LDFLAGS_COMMON)" LEVEL=2
-
- bin-release :
- $(CHECKLEVEL1)
-@@ -471,8 +471,8 @@
- @echo "========== $(EXE) (release) =========="
- $(MAKE) $(EXE) \
+@@ -470,8 +470,8 @@ bin-release :
+ $(MAKE) prepare BUILD_DIR=build-obj/release/$(EXE)
+ $(MAKE) -C build-obj/release/$(EXE) $(EXE) \
DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \
-- CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)"\
-- LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" LEVEL=2
-+ CFLAGS+="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)"\
-+ LDFLAGS+="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" LEVEL=2
+- CFLAGS='$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)'\
+- LDFLAGS='$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)' LEVEL=2
++ CFLAGS+='$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)'\
++ LDFLAGS+='$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)' LEVEL=2
$(STRIP) $(EXE)
bin-release-profile :
-@@ -496,11 +496,11 @@
-
- vid_glx.o: vid_glx.c
- $(CHECKLEVEL2)
-- $(DO_CC) -I/usr/X11R6/include
-+ $(DO_CC) -I$(LOCALBASE)/include
-
- keysym2ucs.o: keysym2ucs.c
- $(CHECKLEVEL2)
-- $(DO_CC) -I/usr/X11R6/include
-+ $(DO_CC) -I$(LOCALBASE)/include
-
- vid_sdl.o: vid_sdl.c
- $(CHECKLEVEL2)
diff --git a/games/darkplaces/pkg-plist b/games/darkplaces/pkg-plist
new file mode 100644
index 000000000000..4b651efa291a
--- /dev/null
+++ b/games/darkplaces/pkg-plist
@@ -0,0 +1,11 @@
+%%SERVER%%bin/darkplaces-dedicated
+%%GLX%%bin/darkplaces-glx
+%%SDL%%bin/darkplaces-sdl
+%%PORTDOCS%%%%DOCSDIR%%/darkplaces.txt
+%%CLIENT%%share/icons/hicolor/16x16/apps/darkplaces.png
+%%CLIENT%%share/icons/hicolor/24x24/apps/darkplaces.png
+%%CLIENT%%share/icons/hicolor/32x32/apps/darkplaces.png
+%%CLIENT%%share/icons/hicolor/48x48/apps/darkplaces.png
+%%CLIENT%%share/icons/hicolor/64x64/apps/darkplaces.png
+%%CLIENT%%share/icons/hicolor/72x72/apps/darkplaces.png
+@dir %%DATADIR%%