diff options
author | marino <marino@FreeBSD.org> | 2016-08-05 08:28:22 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2016-08-05 08:28:22 +0800 |
commit | ea21bde17f996cc6d43747f66d7ec32ae5f619a1 (patch) | |
tree | 30108e940c5a1f52a0ea379469a8242b49acc1d7 /mail | |
parent | 919aef2a5b947e36f058b419c7de357f4dff2f7a (diff) | |
download | freebsd-ports-graphics-ea21bde17f996cc6d43747f66d7ec32ae5f619a1.tar.gz freebsd-ports-graphics-ea21bde17f996cc6d43747f66d7ec32ae5f619a1.tar.zst freebsd-ports-graphics-ea21bde17f996cc6d43747f66d7ec32ae5f619a1.zip |
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 <pre> and <post> 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)
Diffstat (limited to 'mail')
-rw-r--r-- | mail/thunderbird-dictionaries/Makefile | 26 | ||||
-rw-r--r-- | mail/thunderbird-dictionaries/Makefile.dict | 5 | ||||
-rw-r--r-- | mail/thunderbird-dictionaries/Makefile.options | 5 |
3 files changed, 11 insertions, 25 deletions
diff --git a/mail/thunderbird-dictionaries/Makefile b/mail/thunderbird-dictionaries/Makefile index dd47fa8e578..532b03df774 100644 --- a/mail/thunderbird-dictionaries/Makefile +++ b/mail/thunderbird-dictionaries/Makefile @@ -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 <bsd.port.pre.mk> - +# 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 <bsd.port.options.mk> # 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 <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/mail/thunderbird-dictionaries/Makefile.dict b/mail/thunderbird-dictionaries/Makefile.dict index 67dc00820b8..2d8b5f24ac2 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} diff --git a/mail/thunderbird-dictionaries/Makefile.options b/mail/thunderbird-dictionaries/Makefile.options index 0359039042a..6136a02dc5d 100644 --- a/mail/thunderbird-dictionaries/Makefile.options +++ b/mail/thunderbird-dictionaries/Makefile.options @@ -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 |