View previous topic :: View next topic |
Author |
Message |
StifflerStealth Retired Dev


Joined: 03 Jul 2002 Posts: 968
|
Posted: Sun Aug 10, 2008 3:24 pm Post subject: Defining custom "use-expand" use flags in an overl |
|
|
I am writing some ebuilds that I want to use the "use-expand" feature for and I want to make my own use-expand that is not in Gentoo. How do I go about setting this up? I know the current use-expands are defined in profiles/base/make.defaults in the main Gentoo tree, so how do I define my own?
Thanks _________________ Nothing to read in this sig. Move along. |
|
Back to top |
|
 |
Sadako Advocate


Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sun Aug 10, 2008 3:37 pm Post subject: |
|
|
I'm not completely sure if this is what you want, but I've done something similar with custom xorg-server ebuilds.
I made a lot of the x11 extensions optional via use flags, ie I had defined IUSE_X11_EXTENSIONS="glx", and included it in IUSE (via IUSE="${IUSE_X11_EXTENSIONS}"), then in the ebuild everything glx related would depend upon the x11_extensions_glx USE flag.
Then in make.conf I added USE_EXPAND="${USE_EXPAND} X11_EXTENSIONS", and all the x11_extensions_* USE flags worked just like LINGUAS or VIDEO_CARDS, and to enable the ones you want you'd set something like X11_EXTENSIONS="composite xv" in make.conf.
Of course, I could be misunderstanding you completely... _________________ "You have to invite me in" |
|
Back to top |
|
 |
StifflerStealth Retired Dev


Joined: 03 Jul 2002 Posts: 968
|
Posted: Sun Aug 10, 2008 4:12 pm Post subject: |
|
|
That's what I want, something that acts like LINGUS and VIDEO_CARDS use-expands. Though, my wondering is if there is a way to define it in the overlay instead of doing it in make.conf. Maybe something in the profiles directory?
So, in my ebuild, I use IUSE_MY_VARIABLE="useflag" and useflag expands to my_variable_useflag? I looked at xorg-server ebuild and they do:
IUSE_INPUT_DEVICES="
input_devices_acecad
..."
Do I need to follow that, or did the ebuild author choose to do things the long way?
Thanks for replying.  _________________ Nothing to read in this sig. Move along. |
|
Back to top |
|
 |
Sadako Advocate


Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sun Aug 10, 2008 4:27 pm Post subject: |
|
|
StifflerStealth wrote: | That's what I want, something that acts like LINGUS and VIDEO_CARDS use-expands. Though, my wondering is if there is a way to define it in the overlay instead of doing it in make.conf. Maybe something in the profiles directory?
So, in my ebuild, I use IUSE_MY_VARIABLE="useflag" and useflag expands to my_variable_useflag? I looked at xorg-server ebuild and they do:
IUSE_INPUT_DEVICES="
input_devices_acecad
..."
Do I need to follow that, or did the ebuild author choose to do things the long way? | Ah, yes, my mistake.
What I actually have in the ebuild is; Code: | IUSE_X11_EXTENSIONS="
x11_extensions_composite
x11_extensions_glx
x11_extensions_record
x11_extensions_screensaver
x11_extensions_xdmcp
x11_extensions_xevie
x11_extensions_xinerama
x11_extensions_xtrap
x11_extensions_xv
x11_extensions_xvmc" |
For a profile in your overlay to work, your /etc/make.profile symlink would actually have to point to that profile instead, which I don't think is what you really want.
Otherwise a profile directory in an overlay seems to be ignored, which makes sense as nothing explicitly inherits from it.
You could probably add USE_EXPAND="${USE_EXPAND} X11_EXTENSIONS" (or your equivalent) to something like /usr/portage/local/layman/make.conf, though, and I'm sure other possibilities exist. _________________ "You have to invite me in" |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|