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

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

editors/MacVim:
Adding license_noconflict for python27, which is only used for evaluation of
build scripts during compilation

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