Skip to contentSkip to conversation

qt: remove bogus lines

PATCH New Ismael Luceno 3 participants 7 messages Feb 26, 2012 – Feb 28, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 qt: remove bogus lines

---
 package/qt/qt.mk |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
package/qt/qt.mk +2 -6
index fe85dae..68f9348 100644
@@ -199,9 +199,7 @@ else
 QT_CONFIGURE_OPTS += -big-endian
 endif
 
-ifeq ($(BR2_arm),y)
-QT_EMB_PLATFORM = arm
-else ifeq ($(BR2_armeb),y)
+ifeq ($(BR2_arm)$(BR2_armeb),y)
 QT_EMB_PLATFORM = arm
 else ifeq ($(BR2_avr32),y)
 QT_EMB_PLATFORM = avr32
@@ -209,9 +207,7 @@ else ifeq ($(BR2_i386),y)
 QT_EMB_PLATFORM = x86
 else ifeq ($(BR2_x86_64),y)
 QT_EMB_PLATFORM = x86_64
-else ifeq ($(BR2_mips),y)
-QT_EMB_PLATFORM = mips
-else ifeq ($(BR2_mipsel),y)
+else ifeq ($(BR2_mips)$(BR2_mipsel),y)
 QT_EMB_PLATFORM = mips
 else ifeq ($(BR2_powerpc),y)
 QT_EMB_PLATFORM = powerpc
Signature · 1 line
1.7.9.1
#1 lore raw

PATCH 2/3 qt: Install QtDeclarative imports

---
 package/qt/qt.mk |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
package/qt/qt.mk +5 -2
index 68f9348..4871538 100644
@@ -594,9 +594,12 @@ endif
 
 # Plugin installation
 define QT_INSTALL_TARGET_PLUGINS
+	mkdir -p $(TARGET_DIR)/usr/lib/qt
 	if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \
-		mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
-		cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
+		cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins $(TARGET_DIR)/usr/lib/qt ; \
+	fi
+	if [ -d $(@D)/imports ] ; then \
+		cp -dpfr $(@D)/imports $(TARGET_DIR)/usr/lib/qt ; \
 	fi
 endef
 
Signature · 1 line
1.7.9.1
#2 lore raw

PATCH 2/3 qt: Install QtDeclarative imports

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ismael" == Ismael Luceno <[email protected]> writes:

Please sign off on your patches! (git format-patch -s).

Ismael> ---

 Ismael>  package/qt/qt.mk |    7 +++++--

Ismael> 1 files changed, 5 insertions(+), 2 deletions(-)

Ismael> diff --git a/package/qt/qt.mk b/package/qt/qt.mk Ismael> index 68f9348..4871538 100644
Ismael> --- a/package/qt/qt.mk
Ismael> +++ b/package/qt/qt.mk
Ismael> @@ -594,9 +594,12 @@ endif

Ismael> # Plugin installation
Ismael> define QT_INSTALL_TARGET_PLUGINS
Ismael> + mkdir -p $(TARGET_DIR)/usr/lib/qt
Ismael> if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \
Ismael> - mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
Ismael> - cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
Ismael> + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins $(TARGET_DIR)/usr/lib/qt ; \
Ismael> + fi
Ismael> + if [ -d $(@D)/imports ] ; then \
Ismael> + cp -dpfr $(@D)/imports $(TARGET_DIR)/usr/lib/qt ; \

It would make more sense to add the mkdir -p inside this conditional. Is there any reason why you are copying from the source directory and not staging like above?

Care to fix that and resend with your signed-off-by?

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 2/3 qt: Install QtDeclarative imports

Quoted 7 lines · On Sunday 26 February 2012 21:28:59 Peter Korsgaard wrote:

Ismael> # Plugin installation
Ismael> define QT_INSTALL_TARGET_PLUGINS
Ismael> + mkdir -p $(TARGET_DIR)/usr/lib/qt
Ismael> if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \

 Ismael> -              mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
 Ismael> -              cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
 Ismael> +              cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins $(TARGET_DIR)/usr/lib/qt ; \
Quoted 7 lines

Ismael> + fi
Ismael> + if [ -d $(@D)/imports ] ; then \
Ismael> + cp -dpfr $(@D)/imports $(TARGET_DIR)/usr/lib/qt ; \

It would make more sense to add the mkdir -p inside this conditional. Is there any reason why you are copying from the source directory and not staging like above?

In fact, it would be simpler if the whole thing was copied from the
staging dir, i.e.

if [ -d $(STAGING_DIR)/usr/lib/qt ]; then
mkdir -p $(TARGET_DIR)/usr/lib
cp -dpfr $(STAGING_DIR)/usr/lib/qt $(TARGET_DIR)/usr/lib
fi

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

PATCH 3/3 qt: Add option to build and install tools on the target

