Vim - Tarball with Patches vs Mercurial
Chris Perl
chris.perl at gmail.com
Fri Apr 13 06:02:16 PDT 2012
On Thu, Apr 05, 2012 at 04:52:25PM -0400, Chris Perl wrote:
>
> Ok, so I guess its up to Rainer if he feels like the benefit is worth
> the added effort of creating/uploading a distfile. I personally think
> it is worth the effort, but then again I'm not the one that is going to
> have to do it!
FWIW, I'm currently maintaining my own local vim port that builds from
Mercurial. I've attached it here in case anyone else wants to use it or
play around with it.
Note that I've left patch 245 included (meaning I don't jump through
hoops to back it out) as I didn't see the breakage that was mentioned in
the main vim port. I haven't tested building this way extensively, but
it works for me.
Chris
-------------- next part --------------
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
name vim
set vim_version 7.3
set vim_patchlevel 495
version ${vim_version}.${vim_patchlevel}
categories editors
platforms darwin freebsd
license Vim GPL-2+
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/
fetch.type hg
hg.url https://code.google.com/p/vim/
hg.tag 27f6a22ff88eea07f24163fe470b7335f3c1b32b
worksrcdir vim[strsed ${vim_version} {g/\.//}]
# 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
}
depends_build bin:grep:grep
depends_lib port:ncurses \
port:gettext \
port:libiconv \
port:ctags
autoconf.cmd make autoconf
autoconf.dir ${worksrcpath}/src
configure.args --disable-gui \
--without-x \
--disable-gpm \
--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 --enable-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 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 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 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 python32 description {Enable Python scripting} {
configure.args-append --enable-python3interp --with-python3=${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 python32 conflicts python31 description {Enable Python scripting} {
configure.args-append --enable-python3interp --with-python3=${prefix}/bin/python3.2
patchfiles-append patch-python3.diff
depends_lib-append port:python32
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
}
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+)
More information about the macports-dev
mailing list