public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andreas Sturmlechner <asturm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 1/3] ecm-utils.eclass: New eclass
Date: Wed, 06 Nov 2019 02:19:32 +0100	[thread overview]
Message-ID: <4949294.KT39OxLedd@tuxbrain> (raw)
In-Reply-To: <759405ee4e4ae48d65cbac336e23f91ceec53ea1.camel@gentoo.org>

On Tuesday, 5 November 2019 22:20:46 CET Michał Górny wrote:
> On Tue, 2019-11-05 at 00:30 +0100, Andreas Sturmlechner wrote:
> > --- /dev/null
> > +++ b/eclass/ecm-utils.eclass
> 
> I know we historically screwed this up repeatedly but please don't use
> '-utils' for eclasses that export phases.

Fine, I would then choose ecm.eclass instead.

> > +# @ECLASS-VARIABLE: ECM_NONGUI
> > +# @DESCRIPTION:
> > +# If set to "false", add dependency on kde-frameworks/breeze-icons
> > +# or kde-frameworks/oxygen-icons and run the xdg.eclass routines for
> > +# pkg_preinst, pkg_postinst and pkg_postrm.
> > +# For any other value, do nothing.
> > +if [[ ${CATEGORY} = kde-frameworks ]]; then
> > +	: ${ECM_NONGUI:=true}
> > +fi
> > +: ${ECM_NONGUI:=false}
> 
> I don't think eclassdoc is going to parse this correctly.

Can we do something about that? I need to be able to set (overrideable) 
defaults for a category without being limited by eclassdoc. @DEFAULT_UNSET 
would not be precise. Same as ECM_QTHELP, this is what we do in kde5.eclass 
already.

> > +# @ECLASS-VARIABLE: ECM_DEBUG
> > +# @DESCRIPTION:
> > +# If set to "false", add -DNDEBUG (via cmake-utils_src_configure) and
> > +# -DQT_NO_DEBUG to CPPFLAGS.
> > +# Otherwise, add debug to IUSE.
> > +: ${ECM_DEBUG:=true}
> 
> To be honest, I don't really like this 'anything-or-false' logic.  It's
> rather confusing and error-prone.  For example, if I misspell 'false'
> the eclass is going to silently assume true.

Making all options explicit then and erroring out on unknown input.

> > +# @FUNCTION: ecm_punt_bogus_dep
> > +# @USAGE: <prefix> <dependency>
> > +# @DESCRIPTION:
> > +# Removes a specified dependency from a find_package call with multiple
> > components.
> > +ecm_punt_bogus_dep() {
> > +	local prefix=${1}
> > +	local dep=${2}
> > +
> > +	if [[ ! -e "CMakeLists.txt" ]]; then
> 
> Can this really ever happen in a valid use case?  Maybe it should be
> an error instead.

Even cmake-utils.eclass makes that check in cmake_comment_add_subdirectory and 
leaves the erroring out if the file's missing central to src_prepare(), I 
guess is why it was done that way.


Thanks for looking over it!

Regards,
Andreas




  reply	other threads:[~2019-11-06  1:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-24 17:17 [gentoo-dev] [PATCH] font.eclass: Port to EAPI-7 Andreas Sturmlechner
2019-03-24 18:41 ` Michał Górny
2019-04-09 19:41   ` Andreas Sturmlechner
2019-04-10 13:21     ` Michał Górny
2019-10-15 21:58       ` [gentoo-dev] [PATCH v2] " Andreas Sturmlechner
2019-10-15 22:05       ` Andreas Sturmlechner
2019-10-16  6:52         ` Michał Górny
2019-10-16 12:01       ` [gentoo-dev] [PATCH 1/2] kde.org.eclass: New eclass, split from kde5.eclass Andreas Sturmlechner
2019-10-16 12:01       ` [gentoo-dev] [PATCH 2/2] kde5.eclass: Inherit kde.org.eclass and drop moved functions/vars Andreas Sturmlechner
2019-11-04 23:30       ` [gentoo-dev] [PATCH 1/3] ecm-utils.eclass: New eclass Andreas Sturmlechner
2019-11-04 23:37         ` [gentoo-dev] [PATCH 2/3] kde5.eclass: Inherit ecm-utils.eclass and drop moved functions/vars Andreas Sturmlechner
2019-11-04 23:42           ` [gentoo-dev] [PATCH 3/3] kde5-functions.eclass: Drop functions/vars moved to ecm-utils Andreas Sturmlechner
2019-11-05 21:20         ` [gentoo-dev] [PATCH 1/3] ecm-utils.eclass: New eclass Michał Górny
2019-11-06  1:19           ` Andreas Sturmlechner [this message]
2019-11-06  7:15             ` Michał Górny
2019-11-10 13:27               ` [gentoo-dev] [PATCH v2 1/3] ecm.eclass: " Andreas Sturmlechner
2019-11-10 16:26                 ` Gokturk Yuksek
2019-07-08 20:14   ` [gentoo-dev] [PATCH] profiles: desktop: Add USE icu to make.defaults Andreas Sturmlechner
2019-07-08 20:14   ` Andreas Sturmlechner
2019-07-08 20:14   ` Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4949294.KT39OxLedd@tuxbrain \
    --to=asturm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox