Skip to contentSkip to conversation

add QWT library: Qt Widgets for Technical Applications

PATCH New Ivan Kuten 3 participants 7 messages Aug 4, 2011 – Aug 10, 2011

lore
Share & tools
lore

Ivan Kuten

author
#0 lore raw

PATCH 1/1 add QWT library: Qt Widgets for Technical Applications

Hi, please consider adding QWT package to Buildroot.

---
 package/Config.in                                |    1 +
 package/qwt/Config.in                            |   10 ++++
 package/qwt/qwt-6.0.0-disable-svg-designer.patch |   40 ++++++++++++++
 package/qwt/qwt.mk                               |   60 ++++++++++++++++++++++
 4 files changed, 111 insertions(+), 0 deletions(-)
 create mode 100644 package/qwt/Config.in
 create mode 100644 package/qwt/qwt-6.0.0-disable-svg-designer.patch
 create mode 100644 package/qwt/qwt.mk
package/Config.in +1 -0
index 7112e05..6f9a671 100644
@@ -117,6 +117,7 @@ source "package/sdl_gfx/Config.in"
 
 comment "other GUIs"
 source "package/qt/Config.in"
+source "package/qwt/Config.in"
 source "package/x11r7/Config.in"
 
 comment "X libraries and helper libraries"
