1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | |
---|
6 | # The vim port should always follow the patch level used in the MacVim port. This |
---|
7 | # is because they both share the same set of configuration files and ensures |
---|
8 | # that the user's configuration files will always work with both. |
---|
9 | set vim_version 9.0 |
---|
10 | |
---|
11 | if {${os.platform} eq "darwin" && ${os.major} <= 14} { |
---|
12 | # Fallback to previous port version, for 10.10 and earlier |
---|
13 | # https://trac.macports.org/ticket/67209 |
---|
14 | set vim_patchlevel 0472 |
---|
15 | set port_revision 0 |
---|
16 | |
---|
17 | checksums rmd160 ee809eb300deaf735c86b6e5b7f4bc4a8fe79a41 \ |
---|
18 | sha256 7185577d6cd3708b62b2079b69a29215bb6a6048070d34e960d2d565c18b8a9b \ |
---|
19 | size 16851486 |
---|
20 | } else { |
---|
21 | set vim_patchlevel 1499 |
---|
22 | set port_revision 0 |
---|
23 | |
---|
24 | checksums rmd160 10d9edf0b19197771722e4a2fcf2e36021c34fa6 \ |
---|
25 | sha256 3db98ddcbb8628ec9818da50353c4dd08d62938c80c71d38062250205310cdc3 \ |
---|
26 | size 17010976 |
---|
27 | } |
---|
28 | |
---|
29 | github.setup vim vim ${vim_version}.${vim_patchlevel} v |
---|
30 | revision ${port_revision} |
---|
31 | |
---|
32 | categories editors |
---|
33 | platforms darwin freebsd |
---|
34 | license Vim GPL-2+ |
---|
35 | maintainers {raimue @raimue} |
---|
36 | |
---|
37 | description Vi \"workalike\" with many additional features |
---|
38 | long_description Vim is an advanced text editor that seeks to provide the\ |
---|
39 | power of the de-facto Unix editor 'Vi', with a more\ |
---|
40 | complete feature set. |
---|
41 | |
---|
42 | homepage https://www.vim.org/ |
---|
43 | |
---|
44 | |
---|
45 | depends_lib-append \ |
---|
46 | port:ncurses \ |
---|
47 | port:gettext \ |
---|
48 | port:libiconv |
---|
49 | |
---|
50 | post-patch { |
---|
51 | set features [open ${worksrcpath}/src/feature.h a+] |
---|
52 | puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\"" |
---|
53 | close $features |
---|
54 | } |
---|
55 | |
---|
56 | autoconf.cmd make autoconf |
---|
57 | autoconf.pre_args |
---|
58 | autoconf.args |
---|
59 | autoconf.dir ${worksrcpath}/src |
---|
60 | |
---|
61 | configure.args-append \ |
---|
62 | --disable-gui \ |
---|
63 | --without-x \ |
---|
64 | --without-local-dir \ |
---|
65 | --disable-gpm \ |
---|
66 | --disable-canberra \ |
---|
67 | --mandir=${prefix}/share/man \ |
---|
68 | --with-tlib=ncurses \ |
---|
69 | --enable-multibyte \ |
---|
70 | --with-developer-dir=${configure.developer_dir} \ |
---|
71 | --enable-fail-if-missing \ |
---|
72 | --with-compiledby="MacPorts" |
---|
73 | |
---|
74 | post-destroot { |
---|
75 | ln -s ${prefix}/bin/vim ${destroot}${prefix}/bin/vi |
---|
76 | } |
---|
77 | |
---|
78 | test.run yes |
---|
79 | |
---|
80 | if {![variant_isset tiny] && ![variant_isset small] && ![variant_isset big] && ![variant_isset huge]} { |
---|
81 | default_variants +huge |
---|
82 | } |
---|
83 | |
---|
84 | variant x11 description {Build CLI version with X support} { |
---|
85 | configure.args-delete --without-x |
---|
86 | configure.args-append --with-x --x-includes=${prefix}/include --x-libraries=${prefix}/lib |
---|
87 | depends_lib-append port:xorg-libXt |
---|
88 | } |
---|
89 | |
---|
90 | variant athena description {Build GUI version using Athena widgets} requires x11 conflicts gtk2 gtk3 motif { |
---|
91 | configure.args-delete --disable-gui |
---|
92 | configure.args-append --enable-gui=athena --disable-darwin |
---|
93 | depends_lib-append port:xorg-libXaw |
---|
94 | } |
---|
95 | variant gtk2 description {Build GUI version using GTK 2.x widgets} requires x11 conflicts athena gtk3 motif { |
---|
96 | configure.args-delete --disable-gui |
---|
97 | configure.args-append --enable-gui=gtk2 --disable-darwin |
---|
98 | depends_lib-append path:lib/pkgconfig/gtk+-2.0.pc:gtk2 |
---|
99 | depends_build-append port:pkgconfig |
---|
100 | } |
---|
101 | variant gtk3 description {Build GUI version using GTK 3.x widgets} requires x11 conflicts athena gtk2 motif { |
---|
102 | configure.args-delete --disable-gui |
---|
103 | configure.args-append --enable-gui=gtk3 --disable-darwin |
---|
104 | depends_lib-append path:lib/pkgconfig/gtk+-3.0.pc:gtk3 |
---|
105 | depends_build-append port:pkgconfig |
---|
106 | } |
---|
107 | variant motif description {Build GUI version with Motif widgets} requires x11 conflicts athena gtk2 gtk3 { |
---|
108 | configure.args-delete --disable-gui |
---|
109 | configure.args-append --enable-gui=motif --disable-darwin |
---|
110 | depends_lib-append lib:libXm:openmotif |
---|
111 | } |
---|
112 | |
---|
113 | configure.args-append --with-features=normal |
---|
114 | set levels {tiny small big huge} |
---|
115 | foreach level ${levels} { |
---|
116 | variant ${level} description "Build ${level} feature set" conflicts {*}[lsearch -inline -all -not -exact $levels $level] " |
---|
117 | configure.args-replace --with-features=normal --with-features=$level |
---|
118 | " |
---|
119 | } |
---|
120 | |
---|
121 | variant xim description {Build with support for X Input Method} { |
---|
122 | configure.args-append --enable-xim |
---|
123 | } |
---|
124 | |
---|
125 | variant perl description {Enable Perl scripting} { |
---|
126 | configure.args-append --enable-perlinterp |
---|
127 | depends_lib-append path:bin/perl:perl5 |
---|
128 | } |
---|
129 | |
---|
130 | set pythons_suffixes {27 36 37 38 39 310 311} |
---|
131 | |
---|
132 | set pythons_ports {} |
---|
133 | foreach s ${pythons_suffixes} { |
---|
134 | lappend pythons_ports python${s} |
---|
135 | } |
---|
136 | |
---|
137 | foreach s ${pythons_suffixes} { |
---|
138 | set p python${s} |
---|
139 | set major [string index ${s} 0] |
---|
140 | set v ${major}.[string range ${s} 1 end] |
---|
141 | set i [lsearch -exact ${pythons_ports} ${p}] |
---|
142 | set c [lreplace ${pythons_ports} ${i} ${i}] |
---|
143 | variant ${p} description "Enable Python scripting" conflicts {*}${c} " |
---|
144 | if {${major} == 2} { |
---|
145 | configure.args-append --enable-pythoninterp --with-python-command=${prefix}/bin/python${v} |
---|
146 | #patchfiles-append patch-python.diff |
---|
147 | } else { |
---|
148 | configure.args-append --enable-python3interp --with-python3-command=${prefix}/bin/python${v} |
---|
149 | #patchfiles-append patch-python3.diff |
---|
150 | } |
---|
151 | depends_lib-append port:${p} |
---|
152 | use_autoconf yes |
---|
153 | # overwriting autoconf.cmd above removes dependency, add it again |
---|
154 | depends_build-append port:autoconf |
---|
155 | " |
---|
156 | } |
---|
157 | |
---|
158 | variant ruby requires ruby18 description {Compatibility variant, requires +ruby18} {} |
---|
159 | variant ruby18 conflicts ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
160 | configure.args-append --enable-rubyinterp |
---|
161 | configure.args-append --with-ruby-command=${prefix}/bin/ruby1.8 |
---|
162 | depends_lib-append port:ruby |
---|
163 | } |
---|
164 | variant ruby19 conflicts ruby18 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
165 | configure.args-append --enable-rubyinterp |
---|
166 | configure.args-append --with-ruby-command=${prefix}/bin/ruby1.9 |
---|
167 | depends_lib-append port:ruby19 |
---|
168 | } |
---|
169 | variant ruby20 conflicts ruby18 ruby19 ruby21 ruby22 ruby23 ruby24 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
170 | configure.args-append --enable-rubyinterp |
---|
171 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.0 |
---|
172 | depends_lib-append port:ruby20 |
---|
173 | } |
---|
174 | variant ruby21 conflicts ruby18 ruby19 ruby20 ruby22 ruby23 ruby24 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
175 | configure.args-append --enable-rubyinterp |
---|
176 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.1 |
---|
177 | depends_lib-append port:ruby21 |
---|
178 | } |
---|
179 | variant ruby22 conflicts ruby18 ruby19 ruby20 ruby21 ruby23 ruby24 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
180 | configure.args-append --enable-rubyinterp |
---|
181 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.2 |
---|
182 | depends_lib-append port:ruby22 |
---|
183 | } |
---|
184 | variant ruby23 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby24 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
185 | configure.args-append --enable-rubyinterp |
---|
186 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.3 |
---|
187 | depends_lib-append port:ruby23 |
---|
188 | } |
---|
189 | variant ruby24 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby23 ruby25 ruby30 description {Enable Ruby scripting} { |
---|
190 | configure.args-append --enable-rubyinterp |
---|
191 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.4 |
---|
192 | depends_lib-append port:ruby24 |
---|
193 | } |
---|
194 | variant ruby25 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby30 description {Enable Ruby scripting} { |
---|
195 | configure.args-append --enable-rubyinterp |
---|
196 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.5 |
---|
197 | depends_lib-append port:ruby25 |
---|
198 | } |
---|
199 | variant ruby30 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 description {Enable Ruby scripting} { |
---|
200 | configure.args-append --enable-rubyinterp |
---|
201 | configure.args-append --with-ruby-command=${prefix}/bin/ruby3.0 |
---|
202 | depends_lib-append port:ruby30 |
---|
203 | } |
---|
204 | |
---|
205 | variant tcl description {Enable Tcl scripting} { |
---|
206 | configure.args-append --enable-tclinterp \ |
---|
207 | --with-tclsh=${prefix}/bin/tclsh |
---|
208 | patchfiles-append patch-tcl.diff |
---|
209 | depends_lib-append port:tcl |
---|
210 | |
---|
211 | use_autoconf yes |
---|
212 | # Overwriting autoconf.cmd above removes dependency, add it again |
---|
213 | depends_build-append port:autoconf |
---|
214 | } |
---|
215 | |
---|
216 | variant lua description {Enable Lua scripting} { |
---|
217 | PortGroup lua 1.0 |
---|
218 | |
---|
219 | configure.args-append --enable-luainterp \ |
---|
220 | --with-lua-prefix=${lua.dir} |
---|
221 | } |
---|
222 | |
---|
223 | variant cscope description {Enable source code browsing with cscope} { |
---|
224 | configure.args-append --enable-cscope |
---|
225 | } |
---|
226 | |
---|
227 | platform puredarwin { |
---|
228 | configure.args-append --disable-darwin |
---|
229 | } |
---|