OSDN Git Service

iTerm: r1738
[splhack/MacPorts.git] / editors / vim / Portfile
1 # $Id: Portfile 48326 2009-03-19 09:31:11Z raimue@macports.org $
2
3 PortSystem          1.0
4
5 name                vim
6 set vim_version     7.2
7 set vim_patchlevel  147
8 version             ${vim_version}.${vim_patchlevel}
9 categories          editors
10 maintainers         raimue
11 description         Vi \"workalike\" with many additional features
12 long_description \
13     Vim is an advanced text editor that seeks to provide the power of the   \
14     de-facto Unix editor 'Vi', with a more complete feature set.
15
16 homepage            http://www.vim.org/
17 platforms           darwin freebsd
18
19 use_bzip2           yes
20
21 distfiles \
22     [suffix ${name}-${vim_version}]:vim \
23     ${name}-${vim_version}-extra.tar.gz:extra \
24     ${name}-${vim_version}-lang.tar.gz:extra
25 checksums \
26   [suffix ${name}-${vim_version}] \
27     md5     f0901284b338e448bfd79ccca0041254 \
28     sha1    a4b6641ca528fada71ea77c998a441495ed4984c \
29     rmd160  eaff64d0fec09d725addf8de569f508b80a5766e \
30   ${name}-${vim_version}-extra.tar.gz \
31     md5     35e04482f07c57221c9a751aaa3b8dac \
32     sha1    6a17629093e59958bff336b6c122dea1b8b1b649 \
33     rmd160  05976466c8a6c1bd2fb2b1d58eb4613947de07df \
34   ${name}-${vim_version}-lang.tar.gz \
35     md5     d8884786979e0e520c112faf2e176f05 \
36     sha1    970e0dda7e5b2308cf33488be1ea33d593d951cb \
37     rmd160  946bd64fbf030b341cc13bee7101f2c0acb26ce2
38
39 patchfiles          patch-src_auto_configure.diff
40
41 distname            ${name}[strsed ${vim_version} {g/\.//}]
42 dist_subdir         ${distname}
43
44 depends_build       bin:gnutar:gnutar \
45                     bin:grep:grep
46 depends_lib         port:ncurses \
47                     port:libiconv \
48                     port:ctags
49
50 configure.args      --enable-gui=no \
51                     --without-x \
52                     --disable-gpm \
53                     --disable-nls \
54                     --mandir=${prefix}/share/man \
55                     --with-tlib=ncurses \
56                     --enable-multibyte
57
58 extract.only        [suffix ${name}-${vim_version}]
59 post-extract {
60     system "gnutar xvfz ${distpath}/${name}-${vim_version}-extra.tar.gz -C \
61       ${workpath}"
62     system "gnutar xvfz ${distpath}/${name}-${vim_version}-lang.tar.gz -C \
63       ${workpath}"
64 }
65
66 post-patch {
67         set features [open ${worksrcpath}/src/feature.h a+]
68         puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\""
69         close $features
70 }
71
72 use_parallel_build  yes
73
74 post-destroot {
75     ln -s ${prefix}/bin/vim ${destroot}${prefix}/bin/vi
76 }
77
78 test.run            yes
79
80 variant athena description {Build GUI version using Athena widgets} conflicts gtk1 gtk2 motif {
81     configure.args-delete   --enable-gui=no --without-x
82     configure.args-append   --enable-gui=athena --with-x --disable-darwin
83     depends_lib-append      port:xorg-libXaw
84 }
85 variant gtk1 description {Build GUI version using GTK 1.x widgets} conflicts athena gtk2 motif {
86     configure.args-delete   --enable-gui=no --without-x
87     configure.args-append   --enable-gui=gtk --with-x --disable-darwin
88     depends_lib-append      port:gtk1
89 }
90 variant gtk2 description {Build GUI version using GTK 2.x widgets} conflicts athena gtk1 motif {
91     configure.args-delete   --enable-gui=no --without-x
92     configure.args-append   --enable-gui=gtk2 --with-x --disable-darwin
93     depends_lib-append      port:gtk2
94 }
95 variant motif description {Build GUI version with Motif widgets} conflicts athena gtk1 gtk2 {
96     configure.args-delete   --enable-gui=no --without-x
97     configure.args-append   --enable-gui=motif --with-x --disable-darwin
98     depends_lib-append      lib:libXm:openmotif
99 }
100
101 variant tiny description {Build tiny feature set} {
102     configure.args-append --with-features=tiny
103 }
104 variant small description {Build small feature set} conflicts tiny {
105     configure.args-append --with-features=small
106 }
107 variant big description {Build big feature set} conflicts tiny small    {
108     configure.args-append --with-features=big
109 }
110 variant huge description {Build huge feature set} conflicts tiny small big {
111     configure.args-append --with-features=huge
112 }
113 variant xim description {Build with support for X Input Method} {
114     configure.args-append --with-xim
115 }
116
117 variant perl description {Enable Perl scripting} {
118     configure.args-append   --enable-perlinterp
119     depends_lib-append      path:bin/perl:perl5
120 }
121 variant python description {Enable Python scripting} {
122     configure.args-append   --enable-pythoninterp
123     depends_lib-append      port:python25
124 }
125 variant ruby description {Enable Ruby scripting} {
126     configure.args-append   --enable-rubyinterp
127     depends_lib-append      port:ruby
128 }
129 variant tcl description {Enable Tcl scripting} {
130     configure.args-append   --enable-tclinterp
131     depends_lib-append      port:tcl
132 }
133
134 variant cscope description {Enable source code browsing with cscope} {
135     configure.args-append   --enable-cscope
136 }
137
138 variant nls {
139     configure.args-delete   --disable-nls
140     depends_lib-append      port:gettext
141 }
142
143 platform puredarwin {
144     configure.args-append --disable-darwin
145 }
146
147 include serverlist
148 include patchlist
149
150 livecheck.check regex
151 livecheck.url   http://ftp.vim.org/pub/${name}/patches/${vim_version}/?O=D
152 livecheck.regex (${vim_version}\.\\d+)
153
154 include gdb