Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
213 lines (180 sloc) 8.15 KB
PortSystem 1.0
PortGroup github 1.0
PortGroup compiler_blacklist_versions 1.0
set vim_version 8.1
set snapshot 153
github.setup macvim-dev macvim ${snapshot} snapshot-
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 aaa534532c11d211d83612d77e7afefe88bff77a \
sha256 857fcc96e9e8042c8610a1f97a2a6c0ea1d10a892e781a0b47174e90817326f0 \
size 20250777
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-MacVim-GCC-VERSION.diff \
patch-remove-sparkle.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
}
post-patch {
# recompile patched .nib
foreach nib {Preferences MainMenu} {
ui_info "---> Running ibtool for ${nib}.nib"
system -W ${worksrcpath} "ibtool --compile src/MacVim/English.lproj/${nib}.nib/keyedobjects.nib src/MacVim/English.lproj/${nib}.nib"
}
}
autoconf.cmd make autoconf
autoconf.pre_args
autoconf.args
autoconf.dir ${worksrcpath}/src
configure.args --enable-gui=macvim \
--without-x \
--without-local-dir \
--disable-gpm \
--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"
# this port does not build with the new xcode build system at present
if {[vercmp ${xcodeversion} 10.0] >= 0} {
build.args XCODEFLAGS="CACHE_ROOT=${workpath}/caches -UseNewBuildSystem=NO"
}
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 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 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 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
}
You can’t perform that action at this time.