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