* [gentoo-dev] [RFC] vim-plugin.eclass and DEPEND
@ 2008-04-06 11:26 Ali Polatel
2008-04-06 11:28 ` Ciaran McCreesh
0 siblings, 1 reply; 2+ messages in thread
From: Ali Polatel @ 2008-04-06 11:26 UTC (permalink / raw
To: Gentoo Dev ML; +Cc: vim
[-- Attachment #1.1: Type: text/plain, Size: 660 bytes --]
Hi everyone,
Attached is a patch about vim-plugin.eclass which I'm about to commit.
The patch is aimed to make the eclass usable by packages not under
app-vim but come with their own vim plugin stuff (like git). It limits
setting default DEPEND,SLOT and SRC_URI to packages under category
app-vim and checks for VIM_PLUGIN_VERSION to add a dependency upon vim
or gvim. This way the eclass doesn't unconditionally depend on vim but
still give the option to set VIM_PLUGIN_VERSION in the ebuild make the
eclass add the dependencies.
What do you think? Do you think it's the right way to implement it?
Please comment.
--
Regards,
Ali Polatel
[-- Attachment #1.2: vim_plugin_eclass-no-default-depend.diff --]
[-- Type: text/plain, Size: 1078 bytes --]
Index: vim-plugin.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/vim-plugin.eclass,v
retrieving revision 1.21
diff -u -r1.21 vim-plugin.eclass
--- vim-plugin.eclass 7 May 2007 19:06:14 -0000 1.21
+++ vim-plugin.eclass 6 Apr 2008 11:20:33 -0000
@@ -10,14 +10,20 @@
inherit vim-doc
EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
-VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-6.4}"
+if [ "${CATEGORY}" = "app-vim" ]; then
+ IUSE=""
+ SRC_URI="mirror://gentoo/${P}.tar.bz2"
+ SLOT="0"
+fi
-IUSE=""
-DEPEND="|| ( >=app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
+if [ -n "${VIM_PLUGIN_VERSION}" ]; then
+ DEPEND="|| ( >=app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
>=app-editors/gvim-${VIM_PLUGIN_VIM_VERSION} )"
+elif [ "${CATEGORY}" = "app-vim" ]; then
+ # Default fallback for packages under app-vim/
+ DEPEND="|| ( app-editors/vim app-editors/gvim )"
+fi
RDEPEND="${DEPEND}"
-SRC_URI="mirror://gentoo/${P}.tar.bz2"
-SLOT="0"
vim-plugin_src_install() {
local f
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [RFC] vim-plugin.eclass and DEPEND
2008-04-06 11:26 [gentoo-dev] [RFC] vim-plugin.eclass and DEPEND Ali Polatel
@ 2008-04-06 11:28 ` Ciaran McCreesh
0 siblings, 0 replies; 2+ messages in thread
From: Ciaran McCreesh @ 2008-04-06 11:28 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 319 bytes --]
On Sun, 6 Apr 2008 14:26:13 +0300
Ali Polatel <hawking@gentoo.org> wrote:
> What do you think? Do you think it's the right way to implement it?
> Please comment.
You should have two separate eclasses instead. One for standalone vim
plugins, one for packages that just supply vim things.
--
Ciaran McCreesh
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-06 11:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-06 11:26 [gentoo-dev] [RFC] vim-plugin.eclass and DEPEND Ali Polatel
2008-04-06 11:28 ` Ciaran McCreesh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox