diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2009-11-04 07:14:37 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-06-21 21:53:04 +0200 |
commit | 834ce96df4501478e2152ae4e72cb286ebea1d01 (patch) | |
tree | 6828d212806d41694f5942b6f23913059eb4b025 | |
parent | 9a22cb31cbda99aae1e5a3956149425cdacf986d (diff) | |
download | ptxdist-834ce96df4501478e2152ae4e72cb286ebea1d01.tar.gz ptxdist-834ce96df4501478e2152ae4e72cb286ebea1d01.tar.xz |
[qt4] add X11 support
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | patches/qt-everywhere-opensource-src-4.6.3/ptx-mkspec.diff | 55 | ||||
-rw-r--r-- | rules/host-qt4.make | 4 | ||||
-rw-r--r-- | rules/qt4.in | 137 | ||||
-rw-r--r-- | rules/qt4.make | 107 |
4 files changed, 295 insertions, 8 deletions
diff --git a/patches/qt-everywhere-opensource-src-4.6.3/ptx-mkspec.diff b/patches/qt-everywhere-opensource-src-4.6.3/ptx-mkspec.diff index 405729189..328b10699 100644 --- a/patches/qt-everywhere-opensource-src-4.6.3/ptx-mkspec.diff +++ b/patches/qt-everywhere-opensource-src-4.6.3/ptx-mkspec.diff @@ -9,9 +9,11 @@ Add a mkspec for ptxdist: Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> --- - mkspecs/qws/linux-ptx-g++/qmake.conf.in | 25 +++++++++++++++++++++++++ - mkspecs/qws/linux-ptx-g++/qplatformdefs.h | 2 ++ - 2 files changed, 27 insertions(+) + mkspecs/linux-ptx-g++/qmake.conf.in | 35 ++++++++++++++++++++++++++++++ + mkspecs/linux-ptx-g++/qplatformdefs.h | 2 + + mkspecs/qws/linux-ptx-g++/qmake.conf.in | 25 +++++++++++++++++++++ + mkspecs/qws/linux-ptx-g++/qplatformdefs.h | 2 + + 4 files changed, 64 insertions(+) Index: b/mkspecs/qws/linux-ptx-g++/qmake.conf.in =================================================================== @@ -50,3 +52,50 @@ Index: b/mkspecs/qws/linux-ptx-g++/qplatformdefs.h @@ -0,0 +1,2 @@ + +#include "../../linux-g++/qplatformdefs.h" +Index: b/mkspecs/linux-ptx-g++/qmake.conf.in +=================================================================== +--- /dev/null ++++ b/mkspecs/linux-ptx-g++/qmake.conf.in +@@ -0,0 +1,35 @@ ++# ++# qmake configuration for linux-ptx-g++ ++# ++ ++ ++include(../common/g++.conf) ++include(../common/linux.conf) ++ ++MAKEFILE_GENERATOR = UNIX ++TEMPLATE = app ++CONFIG += qt warn_on release incremental link_prl ++QT += core gui network ++QMAKE_INCREMENTAL_STYLE = sublib ++ ++# modifications to g++.conf ++QMAKE_CC = @COMPILER_PREFIX@gcc ++QMAKE_CXX = @COMPILER_PREFIX@g++ ++QMAKE_INCDIR = @INCDIR@ ++QMAKE_LIBDIR = @LIBDIR@ ++ ++QMAKE_LINK = @COMPILER_PREFIX@g++ ++QMAKE_LINK_SHLIB = @COMPILER_PREFIX@g++ ++QMAKE_LFLAGS = @LDFLAGS@ ++ ++QMAKE_INCDIR_X11 = ++QMAKE_LIBDIR_X11 = ++QMAKE_INCDIR_OPENGL = ++QMAKE_LIBDIR_OPENGL = ++ ++# modifications to linux.conf ++QMAKE_AR = @COMPILER_PREFIX@ar cqs ++QMAKE_OBJCOPY = @COMPILER_PREFIX@objcopy ++QMAKE_STRIP = @COMPILER_PREFIX@strip ++ ++load(qt_config) +Index: b/mkspecs/linux-ptx-g++/qplatformdefs.h +=================================================================== +--- /dev/null ++++ b/mkspecs/linux-ptx-g++/qplatformdefs.h +@@ -0,0 +1,2 @@ ++ ++#include "../linux-g++/qplatformdefs.h" diff --git a/rules/host-qt4.make b/rules/host-qt4.make index 74768cacc..f865db6f0 100644 --- a/rules/host-qt4.make +++ b/rules/host-qt4.make @@ -151,7 +151,11 @@ $(STATEDIR)/host-qt4.install.post: # add wrapper script that sets the correct QMAKESPEC @rm -f $(PTXDIST_SYSROOT_CROSS)/bin/qmake $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross @cp $(HOST_QT4_PKGDIR)/bin/qmake $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross +ifdef PTXCONF_QT4_PLATFORM_EMBEDDED @echo -e '#!/bin/sh\nexport QMAKESPEC=qws/linux-ptx-g++\nexec $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross "$$@"\n' > $(PTXDIST_SYSROOT_CROSS)/bin/qmake +else + @echo -e '#!/bin/sh\nexport QMAKESPEC=linux-ptx-g++\nexec $(PTXDIST_SYSROOT_CROSS)/bin/qmake-cross "$$@"\n' > $(PTXDIST_SYSROOT_CROSS)/bin/qmake +endif @chmod +x $(PTXDIST_SYSROOT_CROSS)/bin/qmake @echo -e "[Paths]\nPrefix=$(SYSROOT)/usr\nBinaries=$(PTXCONF_SYSROOT_HOST)/bin" > $(PTXDIST_SYSROOT_CROSS)/bin/qt.conf @$(call touch) diff --git a/rules/qt4.in b/rules/qt4.in index ca681ea49..6bd788e71 100644 --- a/rules/qt4.in +++ b/rules/qt4.in @@ -17,6 +17,22 @@ menuconfig QT4 select ALSA_LIB if QT4_BUILD_MULTIMEDIA # libsvga is currently not in ptxdist # select LIBSVGA if QT4_GFX_SVGA_PLUGIN + + select XORG_LIB_X11 if QT4_X11 + select XORG_LIB_SM if QT4_X11_SM + select XORG_PROTO_XEXT if QT4_X11_XSHAPE + select XORG_PROTO_XEXT if QT4_X11_XSYNC + select XORG_LIB_XINERAMA if QT4_X11_XINERAMA + select XORG_LIB_XCURSOR if QT4_X11_XCURSOR + select XORG_LIB_XFIXES if QT4_X11_XFIXES + select XORG_LIB_XRANDR if QT4_X11_XRANDR + select XORG_LIB_XRENDER if QT4_X11_XRENDER + select XORG_PROTO_XEXT if QT4_X11_MITSHM + select FONTCONFIG if QT4_X11_FONTCONFIG + select FREETYPE if QT4_X11_FONTCONFIG + select XORG_PROTO_INPUT if QT4_X11_XINPUT + select XORG_LIB_XI if QT4_X11_XINPUT + prompt "Qt Embedded " help Qt Embedded is Trolltech's Widget Library for Embedded Linux. @@ -32,8 +48,27 @@ config QT4_SHARED If selected the shared Qt Embedded Libraries are built and installed. +choice + prompt "platform " + default QT4_PLATFORM_EMBEDDED + + config QT4_PLATFORM_EMBEDDED + bool + prompt "embedded" + help + Build Qt for embedded + + config QT4_PLATFORM_X11 + bool + prompt "X11 " + help + Build Qt for X11 +endchoice + endmenu +if QT4_PLATFORM_EMBEDDED + menu "graphics driver " choice @@ -328,6 +363,104 @@ config QT4_MOUSE_QVFB endmenu +endif # QT4_PLATFORM_EMBEDDED + +if QT4_PLATFORM_X11 + +menu "X11 feature options " + +config QT4_X11_SM + bool + prompt "X Session Management" + help + Support X Session Management, links in -lSM -lICE. + +config QT4_X11_XSHAPE + bool + prompt "XShape" + help + Compile XShape support. Requires X11/extensions/shape.h. + +config QT4_X11_XSYNC + bool + prompt "XSync" + help + Compile XSync support. Requires X11/extensions/sync.h. + +config QT4_X11_XINERAMA + bool + prompt "Xinerama" + help + Compile Xinerama support. Requires X11/extensions/Xinerama.h + and libXinerama. By default, Xinerama support will be compiled if + available and the shared libraries are dynamically loaded at + runtime. + +config QT4_X11_XCURSOR + bool + prompt "Xcursor" + help + Compile Xcursor support. Requires X11/Xcursor/Xcursor.h and + libXcursor. By default, Xcursor support will be compiled if + available and the shared libraries are dynamically loaded + at runtime. + +config QT4_X11_XFIXES + bool + prompt "Xfixes" + help + Compile Xfixes support. Requires X11/extensions/Xfixes.h and + libXfixes. By default, Xfixes support will be compiled if + available and the shared libraries are dynamically loaded at + runtime. + +config QT4_X11_XRANDR + bool + prompt "Xrandr" + help + Compile Xrandr support. Requires X11/extensions/Xrandr.h + and libXrandr. + +config QT4_X11_XRENDER + bool + prompt "Xrender" + help + Compile Xrender support. Requires X11/extensions/Xrender.h + and libXrender. + +config QT4_X11_MITSHM + bool + prompt "MIT-SHM" + help + Compile MIT-SHM support. Requires sys/ipc.h, sys/shm.h + and X11/extensions/XShm.h + +config QT4_X11_FONTCONFIG + bool + prompt "FontConfig" + help + Compile FontConfig (anti-aliased font) support. Requires + fontconfig/fontconfig.h, libfontconfig, freetype.h and + libfreetype. + +config QT4_X11_XINPUT + bool + prompt "Xinput" + help + ompile Xinput support. This also enabled tablet support + which requires IRIX with wacom.h and libXi or XFree86 with + X11/extensions/XInput.h and libXi. + +config QT4_X11_XKB + bool + prompt "XKB" + help + Compile XKB (X KeyBoard extension) support. + +endmenu + +endif # QT4_PLATFORM_X11 + # prepare the build system to build the examples # selected by QT4_EXAMPLES config QT4_PREPARE_EXAMPLES @@ -703,6 +836,8 @@ config QT4_BUILD_SCRIPTTOOLS endmenu +if QT4_PLATFORM_EMBEDDED + menu "Install Fonts " config QT4_FONT_DEJAVU @@ -749,3 +884,5 @@ endmenu endif +endif + diff --git a/rules/qt4.make b/rules/qt4.make index 9c0c4aff2..90898d5bd 100644 --- a/rules/qt4.make +++ b/rules/qt4.make @@ -42,7 +42,9 @@ $(STATEDIR)/qt4.extract: @$(call targetinfo) @$(call extract, QT4) @$(call patchin, QT4) - @for file in $(QT4_DIR)/mkspecs/qws/linux-ptx-g++/*.in; do \ + @for file in \ + $(QT4_DIR)/mkspecs/qws/linux-ptx-g++/*.in \ + $(QT4_DIR)/mkspecs/linux-ptx-g++/*.in; do \ sed -e "s,@COMPILER_PREFIX@,$(COMPILER_PREFIX),g" \ -e "s,@INCDIR@,$(SYSROOT)/include $(SYSROOT)/usr/include,g" \ -e "s,@LIBDIR@,$(SYSROOT)/lib $(SYSROOT)/usr/lib,g" \ @@ -96,12 +98,8 @@ QT4_AUTOCONF := \ -pch \ -reduce-relocations \ -force-pkg-config \ - -embedded $(QT4_ARCH) \ - -qt-decoration-styled \ - -depths all \ -prefix /usr \ -no-armfpa \ - -xplatform qws/linux-ptx-g++ \ -make libs \ -nomake docs @@ -111,6 +109,25 @@ else QT4_AUTOCONF += -no-iconv endif +ifdef PTXCONF_QT4_PLATFORM_EMBEDDED +QT4_AUTOCONF += \ + -embedded $(QT4_ARCH) \ + -qt-decoration-styled \ + -depths all \ + -xplatform qws/linux-ptx-g++ +endif + +ifdef PTXCONF_QT4_PLATFORM_X11 +QT4_AUTOCONF += \ + -x11 \ + -arch $(QT4_ARCH) \ + -xplatform linux-ptx-g++ \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg +endif + # -make libs tools examples demos docs translations # maybe later: @@ -128,6 +145,8 @@ else QT4_AUTOCONF += -nomake examples -nomake demos endif +ifdef PTXCONF_QT4_PLATFORM_EMBEDDED + # ahi graphics driver ifdef PTXCONF_QT4_GFX_AHI_PLUGIN QT4_AUTOCONF += -plugin-gfx-ahi @@ -261,6 +280,84 @@ else QT4_AUTOCONF += -no-mouse-qvfb endif +endif # PTXCONF_QT4_PLATFORM_EMBEDDED + +ifdef PTXCONF_QT4_PLATFORM_X11 + +ifdef PTXCONF_QT4_X11_SM +QT4_AUTOCONF += -sm +else +QT4_AUTOCONF += -no-sm +endif + +ifdef PTXCONF_QT4_X11_XSHAPE +QT4_AUTOCONF += -xshape +else +QT4_AUTOCONF += -no-xshape +endif + +ifdef PTXCONF_QT4_X11_XSYNC +QT4_AUTOCONF += -xsync +else +QT4_AUTOCONF += -no-xsync +endif + +ifdef PTXCONF_QT4_X11_XINERAMA +QT4_AUTOCONF += -xinerama +else +QT4_AUTOCONF += -no-xinerama +endif + +ifdef PTXCONF_QT4_X11_XCURSOR +QT4_AUTOCONF += -xcursor +else +QT4_AUTOCONF += -no-xcursor +endif + +ifdef PTXCONF_QT4_X11_XFIXES +QT4_AUTOCONF += -xfixes +else +QT4_AUTOCONF += -no-xfixes +endif + +ifdef PTXCONF_QT4_X11_XRANDR +QT4_AUTOCONF += -xrandr +else +QT4_AUTOCONF += -no-xrandr +endif + +ifdef PTXCONF_QT4_X11_XRENDER +QT4_AUTOCONF += -xrender +else +QT4_AUTOCONF += -no-xrender +endif + +ifdef PTXCONF_QT4_X11_MITSHM +QT4_AUTOCONF += -mitshm +else +QT4_AUTOCONF += -no-mitshm +endif + +ifdef PTXCONF_QT4_X11_FONTCONFIG +QT4_AUTOCONF += -fontconfig +else +QT4_AUTOCONF += -no-fontconfig +endif + +ifdef PTXCONF_QT4_X11_XINPUT +QT4_AUTOCONF += -xinput +else +QT4_AUTOCONF += -no-xinput +endif + +ifdef PTXCONF_QT4_X11_XKB +QT4_AUTOCONF += -xkb +else +QT4_AUTOCONF += -no-xkb +endif + +endif # PTXCONF_QT4_PLATFORM_X11 + # PNG support ifdef PTXCONF_QT4_PNG_NONE QT4_AUTOCONF += -no-libpng |