source: trunk/dports/editors/MacVim/Portfile @ 101469

Last change on this file since 101469 was 101469, checked in by raimue@…, 7 years ago

editors/vim, editors/vim-app, editors/MacVim:
Apply default feature set variant only if nothing else is selected already.

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