Add optional languages support
Submitted by: Nikolaj Karpov <kolya@astrons.com>
This commit is contained in:
parent
40ace6f64a
commit
912e002c0e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=121409
1 changed files with 18 additions and 1 deletions
|
@ -31,6 +31,14 @@ DOCSDIR?= ${PREFIX}/share/doc/${PKGNAMEPREFIX}webalizer
|
|||
EXAMPLESDIR?= ${PREFIX}/share/examples/${PKGNAMEPREFIX}webalizer
|
||||
GD_PORT?= graphics/gd
|
||||
|
||||
SUPP_LANG= catalan chinese croatian czech danish dutch english \
|
||||
estonian finnish french galician german greek hungarian \
|
||||
icelandic indonesian italian japanese korean latvian \
|
||||
malay norwegian polish portuguese portuguese_brazil \
|
||||
romanian romanian-iso-8859-2 russian serbian \
|
||||
simplified_chinese slowak slovene spanish swedish \
|
||||
turkish ukrainian
|
||||
|
||||
CONFLICTS= webalizer-2*
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
@ -44,7 +52,10 @@ CONFIGURE_ARGS+= --enable-dns \
|
|||
--with-geoip-inc=${LOCALBASE}/include \
|
||||
--with-png=${LOCALBASE}/lib \
|
||||
--with-png-inc=${LOCALBASE}/include \
|
||||
--with-language=english
|
||||
|
||||
.if defined(GEOLIZER_LANG)
|
||||
CONFIGURE_ARGS+= --with-language=${GEOLIZER_LANG}
|
||||
.endif
|
||||
|
||||
CFLAGS+= -DLINKLIST_MAX_STRING=256
|
||||
MAN1= ${PKGNAMEPREFIX}webalizer.1
|
||||
|
@ -55,6 +66,12 @@ WRKSRC= ${WRKDIR}/${DISTNAME:S/-src$//}
|
|||
PLIST_SUB+= PKGNAMEPREFIX=${PKGNAMEPREFIX}
|
||||
|
||||
pre-configure:
|
||||
.if !defined(GEOLIZER_LANG)
|
||||
@${ECHO_MSG} "You can customize the language by typing"
|
||||
@${ECHO_MSG} " make GEOLIZER_LANG=<lang>"
|
||||
@${ECHO_MSG} "where <lang> is one of:"
|
||||
@${ECHO_MSG} ${SUPP_LANG}
|
||||
.endif
|
||||
@${MV} ${WRKSRC}/webalizer.1 ${WRKSRC}/webalizer.1.sed
|
||||
${SED} -e "s=/etc=${PREFIX}/etc=" \
|
||||
${WRKSRC}/webalizer.1.sed > ${WRKSRC}/webalizer.1
|
||||
|
|
Loading…
Reference in a new issue