Files
2026-03-04 15:20:20 -05:00

107 lines
3.7 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
github.setup rrthomas enchant 2.8.15 v
revision 0
checksums rmd160 91d1ba588e2d517a791fffeabf16ddd83c55e2b9 \
sha256 d3fd9e4170bfb5110b0bda577fe764a38fb606b3c25d2f0c3840234521ff1252 \
size 1273237
name enchant2
categories textproc devel
maintainers {ryandesign @ryandesign} openmaintainer
license LGPL-2.1+
description Generic spell checking library
long_description Enchant aims to provide a simple but comprehensive abstraction for dealing \
with different spell checking libraries in a consistent way. Installs in \
parallel with legacy Enchant 1.x versions without conflict.
homepage https://rrthomas.github.io/enchant/
github.tarball_from releases
depends_build-append \
bin:groff:groff \
path:bin/pkg-config:pkgconfig
depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2
compiler.c_standard 1999
compiler.cxx_standard 2011
# https://trac.macports.org/wiki/WimplicitFunctionDeclaration#strchr
configure.checks.implicit_function_declaration.whitelist-append strchr
configure.args --without-hunspell \
--without-applespell \
--without-aspell \
--without-voikko \
--without-hspell \
--without-nuspell \
--without-zemberek \
--disable-silent-rules \
--disable-gcc-warnings
# to allow parallel install with enchant 1.x
build.cmd-append pkgdatadir=${prefix}/share/enchant-2
# https://trac.macports.org/ticket/51287
# https://trac.macports.org/ticket/56222
if {${os.platform} eq "darwin" && ${os.major} >= 15} {
# users most likely have AppleSpell already set up for their language
default_variants +applespell
} else {
default_variants +aspell
}
variant aspell description {Enable aspell backend} {
configure.args-replace --without-aspell --with-aspell
configure.args-append --with-aspell-dir=${prefix}/share/aspell
depends_lib-append port:aspell
depends_run port:aspell-dict-en
}
variant hunspell description {Enable hunspell backend} {
configure.args-replace --without-hunspell --with-hunspell
configure.args-append --with-hunspell-dir=${prefix}/share/hunspell
depends_lib-append port:hunspell
depends_run-append port:hunspell-en_US
}
variant nuspell description {Enable nuspell backend} {
configure.args-replace --without-nuspell --with-nuspell
configure.args-append --with-nuspell-dir=${prefix}/share/hunspell
depends_lib-append port:nuspell
depends_run-append port:hunspell-en_US
}
variant applespell description {Enable AppleSpell backend, using system-wide macOS spell checker} {
configure.args-replace --without-applespell --with-applespell
}
if {[variant_isset aspell] || [variant_isset hunspell]} {
notes {
enchant2 will use the first backend that provides a dictionary for the\
requested language. If you prefer a specific backend, please see the\
man page how you can change the lookup order. By default, the backend\
order is hunspell, aspell, AppleSpell from highest to lowest\
preference.
$ man enchant-2
}
}
variant test {
depends_build-append \
port:unittest-cpp
configure.args-append \
--enable-relocatable
test.run yes
test.target check
}