# $Id: Portfile 148903 2016-05-22 17:08:04Z jeremyhu@macports.org $ PortSystem 1.0 name enchant version 1.6.0 revision 4 categories textproc devel platforms darwin license LGPL-2.1+ maintainers nomaintainer description Spellchecker wrapping library long_description \ On the surface, Enchant appears to be a generic spell checking library. \ You can request dictionaries from it, ask if a word is correctly spelled, \ get corrections for a misspelled word, etc. but all it really does is to \ provide a uniform wrapper over several popular spell checking libraries \ including aspell, ispell and AppleSpell. homepage http://www.abisource.com/enchant/ master_sites http://www.abisource.com/downloads/${name}/${version}/ checksums md5 de11011aff801dc61042828041fb59c7 \ sha1 321f9cf0abfa1937401676ce60976d8779c39536 \ rmd160 a992034355bb36b9acabdbd400c9f4a3b996cce6 patch.pre_args -p1 depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 depends_build port:pkgconfig use_autoreconf yes autoreconf.args -fvi configure.args --disable-ispell \ --disable-myspell \ --disable-aspell \ --disable-voikko \ --disable-uspell \ --disable-hspell \ --disable-zemberek \ --with-myspell-dir=${prefix}/share/hunspell # https://trac.macports.org/ticket/51287 if {${os.platform} eq "darwin" && ${os.major} >= 13} { # users most likely have AppleSpell already set up for their language default_variants +applespell } else { default_variants +aspell } variant ispell description {Enable ispell backend} { configure.args-replace --disable-ispell --enable-ispell } variant aspell description {Enable aspell backend} { configure.args-replace --disable-aspell --enable-aspell depends_lib-append port:aspell depends_run port:aspell-dict-en } variant myspell description {Enable myspell backend, using hunspell} { configure.args-replace --disable-myspell --enable-myspell depends_lib-append port:hunspell depends_run-append port:hunspell-dict-en_US } variant applespell description {Enable AppleSpell backend, using system-wide OS X spell checker} { # the AppleSpell backend will always be built with this patch, # no configure flags required patchfiles-append patch-applespell.diff \ patch-applespell-ordering.diff } if {[variant_isset ispell] || [variant_isset aspell] || [variant_isset myspell]} { notes { enchant 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 aspell, myspell, ispell, AppleSpell from highest to lowest preference. $ man enchant } } livecheck.type regex livecheck.url http://www.abisource.com/downloads/${name}/ livecheck.regex {"(\d+(?:\.\d+)*)/"}