# $Id: Portfile 77472 2011-03-31 19:23:39Z raimue@macports.org $ PortSystem 1.0 name vim-app set realname vim set vim_version 7.3 set vim_patchlevel 146 version ${vim_version}.${vim_patchlevel} categories editors maintainers raimue 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 master_sites http://ftp.vim.org/pub/vim/unix/:vim \ http://www.douglas.stebila.ca/files/code/vim/app/:app_aqua \ http://www.douglas.stebila.ca/files/code/vim/doc/:doc_aqua patch_sites http://ftp.vim.org/pub/vim/patches/${vim_version} use_bzip2 yes distfiles vim-${vim_version}${extract.suffix}:vim \ app-bm.tar.gz:app_aqua \ doc.tar.gz:doc_aqua dist_subdir vim[strsed ${vim_version} {g/\.//}] worksrcdir vim[strsed ${vim_version} {g/\.//}] # Generate patchfiles set low 1 set patchlevel [string trimleft $vim_patchlevel 0] while {$low <= $patchlevel} { # Disabled, there is no 7.3.001-100.gz yet # set high [expr $low + 99]; # if {$high < $patchlevel} { # patchfiles-append [format "%s.%03d-%03d.gz" $vim_version $low $high] # incr low 100 # } else { patchfiles-append [format "%s.%03d" $vim_version $low] incr low 1 # } } # 7.3.021 disabled, #26792 patchfiles-delete 7.3.021 # Use MacPorts' default compilers # http://trac.macports.org/wiki/UsingTheRightCompiler patchfiles-append patch-src-Makefile.diff post-patch { reinplace "s|@@CC@@|${configure.cc}|g" ${worksrcpath}/src/Makefile } checksums \ vim-${vim_version}${extract.suffix} \ md5 5b9510a17074e2b37d8bb38ae09edbf2 \ sha1 46faa96c5fab639899b1c655c23d8755b62f036f \ rmd160 1846e7f4aa8e0a329d8360a9e05d7e93da23b4b5 \ app-bm.tar.gz \ md5 418b9e615a34ae5aad918f5c5a694a44 \ doc.tar.gz \ md5 692f7874fc617162d0fe110daf39a98a # 7.3.021 disabled, #26792 checksums-append \ 7.3.001 md5 aa5582d8289b43255f45d4bb6f62e140 \ 7.3.002 md5 2949cbdfe86f533c487fd144c5935c7a \ 7.3.003 md5 9059db41cf3a468935745242cb9c0514 \ 7.3.004 md5 9aaa4490d2fbf9a1e780a151fb41f279 \ 7.3.005 md5 bf5b5fad8c4de23449fa7c7c01969369 \ 7.3.006 md5 f53d95dfb1eee5f5f769594174d0e9d4 \ 7.3.007 md5 a7a4c56110662bc3ba6fbb2fd645d94f \ 7.3.008 md5 be756a231afe754d004b6c8a9d12bb50 \ 7.3.009 md5 f4ed2feff44e2c1898fd5e60f9f97b0d \ 7.3.010 md5 4fffed01d3683b0b8b23df600a0bada2 \ 7.3.011 md5 4ee8f06dce300c0be029bf00b03ef093 \ 7.3.012 md5 89faf7d5eef1d1d50b657fe34ee7c90b \ 7.3.013 md5 6a029d61f7d51c1bea55330732676319 \ 7.3.014 md5 d0109c0c413c405fdb827ec20f3903d8 \ 7.3.015 md5 4db0a869dbe00c360541ad2c1ca87a2d \ 7.3.016 md5 e0c634532a865d7ed47942080e371b3e \ 7.3.017 md5 f52aa5bc3df02c3bb4c75849b2b5f431 \ 7.3.018 md5 02270ecbc1dc2f57de80441ac7cdd0f0 \ 7.3.019 md5 5c1be1a0a107261e0a716c877c82fc97 \ 7.3.020 md5 ef09917435a7cab9382abe3708cf5152 \ 7.3.022 md5 c4cb1bf3fa0a45d9cad997cd02fa9439 \ 7.3.023 md5 1e34e216b0e419096f796d3511ce88da \ 7.3.024 md5 5c2ff27d8ce8d1aeb42ff16ca1cb89c2 \ 7.3.025 md5 69b3e00a17230da16d3be4b96f125196 \ 7.3.026 md5 687a80a82d05e8e91e9ee659b3e0dd67 \ 7.3.027 md5 1994a0d1e52111b9fa1b999745da93b8 \ 7.3.028 md5 2438a52f25cf167bbf5711fc8c7323d7 \ 7.3.029 md5 302ca6aa621c215736f3db069f8c2285 \ 7.3.030 md5 ceb0e12297907b13dd39fafffa731c62 \ 7.3.031 md5 acb42f7f4545a63d35396360dc2799ff \ 7.3.032 md5 56c9d1681bfc9fe5e76c281b905f0ad8 \ 7.3.033 md5 4a399b6f1bcde6d991088118f5a58222 \ 7.3.034 md5 40580589a13a36cc72a600200b93b8d2 \ 7.3.035 md5 8f7a617b0cf8fea46e4b1557bc286fda \ 7.3.036 md5 3ac58b7fe8347ad87f3628bfb4970f1b \ 7.3.037 md5 d83c7635e8b65db98a377f3cc7b72ce0 \ 7.3.038 md5 a310c68726540ac1a0759ef12778bed1 \ 7.3.039 md5 6b7243d85b86e03b4a782e4bf6d7646e \ 7.3.040 md5 8aa33a527433f1907b72ac7c514d455d \ 7.3.041 md5 979abe1512bc48dbaed028a23cb2f6cc \ 7.3.042 md5 984ce81978ef2b12b3a09986d37e4719 \ 7.3.043 md5 27b2418128b4322c3cb92b13d577ad6c \ 7.3.044 md5 c29e637b242682dc6df544a0bc89abc4 \ 7.3.045 md5 bd6ac17eecf226a2d6a31e4fb9069ded \ 7.3.046 md5 d97f518c548de06b11b5682f2ca4d9a9 \ 7.3.047 md5 ae37e72299f02ea1b7f2bb59932ed306 \ 7.3.048 md5 39aaaf13dfef317febb2442626f262f1 \ 7.3.049 md5 6469fb212e95ad83c21aaaaf8aee0f3a \ 7.3.050 md5 e40dc723ef91adee9854faceaba1e201 \ 7.3.051 md5 5611eda78907716863ebd6ebd19a000f \ 7.3.052 md5 01011da656094510c1cdabbc80c129b9 \ 7.3.053 md5 faaf035020dcf22b57fa76c998e4553b \ 7.3.054 md5 90bd11788f022dc1107f93e702734a2a \ 7.3.055 md5 5b4fe73d1c47ab36a6b0a8f5ddd2fe65 \ 7.3.056 md5 b53b7452e5b92bb1b91e9dd97e52dfcd \ 7.3.057 md5 bce5e42b7d2b7a91c332e39ed1f0eec8 \ 7.3.058 md5 1c6054466398f4612a81289de764ef5c \ 7.3.059 md5 e2cf5697e8708390e106553de68ebb2b \ 7.3.060 md5 16da4369ed89f0305cf2c3ed1bf338fc \ 7.3.061 md5 cbed85cdfe0ad4a1b7b43efc64b1531c \ 7.3.062 md5 77f08258dbf30e12914475802eeb9b3d \ 7.3.063 md5 97c878554fec3d4f9caf934c0a0c227d \ 7.3.064 md5 5f74fee465073a3eb48565300636d9db \ 7.3.065 md5 a20ea56117d918b43f5109c9c06787ed \ 7.3.066 md5 7c51cfbd55673906035df7b274b247c4 \ 7.3.067 md5 45625adbc8757b46ba9393dc136cc2e1 \ 7.3.068 md5 49b340dc261ed455c97d955517264a89 \ 7.3.069 md5 b423664733d7fd9d7de052dad8154643 \ 7.3.070 md5 b9ef636a41df5500f8437d38ab3177e2 \ 7.3.071 md5 1afcb15f38d1e4926918dbbe52356382 \ 7.3.072 md5 132f122c3b8ac49c1ad56f54c8994e3a \ 7.3.073 md5 4a387415ce192506bcb7353cd8dda3c0 \ 7.3.074 md5 e2b2af94486554c6818693fbf1e3c34e \ 7.3.075 md5 91acb2d1e70f6b7bff5e02460d4c3e62 \ 7.3.076 md5 2627b860bed5c08cead6e48986577fed \ 7.3.077 md5 2a8c6197b193a16cb273606d8afcb6b5 \ 7.3.078 md5 660b3e99b1433a4e992e087e66bc1567 \ 7.3.079 md5 f69b91c3c55ef81df257178e0af1ca73 \ 7.3.080 md5 bbe3b3aa56bde525cd4028e807014b33 \ 7.3.081 md5 d4ce2f5eab7a74f8a51a352b05fde53f \ 7.3.082 md5 75b69fb091a12c588992dd282841bde0 \ 7.3.083 md5 d6bc3caf366cc6735e35bb624701c52b \ 7.3.084 md5 c1056e5eac01e94b841ee0f6698bd996 \ 7.3.085 md5 008cab55300e4aca60b10c5da48fa64b \ 7.3.086 md5 d3ce3330380068fc0bb71e1e46715cf8 \ 7.3.087 md5 76ad849ed21f0f7ea55b5e45bf0ebb8e \ 7.3.088 md5 5fe24e8201c4a6bfb04cc1eba830c7d1 \ 7.3.089 md5 e11e017a6ec88695ed4e68823c8519c8 \ 7.3.089 md5 e11e017a6ec88695ed4e68823c8519c8 \ 7.3.090 md5 85b27ad24ccf7a0a35659104ad5d50a0 \ 7.3.091 md5 30c533bfa3ce25d6d4ae69537ac6dc5c \ 7.3.092 md5 9583f16a6bc74a69848278648692dd0b \ 7.3.093 md5 dc1df531af4c8b457291ec3fe55df57d \ 7.3.094 md5 4f2fa0bc9ddb599ad5f202474d1baaa9 \ 7.3.095 md5 527d8531d7d347784506508114eb436c \ 7.3.096 md5 07cc669cf0c531c4b9f6410350baad64 \ 7.3.097 md5 ef918a856c94f9e1ac3732e967e99421 \ 7.3.098 md5 f5d870f443d75a9849477e937774681b \ 7.3.099 md5 60fde4bc61ce362397d430b79856355b \ 7.3.100 md5 eb3795dd02ef74e825f0a41b3ae4d6d5 \ 7.3.101 md5 44b023e4248395d2ccaaac9fda15407b \ 7.3.102 md5 f1a8bcdb44fee91a060b5ef4ea8721dc \ 7.3.103 md5 fca2fd799b4b76010b2df17e6b0e0c14 \ 7.3.104 md5 bf17912c76b1bc930af41836899483ae \ 7.3.105 md5 2624889029aa8d780eea22c249d53691 \ 7.3.106 md5 8c94d914a359a1aa81b41efd00f58486 \ 7.3.107 md5 f91ca9cbbc54d8b9fca3c1884ddcce7a \ 7.3.108 md5 5963094fc8a07e5730f7557a9d8d1cf4 \ 7.3.109 md5 bd660ce14300a3110ea7638c1e11eabd \ 7.3.110 md5 ee0dc9b0b38308aa235f0b2b3e5dcea5 \ 7.3.111 md5 c91b1fb95f25fa9e0915b9e8cf613a49 \ 7.3.112 md5 67f989ce99ce53c7ab6df5478ca3a90c \ 7.3.113 md5 4da7b00c8009a2ebcef6b9dac625bd5f \ 7.3.114 md5 5b4db3de0ecef5ca677cba0aedcdff89 \ 7.3.115 md5 3aa1850a33864d0476104c12be96047d \ 7.3.116 md5 31c69a15462f16a6f7601a50a3eaf89b \ 7.3.117 md5 9c4c855111dc6acda7c05488da75c7b4 \ 7.3.118 md5 0ef3f26f6ebd0ae418dae472eb6afcc1 \ 7.3.119 md5 0010f602a56167a874739c1101da5255 \ 7.3.120 md5 6cd06c54fe40ab1082fafa461174ab23 \ 7.3.121 md5 7d4f0af28d817baea5e6c43bde1e1df2 \ 7.3.122 md5 363a24bec321be90193b60b10e29587b \ 7.3.123 md5 7f31de4c9fffd8e504685eef84666dae \ 7.3.124 md5 642c96e6a15b67f38022131b5e46132a \ 7.3.125 md5 5fc1a25eaae81f91557672a2426b74e1 \ 7.3.126 md5 6ff55983c952781418172f93374db783 \ 7.3.127 md5 84ef6940f97c7c946d136dad4ac81d3b \ 7.3.128 md5 d56e9032d55d99d19ddb9dfd8f52ccf2 \ 7.3.129 md5 4a7699f7db4032b1d67e52b3d384b647 \ 7.3.130 md5 f1a33fe74ead0aaf7a440a7432480d6f \ 7.3.131 md5 bbf7bb68b777b831029082e0e865dc2d \ 7.3.132 md5 3f761bf7b71b038dc2f775781e6847e5 \ 7.3.133 md5 7cc3bce20547604b0521be8383c9a6d0 \ 7.3.134 md5 a34e3da262050d97cb9db46acdd4490b \ 7.3.135 md5 b75499f0b035962d7f19de1e2b866f35 \ 7.3.136 md5 a3631062779f49ed4ab4bc7f87fd307c \ 7.3.137 md5 53a736c4dbf298fa465f01d06c15de0b \ 7.3.138 md5 a51e6c61c24303a90941571b6bd7753b \ 7.3.139 md5 8da651b02794bc7a34286e455e916a2f \ 7.3.140 md5 6312930f6a176305bd4f9838700605e6 \ 7.3.141 md5 2c9665b8da67d1712db9d300b87fc07c \ 7.3.142 md5 613a153f1b0901b76f0026a51f19530e \ 7.3.143 md5 c3132b4cddda5fa3c11c048c5297e872 \ 7.3.144 md5 cc8986b4f694b76cb348375c158034d6 \ 7.3.145 md5 c919c2ea5b3e5b397a53eb8fcc4accde \ 7.3.146 md5 d3790014ac6c74d4691e64a839ac0d3a depends_build bin:grep:grep depends_lib port:ncurses \ port:libiconv \ port:ctags pre-configure { if {${os.platform} == "darwin" && ${os.major} >= 10} { ui_error "${name} does not run on Mac OS X 10.6 or greater. Please use MacVim instead." return -code error "incompatible Mac OS X version" } } autoconf.cmd make autoconf autoconf.dir ${worksrcpath}/src configure.pre_args --prefix=${applications_dir} configure.args --enable-gui=carbon \ --without-x \ --disable-gpm \ --mandir=${prefix}/share/man \ --with-tlib=ncurses \ --enable-multibyte \ --with-developer-dir=${developer_dir} extract.only ${realname}-${vim_version}${extract.suffix} post-extract { system "gnutar xvfz ${distpath}/app-bm.tar.gz -C ${workpath}" system "gnutar xvfz ${distpath}/doc.tar.gz -C ${workpath}" } post-patch { set features [open ${worksrcpath}/src/feature.h a+] puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\"" close $features } test.run yes pre-destroot { xinstall -d ${destroot}${applications_dir} } destroot { # copy Vim.app file copy ${worksrcpath}/src/Vim.app ${destroot}${applications_dir} xinstall -m 644 ${filespath}/vimrc ${filespath}/gvimrc \ ${destroot}${applications_dir}/Vim.app xinstall -m 644 ${workpath}/doc-txt.icns \ ${destroot}${applications_dir}/Vim.app/Contents/Resources xinstall -m 644 ${workpath}/app.icns \ ${destroot}${applications_dir}/Vim.app/Contents/Resources/gui_mac.icns # remove the broken link to 'runtime', copy the folder instead set runtimePath \ "${destroot}${applications_dir}/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 reinplace "s|@APPPATH@|${applications_dir}|g" ${destroot}${prefix}/bin/gvim # allow for Vim.App to open .nfo, .vim, .latex, .tex, .diff files system "patch -d ${destroot}${applications_dir}/Vim.app/Contents/ -p0 < ${filespath}/patch-Info.plist.diff" } # general vim variants variant big description {Build big feature set} conflicts huge { configure.args-append --with-features=big } variant huge description {Build huge feature set} conflicts big { configure.args-append --with-features=huge } variant xim description {Build with support for X Input Method} { configure.args-append --with-xim } # FIXME: Does not work with vim 7.3 yet # variant shell description {Enables shell windows} { # # Patch taken from http://www.wana.at/vimshell/ # patchfiles-append patch-vimshell.diff # } variant perl description {Enable Perl scripting} { configure.args-append --enable-perlinterp depends_lib-append path:bin/perl:perl5 } variant python requires python25 description {Compatibility variant, requires +python25} {} variant python25 conflicts python26 python27 python31 description {Enable Python scripting} { configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.5 patchfiles-append patch-python.diff depends_lib-append port:python25 use_autoconf yes # Overwriting autoconf.cmd above removes dependency, add it again depends_build-append port:autoconf } variant python26 conflicts python25 python27 python31 description {Enable Python scripting} { configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.6 patchfiles-append patch-python.diff depends_lib-append port:python26 use_autoconf yes # Overwriting autoconf.cmd above removes dependency, add it again depends_build-append port:autoconf } variant python27 conflicts python25 python26 python31 description {Enable Python scripting} { configure.args-append --enable-pythoninterp --with-python=${prefix}/bin/python2.7 patchfiles-append patch-python.diff depends_lib-append port:python27 use_autoconf yes # Overwriting autoconf.cmd above removes dependency, add it again depends_build-append port:autoconf } variant python31 conflicts python25 python26 python27 description {Enable Python scripting} { configure.args-append --enable-python3interp --with-python=${prefix}/bin/python3.1 patchfiles-append patch-python3.diff depends_lib-append port:python31 use_autoconf yes # Overwriting autoconf.cmd above removes dependency, add it again depends_build-append port:autoconf } variant ruby description {Enable Ruby scripting} { configure.args-append --enable-rubyinterp depends_lib-append port:ruby } variant tcl description {Enable Tcl scripting} { configure.args-append --enable-tclinterp patchfiles-append patch-tcl.diff depends_lib-append port:tcl use_autoconf yes # Overwriting autoconf.cmd above removes dependency, add it again depends_build-append port:autoconf } 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 powerpc { post-destroot { xinstall -m 644 ${workpath}/app.icns ${destroot}${applications_dir}/Vim.app/Contents/Resources/appIcon.icns } } livecheck.type regex livecheck.url http://ftp.vim.org/pub/${realname}/patches/${vim_version}/?O=D livecheck.version [format "%s.%03d" $vim_version $vim_patchlevel] livecheck.regex (${vim_version}\.\\d+)