Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] add QWT library: Qt Widgets for Technical Applications
@ 2011-08-04 21:02 Ivan Kuten
  2011-08-04 21:51 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Kuten @ 2011-08-04 21:02 UTC (permalink / raw)
  To: buildroot

Hi, please consider adding QWT package to Buildroot.

Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
---
 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

diff --git a/package/Config.in b/package/Config.in
index 7112e05..6f9a671 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/qwt/Config.in b/package/qwt/Config.in
new file mode 100644
index 0000000..5c53152
--- /dev/null
+++ b/package/qwt/Config.in
@@ -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/
diff --git a/package/qwt/qwt-6.0.0-disable-svg-designer.patch b/package/qwt/qwt-6.0.0-disable-svg-designer.patch
new file mode 100644
index 0000000..54515e0
--- /dev/null
+++ b/package/qwt/qwt-6.0.0-disable-svg-designer.patch
@@ -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) {
+ 
diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
new file mode 100644
index 0000000..2ac038d
--- /dev/null
+++ b/package/qwt/qwt.mk
@@ -0,0 +1,60 @@
+######################################################################
+#
+# QWT
+#
+######################################################################
+
+QWT_VERSION:=6.0.0
+QWT_SOURCE:=qwt-$(QWT_VERSION).zip
+QWT_SITE:=https://sourceforge.net/projects/qwt/files/qwt/$(QWT_VERSION)
+QWT_UNZIP:=unzip
+QWT_TARGET_DIR:=$(BUILD_DIR)/qwt-$(QWT_VERSION)
+QWT_CONFIG_FILE:=qwt.pro
+QMAKE_DIR:=$(HOST_DIR)/usr
+
+$(DL_DIR)/$(QWT_SOURCE):
+	$(call DOWNLOAD,$(QWT_SITE),$(QWT_SOURCE))
+
+qwt-source: $(DL_DIR)/$(QWT_SOURCE)
+
+$(QWT_TARGET_DIR)/.unpacked: $(DL_DIR)/$(QWT_SOURCE)
+	$(QWT_UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(QWT_SOURCE)
+	toolchain/patch-kernel.sh $(QWT_TARGET_DIR) package/qwt/ \
+		qwt-$(QWT_VERSION)-\*.patch \
+		qwt-$(QWT_VERSION)-\*.patch.$(ARCH)
+	touch $@
+
+$(QWT_TARGET_DIR)/.configured: $(QWT_TARGET_DIR)/.unpacked
+	-[ -f $(QWT_TARGET_DIR)/Makefile ] && $(MAKE) -C $(QWT_TARGET_DIR) distclean
+	$(QMAKE_DIR)/bin/qmake $(QWT_TARGET_DIR)/$(QWT_CONFIG_FILE)
+	touch $@
+
+$(QWT_TARGET_DIR)/.compiled: $(QWT_TARGET_DIR)/.configured
+	$(MAKE) -C $(QWT_TARGET_DIR)
+	touch $@
+
+$(STAGING_DIR)/usr/lib/libqwt.so: $(QWT_TARGET_DIR)/.compiled
+	(export INSTALL_ROOT=$(STAGING_DIR); $(MAKE) -C $(QWT_TARGET_DIR) install)
+
+$(TARGET_DIR)/usr/lib/libqwt.so: $(STAGING_DIR)/usr/lib/libqwt.so
+	cp -dpf $(STAGING_DIR)/usr/lib/libqwt.so* $(TARGET_DIR)/usr/lib/
+	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libqwt.so*
+
+qwt: qt $(TARGET_DIR)/usr/lib/libqwt.so
+
+qwt-clean:
+	-$(MAKE) -C $(QWT_TARGET_DIR) clean
+	-rm $(TARGET_DIR)/usr/lib/libqwt.so.*
+	-rm $(STAGING_DIR)/usr/lib/libqwt.so.*
+
+qwt-dirclean:
+	rm -rf $(QWT_TARGET_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_PACKAGE_QWT),y)
+TARGETS+=qwt
+endif
-- 
1.7.2.5

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

* [Buildroot] [PATCH] add QWT library: Qt Widgets for Technical Applications
  2011-08-04 21:02 [Buildroot] [PATCH] add QWT library: Qt Widgets for Technical Applications Ivan Kuten
@ 2011-08-04 21:51 ` Thomas Petazzoni
  2011-08-05 17:28   ` Ivan Kuten
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2011-08-04 21:51 UTC (permalink / raw)
  To: buildroot

Hello Ivan,

Thanks for this patch!

Le Fri, 5 Aug 2011 00:02:41 +0300,
Ivan Kuten <ivan.kuten@promwad.com> a ?crit :

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

> diff --git a/package/Config.in b/package/Config.in
> index 7112e05..6f9a671 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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

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

lowercase: qwt.

> +	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.

> +	  http://qwt.sourceforge.net/
> diff --git a/package/qwt/qwt-6.0.0-disable-svg-designer.patch b/package/qwt/qwt-6.0.0-disable-svg-designer.patch
> new file mode 100644
> index 0000000..54515e0
> --- /dev/null
> +++ b/package/qwt/qwt-6.0.0-disable-svg-designer.patch

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

> @@ -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) {
> + 
> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
> new file mode 100644
> index 0000000..2ac038d
> --- /dev/null
> +++ b/package/qwt/qwt.mk

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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] add QWT library: Qt Widgets for Technical Applications
  2011-08-04 21:51 ` Thomas Petazzoni
@ 2011-08-05 17:28   ` Ivan Kuten
  2011-08-06  0:46     ` [Buildroot] [PATCH v2] " Ivan Kuten
  0 siblings, 1 reply; 7+ messages in thread
From: Ivan Kuten @ 2011-08-05 17:28 UTC (permalink / raw)
  To: buildroot

On 08/05/2011 12:51 AM, Thomas Petazzoni wrote:
> 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

-- 
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

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

* [Buildroot] [PATCH v2] add QWT library: Qt Widgets for Technical Applications
  2011-08-05 17:28   ` Ivan Kuten
@ 2011-08-06  0:46     ` Ivan Kuten
  2011-08-06  6:58       ` Thomas Petazzoni
  2011-08-07  7:36       ` Peter Korsgaard
  0 siblings, 2 replies; 7+ messages in thread
From: Ivan Kuten @ 2011-08-06  0:46 UTC (permalink / raw)
  To: buildroot


Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
---
: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(-)

diff --git a/package/Config.in b/package/Config.in
index 7112e05..e442e09 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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
diff --git a/package/qwt/Config.in b/package/qwt/Config.in
new file mode 100644
index 0000000..c927a7b
--- /dev/null
+++ b/package/qwt/Config.in
@@ -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/
diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
new file mode 100644
index 0000000..2f25cc4
--- /dev/null
+++ b/package/qwt/qwt.mk
@@ -0,0 +1,44 @@
+#############################################################
+#
+# QWT
+#
+#############################################################
+QWT_VERSION = 6.0.0
+QWT_SOURCE = qwt-$(QWT_VERSION).tar.bz2
+QWT_SITE = https://sourceforge.net/projects/qwt/files/qwt/$(QWT_VERSION)/
+QWT_INSTALL_STAGING = YES
+QWT_DEPENDENCIES = qt
+QWT_CONFIG_FILE = qwt.pro
+
+define QWT_CONFIGURE_CMDS
+     $(QT_QMAKE) $(@D)/$(QWT_CONFIG_FILE)
+     $(SED) 's/+= QwtSvg/-= QwtSvg/' $(@D)/qwtconfig.pri
+     $(SED) 's/+= QwtDesigner/-= QwtDesigner/' $(@D)/qwtconfig.pri
+     $(SED) 's/+= QwtMathML/-= QwtMathML/' $(@D)/qwtconfig.pri
+endef
+
+define QWT_BUILD_CMDS
+      $(MAKE) -C $(@D) all
+endef
+
+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
+
+define QT_CLEAN_CMDS
+      $(MAKE) -C $(@D) clean
+endef
+
+define QT_UNINSTALL_TARGET_CMDS
+     rm $(TARGET_DIR)/usr/lib/libqwt.so.*
+endef
+
+define QT_UNINSTALL_STAGING_CMDS
+     (export INSTALL_ROOT=$(STAGING_DIR); $(MAKE) -C $(@D) uninstall)
+endef
+
+$(eval $(call GENTARGETS,package,qwt))
-- 
1.7.2.5

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

* [Buildroot] [PATCH v2] add QWT library: Qt Widgets for Technical Applications
  2011-08-06  0:46     ` [Buildroot] [PATCH v2] " Ivan Kuten
