source: trunk/dports/editors/vim-app/Portfile @ 111449

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

editors/vim, editors/vim-app:
Update to version 7.4.035

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 10.7 KB
Line 
1# $Id: Portfile 111449 2013-09-22 20:15:45Z raimue@macports.org $
2
3PortSystem          1.0
4
5name                vim-app
6set realname        vim
7set vim_version     7.4
8set vim_patchlevel  035
9version             ${vim_version}.${vim_patchlevel}
10categories          editors
11platforms           darwin
12license             Vim GPL-2+
13maintainers         raimue
14description         Vim.app is a GUI version of the famous editor vim.
15long_description    This port provides Vim.app, a GUI version of the famous editor vim. \
16                        Vim is a highly configurable text editor built to enable efficient text editing.
17
18homepage            http://www.vim.org/
19
20master_sites        http://ftp.vim.org/pub/vim/unix/:vim \
21                    http://www.douglas.stebila.ca/files/code/vim/app/:app_aqua \
22                    http://www.douglas.stebila.ca/files/code/vim/doc/:doc_aqua
23patch_sites         http://ftp.vim.org/pub/vim/patches/${vim_version}
24use_bzip2           yes
25distfiles           vim-${vim_version}${extract.suffix}:vim \
26                    app-bm.tar.gz:app_aqua \
27                    doc.tar.gz:doc_aqua
28dist_subdir         vim/${vim_version}
29worksrcdir          vim[strsed ${vim_version} {g/\.//}]
30
31# Generate patchfiles
32set low 1
33set patchlevel [string trimleft $vim_patchlevel 0]
34while {$low <= $patchlevel} {
35    patchfiles-append [format "%s.%03d" $vim_version $low]
36    incr low 1
37}
38
39# Use MacPorts' default compilers
40# http://trac.macports.org/wiki/UsingTheRightCompiler
41patchfiles-append   patch-src-Makefile.diff
42post-patch {
43    reinplace "s|@@CC@@|${configure.cc}|g" ${worksrcpath}/src/Makefile
44}
45
46checksums \
47  vim-${vim_version}${extract.suffix} \
48    md5     607e135c559be642f210094ad023dc65 \
49    sha1    601abf7cc2b5ab186f40d8790e542f86afca86b7 \
50    rmd160  f23f62dccdbf84cbf907a0cd38c7077a87e764ee \
51    sha256  d0f5a6d2c439f02d97fa21bd9121f4c5abb1f6cd8b5a79d3ca82867495734ade \
52  app-bm.tar.gz \
53    md5 418b9e615a34ae5aad918f5c5a694a44 \
54  doc.tar.gz \
55    md5 692f7874fc617162d0fe110daf39a98a
56
57checksums-append \
58    7.4.001 md5 f234692c9ab5265ba6ba6f55c0f81764 \
59    7.4.002 md5 a03e1a5ad3722f2011751dda977641af \
60    7.4.003 md5 e6d070f592bb6da4d8cf2f7f134425e5 \
61    7.4.004 md5 77566c96ea0feb3effd5624e02126b11 \
62    7.4.005 md5 c71f2af8c787f6b7f57be9937f925a20 \
63    7.4.006 md5 88f99b8f2e2a5eab0b054b839edc3856 \
64    7.4.007 md5 59f1c6e00ae3309a3f998e795b998be1 \
65    7.4.008 md5 6d17c2f54ed124b03d60121e9a7aa150 \
66    7.4.009 md5 e53775eb1a632e68e14d2002b8c220b4 \
67    7.4.010 md5 ed08869476205e90af14e0be02cc5cfd \
68    7.4.011 md5 b87237dfa835d07a005d3d3a8476fb34 \
69    7.4.012 md5 d058bb40d1c670529c19c3c3d3c76421 \
70    7.4.013 md5 c5d0ae4f982c57467bc330f03f1f176d \
71    7.4.014 md5 914eb6390a5a6b677c2f0ef0edefb60c \
72    7.4.015 md5 56c2924732fc886e46569a399864a5cc \
73    7.4.016 md5 35a4cf5f64dcb948bb13a2db592c168f \
74    7.4.017 md5 67f6ab40bdd3107c0731766278cfdc73 \
75    7.4.018 md5 4c8b21a64040356066c5bcc4d056bec5 \
76    7.4.019 md5 fbf7aef0eab753fcf4c4d575c76fd4bf \
77    7.4.020 md5 c6a5bc4865a5e5e8c16333d5095fd571 \
78    7.4.021 md5 a983fabe523f0c91cbeec43a16b599c9 \
79    7.4.022 md5 612b6401b7ad5a8859439dc1e257ad05 \
80    7.4.023 md5 cdd8466563a0fd4fb538dbc1606d4a42 \
81    7.4.024 md5 7720495cecc60252198c1c5056de010a \
82    7.4.025 md5 161173463dc95145c48f7691aee73f13 \
83    7.4.026 md5 8e0181a33d4cf99f3ff8f359c99af7b5 \
84    7.4.027 md5 97f5e46883edf23f873522db86e721a6 \
85    7.4.028 md5 163291f22218e69281f8b0a136252bd5 \
86    7.4.029 md5 93b6179890ea3f33da2916ef0ae3160e \
87    7.4.030 md5 8c1d1829bfce977bbe91df885673b05a \
88    7.4.031 md5 83673b79f3e04ea837aeb4f3acdf0350 \
89    7.4.032 md5 b98fc58c605dba8d14d566af3da42d15 \
90    7.4.033 md5 92a277e660a6968448d9d941df55a308 \
91    7.4.034 md5 3510a4181c7719b6c948cde1a9591a5a \
92    7.4.035 md5 83476f1ca3fd83ca39681c6315a633bf
93
94depends_build       bin:grep:grep
95depends_lib         port:ncurses \
96                    port:gettext \
97                    port:libiconv
98
99#pre-fetch {
100#    if {${os.platform} == "darwin" && ${os.major} >= 10} {
101#        ui_error "${name} does not run on Mac OS X 10.6 or greater. Please use MacVim instead."
102#        return -code error "incompatible Mac OS X version"
103#    }
104#}
105
106autoconf.cmd make autoconf
107autoconf.pre_args
108autoconf.args
109autoconf.dir ${worksrcpath}/src
110
111configure.pre_args  --prefix=${applications_dir}
112configure.args      --enable-gui=carbon \
113                    --without-x \
114                    --disable-gpm \
115                    --mandir=${prefix}/share/man \
116                    --with-tlib=ncurses \
117                    --enable-multibyte \
118                    --with-developer-dir=${developer_dir}
119
120extract.only        ${realname}-${vim_version}${extract.suffix}
121post-extract {
122    system "gnutar xvfz ${distpath}/app-bm.tar.gz -C ${workpath}"
123    system "gnutar xvfz ${distpath}/doc.tar.gz -C ${workpath}"
124}
125
126post-patch {
127        set features [open ${worksrcpath}/src/feature.h a+]
128        puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\""
129        close $features
130}
131
132test.run            yes
133
134pre-destroot {
135    xinstall -d ${destroot}${applications_dir}
136}
137
138destroot {
139    # copy Vim.app
140    file copy ${worksrcpath}/src/Vim.app ${destroot}${applications_dir}
141    xinstall -m 644 ${filespath}/vimrc ${filespath}/gvimrc \
142      ${destroot}${applications_dir}/Vim.app
143    xinstall -m 644 ${workpath}/doc-txt.icns \
144      ${destroot}${applications_dir}/Vim.app/Contents/Resources
145    xinstall -m 644 ${workpath}/app.icns \
146      ${destroot}${applications_dir}/Vim.app/Contents/Resources/gui_mac.icns
147    # remove the broken link to 'runtime', copy the folder instead
148    set runtimePath \
149      "${destroot}${applications_dir}/Vim.app/Contents/Resources/vim/runtime"
150    file delete ${runtimePath}
151    file copy ${worksrcpath}/runtime ${runtimePath}
152    # fix permissions
153    foreach f [glob ${runtimePath}/autoload/*.vim] {
154            file attributes ${f} -permissions 0644
155    }
156    # install launchscript
157    xinstall -m 755 ${filespath}/gvim.sh ${destroot}${prefix}/bin/gvim
158    reinplace "s|@APPPATH@|${applications_dir}|g" ${destroot}${prefix}/bin/gvim
159
160    # allow for Vim.App to open .nfo, .vim, .latex, .tex, .diff files
161    system "patch -d ${destroot}${applications_dir}/Vim.app/Contents/ -p0 < ${filespath}/patch-Info.plist.diff"
162}
163
164if {![variant_isset big] && ![variant_isset huge]} {
165    default_variants +huge
166}
167
168variant big description {Build big feature set} conflicts huge {
169    configure.args-append --with-features=big
170}
171variant huge description {Build huge feature set} conflicts big {
172    configure.args-append --with-features=huge
173}
174variant xim description {Build with support for X Input Method} {
175    configure.args-append --enable-xim
176}
177
178# FIXME: Does not work with vim 7.3 yet
179# variant shell description {Enables shell windows} {
180    # # Patch taken from http://www.wana.at/vimshell/
181    # patchfiles-append       patch-vimshell.diff
182# }
183
184variant perl description {Enable Perl scripting} {
185    configure.args-append   --enable-perlinterp
186    depends_lib-append      path:bin/perl:perl5
187}
188variant python requires python25 description {Compatibility variant, requires +python25} {}
189variant python25 conflicts python26 python27 description {Enable Python scripting} {
190    configure.args-append   --enable-pythoninterp --with-python=${prefix}/bin/python2.5
191    patchfiles-append       patch-python.diff
192    depends_lib-append      port:python25
193
194    use_autoconf yes
195    # Overwriting autoconf.cmd above removes dependency, add it again
196    depends_build-append port:autoconf
197}
198variant python26 conflicts python25 python27 description {Enable Python scripting} {
199    configure.args-append   --enable-pythoninterp --with-python=${prefix}/bin/python2.6
200    patchfiles-append       patch-python.diff
201    depends_lib-append      port:python26
202
203    use_autoconf yes
204    # Overwriting autoconf.cmd above removes dependency, add it again
205    depends_build-append port:autoconf
206}
207variant python27 conflicts python25 python26 description {Enable Python scripting} {
208    configure.args-append   --enable-pythoninterp --with-python=${prefix}/bin/python2.7
209    patchfiles-append       patch-python.diff
210    depends_lib-append      port:python27
211
212    use_autoconf yes
213    # Overwriting autoconf.cmd above removes dependency, add it again
214    depends_build-append port:autoconf
215}
216variant python31 conflicts python32 python33 description {Enable Python scripting} {
217    configure.args-append   --enable-python3interp --with-python3=${prefix}/bin/python3.1
218    patchfiles-append       patch-python3.diff
219    depends_lib-append      port:python31
220
221    use_autoconf yes
222    # Overwriting autoconf.cmd above removes dependency, add it again
223    depends_build-append port:autoconf
224}
225variant python32 conflicts python31 python33 description {Enable Python scripting} {
226    configure.args-append   --enable-python3interp --with-python3=${prefix}/bin/python3.2
227    patchfiles-append       patch-python3.diff
228    depends_lib-append      port:python32
229
230    use_autoconf yes
231    # Overwriting autoconf.cmd above removes dependency, add it again
232    depends_build-append port:autoconf
233}
234variant python33 conflicts python31 python32 description {Enable Python scripting} {
235    configure.args-append   --enable-python3interp --with-python3=${prefix}/bin/python3.3
236    patchfiles-append       patch-python3.diff
237    depends_lib-append      port:python33
238
239    use_autoconf yes
240    # Overwriting autoconf.cmd above removes dependency, add it again
241    depends_build-append port:autoconf
242}
243variant ruby requires ruby18 description {Compatibility variant, requires +ruby18} {}
244variant ruby18 conflicts ruby19 description {Enable Ruby scripting} {
245    configure.args-append   --enable-rubyinterp
246    configure.args-append   --with-ruby-command=${prefix}/bin/ruby1.8
247    depends_lib-append      port:ruby
248}
249variant ruby19 conflicts ruby description {Enable Ruby scripting} {
250    configure.args-append   --enable-rubyinterp
251    configure.args-append   --with-ruby-command=${prefix}/bin/ruby1.9
252    depends_lib-append      port:ruby19
253}
254variant tcl description {Enable Tcl scripting} {
255    configure.args-append   --enable-tclinterp \
256                            --with-tclsh=${prefix}/bin/tclsh
257    patchfiles-append       patch-tcl.diff
258    depends_lib-append      port:tcl
259
260    use_autoconf yes
261    # Overwriting autoconf.cmd above removes dependency, add it again
262    depends_build-append port:autoconf
263}
264
265variant cscope description {Enable source code browsing with cscope} {
266    configure.args-append   --enable-cscope
267}
268
269platform darwin powerpc {
270    post-destroot {
271        xinstall -m 644 ${workpath}/app.icns ${destroot}${applications_dir}/Vim.app/Contents/Resources/appIcon.icns
272    }
273}
274
275platform darwin 13 {
276    patchfiles-append patch-compat-darwin13.diff
277}
278
279livecheck.type  regex
280livecheck.url   http://ftp.vim.org/pub/${realname}/patches/${vim_version}/?O=D
281livecheck.version [format "%s.%03d" $vim_version $vim_patchlevel]
282livecheck.regex (${vim_version}\.\\d+)
Note: See TracBrowser for help on using the repository browser.