All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/2] sigrok fixes and pulseview package
@ 2015-02-23 11:32 Bartosz Golaszewski
  2015-02-23 11:32 ` [Buildroot] [PATCH v2 1/2] libsigrok: enable building C++ bindings Bartosz Golaszewski
  2015-02-23 11:32 ` [Buildroot] [PATCH v2 2/2] pulseview: new package Bartosz Golaszewski
  0 siblings, 2 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2015-02-23 11:32 UTC (permalink / raw)
  To: buildroot

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> I am not really happy with this, because there are potentially plenty
> of external toolchains that support C++11. So I believe we really need
> to go ahead and add a:
> 
>         BR2_TOOLCHAIN_HAS_CXX11
> 
> And make sure it gets properly selected depending on whether the
> toolchain has C++11 support or not. You can look at how
> BR2_TOOLCHAIN_HAS_SSP or BR2_TOOLCHAIN_HAS_THREADS are implemented for
> example.
> 
> Moreover, you make this apparently depend on the selected C library.
> But isn't C++11 support purely a gcc problem ?
> 
> Thanks,
> 
> Thomas

Frankly I no longer know what the problem was. I'd swear libsigrok configure
was failing after not passing some C++11 support tests until I switched to
glibc, so I thought uClibc might not implement some features C++11 requires.
But today I ran a clean build against uClibc and it compiled fine - both
libsigrokcxx and pulseview.

So as much as you're right about BR2_TOOLCHAIN_HAS_CXX11 I would like to
propose merging these two patches in which I removed (E)GLIBC dependencies.

Both patches have been rebased against buildroot-next. Tested on a BeagleBone
Black with enlightenment window manager via vncviewer.

Best regards,
Bartosz Golaszewski

Bartosz Golaszewski (2):
  libsigrok: enable building C++ bindings
  pulseview: new package

 package/Config.in              |  1 +
 package/libsigrok/Config.in    | 12 ++++++++++++
 package/libsigrok/libsigrok.mk |  9 ++++++++-
 package/pulseview/Config.in    | 28 ++++++++++++++++++++++++++++
 package/pulseview/pulseview.mk | 24 ++++++++++++++++++++++++
 5 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 package/pulseview/Config.in
 create mode 100644 package/pulseview/pulseview.mk

-- 
2.1.4

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

* [Buildroot] [PATCH v2 1/2] libsigrok: enable building C++ bindings
  2015-02-23 11:32 [Buildroot] [PATCH v2 0/2] sigrok fixes and pulseview package Bartosz Golaszewski
@ 2015-02-23 11:32 ` Bartosz Golaszewski
  2015-02-23 17:18   ` Thomas Petazzoni
  2015-02-23 11:32 ` [Buildroot] [PATCH v2 2/2] pulseview: new package Bartosz Golaszewski
  1 sibling, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2015-02-23 11:32 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 package/libsigrok/Config.in    | 12 ++++++++++++
 package/libsigrok/libsigrok.mk |  9 ++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/package/libsigrok/Config.in b/package/libsigrok/Config.in
index 47f812c..468c8bc 100644
--- a/package/libsigrok/Config.in
+++ b/package/libsigrok/Config.in
@@ -16,6 +16,18 @@ config BR2_PACKAGE_LIBSIGROK
 
 	  http://sigrok.org/wiki/Libsigrok
 
+config BR2_PACKAGE_LIBSIGROKCXX
+	bool "build C++ bindings"
+	select BR2_PACKAGE_GLIBMM
+	depends on BR2_PACKAGE_LIBSIGROK
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
+	help
+	  Build libsigrok C++ bindings as well.
+
 comment "libsigrok needs a toolchain w/ wchar, threads"
 	depends on BR2_USE_MMU
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "libsigrokcxx needs a toolchain w/ C++"
+	depends on BR2_PACKAGE_LIBSIGROK
+	depends on !BR2_TOOLCHAIN_BUILDROOT_CXX
diff --git a/package/libsigrok/libsigrok.mk b/package/libsigrok/libsigrok.mk
index 6bc210e..1e6080d 100644
--- a/package/libsigrok/libsigrok.mk
+++ b/package/libsigrok/libsigrok.mk
@@ -13,7 +13,7 @@ LIBSIGROK_LICENSE_FILES = COPYING
 LIBSIGROK_AUTORECONF = YES
 LIBSIGROK_INSTALL_STAGING = YES
 LIBSIGROK_DEPENDENCIES = libglib2 libzip host-pkgconf
-LIBSIGROK_CONF_OPTS = --disable-bindings --disable-glibtest
+LIBSIGROK_CONF_OPTS = --disable-glibtest --disable-java --disable-python
 
 define LIBSIGROK_ADD_MISSING
 	mkdir -p $(@D)/autostuff
@@ -46,4 +46,11 @@ ifeq ($(BR2_PACKAGE_GLIBMM),y)
 LIBSIGROK_DEPENDENCIES += glibmm
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
+LIBSIGROK_CONF_OPTS += --enable-cxx
+LIBSIGROK_DEPENDENCIES += host-autoconf-archive glibmm
+else
+LIBSIGROK_CONF_OPTS += --disable-cxx
+endif
+
 $(eval $(autotools-package))
-- 
2.1.4

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

* [Buildroot] [PATCH v2 2/2] pulseview: new package
  2015-02-23 11:32 [Buildroot] [PATCH v2 0/2] sigrok fixes and pulseview package Bartosz Golaszewski
  2015-02-23 11:32 ` [Buildroot] [PATCH v2 1/2] libsigrok: enable building C++ bindings Bartosz Golaszewski
