summaryrefslogtreecommitdiff
path: root/textproc/en-hunspell/Makefile
blob: 52995b401152c2a2640126ca077014d002f7210a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

PORTNAME=	hunspell
PORTVERSION=	2020.12.07
CATEGORIES=	textproc
MASTER_SITES=	SF/wordlist/speller/${PORTVERSION}/
PKGNAMEPREFIX=	en-
DISTFILES=	hunspell-en_CA${CA_VARIANT}-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_AU${AU_VARIANT}-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_US${US_VARIANT}-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_GB${GB_VARIANT}-${PORTVERSION}${EXTRACT_SUFX}
DIST_SUBDIR=	${PORTNAME}

MAINTAINER=	office@FreeBSD.org
COMMENT=	English hunspell dictionaries

LICENSE=	BSD3CLAUSE

USES=		zip

NO_ARCH=	yes
NO_BUILD=	yes
NO_WRKSUBDIR=	yes

PLIST_FILES=	${DATADIR}/README_en_AU${AU_VARIANT}.txt \
		${DATADIR}/README_en_CA${CA_VARIANT}.txt \
		${DATADIR}/README_en_GB${GB_VARIANT}.txt \
		${DATADIR}/README_en_US${US_VARIANT}.txt \
		${DATADIR}/en_AU${AU_VARIANT}.aff \
		${DATADIR}/en_AU${AU_VARIANT}.dic \
		${DATADIR}/en_CA${CA_VARIANT}.aff \
		${DATADIR}/en_CA${CA_VARIANT}.dic \
		${DATADIR}/en_GB${GB_VARIANT}.dic \
		${DATADIR}/en_GB${GB_VARIANT}.aff \
		${DATADIR}/en_US${US_VARIANT}.aff \
		${DATADIR}/en_US${US_VARIANT}.dic \
		${DATADIR}/en_GB.dic \
		${DATADIR}/en_GB.aff

COPY=		-lh	# Use hardlinks rather than copies under stage/

OPTIONS_RADIO=	AU CA GB US
OPTIONS_RADIO_AU=	AU_STANDARD AU_LARGE
OPTIONS_RADIO_CA=	CA_STANDARD CA_LARGE
OPTIONS_RADIO_GB=	GB_ISE GB_IZE GB_LARGE
OPTIONS_RADIO_US=	US_STANDARD US_LARGE
OPTIONS_DEFAULT=AU_STANDARD CA_STANDARD GB_ISE US_STANDARD
AU_LARGE_DESC=		Dictionary with more words and multiple variants per word
AU_STANDARD_DESC=	Australian dictionary considered standard by maintainers
CA_LARGE_DESC=		Dictionary with more words and multiple variants per word
CA_STANDARD_DESC=	Canadian dictionary considered standard by maintainers
GB_ISE_DESC=		en_GB dictionary with -ise spelling
GB_IZE_DESC=		en_GB dictionary with -ize spelling
GB_LARGE_DESC=		Dictionary with more words and multiple variants per word
US_LARGE_DESC=		Dictionary with more words and multiple variants per word
US_STANDARD_DESC=	American dictionary considered standard by maintainers

.for c in AU CA GB US
.	for v in STANDARD ISE IZE LARGE
${c}_${v}_VARS=		${c}_VARIANT=${v:S/STANDARD//:tl:C/^.+$/-&/}
.	endfor
.endfor

AU_LARGE_PLIST_FILES=	${DATADIR}/en_AU.aff ${DATADIR}/en_AU.dic
CA_LARGE_PLIST_FILES=	${DATADIR}/en_CA.aff ${DATADIR}/en_CA.dic
US_LARGE_PLIST_FILES=	${DATADIR}/en_US.aff ${DATADIR}/en_US.dic

GBALIASES=	en_AG en_BS en_BW en_BZ en_DK en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW
USALIASES=	en_PH

.for ALIAS in ${GBALIASES} ${USALIASES}
PLIST_FILES+=	${DATADIR}/${ALIAS}.aff \
		${DATADIR}/${ALIAS}.dic
.endfor

do-install:
	${MKDIR} ${STAGEDIR}${DATADIR}/
	${INSTALL_DATA} ${WRKSRC}/*.aff ${WRKSRC}/*.dic ${STAGEDIR}${DATADIR}/
	${INSTALL_DATA} ${WRKSRC}/README_*.txt ${STAGEDIR}${DATADIR}/
	${LN} -s en_GB${GB_VARIANT}.aff ${STAGEDIR}${DATADIR}/en_GB.aff
	${LN} -s en_GB${GB_VARIANT}.dic ${STAGEDIR}${DATADIR}/en_GB.dic
.for ALIAS in ${GBALIASES}
	${LN} -s en_GB.aff ${STAGEDIR}${DATADIR}/${ALIAS}.aff
	${LN} -s en_GB.dic ${STAGEDIR}${DATADIR}/${ALIAS}.dic
.endfor
.for ALIAS in ${USALIASES}
	${LN} -s en_US.aff ${STAGEDIR}${DATADIR}/${ALIAS}.aff
	${LN} -s en_US.dic ${STAGEDIR}${DATADIR}/${ALIAS}.dic
.endfor

do-install-AU_LARGE-on:
	${LN} -s en_AU-large.aff ${STAGEDIR}${DATADIR}/en_AU.aff
	${LN} -s en_AU-large.dic ${STAGEDIR}${DATADIR}/en_AU.dic

do-install-CA_LARGE-on:
	${LN} -s en_CA-large.aff ${STAGEDIR}${DATADIR}/en_CA.aff
	${LN} -s en_CA-large.dic ${STAGEDIR}${DATADIR}/en_CA.dic

do-install-US_LARGE-on:
	${LN} -s en_US-large.aff ${STAGEDIR}${DATADIR}/en_US.aff
	${LN} -s en_US-large.dic ${STAGEDIR}${DATADIR}/en_US.dic

# maintainer section:

.if defined(MAINTAINER_MODE)
DISTFILES=	hunspell-en_AU-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_AU-large-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_CA-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_CA-large-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_GB-ise-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_GB-ize-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_GB-large-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_US-${PORTVERSION}${EXTRACT_SUFX} \
		hunspell-en_US-large-${PORTVERSION}${EXTRACT_SUFX}
.endif

.include <bsd.port.mk>