Ticket #16270: Portfile

File Portfile, 4.8 KB (added by emertens@…, 16 years ago)

updated Portfile for vim @7.2.0

Line 
1# $Id: Portfile 37850 2008-06-26 09:37:10Z raimue@macports.org $
2
3PortSystem          1.0
4
5name                vim
6set vim_version     7.2
7set vim_patchlevel  0
8version             ${vim_version}.${vim_patchlevel}
9categories          editors
10maintainers         raimue
11description         Vi \"workalike\" with many additional features
12long_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
16homepage            http://www.vim.org/
17platforms           darwin freebsd
18
19use_bzip2           yes
20
21distfiles \
22    [suffix ${name}-${vim_version}]:vim \
23    ${name}-${vim_version}-extra.tar.gz:extra \
24    ${name}-${vim_version}-lang.tar.gz:extra
25checksums \
26  [suffix ${name}-${vim_version}] \
27    md5 556572edfda7a319541a3bc860c7fd36 \
28    sha1 76f6a5a97746db06bd4786984a116793a16e3e10 \
29    rmd160 e43531889c12cecdcb004225105fd1dcdfff31d4 \
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
39dist_subdir         ${name}
40distname            ${name}[strsed ${vim_version} {g/\.//}]
41
42depends_build       bin:gnutar:gnutar \
43                    bin:grep:grep
44depends_lib         port:ncurses \
45                    port:libiconv \
46                    port:ctags
47
48configure.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
56extract.only        [suffix ${name}-${vim_version}]
57post-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
64post-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
70use_parallel_build  yes
71
72test.run            yes
73
74variant athena description {Build GUI version using Athena widgets} conflicts gtk1 gtk2 motif {
75    configure.args-delete   --enable-gui=no --without-x
76    configure.args-append   --enable-gui=athena --with-x --disable-darwin
77    depends_lib-append      lib:libX11:XFree86
78}
79variant gtk1 description {Build GUI version using GTK 1.x widgets} conflicts athena gtk2 motif {
80    configure.args-delete   --enable-gui=no --without-x
81    configure.args-append   --enable-gui=gtk --with-x --disable-darwin
82    depends_lib-append      port:gtk1
83}
84variant gtk2 description {Build GUI version using GTK 2.x widgets} conflicts athena gtk1 motif {
85    configure.args-delete   --enable-gui=no --without-x
86    configure.args-append   --enable-gui=gtk2 --with-x --disable-darwin
87    depends_lib-append      port:gtk2
88}
89variant motif description {Build GUI version with Motif widgets} conflicts athena gtk1 gtk2 {
90    configure.args-delete   --enable-gui=no --without-x
91    configure.args-append   --enable-gui=motif --with-x --disable-darwin
92    depends_lib-append      port:openmotif
93}
94
95variant tiny description {Build tiny feature set} {
96    configure.args-append --with-features=tiny
97}
98variant small description {Build small feature set} conflicts tiny {
99    configure.args-append --with-features=small
100}
101variant big description {Build big feature set} conflicts tiny small    {
102    configure.args-append --with-features=big
103}
104variant huge description {Build huge feature set} conflicts tiny small big {
105    configure.args-append --with-features=huge
106}
107variant xim description {Build with support for X Input Method} {
108    configure.args-append --with-xim
109}
110
111variant perl description {Enable Perl scripting} {
112    configure.args-append   --enable-perlinterp
113    depends_lib-append      port:perl5.8
114}
115variant python description {Enable Python scripting} {
116    configure.args-append   --enable-pythoninterp
117    depends_lib-append      port:python25
118}
119variant ruby description {Enable Ruby scripting} {
120    configure.args-append   --enable-rubyinterp
121    depends_lib-append      port:ruby
122}
123variant tcl description {Enable Tcl scripting} {
124    configure.args-append   --enable-tclinterp
125    depends_lib-append      port:tcl
126}
127
128variant cscope description {Enable source code browsing with cscope} {
129    configure.args-append   --enable-cscope
130}
131
132variant nls {
133    configure.args-delete   --disable-nls
134    depends_lib-append      port:gettext
135}
136
137include serverlist
138include patchlist
139
140livecheck.check regex
141livecheck.url   http://ftp.vim.org/pub/${name}/patches/${vim_version}/?O=D
142livecheck.regex (${vim_version}\.\\d+)