From 22f39831c57e820e3c2a2b67b77a32ba9554b31f Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 13 Jul 2012 11:06:22 +0200 Subject: [PATCH] vim: update to 7.3.600; merge vim-x11 and gvim as subpkgs. --- srcpkgs/gvim | 1 + srcpkgs/gvim/template | 30 ----------- srcpkgs/vim-x11 | 1 + srcpkgs/vim-x11/template | 25 ---------- srcpkgs/{gvim => vim}/files/gvim.desktop | 0 srcpkgs/{gvim => vim}/gvim.rshlibs | 1 + srcpkgs/vim/gvim.template | 19 +++++++ srcpkgs/vim/template | 63 +++++++++++++++++++----- srcpkgs/vim/vim-common.template | 6 +-- srcpkgs/{vim-x11 => vim}/vim-x11.rshlibs | 0 srcpkgs/vim/vim-x11.template | 14 ++++++ 11 files changed, 88 insertions(+), 72 deletions(-) create mode 120000 srcpkgs/gvim delete mode 100644 srcpkgs/gvim/template create mode 120000 srcpkgs/vim-x11 delete mode 100644 srcpkgs/vim-x11/template rename srcpkgs/{gvim => vim}/files/gvim.desktop (100%) rename srcpkgs/{gvim => vim}/gvim.rshlibs (94%) create mode 100644 srcpkgs/vim/gvim.template rename srcpkgs/{vim-x11 => vim}/vim-x11.rshlibs (100%) create mode 100644 srcpkgs/vim/vim-x11.template diff --git a/srcpkgs/gvim b/srcpkgs/gvim new file mode 120000 index 0000000000..7923f59d71 --- /dev/null +++ b/srcpkgs/gvim @@ -0,0 +1 @@ +vim \ No newline at end of file diff --git a/srcpkgs/gvim/template b/srcpkgs/gvim/template deleted file mode 100644 index f33bce8f45..0000000000 --- a/srcpkgs/gvim/template +++ /dev/null @@ -1,30 +0,0 @@ -# Build template file for 'gvim'. -# -# Source vim template and overwrite some vars, it's stupid -# to duplicate all this stuff again! -# -. ${XBPS_SRCPKGDIR}/vim/template -unset subpackages revision - -pkgname=gvim -revision=1 -configure_args="${configure_args} --enable-gui=gtk2 --with-x --with-vim-name=gvim" -make_install_target="-C src DESTDIR=${XBPS_DESTDIR}/${pkgname}-${version} installvimbin install-icons" -gtk_iconcache_dirs="/usr/share/icons/hicolor" -depends="desktop-file-utils hicolor-icon-theme" -makedepends="mercurial pkg-config gtk+-devel" -short_desc="${short_desc} (GTK+ GUI)" -long_desc="${long_desc} - - This packages contains gvim, the GTK+ GUI version of vim." - -pre_install() { - sed -i "s|/locolor|/hicolor|g" src/Makefile - for d in 16 32 48; do - vmkdir usr/share/icons/hicolor/${d}x${d}/apps - done -} - -post_install() { - vinstall ${FILESDIR}/gvim.desktop 644 usr/share/applications -} diff --git a/srcpkgs/vim-x11 b/srcpkgs/vim-x11 new file mode 120000 index 0000000000..7923f59d71 --- /dev/null +++ b/srcpkgs/vim-x11 @@ -0,0 +1 @@ +vim \ No newline at end of file diff --git a/srcpkgs/vim-x11/template b/srcpkgs/vim-x11/template deleted file mode 100644 index fa8ab400a2..0000000000 --- a/srcpkgs/vim-x11/template +++ /dev/null @@ -1,25 +0,0 @@ -# Build template file for 'vim-x11'. -# -# Source vim template and overwrite some vars, it's stupid -# to duplicate all this stuff again! -# -. ${XBPS_SRCPKGDIR}/vim/template -unset subpackages -pkgname=vim-x11 -configure_args="${configure_args} --enable-gui=no --with-x" -depends="vim-common>=7.3.515" -makedepends="mercurial ncurses-devel acl-devel pkg-config libXt-devel" -revision=1 -short_desc="${short_desc} (x11)" -long_desc="${long_desc} - - This packages contains vim-x11, the x11 capable version of vim." - -provides="vim-${version}" -replaces="vim>=${version}" -build_requires=11 - - -post_install() { - rm -rf ${DESTDIR}/usr/share -} diff --git a/srcpkgs/gvim/files/gvim.desktop b/srcpkgs/vim/files/gvim.desktop similarity index 100% rename from srcpkgs/gvim/files/gvim.desktop rename to srcpkgs/vim/files/gvim.desktop diff --git a/srcpkgs/gvim/gvim.rshlibs b/srcpkgs/vim/gvim.rshlibs similarity index 94% rename from srcpkgs/gvim/gvim.rshlibs rename to srcpkgs/vim/gvim.rshlibs index 15f385bde9..d0f8d25e85 100644 --- a/srcpkgs/gvim/gvim.rshlibs +++ b/srcpkgs/vim/gvim.rshlibs @@ -10,5 +10,6 @@ libXt.so.6 libX11.so.6 libm.so.6 libncursesw.so.6 +libacl.so.1 libdl.so.2 libc.so.6 diff --git a/srcpkgs/vim/gvim.template b/srcpkgs/vim/gvim.template new file mode 100644 index 0000000000..1aae7e090d --- /dev/null +++ b/srcpkgs/vim/gvim.template @@ -0,0 +1,19 @@ +# Template file for 'vim-x11'. +# +depends="desktop-file-utils hicolor-icon-theme" +gtk_iconcache_dirs="/usr/share/icons/hicolor" +short_desc="VI iMproved - GTK+ GUI" +long_desc="${long_desc} + + This packages contains gvim, the GTK+ GUI version of vim." + +do_install() { + cd $wrksrc/gvim + sed -i "s|/locolor|/hicolor|g" src/Makefile + for d in 16 32 48; do + vmkdir usr/share/icons/hicolor/${d}x${d}/apps + done + make -C src DESTDIR=$DESTDIR installvimbin install-icons + + vinstall ${FILESDIR}/gvim.desktop 644 usr/share/applications +} diff --git a/srcpkgs/vim/template b/srcpkgs/vim/template index d565b6849c..d6b0fdc859 100644 --- a/srcpkgs/vim/template +++ b/srcpkgs/vim/template @@ -1,29 +1,66 @@ # Template file for 'vim' pkgname=vim _distver=7.3 -_patchver=515 +_patchver=600 version=${_distver}.${_patchver} -build_style=gnu-configure -configure_args="--disable-perlinterp --disable-pythoninterp --disable-rubyinterp ---disable-cscope --disable-workshop --disable-netbeans --disable-sniff ---disable-gpm --disable-hangulinput --disable-xim --enable-gui=no ---without-x --enable-multibyte --with-tlib=ncursesw" -depends="vim-common>=7.3.515" -makedepends="mercurial ncurses-devel acl-devel" revision=1 +nofetch=yes +noextract=yes +subpackages="vim-common vim-x11 gvim" +depends="vim-common>=$version" +makedepends="mercurial ncurses-devel acl-devel pkg-config libXt-devel gtk+-devel" short_desc="Vim editor (vi clone)" maintainer="Juan RP " +homepage="http://www.vim.org" +license="" long_desc=" Vim is an almost compatible version of the UNIX editor Vi. Many new features have been added: multi level undo, syntax highlighting, command line history, on-line help, filename completion, block operations, etc." -nofetch=yes -noextract=yes -subpackages="vim-common" - - do_fetch() { local url="http://code.google.com/p/vim/" hg clone -u v7-3-${_patchver} ${url} ${pkgname}-${version} } + +pre_configure() { + mkdir -p /tmp/vim-x11 + cp -a $wrksrc/* /tmp/vim-x11 + mv /tmp/vim-x11 $wrksrc/ + mkdir -p /tmp/gvim + cp -a $wrksrc/* /tmp/gvim + mv /tmp/gvim $wrksrc/gvim +} + +do_configure() { + local sharedargs="--disable-perlinterp --disable-pythoninterp \ + --disable-rubyinterp --disable-cscope --disable-workshop \ + --disable-netbeans --disable-sniff --disable-gpm \ + --disable-hangulinput --disable-xim --enable-multibyte \ + --with-tlib=ncursesw" + + # Normal version. + cd $wrksrc + ./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \ + --enable-gui=no --with-x=no + + # X11 version. + cd $wrksrc/vim-x11 + ./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \ + --enable-gui=no --with-x + + # GTK+ version. + cd $wrksrc/gvim + ./configure ${CONFIGURE_SHARED_ARGS} ${sharedargs} \ + --enable-gui=gtk2 --with-x --with-vim-name=gvim +} + +do_build() { + for f in "" vim-x11 gvim; do + cd $wrksrc/$f && make ${makejobs} + done +} + +do_install() { + make DESTDIR=$DESTDIR install +} diff --git a/srcpkgs/vim/vim-common.template b/srcpkgs/vim/vim-common.template index 95e1eba634..46d0e3c366 100644 --- a/srcpkgs/vim/vim-common.template +++ b/srcpkgs/vim/vim-common.template @@ -8,8 +8,6 @@ long_desc="${long_desc} noarch=yes replaces="vim<=7.2_2" -do_install() -{ - mkdir -p ${DESTDIR}/usr/share - mv ${SRCPKGDESTDIR}/usr/share/vim ${DESTDIR}/usr/share +do_install() { + vmove usr/share/vim usr/share } diff --git a/srcpkgs/vim-x11/vim-x11.rshlibs b/srcpkgs/vim/vim-x11.rshlibs similarity index 100% rename from srcpkgs/vim-x11/vim-x11.rshlibs rename to srcpkgs/vim/vim-x11.rshlibs diff --git a/srcpkgs/vim/vim-x11.template b/srcpkgs/vim/vim-x11.template new file mode 100644 index 0000000000..b6b49e1de0 --- /dev/null +++ b/srcpkgs/vim/vim-x11.template @@ -0,0 +1,14 @@ +# Template file for 'vim-x11'. +# +provides="vim-${version}" +replaces="vim>=0" +short_desc="VI iMproved - X11 version" +long_desc="${long_desc} + + This packages contains vim-x11, the x11 capable version of vim." + +do_install() { + cd $wrksrc/vim-x11 + make DESTDIR=$DESTDIR install + rm -rf $DESTDIR/usr/share +}