# $Id: Portfile 80142 2011-07-05 07:51:52Z raimue@macports.org $

PortSystem          1.0

name                vim
set vim_version     7.3
set vim_patchlevel  237
version             ${vim_version}.${vim_patchlevel}
categories          editors
maintainers         raimue
description         Vi \"workalike\" with many additional features
long_description \
    Vim is an advanced text editor that seeks to provide the power of the   \
    de-facto Unix editor 'Vi', with a more complete feature set.

homepage            http://www.vim.org/
platforms           darwin freebsd

master_sites        http://ftp.vim.org/pub/vim/unix/
patch_sites         http://ftp.vim.org/pub/vim/patches/${vim_version}
distname            vim-${vim_version}
use_bzip2           yes
dist_subdir         ${name}/${vim_version}_1
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
    # }
}

# 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

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.021 md5 53c90651baf1b4b28c99947de58deb91 \
    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 \
    7.3.147 md5 5816612acbb7e9862e71defb7e596243 \
    7.3.148 md5 7610c456812aa93bacaedb8fb90a638b \
    7.3.149 md5 7f689222db2fbbc2a1c616b4e2eb6f50 \
    7.3.150 md5 4ccdacef73da3c14360832393fd18956 \
    7.3.151 md5 0322e8b82527503b08911c3436f4e5b7 \
    7.3.152 md5 60e6111797abb558f9869b72892de126 \
    7.3.153 md5 e791726fd04b11b9293f472fe9e3cb51 \
    7.3.154 md5 1def37c933f7b1a0aaeb6bb8545e91de \
    7.3.155 md5 b1c84972297e04dead1c06c7976ebd69 \
    7.3.156 md5 05a5584d72fa02708e12de57c1dd230d \
    7.3.157 md5 bcbe4f926d7c4ce7c33f2ee163f8e481 \
    7.3.158 md5 5457a5d2d8e192662dafb4441d728b1a \
    7.3.159 md5 8a1b1e2b134e1ffe8058a1007b3f0244 \
    7.3.160 md5 f8ad1c839a70db0fd67d9a91f2c5adfe \
    7.3.161 md5 b8e6b94818cdd5d824bb5bdd71845dcf \
    7.3.162 md5 640e4dab93c97e3fc591fa139f3626a0 \
    7.3.163 md5 b718f9c84f0ef31746837aeb76584b9d \
    7.3.164 md5 3658977a1d6601e084001f4ca14990c2 \
    7.3.165 md5 2a351662b4eb7546a13a697ce6c99e2c \
    7.3.166 md5 49be67f5a924f41efd02092d5a363ea2 \
    7.3.167 md5 763d467cb7f52e65fa04abd47391c46f \
    7.3.168 md5 b03500932a593d8f8b503b7f4e597d27 \
    7.3.169 md5 2bdead87e63f14c1ad94baa4ab83ea31 \
    7.3.170 md5 55be8ac756a32da430a27684f9b8e1a8 \
    7.3.171 md5 36cc61d0b91ef0c3a580e244e4062b1c \
    7.3.172 md5 38e90f8e7c56ea752ddeef1310854679 \
    7.3.173 md5 9265e7ca265d58278475cdb4c981b8dd \
    7.3.174 md5 3e594ed292b1f2f19a5c9f4906c1479a \
    7.3.175 md5 acb7321db8f740b6671765185603a718 \
    7.3.176 md5 6712e5eebfc7132b4d23044854c29cde \
    7.3.177 md5 687088eda45ccf1fdd83e0ce18cdbeb9 \
    7.3.178 md5 44e37b259178bbea8de1aad8744b639c \
    7.3.179 md5 ef97eecd1643ae1375c2141b42ff2a8f \
    7.3.180 md5 85efa44de886e0e84914b13f7e356cd3 \
    7.3.181 md5 a41871ead65ba67d0e91f46e4ed31d74 \
    7.3.182 md5 a496deb8e705a15931566cc54de95b0e \
    7.3.183 md5 a5a93687afc2acb93caed156c5990507 \
    7.3.184 md5 79db5edf359097848c50baa8e9f1de66 \
    7.3.185 md5 5a466b6c01d84c6f3b58b409ec77147f \
    7.3.186 md5 2073073b84c308648bcc222a6e0e396b \
    7.3.187 md5 0aebb3a0fcf78937c8f4930de20fdb09 \
    7.3.188 md5 665e541c24f5571bb07354a4a6441a28 \
    7.3.189 md5 540131415452ba4cfa01332ab60571e4 \
    7.3.190 md5 55d0ac5b715fabce51a05bf8380f6c01 \
    7.3.191 md5 895a121a97504929ebd5a7a8eb67a2a3 \
    7.3.192 md5 3b957b9de63a93a30e4c1ee7e9def7c9 \
    7.3.193 md5 b37da657ae0b51f8181eb8a31d6cc4e8 \
    7.3.194 md5 c911d5f14e34c8d0c1d3abea73bc830d \
    7.3.195 md5 dc09888cdc86f980789cd22889df0bcd \
    7.3.196 md5 fb396c9c2e57daf55fdba63635208985 \
    7.3.197 md5 448eca99d96f5f5c4ddbe05e66ebf812 \
    7.3.198 md5 d977fa831208ee16503b87a3a29673fe \
    7.3.199 md5 39028c76f0b15f9d014b050fb222d24a \
    7.3.200 md5 2dd2f0cd5b9af8f127fa02b3d838dd2f \
    7.3.201 md5 c1cd1bdaa61c6ab76a39dc59926781ef \
    7.3.202 md5 88de82991d04a741c1038f8ce061c5c7 \
    7.3.203 md5 0d460c9ad9cfac6074960000ff98be7e \
    7.3.204 md5 07443373d2221a375988d58e25935599 \
    7.3.205 md5 857f19149697b27088447bbac1dac8a2 \
    7.3.206 md5 f6c7f47221c0459c7742a82163b875ec \
    7.3.207 md5 8345c7411daf0d5874569aecc00116d6 \
    7.3.208 md5 305b1a2aca53880ae175bcf5c8b8677c \
    7.3.209 md5 318086a8e28f1ef629c447410bcfd5bb \
    7.3.210 md5 fc829046b2c27d7255bd41ee53c6bdf3 \
    7.3.211 md5 3e6c6aeadc3e4442426db92774030fcc \
    7.3.212 md5 3fb34281705b6e665b9ec2dbe4529170 \
    7.3.213 md5 1c2fb1aec7b85b941d4459e65dbf6be2 \
    7.3.214 md5 d4dc20af8f15778ddea5669ee758d8c1 \
    7.3.215 md5 ab31988223b9ec68c551ef2e493049d6 \
    7.3.216 md5 8bfadd46248bbfbe7979d1d6161befc2 \
    7.3.217 md5 d42c9de414acf351e37f19af168905bc \
    7.3.218 md5 6d01c2640c6c27c4b52462d6fb932598 \
    7.3.219 md5 b723228570479525596d8ecb801d9c76 \
    7.3.220 md5 36dd4e49c8d0a7407cd3447ce11c0aff \
    7.3.221 md5 11791e6072d3237424c0f383835a4b7f \
    7.3.222 md5 4a084d6e010fc5c31a89478a918ebe53 \
    7.3.223 md5 fb57886a2e3e9791b87d68fbc9eef52f \
    7.3.224 md5 0b9747a5a0465d7fe543f8b61ffc9b06 \
    7.3.225 md5 3a36d002f35d54e7e71da0cde224534b \
    7.3.226 md5 caa99b2aba3d2f64d4da35c28d4e6ef8 \
    7.3.227 md5 4e0baffb29e3e38487c4206c78ea515c \
    7.3.228 md5 511c6f3ee0703d2b1380c72c7d296e6f \
    7.3.229 md5 14997e70581cfb6ff6f2388789171e33 \
    7.3.230 md5 17259f324289a8e398a3acfba915b979 \
    7.3.231 md5 97d5c45f8962fc301ca53ce8c5ecc7eb \
    7.3.232 md5 4601b72331313fbd68789673055020a8 \
    7.3.233 md5 d00dd333810b99a9c34ea9fe44c6dec7 \
    7.3.234 md5 e93dd1dcf4659ad7f7a31d186842180d \
    7.3.235 md5 78e79d2172140d6cb26012859d2b765e \
    7.3.236 md5 f48a731e37bb068a11615fc84b13d9b4 \
    7.3.237 md5 ae4c4ba1a880872d735e33d721847f82

