source: trunk/dports/editors/MacVim/Portfile

Last change on this file was 153607, checked in by raimue@…, 10 months ago

MacVim: mark OS X <= 10.7 as unsupported, #52505

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.1 KB
Line 
1# $Id: Portfile 153607 2016-10-05 20:23:30Z ryandesign@macports.org $
2
3PortSystem          1.0
4PortGroup           github 1.0
5PortGroup           compiler_blacklist_versions 1.0
6
7set vim_version     8.0
8set snapshot        110
9github.setup        macvim-dev macvim ${snapshot} snapshot-
10name                MacVim
11version             ${vim_version}.snapshot${snapshot}
12categories          editors
13platforms           darwin
14license             Vim GPL-2+
15maintainers         raimue
16description         MacVim is a GUI version of vim for Mac OS X
17long_description \
18    MacVim is a port of the text editor Vim to Mac OS X that is meant to look \
19    better and integrate more seamlessly with the Mac than vim-app.
20
21homepage            https://macvim-dev.github.io/macvim/
22
23checksums           rmd160  08b672b2969c6a41ae3a85ec9a1306bc5d6f6a02 \
24                    sha256  d8b67a8bbb0893f6dfdc33d902aeafde4e6dfa4d63e650b3160aa30bf0e3d0c6
25
26depends_build       bin:grep:grep
27depends_lib         port:ncurses \
28                    port:gettext \
29                    port:libiconv
30
31patchfiles          patch-MacVim-GCC-VERSION.diff \
32                    patch-remove-sparkle.diff
33
34pre-fetch {
35    if {${os.platform} eq "darwin" && ${os.major} < 12} {
36        ui_error "${name} only runs on Mac OS X 10.8 or greater."
37        return -code error "incompatible Mac OS X version"
38    }
39}
40
41# does not run correctly when build with older clang releases, see #30985
42compiler.blacklist {clang < 400}
43
44post-extract {
45    # create cache directory
46    file mkdir ${workpath}/caches
47}
48
49post-patch {
50    reinplace "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \
51         ${worksrcpath}/src/MacVim/mvim
52   
53    # recompile patched .nib
54    foreach nib {Preferences MainMenu} {
55        ui_info "--->  Running ibtool for ${nib}.nib"
56        system -W ${worksrcpath} "ibtool --compile src/MacVim/English.lproj/${nib}.nib/keyedobjects.nib src/MacVim/English.lproj/${nib}.nib"
57    }
58}
59
60autoconf.dir        ${worksrcpath}/src
61
62configure.args      --enable-gui=macvim \
63                    --without-x \
64                    --without-local-dir \
65                    --disable-gpm \
66                    --with-tlib=ncurses \
67                    --enable-multibyte \
68                    --enable-fail-if-missing \
69                    --with-compiledby="MacPorts"
70
71# Old pre-compiled headers could influence build, #26723
72build.args          XCODEFLAGS="CACHE_ROOT=${workpath}/caches"
73
74destroot {
75    copy ${worksrcpath}/src/MacVim/build/Release/MacVim.app ${destroot}${applications_dir}
76    copy ${worksrcpath}/src/MacVim/mvim ${destroot}${prefix}/bin
77
78    # Create MacVim vimdiff, view, ex equivalents
79    ln -s mvim ${destroot}${prefix}/bin/mvimdiff
80    ln -s mvim ${destroot}${prefix}/bin/mview
81    # Link as mvimex as bin/mex conflicts with texlive
82    ln -s mvim ${destroot}${prefix}/bin/mvimex
83}
84
85test.run            yes
86
87if {![variant_isset big] && ![variant_isset huge]} {
88    default_variants +huge
89}
90
91variant big description {Build big feature set} conflicts huge {
92}
93variant huge description {Build huge feature set} conflicts big {
94    configure.args-append --with-features=huge
95}
96variant xim description {Build with support for X Input Method} {
97    configure.args-append --enable-xim
98}
99
100variant perl description {Enable Perl scripting} {
101    configure.args-append   --enable-perlinterp
102    depends_lib-append      path:bin/perl:perl5
103}
104
105# Compatibility variants, can be removed after 2015-12-26
106variant python25 requires python27 description {Legacy variant} {}
107variant python31 requires python34 description {Legacy variant} {}
108variant python32 requires python34 description {Legacy variant} {}
109
110variant python26 conflicts python27 description {Enable Python scripting} {
111    configure.args-append   --enable-pythoninterp --with-python=${prefix}/bin/python2.6
112    patchfiles-append       patch-python.diff
113    depends_lib-append      port:python26
114
115    use_autoconf yes
116}
117variant python27 conflicts python26 description {Enable Python scripting} {
118    configure.args-append   --enable-pythoninterp --with-python=${prefix}/bin/python2.7
119    patchfiles-append       patch-python.diff
120    depends_lib-append      port:python27
121
122    use_autoconf yes
123}
124variant python33 conflicts python34 python35 description {Enable Python scripting} {
125    configure.args-append   --enable-python3interp --with-python3=${prefix}/bin/python3.3
126    patchfiles-append       patch-python3.diff
127    depends_lib-append      port:python33
128
129    use_autoconf yes
130    # Overwriting autoconf.cmd above removes dependency, add it again
131    depends_build-append port:autoconf
132}
133variant python34 conflicts python33 python35 description {Enable Python scripting} {
134    configure.args-append   --enable-python3interp --with-python3=${prefix}/bin/python3.4
135    patchfiles-append       patch-python3.diff
136    depends_lib-append      port:python34
137
138    use_autoconf yes
139    # Overwriting autoconf.cmd above removes dependency, add it again
140    depends_build-append port:autoconf
141}
142
143variant python35 conflicts python33 python34 description {Enable Python scripting} {
144    configure.args-append   --enable-python3interp --with-python3=${prefix}/bin/python3.5
145    patchfiles-append       patch-python3.diff
146    depends_lib-append      port:python35
147
148    use_autoconf yes
149    # Overwriting autoconf.cmd above removes dependency, add it again
150    depends_build-append port:autoconf
151}
152
153variant ruby requires ruby18 description {Compatibility variant, requires +ruby18} {}
154variant ruby18 conflicts ruby19 ruby20 ruby21 ruby22 description {Enable Ruby scripting} {
155    configure.args-append   --enable-rubyinterp
156    configure.args-append   --with-ruby-command=${prefix}/bin/ruby1.8
157    depends_lib-append      port:ruby
158}
159variant ruby19 conflicts ruby18 ruby20 ruby21 ruby22 description {Enable Ruby scripting} {
160    configure.args-append   --enable-rubyinterp
161    configure.args-append   --with-ruby-command=${prefix}/bin/ruby1.9
162    depends_lib-append      port:ruby19
163}
164variant ruby20 conflicts ruby18 ruby19 ruby21 ruby22 description {Enable Ruby scripting} {
165    configure.args-append   --enable-rubyinterp
166    configure.args-append   --with-ruby-command=${prefix}/bin/ruby2.0
167    depends_lib-append      port:ruby20
168}
169variant ruby21 conflicts ruby18 ruby19 ruby20 ruby22 description {Enable Ruby scripting} {
170    configure.args-append   --enable-rubyinterp
171    configure.args-append   --with-ruby-command=${prefix}/bin/ruby2.1
172    depends_lib-append      port:ruby21
173}
174variant ruby22 conflicts ruby18 ruby19 ruby20 ruby21 description {Enable Ruby scripting} {
175    configure.args-append   --enable-rubyinterp
176    configure.args-append   --with-ruby-command=${prefix}/bin/ruby2.2
177    depends_lib-append      port:ruby22
178}
179
180variant tcl description {Enable Tcl scripting} {
181    configure.args-append   --enable-tclinterp \
182                            --with-tclsh=${prefix}/bin/tclsh
183    patchfiles-append       patch-tcl.diff
184    depends_lib-append      port:tcl
185
186    use_autoconf yes
187}
188
189variant lua description {Enable Lua scripting} {
190    configure.args-append   --enable-luainterp \
191                            --with-lua-prefix=${prefix}
192    depends_lib-append      port:lua
193}
194
195variant cscope description {Enable source code browsing with cscope} {
196    configure.args-append   --enable-cscope
197}
Note: See TracBrowser for help on using the repository browser.