From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] yad: new package
Date: Fri, 3 Jul 2015 09:49:10 +0200 [thread overview]
Message-ID: <20150703094910.750481b4@free-electrons.com> (raw)
In-Reply-To: <20150703053105.GL2391@tarshish>
Dear Baruch Siach,
On Fri, 3 Jul 2015 08:31:05 +0300, Baruch Siach wrote:
> > +
> > +if BR2_PACKAGE_YAD
> > +
> > +config BR2_PACKAGE_YAD_FORCE_LIBGTK2
> > + bool "Force libgtk2"
> > + depends on BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_LIBGTK3
>
> You need both gtk2 and gtk3?
No, I think James idea here is that if the user has gtk2 *or* gtk3
enabled, then we don't need anything special: we'll use either of them.
However, if the user has enabled *both* gtk2 and gtk3, then we need to
know which one the user wants to use. This option therefore appears in
such a situation, and allows the user to either opt for gtk3 (option
disabled) or gtk2 (option enabled).
> > diff --git a/package/yad/yad.hash b/package/yad/yad.hash
> > new file mode 100644
> > index 0000000..b86b815
> > --- /dev/null
> > +++ b/package/yad/yad.hash
> > @@ -0,0 +1,2 @@
> > +# Locally computed
> > +sha256 c7b79ff8189222a642e90052590e3ceb6c3d70623346096c1987f695ebf694b1 yad-0.28.1.tar.xz
> > diff --git a/package/yad/yad.mk b/package/yad/yad.mk
> > new file mode 100644
> > index 0000000..630d3b3
> > --- /dev/null
> > +++ b/package/yad/yad.mk
> > @@ -0,0 +1,24 @@
> > +################################################################################
> > +#
> > +# yad
> > +#
> > +################################################################################
> > +
> > +YAD_VERSION = 0.28.1
> > +YAD_SOURCE = yad-$(YAD_VERSION).tar.xz
> > +YAD_SITE = http://sourceforge.net/projects/yad-dialog/files
> > +YAD_LICENSE = GPLv3
> > +YAD_LICENSE_FILES = COPYING
> > +YAD_DEPENDENCIES = host-intltool host-pkgconf libglib2
> > +
> > +YAD_CONF_OPTS = --enable-html=no
> > +
> > +ifeq ($(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_YAD_FORCE_LIBGTK2),y)
>
> This condition is true if either gtk3 or gtk2 are selected...
No, this condition is true if gtk3 is there *and*
BR2_PACKAGE_YAD_FORCE_LIBGTK2 is disabled, which means that we want to
use gtk3, because we are in one of the two possible situations:
* only gtk3 is enabled -> we want to use it
* both gtk3 and gtk2 are enabled, but since
BR2_PACKAGE_YAD_FORCE_LIBGTK2 is enabled, it means the user wants to
use gtk3
Since there is no way for BR2_PACKAGE_YAD_FORCE_LIBGTK2 to be true
without BR2_PACKAGE_LIBGTK3 being true, it works fine.
But I agree it's a bit tricky. James, what do you think instead to have
a simpler (though admittedly somewhat less flexible) solution, as
proposed by Baruch:
select BR2_PACKAGE_LIBGTK3 if !BR2_PACKAGE_LIBGTK2
and then use gtk3 if available, otherwise gtk2 if available. Thanks to
the select, you're sure at least one of the two will be available. The
only thing you give up is that the user cannot select to use gtk2 if he
has both gtk2 and gtk3 in the same system. But:
1/ situations with both gtk2 and gtk3 are pretty unlikely
2/ if you have both, why would you *not* want to use gtk3 ?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-07-03 7:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 22:09 [Buildroot] [PATCH 1/1] yad: new package James Knight
2015-07-03 5:31 ` Baruch Siach
2015-07-03 7:49 ` Thomas Petazzoni [this message]
2015-07-03 13:45 ` Peter Korsgaard
2015-07-03 15:44 ` James Knight
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=20150703094910.750481b4@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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