Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] yad: new package
Date: Fri, 3 Jul 2015 08:31:05 +0300	[thread overview]
Message-ID: <20150703053105.GL2391@tarshish> (raw)
In-Reply-To: <1435874967-6416-1-git-send-email-james.knight@rockwellcollins.com>

Hi James,

On Thu, Jul 02, 2015 at 06:09:27PM -0400, James Knight wrote:
> Signed-off-by: James Knight <james.knight@rockwellcollins.com>
> ---
>  package/Config.in     |  1 +
>  package/yad/Config.in | 23 +++++++++++++++++++++++
>  package/yad/yad.hash  |  2 ++
>  package/yad/yad.mk    | 24 ++++++++++++++++++++++++
>  4 files changed, 50 insertions(+)
>  create mode 100644 package/yad/Config.in
>  create mode 100644 package/yad/yad.hash
>  create mode 100644 package/yad/yad.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 13a7e74..351bb9a 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -289,6 +289,7 @@ comment "X applications"
>  	source "package/xscreensaver/Config.in"
>  	source "package/xterm/Config.in"
>  	source "package/xvkbd/Config.in"
> +	source "package/yad/Config.in"
>  
>  comment "X libraries and helper libraries"
>  	source "package/libsexy/Config.in"
> diff --git a/package/yad/Config.in b/package/yad/Config.in
> new file mode 100644
> index 0000000..ead2c44
> --- /dev/null
> +++ b/package/yad/Config.in
> @@ -0,0 +1,23 @@
> +config BR2_PACKAGE_YAD
> +	bool "yad"
> +	depends on BR2_PACKAGE_XORG7
> +	depends on BR2_PACKAGE_LIBGTK2 || BR2_PACKAGE_LIBGTK3
> +	select BR2_PACKAGE_LIBGLIB2
> +	help
> +	  YAD (yet another dialog) is a tool for create graphical dialogs
> +	  from shell scripts.
> +
> +	  http://sourceforge.net/projects/yad-dialog/
> +
> +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?

> +	help
> +	  Force YAD to be built with libgtk2.

This doesn't match the dependency.

Generally though we prefer using 'select' for not so obvious dependencies as 
is this case. Since yad seems to optionally depend on either gtk3 or gtk2 (I 
took a peek below) something like the following should do

	select BR2_PACKAGE_LIBGTK3 if !BR2_PACKAGE_LIBGTK2

Don't forget to propagate your selected default gtk dependencies here.

> +endif
> +
> +comment "yad needs libgtk2 or libgtk3"
> +	depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3

This comment then becomes redundant.

> 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...

> +YAD_DEPENDENCIES += libgtk3
> +YAD_CONF_OPTS += --with-gtk=gtk3

but here you assume that gtk3 is enabled.

> +else
> +YAD_DEPENDENCIES += libgtk2
> +YAD_CONF_OPTS += --with-gtk=gtk2
> +endif
> +
> +$(eval $(autotools-package))

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  reply	other threads:[~2015-07-03  5:31 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 [this message]
2015-07-03  7:49   ` Thomas Petazzoni
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=20150703053105.GL2391@tarshish \
    --to=baruch@tkos.co.il \
    --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