From owner-svn-ports-head@freebsd.org Fri Aug 5 00:28:23 2016 Return-Path: Delivered-To: svn-ports-head@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 C6293BAE657; Fri, 5 Aug 2016 00:28:23 +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 780201547; Fri, 5 Aug 2016 00:28:23 +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 u750SMfl086521; Fri, 5 Aug 2016 00:28:22 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u750SMJA086518; Fri, 5 Aug 2016 00:28:22 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201608050028.u750SMJA086518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Fri, 5 Aug 2016 00:28:22 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419664 - head/mail/thunderbird-dictionaries X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Aug 2016 00:28:23 -0000 Author: marino Date: Fri Aug 5 00:28:22 2016 New Revision: 419664 URL: https://svnweb.freebsd.org/changeset/ports/419664 Log: mail/thunderbird-dictionaries: Rework (options invalid) It is not valid to define PORT_OPTIONS variable directly (this is done through OPTIONS_DEFINE and related variables) and definitely they can't be modified after inclusions of bsd.port.pre.mk or bsd.port.options.mk fragments. Since the port needed to be reworked anyway, I simplified it a lot. I removed a shell command (with 3 pipes!) completely. I saw several ways to create ${ALLDICTS} with basic makefile techniques, but in the end it wasn't even necessary. I eliminated the "ALL" option. It didn't make sense. If "ALL" was set, it would override the individual language options (leading to possible confusion) and the "ALL" option was set by default, and then it even checked PACKAGE_BUILDING to override the value to ALL again. I have to assume that it wasn't originally set up that way but changed over time. Now only the language options are there and they are all "ON" by default. It's simpler to disable languages than before (no need to deselect "ALL" option first). The
 and  inclusions were removed, they aren't necessary.
  The PLIST substitutions are made with standard OPTIONS_SUB technique.
  
  The work is verified by checking SELECTED_OPTIONS and DESELECTED_OPTIONS
  which now show the correct values and the dependencies registered to the
  built package now match the port.
  
  Approved by:	infrastructure blanket (fix options)

Modified:
  head/mail/thunderbird-dictionaries/Makefile
  head/mail/thunderbird-dictionaries/Makefile.dict
  head/mail/thunderbird-dictionaries/Makefile.options

Modified: head/mail/thunderbird-dictionaries/Makefile
==============================================================================
--- head/mail/thunderbird-dictionaries/Makefile	Thu Aug  4 23:59:15 2016	(r419663)
+++ head/mail/thunderbird-dictionaries/Makefile	Fri Aug  5 00:28:22 2016	(r419664)
@@ -3,7 +3,7 @@
 
 PORTNAME=	thunderbird-dictionaries
 PORTVERSION=	20060220
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	mail
 MASTER_SITES=	MOZDEV/dictionaries
 DISTFILES=	# filled in later after options
@@ -18,35 +18,19 @@ USES=		zip:infozip
 NO_BUILD=	yes
 WRKSRC=		${WRKDIR}/dictionaries
 
-.include "${.CURDIR}/Makefile.options"
-
-.include 
-
+# All available dictionaries are listed in Makefile.dict
+# Makefile.dict pulls in Makefile.options
 .include "${.CURDIR}/Makefile.dict"
 
-# For batch building, build all dictionaries
-.if defined(BATCH)
-PORT_OPTIONS+=	${ALLDICTS}
-.endif
-
-# All available dictionaries are listed in Makefile.dict
+.include 
 
 # this dictionary requires special handling in do-install
 BG_DICT=	BG
 
-# Build and install all dictionaries
-.if ${PORT_OPTIONS:MALL}
-PORT_OPTIONS+=	${ALLDICTS}
-.endif
-
 # Figure out which distfiles to use, and how to construct the plist
 .for f in ${ALLDICTS}
 .if ${PORT_OPTIONS:M${f}}
-PLIST_SUB+=	${f}=""
-HAVE_DICT=	yes
 DISTFILES+=	${${f}_FILE}
-.else
-PLIST_SUB+=	${f}="@comment "
 .endif
 .endfor
 
@@ -82,4 +66,4 @@ do-install:
 .endif
 .endfor
 
-.include 
+.include 

Modified: head/mail/thunderbird-dictionaries/Makefile.dict
==============================================================================
--- head/mail/thunderbird-dictionaries/Makefile.dict	Thu Aug  4 23:59:15 2016	(r419663)
+++ head/mail/thunderbird-dictionaries/Makefile.dict	Fri Aug  5 00:28:22 2016	(r419664)
@@ -1,6 +1,8 @@
 # This file lists the Dictionary files to not bloat Makefile
 # $FreeBSD$
 
+.include "${.CURDIR}/Makefile.options"
+
 AF_ZA_FILE=	spell-af-ZA.xpi
 BG_FILE=	spell-bg.xpi
 CA_FILE=	spell-ca.xpi
@@ -45,5 +47,4 @@ SV_FILE=	spell-sv.xpi
 UK_FILE=	spell-uk.xpi
 ZU_ZA_FILE=	spell-zu-ZA.xpi
 
-ALLDICTS_CMD:=	${GREP} FILE ${.CURDIR}/Makefile.dict | ${GREP} -v ALLDICTS_CMD | ${SED} s/_FILE.*//g | ${XARGS} | ${GREP} .
-ALLDICTS!=	${ALLDICTS_CMD}
+ALLDICTS=	${OPTIONS_MULTI_DICT}

Modified: head/mail/thunderbird-dictionaries/Makefile.options
==============================================================================
--- head/mail/thunderbird-dictionaries/Makefile.options	Thu Aug  4 23:59:15 2016	(r419663)
+++ head/mail/thunderbird-dictionaries/Makefile.options	Fri Aug  5 00:28:22 2016	(r419664)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 OPTIONS_MULTI=	DICT
-OPTIONS_MULTI_DICT=	ALL AF_ZA BG CA HR CS DA NL EN_AU EN_CA \
+OPTIONS_MULTI_DICT=	AF_ZA BG CA HR CS DA NL EN_AU EN_CA \
 			EN_NZ EN_GB FR_FR FO GL DE_AT DE_DE DE_CH \
 			EL HE_IL HU IA GA IT LA LV_LV LT MS MI NB \
 			NN PL PT PT_BR RO RU ES_MX ES_ES SK SL SV UK \
@@ -53,4 +53,5 @@ UK_DESC=	Ukrainian
 CY_GB_DESC=	Welsh
 ZU_ZA_DESC=	Zulu (South Africa)
 
-OPTIONS_DEFAULT=	ALL
+OPTIONS_DEFAULT=	${OPTIONS_MULTI_DICT}
+OPTIONS_SUB=		yes