package/qwt/Config.in new file +10 -0
new file mode 100644
index 0000000..5c53152
@@ -0,0 +1,10 @@
+comment "Qwt requires Qt to be installed"
+	depends on !BR2_PACKAGE_QT
+
+menuconfig BR2_PACKAGE_QWT
+	bool "Qwt"
+	depends on BR2_PACKAGE_QT
+	help
+	  Qt Widgets for Technical Applications
+
+	  http://qwt.sourceforge.net/
package/qwt/qwt-6.0.0-disable-svg-designer.patch new file +40 -0
new file mode 100644
index 0000000..54515e0
@@ -0,0 +1,40 @@
+diff -urN qwt-6.0.0/qwtconfig.pri qwt-6.0.0_new/qwtconfig.pri
+--- qwt-6.0.0/qwtconfig.pri	2011-04-15 13:51:11.000000000 +0300
++++ qwt-6.0.0_new/qwtconfig.pri	2011-07-26 16:33:44.063285248 +0300
+@@ -79,7 +79,7 @@
+ # export a plot to a SVG document
+ ######################################################################
+ 
+-QWT_CONFIG     += QwtSvg
++QWT_CONFIG     -= QwtSvg
+ 
+ ######################################################################
+ # You can use the MathML renderer of the Qt solutions package to 
+@@ -98,7 +98,7 @@
+ # Otherwise you have to build it from the designer directory.
+ ######################################################################
+ 
+-QWT_CONFIG     += QwtDesigner
++QWT_CONFIG     -= QwtDesigner
+ 
+ ######################################################################
+ # If you want to auto build the examples, enable the line below
+diff -urN qwt-6.0.0/src/src.pro qwt-6.0.0_new/src/src.pro
+--- qwt-6.0.0/src/src.pro	2011-04-15 13:51:11.000000000 +0300
++++ qwt-6.0.0_new/src/src.pro	2011-07-26 16:33:44.019285248 +0300
+@@ -214,13 +214,13 @@
+ 
+ # Install directives
+ 
+-target.path    = $${QWT_INSTALL_LIBS}
++target.path    = /usr/lib/
+ 
+ doc.files      = $${QWT_ROOT}/doc/html 
+ unix:doc.files += $${QWT_ROOT}/doc/man
+ doc.path       = $${QWT_INSTALL_DOCS}
+ 
+-INSTALLS       = target doc
++INSTALLS       = target
+ 
+ CONFIG(lib_bundle) {
+ 
package/qwt/qwt.mk new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/1 add QWT library: Qt Widgets for Technical Applications

Hello Ivan,

Thanks for this patch!

Le Fri, 5 Aug 2011 00:02:41 +0300,
Ivan Kuten <[email protected]> a ?crit :

Quoted 1 line

Hi, please consider adding QWT package to Buildroot.

This place is for the commit log, not for the contents of an e-mail. It will persist for the eternity.

package/Config.in source "package/sdl_gfx/Config.in" · line 121

Quoted 10 lines
package/Config.in +1 -0
index 7112e05..6f9a671 100644
@@ -117,6 +117,7 @@ source "package/sdl_gfx/Config.in"
 
 comment "other GUIs"
 source "package/qt/Config.in"
+source "package/qwt/Config.in"
 source "package/x11r7/Config.in"

I guess the package should rather be in Libraries -> Graphics

package/qwt/Config.in line 5

Quoted 12 lines
package/Config.in +0 -0
 comment "X libraries and helper libraries"
package/qwt/Config.in new file +5 -0
new file mode 100644
index 0000000..5c53152
@@ -0,0 +1,10 @@
+comment "Qwt requires Qt to be installed"
+	depends on !BR2_PACKAGE_QT
+
+menuconfig BR2_PACKAGE_QWT
+	bool "Qwt"

lowercase: qwt.

package/qwt/Config.in line 8

Quoted 3 lines
package/qwt/Config.in new file +3 -0
+	depends on BR2_PACKAGE_QT
+	help
+	  Qt Widgets for Technical Applications

I am not sure whether we should use a "depends on" or a "select" dependency here. Normally, for dependencies on libraries, we use a "select" dependency, but it's true that Qt is such a major choice in the system that we may not want to have Qt automatically selected in the back of the user.

package/qwt/qwt-6.0.0-disable-svg-designer.patch

Quoted 6 lines
package/qwt/Config.in new file +1 -0
+	  http://qwt.sourceforge.net/
package/qwt/qwt-6.0.0-disable-svg-designer.patch new file +0 -0
new file mode 100644
index 0000000..54515e0

All patches need to have a proper description + Signed-off-by line.

package/qwt/qwt.mk

Quoted 46 lines
package/qwt/qwt-6.0.0-disable-svg-designer.patch new file +40 -0
@@ -0,0 +1,40 @@
+diff -urN qwt-6.0.0/qwtconfig.pri qwt-6.0.0_new/qwtconfig.pri
+--- qwt-6.0.0/qwtconfig.pri	2011-04-15 13:51:11.000000000 +0300
++++ qwt-6.0.0_new/qwtconfig.pri	2011-07-26 16:33:44.063285248 +0300
+@@ -79,7 +79,7 @@
+ # export a plot to a SVG document
+ ######################################################################
+ 
+-QWT_CONFIG     += QwtSvg
++QWT_CONFIG     -= QwtSvg
+ 
+ ######################################################################
+ # You can use the MathML renderer of the Qt solutions package to 
+@@ -98,7 +98,7 @@
+ # Otherwise you have to build it from the designer directory.
+ ######################################################################
+ 
+-QWT_CONFIG     += QwtDesigner
++QWT_CONFIG     -= QwtDesigner
+ 
+ ######################################################################
+ # If you want to auto build the examples, enable the line below
+diff -urN qwt-6.0.0/src/src.pro qwt-6.0.0_new/src/src.pro
+--- qwt-6.0.0/src/src.pro	2011-04-15 13:51:11.000000000 +0300
++++ qwt-6.0.0_new/src/src.pro	2011-07-26 16:33:44.019285248 +0300
+@@ -214,13 +214,13 @@
+ 
+ # Install directives
+ 
+-target.path    = $${QWT_INSTALL_LIBS}
++target.path    = /usr/lib/
+ 
+ doc.files      = $${QWT_ROOT}/doc/html 
+ unix:doc.files += $${QWT_ROOT}/doc/man
+ doc.path       = $${QWT_INSTALL_DOCS}
+ 
+-INSTALLS       = target doc
++INSTALLS       = target
+ 
+ CONFIG(lib_bundle) {
+ 
package/qwt/qwt.mk new file +0 -0
new file mode 100644
index 0000000..2ac038d

This package makefile doesn't use the proper infrastructure, so it is unsuitable for merging in the current version of Buildroot. Could you rework it to use the GENTARGETS infrastructure, as documented at
http://buildroot.org/downloads/buildroot.html#generic-tutorial ?

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
author
#2 lore raw

PATCH 1/1 add QWT library: Qt Widgets for Technical Applications

Quoted 11 lines · Thomas Petazzoni

Hello Ivan,

Thanks for this patch!
This package makefile doesn't use the proper infrastructure, so it is unsuitable for merging in the current version of Buildroot. Could you rework it to use the GENTARGETS infrastructure, as documented at
http://buildroot.org/downloads/buildroot.html#generic-tutorial ?

Thanks!

Thomas

Hi Thomas,

OK, I come up soon with updated patch which uses GENTARGETS.

Regards,
Ivan

Signature · 9 lines
Head of R&D
Promwad Innovation Company
22, Olshevskogo St.,
220073, Minsk,
BELARUS
Phone/Fax: +375 (17) 312-12-46 ext. 601
E-mail: ivan.kuten at promwad.com
Skype: vanokuten
Web: www.promwad.com
author
#3 lore raw

PATCH v2 1/1 add QWT library: Qt Widgets for Technical Applications

---
:100644 100644 7112e05... e442e09... M package/Config.in
:000000 100644 0000000... c927a7b... A package/qwt/Config.in
:000000 100644 0000000... 2f25cc4... A package/qwt/qwt.mk

 package/Config.in     |    1 +
 package/qwt/Config.in |   10 ++++++++++
 package/qwt/qwt.mk    |   44 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 0 deletions(-)
package/Config.in +1 -0
index 7112e05..e442e09 100644
@@ -293,6 +293,7 @@ source "package/libsvgtiny/Config.in"
 source "package/libungif/Config.in"
 source "package/pango/Config.in"
 source "package/pixman/Config.in"
+source "package/qwt/Config.in"
 source "package/tiff/Config.in"
 source "package/webkit/Config.in"
 endmenu
package/qwt/Config.in new file +10 -0
new file mode 100644
index 0000000..c927a7b
@@ -0,0 +1,10 @@
+comment "Qwt requires Qt to be installed"
+	depends on !BR2_PACKAGE_QT
+
+menuconfig BR2_PACKAGE_QWT
+	bool "qwt"
+	depends on BR2_PACKAGE_QT
+	help
+	  Qt Widgets for Technical Applications
+
+	  http://qwt.sourceforge.net/
package/qwt/qwt.mk new file +44 -0

44 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#4 lore raw

PATCH v2 1/1 add QWT library: Qt Widgets for Technical Applications

Hello Ivan,

Looks a lot better. A few comments remain though (sorry if I didn't catch them at the first review).

Le Sat, 6 Aug 2011 03:46:17 +0300,
Ivan Kuten <[email protected]> a ?crit :

Quoted 1 line

+menuconfig BR2_PACKAGE_QWT

This should be:

config BR2_PACKAGE_QWT

menuconfig is here to define a submenu, which is not the case for qwt.

package/qwt/qwt.mk line 30

Quoted 7 lines
package/qwt/qwt.mk new file +7 -0
+define QWT_INSTALL_STAGING_CMDS
+     (export INSTALL_ROOT=$(STAGING_DIR); $(MAKE) -C $(@D) install)
+endef
+
+define QWT_INSTALL_TARGET_CMDS
+     cp -dpf $(STAGING_DIR)/usr/local/qwt-$(QWT_VERSION)/lib/libqwt.so* $(TARGET_DIR)/usr/lib
+endef

This installation path of the library ($(STAGING_DIR)/usr/local/qwt-xxxx/lib/) is not a standard path, and will make a lot of things fail in Buildroot. Can you arrange to install the library in $(STAGING_DIR)/usr/lib and the headers files in $(STAGING_DIR)/usr/include (i.e, define a prefix of $(STAGING_DIR)/usr).

Otherwise, looks good.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH v2 1/1 add QWT library: Qt Widgets for Technical Applications

In reply to Ivan Kuten
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ivan" == Ivan Kuten <[email protected]> writes:

Hi,

Ivan> Signed-off-by: Ivan Kuten <[email protected]> Ivan> ---
Ivan> :100644 100644 7112e05... e442e09... M package/Config.in
Ivan> :000000 100644 0000000... c927a7b... A package/qwt/Config.in
Ivan> :000000 100644 0000000... 2f25cc4... A package/qwt/qwt.mk

 Ivan>  package/Config.in     |    1 +
 Ivan>  package/qwt/Config.in |   10 ++++++++++
 Ivan>  package/qwt/qwt.mk    |   44 ++++++++++++++++++++++++++++++++++++++++++++

Ivan> 3 files changed, 55 insertions(+), 0 deletions(-)

Ivan> diff --git a/package/Config.in b/package/Config.in Ivan> index 7112e05..e442e09 100644
Ivan> --- a/package/Config.in
Ivan> +++ b/package/Config.in
Ivan> @@ -293,6 +293,7 @@ source "package/libsvgtiny/Config.in"

 Ivan>  source "package/libungif/Config.in"
 Ivan>  source "package/pango/Config.in"
 Ivan>  source "package/pixman/Config.in"

Ivan> +source "package/qwt/Config.in"

Sorry, I didn't got to reply on Thomas' mail before you reposted, but I prefer to keep this together with qt as it is very qt dependent (just like we do for all the xorg stuff).

 Ivan>  source "package/tiff/Config.in"
 Ivan>  source "package/webkit/Config.in"
 Ivan>  endmenu

Ivan> diff --git a/package/qwt/Config.in b/package/qwt/Config.in Ivan> new file mode 100644
Ivan> index 0000000..c927a7b
Ivan> --- /dev/null
Ivan> +++ b/package/qwt/Config.in
Ivan> @@ -0,0 +1,10 @@
Ivan> +comment "Qwt requires Qt to be installed"
Ivan> + depends on !BR2_PACKAGE_QT
Ivan> +

If you put it right after qt you can drop this.

Ivan> +menuconfig BR2_PACKAGE_QWT

should be config.

Ivan> + bool "qwt"
Ivan> + depends on BR2_PACKAGE_QT
Ivan> + help
Ivan> + Qt Widgets for Technical Applications
Ivan> +
Ivan> + http://qwt.sourceforge.net/

I don't know anything about qwt, but a colleague of mine did a qwt package some time ago, which I haven't had time to cleanup and commit yet, but he had options plot, widgets, svgitem and mathml. Some of these require specific qt options to be enabled (like QT_SVG).

Ivan> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
Ivan> new file mode 100644
Ivan> index 0000000..2f25cc4
Ivan> --- /dev/null
Ivan> +++ b/package/qwt/qwt.mk
Ivan> @@ -0,0 +1,44 @@
Ivan> +############################################################# Ivan> +#
Ivan> +# QWT
Ivan> +#
Ivan> +############################################################# Ivan> +QWT_VERSION = 6.0.0
Ivan> +QWT_SOURCE = qwt-$(QWT_VERSION).tar.bz2
Ivan> +QWT_SITE = https://sourceforge.net/projects/qwt/files/qwt/$(QWT_VERSION)/
Ivan> +QWT_INSTALL_STAGING = YES
Ivan> +QWT_DEPENDENCIES = qt
Ivan> +QWT_CONFIG_FILE = qwt.pro

It seems you only use this variable once, so just drop it.

Ivan> +
Ivan> +define QWT_CONFIGURE_CMDS

 Ivan> +     $(QT_QMAKE) $(@D)/$(QWT_CONFIG_FILE)
 Ivan> +     $(SED) 's/+= QwtSvg/-= QwtSvg/' $(@D)/qwtconfig.pri
 Ivan> +     $(SED) 's/+= QwtDesigner/-= QwtDesigner/' $(@D)/qwtconfig.pri
 Ivan> +     $(SED) 's/+= QwtMathML/-= QwtMathML/' $(@D)/qwtconfig.pri

Ivan> +endef

The other patch would also use the debug/shared library options of Qt to build with/without debug / shared library.

FYI, here's his patch:

package/qwt/Config.in +65 -0
diff -urpN buildroot/package/qwt/Config.in buildroot-work/package/qwt/Config.in
@@ -0,0 +1,65 @@
+menuconfig BR2_PACKAGE_QWT
+	bool "Qwt"
+	depends on BR2_PACKAGE_QT
+	help
+	  Qt widgets for technical applications
+
+	  http://qwt.sourceforge.net/
+
+if BR2_PACKAGE_QWT
+
+config BR2_PACKAGE_QWT_DEBUG
+	bool "Compile with debug support"
+	help
+	  If unsure, say N.
+
+choice
+	prompt "Library type"
+	default BR2_PACKAGE_QWT_STATIC if BR2_PACKAGE_QT_STATIC
+	default BR2_PACKAGE_QWT_SHARED if BR2_PACKAGE_QT_SHARED
+	help
+	  Selects the library type: Shared or Static
+
+config BR2_PACKAGE_QWT_SHARED
+	bool "Shared library"
+	help
+	  Create and use shared Qwt libraries.
+	  If you have multiple programs that depend on Qwt or intend to use
+	  plugins, say Y.
+
+config BR2_PACKAGE_QWT_STATIC
+	bool "Static Library"
+	help
+	  Create and use static Qwt libraries.
+	  If you don't have multiple programs on the target that depends on
+	  Qt, then this will save you quite some of storage space.
+	  If unsure, say Y.
+
+endchoice
+
+config BR2_PACKAGE_QWT_PLOT
+	bool "Plots"
+	help
+	  Includes all kinds of graph and plotting widgets.
+
+config BR2_PACKAGE_QWT_WIDGETS
+	bool "Widgets"
+	help
+	  Includes all kinds of add-on widgets such as dials, compasses,
+	  knobs, wheels, sliders, thermos, ...
+
+config BR2_PACKAGE_QWT_SVGITEM
+	bool "SVG Item"
+	select BR2_PACKAGE_QWT_PLOT
+	select BR2_PACKAGE_QT_XML
+	select BR2_PACKAGE_QT_SVG
+	help
+	  Add support to display svg images on the plot canvas.
+
+config BR2_PACKAGE_QWT_MATHML
+	bool "Math ML support"
+	select BR2_PACKAGE_QWT_PLOT
+	help
+	  Add support for MathML in Qwt.
+
+endif # BR2_PACKAGE_QWT
package/qwt/qwt.mk +105 -0

105 lines not on this page · raw message

Signature · 1 line
Bye, Peter Korsgaard
author
#6 lore raw

PATCH v2 1/1 add QWT library: Qt Widgets for Technical Applications

package/qwt/Config.in

Quoted 9 lines · Peter Korsgaard

The other patch would also use the debug/shared library options of Qt to build with/without debug / shared library.

FYI, here's his patch:

diff -urpN buildroot/package/qwt/Config.in buildroot-work/package/qwt/Config.in

package/qwt/Config.in +0 -0

Peter,

Ok, I'll try to provide combined version of the patch including various QWT options.

Best regards,
Ivan

Signature · 9 lines
Head of R&D
Promwad Innovation Company
22, Olshevskogo St.,
220073, Minsk,
BELARUS
Phone/Fax: +375 (17) 312-12-46 ext. 601
E-mail: ivan.kuten at promwad.com
Skype: vanokuten
Web: www.promwad.com