From ea21bde17f996cc6d43747f66d7ec32ae5f619a1 Mon Sep 17 00:00:00 2001 From: marino Date: Fri, 5 Aug 2016 00:28:22 +0000 Subject: 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)
---
 mail/thunderbird-dictionaries/Makefile.dict | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'mail/thunderbird-dictionaries/Makefile.dict')

diff --git a/mail/thunderbird-dictionaries/Makefile.dict b/mail/thunderbird-dictionaries/Makefile.dict
index 67dc00820b8f..2d8b5f24ac2d 100644
--- a/mail/thunderbird-dictionaries/Makefile.dict
+++ b/mail/thunderbird-dictionaries/Makefile.dict
@@ -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}
-- 
cgit