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

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