sigrok fixes and pulseview package
v2 cover sigrok fixes and pulseview package
Thomas Petazzoni <[email protected]>:
Quoted 11 lines
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_CXX11And 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_SSPorBR2_TOOLCHAIN_HAS_THREADSare implemented for example.
Quoted 6 lines
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
Signature · 1 line
2.1.4
PATCH v2 1/2 libsigrok: enable building C++ bindings
--- package/libsigrok/Config.in | 12 ++++++++++++ package/libsigrok/libsigrok.mk | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-)
package/libsigrok/Config.in +12 -0
@@ -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
package/libsigrok/libsigrok.mk +8 -1
@@ -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))
Signature · 1 line
2.1.4
Thomas Petazzoni
AppliedPATCH v2 1/2 libsigrok: enable building C++ bindings
Dear Bartosz Golaszewski,
package/libsigrok/Config.in config BR2_PACKAGE_LIBSIGROK · line 23
Quoted 5 lines · Bartosz Golaszewski
package/libsigrok/Config.in +5
-0+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.
package/libsigrok/Config.in config BR2_PACKAGE_LIBSIGROK · line 32
Quoted 9 lines
package/libsigrok/Config.in +6
-0+ 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/2 pulseview: new package
In reply to Bartosz Golaszewski--- 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
package/Config.in +1 -0
@@ -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"
package/pulseview/Config.in new file +28 -0
@@ -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
package/pulseview/pulseview.mk new file +24 -0
@@ -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))
Signature · 1 line
2.1.4