Skip to contentSkip to conversation

new packages: libzip and sigrok

PATCH New Bartosz Golaszewski 1 participant 6 messages Jan 29, 2015

lore
Share & tools
lore
#0 lore raw

v2 cover new packages: libzip and sigrok

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

v2:
- Split sigrok package into separate packages for each library and sigrok-cli.
- Properly handle conditional dependencies.
- Don't require libsigrokdecode in order to build sigrok-cli.
- Other minor fixes according to the code review.

v1:
http://lists.busybox.net/pipermail/buildroot/2015-January/118135.html

Bartosz Golaszewski (5):
libzip: new package
libserialport: new package
libsigrok: new package
sigrok-cli: new package
libsigrokdecode: new package

 package/Config.in                          |  5 ++++
 package/libserialport/Config.in            |  8 ++++++
 package/libserialport/libserialport.mk     | 25 +++++++++++++++++
 package/libsigrok/Config.in                | 22 +++++++++++++++
 package/libsigrok/libsigrok.mk             | 45 ++++++++++++++++++++++++++++++
 package/libsigrokdecode/Config.in          | 20 +++++++++++++
 package/libsigrokdecode/libsigrokdecode.mk | 26 +++++++++++++++++
 package/libzip/Config.in                   |  8 ++++++
 package/libzip/libzip.mk                   | 15 ++++++++++
 package/sigrok-cli/Config.in               | 17 +++++++++++
 package/sigrok-cli/sigrok-cli.mk           | 32 +++++++++++++++++++++
 11 files changed, 223 insertions(+)
 create mode 100644 package/libserialport/Config.in
 create mode 100644 package/libserialport/libserialport.mk
 create mode 100644 package/libsigrok/Config.in
 create mode 100644 package/libsigrok/libsigrok.mk
 create mode 100644 package/libsigrokdecode/Config.in
 create mode 100644 package/libsigrokdecode/libsigrokdecode.mk
 create mode 100644 package/libzip/Config.in
 create mode 100644 package/libzip/libzip.mk
 create mode 100644 package/sigrok-cli/Config.in
 create mode 100644 package/sigrok-cli/sigrok-cli.mk
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/5 libzip: new package

---
 package/Config.in        |  1 +
 package/libzip/Config.in |  8 ++++++++
 package/libzip/libzip.mk | 15 +++++++++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 package/libzip/Config.in
 create mode 100644 package/libzip/libzip.mk
package/Config.in +1 -0
index d65de70..7312255 100644
@@ -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"
package/libzip/Config.in new file +8 -0
new file mode 100644
index 0000000..54de9e5
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBZIP
+	bool "libzip"
+	select BR2_PACKAGE_ZLIB
+	help
+	  C library for reading, creating, and modifying zip archives. This
+	  package also contains zipcmp, ziptorrent and zipmerge utilities.
+
+	  http://www.nih.at/libzip/
package/libzip/libzip.mk new file +15 -0
new file mode 100644
index 0000000..3a9cdb1
@@ -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))
Signature · 1 line
2.1.4
#2 lore raw

PATCH v2 2/5 libserialport: new package

In reply to Bartosz Golaszewski
---
 package/Config.in                      |  1 +
 package/libserialport/Config.in        |  8 ++++++++
 package/libserialport/libserialport.mk | 25 +++++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 100644 package/libserialport/Config.in
 create mode 100644 package/libserialport/libserialport.mk
package/Config.in +1 -0
index 7312255..32d8e8a 100644
@@ -732,6 +732,7 @@ menu "Hardware handling"
 	source "package/libraw1394/Config.in"
 	source "package/librtlsdr/Config.in"
 	source "package/libserial/Config.in"
+	source "package/libserialport/Config.in"
 	source "package/libsoc/Config.in"
 	source "package/libusb/Config.in"
 	source "package/libusb-compat/Config.in"
package/libserialport/Config.in new file +8 -0
new file mode 100644
index 0000000..1e2935f
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBSERIALPORT
+	bool "libserialport"
+	help
+	  Serial port access library.
+
+	  This library is a part of the sigrok software suite.
+
+	  http://sigrok.org/wiki/Libserialport
package/libserialport/libserialport.mk new file +25 -0
new file mode 100644
index 0000000..9a14ba1
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libserialport
+#
+################################################################################
+
+LIBSERIALPORT_VERSION = e31f2c6b8b8f2b7e554df911cc9a3482b99632b4
+# No https access on upstream git
+LIBSERIALPORT_SITE = git://sigrok.org/libserialport
+LIBSERIALPORT_LICENSE = LGPLv3+
+LIBSERIALPORT_LICENSE_FILES = COPYING
+# Git checkout has no configure script
+LIBSERIALPORT_AUTORECONF = YES
+LIBSERIALPORT_INSTALL_STAGING = YES
+
+define LIBSERIALPORT_ADD_MISSING
+	cd $(@D); \
+	mkdir -p autostuff; \
+	automake --add-missing; \
+	cd -;
+endef
+
+LIBSERIALPORT_PRE_CONFIGURE_HOOKS += LIBSERIALPORT_ADD_MISSING
+
+$(eval $(autotools-package))
Signature · 1 line
2.1.4
#3 lore raw

PATCH v2 3/5 libsigrok: new package

In reply to Bartosz Golaszewski
---
 package/Config.in              |  1 +
 package/libsigrok/Config.in    | 22 +++++++++++++++++++++
 package/libsigrok/libsigrok.mk | 45 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 package/libsigrok/Config.in
 create mode 100644 package/libsigrok/libsigrok.mk
package/Config.in +1 -0
index 32d8e8a..686f343 100644
@@ -733,6 +733,7 @@ menu "Hardware handling"
 	source "package/librtlsdr/Config.in"
 	source "package/libserial/Config.in"
 	source "package/libserialport/Config.in"
+	source "package/libsigrok/Config.in"
 	source "package/libsoc/Config.in"
 	source "package/libusb/Config.in"
 	source "package/libusb-compat/Config.in"
package/libsigrok/Config.in new file +22 -0
new file mode 100644
index 0000000..09077fb
@@ -0,0 +1,22 @@
+config BR2_PACKAGE_LIBSIGROK
+	bool "libsigrok"
+	select BR2_PACKAGE_LIBSERIALPORT
+	select BR2_PACKAGE_LIBZIP
+	select BR2_PACKAGE_LIBGLIB2
+	# libglib2
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	help
+	  Libsigrok is a shared library written in C, which provides
+	  the basic hardware access drivers for logic analyzers and
+	  other supported devices, as well as input/output file format
+	  support.
+
+	  This library is a part of the sigrok software suite.
+
+	  http://sigrok.org/wiki/Libsigrok
+
+comment "libsigrok needs a toolchain w/ wchar, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/libsigrok/libsigrok.mk new file +45 -0

45 lines not on this page · raw message

Signature · 1 line
2.1.4
#4 lore raw

PATCH v2 4/5 sigrok-cli: new package

In reply to Bartosz Golaszewski
---
 package/Config.in                |  1 +
 package/sigrok-cli/Config.in     | 17 +++++++++++++++++
 package/sigrok-cli/sigrok-cli.mk | 26 ++++++++++++++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100644 package/sigrok-cli/Config.in
 create mode 100644 package/sigrok-cli/sigrok-cli.mk
package/Config.in +1 -0
index 686f343..8742408 100644
@@ -364,6 +364,7 @@ endif
 	source "package/sdparm/Config.in"
 	source "package/setserial/Config.in"
 	source "package/sg3_utils/Config.in"
+	source "package/sigrok-cli/Config.in"
 	source "package/sispmctl/Config.in"
 	source "package/smartmontools/Config.in"
 	source "package/smstools3/Config.in"
package/sigrok-cli/Config.in new file +17 -0
new file mode 100644
index 0000000..e3e5420
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_SIGROK_CLI
+	bool "sigrok-cli"
+	select BR2_PACKAGE_LIBSERIALPORT
+	select BR2_PACKAGE_LIBSIGROK
+	# libsigrok->libglib2:
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	help
+	  Sigrok-cli is a command-line frontend for the sigrok
+	  software suite.
+
+	  http://sigrok.org/wiki/Sigrok-cli
+
+comment "sigrok-cli needs a toolchain w/ wchar, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/sigrok-cli/sigrok-cli.mk new file +26 -0
new file mode 100644
index 0000000..71b33a4
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sigrok-cli
+#
+################################################################################
+
+SIGROK_CLI_VERSION = 198487f611d8a7be4fa15017c22fa01a56551ca6
+# No https access on upstream git
+SIGROK_CLI_SITE = git://sigrok.org/sigrok-cli
+SIGROK_CLI_LICENSE = GPLv3+
+SIGROK_CLI_LICENSE_FILES = COPYING
+# Git checkout has no configure script
+SIGROK_CLI_AUTORECONF = YES
+SIGROK_CLI_DEPENDENCIES = libsigrok
+SIGROK_CLI_CONF_OPTS = --with-libsigrokdecode=NO
+
+define SIGROK_CLI_ADD_MISSING
+	cd $(@D); \
+	mkdir -p autostuff; \
+	automake --add-missing; \
+	cd -;
+endef
+
+SIGROK_CLI_PRE_CONFIGURE_HOOKS += SIGROK_CLI_ADD_MISSING
+
+$(eval $(autotools-package))
Signature · 1 line
2.1.4
#5 lore raw