depends_build       bin:grep:grep
depends_lib         port:ncurses \
                    port:libiconv \
                    port:ctags

autoconf.cmd make autoconf
autoconf.dir ${worksrcpath}/src

configure.args      --disable-gui \
                    --without-x \
                    --disable-gpm \
                    --disable-nls \
                    --mandir=${prefix}/share/man \
                    --with-tlib=ncurses \
                    --enable-multibyte \
                    --with-developer-dir=${developer_dir}

post-patch {
    set features [open ${worksrcpath}/src/feature.h a+]
    puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\""
    close $features
}

post-destroot {
    ln -s ${prefix}/bin/vim ${destroot}${prefix}/bin/vi
}

test.run            yes

variant x11 description {Build CLI version with X support} {
    configure.args-delete   --without-x
    configure.args-append   --with-x --x-includes=${prefix}/include --x-libraries=${prefix}/lib
    depends_lib-append      port:xorg-libXt
}

variant athena description {Build GUI version using Athena widgets} requires x11 conflicts gtk1 gtk2 motif {
    configure.args-delete   --disable-gui
    configure.args-append   --enable-gui=athena --disable-darwin
    depends_lib-append      port:xorg-libXaw
}
variant gtk1 description {Build GUI version using GTK 1.x widgets} requires x11 conflicts athena gtk2 motif {
    configure.args-delete   --disable-gui
    configure.args-append   --enable-gui=gtk --disable-darwin
    depends_lib-append      port:gtk1
}
variant gtk2 description {Build GUI version using GTK 2.x widgets} requires x11 conflicts athena gtk1 motif {
    configure.args-delete   --disable-gui
    configure.args-append   --enable-gui=gtk2 --disable-darwin
    depends_lib-append      port:gtk2
}
variant motif description {Build GUI version with Motif widgets} requires x11 conflicts athena gtk1 gtk2 {
    configure.args-delete   --disable-gui
    configure.args-append   --enable-gui=motif --disable-darwin
    depends_lib-append      lib:libXm:openmotif
}

variant tiny description {Build tiny feature set} {
    configure.args-append --with-features=tiny
}
variant small description {Build small feature set} conflicts tiny {
    configure.args-append --with-features=small
}
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
}

# 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 puredarwin {
    configure.args-append --disable-darwin
}

livecheck.type  regex
livecheck.url   http://ftp.vim.org/pub/${name}/patches/${vim_version}/?O=D
livecheck.version [format "%s.%03d" $vim_version $vim_patchlevel]
livecheck.regex (${vim_version}\.\\d+)
