Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 May 2015 20:38:20 +0000 (UTC)
From:      Max Brazhnikov <makc@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r385563 - in head/games/darkplaces: . files
Message-ID:  <201505062038.t46KcKUP020700@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: makc
Date: Wed May  6 20:38:19 2015
New Revision: 385563
URL: https://svnweb.freebsd.org/changeset/ports/385563

Log:
  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

Added:
  head/games/darkplaces/pkg-plist   (contents, props changed)
Deleted:
  head/games/darkplaces/files/patch-makefile
Modified:
  head/games/darkplaces/Makefile
  head/games/darkplaces/distinfo
  head/games/darkplaces/files/patch-makefile.inc

Modified: head/games/darkplaces/Makefile
==============================================================================
--- head/games/darkplaces/Makefile	Wed May  6 20:34:12 2015	(r385562)
+++ head/games/darkplaces/Makefile	Wed May  6 20:38:19 2015	(r385563)
@@ -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}

Modified: head/games/darkplaces/distinfo
==============================================================================
--- head/games/darkplaces/distinfo	Wed May  6 20:34:12 2015	(r385562)
+++ head/games/darkplaces/distinfo	Wed May  6 20:38:19 2015	(r385563)
@@ -1,2 +1,2 @@
-SHA256 (darkplacesengine20110628.zip) = d2464c681e3fdcc66cb090e79c44c0c173a43b6f181a12e500b0b1fd7d73ffce
-SIZE (darkplacesengine20110628.zip) = 23377408
+SHA256 (darkplacesengine20140513.zip) = 69e5a50991884196e403bd6aab4a33bba553a934a167be366672ab4e223b06c9
+SIZE (darkplacesengine20140513.zip) = 28113487

Modified: head/games/darkplaces/files/patch-makefile.inc
==============================================================================
--- head/games/darkplaces/files/patch-makefile.inc	Wed May  6 20:34:12 2015	(r385562)
+++ head/games/darkplaces/files/patch-makefile.inc	Wed May  6 20:38:19 2015	(r385563)
@@ -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)

Added: head/games/darkplaces/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/darkplaces/pkg-plist	Wed May  6 20:38:19 2015	(r385563)
@@ -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%%



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505062038.t46KcKUP020700>