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 | # $Id: Portfile 131243 2015-01-07 13:53:26Z raimue@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup compiler_blacklist_versions 1.0 |
---|
6 | |
---|
7 | name MacVim |
---|
8 | set vim_version 7.4 |
---|
9 | set snapshot 74 |
---|
10 | set gitcommit snapshot-${snapshot} |
---|
11 | version ${vim_version}.snapshot${snapshot} |
---|
12 | categories editors |
---|
13 | platforms darwin |
---|
14 | license Vim GPL-2+ |
---|
15 | maintainers raimue |
---|
16 | description MacVim is a GUI version of vim for Mac OS X |
---|
17 | long_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 | homepage http://code.google.com/p/macvim |
---|
21 | |
---|
22 | master_sites http://github.com/douglasdrumond/macvim/archive |
---|
23 | distfiles snapshot-${snapshot}.zip |
---|
24 | checksums snapshot-${snapshot}.zip \ |
---|
25 | rmd160 65aba3f7e16c2e9b59ad1984d92b904eba6d4d87 \ |
---|
26 | sha256 05b46b80dd5ee8324ae8f83d404169b7b25ea323891a69cadd31eb38449b71c1 |
---|
27 | use_zip yes |
---|
28 | worksrcdir ${name} |
---|
29 | extract.only snapshot-${snapshot}.zip |
---|
30 | |
---|
31 | depends_build bin:gnutar:gnutar \ |
---|
32 | bin:grep:grep \ |
---|
33 | bin:autoconf:autoconf \ |
---|
34 | port:python27 |
---|
35 | depends_lib port:ncurses \ |
---|
36 | port:gettext \ |
---|
37 | port:libiconv |
---|
38 | |
---|
39 | if ![variant_isset python27] { |
---|
40 | # python is only used for build scripts, no linking |
---|
41 | license_noconflict python27 |
---|
42 | } |
---|
43 | |
---|
44 | patchfiles patch-src-MacVim-icons-python.diff \ |
---|
45 | patch-MacVim-GCC-VERSION.diff \ |
---|
46 | patch-compat-sigaltstack.diff |
---|
47 | |
---|
48 | pre-fetch { |
---|
49 | if {${os.platform} eq "darwin" && ${os.major} < 10} { |
---|
50 | ui_error "${name} only runs on Mac OS X 10.6 or greater." |
---|
51 | return -code error "incompatible Mac OS X version" |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | # does not run correctly when build with older clang releases, see #30985 |
---|
56 | compiler.blacklist macports-clang-2.9 macports-clang-3.0 {clang < 400} |
---|
57 | |
---|
58 | post-extract { |
---|
59 | # github zipball has root folder including commitish, renaming for ease of use |
---|
60 | file rename [glob ${workpath}/macvim-snapshot-*] ${worksrcpath} |
---|
61 | |
---|
62 | # create cache directory |
---|
63 | file mkdir ${workpath}/caches |
---|
64 | } |
---|
65 | |
---|
66 | |
---|
67 | post-patch { |
---|
68 | reinplace "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \ |
---|
69 | ${worksrcpath}/src/MacVim/mvim |
---|
70 | } |
---|
71 | |
---|
72 | autoconf.dir ${worksrcpath}/src |
---|
73 | |
---|
74 | configure.args --enable-gui=macvim \ |
---|
75 | --without-x \ |
---|
76 | --disable-gpm \ |
---|
77 | --with-tlib=ncurses \ |
---|
78 | --enable-multibyte \ |
---|
79 | --enable-fail-if-missing |
---|
80 | |
---|
81 | # Old pre-compiled headers could influence build, #26723 |
---|
82 | build.args XCODEFLAGS="CACHE_ROOT=${workpath}/caches" \ |
---|
83 | PYTHON=${prefix}/bin/python2.7 |
---|
84 | |
---|
85 | destroot { |
---|
86 | copy ${worksrcpath}/src/MacVim/build/Release/MacVim.app ${destroot}${applications_dir} |
---|
87 | copy ${worksrcpath}/src/MacVim/mvim ${destroot}${prefix}/bin |
---|
88 | |
---|
89 | # Create MacVim vimdiff, view, ex equivalents |
---|
90 | ln -s mvim ${destroot}${prefix}/bin/mvimdiff |
---|
91 | ln -s mvim ${destroot}${prefix}/bin/mview |
---|
92 | # Link as mvimex as bin/mex conflicts with texlive |
---|
93 | ln -s mvim ${destroot}${prefix}/bin/mvimex |
---|
94 | } |
---|
95 | |
---|
96 | test.run yes |
---|
97 | |
---|
98 | if {![variant_isset big] && ![variant_isset huge]} { |
---|
99 | default_variants +huge |
---|
100 | } |
---|
101 | |
---|
102 | variant big description {Build big feature set} conflicts huge { |
---|
103 | configure.args-append --with-features=big |
---|
104 | } |
---|
105 | variant huge description {Build huge feature set} conflicts big { |
---|
106 | configure.args-append --with-features=huge |
---|
107 | } |
---|
108 | variant xim description {Build with support for X Input Method} { |
---|
109 | configure.args-append --with-xim |
---|
110 | } |
---|
111 | |
---|
112 | variant perl description {Enable Perl scripting} { |
---|
113 | configure.args-append --enable-perlinterp |
---|
114 | depends_lib-append path:bin/perl:perl5 |
---|
115 | } |
---|
116 | |
---|
117 | # Compatibility variants, can be removed after 2015-12-26 |
---|
118 | variant python25 requires python27 description {Legacy variant} {} |
---|
119 | variant python31 requires python34 description {Legacy variant} {} |
---|
120 | variant python32 requires python34 description {Legacy variant} {} |
---|
121 | |
---|
122 | variant python26 conflicts python27 description {Enable Python scripting} { |
---|
123 | configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.6 |
---|
124 | patchfiles-append patch-python.diff |
---|
125 | depends_lib-append port:python26 |
---|
126 | |
---|
127 | use_autoconf yes |
---|
128 | } |
---|
129 | variant python27 conflicts python26 description {Enable Python scripting} { |
---|
130 | configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.7 |
---|
131 | patchfiles-append patch-python.diff |
---|
132 | depends_lib-append port:python27 |
---|
133 | |
---|
134 | use_autoconf yes |
---|
135 | } |
---|
136 | variant python33 conflicts python34 description {Enable Python scripting} { |
---|
137 | configure.args-append --enable-python3interp --with-python3=${prefix}/bin/python3.3 |
---|
138 | patchfiles-append patch-python3.diff |
---|
139 | depends_lib-append port:python33 |
---|
140 | |
---|
141 | use_autoconf yes |
---|
142 | # Overwriting autoconf.cmd above removes dependency, add it again |
---|
143 | depends_build-append port:autoconf |
---|
144 | } |
---|
145 | variant python34 conflicts python33 description {Enable Python scripting} { |
---|
146 | configure.args-append --enable-python3interp --with-python3=${prefix}/bin/python3.4 |
---|
147 | patchfiles-append patch-python3.diff |
---|
148 | depends_lib-append port:python34 |
---|
149 | |
---|
150 | use_autoconf yes |
---|
151 | # Overwriting autoconf.cmd above removes dependency, add it again |
---|
152 | depends_build-append port:autoconf |
---|
153 | } |
---|
154 | variant ruby requires ruby18 description {Compatibility variant, requires +ruby18} {} |
---|
155 | variant ruby18 conflicts ruby19 ruby20 description {Enable Ruby scripting} { |
---|
156 | configure.args-append --enable-rubyinterp |
---|
157 | configure.args-append --with-ruby-command=${prefix}/bin/ruby1.8 |
---|
158 | depends_lib-append port:ruby |
---|
159 | } |
---|
160 | variant ruby19 conflicts ruby18 ruby20 description {Enable Ruby scripting} { |
---|
161 | configure.args-append --enable-rubyinterp |
---|
162 | configure.args-append --with-ruby-command=${prefix}/bin/ruby1.9 |
---|
163 | depends_lib-append port:ruby19 |
---|
164 | } |
---|
165 | variant ruby20 conflicts ruby18 ruby19 description {Enable Ruby scripting} { |
---|
166 | configure.args-append --enable-rubyinterp |
---|
167 | configure.args-append --with-ruby-command=${prefix}/bin/ruby2.0 |
---|
168 | depends_lib-append port:ruby20 |
---|
169 | } |
---|
170 | variant tcl description {Enable Tcl scripting} { |
---|
171 | configure.args-append --enable-tclinterp \ |
---|
172 | --with-tclsh=${prefix}/bin/tclsh |
---|
173 | patchfiles-append patch-tcl.diff |
---|
174 | depends_lib-append port:tcl |
---|
175 | |
---|
176 | use_autoconf yes |
---|
177 | } |
---|
178 | variant lua description {Enable Lua scripting} { |
---|
179 | configure.args-append --enable-luainterp \ |
---|
180 | --with-lua-prefix=${prefix} |
---|
181 | depends_lib-append port:lua |
---|
182 | } |
---|
183 | |
---|
184 | variant cscope description {Enable source code browsing with cscope} { |
---|
185 | configure.args-append --enable-cscope |
---|
186 | } |
---|
187 | |
---|
188 | |
---|
189 | livecheck.type regex |
---|
190 | livecheck.url https://github.com/douglasdrumond/macvim/releases |
---|
191 | livecheck.version ${snapshot} |
---|
192 | livecheck.regex snapshot-(\\d+) |
---|