Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Feb 2019 17:38:57 +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: r493577 - head/games/heretic
Message-ID:  <201902221738.x1MHcvCP009253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Fri Feb 22 17:38:57 2019
New Revision: 493577
URL: https://svnweb.freebsd.org/changeset/ports/493577

Log:
  - Fix X11 depends (use only when needed, e.g. for X11 and FASTX11 modes, and only list actually used components)
  - Convert to options helpers
  
  PR:		235531
  Approved by:	maintainer timeout (oliver, 2 weeks)

Modified:
  head/games/heretic/Makefile

Modified: head/games/heretic/Makefile
==============================================================================
--- head/games/heretic/Makefile	Fri Feb 22 17:12:48 2019	(r493576)
+++ head/games/heretic/Makefile	Fri Feb 22 17:38:57 2019	(r493577)
@@ -8,70 +8,62 @@ CATEGORIES=	games
 MASTER_SITES=	http://files.kyle-evans.net/freebsd/:source \
 		http://files.kyle-evans.net/freebsd/:wad
 DISTNAME=	gl${PORTNAME}-${PORTVERSION}
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:source
+EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	oliver@FreeBSD.org
 COMMENT=	Unix source-port of the famous Heretic game by id Software
 
 USES=		dos2unix gmake
 DOS2UNIX_FILES=	opengl/gl_struct.h
-USE_XORG=	x11 xi xpm xau
 
-OPTIONS_DEFINE=	WAD DOCS
-OPTIONS_SINGLE=	SG1
+OPTIONS_DEFINE=		WAD DOCS
+OPTIONS_SINGLE=		SG1
 OPTIONS_SINGLE_SG1=	X11 FASTX11 SDL
-FASTX11_DESC=	Use FastX11
-WAD_DESC=	With shareware WAD
-SG1_DESC=	Graphics Selections
 
+FASTX11_DESC=		Use FastX11
+WAD_DESC=		With shareware WAD
+SG1_DESC=		Graphics Selections
+
 OPTIONS_DEFAULT=	X11 WAD
+OPTIONS_SUB=		yes
 
-.include <bsd.port.options.mk>
+X11_ALL_TARGET=		x11
+X11_VARS=		BINARY=xheretic
+X11_USE=		XORG=x11,xext
 
-.if ${PORT_OPTIONS:MX11}
-ALL_TARGET=	x11
-BINARY=		xheretic
-.endif
+FASTX11_ALL_TARGET=	fastx11
+FASTX11_VARS=		BINARY=xaheretic
+FASTX11_USE=		XORG=x11,xext
 
-.if ${PORT_OPTIONS:MFASTX11}
-ALL_TARGET=	fastx11
-BINARY=		xaheretic
-.endif
+SDL_ALL_TARGET=		sdl
+SDL_USES=		sdl
+SDL_VARS=		BINARY=sdlheretic
+SDL_CFLAGS=		`${SDL_CONFIG} --cflags`
+SDL_USE=		SDL=sdl
 
-.if ${PORT_OPTIONS:MSDL}
-USE_SDL=	sdl
-ALL_TARGET=	sdl
-BINARY=		sdlheretic
-CFLAGS+=	`${SDL_CONFIG} --cflags`
-.endif
+WAD_DISTFILES=		heretic_share.wad.gz:wad
 
-.if ${PORT_OPTIONS:MWAD}
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:source heretic_share.wad.gz:wad
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
-PLIST_SUB+=	WAD=""
-.else
-PLIST_SUB+=	WAD="@comment "
-.endif
-
 post-extract:
-.if ${PORT_OPTIONS:MWAD}
-	@${GZIP_CMD} -dc ${_DISTDIR}/heretic_share.wad.gz \
-		> ${WRKSRC}/heretic_share.wad
-.endif
 	@${FIND} ${WRKSRC} -name .depend -type f -delete
 	@${RM} ${WRKSRC}/i_ipx.c
 
+post-extract-WAD-on:
+	@${GZIP_CMD} -dc ${_DISTDIR}/heretic_share.wad.gz \
+		> ${WRKSRC}/heretic_share.wad
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/heretic
 	${INSTALL_PROGRAM} ${WRKSRC}/sndserver ${STAGEDIR}${PREFIX}/bin/sndserver
-.if ${PORT_OPTIONS:MWAD}
+
+do-install-WAD-on:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/heretic
 	${INSTALL_DATA} ${WRKSRC}/heretic_share.wad ${STAGEDIR}${PREFIX}/share/heretic
-.endif
-.if ${PORT_OPTIONS:MDOCS}
+
+do-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 .for i in "End User License Heretic Source Code.txt" Gamekeys.txt README.txt AUTHORS SourceReadme.txt Changelog README.opengl
 	${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${DOCSDIR}
 .endfor
-.endif
 
 .include <bsd.port.mk>



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