summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorCiaran McCreesh <ciaranm@gentoo.org>2004-10-01 15:55:43 +0000
committerCiaran McCreesh <ciaranm@gentoo.org>2004-10-01 15:55:43 +0000
commit6e3eaa13aa3fb8070d8e0d3b99f365c90e81e0f2 (patch)
tree75ddde921f4cd59014876bee579f37e4d103dc28 /eclass
parentremoved accessibility, added hal to n32 use.mask (diff)
downloadhistorical-6e3eaa13aa3fb8070d8e0d3b99f365c90e81e0f2.tar.gz
historical-6e3eaa13aa3fb8070d8e0d3b99f365c90e81e0f2.tar.bz2
historical-6e3eaa13aa3fb8070d8e0d3b99f365c90e81e0f2.zip
livecd USE flag for vim-core, bug 65144
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vim.eclass26
1 files changed, 24 insertions, 2 deletions
diff --git a/eclass/vim.eclass b/eclass/vim.eclass
index 8066fa3f82ca..7a4e961a7e83 100644
--- a/eclass/vim.eclass
+++ b/eclass/vim.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.73 2004/10/01 15:43:01 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.74 2004/10/01 15:55:43 ciaranm Exp $
# Authors:
# Ryan Phillips <rphillips@gentoo.org>
@@ -43,7 +43,9 @@ EXPORT_FUNCTIONS src_unpack
IUSE="$IUSE selinux ncurses nls acl"
-if [[ "${MY_PN}" != "vim-core" ]] ; then
+if [[ "${MY_PN}" == "vim-core" ]] ; then
+ IUSE="$IUSE livecd"
+else
IUSE="$IUSE cscope gpm perl python ruby"
DEPEND="$DEPEND
cscope? ( dev-util/cscope )
@@ -401,6 +403,26 @@ src_install() {
insinto /etc/vim/
doins ${FILESDIR}/vimrc
+ if use livecd ; then
+ # To save space, install only a subset of the files if we're on a
+ # livecd. bug 65144.
+ einfo "Removing some files for a smaller livecd install..."
+
+ local vimfiles=${D}/usr/share/vim/vim${VIM_VERSION/.}
+ shopt -s extglob
+ rm -fr ${vimfiles}/{compiler,doc,ftplugin,indent}
+ rm -fr ${vimfiles}/{macros,print,tools,tutor}
+ rm ${D}/usr/bin/vimtutor
+
+ local keep_colors="default"
+ rm -fr ${vimfiles}/colors/!(${keep_colors}).vim
+
+ local keep_syntax="conf|crontab|fstab|inittab|resolv|sshdconfig"
+ # tinkering with the next line might make bad things happen...
+ keep_syntax="${keep_syntax}|syntax|nosyntax|synload"
+ rm -fr ${vimfiles}/syntax/!(${keep_syntax}).vim
+ fi
+
elif [[ "${MY_PN}" == "gvim" ]] ; then
dobin src/gvim
dosym gvim /usr/bin/gvimdiff