From owner-svn-ports-all@freebsd.org Thu Aug 18 06:02:14 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FBA9BBEAB2; Thu, 18 Aug 2016 06:02:14 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67FFC175C; Thu, 18 Aug 2016 06:02:14 +0000 (UTC) (envelope-from marino@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7I62Drs016123; Thu, 18 Aug 2016 06:02:13 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7I62Dcv016122; Thu, 18 Aug 2016 06:02:13 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201608180602.u7I62Dcv016122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Thu, 18 Aug 2016 06:02:13 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420386 - head/x11-themes/slim-themes X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2016 06:02:14 -0000 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 +OPTIONS_DEFAULT= ${OPTIONS_MULTI_THEME} + +.include .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 +.include