vim: cross build support (x11 and gvim subpkgs not built for now).

This commit is contained in:
Juan RP 2013-03-19 04:53:15 +01:00
parent 4bca277712
commit ecb179aecd

View file

@ -15,33 +15,52 @@ license="GPL-2"
nofetch=yes nofetch=yes
noextract=yes noextract=yes
if [ -n "$XBPS_CROSS_BUILD" ]; then
# XXX x11 and gvim subpkgs.
subpackages="vim-common"
makedepends="mercurial pkg-config"
crossmakedepends="ncurses-devel acl-devel"
fi
do_fetch() { do_fetch() {
local url="http://code.google.com/p/vim/" local url="http://code.google.com/p/vim/"
hg clone -u v7-3-${_patchver} ${url} ${pkgname}-${version} hg clone -u v7-3-${_patchver} ${url} ${pkgname}-${version}
} }
pre_configure() { pre_configure() {
mkdir -p /tmp/vim-x11 if [ -z "$XBPS_CROSS_BUILD" ]; then
cp -a $wrksrc/* /tmp/vim-x11 mkdir -p /tmp/vim-x11
mv /tmp/vim-x11 $wrksrc/ cp -a $wrksrc/* /tmp/vim-x11
mkdir -p /tmp/gvim mv /tmp/vim-x11 $wrksrc/
cp -a $wrksrc/* /tmp/gvim mkdir -p /tmp/gvim
mv /tmp/gvim $wrksrc/gvim cp -a $wrksrc/* /tmp/gvim
mv /tmp/gvim $wrksrc/gvim
fi
} }
do_configure() { do_configure() {
local sharedargs="--disable-perlinterp --disable-pythoninterp \ local sharedargs="--disable-perlinterp --disable-pythoninterp
--disable-rubyinterp --disable-cscope --disable-workshop \ --disable-rubyinterp --disable-cscope --disable-workshop
--disable-netbeans --disable-sniff --disable-gpm \ --disable-netbeans --disable-sniff --disable-gpm
--disable-hangulinput --disable-xim --enable-multibyte \ --disable-hangulinput --disable-xim --enable-multibyte
--with-tlib=ncursesw --with-ex-name=vim-ex \ --with-tlib=ncursesw --with-ex-name=vim-ex
--with-view-name=vim-view" --with-view-name=vim-view"
if [ -n "$XBPS_CROSS_BUILD" ]; then
crossargs="vim_cv_toupper_broken=no vim_cv_terminfo=yes
vim_cv_tty_group=world vim_cv_getcwd_broken=no
vim_cv_stat_ignores_slash=yes
vim_cv_memmove_handles_overlap=yes"
sharedargs="${sharedargs} ${crossargs}"
fi
# Normal version. # Normal version.
cd $wrksrc cd $wrksrc
./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \ ./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \
--enable-gui=no --with-x=no --enable-gui=no --with-x=no
[ -n "$XBPS_CROSS_BUILD" ] && return 0
# X11 version. # X11 version.
cd $wrksrc/vim-x11 cd $wrksrc/vim-x11
./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \ ./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \
@ -54,9 +73,13 @@ do_configure() {
} }
do_build() { do_build() {
for f in "" vim-x11 gvim; do cd $wrksrc && make ${makejobs}
[ -n "$XBPS_CROSS_BUILD" ] && return 0
for f in vim-x11 gvim; do
cd $wrksrc/$f && make ${makejobs} cd $wrksrc/$f && make ${makejobs}
done done
} }
do_install() { do_install() {