From 9ae467c84ac6324f2011ec6ad1b04a296d2aa074 Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Sun, 4 Oct 2020 14:13:06 +0000 Subject: [PATCH] Split OPTIONAL option - Remove OPTIONAL option - Add ENCODING, ICAL, INI, LANGUAGES, LEVENSHTEIN, PHP, RC, SPELLCHECK, SUBTITLES, TMSERVER and TRADOS options --- textproc/translate-toolkit/Makefile | 55 +++++++++++++++++----------- textproc/translate-toolkit/pkg-plist | 20 +++++----- 2 files changed, 43 insertions(+), 32 deletions(-) diff --git a/textproc/translate-toolkit/Makefile b/textproc/translate-toolkit/Makefile index 25718a69e74f..486fc6ea54a2 100644 --- a/textproc/translate-toolkit/Makefile +++ b/textproc/translate-toolkit/Makefile @@ -27,25 +27,41 @@ SHEBANG_FILES= tools/* MANPAGES= csv2po csv2tbx dtd2po flatxml2po html2po idml2po json2po moz2po mozlang2po odf2xliff oo2po oo2xliff po2csv po2dtd po2flatxml po2html po2idml po2json po2moz po2mozlang po2oo po2prop po2resx po2sub po2symb po2tiki po2tmx po2ts po2txt po2web2py po2wordfast po2xliff pot2po prop2po resx2po sub2po symb2po tbx2po tiki2po ts2po txt2po web2py2po xliff2odf xliff2oo -OPTIONS_DEFINE= OPTIONAL -OPTIONS_DEFAULT=OPTIONAL +OPTIONS_DEFINE= ENCODING ICAL INI LANGUAGES LEVENSHTEIN PHP RC SPELLCHECK SUBTITLES TRADOS #TMSERVER YAML +OPTIONS_DEFAULT=ENCODING ICAL INI LANGUAGES LEVENSHTEIN PHP RC SPELLCHECK SUBTITLES TRADOS #TMSERVER YAML OPTIONS_SUB= yes -OPTIONAL_DESC= Optional dependencies +ENCODING_DESC= Encoding detection +ICAL_DESC= iCal format support +INI_DESC= INI format support +LANGUAGES_DESC= Languages names +LEVENSHTEIN_DESC= Faster matching using Levenshtein +PHP_DESC= PHP format support +RC_DESC= Windows Resource (.rc) format support +SPELLCHECK_DESC=Enchant spellchecking system +SUBTITLES_DESC= Subtitles format support +#TMSERVER_DESC= Tmserver backend support +TRADOS_DESC= Trados format support +#YAML_DESC= YAML format support -OPTIONAL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aeidon>=1.7.0:textproc/py-aeidon@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4.3:www/py-beautifulsoup@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}chardet>=3.0.4:textproc/py-chardet@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}iniparse>=0.5:devel/py-iniparse@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}phply>=1.2.5:devel/py-phply@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pycountry>=20.7.3:textproc/py-pycountry@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}enchant>=3.1.1:textproc/py-enchant@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pyparsing>=2.4.7:devel/py-pyparsing@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}python-Levenshtein>=0.12:devel/py-python-Levenshtein@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}vobject>=0.9.6.1:deskutils/py-vobject@${PY_FLAVOR} -# ${PYTHON_PKGNAMEPREFIX}cheroot>=8.4.5:www/py-cheroot@${PY_FLAVOR} -# ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.16.12:devel/py-ruamel.yaml@${PY_FLAVOR} -OPTIONAL_MANPAGES= ical2po ini2po php2po po2ical po2ini po2php po2rc rc2po -#OPTIONAL_MANPAGES= ical2po ini2po php2po po2ical po2ini po2php po2rc po2yaml rc2po yaml2po +ENCODING_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}chardet>=3.0.4:textproc/py-chardet@${PY_FLAVOR} +ICAL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}vobject>=0.9.6.1:deskutils/py-vobject@${PY_FLAVOR} +ICAL_VARS= MANPAGES+="ical2po po2ical" +INI_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}iniparse>=0.5:devel/py-iniparse@${PY_FLAVOR} +INI_VARS= MANPAGES+="ini2po po2ini" +LANGUAGES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycountry>=20.7.3:textproc/py-pycountry@${PY_FLAVOR} +LEVENSHTEIN_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}python-Levenshtein>=0.12:devel/py-python-Levenshtein@${PY_FLAVOR} +PHP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}phply>=1.2.5:devel/py-phply@${PY_FLAVOR} +PHP_VARS= MANPAGES+="php2po po2php" +RC_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyparsing>=2.4.7:devel/py-pyparsing@${PY_FLAVOR} +RC_VARS= MANPAGES+="po2rc rc2po" +SPELLCHECK_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}enchant>=3.1.1:textproc/py-enchant@${PY_FLAVOR} +SUBTITLES_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aeidon>=1.7.0:textproc/py-aeidon@${PY_FLAVOR} +#TMSERVER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cheroot>=8.4.5:www/py-cheroot@${PY_FLAVOR} +TRADOS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}beautifulsoup>=4.3:www/py-beautifulsoup@${PY_FLAVOR} +#YAML_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.16.12:devel/py-ruamel.yaml@${PY_FLAVOR} +#YAML_VARS= MANPAGES+="po2yaml yaml2po" + +.include post-build: @${MKDIR} ${WRKSRC}/manpages @@ -53,11 +69,6 @@ post-build: cd ${WRKSRC}/build/lib/translate/convert && ${SETENV} PYTHONPATH=${WRKSRC}/build/lib ${PYTHON_CMD} ${manpage}.py --man > ${WRKSRC}/manpages/${manpage}.1 .endfor -post-build-OPTIONAL-on: -.for manpage in ${OPTIONAL_MANPAGES} - cd ${WRKSRC}/build/lib/translate/convert && ${SETENV} PYTHONPATH=${WRKSRC}/build/lib ${PYTHON_CMD} ${manpage}.py --man > ${WRKSRC}/manpages/${manpage}.1 -.endfor - post-install: cd ${WRKSRC}/manpages && ${INSTALL_MAN} * ${STAGEDIR}${PREFIX}/share/man/man1 diff --git a/textproc/translate-toolkit/pkg-plist b/textproc/translate-toolkit/pkg-plist index 921879fb7610..f6281767bee0 100644 --- a/textproc/translate-toolkit/pkg-plist +++ b/textproc/translate-toolkit/pkg-plist @@ -3,30 +3,30 @@ share/man/man1/csv2tbx.1.gz share/man/man1/dtd2po.1.gz share/man/man1/flatxml2po.1.gz share/man/man1/html2po.1.gz -%%OPTIONAL%%share/man/man1/ical2po.1.gz +%%ICAL%%share/man/man1/ical2po.1.gz share/man/man1/idml2po.1.gz -%%OPTIONAL%%share/man/man1/ini2po.1.gz +%%INI%%share/man/man1/ini2po.1.gz share/man/man1/json2po.1.gz share/man/man1/moz2po.1.gz share/man/man1/mozlang2po.1.gz share/man/man1/odf2xliff.1.gz share/man/man1/oo2po.1.gz share/man/man1/oo2xliff.1.gz -%%OPTIONAL%%share/man/man1/php2po.1.gz +%%PHP%%share/man/man1/php2po.1.gz share/man/man1/po2csv.1.gz share/man/man1/po2dtd.1.gz share/man/man1/po2flatxml.1.gz share/man/man1/po2html.1.gz -%%OPTIONAL%%share/man/man1/po2ical.1.gz +%%ICAL%%share/man/man1/po2ical.1.gz share/man/man1/po2idml.1.gz -%%OPTIONAL%%share/man/man1/po2ini.1.gz +%%INI%%share/man/man1/po2ini.1.gz share/man/man1/po2json.1.gz share/man/man1/po2moz.1.gz share/man/man1/po2mozlang.1.gz share/man/man1/po2oo.1.gz -%%OPTIONAL%%share/man/man1/po2php.1.gz +%%PHP%%share/man/man1/po2php.1.gz share/man/man1/po2prop.1.gz -%%OPTIONAL%%share/man/man1/po2rc.1.gz +%%RC%%share/man/man1/po2rc.1.gz share/man/man1/po2resx.1.gz share/man/man1/po2sub.1.gz share/man/man1/po2symb.1.gz @@ -37,10 +37,10 @@ share/man/man1/po2txt.1.gz share/man/man1/po2web2py.1.gz share/man/man1/po2wordfast.1.gz share/man/man1/po2xliff.1.gz -@comment %%OPTIONAL%%share/man/man1/po2yaml.1.gz +@comment %%YAML%%share/man/man1/po2yaml.1.gz share/man/man1/pot2po.1.gz share/man/man1/prop2po.1.gz -%%OPTIONAL%%share/man/man1/rc2po.1.gz +%%RC%%share/man/man1/rc2po.1.gz share/man/man1/resx2po.1.gz share/man/man1/sub2po.1.gz share/man/man1/symb2po.1.gz @@ -51,4 +51,4 @@ share/man/man1/txt2po.1.gz share/man/man1/web2py2po.1.gz share/man/man1/xliff2odf.1.gz share/man/man1/xliff2oo.1.gz -@comment %%OPTIONAL%%share/man/man1/yaml2po.1.gz +@comment %%YAML%%share/man/man1/yaml2po.1.gz