qt4: Make the WS configurable and add X11 files.
authorMichael Büsch <mb@bu3sch.de>
Thu, 19 Aug 2010 13:13:48 +0000 (13:13 +0000)
committerMichael Büsch <mb@bu3sch.de>
Thu, 19 Aug 2010 13:13:48 +0000 (13:13 +0000)
X11 config is still marked broken, because the configure script bits are missing.
This should not alter current QWS build in any way.

SVN-Revision: 22725

Xorg/lib/qt4/Config.in [new file with mode: 0644]
Xorg/lib/qt4/Makefile
Xorg/lib/qt4/files/x11-qmake.conf [new file with mode: 0644]
Xorg/lib/qt4/files/x11-qplatformdefs.conf [new file with mode: 0644]

diff --git a/Xorg/lib/qt4/Config.in b/Xorg/lib/qt4/Config.in
new file mode 100644 (file)
index 0000000..6a3a50d
--- /dev/null
@@ -0,0 +1,18 @@
+choice
+       prompt "qt4 window system"
+       depends on PACKAGE_qt4
+       default QT4_WS_QWS
+
+config QT4_WS_QWS
+       bool "QWS window system"
+       help
+         Use QT4's internal QWS window system.
+
+config QT4_WS_X11
+       bool "X11 window system"
+       depends on FEATURE_drawing-backend_libX11 && BROKEN
+       select PACKAGE_libX11
+       help
+         Use X11
+
+endchoice
index b91efaa..a3b3527 100644 (file)
@@ -21,6 +21,8 @@ PKG_BUILD_DIR=$(BUILD_DIR)/qt-everywhere-opensource-src-$(PKG_VERSION)
 PKG_BUILD_PARALLEL:=1
 
 PKG_CONFIG_DEPENDS:= \
+       CONFIG_QT4_WS_QWS \
+       CONFIG_QT4_WS_X11 \
        CONFIG_PACKAGE_qt4-demos \
        CONFIG_PACKAGE_qt4-examples \
        CONFIG_PACKAGE_qt4-svg \
@@ -43,6 +45,10 @@ ifeq ($(CONFIG_UCLIBC_VERSION_0_9_32),y)
   NPTL:=y
 endif
 
+define Package/qt4/config
+       source "$(SOURCE)/Config.in"
+endef
+
 define Package/qt4/Default
   SECTION:=xorg-framework
   CATEGORY:=Xorg
@@ -239,6 +245,13 @@ TARGET_LIBDIRS+=$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib $(TOOLCHAIN_DIR)/lib $
 TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib,-rpath-link=$(PKG_BUILD_DIR)/lib
 TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include/freetype2 -I$(PKG_BUILD_DIR)/include
 
+ifeq ($(CONFIG_QT4_WS_QWS),y)
+  FILEPFX:=qws-
+endif
+ifeq ($(CONFIG_QT4_WS_X11),y)
+  FILEPFX:=x11-
+endif
+
 define Build/Configure
        # NOTES:
        #  demos/examples: which demos are going to be built depends on which features are going to to be compiled into qt
@@ -246,8 +259,8 @@ define Build/Configure
        #  do not use fontconfig as it doesn't work anyway for qte
        #  bindir: bindir is where the host tools (qmake, moc, rcc, uic) will get installed into - they are just used on the host and not goig to be packaged
        mkdir -p $(PKG_BUILD_DIR)/mkspecs/qws/linux-openwrt-g++
