Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Max Krummenacher <max.oss.09@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: packageconfig, add depends if feature is disabled
Date: Sun, 19 Jun 2016 11:52:51 +0200	[thread overview]
Message-ID: <1466329971.20368.18.camel@gmail.com> (raw)

Hi

The recent unconditional move towards gtk3 in oe-core forces me to
follow with some of my recipes.

I tried this with packageconfig, however there seems to be no easy way
to specify DEPENDS in case a packageconfig feature is disabled.
i.e. for gtk3 we need gtk+3 in depends while for gtk2 we need gtk+.
I ended up with:

    PACKAGECONFIG ?= "gtk3"
    PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3"
    python __anonymous () {
        depends = d.getVar("DEPENDS", d, 1)
        if 'gtk3' not in d.getVar('PACKAGECONFIG', True):
            d.setVar("DEPENDS", "%s gtk+" % depends)
    }

The following would also be possible but then nothing makes sure that
one, and exactly one of gtk2, gtk3 is in PACKAGECONFIG.

    PACKAGECONFIG ?= "gtk3"
    PACKAGECONFIG[gtk2] = ",,gtk+"
    PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3"

Any ideas?
Would this use case merit an extension to packageconfig, e.g.:

    # PACKAGECONFIG ??= "<default options>"
    # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,
                            foo_depends,foo_runtime_depends,
                            not_foo_depends,not_foo_rdepends"

Which would simplify the above to:

    PACKAGECONFIG ?= "gtk3"
    PACKAGECONFIG[gtk3] = "--enable-gtk3,,gtk+3,,gtk+"

Regards
Max


             reply	other threads:[~2016-06-19  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-19  9:52 Max Krummenacher [this message]
2016-06-19 19:51 ` packageconfig, add depends if feature is disabled Burton, Ross
2016-06-22 19:25   ` Max Krummenacher

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=1466329971.20368.18.camel@gmail.com \
    --to=max.oss.09@gmail.com \
    --cc=openembedded-core@lists.openembedded.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