Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Defining custom "use-expand" use flags in an overlay?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
StifflerStealth
Retired Dev
Retired Dev


Joined: 03 Jul 2002
Posts: 968

PostPosted: Sun Aug 10, 2008 3:24 pm    Post subject: Defining custom "use-expand" use flags in an overl Reply with quote

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
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sun Aug 10, 2008 3:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
StifflerStealth
Retired Dev
Retired Dev


Joined: 03 Jul 2002
Posts: 968

PostPosted: Sun Aug 10, 2008 4:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sun Aug 10, 2008 4:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
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