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

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

license formatting: VimLicense -> Vim

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