| 1 | # $Id$ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | |
|---|
| 5 | name vim |
|---|
| 6 | set vim_version 7.2 |
|---|
| 7 | set vim_patchlevel 042 |
|---|
| 8 | version ${vim_version}.${vim_patchlevel} |
|---|
| 9 | categories editors |
|---|
| 10 | maintainers raimue |
|---|
| 11 | description Vi \"workalike\" with many additional features |
|---|
| 12 | long_description \ |
|---|
| 13 | Vim is an advanced text editor that seeks to provide the power of the \ |
|---|
| 14 | de-facto Unix editor 'Vi', with a more complete feature set. |
|---|
| 15 | |
|---|
| 16 | homepage http://www.vim.org/ |
|---|
| 17 | platforms darwin freebsd |
|---|
| 18 | |
|---|
| 19 | use_bzip2 yes |
|---|
| 20 | |
|---|
| 21 | distfiles \ |
|---|
| 22 | [suffix ${name}-${vim_version}]:vim \ |
|---|
| 23 | ${name}-${vim_version}-extra.tar.gz:extra \ |
|---|
| 24 | ${name}-${vim_version}-lang.tar.gz:extra |
|---|
| 25 | checksums \ |
|---|
| 26 | [suffix ${name}-${vim_version}] \ |
|---|
| 27 | md5 f0901284b338e448bfd79ccca0041254 \ |
|---|
| 28 | sha1 a4b6641ca528fada71ea77c998a441495ed4984c \ |
|---|
| 29 | rmd160 eaff64d0fec09d725addf8de569f508b80a5766e \ |
|---|
| 30 | ${name}-${vim_version}-extra.tar.gz \ |
|---|
| 31 | md5 35e04482f07c57221c9a751aaa3b8dac \ |
|---|
| 32 | sha1 6a17629093e59958bff336b6c122dea1b8b1b649 \ |
|---|
| 33 | rmd160 05976466c8a6c1bd2fb2b1d58eb4613947de07df \ |
|---|
| 34 | ${name}-${vim_version}-lang.tar.gz \ |
|---|
| 35 | md5 d8884786979e0e520c112faf2e176f05 \ |
|---|
| 36 | sha1 970e0dda7e5b2308cf33488be1ea33d593d951cb \ |
|---|
| 37 | rmd160 946bd64fbf030b341cc13bee7101f2c0acb26ce2 |
|---|
| 38 | |
|---|
| 39 | distname ${name}[strsed ${vim_version} {g/\.//}] |
|---|
| 40 | dist_subdir ${distname} |
|---|
| 41 | |
|---|
| 42 | depends_build bin:gnutar:gnutar \ |
|---|
| 43 | bin:grep:grep |
|---|
| 44 | depends_lib port:ncurses \ |
|---|
| 45 | port:libiconv \ |
|---|
| 46 | port:ctags |
|---|
| 47 | |
|---|
| 48 | configure.args --enable-gui=no \ |
|---|
| 49 | --without-x \ |
|---|
| 50 | --disable-gpm \ |
|---|
| 51 | --disable-nls \ |
|---|
| 52 | --mandir=${prefix}/share/man \ |
|---|
| 53 | --with-tlib=ncurses \ |
|---|
| 54 | --enable-multibyte |
|---|
| 55 | |
|---|
| 56 | extract.only [suffix ${name}-${vim_version}] |
|---|
| 57 | post-extract { |
|---|
| 58 | system "gnutar xvfz ${distpath}/${name}-${vim_version}-extra.tar.gz -C \ |
|---|
| 59 | ${workpath}" |
|---|
| 60 | system "gnutar xvfz ${distpath}/${name}-${vim_version}-lang.tar.gz -C \ |
|---|
| 61 | ${workpath}" |
|---|
| 62 | } |
|---|
| 63 | |
|---|
| 64 | post-patch { |
|---|
| 65 | set features [open ${worksrcpath}/src/feature.h a+] |
|---|
| 66 | puts $features "#define SYS_VIMRC_FILE \"${prefix}/etc/vimrc\"" |
|---|
| 67 | close $features |
|---|
| 68 | } |
|---|
| 69 | |
|---|
| 70 | use_parallel_build yes |
|---|
| 71 | |
|---|
| 72 | post-destroot { |
|---|
| 73 | ln -s ${prefix}/bin/vim ${destroot}${prefix}/bin/vi |
|---|
| 74 | } |
|---|
| 75 | |
|---|
| 76 | test.run yes |
|---|
| 77 | |
|---|
| 78 | variant athena description {Build GUI version using Athena widgets} conflicts gtk1 gtk2 motif { |
|---|
| 79 | configure.args-delete --enable-gui=no --without-x |
|---|
| 80 | configure.args-append --enable-gui=athena --with-x --disable-darwin |
|---|
| 81 | depends_lib-append lib:libX11:XFree86 |
|---|
| 82 | } |
|---|
| 83 | variant gtk1 description {Build GUI version using GTK 1.x widgets} conflicts athena gtk2 motif { |
|---|
| 84 | configure.args-delete --enable-gui=no --without-x |
|---|
| 85 | configure.args-append --enable-gui=gtk --with-x --disable-darwin |
|---|
| 86 | depends_lib-append port:gtk1 |
|---|
| 87 | } |
|---|
| 88 | variant gtk2 description {Build GUI version using GTK 2.x widgets} conflicts athena gtk1 motif { |
|---|
| 89 | configure.args-delete --enable-gui=no --without-x |
|---|
| 90 | configure.args-append --enable-gui=gtk2 --with-x --disable-darwin |
|---|
| 91 | depends_lib-append port:gtk2 |
|---|
| 92 | } |
|---|
| 93 | variant motif description {Build GUI version with Motif widgets} conflicts athena gtk1 gtk2 { |
|---|
| 94 | configure.args-delete --enable-gui=no --without-x |
|---|
| 95 | configure.args-append --enable-gui=motif --with-x --disable-darwin |
|---|
| 96 | depends_lib-append port:openmotif |
|---|
| 97 | } |
|---|
| 98 | |
|---|
| 99 | variant tiny description {Build tiny feature set} { |
|---|
| 100 | configure.args-append --with-features=tiny |
|---|
| 101 | } |
|---|
| 102 | variant small description {Build small feature set} conflicts tiny { |
|---|
| 103 | configure.args-append --with-features=small |
|---|
| 104 | } |
|---|
| 105 | variant big description {Build big feature set} conflicts tiny small { |
|---|
| 106 | configure.args-append --with-features=big |
|---|
| 107 | } |
|---|
| 108 | variant huge description {Build huge feature set} conflicts tiny small big { |
|---|
| 109 | configure.args-append --with-features=huge |
|---|
| 110 | } |
|---|
| 111 | variant xim description {Build with support for X Input Method} { |
|---|
| 112 | configure.args-append --with-xim |
|---|
| 113 | } |
|---|
| 114 | |
|---|
| 115 | variant perl description {Enable Perl scripting} { |
|---|
| 116 | configure.args-append --enable-perlinterp |
|---|
| 117 | depends_lib-append port:perl5.8 |
|---|
| 118 | } |
|---|
| 119 | variant python description {Enable Python scripting} { |
|---|
| 120 | configure.args-append --enable-pythoninterp |
|---|
| 121 | depends_lib-append port:python25 |
|---|
| 122 | } |
|---|
| 123 | variant ruby description {Enable Ruby scripting} { |
|---|
| 124 | configure.args-append --enable-rubyinterp |
|---|
| 125 | depends_lib-append port:ruby |
|---|
| 126 | } |
|---|
| 127 | variant tcl description {Enable Tcl scripting} { |
|---|
| 128 | configure.args-append --enable-tclinterp |
|---|
| 129 | depends_lib-append port:tcl |
|---|
| 130 | } |
|---|
| 131 | |
|---|
| 132 | variant cscope description {Enable source code browsing with cscope} { |
|---|
| 133 | configure.args-append --enable-cscope |
|---|
| 134 | } |
|---|
| 135 | |
|---|
| 136 | variant nls { |
|---|
| 137 | configure.args-delete --disable-nls |
|---|
| 138 | depends_lib-append port:gettext |
|---|
| 139 | } |
|---|
| 140 | |
|---|
| 141 | platform puredarwin { |
|---|
| 142 | configure.args-append --disable-darwin |
|---|
| 143 | } |
|---|
| 144 | |
|---|
| 145 | include serverlist |
|---|
| 146 | include patchlist |
|---|
| 147 | |
|---|
| 148 | livecheck.check regex |
|---|
| 149 | livecheck.url http://ftp.vim.org/pub/${name}/patches/${vim_version}/?O=D |
|---|
| 150 | livecheck.regex (${vim_version}\.\\d+) |
|---|