PATCH v2 5/5 libsigrokdecode: new package

In reply to Bartosz Golaszewski
---
 package/Config.in                          |  1 +
 package/libsigrokdecode/Config.in          | 20 ++++++++++++++++++++
 package/libsigrokdecode/libsigrokdecode.mk | 26 ++++++++++++++++++++++++++
 package/sigrok-cli/sigrok-cli.mk           |  8 +++++++-
 4 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 package/libsigrokdecode/Config.in
 create mode 100644 package/libsigrokdecode/libsigrokdecode.mk
package/Config.in +1 -0
index 8742408..ae6a326 100644
@@ -735,6 +735,7 @@ menu "Hardware handling"
 	source "package/libserial/Config.in"
 	source "package/libserialport/Config.in"
 	source "package/libsigrok/Config.in"
+	source "package/libsigrokdecode/Config.in"
 	source "package/libsoc/Config.in"
 	source "package/libusb/Config.in"
 	source "package/libusb-compat/Config.in"
package/libsigrokdecode/Config.in new file +20 -0
new file mode 100644
index 0000000..d13d9be
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_LIBSIGROKDECODE
+	bool "libsigrokdecode"
+	select BR2_PACKAGE_PYTHON3
+	# python3
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	help
+	  Libsigrokdecode is a shared library written in C, which
+	  provides (streaming) protocol decoding functionality. Say
+	  yes here if you want to add this functionality to your
+	  buildroot-generated sigrok suite.
+
+	  This library is a part of the sigrok software suite.
+
+	  http://sigrok.org/wiki/Libsigrokdecode
+
+comment "libsigrok needs a toolchain w/ wchar, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/libsigrokdecode/libsigrokdecode.mk new file +26 -0
new file mode 100644
index 0000000..9d9fc11
@@ -0,0 +1,26 @@
+################################################################################
+#
+# libsigrokdecode
+#
+################################################################################
+
+LIBSIGROKDECODE_VERSION = 9177963de41c2d003d417049470eea3c98eeb2ef
+# No https access on upstream git
+LIBSIGROKDECODE_SITE = git://sigrok.org/libsigrokdecode
+LIBSIGROKDECODE_LICENSE = GPLv3+
+LIBSIGROKDECODE_LICENSE_FILES = COPYING
+# Git checkout has no configure script
+LIBSIGROKDECODE_AUTORECONF = YES
+LIBSIGROKDECODE_INSTALL_STAGING = YES
+LIBSIGROKDECODE_DEPENDENCIES = python3
+
+define LIBSIGROKDECODE_ADD_MISSING
+	cd $(@D); \
+	mkdir -p autostuff; \
+	automake --add-missing; \
+	cd -;
+endef
+
+LIBSIGROKDECODE_PRE_CONFIGURE_HOOKS += LIBSIGROKDECODE_ADD_MISSING
+
+$(eval $(autotools-package))
package/sigrok-cli/sigrok-cli.mk +7 -1
index 71b33a4..97d95b5 100644
@@ -12,7 +12,13 @@ SIGROK_CLI_LICENSE_FILES = COPYING
 # Git checkout has no configure script
 SIGROK_CLI_AUTORECONF = YES
 SIGROK_CLI_DEPENDENCIES = libsigrok
-SIGROK_CLI_CONF_OPTS = --with-libsigrokdecode=NO
+
+ifeq ($(BR2_PACKAGE_LIBSIGROKDECODE),y)
+SIGROK_CLI_CONF_OPTS += --with-libsigrokdecode
+SIGROK_CLI_DEPENDENCIES += libsigrokdecode
+else
+SIGROK_CLI_CONF_OPTS += --with-libsigrokdecode=NO
+endif
 
 define SIGROK_CLI_ADD_MISSING
 	cd $(@D); \
Signature · 1 line
2.1.4