-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
229 lines (194 loc) · 9.1 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# -*- 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
PortSystem 1.0
PortGroup github 1.0
PortGroup compiler_blacklist_versions 1.0
set vim_version 8.2
set snapshot 171
github.setup macvim-dev macvim ${snapshot} snapshot-
revision 2
name MacVim
version ${vim_version}.snapshot${snapshot}
categories editors
platforms darwin
license Vim GPL-2+
maintainers {raimue @raimue}
description MacVim is a GUI version of vim for macOS
long_description \
MacVim is a port of the text editor Vim to macOS that is meant to \
integrate seamlessly with the native user interface.
homepage https://macvim-dev.github.io/macvim/
checksums rmd160 884dc22e50e9ecf5acd8754d046674849b478e97 \
sha256 51ee54b7c3b2dd5ec6d9856117ca12e90dd7694f06c8d40ca2830f375a6f8f76 \
size 22966978
depends_lib port:ncurses \
port:gettext \
port:libiconv
# MacVim does not build for arch i386
# https://trac.macports.org/ticket/54666
supported_archs x86_64
patchfiles patch-remove-updater.diff \
patch-remove-Homebrew-python.diff \
pre-fetch {
if {${os.platform} eq "darwin" && ${os.major} < 12} {
ui_error "${name} only runs on OS X 10.8 or greater."
return -code error "incompatible Mac OS X version"
}
}
# does not run correctly when build with older clang releases, see #30985
compiler.blacklist {clang < 400}
post-extract {
# create cache directory
file mkdir ${workpath}/caches
}
use_xcode yes
autoconf.cmd make autoconf
autoconf.pre_args
autoconf.args
autoconf.dir ${worksrcpath}/src
configure.args --enable-gui=macvim \
--without-x \
--without-local-dir \
--disable-sparkle \
--disable-gpm \
--disable-canberra \
--with-tlib=ncurses \
--enable-multibyte \
--enable-fail-if-missing \
--with-compiledby="MacPorts"
# Old pre-compiled headers could influence build, #26723
build.args XCODEFLAGS="CACHE_ROOT=${workpath}/caches"
if {[vercmp ${xcodeversion} 12.0] >= 0} {
build.args XCODEFLAGS="CACHE_ROOT=${workpath}/caches -UseNewBuildSystem=NO MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target} ARCHS=${configure.build_arch}"
} elseif {[vercmp ${xcodeversion} 10.0] >= 0} {
build.args XCODEFLAGS="CACHE_ROOT=${workpath}/caches -UseNewBuildSystem=NO MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}"
}
destroot {
copy ${worksrcpath}/src/MacVim/build/Release/MacVim.app ${destroot}${applications_dir}
ln -s ${applications_dir}/MacVim.app/Contents/bin/mvim ${destroot}${prefix}/bin/mvim
# Create MacVim vimdiff, view, ex equivalents
ln -s ${applications_dir}/MacVim.app/Contents/bin/mvim ${destroot}${prefix}/bin/mvimdiff
ln -s ${applications_dir}/MacVim.app/Contents/bin/mvim ${destroot}${prefix}/bin/mview
# Link as mvimex as bin/mex conflicts with texlive
ln -s ${applications_dir}/MacVim.app/Contents/bin/mvim ${destroot}${prefix}/bin/mvimex
# Create a separate dir that can be added to PATH to access non-gui MacVim tools
xinstall -d ${destroot}${prefix}/libexec/macvim
foreach bin {vim vimdiff view vi ex rvim rview} {
ln -s ${applications_dir}/MacVim.app/Contents/bin/mvim ${destroot}${prefix}/libexec/macvim/${bin}
}
}
test.run yes
if {![variant_isset big] && ![variant_isset huge]} {
default_variants +huge
}
configure.args-append --with-features=normal
set levels {big huge}
foreach level ${levels} {
variant ${level} description "Build ${level} feature set" conflicts {*}[lsearch -inline -all -not -exact $levels $level] "
configure.args-replace --with-features=normal --with-features=$level
"
}
variant xim description {Build with support for X Input Method} {
configure.args-append --enable-xim
}
variant perl description {Enable Perl scripting} {
configure.args-append --enable-perlinterp
depends_lib-append path:bin/perl:perl5
}
variant python27 description {Enable Python scripting} {
configure.args-append --enable-pythoninterp --with-python-command=${prefix}/bin/python2.7
patchfiles-append patch-python.diff
depends_lib-append port:python27
use_autoconf yes
# Overwriting autoconf.cmd above removes dependency, add it again
depends_build-append port:autoconf
}
variant python36 conflicts python37 python38 python39 description {Enable Python scripting} {
configure.args-append --enable-python3interp --with-python3-command=${prefix}/bin/python3.6
patchfiles-append patch-python3.diff
depends_lib-append port:python36
use_autoconf yes
# Overwriting autoconf.cmd above removes dependency, add it again
depends_build-append port:autoconf
}
variant python37 conflicts python36 python38 python39 description {Enable Python scripting} {
configure.args-append --enable-python3interp --with-python3-command=${prefix}/bin/python3.7
patchfiles-append patch-python3.diff
depends_lib-append port:python37
use_autoconf yes
# Overwriting autoconf.cmd above removes dependency, add it again
depends_build-append port:autoconf
}
variant python38 conflicts python36 python37 python39 description {Enable Python scripting} {
configure.args-append --enable-python3interp --with-python3-command=${prefix}/bin/python3.8
patchfiles-append patch-python3.diff
depends_lib-append port:python38
use_autoconf yes
# Overwriting autoconf.cmd above removes dependency, add it again
depends_build-append port:autoconf
}
variant python39 conflicts python36 python37 python38 description {Enable Python scripting} {
configure.args-append --enable-python3interp --with-python3-command=${prefix}/bin/python3.9
patchfiles-append patch-python3.diff
depends_lib-append port:python39
use_autoconf yes
# Overwriting autoconf.cmd above removes dependency, add it again
depends_build-append port:autoconf
}
variant ruby requires ruby18 description {Compatibility variant, requires +ruby18} {}
variant ruby18 conflicts ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby1.8
depends_lib-append port:ruby
}
variant ruby19 conflicts ruby18 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby1.9
depends_lib-append port:ruby19
}
variant ruby20 conflicts ruby18 ruby19 ruby21 ruby22 ruby23 ruby24 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby2.0
depends_lib-append port:ruby20
}
variant ruby21 conflicts ruby18 ruby19 ruby20 ruby22 ruby23 ruby24 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby2.1
depends_lib-append port:ruby21
}
variant ruby22 conflicts ruby18 ruby19 ruby20 ruby21 ruby23 ruby24 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby2.2
depends_lib-append port:ruby22
}
variant ruby23 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby24 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby2.3
depends_lib-append port:ruby23
}
variant ruby24 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby23 ruby25 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby2.4
depends_lib-append port:ruby24
}
variant ruby25 conflicts ruby18 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 description {Enable Ruby scripting} {
configure.args-append --enable-rubyinterp
configure.args-append --with-ruby-command=${prefix}/bin/ruby2.5
depends_lib-append port:ruby25
}
variant tcl description {Enable Tcl scripting} {
configure.args-append --enable-tclinterp \
--with-tclsh=${prefix}/bin/tclsh
patchfiles-append patch-tcl.diff
depends_lib-append port:tcl
use_autoconf yes
# Overwriting autoconf.cmd above removes dependency, add it again
depends_build-append port:autoconf
}
variant lua description {Enable Lua scripting} {
configure.args-append --enable-luainterp \
--with-lua-prefix=${prefix}
depends_lib-append port:lua
}
variant cscope description {Enable source code browsing with cscope} {
configure.args-append --enable-cscope
}