-       $(CP) ./files/qws-qmake.conf $(PKG_BUILD_DIR)/mkspecs/qws/linux-openwrt-g++/qmake.conf
-       $(CP) ./files/qws-qplatformdefs.h $(PKG_BUILD_DIR)/mkspecs/qws/linux-openwrt-g++/qplatformdefs.h
+       $(CP) ./files/$(FILEPFX)qmake.conf $(PKG_BUILD_DIR)/mkspecs/qws/linux-openwrt-g++/qmake.conf
+       $(CP) ./files/$(FILEPFX)qplatformdefs.h $(PKG_BUILD_DIR)/mkspecs/qws/linux-openwrt-g++/qplatformdefs.h
        ( cd $(PKG_BUILD_DIR) ; \
                TARGET_CC="$(TARGET_CROSS)gcc" \
                TARGET_CXX="$(TARGET_CROSS)g++" \
diff --git a/Xorg/lib/qt4/files/x11-qmake.conf b/Xorg/lib/qt4/files/x11-qmake.conf
new file mode 100644 (file)
index 0000000..02fca65
--- /dev/null
@@ -0,0 +1,48 @@
+MAKEFILE_GENERATOR             = UNIX
+TARGET_PLATFORM                        = unix
+CONFIG                         += qt warn_on release incremental link_prl
+QT                             += core gui
+QMAKE_INCREMENTAL_STYLE                = sublib
+
+include(../common/g++.conf)
+include(../common/linux.conf)
+
+# QMAKE_{INC,LIB}DIR_QT needs to be overridden,
+# as they're set to $$[QT_INSTALL_{HEADERS,LIBS}] by default
+# which are compiled into the qmake binary statically
+QMAKE_INCDIR_QT                                        = $$(TARGET_INCDIRS)
+QMAKE_LIBDIR_QT                                        = $$(TARGET_LIBDIRS)
+QMAKE_INCDIR                                   = $$(TARGET_INCDIRS)
+QMAKE_LIBDIR                                   = $$(TARGET_LIBDIRS)
+QMAKE_MOC                                              = $$(STAGING_DIR_HOST)/bin/moc
+QMAKE_UIC                                              = $$(STAGING_DIR_HOST)/bin/uic
+QMAKE_RCC                                              = $$(STAGING_DIR_HOST)/bin/rcc
+QMAKE_CC                                               = $$(TARGET_CC)
+QMAKE_CXX                                              = $$(TARGET_CXX)
+QMAKE_AR                                               = $$(TARGET_CROSS)ar cqs
+QMAKE_OBJCOPY                                  = $$(TARGET_CROSS)objcopy
+QMAKE_RANLIB                                   = $$(TARGET_CROSS)ranlib
+QMAKE_CFLAGS                                   = $$(TARGET_CFLAGS)
+QMAKE_CXXFLAGS                                 = $$(TARGET_CFLAGS)
+QMAKE_LINK                                             = $$(TARGET_CXX)
+QMAKE_LINK_C                                   = $$(TARGET_CC)
+QMAKE_LFLAGS                                   = $$(TARGET_LDFLAGS) # this will end up in redundant "-L"-strings, as they're already in $QMAKE_LIBDIR_QT, however TARGET_LDFLAGS may contain not only directories but special linker options
+
+#unset vars which would intefere with vars/flags passed over by OpenWrt
+QMAKE_STRIP                                            = # do not strip
+QMAKE_STRIPFLAGS_LIB                   = # do not strip
+QMAKE_CFLAGS_WARN_ON                   = 
+QMAKE_CFLAGS_WARN_OFF                  = 
+QMAKE_CFLAGS_RELEASE                   = 
+QMAKE_CFLAGS_DEBUG                             = 
+QMAKE_CFLAGS_PRECOMPILE                        = 
+QMAKE_CFLAGS_USE_PRECOMPILE            = 
+QMAKE_CXXFLAGS_WARN_ON                 = 
+QMAKE_CXXFLAGS_WARN_OFF                        = 
+QMAKE_CXXFLAGS_RELEASE                 = 
+QMAKE_CXXFLAGS_DEBUG                   = 
+QMAKE_CXXFLAGS_PRECOMPILE              = 
+QMAKE_CXXFLAGS_USE_PRECOMPILE  = 
+QMAKE_LFLAGS_RELEASE                   = 
+
+load(qt_config)
diff --git a/Xorg/lib/qt4/files/x11-qplatformdefs.conf b/Xorg/lib/qt4/files/x11-qplatformdefs.conf
new file mode 100644 (file)
index 0000000..5d22fb4
--- /dev/null
@@ -0,0 +1 @@
+#include "../linux-g++/qplatformdefs.h"