Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Aug 2016 06:02:13 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r420386 - head/x11-themes/slim-themes
Message-ID:  <201608180602.u7I62Dcv016122@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Thu Aug 18 06:02:13 2016
New Revision: 420386
URL: https://svnweb.freebsd.org/changeset/ports/420386

Log:
  x11-themes/slim-themes: fix invalid option definitions
  
  Defining PORT_OPTIONS directly, especially after makefile fragment
  inclusions, is not valid and results in missing options values (yet masked
  when they are evaluated later after they are needed).
  
  Rework the automagic to function as intended with the exception of removing
  the redundant and potentially misleading "ALL_THEMES" option.  All the
  themes are already set on by default and to change that required the extra
  step of unchecking ALL_THEMES (without doing so still resulted in all
  being selected even when options are unchecked which is confusing).
  
  Finally, use the option framework to enforce one choice with MULTI option
  rather than roll-your-own logic.
  
  PR:		211569
  Approved by:	maintainer timeout
  Discovered by:	Synth sanity check failure

Modified:
  head/x11-themes/slim-themes/Makefile

Modified: head/x11-themes/slim-themes/Makefile
==============================================================================
--- head/x11-themes/slim-themes/Makefile	Thu Aug 18 05:41:51 2016	(r420385)
+++ head/x11-themes/slim-themes/Makefile	Thu Aug 18 06:02:13 2016	(r420386)
@@ -3,6 +3,7 @@
 
 PORTNAME=	slim-themes
 PORTVERSION=	1.0.1
+PORTREVISION=	1
 CATEGORIES=	x11-themes
 MASTER_SITES=	http://dist.codelabs.ru/fbsd/ports/slim-themes/:new_themes \
 		http://dist.codelabs.ru/fbsd/ports/slim-themes/:old_themes \
@@ -12,11 +13,6 @@ DISTFILES=
 MAINTAINER=	rea@FreeBSD.org
 COMMENT=	Theme pack for SLiM login app
 
-# But that's not all, see below.
-OPTIONS_DEFINE=	ALL_THEMES
-OPTIONS_DEFAULT=	ALL_THEMES
-ALL_THEMES_DESC=	Include all themes
-
 NO_BUILD=	yes
 NO_WRKSUBDIR=	yes
 SHAREMODE=	644
@@ -24,6 +20,11 @@ THEMEDIR_REL=	share/slim/themes
 THEMEDIR=	${PREFIX}/${THEMEDIR_REL}
 PLIST_SUB+=	THEMEDIR=${THEMEDIR_REL}
 
+OPTIONS_DEFINE=	# empty
+OPTIONS_MULTI=	THEME	# enforces at least one choice
+OPTIONS_SUB=	yes
+THEME_DESC=	Available SLiM Themes
+
 # Format is 'variable name%description%archive name%unpacked dir%dest
 # dir%master site tag'
 # I am substituting ' ' -> '+' because make in 6.x isn't able to properly
@@ -67,34 +68,23 @@ ${n}_DIST:=	${d}:${mtag}
 .endif
 ${n}_SDIR:=	${sdir}
 ${n}_DDIR:=	${ddir}
-OPTIONS_DEFINE:=	${OPTIONS_DEFINE} ${n}
+OPTIONS_MULTI_THEME:=	${OPTIONS_MULTI_THEME} ${n}
 A+=		${n}
 ${n}_DESC:=	${desc}
 NEWTHEMES:=	${ALLTHEMES}	${n}
 ALLTHEMES:=	${NEWTHEMES}
 .endfor # t in ${THEMELIST}
 
-.include <bsd.port.pre.mk>
+OPTIONS_DEFAULT=	${OPTIONS_MULTI_THEME}
+
+.include <bsd.port.options.mk>
 
 .for n in ${ALLTHEMES}
-.if ${PORT_OPTIONS:MALL_THEMES} || ${PORT_OPTIONS:M${n}}
-.if ! ${PORT_OPTIONS:M${n}}
-PORT_OPTIONS+=	${n}
-.endif
+.  if ${PORT_OPTIONS:M${n}}
 NEWDISTFILES:=	${DISTFILES}	${${n}_DIST}
 DISTFILES:=	${NEWDISTFILES}
-SEEN_THEMES=	yes
-NEWPLIST_SUB:=	${PLIST_SUB}	${n}=""
-PLIST_SUB:=	${NEWPLIST_SUB}
-.else
-NEWPLIST_SUB:=	${PLIST_SUB}	${n}="@comment "
-PLIST_SUB:=	${NEWPLIST_SUB}
-.endif # ${PORT_OPTIONS:MALL_THEMES} || ${PORT_OPTIONS:M${n}}
-.endfor # n in ${THEMELIST}
-
-.if !defined(SEEN_THEMES)
-IGNORE=		at least one theme must be selected
-.endif
+.  endif
+.endfor
 
 .if ${PORT_OPTIONS:MPARALLEL_DIMS}
 EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-parallel-dimensions-slim.theme
@@ -114,4 +104,4 @@ do-install:
 .endif # ${PORT_OPTIONS:M${n}}
 .endfor # t in ${THEMELIST}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>



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