In reply to Ismael Luceno
---
 package/qt/Config.in |    9 +++++++++
 package/qt/qt.mk     |   14 +++++++++++++-
 2 files changed, 22 insertions(+), 1 deletions(-)
package/qt/Config.in +9 -0
index 3a552d0..6402bee 100644
@@ -16,6 +16,15 @@ config BR2_PACKAGE_QT_DEBUG
 	help
 	  If unsure, say N.
 
+config BR2_PACKAGE_QT_TOOLS
+	bool "Compile and install tools"
+	depends on BR2_PACKAGE_QT_SQL_MODULE
+	help
+	  If unsure, say N.
+
+comment "Tools need SQL module"
+	depends on !BR2_PACKAGE_QT_SQL_MODULE
+
 config BR2_PACKAGE_QT_DEMOS
 	bool "Compile and install demos and examples (with code)"
 	help
package/qt/qt.mk +13 -1
index 4871538..5414947 100644
@@ -412,6 +412,12 @@ else
 QT_CONFIGURE_OPTS += -no-declarative
 endif
 
+ifeq ($(BR2_PACKAGE_QT_TOOLS),y)
+QT_CONFIGURE_OPTS += -make tools
+else
+QT_CONFIGURE_OPTS += -nomake tools
+endif
+
 # ccache and precompiled headers don't play well together
 ifeq ($(BR2_CCACHE),y)
 QT_CONFIGURE_OPTS += -no-pch
@@ -509,6 +515,7 @@ endef
 
 QT_INSTALL_LIBS    += QtCore
 QT_HOST_PROGRAMS   += moc rcc qmake lrelease
+QT_TARGET_PROGRAMS += qmlviewer
 
 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y)
 QT_INSTALL_LIBS    += QtGui
@@ -577,7 +584,12 @@ endef
 define QT_INSTALL_STAGING_CMDS
 	$(MAKE) -C $(@D) install
 	mkdir -p $(HOST_DIR)/usr/bin
-	mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin
+	for i in $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)); do \
+		if [ -x "$$i" ]; then cp "$$i" $(HOST_DIR)/usr/bin; fi; \
+	done
+	for i in $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_TARGET_PROGRAMS)); do \
+		if [ -x "$$i" ]; then cp "$$i" $(TARGET_DIR)/usr/bin; fi; \
+	done
 	rm -rf $(HOST_DIR)/usr/mkspecs
 	mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr
 	$(QT_INSTALL_QT_CONF)
Signature · 1 line
1.7.9.1
#5 lore raw

PATCH 3/3 qt: Add option to build and install tools on the target

On Sunday 26 February 2012 12:13:08 Ismael Luceno wrote:
[snip]

package/qt/Config.in config BR2_PACKAGE_QT_DEBUG · line 23

Quoted 5 lines
package/qt/Config.in +5 -0
+config BR2_PACKAGE_QT_TOOLS
+	bool "Compile and install tools"
+	depends on BR2_PACKAGE_QT_SQL_MODULE
+	help
+	  If unsure, say N.

The help should specify which tools are included (and maybe also what
they do).

[snip]

Quoted 5 lines
package/qt/qt.mk +1 -0
+QT_TARGET_PROGRAMS += qmlviewer
 
 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y)
 QT_INSTALL_LIBS    += QtGui

package/qt/qt.mk endef · line 592

Quoted 10 lines
package/qt/qt.mk +6 -1
@@ -577,7 +584,12 @@ endef
 define QT_INSTALL_STAGING_CMDS
 	$(MAKE) -C $(@D) install
 	mkdir -p $(HOST_DIR)/usr/bin
-	mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin
+	for i in $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)); do \
+		if [ -x "$$i" ]; then cp "$$i" $(HOST_DIR)/usr/bin; fi; \
+	done
+	for i in $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_TARGET_PROGRAMS)); do \
+		if [ -x "$$i" ]; then cp "$$i" $(TARGET_DIR)/usr/bin; fi; \
+	done

I would remove the checks here. If in some future version these tools
disappear, we want to notice it and update the .mk file accordingly. So the original mv command should be OK. By the way, if you make such an additional change (which is unrelated to 'build and install tools on the target'), it should be mentioned in the commit message.

For the qmlviewer, I assume it is not built if BR2_PACKAGE_QT_TOOLS is
disabled. To support that, you can set

QT_TARGET_PROGRAMS += $(if $(BR2_PACKAGE_QT_TOOLS),qmlviewer))

Or alternatively:

QT_TARGET_PROGRAMS-$(BR2_PACKAGE_QT_TOOLS) += qmlviewer

and use $(QT_TARGET_PROGRAMS-y)

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#6 lore raw

PATCH 1/3 qt: remove bogus lines

In reply to Ismael Luceno
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ismael" == Ismael Luceno <[email protected]> writes:

Ismael> ---

 Ismael>  package/qt/qt.mk |    8 ++------

Ismael> 1 files changed, 2 insertions(+), 6 deletions(-)

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard