source: trunk/dports/textproc/enchant/Portfile

Last change on this file was 148903, checked in by jeremyhu@…, 18 months ago

enchant: Default to +aspell for Mountain Lion and earlier

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Portfile 148903 2016-05-22 17:08:04Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                enchant
6version             1.6.0
7revision            4
8categories          textproc devel
9platforms           darwin
10license             LGPL-2.1+
11maintainers         nomaintainer
12
13description         Spellchecker wrapping library
14long_description \
15    On the surface, Enchant appears to be a generic spell checking library. \
16    You can request dictionaries from it, ask if a word is correctly spelled, \
17    get corrections for a misspelled word, etc. but all it really does is to \
18    provide a uniform wrapper over several popular spell checking libraries \
19    including aspell, ispell and AppleSpell.
20
21homepage            http://www.abisource.com/enchant/
22master_sites        http://www.abisource.com/downloads/${name}/${version}/
23
24checksums           md5     de11011aff801dc61042828041fb59c7 \
25                    sha1    321f9cf0abfa1937401676ce60976d8779c39536 \
26                    rmd160  a992034355bb36b9acabdbd400c9f4a3b996cce6
27
28patch.pre_args      -p1
29
30depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2
31
32depends_build       port:pkgconfig
33
34use_autoreconf      yes
35autoreconf.args     -fvi
36
37configure.args      --disable-ispell \
38                    --disable-myspell \
39                    --disable-aspell \
40                    --disable-voikko \
41                    --disable-uspell \
42                    --disable-hspell \
43                    --disable-zemberek \
44                    --with-myspell-dir=${prefix}/share/hunspell
45
46# https://trac.macports.org/ticket/51287
47if {${os.platform} eq "darwin" &&  ${os.major} >= 13} {
48    # users most likely have AppleSpell already set up for their language
49    default_variants    +applespell
50} else {
51    default_variants    +aspell
52}
53
54variant ispell description {Enable ispell backend} {
55    configure.args-replace --disable-ispell --enable-ispell
56}
57
58variant aspell description {Enable aspell backend} {
59    configure.args-replace --disable-aspell --enable-aspell
60    depends_lib-append  port:aspell
61    depends_run         port:aspell-dict-en
62}
63
64variant myspell description {Enable myspell backend, using hunspell} {
65    configure.args-replace --disable-myspell --enable-myspell
66    depends_lib-append  port:hunspell
67    depends_run-append  port:hunspell-dict-en_US
68}
69
70variant applespell description {Enable AppleSpell backend, using system-wide OS X spell checker} {
71    # the AppleSpell backend will always be built with this patch,
72    # no configure flags required
73    patchfiles-append   patch-applespell.diff \
74                        patch-applespell-ordering.diff
75}
76
77if {[variant_isset ispell] || [variant_isset aspell] || [variant_isset myspell]} {
78    notes {
79        enchant will use the first backend that provides a dictionary for the
80        requested language. If you prefer a specific backend, please see the
81        man page how you can change the lookup order. By default, the backend
82        order is aspell, myspell, ispell, AppleSpell from highest to lowest
83        preference.
84
85        $ man enchant
86    }
87}
88
89livecheck.type      regex
90livecheck.url       http://www.abisource.com/downloads/${name}/
91livecheck.regex     {"(\d+(?:\.\d+)*)/"}
Note: See TracBrowser for help on using the repository browser.