Ticket #47090: Portfile

File Portfile, 7.0 KB (added by joelfred@…, 10 years ago)

Portfile for Snapshot 74

Line 
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
4PortSystem          1.0
5PortGroup           compiler_blacklist_versions 1.0
6
7name                MacVim
8set vim_version     7.4
9set snapshot        74
10set gitcommit       snapshot-${snapshot}
11version             ${vim_version}.snapshot${snapshot}
12categories          editors
13platforms           darwin
14license             Vim GPL-2+
15maintainers         raimue
16description         MacVim is a GUI version of vim for Mac OS X
17long_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.
20homepage            http://code.google.com/p/macvim
21
22master_sites        http://github.com/douglasdrumond/macvim/archive
23distfiles           snapshot-${snapshot}.zip
24checksums           snapshot-${snapshot}.zip \
25                    rmd160  65aba3f7e16c2e9b59ad1984d92b904eba6d4d87 \
26                    sha256  05b46b80dd5ee8324ae8f83d404169b7b25ea323891a69cadd31eb38449b71c1
27use_zip             yes
28worksrcdir          ${name}
29extract.only        snapshot-${snapshot}.zip
30
31depends_build       bin:gnutar:gnutar \
32                    bin:grep:grep \
33                    bin:autoconf:autoconf \
34                    port:python27
35depends_lib         port:ncurses \
36                    port:gettext \
37                    port:libiconv
38
39if ![variant_isset python27] {
40    # python is only used for build scripts, no linking
41    license_noconflict  python27
42}
43
44patchfiles          patch-src-MacVim-icons-python.diff \
45                    patch-MacVim-GCC-VERSION.diff \
46                    patch-compat-sigaltstack.diff
47
48pre-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
56compiler.blacklist  macports-clang-2.9 macports-clang-3.0 {clang < 400}
57
58post-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
67post-patch {
68    reinplace "s|^# VIM_APP_DIR=/Applications$|VIM_APP_DIR=${applications_dir}|" \
69         ${worksrcpath}/src/MacVim/mvim
70}
71
72autoconf.dir        ${worksrcpath}/src
73
74configure.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
82build.args          XCODEFLAGS="CACHE_ROOT=${workpath}/caches" \
83                    PYTHON=${prefix}/bin/python2.7
84
85destroot {
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
96test.run            yes
97
98if {![variant_isset big] && ![variant_isset huge]} {
99    default_variants +huge
100}
101
102variant big description {Build big feature set} conflicts huge {
103    configure.args-append --with-features=big
104}
105variant huge description {Build huge feature set} conflicts big {
106    configure.args-append --with-features=huge
107}
108variant xim description {Build with support for X Input Method} {
109    configure.args-append --with-xim
110}
111
112variant 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
118variant python25 requires python27 description {Legacy variant} {}
119variant python31 requires python34 description {Legacy variant} {}
120variant python32 requires python34 description {Legacy variant} {}
121
122variant 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}
129variant 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}
136variant 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}
145variant 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}
154variant ruby requires ruby18 description {Compatibility variant, requires +ruby18} {}
155variant 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}
160variant 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}
165variant 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}
170variant 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}
178variant lua description {Enable Lua scripting} {
179    configure.args-append   --enable-luainterp \
180                            --with-lua-prefix=${prefix}
181    depends_lib-append      port:lua
182}
183
184variant cscope description {Enable source code browsing with cscope} {
185    configure.args-append   --enable-cscope
186}
187
188
189livecheck.type          regex
190livecheck.url           https://github.com/douglasdrumond/macvim/releases
191livecheck.version       ${snapshot}
192livecheck.regex         snapshot-(\\d+)