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

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

editors/MacVim:
Force use of llvm-gcc-4.2 if clang has been selected due to runtime problems,
closes #30985.

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