OSDN Git Service

vim-app fix guifont
[splhack/MacPorts.git] / editors / vim-app / Portfile
1 # $Id: Portfile 48326 2009-03-19 09:31:11Z raimue@macports.org $
2
3 PortSystem          1.0
4
5 name                vim-app
6 set realname        vim
7 set vim_version     7.2
8 set vim_patchlevel  147
9 version             ${vim_version}.${vim_patchlevel}
10 revision                        2
11 categories          editors
12 maintainers         nomaintainer
13 description         Vim.app is a GUI version of the famous editor vim.
14 long_description    This port provides Vim.app, a GUI version of the famous editor vim. \
15                         Vim is a highly configurable text editor built to enable efficient text editing.
16 homepage            http://www.vim.org/
17 platforms           darwin
18
19 use_bzip2           yes
20
21 distfiles \
22     [suffix ${realname}-${vim_version}]:vim \
23     ${realname}-${vim_version}-extra.tar.gz:extra \
24     ${realname}-${vim_version}-lang.tar.gz:extra \
25     app-bm.tar.gz:app_aqua \
26     doc.tar.gz:doc_aqua
27
28 checksums \
29   [suffix ${realname}-${vim_version}] \
30     md5     f0901284b338e448bfd79ccca0041254 \
31     sha1    a4b6641ca528fada71ea77c998a441495ed4984c \
32     rmd160  eaff64d0fec09d725addf8de569f508b80a5766e \
33   ${realname}-${vim_version}-extra.tar.gz \
34     md5     35e04482f07c57221c9a751aaa3b8dac \
35     sha1    6a17629093e59958bff336b6c122dea1b8b1b649 \
36     rmd160  05976466c8a6c1bd2fb2b1d58eb4613947de07df \
37   ${realname}-${vim_version}-lang.tar.gz \
38     md5     d8884786979e0e520c112faf2e176f05 \
39     sha1    970e0dda7e5b2308cf33488be1ea33d593d951cb \
40     rmd160  946bd64fbf030b341cc13bee7101f2c0acb26ce2 \
41   app-bm.tar.gz \
42     md5 418b9e615a34ae5aad918f5c5a694a44 \
43   doc.tar.gz \
44     md5 692f7874fc617162d0fe110daf39a98a
45
46 patchfiles          patch-src_auto_configure.diff
47
48 distname            ${realname}[strsed ${vim_version} {g/\.//}]
49 dist_subdir         ${distname}
50
51 master_sites-append \
52     http://www.douglas.stebila.ca/files/code/vim/app/:app_aqua \
53     http://www.douglas.stebila.ca/files/code/vim/doc/:doc_aqua
54
55 depends_build       bin:gnutar:gnutar \
56                     bin:grep:grep
57 depends_lib         port:ncurses \
58                     port:gettext \
59                     port:libiconv \
60                     port:ctags
61
62 configure.pre_args  --prefix=${applications_dir}
63 configure.args      --without-x \
64                     --disable-gpm \
65                     --mandir=${prefix}/share/man \
66                     --with-tlib=ncurses \
67                     --enable-multibyte \
68                     --with-features=huge
69 configure.cppflags  -I${prefix}/include
70 configure.ldflags   -L${prefix}/lib
71
72 extract.only        [suffix ${realname}-${vim_version}]
73 post-extract {
74     system "gnutar xvfz ${distpath}/${realname}-${vim_version}-extra.tar.gz -C \
75       ${workpath}"
76     system "gnutar xvfz ${distpath}/${realname}-${vim_version}-lang.tar.gz -C \
77       ${workpath}"
78     system "gnutar xvfz ${distpath}/app-bm.tar.gz -C ${workpath}"
79     system "gnutar xvfz ${distpath}/doc.tar.gz -C ${workpath}"
80 }
81
82 use_parallel_build  yes
83
84 test.run            yes
85
86 pre-destroot {
87     xinstall -d ${destroot}${applications_dir}
88 }
89
90 destroot {
91     # copy Vim.app
92     file copy ${worksrcpath}/src/Vim.app ${destroot}${applications_dir}
93     xinstall -m 644 ${workpath}/doc-txt.icns \
94       ${destroot}${applications_dir}/Vim.app/Contents/Resources
95     xinstall -m 644 ${workpath}/app.icns \
96       ${destroot}${applications_dir}/Vim.app/Contents/Resources/gui_mac.icns
97     # remove the broken link to 'runtime', copy the folder instead
98     set runtimePath \
99       "${destroot}${applications_dir}/Vim.app/Contents/Resources/vim/runtime"
100     file delete ${runtimePath}
101     file copy ${worksrcpath}/runtime ${runtimePath}
102     # fix permissions
103     foreach f [glob ${runtimePath}/autoload/*.vim] {
104             file attributes ${f} -permissions 0644
105     }
106     # install launchscript
107     xinstall -m 755 ${filespath}/gvim.sh ${destroot}/${prefix}/bin/gvim
108     reinplace "s|@APPPATH@|${applications_dir}|g" ${destroot}/${prefix}/bin/gvim
109
110     # allow for Vim.App to open .nfo, .vim, .latex, .tex, .diff files
111     system "patch -d ${destroot}${applications_dir}/Vim.app/Contents/ -p0 < ${filespath}/patch-Info.plist"
112 }
113
114 # general vim variants
115
116 variant xim description {Build with support for X Input Method} {
117     configure.args-append --with-xim
118 }
119
120 variant perl description {Enable Perl scripting} {
121     configure.args-append   --enable-perlinterp
122     depends_lib-append      path:bin/perl:perl5
123 }
124 variant python description {Enable Python scripting} {
125     configure.args-append   --enable-pythoninterp
126     depends_lib-append      bin:python:python25
127 }
128 variant ruby description {Enable Ruby scripting} {
129     configure.args-append   --enable-rubyinterp
130     configure.env-append    ARCHFLAGS="-L${prefix}/lib"
131     depends_lib-append      bin:ruby:ruby
132 }
133 variant tcl description {Enable Tcl scripting} {
134     configure.args-append   --enable-tclinterp
135     depends_lib-append      port:tcl
136 }
137
138 variant cscope description {Enable source code browsing with cscope} {
139     configure.args-append   --enable-cscope
140 }
141
142 platform darwin ppc {
143     post-destroot {
144         system "gnutar xvfz ${filespath}/GVim_app.tar.gz -C ${destroot}${applications_dir}/"
145         xinstall -m 644 ${workpath}/app.icns ${destroot}${applications_dir}/Vim.app/Contents/Resources/appIcon.icns
146     }
147 }
148
149 include serverlist
150 include patchlist
151
152 livecheck.check regex
153 livecheck.url   http://ftp.vim.org/pub/${realname}/patches/${vim_version}/?O=D
154 livecheck.regex (${vim_version}\.\\d+)
155
156 include gdb
157 include kaoriya