Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2013 00:24:43 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r333164 - head/games/xonotic
Message-ID:  <201311080024.rA80Ohcs026444@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Fri Nov  8 00:24:43 2013
New Revision: 333164
URL: http://svnweb.freebsd.org/changeset/ports/333164

Log:
  - Support staging
  - Use new LIB_DEPENDS syntax
  - Add DESKTOP_ENTRIES

Modified:
  head/games/xonotic/Makefile

Modified: head/games/xonotic/Makefile
==============================================================================
--- head/games/xonotic/Makefile	Thu Nov  7 23:14:50 2013	(r333163)
+++ head/games/xonotic/Makefile	Fri Nov  8 00:24:43 2013	(r333164)
@@ -9,11 +9,11 @@ MASTER_SITES=	http://nl.dl.xonotic.org/ 
 		http://mirror.bitmissile.com/xonotic/releases/
 
 MAINTAINER=	amdmi3@FreeBSD.org
-COMMENT=	A fast-paced, chaotic, and intense multiplayer first person shooter
+COMMENT=	Fast-paced, chaotic, and intense multiplayer first person shooter
 
-LIB_DEPENDS=	curl:${PORTSDIR}/ftp/curl \
-		png15:${PORTSDIR}/graphics/png \
-		jpeg:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS=	libcurl.so:${PORTSDIR}/ftp/curl \
+		libpng.so:${PORTSDIR}/graphics/png \
+		libjpeg.so:${PORTSDIR}/graphics/jpeg
 
 MANUAL_PACKAGE_BUILD=	huge
 
@@ -26,40 +26,45 @@ MAKE_ARGS=	DP_FS_BASEDIR="${DATADIR}" \
 		OPTIM_RELEASE="${CFLAGS} -fno-strict-aliasing -funroll-loops" \
 		STRIP="${STRIP_CMD}"
 MAKE_JOBS_UNSAFE=yes
-ALL_TARGET=	#
-BINARIES=	#
+ALL_TARGET=	# empty
 USE_GCC=	yes
 
-OPTIONS_DEFAULT=CLIENT DEDICATED
+PORTDATA=	*
+
 OPTIONS_MULTI=	COMPONENTS
 OPTIONS_MULTI_COMPONENTS=CLIENT DEDICATED
+OPTIONS_DEFAULT=CLIENT DEDICATED
+
 CLIENT_DESC=	Build client
 DEDICATED_DESC=	Build dedicated server
 
-NO_STAGE=	yes
+CLIENT_LIB_DEPENDS+=	libmodplug.so:${PORTSDIR}/audio/libmodplug \
+			libtheora.so:${PORTSDIR}/multimedia/libtheora \
+			libvorbis.so:${PORTSDIR}/audio/libvorbis \
+			libogg.so:${PORTSDIR}/audio/libogg
+
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MCLIENT}
-LIB_DEPENDS+=	modplug:${PORTSDIR}/audio/libmodplug \
-		theora:${PORTSDIR}/multimedia/libtheora \
-		vorbis:${PORTSDIR}/audio/libvorbis \
-		ogg:${PORTSDIR}/audio/libogg
 USE_SDL=	sdl
 ALL_TARGET+=	sdl-release
-BINARIES+=	xonotic-sdl
+PLIST_FILES+=	bin/${PORTNAME}
+
+DESKTOP_ENTRIES="Xonotic" \
+		"${COMMENT}" \
+		"${PREFIX}/share/pixmaps/${PORTNAME}.ico" \
+		"${PORTNAME}" \
+		"Game;Shooter;" \
+		""
+
+PLIST_FILES+=	share/pixmaps/${PORTNAME}.ico
 .endif
 
 .if ${PORT_OPTIONS:MDEDICATED}
 ALL_TARGET+=	sv-release
-BINARIES+=	xonotic-dedicated
+PLIST_FILES+=	bin/${PORTNAME}-dedicated
 .endif
 
-.for f in ${BINARIES}
-PLIST_FILES+=	bin/${f}
-.endfor
-
-PORTDATA=	*
-
 post-patch:
 	@${REINPLACE_CMD} -e 's,/usr/X11R6,${LOCALBASE},' \
 		${WRKSRC}/${MAKEFILE} ${WRKSRC}/makefile.inc
@@ -68,18 +73,18 @@ post-patch:
 	@${ECHO_CMD} >> ${WRKSRC}/prvm_offsets.h # silence 'no newline' warnings
 
 do-install:
-.for f in ${BINARIES}
-	${INSTALL_PROGRAM} ${WRKSRC}/${f:C/xonotic/darkplaces/} ${PREFIX}/bin/${f}
-.endfor
-.if !defined(NOPORTDATA)
-	${MKDIR} ${DATADIR}/data
-	${INSTALL_DATA} ${WRKDIR}/Xonotic/data/*.pk3 ${DATADIR}/data/
+.if ${PORT_OPTIONS:MCLIENT}
+	${INSTALL_PROGRAM} ${WRKSRC}/darkplaces-sdl ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_DATA} ${WRKDIR}/Xonotic/misc/logos/icons_ico/xonotic.ico ${STAGEDIR}${PREFIX}/share/pixmaps/
+.endif
 .if ${PORT_OPTIONS:MDEDICATED}
-	cd ${WRKDIR}/Xonotic && ${COPYTREE_SHARE} server ${DATADIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/darkplaces-dedicated ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-dedicated
+	cd ${WRKDIR}/Xonotic && ${COPYTREE_SHARE} "server" ${STAGEDIR}${DATADIR}/
 # Fixup lost +x permissions on scripts after COPYTREE_SHARE
-	${FIND} ${DATADIR}/server -type f -name *.sh -o -name rcon*.pl | \
+	${FIND} ${STAGEDIR}${DATADIR}/server -type f -name *.sh -o -name rcon*.pl | \
 		${XARGS} ${CHMOD} +x
 .endif
-.endif
+	${MKDIR} ${STAGEDIR}${DATADIR}/data
+	${INSTALL_DATA} ${WRKDIR}/Xonotic/data/*.pk3 ${STAGEDIR}${DATADIR}/data/
 
 .include <bsd.port.mk>



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