@ 2015-02-23 11:32 ` Bartosz Golaszewski
  1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2015-02-23 11:32 UTC (permalink / raw)
  To: buildroot

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

diff --git a/package/Config.in b/package/Config.in
index 09d49d9..7b118ec 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -362,6 +362,7 @@ endif
 	source "package/picocom/Config.in"
 	source "package/pifmrds/Config.in"
 	source "package/pps-tools/Config.in"
+	source "package/pulseview/Config.in"
 	source "package/read-edid/Config.in"
 	source "package/rng-tools/Config.in"
 	source "package/rpi-userland/Config.in"
diff --git a/package/pulseview/Config.in b/package/pulseview/Config.in
new file mode 100644
index 0000000..4428db7
--- /dev/null
+++ b/package/pulseview/Config.in
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_PULSEVIEW
+	bool "pulseview"
+	select BR2_PACKAGE_LIBSERIALPORT
+	select BR2_PACKAGE_LIBSIGROK
+	select BR2_PACKAGE_LIBSIGROKCXX
+	depends on BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_WIDGETS
+	select BR2_PACKAGE_QT5SVG
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_BOOST_THREAD
+	# libsigrok->libglib2:
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_BUILDROOT_CXX
+	help
+	  PulseView is a Qt based logic analyzer, oscilloscope
+	  and MSO GUI for sigrok.
+
+	  http://sigrok.org/wiki/PulseView
+
+comment "pulseview needs a toolchain w/ wchar, threads, C++"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_PACKAGE_QT5
+	depends on !BR2_TOOLCHAIN_BUILDROOT_CXX
diff --git a/package/pulseview/pulseview.mk b/package/pulseview/pulseview.mk
new file mode 100644
index 0000000..923459d
--- /dev/null
+++ b/package/pulseview/pulseview.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# pulseview
+#
+################################################################################
+
+# TODO Pulseview can be built and linked against Qt4 as well.
+
+# No https access on upstream git
+PULSEVIEW_SITE = git://sigrok.org/pulseview
+PULSEVIEW_VERSION = 19be0af16af83ca10f7ce69cb64f0b0c6f6a0d81
+PULSEVIEW_LICENSE = GPLv3+
+PULSEVIEW_LICENSE_FILES = COPYING
+PULSEVIEW_DEPENDENCIES = libsigrok qt5base qt5svg boost
+PULSEVIEW_CONF_OPTS = -DDISABLE_WERROR=y
+
+ifeq ($(BR2_PACKAGE_LIBSIGROKDECODE),y)
+PULSEVIEW_CONF_OPTS += -DENABLE_DECODE=TRUE
+PULSEVIEW_DEPENDENCIES += libsigrokdecode
+else
+PULSEVIEW_CONF_OPTS += -DENABLE_DECODE=FALSE
+endif
+
+$(eval $(cmake-package))
-- 
2.1.4

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

* [Buildroot] [PATCH v2 1/2] libsigrok: enable building C++ bindings
  2015-02-23 11:32 ` [Buildroot] [PATCH v2 1/2] libsigrok: enable building C++ bindings Bartosz Golaszewski
@ 2015-02-23 17:18   ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-02-23 17:18 UTC (permalink / raw)
  To: buildroot

Dear Bartosz Golaszewski,

On Mon, 23 Feb 2015 12:32:48 +0100, Bartosz Golaszewski wrote:

> +config BR2_PACKAGE_LIBSIGROKCXX
> +	bool "build C++ bindings"
> +	select BR2_PACKAGE_GLIBMM
> +	depends on BR2_PACKAGE_LIBSIGROK
> +	depends on BR2_TOOLCHAIN_BUILDROOT_CXX

This should have been BR2_INSTALL_LIBSTDCPP, otherwise your code only
works for internal toolchains, not external toolchains.

> +	help
> +	  Build libsigrok C++ bindings as well.
> +
>  comment "libsigrok needs a toolchain w/ wchar, threads"
>  	depends on BR2_USE_MMU
>  	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
> +
> +comment "libsigrokcxx needs a toolchain w/ C++"
> +	depends on BR2_PACKAGE_LIBSIGROK

Instead of repeating this dependency here and in the definition of the
BR2_PACKAGE_LIBSIGROKCXX, I've simply placed both under a 'if
BR2_PACKAGE_LIBSIGROKCXX ... endif' condition.

Applied to next with those changes.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2015-02-23 17:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 11:32 [Buildroot] [PATCH v2 0/2] sigrok fixes and pulseview package Bartosz Golaszewski
2015-02-23 11:32 ` [Buildroot] [PATCH v2 1/2] libsigrok: enable building C++ bindings Bartosz Golaszewski
2015-02-23 17:18   ` Thomas Petazzoni
2015-02-23 11:32 ` [Buildroot] [PATCH v2 2/2] pulseview: new package 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.