Gentoo Archives: gentoo-dev

From: Jim Ramsay <lack@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New eclass: gkrellm-plugin
Date: Thu, 08 Mar 2007 18:39:48
Message-Id: 20070308123459.00a75d5c@sed-192.sedsystems.ca
In Reply to: Re: [gentoo-dev] New eclass: gkrellm-plugin by "Petteri Räty"
1 Petteri Räty wrote:
2 > Jim Ramsay wrote:
3 > > ECLASS="gkrellm-plugin"
4 > > INHERITED="$INHERITED $ECLASS"
5 >
6 > No need to set INHERITED yourself any more either. Ciaran already
7 > pointed out ECLASS.
8
9 Indeed, thanks for that!
10
11 They just appeared automagically when I did 'vim foo.eclass' I wonder where that comes from...
12
13 > >
14 > > gkrellm-plugin_pkg_setup() {
15 > > if ! built_with_use app-admin/gkrellm X && \
16 > > ! has X ${IUSE}; then
17 > > eerror "This plugin requires the X frontend of
18 > > gkrellm." eerror "Please re-emerge app-admin/gkrellm with USE=\"X\""
19 > > die "Please re-emerge app-admin/gkrellm with
20 > > USE=\"X\"" fi
21 > > }
22 >
23 > How useful is the X use flag in gkrellm? Just thinking if it would be
24 > better to just remove the use flag and always build that code.
25
26 Well, gkrellm consists of two optional parts:
27
28 - gkrellmd which is a monitoring daemon, which does not require X
29 support at all. It is meant for headless machines you would want to
30 monitor remotely.
31
32 - gkrellm2 which is the front-end which can monitor the local machine
33 and/or any machine running gkrellmd.
34
35 USE="X" builds both parts.
36 USE="-X" builds only the monitoring daemon.
37
38 I believe this is a useful distinction.
39
40 The plugins are only relevant when you have the GUI front-end in place,
41 except that there may be some plugins that have a gkrellmd-equivalent
42 part, in which case that ebuild should set IUSE="X" and do its own
43 checking.
44
45 I suppose the alternative would be to split the ebuild into 'gkrellm'
46 and 'gkrellmd' ebuilds, which would indeed remove the need for the
47 'built_with_use' check. How is this normally done for other packages
48 that have, for example, both a client and server part?
49
50 --
51 Jim Ramsay
52 Gentoo/Linux Developer (rox,gkrellm)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-dev] Client-serve flags (again ;) (was Re: New eclass: gkrellm-plugin) Steve Long <slong@××××××××××××××××××.uk>
Re: [gentoo-dev] New eclass: gkrellm-plugin Mike Kelly <pioto@g.o>