public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
@ 2015-11-18 10:53 Michael Palimaka
  2015-11-18 11:02 ` Alexis Ballier
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Michael Palimaka @ 2015-11-18 10:53 UTC (permalink / raw
  To: gentoo-dev; +Cc: kde

cmake-utils.eclass currently defines 10 helper functions to assist in
configuring packages.

For example:

local mycmakeargs=(
	$(cmake-utils_use_with foo LibFoo)
)

which outputs -DWITH_LibFoo=ON or OFF

Most of these helpers were introduced before, and could be replaced by,
usex:

local mycmakeargs=(
	-DWITH_LibFoo=$(usex foo)
)

In bug #514384 it has been discussed banning many/all of these helpers
in EAPI 6 and later.

With usex, it's much clearer what actually get passed to cmake, reducing
the chance of incorrect arguments, but $(cmake-utils_use_with foo
LibFoo) is considered by some to be cleaner-looking and nicer to read
than -DWITH_LibFoo=$(usex foo)

The helpers also pass the same option multiple times with different
capitalisation variants:

$(cmake-utils_use_with foo) emits -DWITH_foo=OFF -DWITH_FOO=OFF
-DWITH_Foo=OFF

This makes ebuild maintenance a little bit easier, at the expense of
being less "correct" and unknown configure option warnings useless

The helpers themselves are listed below in order of the number of
packages using them:

cmake-utils_use_with		135
cmake-utils_use_enable 		106
cmake-utils_use_build		89
cmake-utils_use_find_package	75
cmake-utils_use_use		37
cmake-utils_use_disable		14
cmake-utils_use_want		10
cmake-utils_use_has		8
cmake-utils_use_no		3
cmake-utils_useno		2

What do you think?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 10:53 [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6 Michael Palimaka
@ 2015-11-18 11:02 ` Alexis Ballier
  2015-11-18 15:23   ` Brian Dolbec
  2015-11-18 17:27 ` Davide Pesavento
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Alexis Ballier @ 2015-11-18 11:02 UTC (permalink / raw
  To: gentoo-dev

On Wed, 18 Nov 2015 21:53:17 +1100
Michael Palimaka <kensington@gentoo.org> wrote:

> What do you think?


+1

even if I sometimes use those cmake-utils_use*, they tend to confuse
me and find -DABCD=$(usex ...) much easier to understand for the
occasional user of cmake-utils.eclass.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 11:02 ` Alexis Ballier
@ 2015-11-18 15:23   ` Brian Dolbec
  2015-11-18 16:43     ` Michał Górny
  2015-11-18 16:47     ` Mike Gilbert
  0 siblings, 2 replies; 9+ messages in thread
From: Brian Dolbec @ 2015-11-18 15:23 UTC (permalink / raw
  To: gentoo-dev

On Wed, 18 Nov 2015 12:02:15 +0100
Alexis Ballier <aballier@gentoo.org> wrote:

> On Wed, 18 Nov 2015 21:53:17 +1100
> Michael Palimaka <kensington@gentoo.org> wrote:
> 
> > What do you think?  
> 
> 
> +1
> 
> even if I sometimes use those cmake-utils_use*, they tend to confuse
> me and find -DABCD=$(usex ...) much easier to understand for the
> occasional user of cmake-utils.eclass.
> 


Forgive me if I'm wrong, but I thought EAPI 6 specifications were
finalized.

Doesn't that mean this will have to wait for EAPI 7?

-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 15:23   ` Brian Dolbec
@ 2015-11-18 16:43     ` Michał Górny
  2015-11-18 16:47     ` Mike Gilbert
  1 sibling, 0 replies; 9+ messages in thread
From: Michał Górny @ 2015-11-18 16:43 UTC (permalink / raw
  To: Brian Dolbec; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

On Wed, 18 Nov 2015 07:23:55 -0800
Brian Dolbec <dolsen@gentoo.org> wrote:

> On Wed, 18 Nov 2015 12:02:15 +0100
> Alexis Ballier <aballier@gentoo.org> wrote:
> 
> > On Wed, 18 Nov 2015 21:53:17 +1100
> > Michael Palimaka <kensington@gentoo.org> wrote:
> >   
> > > What do you think?    
> > 
> > 
> > +1
> > 
> > even if I sometimes use those cmake-utils_use*, they tend to confuse
> > me and find -DABCD=$(usex ...) much easier to understand for the
> > occasional user of cmake-utils.eclass.
> >   
> 
> 
> Forgive me if I'm wrong, but I thought EAPI 6 specifications were
> finalized.
> 
> Doesn't that mean this will have to wait for EAPI 7?

It's eclass API, so it's free to change anytime. Using a new EAPI to
change eclass API has the benefit that you can ban new uses of
deprecated functions without breaking existing ebuilds.

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 15:23   ` Brian Dolbec
  2015-11-18 16:43     ` Michał Górny
@ 2015-11-18 16:47     ` Mike Gilbert
  2015-11-18 18:25       ` Brian Dolbec
  1 sibling, 1 reply; 9+ messages in thread
From: Mike Gilbert @ 2015-11-18 16:47 UTC (permalink / raw
  To: Gentoo Dev

On Wed, Nov 18, 2015 at 10:23 AM, Brian Dolbec <dolsen@gentoo.org> wrote:
> On Wed, 18 Nov 2015 12:02:15 +0100
> Alexis Ballier <aballier@gentoo.org> wrote:
>
>> On Wed, 18 Nov 2015 21:53:17 +1100
>> Michael Palimaka <kensington@gentoo.org> wrote:
>>
>> > What do you think?
>>
>>
>> +1
>>
>> even if I sometimes use those cmake-utils_use*, they tend to confuse
>> me and find -DABCD=$(usex ...) much easier to understand for the
>> occasional user of cmake-utils.eclass.
>>
>
>
> Forgive me if I'm wrong, but I thought EAPI 6 specifications were
> finalized.
>
> Doesn't that mean this will have to wait for EAPI 7?

eclass API is not directly tied to EAPI/PMS. However,
cmake-utils.eclass has this:

case ${EAPI} in
    2|3|4|5) : ;;
    *) die "EAPI=${EAPI:-0} is not supported" ;;
esac

That means that its API is currently undefined when EAPI is set to 6;
the eclass will immediately die.

This is just a convenient opportunity to change the API of this eclass
without risking breakage of existing ebuilds.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 10:53 [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6 Michael Palimaka
  2015-11-18 11:02 ` Alexis Ballier
@ 2015-11-18 17:27 ` Davide Pesavento
  2015-11-19  7:35 ` Jason Zaman
  2015-11-20  6:43 ` agentsmith
  3 siblings, 0 replies; 9+ messages in thread
From: Davide Pesavento @ 2015-11-18 17:27 UTC (permalink / raw
  To: gentoo-dev; +Cc: kde

On Wed, Nov 18, 2015 at 11:53 AM, Michael Palimaka
<kensington@gentoo.org> wrote:
[...]
>
> What do you think?

+1 for banning them.

Thanks,
Davide


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 16:47     ` Mike Gilbert
@ 2015-11-18 18:25       ` Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2015-11-18 18:25 UTC (permalink / raw
  To: gentoo-dev

On Wed, 18 Nov 2015 11:47:35 -0500
Mike Gilbert <floppym@gentoo.org> wrote:

> On Wed, Nov 18, 2015 at 10:23 AM, Brian Dolbec <dolsen@gentoo.org>
> wrote:
> > On Wed, 18 Nov 2015 12:02:15 +0100
> > Alexis Ballier <aballier@gentoo.org> wrote:
> >  
> >> On Wed, 18 Nov 2015 21:53:17 +1100
> >> Michael Palimaka <kensington@gentoo.org> wrote:
> >>  
> >> > What do you think?  
> >>
> >>
> >> +1
> >>
> >> even if I sometimes use those cmake-utils_use*, they tend to
> >> confuse me and find -DABCD=$(usex ...) much easier to understand
> >> for the occasional user of cmake-utils.eclass.
> >>  
> >
> >
> > Forgive me if I'm wrong, but I thought EAPI 6 specifications were
> > finalized.
> >
> > Doesn't that mean this will have to wait for EAPI 7?  
> 
> eclass API is not directly tied to EAPI/PMS. However,
> cmake-utils.eclass has this:
> 
> case ${EAPI} in
>     2|3|4|5) : ;;
>     *) die "EAPI=${EAPI:-0} is not supported" ;;
> esac
> 
> That means that its API is currently undefined when EAPI is set to 6;
> the eclass will immediately die.
> 
> This is just a convenient opportunity to change the API of this eclass
> without risking breakage of existing ebuilds.
> 

Thanks to both Michael and Mike.

I didn't read enough of the emails and missed this was about eclass
API's

-- 
Brian Dolbec <dolsen>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 10:53 [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6 Michael Palimaka
  2015-11-18 11:02 ` Alexis Ballier
  2015-11-18 17:27 ` Davide Pesavento
@ 2015-11-19  7:35 ` Jason Zaman
  2015-11-20  6:43 ` agentsmith
  3 siblings, 0 replies; 9+ messages in thread
From: Jason Zaman @ 2015-11-19  7:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: kde

On Wed, Nov 18, 2015 at 09:53:17PM +1100, Michael Palimaka wrote:
> 	$(cmake-utils_use_with foo LibFoo)
> 	-DWITH_LibFoo=$(usex foo)
> 
> What do you think?

Do it! I have no idea what the cmake one is supposed to do without
reading docs. The usex one is really obvious.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6
  2015-11-18 10:53 [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6 Michael Palimaka
                   ` (2 preceding siblings ...)
  2015-11-19  7:35 ` Jason Zaman
@ 2015-11-20  6:43 ` agentsmith
  3 siblings, 0 replies; 9+ messages in thread
From: agentsmith @ 2015-11-20  6:43 UTC (permalink / raw
  To: gentoo-dev



On 11/18/2015 01:53 PM, Michael Palimaka wrote:
  What do you think?
+1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-20  6:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 10:53 [gentoo-dev] RFC: ban cmake-utils_use_* in EAPI 6 Michael Palimaka
2015-11-18 11:02 ` Alexis Ballier
2015-11-18 15:23   ` Brian Dolbec
2015-11-18 16:43     ` Michał Górny
2015-11-18 16:47     ` Mike Gilbert
2015-11-18 18:25       ` Brian Dolbec
2015-11-18 17:27 ` Davide Pesavento
2015-11-19  7:35 ` Jason Zaman
2015-11-20  6:43 ` agentsmith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox