All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/2] new packages: libzip and sigrok
@ 2015-01-27 16:02 Bartosz Golaszewski
  2015-01-27 16:02 ` [Buildroot] [PATCH 1/2] libzip: new package Bartosz Golaszewski
  2015-01-27 16:02 ` [Buildroot] [PATCH 2/2] sigrok: " Bartosz Golaszewski
  0 siblings, 2 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2015-01-27 16:02 UTC (permalink / raw)
  To: buildroot

This series adds support for building a minimal subset of the sigrok
software  suite. The motivation for merging these patches is making
sigrok-cli available for users of ACME board (http://baylibre.com/acme/).

The first patch adds libzip package - this is required to build libsigrok.

The second patch adds sigrok libraries and sigrok-cli executable in
a single package. The sources for sigrok modules are cloned from current
git HEADs. This is because ACME driver for sigrok isn't upstream yet and
we would like to make it available in buildroot as soon as it's merged.

Bartosz Golaszewski (2):
  libzip: new package
  sigrok: new package

 package/Config.in                                 |  2 ++
 package/libzip/Config.in                          |  7 +++++
 package/libzip/libzip.mk                          | 15 +++++++++
 package/sigrok/Config.in                          | 37 +++++++++++++++++++++++
 package/sigrok/libserialport/libserialport.mk     | 15 +++++++++
 package/sigrok/libsigrok/libsigrok.mk             | 16 ++++++++++
 package/sigrok/libsigrokdecode/libsigrokdecode.mk | 16 ++++++++++
 package/sigrok/sigrok.mk                          | 10 ++++++
 package/sigrok/sigrokcli/sigrokcli.mk             | 14 +++++++++
 9 files changed, 132 insertions(+)
 create mode 100644 package/libzip/Config.in
 create mode 100644 package/libzip/libzip.mk
 create mode 100644 package/sigrok/Config.in
 create mode 100644 package/sigrok/libserialport/libserialport.mk
 create mode 100644 package/sigrok/libsigrok/libsigrok.mk
 create mode 100644 package/sigrok/libsigrokdecode/libsigrokdecode.mk
 create mode 100644 package/sigrok/sigrok.mk
 create mode 100644 package/sigrok/sigrokcli/sigrokcli.mk

-- 
2.1.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] libzip: new package
  2015-01-27 16:02 [Buildroot] [PATCH 0/2] new packages: libzip and sigrok Bartosz Golaszewski
@ 2015-01-27 16:02 ` Bartosz Golaszewski
  2015-01-28 22:31   ` Arnout Vandecappelle
  2015-01-27 16:02 ` [Buildroot] [PATCH 2/2] sigrok: " Bartosz Golaszewski
  1 sibling, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2015-01-27 16:02 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 package/Config.in        |  1 +
 package/libzip/Config.in |  7 +++++++
 package/libzip/libzip.mk | 15 +++++++++++++++
 3 files changed, 23 insertions(+)
 create mode 100644 package/libzip/Config.in
 create mode 100644 package/libzip/libzip.mk

diff --git a/package/Config.in b/package/Config.in
index 51d4c15..2d0adac 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -603,6 +603,7 @@ endmenu
 
 menu "Compression and decompression"
 	source "package/libarchive/Config.in"
+	source "package/libzip/Config.in"
 	source "package/lzo/Config.in"
 	source "package/snappy/Config.in"
 	source "package/szip/Config.in"
diff --git a/package/libzip/Config.in b/package/libzip/Config.in
new file mode 100644
index 0000000..c07b956
--- /dev/null
+++ b/package/libzip/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBZIP
+	bool "libzip"
+	select BR2_PACKAGE_ZLIB
+	help
+	  C library for reading, creating, and modifying zip archives.
+
+	  http://www.nih.at/libzip/
diff --git a/package/libzip/libzip.mk b/package/libzip/libzip.mk
new file mode 100644
index 0000000..3a9cdb1
--- /dev/null
+++ b/package/libzip/libzip.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# libzip
+#
+################################################################################
+
+LIBZIP_VERSION = 0.11.2
+LIBZIP_SITE = http://www.nih.at/libzip/
+LIBZIP_SOURCE = libzip-$(LIBZIP_VERSION).tar.xz
+LIBZIP_LICENSE = special libzip license
+LIBZIP_LICENSE_FILES = LICENSE
+LIBZIP_INSTALL_STAGING = YES
+LIBZIP_DEPENDENCIES = zlib
+
+$(eval $(autotools-package))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] sigrok: new package
  2015-01-27 16:02 [Buildroot] [PATCH 0/2] new packages: libzip and sigrok Bartosz Golaszewski
  2015-01-27 16:02 ` [Buildroot] [PATCH 1/2] libzip: new package Bartosz Golaszewski
@ 2015-01-27 16:02 ` Bartosz Golaszewski
  2015-01-28 23:32   ` Arnout Vandecappelle
  1 sibling, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2015-01-27 16:02 UTC (permalink / raw)
  To: buildroot

Add sigrok libraries and sigrok-cli executable in a single package.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 package/Config.in                                 |  1 +
 package/sigrok/Config.in                          | 37 +++++++++++++++++++++++
 package/sigrok/libserialport/libserialport.mk     | 15 +++++++++
 package/sigrok/libsigrok/libsigrok.mk             | 16 ++++++++++
 package/sigrok/libsigrokdecode/libsigrokdecode.mk | 16 ++++++++++
 package/sigrok/sigrok.mk                          | 10 ++++++
 package/sigrok/sigrokcli/sigrokcli.mk             | 14 +++++++++
 7 files changed, 109 insertions(+)
 create mode 100644 package/sigrok/Config.in
 create mode 100644 package/sigrok/libserialport/libserialport.mk
 create mode 100644 package/sigrok/libsigrok/libsigrok.mk
 create mode 100644 package/sigrok/libsigrokdecode/libsigrokdecode.mk
 create mode 100644 package/sigrok/sigrok.mk
 create mode 100644 package/sigrok/sigrokcli/sigrokcli.mk

diff --git a/package/Config.in b/package/Config.in
index 2d0adac..fe2f417 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -364,6 +364,7 @@ endif
 	source "package/sdparm/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
+	source "package/sigrok/Config.in"
 	source "package/sispmctl/Config.in"
 	source "package/smartmontools/Config.in"
 	source "package/smstools3/Config.in"
diff --git a/package/sigrok/Config.in b/package/sigrok/Config.in
new file mode 100644
index 0000000..f5f52ce
--- /dev/null
+++ b/package/sigrok/Config.in
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_SIGROK
+	bool "sigrok"
+	select BR2_PACKAGE_LIBSERIALPORT
+	select BR2_PACKAGE_LIBSIGROK
+	select BR2_PACKAGE_LIBSIGROKDECODE
+	select BR2_PACKAGE_SIGROKCLI
+	# libglib2 & python3:
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	help
+	  Signal analysis software suite.
+
+	  This package contains the sigrok software suite: libserialport,
+	  libsigrok, libsigrokdecode libraries and sigrok-cli command-line
+	  utility.
+
+	  http://sigrok.org/
+
+comment "sigrok needs a toolchain w/ wchar, threads
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_LIBSERIALPORT
+	bool
+
+config BR2_PACKAGE_LIBSIGROK
+	bool
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_LIBZIP
+
+config BR2_PACKAGE_LIBSIGROKDECODE
+	bool
+	select BR2_PACKAGE_PYTHON3
+
+config BR2_PACKAGE_SIGROKCLI
+	bool
diff --git a/package/sigrok/libserialport/libserialport.mk b/package/sigrok/libserialport/libserialport.mk
new file mode 100644
index 0000000..970e1c1
--- /dev/null
+++ b/package/sigrok/libserialport/libserialport.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# libserialport
+#
+################################################################################
+
+LIBSERIALPORT_VERSION = HEAD
+LIBSERIALPORT_SITE = git://sigrok.org/libserialport
+LIBSERIALPORT_LICENSE = LGPLv3+
+LIBSERIALPORT_LICENSE_FILES = COPYING
+LIBSERIALPORT_AUTORECONF = YES
+LIBSERIALPORT_INSTALL_STAGING = YES
+LIBSERIALPORT_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
+
+$(eval $(autotools-package))
diff --git a/package/sigrok/libsigrok/libsigrok.mk b/package/sigrok/libsigrok/libsigrok.mk
new file mode 100644
index 0000000..4a61f6c
--- /dev/null
+++ b/package/sigrok/libsigrok/libsigrok.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libsigrok
+#
+################################################################################
+
+LIBSIGROK_VERSION = HEAD
+LIBSIGROK_SITE = git://sigrok.org/libsigrok
+LIBSIGROK_LICENSE = GPLv3+
+LIBSIGROK_LICENSE = COPYING
+LIBSIGROK_AUTORECONF = YES
+LIBSIGROK_INSTALL_STAGING = YES
+LIBSIGROK_DEPENDENCIES = libglib2 libzip
+LIBSIGROK_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
+
+$(eval $(autotools-package))
diff --git a/package/sigrok/libsigrokdecode/libsigrokdecode.mk b/package/sigrok/libsigrokdecode/libsigrokdecode.mk
new file mode 100644
index 0000000..696f097
--- /dev/null
+++ b/package/sigrok/libsigrokdecode/libsigrokdecode.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# libsigrokdecode
+#
+################################################################################
+
+LIBSIGROKDECODE_VERSION = HEAD
+LIBSIGROKDECODE_SITE = git://sigrok.org/libsigrokdecode
+LIBSIGROKDECODE_LICENSE = GPLv3+
+LIBSIGROKDECODE_LICENSE_FILES = COPYING
+LIBSIGROKDECODE_AUTORECONF = YES
+LIBSIGROKDECODE_INSTALL_STAGING = YES
+LIBSIGROKDECODE_DEPENDENCIES = python3
+LIBSIGROKDECODE_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
+
+$(eval $(autotools-package))
diff --git a/package/sigrok/sigrok.mk b/package/sigrok/sigrok.mk
new file mode 100644
index 0000000..b287880
--- /dev/null
+++ b/package/sigrok/sigrok.mk
@@ -0,0 +1,10 @@
+define SIGROK_ADD_MISSING
+	cd $(@D); \
+	mkdir -p autostuff; \
+	automake --add-missing; \
+	cd -;
+endef
+
+ifeq ($(BR2_PACKAGE_SIGROK),y)
+include $(sort $(wildcard package/sigrok/*/*.mk))
+endif
diff --git a/package/sigrok/sigrokcli/sigrokcli.mk b/package/sigrok/sigrokcli/sigrokcli.mk
new file mode 100644
index 0000000..3d984ef
--- /dev/null
+++ b/package/sigrok/sigrokcli/sigrokcli.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# sigrok-cli
+#
+################################################################################
+
+SIGROKCLI_VERSION = HEAD
+SIGROKCLI_SITE = git://sigrok.org/sigrok-cli
+SIGROKCLI_LICENSE = GPLv3+
+SIGROKCLI_LICENSE_FILES = COPYING
+SIGROKCLI_AUTORECONF = YES
+SIGROKCLI_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
+
+$(eval $(autotools-package))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] libzip: new package
  2015-01-27 16:02 ` [Buildroot] [PATCH 1/2] libzip: new package Bartosz Golaszewski
@ 2015-01-28 22:31   ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-01-28 22:31 UTC (permalink / raw)
  To: buildroot

On 27/01/15 17:02, Bartosz Golaszewski wrote:
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 One small remark below

> ---
>  package/Config.in        |  1 +
>  package/libzip/Config.in |  7 +++++++
>  package/libzip/libzip.mk | 15 +++++++++++++++
>  3 files changed, 23 insertions(+)
>  create mode 100644 package/libzip/Config.in
>  create mode 100644 package/libzip/libzip.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 51d4c15..2d0adac 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -603,6 +603,7 @@ endmenu
>  
>  menu "Compression and decompression"
>  	source "package/libarchive/Config.in"
> +	source "package/libzip/Config.in"
>  	source "package/lzo/Config.in"
>  	source "package/snappy/Config.in"
>  	source "package/szip/Config.in"
> diff --git a/package/libzip/Config.in b/package/libzip/Config.in
> new file mode 100644
> index 0000000..c07b956
> --- /dev/null
> +++ b/package/libzip/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_LIBZIP
> +	bool "libzip"
> +	select BR2_PACKAGE_ZLIB
> +	help
> +	  C library for reading, creating, and modifying zip archives.

 Perhaps mention that also zipcmp zipmerge ziptorrent are installed.


 Regards,
 Arnout

> +
> +	  http://www.nih.at/libzip/
> diff --git a/package/libzip/libzip.mk b/package/libzip/libzip.mk
> new file mode 100644
> index 0000000..3a9cdb1
> --- /dev/null
> +++ b/package/libzip/libzip.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# libzip
> +#
> +################################################################################
> +
> +LIBZIP_VERSION = 0.11.2
> +LIBZIP_SITE = http://www.nih.at/libzip/
> +LIBZIP_SOURCE = libzip-$(LIBZIP_VERSION).tar.xz
> +LIBZIP_LICENSE = special libzip license
> +LIBZIP_LICENSE_FILES = LICENSE
> +LIBZIP_INSTALL_STAGING = YES
> +LIBZIP_DEPENDENCIES = zlib
> +
> +$(eval $(autotools-package))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] sigrok: new package
  2015-01-27 16:02 ` [Buildroot] [PATCH 2/2] sigrok: " Bartosz Golaszewski
@ 2015-01-28 23:32   ` Arnout Vandecappelle
  2015-01-29 11:38     ` Bartosz Golaszewski
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-01-28 23:32 UTC (permalink / raw)
  To: buildroot

 Hi Bartosz,

 Thanks for your contribution. I haven't tested this one yet, but I have some
remarks.


On 27/01/15 17:02, Bartosz Golaszewski wrote:
> Add sigrok libraries and sigrok-cli executable in a single package.

 Is there a good reason to put everything in a single package? We normally make
separate packages for everything. We also don't like putting things in a
subdirectory very much. So I'd expect three separate packages:

package/libserialport
package/libsigrok
package/libsigrokdecode
package/sigrok-cli

 The first three would go in the Libraries -> Hardware Handling menu, while the
cli would go in the Packages -> Hardware Handling menu.


> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  package/Config.in                                 |  1 +
>  package/sigrok/Config.in                          | 37 +++++++++++++++++++++++
>  package/sigrok/libserialport/libserialport.mk     | 15 +++++++++
>  package/sigrok/libsigrok/libsigrok.mk             | 16 ++++++++++
>  package/sigrok/libsigrokdecode/libsigrokdecode.mk | 16 ++++++++++
>  package/sigrok/sigrok.mk                          | 10 ++++++
>  package/sigrok/sigrokcli/sigrokcli.mk             | 14 +++++++++
>  7 files changed, 109 insertions(+)
>  create mode 100644 package/sigrok/Config.in
>  create mode 100644 package/sigrok/libserialport/libserialport.mk
>  create mode 100644 package/sigrok/libsigrok/libsigrok.mk
>  create mode 100644 package/sigrok/libsigrokdecode/libsigrokdecode.mk
>  create mode 100644 package/sigrok/sigrok.mk
>  create mode 100644 package/sigrok/sigrokcli/sigrokcli.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 2d0adac..fe2f417 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -364,6 +364,7 @@ endif
>  	source "package/sdparm/Config.in"
>  	source "package/setserial/Config.in"
>  	source "package/sg3_utils/Config.in"
> +	source "package/sigrok/Config.in"
>  	source "package/sispmctl/Config.in"
>  	source "package/smartmontools/Config.in"
>  	source "package/smstools3/Config.in"
> diff --git a/package/sigrok/Config.in b/package/sigrok/Config.in
> new file mode 100644
> index 0000000..f5f52ce
> --- /dev/null
> +++ b/package/sigrok/Config.in
> @@ -0,0 +1,37 @@
> +config BR2_PACKAGE_SIGROK
> +	bool "sigrok"
> +	select BR2_PACKAGE_LIBSERIALPORT
> +	select BR2_PACKAGE_LIBSIGROK
> +	select BR2_PACKAGE_LIBSIGROKDECODE
> +	select BR2_PACKAGE_SIGROKCLI
> +	# libglib2 & python3:
> +	depends on BR2_USE_WCHAR

 We usually put something like:

	depends on BR2_USE_WCHAR # libsigrok->libglib2, libsigrokdecode->python3

> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_USE_MMU
> +	help
> +	  Signal analysis software suite.
> +
> +	  This package contains the sigrok software suite: libserialport,
> +	  libsigrok, libsigrokdecode libraries and sigrok-cli command-line
> +	  utility.
> +
> +	  http://sigrok.org/
> +
> +comment "sigrok needs a toolchain w/ wchar, threads
> +	depends on BR2_USE_MMU
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +
> +config BR2_PACKAGE_LIBSERIALPORT
> +	bool
> +
> +config BR2_PACKAGE_LIBSIGROK
> +	bool
> +	select BR2_PACKAGE_LIBGLIB2
> +	select BR2_PACKAGE_LIBZIP
> +
> +config BR2_PACKAGE_LIBSIGROKDECODE
> +	bool
> +	select BR2_PACKAGE_PYTHON3
> +
> +config BR2_PACKAGE_SIGROKCLI
> +	bool
> diff --git a/package/sigrok/libserialport/libserialport.mk b/package/sigrok/libserialport/libserialport.mk
> new file mode 100644
> index 0000000..970e1c1
> --- /dev/null
> +++ b/package/sigrok/libserialport/libserialport.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# libserialport
> +#
> +################################################################################
> +
> +LIBSERIALPORT_VERSION = HEAD

 We want a specific version so the build is reproducible. Preferably a tag, but
in this case I guess it would be a full commit ID:
e31f2c6b8b8f2b7e554df911cc9a3482b99632b4

 But I understand you plan to do that as soon as the ACME drivers have been
accepted.


 Or a tarball is even better. If you can convince upstream to create a release?

 Same for the other packages of course.


> +LIBSERIALPORT_SITE = git://sigrok.org/libserialport

 If http is possible, that is preferable, because not all company firewalls
allow git to pass.

> +LIBSERIALPORT_LICENSE = LGPLv3+
> +LIBSERIALPORT_LICENSE_FILES = COPYING
> +LIBSERIALPORT_AUTORECONF = YES

 We usually but a comment why autoreconf is needed:

# git checkout has no configure script

> +LIBSERIALPORT_INSTALL_STAGING = YES
> +LIBSERIALPORT_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING

 Hm. I like it when code duplication is avoided, but for e.g. phpize we do
duplicate it. Not sure...


> +
> +$(eval $(autotools-package))
> diff --git a/package/sigrok/libsigrok/libsigrok.mk b/package/sigrok/libsigrok/libsigrok.mk
> new file mode 100644
> index 0000000..4a61f6c
> --- /dev/null
> +++ b/package/sigrok/libsigrok/libsigrok.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# libsigrok
> +#
> +################################################################################
> +
> +LIBSIGROK_VERSION = HEAD
> +LIBSIGROK_SITE = git://sigrok.org/libsigrok
> +LIBSIGROK_LICENSE = GPLv3+
> +LIBSIGROK_LICENSE = COPYING
> +LIBSIGROK_AUTORECONF = YES
> +LIBSIGROK_INSTALL_STAGING = YES
> +LIBSIGROK_DEPENDENCIES = libglib2 libzip
> +LIBSIGROK_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING

 I see a lot of optional dependencies here. We prefer to handle them explicitly,
either disabling them:

LIBSIGROK_CONF_OPTS = \
	--disable-libftdi \
	--disable-libusb \
	--disable-bindings

or handling them:

ifeq ($(BR2_PACKAGE_LIBFTDI),y)
LIBSIGROK_CONF_OPTS += --enable-libftdi
LIBSIGROK_DEPENDENCIES += libftdi
else
LIBSIGROK_CONF_OPTS += --disable-libftdi
endif


 This makes sure that the build result is the same regardless of the order in
which things are built.


 Note that there is also an optional dependency on glibmm, but it can't be
disabled. This should be handled like this:

ifeq ($(BR2_PACKAGE_GLIBMM),y)
LIBSIGROK_DEPENDENCIES += glibmm
endif


 Same for python-gobject.

 Check configure.ac for more.


> +
> +$(eval $(autotools-package))
[snip]
> diff --git a/package/sigrok/sigrokcli/sigrokcli.mk b/package/sigrok/sigrokcli/sigrokcli.mk
> new file mode 100644
> index 0000000..3d984ef
> --- /dev/null
> +++ b/package/sigrok/sigrokcli/sigrokcli.mk
> @@ -0,0 +1,14 @@
> +################################################################################
> +#
> +# sigrok-cli
> +#
> +################################################################################
> +
> +SIGROKCLI_VERSION = HEAD
> +SIGROKCLI_SITE = git://sigrok.org/sigrok-cli
> +SIGROKCLI_LICENSE = GPLv3+
> +SIGROKCLI_LICENSE_FILES = COPYING
> +SIGROKCLI_AUTORECONF = YES
> +SIGROKCLI_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING

 The optional dependency on libsigrokdecode should definitely be handled here.


 Regards,
 Arnout

> +
> +$(eval $(autotools-package))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] sigrok: new package
  2015-01-28 23:32   ` Arnout Vandecappelle
@ 2015-01-29 11:38     ` Bartosz Golaszewski
  0 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2015-01-29 11:38 UTC (permalink / raw)
  To: buildroot

2015-01-29 0:32 GMT+01:00 Arnout Vandecappelle <arnout@mind.be>:
>  Hi Bartosz,
>
>  Thanks for your contribution. I haven't tested this one yet, but I have some
> remarks.
>
>
> On 27/01/15 17:02, Bartosz Golaszewski wrote:
>> Add sigrok libraries and sigrok-cli executable in a single package.
>
>  Is there a good reason to put everything in a single package? We normally make
> separate packages for everything. We also don't like putting things in a
> subdirectory very much. So I'd expect three separate packages:
>
> package/libserialport
> package/libsigrok
> package/libsigrokdecode
> package/sigrok-cli
>
>  The first three would go in the Libraries -> Hardware Handling menu, while the
> cli would go in the Packages -> Hardware Handling menu.
>
>
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> ---
>>  package/Config.in                                 |  1 +
>>  package/sigrok/Config.in                          | 37 +++++++++++++++++++++++
>>  package/sigrok/libserialport/libserialport.mk     | 15 +++++++++
>>  package/sigrok/libsigrok/libsigrok.mk             | 16 ++++++++++
>>  package/sigrok/libsigrokdecode/libsigrokdecode.mk | 16 ++++++++++
>>  package/sigrok/sigrok.mk                          | 10 ++++++
>>  package/sigrok/sigrokcli/sigrokcli.mk             | 14 +++++++++
>>  7 files changed, 109 insertions(+)
>>  create mode 100644 package/sigrok/Config.in
>>  create mode 100644 package/sigrok/libserialport/libserialport.mk
>>  create mode 100644 package/sigrok/libsigrok/libsigrok.mk
>>  create mode 100644 package/sigrok/libsigrokdecode/libsigrokdecode.mk
>>  create mode 100644 package/sigrok/sigrok.mk
>>  create mode 100644 package/sigrok/sigrokcli/sigrokcli.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index 2d0adac..fe2f417 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -364,6 +364,7 @@ endif
>>       source "package/sdparm/Config.in"
>>       source "package/setserial/Config.in"
>>       source "package/sg3_utils/Config.in"
>> +     source "package/sigrok/Config.in"
>>       source "package/sispmctl/Config.in"
>>       source "package/smartmontools/Config.in"
>>       source "package/smstools3/Config.in"
>> diff --git a/package/sigrok/Config.in b/package/sigrok/Config.in
>> new file mode 100644
>> index 0000000..f5f52ce
>> --- /dev/null
>> +++ b/package/sigrok/Config.in
>> @@ -0,0 +1,37 @@
>> +config BR2_PACKAGE_SIGROK
>> +     bool "sigrok"
>> +     select BR2_PACKAGE_LIBSERIALPORT
>> +     select BR2_PACKAGE_LIBSIGROK
>> +     select BR2_PACKAGE_LIBSIGROKDECODE
>> +     select BR2_PACKAGE_SIGROKCLI
>> +     # libglib2 & python3:
>> +     depends on BR2_USE_WCHAR
>
>  We usually put something like:
>
>         depends on BR2_USE_WCHAR # libsigrok->libglib2, libsigrokdecode->python3
>
>> +     depends on BR2_TOOLCHAIN_HAS_THREADS
>> +     depends on BR2_USE_MMU
>> +     help
>> +       Signal analysis software suite.
>> +
>> +       This package contains the sigrok software suite: libserialport,
>> +       libsigrok, libsigrokdecode libraries and sigrok-cli command-line
>> +       utility.
>> +
>> +       http://sigrok.org/
>> +
>> +comment "sigrok needs a toolchain w/ wchar, threads
>> +     depends on BR2_USE_MMU
>> +     depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
>> +
>> +config BR2_PACKAGE_LIBSERIALPORT
>> +     bool
>> +
>> +config BR2_PACKAGE_LIBSIGROK
>> +     bool
>> +     select BR2_PACKAGE_LIBGLIB2
>> +     select BR2_PACKAGE_LIBZIP
>> +
>> +config BR2_PACKAGE_LIBSIGROKDECODE
>> +     bool
>> +     select BR2_PACKAGE_PYTHON3
>> +
>> +config BR2_PACKAGE_SIGROKCLI
>> +     bool
>> diff --git a/package/sigrok/libserialport/libserialport.mk b/package/sigrok/libserialport/libserialport.mk
>> new file mode 100644
>> index 0000000..970e1c1
>> --- /dev/null
>> +++ b/package/sigrok/libserialport/libserialport.mk
>> @@ -0,0 +1,15 @@
>> +################################################################################
>> +#
>> +# libserialport
>> +#
>> +################################################################################
>> +
>> +LIBSERIALPORT_VERSION = HEAD
>
>  We want a specific version so the build is reproducible. Preferably a tag, but
> in this case I guess it would be a full commit ID:
> e31f2c6b8b8f2b7e554df911cc9a3482b99632b4
>
>  But I understand you plan to do that as soon as the ACME drivers have been
> accepted.
>
>
>  Or a tarball is even better. If you can convince upstream to create a release?
>
>  Same for the other packages of course.
>
>
>> +LIBSERIALPORT_SITE = git://sigrok.org/libserialport
>
>  If http is possible, that is preferable, because not all company firewalls
> allow git to pass.
>
>> +LIBSERIALPORT_LICENSE = LGPLv3+
>> +LIBSERIALPORT_LICENSE_FILES = COPYING
>> +LIBSERIALPORT_AUTORECONF = YES
>
>  We usually but a comment why autoreconf is needed:
>
> # git checkout has no configure script
>
>> +LIBSERIALPORT_INSTALL_STAGING = YES
>> +LIBSERIALPORT_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
>
>  Hm. I like it when code duplication is avoided, but for e.g. phpize we do
> duplicate it. Not sure...
>
>
>> +
>> +$(eval $(autotools-package))
>> diff --git a/package/sigrok/libsigrok/libsigrok.mk b/package/sigrok/libsigrok/libsigrok.mk
>> new file mode 100644
>> index 0000000..4a61f6c
>> --- /dev/null
>> +++ b/package/sigrok/libsigrok/libsigrok.mk
>> @@ -0,0 +1,16 @@
>> +################################################################################
>> +#
>> +# libsigrok
>> +#
>> +################################################################################
>> +
>> +LIBSIGROK_VERSION = HEAD
>> +LIBSIGROK_SITE = git://sigrok.org/libsigrok
>> +LIBSIGROK_LICENSE = GPLv3+
>> +LIBSIGROK_LICENSE = COPYING
>> +LIBSIGROK_AUTORECONF = YES
>> +LIBSIGROK_INSTALL_STAGING = YES
>> +LIBSIGROK_DEPENDENCIES = libglib2 libzip
>> +LIBSIGROK_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
>
>  I see a lot of optional dependencies here. We prefer to handle them explicitly,
> either disabling them:
>
> LIBSIGROK_CONF_OPTS = \
>         --disable-libftdi \
>         --disable-libusb \
>         --disable-bindings
>
> or handling them:
>
> ifeq ($(BR2_PACKAGE_LIBFTDI),y)
> LIBSIGROK_CONF_OPTS += --enable-libftdi
> LIBSIGROK_DEPENDENCIES += libftdi
> else
> LIBSIGROK_CONF_OPTS += --disable-libftdi
> endif
>
>
>  This makes sure that the build result is the same regardless of the order in
> which things are built.
>
>
>  Note that there is also an optional dependency on glibmm, but it can't be
> disabled. This should be handled like this:
>
> ifeq ($(BR2_PACKAGE_GLIBMM),y)
> LIBSIGROK_DEPENDENCIES += glibmm
> endif
>
>
>  Same for python-gobject.
>
>  Check configure.ac for more.
>
>
>> +
>> +$(eval $(autotools-package))
> [snip]
>> diff --git a/package/sigrok/sigrokcli/sigrokcli.mk b/package/sigrok/sigrokcli/sigrokcli.mk
>> new file mode 100644
>> index 0000000..3d984ef
>> --- /dev/null
>> +++ b/package/sigrok/sigrokcli/sigrokcli.mk
>> @@ -0,0 +1,14 @@
>> +################################################################################
>> +#
>> +# sigrok-cli
>> +#
>> +################################################################################
>> +
>> +SIGROKCLI_VERSION = HEAD
>> +SIGROKCLI_SITE = git://sigrok.org/sigrok-cli
>> +SIGROKCLI_LICENSE = GPLv3+
>> +SIGROKCLI_LICENSE_FILES = COPYING
>> +SIGROKCLI_AUTORECONF = YES
>> +SIGROKCLI_PRE_CONFIGURE_HOOKS += SIGROK_ADD_MISSING
>
>  The optional dependency on libsigrokdecode should definitely be handled here.
>
>
>  Regards,
>  Arnout

Hi Arnout,

thanks for the review! Please check the updated version I've just
submitted. Tested on a BeagleBone Black.

Bart

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-01-29 11:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 16:02 [Buildroot] [PATCH 0/2] new packages: libzip and sigrok Bartosz Golaszewski
2015-01-27 16:02 ` [Buildroot] [PATCH 1/2] libzip: new package Bartosz Golaszewski
2015-01-28 22:31   ` Arnout Vandecappelle
2015-01-27 16:02 ` [Buildroot] [PATCH 2/2] sigrok: " Bartosz Golaszewski
2015-01-28 23:32   ` Arnout Vandecappelle
2015-01-29 11:38     ` Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.