Skip to contentSkip to conversation

yad: new package

PATCH Superseded James Knight 2 participants 4 messages Oct 5, 2015 – Oct 7, 2015

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 yad: new package

---
Changes v2 -> v3:
- Increment to version 0.31.1 (removed need for HTML patch introduced in v2 change; suggested by Vicente Olivert Riera).

Changes v1 -> v2:
- Increment to version 0.29.0 (with updated hash and patch fix).
- Removed complex gtk library selection. Defaults to libgtk3, if available; elsewise, uses libgtk2 (suggested from comments by Baruch Siach, Thomas Petazzoni and Peter Korsgaard).

---
 package/Config.in     |  1 +
 package/yad/Config.in | 13 +++++++++++++
 package/yad/yad.hash  |  2 ++
 package/yad/yad.mk    | 24 ++++++++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 package/yad/Config.in
 create mode 100644 package/yad/yad.hash
 create mode 100644 package/yad/yad.mk
package/Config.in +1 -0
index 3794f44..5d4eb7d 100644
@@ -290,6 +290,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"
package/yad/Config.in new file +13 -0
new file mode 100644
index 0000000..1e6776b
@@ -0,0 +1,13 @@
+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/
+
+comment "yad needs libgtk2 or libgtk3"
+	depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3
package/yad/yad.hash new file +2 -0
new file mode 100644
index 0000000..fdde908
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 3716d71861009add49e0a8a2269b181feffd0449e4cdf4f317f873dfb8c94b82 yad-0.31.1.tar.xz
package/yad/yad.mk new file +24 -0
new file mode 100644
index 0000000..7615cf6
@@ -0,0 +1,24 @@
+################################################################################
+#
+# yad
+#
+################################################################################
+
+YAD_VERSION = 0.31.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),y)
+YAD_DEPENDENCIES += libgtk3
+YAD_CONF_OPTS += --with-gtk=gtk3
+else
+YAD_DEPENDENCIES += libgtk2
+YAD_CONF_OPTS += --with-gtk=gtk2
+endif
+
+$(eval $(autotools-package))
Signature · 1 line
1.9.5.msysgit.1
#1 lore raw

PATCH v3 1/1 yad: new package

Dear James Knight,

thanks for taking into account my review. I have added more comments below, so please, keep reading.

On 10/05/2015 09:28 PM, James Knight wrote:
[snip]

package/yad/Config.in line 4

Quoted 10 lines
package/yad/Config.in new file +4 -0
new file mode 100644
index 0000000..1e6776b
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_YAD
+	bool "yad"
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_LIBGTK2 || BR2_PACKAGE_LIBGTK3

In the next line you are going to select BR2_PACKAGE_LIBGLIB2, so you need to propagate its dependencies to this package as well. That means you need to add right here the following lines:

depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
depends on BR2_USE_MMU # libglib2

package/yad/Config.in line 8

Quoted 4 lines
package/yad/Config.in new file +4 -0
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  YAD (yet another dialog) is a tool for create graphical dialogs
+	  from shell scripts.

The word "from" still fits in the first line as it will not exceed the 72 characters limit.

package/yad/Config.in line 13

Quoted 5 lines
package/yad/Config.in new file +5 -0
+
+	  http://sourceforge.net/projects/yad-dialog/
+
+comment "yad needs libgtk2 or libgtk3"
+	depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3

And you also need to update this comment since now you have the libglib2 dependencies as well. Something like this would be ok:

comment "yad needs libgtk2 or libgtk3 and a toolchain w/ wchar, threads"
depends on BR2_USE_MMU

  depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
    (!BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3)

Be careful if you copy-paste the above text. You have to use tabs for indentation instead of spaces :-)

Regards,

Vincent.

#2 lore raw

PATCH v3 1/1 yad: new package

Vincent,

Quoted 7 lines · Vicente Olivert Riera

In the next line you are going to select BR2_PACKAGE_LIBGLIB2, so you need to propagate its dependencies to this package as well. That means you need to add right here the following lines:

depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
depends on BR2_USE_MMU # libglib2

Gotcha. I'll get that fixed.

On this point, is the common practice to copy the depends of packages you select on (ex. for this yad package, if I select on BR2_PACKAGE_LIBGLIB2, I then check the libglib2 package and copy the depends references it has and add the command "libglib2" to each line)?

Quoted 2 lines

The word "from" still fits in the first line as it will not exceed the 72 characters limit.

Does it? For myself I have three (3) characters left after "dialogs" (4+2+69+3). Is a four (4) character tab not the expected length or is it something else? Curious if I've been messing up all my Config.in files. :o

Quoted 9 lines

package/yad/Config.in line 13

Quoted 5 lines
package/yad/Config.in new file +5 -0
+
+       http://sourceforge.net/projects/yad-dialog/
+
+comment "yad needs libgtk2 or libgtk3"
+     depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3

And you also need to update this comment since now you have the libglib2 dependencies as well. Something like this would be ok:

Quoted 4 lines

comment "yad needs libgtk2 or libgtk3 and a toolchain w/ wchar, threads"
depends on BR2_USE_MMU

  depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
    (!BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3)

Will do. Thanks.

Quoted 2 lines

Be careful if you copy-paste the above text. You have to use tabs for indentation instead of spaces :-)

Always paranoid about this; unfortunately my paranoia doesn't catch it all the time. :(

#3 lore raw

PATCH v3 1/1 yad: new package

Dear James Knight,

Quoted 12 lines · James Knight

Vincent,

Quoted 7 lines · Vicente Olivert Riera

In the next line you are going to select BR2_PACKAGE_LIBGLIB2, so you need to propagate its dependencies to this package as well. That means you need to add right here the following lines:

depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
depends on BR2_USE_MMU # libglib2

Quoted 7 lines

Gotcha. I'll get that fixed.

On this point, is the common practice to copy the depends of packages you select on (ex. for this yad package, if I select on BR2_PACKAGE_LIBGLIB2, I then check the libglib2 package and copy the depends references it has and add the command "libglib2" to each line)?

yes, that's mandatory. When you select a package, you have to propagate its dependencies to the package which is selecting it. Otherwise, that package could select the other one despite of not satisfying the dependencies. For instance, in your case, if you select the "yad" package, it will automatically select the "libglib2" package. And that could be done even if your toolchain doesn't have threads support. Then, buildroot will try to build "libglib2" and it will fail.

A package shouldn't be able to select another one if the dependencies of the other package are not satisfied.

Quoted 7 lines
Quoted 2 lines

The word "from" still fits in the first line as it will not exceed the 72 characters limit.

Does it? For myself I have three (3) characters left after "dialogs" (4+2+69+3). Is a four (4) character tab not the expected length or is it something else? Curious if I've been messing up all my Config.in files. :o

Note that the tab counts as only one character, despite of the configuration of your text editor which displays the tabs as 4 spaces. If you use vim, is worth to have these options in the ~/.vimrc file when you write commit logs:

set textwidth=72
set wrap

This will wrap lines automatically when you reach the 72 characters limit.

Quoted 14 lines
Quoted 9 lines

package/yad/Config.in line 13

Quoted 5 lines
package/yad/Config.in new file +5 -0
+
+       http://sourceforge.net/projects/yad-dialog/
+
+comment "yad needs libgtk2 or libgtk3"
+     depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3

And you also need to update this comment since now you have the libglib2 dependencies as well. Something like this would be ok:

Quoted 4 lines

comment "yad needs libgtk2 or libgtk3 and a toolchain w/ wchar, threads"
depends on BR2_USE_MMU

  depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
    (!BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3)
Quoted 7 lines

Will do. Thanks.

Quoted 2 lines

Be careful if you copy-paste the above text. You have to use tabs for indentation instead of spaces :-)

Always paranoid about this; unfortunately my paranoia doesn't catch it all the time. :(

hehe, hopefully we will catch it during the review process :P

Regards,

Vincent.