summaryrefslogtreecommitdiff
path: root/package/qtopia4
diff options
context:
space:
mode:
Diffstat (limited to 'package/qtopia4')
-rw-r--r--package/qtopia4/qtopia4.mk32
1 files changed, 23 insertions, 9 deletions
diff --git a/package/qtopia4/qtopia4.mk b/package/qtopia4/qtopia4.mk
index 3f46c13d2..9ae065fad 100644
--- a/package/qtopia4/qtopia4.mk
+++ b/package/qtopia4/qtopia4.mk
@@ -327,6 +327,21 @@ QTOPIA4_QMAKE_CONF:=$(QTOPIA4_TARGET_DIR)/mkspecs/qws/linux-$(BR2_PACKAGE_QTOPIA
# Variable for other Qt applications to use
QTOPIA4_QMAKE:=$(STAGING_DIR)/usr/bin/qmake -spec qws/linux-$(BR2_PACKAGE_QTOPIA4_EMB_PLATFORM)-g++
+################################################################################
+# QTOPIA4_QMAKE_SET -- helper macro to set QMAKE_<variable> = <value> in
+# QTOPIA_QMAKE_CONF. Will remove existing variable declaration if available.
+#
+# Argument 1 is the variable name (without QMAKE_)
+# Argument 2 is the value to set variable to
+#
+# E.G. use like this:
+# $(call QTOPIA4_QMAKE_SET,variable,value)
+################################################################################
+define QTOPIA4_QMAKE_SET
+ $(SED) '/QMAKE_$(1)/d' $(QTOPIA4_QMAKE_CONF)
+ $(SED) '/include.*qws.conf/aQMAKE_$(1) = $(2)' $(QTOPIA4_QMAKE_CONF)
+endef
+
$(DL_DIR)/$(QTOPIA4_SOURCE):
$(call DOWNLOAD,$(QTOPIA4_SITE),$(QTOPIA4_SOURCE))
@@ -346,16 +361,15 @@ ifneq ($(BR2_INET_IPV6),y)
$(SED) 's/^CFG_IPV6IFNAME=auto/CFG_IPV6IFNAME=no/' $(QTOPIA4_TARGET_DIR)/configure
endif
$(SED) 's/^CFG_XINERAMA=auto/CFG_XINERAMA=no/' $(QTOPIA4_TARGET_DIR)/configure
- #$(SED) 's,-O2,$(TARGET_CFLAGS),' $(QTOPIA4_QMAKE_CONF)
# Fix compiler path
- $(SED) '\,QMAKE_CC[ ]*=, c\QMAKE_CC = $(TARGET_CC)' $(QTOPIA4_QMAKE_CONF)
- $(SED) '\,QMAKE_CXX[ ]*=, c\QMAKE_CXX = $(TARGET_CXX)' $(QTOPIA4_QMAKE_CONF)
- $(SED) '\,QMAKE_LINK[ ]*=, c\QMAKE_LINK = $(TARGET_CXX)' $(QTOPIA4_QMAKE_CONF)
- $(SED) '\,QMAKE_LINK_SHLIB[ ]*=, c\QMAKE_LINK_SHLIB = $(TARGET_CXX)' $(QTOPIA4_QMAKE_CONF)
- $(SED) '\,QMAKE_AR[ ]*=, c\QMAKE_AR = $(TARGET_AR) cqs' $(QTOPIA4_QMAKE_CONF)
- $(SED) '\,QMAKE_RANLIB[ ]*=, c\QMAKE_RANLIB = $(TARGET_RANLIB)' $(QTOPIA4_QMAKE_CONF)
- $(SED) '\,QMAKE_STRIP[ ]*=, c\QMAKE_STRIP = $(TARGET_STRIP)' $(QTOPIA4_QMAKE_CONF)
-
+ $(call QTOPIA4_QMAKE_SET,CC,$(TARGET_CC))
+ $(call QTOPIA4_QMAKE_SET,CXX,$(TARGET_CXX))
+ $(call QTOPIA4_QMAKE_SET,LINK,$(TARGET_CXX))
+ $(call QTOPIA4_QMAKE_SET,LINK_SHLIB,$(TARGET_CXX))
+ $(call QTOPIA4_QMAKE_SET,AR,$(TARGET_AR))
+ $(call QTOPIA4_QMAKE_SET,OBJCOPY,$(TARGET_OBJCOPY))
+ $(call QTOPIA4_QMAKE_SET,RANLIB,$(TARGET_RANLIB))
+ $(call QTOPIA4_QMAKE_SET,STRIP,$(TARGET_STRIP))
-[ -f $(QTOPIA4_QCONFIG_FILE) ] && cp $(QTOPIA4_QCONFIG_FILE) \
$(QTOPIA4_TARGET_DIR)/$(QTOPIA4_QCONFIG_FILE_LOCATION)
# Qt doesn't use PKG_CONFIG, it searches for pkg-config with 'which'.