@ 2011-08-06  6:58       ` Thomas Petazzoni
  2011-08-07  7:36       ` Peter Korsgaard
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2011-08-06  6:58 UTC (permalink / raw)
  To: buildroot

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 <ivan.kuten@promwad.com> a ?crit :

> +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.

> +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
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH v2] add QWT library: Qt Widgets for Technical Applications
  2011-08-06  0:46     ` [Buildroot] [PATCH v2] " Ivan Kuten
  2011-08-06  6:58       ` Thomas Petazzoni
@ 2011-08-07  7:36       ` Peter Korsgaard
  2011-08-10 13:04         ` Ivan Kuten
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2011-08-07  7:36 UTC (permalink / raw)
  To: buildroot

>>>>> "Ivan" == Ivan Kuten <ivan.kuten@promwad.com> writes:

Hi,

 Ivan> Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
 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:

diff -urpN buildroot/package/qwt/Config.in buildroot-work/package/qwt/Config.in
--- buildroot/package/qwt/Config.in	1970-01-01 01:00:00.000000000 +0100
+++ buildroot-work/package/qwt/Config.in	2010-08-23 16:34:18.000000000 +0200
@@ -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
diff -urpN buildroot/package/qwt/qwt.mk buildroot-work/package/qwt/qwt.mk
--- buildroot/package/qwt/qwt.mk	1970-01-01 01:00:00.000000000 +0100
+++ buildroot-work/package/qwt/qwt.mk	2010-08-23 12:01:23.000000000 +0200
@@ -0,0 +1,105 @@
+######################################################################
+#
+# Qwt - Qt Widgets for Technical Application
+# http://qwt.sourceforge.net/
+######################################################################
+
+QWT_VERSION:=5.2.1
+QWT_SOURCE:=qwt-$(QWT_VERSION).tar.bz2
+QWT_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/qwt/qwt/$(QWT_VERSION)/
+QWT_CAT:=$(BZCAT)
+QWT_TARGET_DIR:=$(BUILD_DIR)/qwt-$(QWT_VERSION)/src
+
+QWT_CONFIGURE:=#empty
+
+
+# Configuration options
+ifeq ($(BR2_PACKAGE_QWT_DEBUG),y)
+QWT_CONFIGURE+= CONFIG+=debug
+endif
+
+ifeq ($(BR2_PACKAGE_QWT_SHARED),y)
+QWT_CONFIGURE+= CONFIG+=QwtDll
+endif
+
+ifeq ($(BR2_PACKAGE_QWT_PLOT),y)
+QWT_CONFIGURE += CONFIG+=QwtPlot
+endif
+
+ifeq ($(BR2_PACKAGE_QWT_WIDGETS),y)
+QWT_CONFIGURE += CONFIG+=QwtWidgets
+endif
+
+ifeq ($(BR2_PACKAGE_QWT_SVGITEM),y)
+QWT_CONFIGURE += CONFIG+=QwtSVGItem
+endif
+
+ifeq ($(BR2_PACKAGE_QWT_MATHML),y)
+QWT_CONFIGURE += CONFIG+=QwtMathML
+endif
+
+
+QWT_PROJECT_FILE:=$(QWT_TARGET_DIR)/src.pro
+QWT_QMAKE_SPEC:=$(QT_TARGET_DIR)/mkspecs/qws/linux-$(BR2_PACKAGE_QT_EMB_PLATFORM)-g++
+
+# Variable for other Qt applications to use
+QWT_QMAKE:=$(STAGING_DIR)/usr/bin/qmake
+
+
+$(DL_DIR)/$(QWT_SOURCE):
+	$(call DOWNLOAD,$(QWT_SITE),$(QWT_SOURCE))
+
+qwt-source: $(DL_DIR)/$(QWT_SOURCE)
+
+$(QWT_TARGET_DIR)/.unpacked: $(DL_DIR)/$(QWT_SOURCE)
+	$(QWT_CAT) $(DL_DIR)/$(QWT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+	touch $@
+
+$(QWT_TARGET_DIR)/.configured: $(QWT_TARGET_DIR)/.unpacked
+	$(QWT_QMAKE) $(QWT_PROJECT_FILE) -spec $(QWT_QMAKE_SPEC) -r $(QWT_CONFIGURE) -o $(QWT_TARGET_DIR)/Makefile
+	touch $@
+
+$(QWT_TARGET_DIR)/.compiled: $(QWT_TARGET_DIR)/.configured
+	$(MAKE) -C $(QWT_TARGET_DIR)
+	touch $@
+
+$(QWT_TARGET_DIR)/.installed: $(QWT_TARGET_DIR)/.compiled
+	mkdir -p $(STAGING_DIR)/usr/include/qwt
+	cp -dpf $(QWT_TARGET_DIR)/*.h $(STAGING_DIR)/usr/include/qwt
+	touch $@
+
+$(STAGING_DIR)/usr/lib/libqwt.a: $(QWT_TARGET_DIR)/.installed
+	cp -dpf $(QWT_TARGET_DIR)/../lib/libqwt.a $(STAGING_DIR)/usr/lib
+
+$(TARGET_DIR)/usr/lib/libqwt.so: $(QWT_TARGET_DIR)/.installed
+	cp -dpf $(QWT_TARGET_DIR)/../lib/libqwt.so* $(STAGING_DIR)/usr/lib/
+	cp -dpf $(QWT_TARGET_DIR)/../lib/libqwt.so* $(TARGET_DIR)/usr/lib/
+	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libqwt.so.*
+
+
+ifeq ($(BR2_PACKAGE_QWT_SHARED),y)
+qwt: $(TARGET_DIR)/usr/lib/libqwt.so
+else
+qwt: $(STAGING_DIR)/usr/lib/libqwt.a
+endif
+
+
+qwt-clean:
+	-$(MAKE) -C $(QWT_TARGET_DIR) clean
+	-rm -rf $(STAGING_DIR)/usr/include/qwt
+	-rm $(TARGET_DIR)/usr/lib/libqwt.so.*
+ifeq ($(BR2_PACKAGE_QWT_SHARED),y)
+	-rm $(TARGET_DIR)/usr/lib/libqwt.so.*
+endif
+
+qwt-dirclean:
+	rm -rf $(QWT_TARGET_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(BR2_PACKAGE_QWT),y)
+TARGETS+=qwt
+endif

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2] add QWT library: Qt Widgets for Technical Applications
  2011-08-07  7:36       ` Peter Korsgaard
@ 2011-08-10 13:04         ` Ivan Kuten
  0 siblings, 0 replies; 7+ messages in thread
From: Ivan Kuten @ 2011-08-10 13:04 UTC (permalink / raw)
  To: buildroot

On 08/07/2011 10:36 AM, Peter Korsgaard wrote:
>
> 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
> --- buildroot/package/qwt/Config.in	1970-01-01 01:00:00.000000000 +0100
> +++ buildroot-work/package/qwt/Config.in	2010-08-23 16:34:18.000000000 +0200

Peter,

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

Best regards,
Ivan

-- 
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

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

end of thread, other threads:[~2011-08-10 13:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-04 21:02 [Buildroot] [PATCH] add QWT library: Qt Widgets for Technical Applications Ivan Kuten
2011-08-04 21:51 ` Thomas Petazzoni
2011-08-05 17:28   ` Ivan Kuten
2011-08-06  0:46     ` [Buildroot] [PATCH v2] " Ivan Kuten
2011-08-06  6:58       ` Thomas Petazzoni
2011-08-07  7:36       ` Peter Korsgaard
2011-08-10 13:04         ` Ivan Kuten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox