# $Id$ PortSystem 1.0 name vim-app set realname vim set vim_version 7.1 set vim_patchlevel 172 version ${vim_version}.${vim_patchlevel} categories editors maintainers raimue@macports.org description Vim.app is a GUI version of the famous editor vim. long_description This port provides Vim.app, a GUI version of the famous editor vim. \ Vim is a highly configurable text editor built to enable efficient text editing. homepage http://www.vim.org/ platforms darwin freebsd use_bzip2 yes distfiles \ [suffix ${realname}-${vim_version}]:vim \ ${realname}-${vim_version}-extra.tar.gz:extra \ ${realname}-${vim_version}-lang.tar.gz:extra \ app-bm.tar.gz:app_aqua \ doc.tar.gz:doc_aqua checksums \ [suffix ${realname}-${vim_version}] \ md5 44c6b4914f38d6f9aa959640b89da329 \ sha1 981e1acecc4d8f15680b6e160de84aed038d857d \ rmd160 470775e0d0219cafe7e04dd91199ed7441882456 \ ${realname}-${vim_version}-extra.tar.gz \ md5 605cc7ae31bcc9d7864bb0bb6025f55d \ sha1 65581f63ff3c665e0513ba578d9e80e9e9512aa3 \ rmd160 e44bde407fb42233a8fbcc74d96a03650bf863d1 \ ${realname}-${vim_version}-lang.tar.gz \ md5 144aa049ba70621acf4247f0459f3ee7 \ sha1 7c1e2f498e1f8304879e73b88562f9036801c7ee \ rmd160 ac38dde9b2e497687f9d046786b3ce1e45f45020 \ app-bm.tar.gz \ md5 418b9e615a34ae5aad918f5c5a694a44 \ doc.tar.gz \ md5 692f7874fc617162d0fe110daf39a98a dist_subdir ${realname} distname ${realname}[strsed ${vim_version} {g/\.//}] master_sites-append \ http://www.douglas.stebila.ca/files/code/vim/app/:app_aqua \ http://www.douglas.stebila.ca/files/code/vim/doc/:doc_aqua set appPath "/Applications/MacPorts/" depends_lib port:gettext \ port:ncurses configure.pre_args --prefix=${appPath}/Vim configure.args --enable-gui=carbon \ --without-x \ --disable-gpm \ --mandir=${prefix}/share/man \ --with-tlib=ncurses \ --enable-multibyte extract.only [suffix ${realname}-${vim_version}] post-extract { system "gnutar xvfz ${distpath}/${realname}-${vim_version}-extra.tar.gz -C \ ${workpath}" system "gnutar xvfz ${distpath}/${realname}-${vim_version}-lang.tar.gz -C \ ${workpath}" system "gnutar xvfz ${distpath}/app-bm.tar.gz -C ${workpath}" system "gnutar xvfz ${distpath}/doc.tar.gz -C ${workpath}" } test.run yes destroot { # create the required directories xinstall -d -m 755 ${destroot}${appPath}Vim # copy Vim.app file copy ${worksrcpath}/src/Vim.app ${destroot}${appPath}Vim xinstall -m 644 ${filespath}/vimrc ${filespath}/gvimrc \ ${destroot}${appPath}Vim/Vim.app xinstall -m 644 ${workpath}/doc-txt.icns \ ${destroot}${appPath}Vim/Vim.app/Contents/Resources xinstall -m 644 ${workpath}/app.icns \ ${destroot}${appPath}Vim/Vim.app/Contents/Resources/gui_mac.icns # remove the broken link to 'runtime', copy the folder instead set runtimePath \ "${destroot}${appPath}Vim/Vim.app/Contents/Resources/vim/runtime" file delete ${runtimePath} file copy ${worksrcpath}/runtime ${runtimePath} # fix permissions foreach f [glob ${runtimePath}/autoload/*.vim] { file attributes ${f} -permissions 0644 } # install launchscript xinstall -m 755 ${filespath}/gvim.sh \ ${destroot}/${prefix}/bin/gvim # allow for Vim.App to open .nfo, .vim, .latex, .tex, .diff files system "patch -d ${destroot}/${appPath}Vim/Vim.app/Contents/ -p0 < ${filespath}/patch-Info.plist" # copy GVim.app (ppc only) if {![variant_isset darwin_i386]} { system "gnutar xvfz ${filespath}/GVim_app.tar.gz -C \ ${destroot}${appPath}" xinstall -m 644 ${workpath}/app.icns \ ${destroot}${appPath}GVim.app/Contents/Resources/appIcon.icns } } # vim-app specific, experimental variants. # macatsui: better antialising (experimental) # see http://wiki.macvim.org/wiki/VimPatches/ATSUI variant macatsui description {Experimental patch for better antialising} { patchfiles-append atsui.patch_mod } # general vim variants variant big description {Build big feature set} conflicts tiny small { configure.args-append --with-features=big } variant huge description {Build huge feature set} conflicts tiny small big { configure.args-append --with-features=huge } variant xim description {Build with support for X Input Method} { configure.args-append --with-xim } variant perl description {Enable Perl scripting} { configure.args-append --enable-perlinterp depends_lib-append bin:perl:perl5.8 } variant python description {Enable Python scripting} { configure.args-append --enable-pythoninterp depends_lib-append bin:python:python23 } variant ruby description {Enable Ruby scripting} { configure.args-append --enable-rubyinterp depends_lib-append bin:ruby:ruby } variant tcl description {Enable Tcl scripting} { configure.args-append --enable-tclinterp depends_lib-append bin:tclsh:tcl } variant cscope description {Enable source code browsing with cscope} { configure.args-append --enable-cscope } variant nls { configure.args-delete --disable-nls depends_lib-append port:gettext } platform darwin i386 { } include serverlist include patchlist post-patch { set features [open ${worksrcpath}/src/feature.h a+] puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\"" close $features } livecheck.check regex livecheck.url http://ftp.vim.org/pub/${realname}/patches/${vim_version}/?O=D livecheck.regex (${vim_version}\.\\d+)