1 | # $Id: Portfile 37850 2008-06-26 09:37:10Z raimue@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name vim |
---|
6 | set vim_version 7.2 |
---|
7 | set vim_patchlevel 0 |
---|
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 556572edfda7a319541a3bc860c7fd36 \ |
---|
28 | sha1 76f6a5a97746db06bd4786984a116793a16e3e10 \ |
---|
29 | rmd160 e43531889c12cecdcb004225105fd1dcdfff31d4 \ |
---|
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 | dist_subdir ${name} |
---|
40 | distname ${name}[strsed ${vim_version} {g/\.//}] |
---|
41 | |
---|
42 | depends_build bin:gnutar:gnutar \ |
---|
43 | bin:grep:grep |
---|
44 | depends_lib port:ncurses \ |
---|
45 | port:libiconv \ |
---|
46 | port:ctags |
---|
47 | |
---|
48 | configure.args --enable-gui=no \ |
---|
49 | --without-x \ |
---|
50 | --disable-gpm \ |
---|
51 | --disable-nls \ |
---|
52 | --mandir=${prefix}/share/man \ |
---|
53 | --with-tlib=ncurses \ |
---|
54 | --enable-multibyte |
---|
55 | |
---|
56 | extract.only [suffix ${name}-${vim_version}] |
---|
57 | post-extract { |
---|
58 | system "gnutar xvfz ${distpath}/${name}-${vim_version}-extra.tar.gz -C \ |
---|
59 | ${workpath}" |
---|
60 | system "gnutar xvfz ${distpath}/${name}-${vim_version}-lang.tar.gz -C \ |
---|
61 | ${workpath}" |
---|
62 | } |
---|
63 | |
---|
64 | post-patch { |
---|
65 | set features [open ${worksrcpath}/src/feature.h a+] |
---|
66 | puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\"" |
---|
67 | close $features |
---|
68 | } |
---|
69 | |
---|
70 | use_parallel_build yes |
---|
71 | |
---|
72 | test.run yes |
---|
73 | |
---|
74 | variant athena description {Build GUI version using Athena widgets} conflicts gtk1 gtk2 motif { |
---|
75 | configure.args-delete --enable-gui=no --without-x |
---|
76 | configure.args-append --enable-gui=athena --with-x --disable-darwin |
---|
77 | depends_lib-append lib:libX11:XFree86 |
---|
78 | } |
---|
79 | variant gtk1 description {Build GUI version using GTK 1.x widgets} conflicts athena gtk2 motif { |
---|
80 | configure.args-delete --enable-gui=no --without-x |
---|
81 | configure.args-append --enable-gui=gtk --with-x --disable-darwin |
---|
82 | depends_lib-append port:gtk1 |
---|
83 | } |
---|
84 | variant gtk2 description {Build GUI version using GTK 2.x widgets} conflicts athena gtk1 motif { |
---|
85 | configure.args-delete --enable-gui=no --without-x |
---|
86 | configure.args-append --enable-gui=gtk2 --with-x --disable-darwin |
---|
87 | depends_lib-append port:gtk2 |
---|
88 | } |
---|
89 | variant motif description {Build GUI version with Motif widgets} conflicts athena gtk1 gtk2 { |
---|
90 | configure.args-delete --enable-gui=no --without-x |
---|
91 | configure.args-append --enable-gui=motif --with-x --disable-darwin |
---|
92 | depends_lib-append port:openmotif |
---|
93 | } |
---|
94 | |
---|
95 | variant tiny description {Build tiny feature set} { |
---|
96 | configure.args-append --with-features=tiny |
---|
97 | } |
---|
98 | variant small description {Build small feature set} conflicts tiny { |
---|
99 | configure.args-append --with-features=small |
---|
100 | } |
---|
101 | variant big description {Build big feature set} conflicts tiny small { |
---|
102 | configure.args-append --with-features=big |
---|
103 | } |
---|
104 | variant huge description {Build huge feature set} conflicts tiny small big { |
---|
105 | configure.args-append --with-features=huge |
---|
106 | } |
---|
107 | variant xim description {Build with support for X Input Method} { |
---|
108 | configure.args-append --with-xim |
---|
109 | } |
---|
110 | |
---|
111 | variant perl description {Enable Perl scripting} { |
---|
112 | configure.args-append --enable-perlinterp |
---|
113 | depends_lib-append port:perl5.8 |
---|
114 | } |
---|
115 | variant python description {Enable Python scripting} { |
---|
116 | configure.args-append --enable-pythoninterp |
---|
117 | depends_lib-append port:python25 |
---|
118 | } |
---|
119 | variant ruby description {Enable Ruby scripting} { |
---|
120 | configure.args-append --enable-rubyinterp |
---|
121 | depends_lib-append port:ruby |
---|
122 | } |
---|
123 | variant tcl description {Enable Tcl scripting} { |
---|
124 | configure.args-append --enable-tclinterp |
---|
125 | depends_lib-append port:tcl |
---|
126 | } |
---|
127 | |
---|
128 | variant cscope description {Enable source code browsing with cscope} { |
---|
129 | configure.args-append --enable-cscope |
---|
130 | } |
---|
131 | |
---|
132 | variant nls { |
---|
133 | configure.args-delete --disable-nls |
---|
134 | depends_lib-append port:gettext |
---|
135 | } |
---|
136 | |
---|
137 | include serverlist |
---|
138 | include patchlist |
---|
139 | |
---|
140 | livecheck.check regex |
---|
141 | livecheck.url http://ftp.vim.org/pub/${name}/patches/${vim_version}/?O=D |
---|
142 | livecheck.regex (${vim_version}\.\\d+) |
---|