source: trunk/dports/editors/nano/Portfile @ 25597

Last change on this file since 25597 was 25597, checked in by nox@…, 12 years ago

Fixed html documentation install directory.
Changed negative no_{wrap,spell} variants to positive ones.
Added variant descriptions.
Removed largefile variant as it's useless.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1# $Id: Portfile 25597 2007-05-25 21:11:32Z nox@macports.org $
2
3PortSystem 1.0
4name             nano
5version          2.0.6
6revision         1
7categories       editors
8maintainers      nox
9description      Nano's ANOther editor - enhanced free Pico Clone
10long_description \
11    GNU nano is a small and friendly text editor. Besides basic text \
12    editing, nano offers many extra features like an interactive search \
13    and replace, goto line number, auto-indentation, feature toggles, \
14    internationalization support, and filename tab completion.
15
16homepage         http://www.nano-editor.org/
17master_sites     ${homepage}dist/v[strsed ${version} {/\.[0-9]*$//}]/ gnu
18checksums        md5 619107f0fc3c4383d668cef15aa3ca32 \
19                 sha1 00102580404cdb1c8594e5f6193000d5acac2249 \
20                 rmd160 858dc7cf7137cc2b19e9084a503fe508ef734381
21
22platforms        darwin freebsd
23depends_lib      port:ncurses
24
25configure.args   --enable-nanorc \
26                 --disable-nls \
27                 --disable-wrapping-as-root \
28                 --disable-mouse \
29                 --disable-wrapping \
30                 --disable-speller \
31                 --disable-utf8
32
33destroot.target  install-strip
34
35set docdir       ${prefix}/share/doc/${name}-${version}
36
37post-destroot {
38    xinstall -m 0755 -d ${destroot}${docdir}/html
39    xinstall -m 0644 -W ${worksrcpath} AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
40        README THANKS TODO doc/nanorc.sample ${destroot}${docdir}
41    xinstall -m 0644 -W ${worksrcpath}/doc faq.html texinfo/nano.html ${destroot}${docdir}/html
42}
43
44post-install {
45    ui_msg "A sample configuration file is available at ${docdir}/nanorc.sample ."
46}
47
48variant nls description {Add NLS support} {
49    configure.args-delete   --disable-nls
50    depends_lib-append      port:gettext \
51                            port:libiconv
52}
53
54variant utf8 description {Add UTF-8 support} {
55    configure.args-append   --enable-utf8
56    configure.args-delete   --disable-utf8
57    depends_lib-append      port:ncursesw
58    depends_lib-delete      port:ncurses
59}
60
61variant wrap description \
62    {Enable wrapping (lines will be splitted to fit into the terminal width)} {
63    configure.args-delete   --disable-wrapping
64}
65
66variant spell description \
67    {Add spell-checking support (needs a spellchecker (e.g. aspell, ispell...)} {
68    configure.args-delete   --disable-speller
69}
70
71variant mouse description {Add mouse support} {
72    configure.args-delete   --disable-mouse
73
74    post-install {
75        ui_msg "Mouse support is enabled. ${name} need to be launched inside an x11 console to use it."
76    }
77}
78
79variant multibuffer description \
80    {Add multibuffer support (allow multiple files to be opened in a single nano instance)} {
81    configure.args-append   --enable-multibuffer
82}
83
84variant color description {Enable color syntax highlighting} {
85    configure.args-append   --enable-color
86
87    post-install {
88        ui_msg "Color syntax is enabled."
89        ui_msg "You should take a look at the syntax definitions in ${prefix}/share/${name} ."
90    }
91}
92
93livecheck.check regex
94livecheck.url   http://ftp.gnu.org/gnu/${name}/?M=D
95livecheck.regex ${name}-(\\d+\\.\\d+\\.\\d+)
Note: See TracBrowser for help on using the repository browser.