From: Michael Mrozek Date: Tue, 27 Sep 2011 01:20:20 +0000 (+0200) Subject: Argh! Accidental double-Revert fixed! X-Git-Tag: sz_beta3~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9bca556bb87974252ee67335bfbfacc47eb85289;p=openembedded.git Argh! Accidental double-Revert fixed! This reverts commit 47838d659f7a2a085fe99c1cd0951148be0afda6. --- diff --git a/recipes/egl/egl.inc b/recipes/egl/egl.inc deleted file mode 100644 index a74c4cdbf3..0000000000 --- a/recipes/egl/egl.inc +++ /dev/null @@ -1,2 +0,0 @@ -COMPATIBLE_MACHINE = "omap3|ti816x" - diff --git a/recipes/qt4/files/0001-wsegl2-support.patch b/recipes/qt4/files/0001-wsegl2-support.patch deleted file mode 100644 index ad61fe7afa..0000000000 --- a/recipes/qt4/files/0001-wsegl2-support.patch +++ /dev/null @@ -1,997 +0,0 @@ -diff -Nurp qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/pvr2d.h qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/pvr2d.h ---- qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/pvr2d.h 1970-01-01 00:00:00.000000000 +0000 -+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/pvr2d.h 2011-05-16 22:51:43.158564336 +0000 -@@ -0,0 +1,669 @@ -+/********************************************************************** -+* -+* Copyright(c) Imagination Technologies Ltd. -+* -+* The contents of this file are subject to the MIT license as set out below. -+* -+* Permission is hereby granted, free of charge, to any person obtaining a copy -+* of this software and associated documentation files (the "Software"), -+* to deal in the Software without restriction, including without limitation -+* the rights to use, copy, modify, merge, publish, distribute, sublicense, -+* and/or sell copies of the Software, and to permit persons to whom the -+* Software is furnished to do so, subject to the following conditions: -+* -+* The above copyright notice and this permission notice shall be included -+* in all copies or substantial portions of the Software. -+* -+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -+* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -+* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -+* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -+* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+* -+* This License is also included in this distribution in the file called -+* "COPYING". -+* -+******************************************************************************/ -+ -+ -+ -+/****************************************************************************** -+Modifications :- -+$Log: pvr2d.h $ -+ -+ --- Revision Logs Removed --- -+******************************************************************************/ -+ -+#ifndef _PVR2D_H_ -+#define _PVR2D_H_ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* PVR2D Platform-specific definitions */ -+#if defined (__linux__) -+#define PVR2D_EXPORT __attribute__((visibility("default"))) -+#define PVR2D_IMPORT -+#else -+#define PVR2D_EXPORT -+#define PVR2D_IMPORT -+#endif -+ -+/* PVR2D header revision */ -+#define PVR2D_REV_MAJOR 3 -+#define PVR2D_REV_MINOR 5 -+ -+/* Basic types */ -+typedef enum -+{ -+ PVR2D_FALSE = 0, -+ PVR2D_TRUE -+} PVR2D_BOOL; -+ -+typedef void* PVR2D_HANDLE; -+ -+typedef char PVR2D_CHAR, *PVR2D_PCHAR; -+typedef unsigned char PVR2D_UCHAR, *PVR2D_PUCHAR; -+typedef int PVR2D_INT, *PVR2D_PINT; -+typedef unsigned int PVR2D_UINT, *PVR2D_PUINT; -+typedef long PVR2D_LONG, *PVR2D_PLONG; -+typedef unsigned long PVR2D_ULONG, *PVR2D_PULONG; -+ -+typedef void PVR2D_VOID, *PVR2D_PVOID; -+ -+ -+/* error codes */ -+typedef enum -+{ -+ PVR2D_OK = 0, -+ PVR2DERROR_INVALID_PARAMETER = -1, -+ PVR2DERROR_DEVICE_UNAVAILABLE = -2, -+ PVR2DERROR_INVALID_CONTEXT = -3, -+ PVR2DERROR_MEMORY_UNAVAILABLE = -4, -+ PVR2DERROR_DEVICE_NOT_PRESENT = -5, -+ PVR2DERROR_IOCTL_ERROR = -6, -+ PVR2DERROR_GENERIC_ERROR = -7, -+ PVR2DERROR_BLT_NOTCOMPLETE = -8, -+ PVR2DERROR_HW_FEATURE_NOT_SUPPORTED = -9, -+ PVR2DERROR_NOT_YET_IMPLEMENTED = -10, -+ PVR2DERROR_MAPPING_FAILED = -11 -+}PVR2DERROR; -+ -+/* 32 bit PVR2D pixel format specifier */ -+typedef unsigned long PVR2DFORMAT; -+ -+/* Standard PVR2D pixel formats */ -+#define PVR2D_1BPP 0x00UL // 1bpp mask surface or palletized 1 bit source with 2x32 bit CLUT -+#define PVR2D_RGB565 0x01UL // Common rgb 565 format -+#define PVR2D_ARGB4444 0x02UL // Common argb 4444 format -+#define PVR2D_RGB888 0x03UL // Common rgb 888 format (not supported) -+#define PVR2D_ARGB8888 0x04UL // Common argb 8888 format -+#define PVR2D_ARGB1555 0x05UL // Common argb 1555 format -+#define PVR2D_ALPHA8 0x06UL // Alpha-only 8 bit per pixel (used with a constant fill colour) -+#define PVR2D_ALPHA4 0x07UL // Alpha-only 4 bits per pixel (used with a constant fill colour) -+#define PVR2D_PAL2 0x08UL // Palletized 2 bit format (requires 4x32 bit CLUT) -+#define PVR2D_PAL4 0x09UL // Palletized 4 bit format (requires 16x32 bit CLUT) -+#define PVR2D_PAL8 0x0AUL // Palletized 8 bit format (requires 256x32 bit CLUT) -+#define PVR2D_U8 0x10UL // monochrome unsigned 8 bit -+#define PVR2D_U88 0x11UL // monochrome unsigned 16 bit -+#define PVR2D_S8 0x12UL // signed 8 bit -+#define PVR2D_YUV422_YUYV 0x13UL // YUV 422 low-high byte order Y0UY1V -+#define PVR2D_YUV422_UYVY 0x14UL // YUV 422 low-high byte order UY0VY1 -+#define PVR2D_YUV422_YVYU 0x15UL // YUV 422 low-high byte order Y0VY1U -+#define PVR2D_YUV422_VYUY 0x16UL // YUV 422 low-high byte order VY0UY1 -+#define PVR2D_YUV420_2PLANE 0x17UL // YUV420 2 Plane -+#define PVR2D_YUV420_3PLANE 0x18UL // YUV420 3 Plane -+#define PVR2D_2101010ARGB 0x19UL // 32 bit 2 10 10 10 -+#define PVR2D_888RSGSBS 0x1AUL -+#define PVR2D_16BPP_RAW 0x1BUL // 16 bit raw (no format conversion) -+#define PVR2D_32BPP_RAW 0x1CUL // 32 bit raw -+#define PVR2D_64BPP_RAW 0x1DUL // 64 bit raw -+#define PVR2D_128BPP_RAW 0x1EUL // 128 bit raw -+ -+#define PVR2D_NO_OF_FORMATS 0x1FUL -+ -+/* Format modifier bit field (DstFormat and SrcFormat bits 16..23) */ -+#define PVR2D_FORMAT_MASK 0x0000FFFFUL // PVR2D Format bits -+#define PVR2D_FORMAT_LAYOUT_MASK 0x000F0000UL // Format layout (strided / twiddled / tiled) -+#define PVR2D_FORMAT_FLAGS_MASK 0x0FF00000UL // Surface Flags mask -+ -+/* Layout */ -+#define PVR2D_FORMAT_LAYOUT_SHIFT 16 -+#define PVR2D_FORMAT_LAYOUT_STRIDED 0x00000000UL -+#define PVR2D_FORMAT_LAYOUT_TILED 0x00010000UL -+#define PVR2D_FORMAT_LAYOUT_TWIDDLED 0x00020000UL -+ -+/* -+ PVR2D_SURFACE_PDUMP -+ This flag requests a surface pdump, to capture the pixel state after host writes. -+ Not needed if the surface state has resulted from previous SGX 2D/3D core writes. -+*/ -+#define PVR2D_SURFACE_PDUMP 0x00100000UL // calls PVRSRVPDumpMem to capture the surface (pdump builds only) -+ -+/* -+ Low level 3D format extension - for blts via the 3D core only. -+ If the top bit of the format field is set then PVR2D reads it as a PVRSRV_PIXEL_FORMAT. -+ The outcome is hardware dependant. -+ There is no guarantee that any specific PVRSRV format will be supported. -+*/ -+#define PVR2D_FORMAT_PVRSRV 0x80000000 -+ -+/* wrap surface type */ -+typedef enum -+{ -+ PVR2D_WRAPFLAG_NONCONTIGUOUS = 0, -+ PVR2D_WRAPFLAG_CONTIGUOUS = 1, -+ -+}PVR2DWRAPFLAGS; -+ -+#define PVR2D_CONTEXT_FLAGS_PRIORITY_MASK 0x00000003 -+ -+#define PVR2D_CONTEXT_FLAGS_LOW_PRIORITY_CONTEXT 1 -+#define PVR2D_CONTEXT_FLAGS_NORMAL_PRIORITY_CONTEXT 0 -+#define PVR2D_CONTEXT_FLAGS_HIGH_PRIORITY_CONTEXT 2 -+ -+/* flags for control information of additional blits */ -+typedef enum -+{ -+ PVR2D_BLIT_DISABLE_ALL = 0x00000000, /* disable all additional controls */ -+ PVR2D_BLIT_CK_ENABLE = 0x00000001, /* enable colour key */ -+ PVR2D_BLIT_GLOBAL_ALPHA_ENABLE = 0x00000002, /* enable standard global alpha */ -+ PVR2D_BLIT_PERPIXEL_ALPHABLEND_ENABLE = 0x00000004, /* enable per-pixel alpha bleding */ -+ PVR2D_BLIT_PAT_SURFACE_ENABLE = 0x00000008, /* enable pattern surf (disable fill) */ -+ PVR2D_BLIT_FULLY_SPECIFIED_ALPHA_ENABLE = 0x00000010, /* enable fully specified alpha */ -+ PVR2D_BLIT_ROT_90 = 0x00000020, /* apply 90 degree rotation to the blt */ -+ PVR2D_BLIT_ROT_180 = 0x00000040, /* apply 180 degree rotation to the blt */ -+ PVR2D_BLIT_ROT_270 = 0x00000080, /* apply 270 degree rotation to the blt */ -+ PVR2D_BLIT_COPYORDER_TL2BR = 0x00000100, /* copy order overrides */ -+ PVR2D_BLIT_COPYORDER_BR2TL = 0x00000200, -+ PVR2D_BLIT_COPYORDER_TR2BL = 0x00000400, -+ PVR2D_BLIT_COPYORDER_BL2TR = 0x00000800, -+ PVR2D_BLIT_COLKEY_SOURCE = 0x00001000, /* Key colour is on the source surface */ -+ PVR2D_BLIT_COLKEY_DEST = 0x00002000, /* Key colour is on the destination surface */ -+ PVR2D_BLIT_COLKEY_MASKED = 0x00004000, /* Mask enabled for colour key */ -+ PVR2D_BLIT_COLKEY_OP_PASS = 0x00008000, /* Colour key op = pass */ -+ PVR2D_BLIT_COLKEY_OP_REJECT = 0x00010000, /* Colour key op = reject */ -+ PVR2D_BLIT_PATH_2DCORE = 0x00100000, /* Blt via dedicated 2D Core or PTLA */ -+ PVR2D_BLIT_PATH_3DCORE = 0x00200000, /* Blt via 3D Core */ -+ PVR2D_BLIT_PATH_SWBLT = 0x00400000, /* Blt via host software */ -+ PVR2D_BLIT_NO_SRC_SYNC_INFO = 0x00800000, /* Dont send a source sync info*/ -+ PVR2D_BLIT_ISSUE_STATUS_UPDATES = 0x01000000, /* Issue status updates */ -+ -+} PVR2DBLITFLAGS; -+ -+/* standard alpha-blending functions, AlphaBlendingFunc field of PVR2DBLTINFO */ -+typedef enum -+{ -+ PVR2D_ALPHA_OP_SRC_DSTINV = 1, /* source alpha : Cdst = Csrc*Asrc + Cdst*(1-Asrc) */ -+ PVR2D_ALPHA_OP_SRCP_DSTINV = 2 /* premultiplied source alpha : Cdst = Csrc + Cdst*(1-Asrc) */ -+} PVR2D_ALPHABLENDFUNC; -+ -+/* blend ops for fully specified alpha (SGX 2D Core only) */ -+typedef enum -+{ -+ PVR2D_BLEND_OP_ZERO = 0, -+ PVR2D_BLEND_OP_ONE = 1, -+ PVR2D_BLEND_OP_SRC = 2, -+ PVR2D_BLEND_OP_DST = 3, -+ PVR2D_BLEND_OP_GLOBAL = 4, -+ PVR2D_BLEND_OP_SRC_PLUS_GLOBAL = 5, -+ PVR2D_BLEND_OP_DST_PLUS_GLOBAL = 6 -+}PVR2D_BLEND_OP; -+ -+/* SGX 2D Core Fully specified alpha blend : pAlpha field of PVR2DBLTINFO structure */ -+/* a fully specified Alpha Blend operation is defined as */ -+/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (ALPHA_3 * DST (ALPHA)) */ -+/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (ALPHA_4 * DST (RGB)) */ -+/* if the pre-multiplication stage is enabled then the equations become the following: */ -+/* PRE_MUL = ((SRC(A)) * (Global Alpha Value)) */ -+/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (PRE_MUL * DST (ALPHA)) */ -+/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (PRE_MUL * DST (RGB)) */ -+/* if the transparent source alpha stage is enabled then a source alpha of zero forces the */ -+/* source to be transparent for that pixel regardless of the blend equation being used. */ -+typedef struct _PVR2D_ALPHABLT -+{ -+ PVR2D_BLEND_OP eAlpha1; -+ PVR2D_BOOL bAlpha1Invert; -+ PVR2D_BLEND_OP eAlpha2; -+ PVR2D_BOOL bAlpha2Invert; -+ PVR2D_BLEND_OP eAlpha3; -+ PVR2D_BOOL bAlpha3Invert; -+ PVR2D_BLEND_OP eAlpha4; -+ PVR2D_BOOL bAlpha4Invert; -+ PVR2D_BOOL bPremulAlpha; /* enable pre-multiplication stage */ -+ PVR2D_BOOL bTransAlpha; /* enable transparent source alpha stage */ -+ PVR2D_BOOL bUpdateAlphaLookup; /* enable and update the 1555-Lookup alpha table */ -+ PVR2D_UCHAR uAlphaLookup0; /* 8 bit alpha when A=0 in a 1555-Lookup surface */ -+ PVR2D_UCHAR uAlphaLookup1; /* 8 bit alpha when A=1 in a 1555-Lookup surface */ -+ PVR2D_UCHAR uGlobalRGB; /* Global Alpha Value for RGB, 0=transparent 255=opaque */ -+ PVR2D_UCHAR uGlobalA; /* Global Alpha Value for Alpha */ -+ -+} PVR2D_ALPHABLT, *PPVR2D_ALPHABLT; -+ -+ -+/* surface memory info structure */ -+typedef struct _PVR2DMEMINFO -+{ -+ PVR2D_VOID *pBase; -+ PVR2D_ULONG ui32MemSize; -+ PVR2D_ULONG ui32DevAddr; -+ PVR2D_ULONG ulFlags; -+ PVR2D_VOID *hPrivateData; -+ PVR2D_VOID *hPrivateMapData; -+ -+}PVR2DMEMINFO, *PPVR2DMEMINFO; -+ -+ -+#define PVR2D_MAX_DEVICE_NAME 20 -+ -+typedef struct _PVR2DDEVICEINFO -+{ -+ PVR2D_ULONG ulDevID; -+ PVR2D_CHAR szDeviceName[PVR2D_MAX_DEVICE_NAME]; -+}PVR2DDEVICEINFO; -+ -+ -+typedef struct _PVR2DISPLAYINFO -+{ -+ PVR2D_ULONG ulMaxFlipChains; -+ PVR2D_ULONG ulMaxBuffersInChain; -+ PVR2DFORMAT eFormat; -+ PVR2D_ULONG ulWidth; -+ PVR2D_ULONG ulHeight; -+ PVR2D_LONG lStride; -+ PVR2D_ULONG ulMinFlipInterval; -+ PVR2D_ULONG ulMaxFlipInterval; -+ -+}PVR2DDISPLAYINFO; -+ -+ -+typedef struct _PVR2MISCDISPLAYINFO -+{ -+ PVR2D_ULONG ulPhysicalWidthmm; -+ PVR2D_ULONG ulPhysicalHeightmm; -+ PVR2D_ULONG ulUnused[10]; -+ -+}PVR2DMISCDISPLAYINFO; -+ -+ -+typedef struct _PVR2DBLTINFO -+{ -+ PVR2D_ULONG CopyCode; /* rop code */ -+ PVR2D_ULONG Colour; /* fill colour */ -+ PVR2D_ULONG ColourKey; /* colour key argb8888 (see CKEY_ defs below) */ -+ PVR2D_UCHAR GlobalAlphaValue; /* global alpha blending */ -+ PVR2D_UCHAR AlphaBlendingFunc; /* per-pixel alpha-blending function */ -+ -+ PVR2DBLITFLAGS BlitFlags; /* additional blit control information */ -+ -+ PVR2DMEMINFO *pDstMemInfo; /* destination memory */ -+ PVR2D_ULONG DstOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ -+ PVR2D_LONG DstStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ -+ PVR2D_LONG DstX, DstY; /* pixel offset from start of dest surface to start of blt rectangle */ -+ PVR2D_LONG DSizeX,DSizeY; /* blt size */ -+ PVR2DFORMAT DstFormat; /* dest format */ -+ PVR2D_ULONG DstSurfWidth; /* size of dest surface in pixels */ -+ PVR2D_ULONG DstSurfHeight; /* size of dest surface in pixels */ -+ -+ PVR2DMEMINFO *pSrcMemInfo; /* source mem, (source fields are also used for patterns) */ -+ PVR2D_ULONG SrcOffset; /* byte offset from start of allocation to src/pat surface pixel 0,0 */ -+ PVR2D_LONG SrcStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ -+ PVR2D_LONG SrcX, SrcY; /* pixel offset from start of surface to start of source rectangle */ -+ /* for patterns this is the start offset within the pattern */ -+ PVR2D_LONG SizeX,SizeY; /* source rectangle size or pattern size in pixels */ -+ PVR2DFORMAT SrcFormat; /* source/pattern format */ -+ PVR2DMEMINFO *pPalMemInfo; /* source/pattern palette memory containing argb8888 colour table */ -+ PVR2D_ULONG PalOffset; /* byte offset from start of allocation to start of palette */ -+ PVR2D_ULONG SrcSurfWidth; /* size of source surface in pixels */ -+ PVR2D_ULONG SrcSurfHeight; /* size of source surface in pixels */ -+ -+ PVR2DMEMINFO *pMaskMemInfo; /* mask memory, 1bpp format implied */ -+ PVR2D_ULONG MaskOffset; /* byte offset from start of allocation to mask surface pixel 0,0 */ -+ PVR2D_LONG MaskStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ -+ PVR2D_LONG MaskX, MaskY; /* mask rect top left (mask size = blt size) */ -+ PVR2D_ULONG MaskSurfWidth; /* size of mask surface in pixels */ -+ PVR2D_ULONG MaskSurfHeight; /* size of mask surface in pixels */ -+ -+ PPVR2D_ALPHABLT pAlpha; /* fully specified alpha blend (2DCore only) */ -+ -+ PVR2D_ULONG uSrcChromaPlane1; /* mem offset from start of source alloc to chroma plane 1 */ -+ PVR2D_ULONG uSrcChromaPlane2; /* mem offset from start of source alloc to chroma plane 2 */ -+ PVR2D_ULONG uDstChromaPlane1; /* mem offset from start of dest alloc to chroma plane 1 */ -+ PVR2D_ULONG uDstChromaPlane2; /* mem offset from start of dest alloc to chroma plane 2 */ -+ -+ PVR2D_ULONG ColourKeyMask; /* 32 bit colour key mask, only valid when PVR2D_BLIT_COLKEY_MASKED is set */ -+ -+}PVR2DBLTINFO, *PPVR2DBLTINFO; -+ -+typedef struct _PVR2DRECT -+{ -+ PVR2D_LONG left, top; -+ PVR2D_LONG right, bottom; -+} PVR2DRECT; -+ -+typedef struct -+{ -+ PVR2DMEMINFO *pSurfMemInfo; /* surface memory */ -+ PVR2D_ULONG SurfOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ -+ PVR2D_LONG Stride; /* signed stride */ -+ PVR2DFORMAT Format; /* format */ -+ PVR2D_ULONG SurfWidth; /* surface width in pixels */ -+ PVR2D_ULONG SurfHeight; /* surface height in pixels */ -+ -+} PVR2D_SURFACE, *PPVR2D_SURFACE; -+ -+typedef struct -+{ -+ PVR2D_ULONG uChromaPlane1; /* YUV multiplane - byte offset from start of alloc to chroma plane 1 */ -+ PVR2D_ULONG uChromaPlane2; /* YUV multiplane - byte offset from start of alloc to chroma plane 2 */ -+ PVR2D_LONG Reserved[2]; /* Reserved, must be zero */ -+ -+} PVR2D_SURFACE_EXT, *PPVR2D_SURFACE_EXT; -+ -+typedef struct -+{ -+ PVR2D_ULONG *pUseCode; /* USSE code */ -+ PVR2D_ULONG UseCodeSize; /* usse code size in bytes */ -+ -+} PVR2D_USECODE, *PPVR2D_USECODE; -+ -+typedef struct -+{ -+ PVR2D_SURFACE sDst; /* destination surface */ -+ PVR2D_SURFACE sSrc; /* source surface */ -+ PVR2DRECT rcDest; /* destination rectangle */ -+ PVR2DRECT rcSource; /* source rectangle */ -+ PVR2D_HANDLE hUseCode; /* custom USE code (NULL implies source copy) */ -+ PVR2D_ULONG UseParams[2]; /* per-blt params for use code */ -+ -+} PVR2D_3DBLT, *PPVR2D_3DBLT; -+ -+typedef struct -+{ -+ PVR2D_SURFACE sDst; /* destination surface */ -+ PVR2DRECT rcDest; /* destination rectangle; scaling is supported */ -+ PVR2D_SURFACE sSrc; /* source surface */ -+ PVR2DRECT rcSource; /* source rectangle; scaling is supported */ -+ PPVR2D_SURFACE pSrc2; /* optional second source surface (NULL if not required) */ -+ PVR2DRECT* prcSource2; /* optional pSrc2 rectangle */ -+ PVR2D_HANDLE hUseCode; /* custom USSE shader code (NULL implies default source copy) */ -+ PVR2D_ULONG UseParams[2]; /* per-blt params for usse code */ -+ PVR2D_ULONG uiNumTemporaryRegisters; /* no. of temporary registers used in custom shader code */ -+ PVR2D_BOOL bDisableDestInput; /* set true if the destination is output only */ -+ PPVR2D_SURFACE_EXT pDstExt; /* Extended format params for dest */ -+ PPVR2D_SURFACE_EXT pSrcExt[2]; /* Extended format params for source 1 and 2 */ -+ PVR2D_LONG Reserved[4]; /* Reserved, must be zero */ -+ -+} PVR2D_3DBLT_EXT, *PPVR2D_3DBLT_EXT; -+ -+ -+#define MAKE_COPY_BLIT(src,soff,dest,doff,sx,sy,dx,dy,sz) -+ -+typedef void* PVR2DCONTEXTHANDLE; -+typedef void* PVR2DFLIPCHAINHANDLE; -+ -+ -+// CopyCode field of PVR2DBLTINFO structure: -+// the CopyCode field of the PVR2DBLTINFO structure should contain a rop3 or rop4 code. -+// a rop3 is an 8 bit code that describes a blt with three inputs : source dest and pattern -+// rop4 is a 16 bit code that describes a blt with four inputs : source dest pattern and mask -+// common rop3 codes are defined below -+// a colour fill blt is processed in the pattern channel as a constant colour with a rop code of 0xF0 -+// PVR2D_BLIT_PAT_SURFACE_ENABLE defines whether the pattern channel is a surface or a fill colour. -+// a rop4 is defined by two rop3 codes, and the 1 bit-per-pixel mask surface defines which is used. -+// a common rop4 is 0xAAF0 which is the mask copy blt used for text glyphs. -+// CopyCode is taken to be a rop4 when pMaskMemInfo is non zero, otherwise it is assumed to be a rop3 -+// use the PVR2DMASKROP4 macro below to construct a rop4 from two rop3's -+// rop3a is the rop used when mask pixel = 1, and rop3b when mask = 0 -+#define PVR2DROP4(rop3b, rop3a) ((rop3b<<8)|rop3a) -+ -+/* common rop codes */ -+#define PVR2DROPclear 0x00 /* 0 (whiteness) */ -+#define PVR2DROPset 0xFF /* 1 (blackness) */ -+#define PVR2DROPnoop 0xAA /* dst (used for masked blts) */ -+ -+/* source and dest rop codes */ -+#define PVR2DROPand 0x88 /* src AND dst */ -+#define PVR2DROPandReverse 0x44 /* src AND NOT dst */ -+#define PVR2DROPcopy 0xCC /* src (used for source copy and alpha blts) */ -+#define PVR2DROPandInverted 0x22 /* NOT src AND dst */ -+#define PVR2DROPxor 0x66 /* src XOR dst */ -+#define PVR2DROPor 0xEE /* src OR dst */ -+#define PVR2DROPnor 0x11 /* NOT src AND NOT dst */ -+#define PVR2DROPequiv 0x99 /* NOT src XOR dst */ -+#define PVR2DROPinvert 0x55 /* NOT dst */ -+#define PVR2DROPorReverse 0xDD /* src OR NOT dst */ -+#define PVR2DROPcopyInverted 0x33 /* NOT src */ -+#define PVR2DROPorInverted 0xBB /* NOT src OR dst */ -+#define PVR2DROPnand 0x77 /* NOT src OR NOT dst */ -+ -+/* pattern rop codes */ -+#define PVR2DPATROPand 0xA0 /* pat AND dst */ -+#define PVR2DPATROPandReverse 0x50 /* pat AND NOT dst */ -+#define PVR2DPATROPcopy 0xF0 /* pat (used for solid color fills and pattern blts) */ -+#define PVR2DPATROPandInverted 0x0A /* NOT pat AND dst */ -+#define PVR2DPATROPxor 0x5A /* pat XOR dst */ -+#define PVR2DPATROPor 0xFA /* pat OR dst */ -+#define PVR2DPATROPnor 0x05 /* NOT pat AND NOT dst */ -+#define PVR2DPATROPequiv 0xA5 /* NOT pat XOR dst */ -+#define PVR2DPATROPinvert 0x55 /* NOT dst */ -+#define PVR2DPATROPorReverse 0xF5 /* pat OR NOT dst */ -+#define PVR2DPATROPcopyInverted 0x0F /* NOT pat */ -+#define PVR2DPATROPorInverted 0xAF /* NOT pat OR dst */ -+#define PVR2DPATROPnand 0x5F /* NOT pat OR NOT dst */ -+ -+/* common rop4 codes */ -+#define PVR2DROP4MaskedCopy PVR2DROP4(PVR2DROPnoop,PVR2DROPcopy) /* masked source copy blt (used for rounded window corners etc) */ -+#define PVR2DROP4MaskedFill PVR2DROP4(PVR2DROPnoop,PVR2DPATROPcopy) /* masked colour fill blt (used for text) */ -+ -+/* Legacy support */ -+#define PVR2DROP3_PATMASK PVR2DPATROPcopy -+#define PVR2DROP3_SRCMASK PVR2DROPcopy -+ -+/* pixmap memory alignment */ -+#define PVR2D_ALIGNMENT_4 4 /* DWORD alignment */ -+#define PVR2D_ALIGNMENT_ANY 0 /* no alignment */ -+#define PVR2D_ALIGNMENT_PALETTE 16 /* 16 byte alignment is required for palettes */ -+ -+/* Heap number for PVR2DGetFrameBuffer */ -+#define PVR2D_FB_PRIMARY_SURFACE 0 -+ -+#define PVR2D_PRESENT_PROPERTY_SRCSTRIDE (1UL << 0) -+#define PVR2D_PRESENT_PROPERTY_DSTSIZE (1UL << 1) -+#define PVR2D_PRESENT_PROPERTY_DSTPOS (1UL << 2) -+#define PVR2D_PRESENT_PROPERTY_CLIPRECTS (1UL << 3) -+#define PVR2D_PRESENT_PROPERTY_INTERVAL (1UL << 4) -+ -+#define PVR2D_CREATE_FLIPCHAIN_SHARED (1UL << 0) -+#define PVR2D_CREATE_FLIPCHAIN_QUERY (1UL << 1) -+#define PVR2D_CREATE_FLIPCHAIN_OEMOVERLAY (1UL << 2) -+#define PVR2D_CREATE_FLIPCHAIN_AS_BLITCHAIN (1UL << 3) -+ -+/* Colour-key colour must be translated into argb8888 format */ -+#define CKEY_8888(P) (P) -+#define CKEY_4444(P) (((P&0xF000UL)<<16) | ((P&0x0F00UL)<<12) | ((P&0x00F0UL)<<8) | ((P&0x000FUL)<<4)) -+#define CKEY_1555(P) (((P&0x8000UL)<<16) | ((P&0x7C00UL)<<9) | ((P&0x3E0UL)<<6) | ((P&0x1FUL)<<3)) -+#define CKEY_565(P) (((P&0xF800UL)<<8) | ((P&0x7E0UL)<<5) | ((P&0x1FUL)<<3)) -+#define CKEY_MASK_8888 0x00FFFFFFUL -+#define CKEY_MASK_4444 0x00F0F0F0UL -+#define CKEY_MASK_1555 0x00F8F8F8UL /* Alpha is not normally included in the key test */ -+#define CKEY_MASK_565 0x00F8FCF8UL -+ -+/* Fill colours must be translated into argb8888 format */ -+#define CFILL_4444(P) (((P&0xF000UL)<<16) | ((P&0x0F00UL)<<12) | ((P&0x00F0UL)<<8) | ((P&0x000FUL)<<4)) -+#define CFILL_1555(P) (((P&0x8000UL)<<16) | ((P&0x7C00UL)<<9) | ((P&0x3E0UL)<<6) | ((P&0x1FUL)<<3)) -+#define CFILL_565(P) (((P&0xF800UL)<<8) | ((P&0x7E0UL)<<5) | ((P&0x1FUL)<<3)) -+ -+/* PVR2DCreateDeviceContext flags */ -+#define PVR2D_XSERVER_PROC 0x00000001UL /*!< Set for the Xserver connection */ -+ -+/* PVR2DMemAlloc flags */ -+#define PVR2D_MEM_UNCACHED 0x00000000UL /* Default */ -+#define PVR2D_MEM_CACHED 0x00000001UL /* Caller must flush and sync when necessary */ -+#define PVR2D_MEM_WRITECOMBINE 0x00000002UL -+ -+/* Functions that the library exports */ -+ -+PVR2D_IMPORT -+int PVR2DEnumerateDevices(PVR2DDEVICEINFO *pDevInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DCreateDeviceContext(PVR2D_ULONG ulDevID, -+ PVR2DCONTEXTHANDLE* phContext, -+ PVR2D_ULONG ulFlags); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DDestroyDeviceContext(PVR2DCONTEXTHANDLE hContext); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DGetDeviceInfo(PVR2DCONTEXTHANDLE hContext, -+ PVR2DDISPLAYINFO *pDisplayInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DGetMiscDisplayInfo(PVR2DCONTEXTHANDLE hContext, -+ PVR2DMISCDISPLAYINFO *pMiscDisplayInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DGetScreenMode(PVR2DCONTEXTHANDLE hContext, -+ PVR2DFORMAT *pFormat, -+ PVR2D_LONG *plWidth, -+ PVR2D_LONG *plHeight, -+ PVR2D_LONG *plStride, -+ PVR2D_INT *piRefreshRate); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DGetFrameBuffer(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_INT nHeap, -+ PVR2DMEMINFO **ppsMemInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DMemAlloc(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_ULONG ulBytes, -+ PVR2D_ULONG ulAlign, -+ PVR2D_ULONG ulFlags, -+ PVR2DMEMINFO **ppsMemInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DMemExport(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_ULONG ulFlags, -+ PVR2DMEMINFO *psMemInfo, -+ PVR2D_HANDLE *phMemHandle); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DMemWrap(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_VOID *pMem, -+ PVR2D_ULONG ulFlags, -+ PVR2D_ULONG ulBytes, -+ PVR2D_ULONG alPageAddress[], -+ PVR2DMEMINFO **ppsMemInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DMemMap(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_ULONG ulFlags, -+ PVR2D_HANDLE hMemHandle, -+ PVR2DMEMINFO **ppsDstMem); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DMemFree(PVR2DCONTEXTHANDLE hContext, -+ PVR2DMEMINFO *psMemInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DBlt(PVR2DCONTEXTHANDLE hContext, -+ PVR2DBLTINFO *pBltInfo); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DBltClipped(PVR2DCONTEXTHANDLE hContext, -+ PVR2DBLTINFO *pBltInfo, -+ PVR2D_ULONG ulNumClipRects, -+ PVR2DRECT *pClipRects); -+ -+PVR2D_EXPORT -+PVR2DERROR PVR2DSet1555Alpha (PVR2DCONTEXTHANDLE hContext, -+ PVR2D_UCHAR Alpha0, PVR2D_UCHAR Alpha1); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DQueryBlitsComplete(PVR2DCONTEXTHANDLE hContext, -+ const PVR2DMEMINFO *pMemInfo, -+ PVR2D_UINT uiWaitForComplete); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DSetPresentBltProperties(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_ULONG ulPropertyMask, -+ PVR2D_LONG lSrcStride, -+ PVR2D_ULONG ulDstWidth, -+ PVR2D_ULONG ulDstHeight, -+ PVR2D_LONG lDstXPos, -+ PVR2D_LONG lDstYPos, -+ PVR2D_ULONG ulNumClipRects, -+ PVR2DRECT *pClipRects, -+ PVR2D_ULONG ulSwapInterval); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DPresentBlt(PVR2DCONTEXTHANDLE hContext, -+ PVR2DMEMINFO *pMemInfo, -+ PVR2D_LONG lRenderID); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DCreateFlipChain(PVR2DCONTEXTHANDLE hContext, -+ PVR2D_ULONG ulFlags, -+ PVR2D_ULONG ulNumBuffers, -+ PVR2D_ULONG ulWidth, -+ PVR2D_ULONG ulHeight, -+ PVR2DFORMAT eFormat, -+ PVR2D_LONG *plStride, -+ PVR2D_ULONG *pulFlipChainID, -+ PVR2DFLIPCHAINHANDLE *phFlipChain); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DDestroyFlipChain(PVR2DCONTEXTHANDLE hContext, -+ PVR2DFLIPCHAINHANDLE hFlipChain); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DGetFlipChainBuffers(PVR2DCONTEXTHANDLE hContext, -+ PVR2DFLIPCHAINHANDLE hFlipChain, -+ PVR2D_ULONG *pulNumBuffers, -+ PVR2DMEMINFO *psMemInfo[]); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DSetPresentFlipProperties(PVR2DCONTEXTHANDLE hContext, -+ PVR2DFLIPCHAINHANDLE hFlipChain, -+ PVR2D_ULONG ulPropertyMask, -+ PVR2D_LONG lDstXPos, -+ PVR2D_LONG lDstYPos, -+ PVR2D_ULONG ulNumClipRects, -+ PVR2DRECT *pClipRects, -+ PVR2D_ULONG ulSwapInterval); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DPresentFlip(PVR2DCONTEXTHANDLE hContext, -+ PVR2DFLIPCHAINHANDLE hFlipChain, -+ PVR2DMEMINFO *psMemInfo, -+ PVR2D_LONG lRenderID); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DGetAPIRev(PVR2D_LONG *lRevMajor, PVR2D_LONG *lRevMinor); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DLoadUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_UCHAR *pUseCode, -+ const PVR2D_ULONG UseCodeSize, PVR2D_HANDLE *pUseCodeHandle); -+PVR2D_IMPORT -+PVR2DERROR PVR2DFreeUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_HANDLE hUseCodeHandle); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DBlt3D (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT pBlt3D); -+ -+PVR2D_IMPORT -+PVR2DERROR PVR2DBlt3DExt (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT_EXT pBlt3D); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* _PVR2D_H_ */ -+ -+/****************************************************************************** -+ End of file (pvr2d.h) -+******************************************************************************/ -diff -Nurp qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/wsegl.h qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/wsegl.h ---- qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/wsegl.h 1970-01-01 00:00:00.000000000 +0000 -+++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/wsegl.h 2011-05-16 22:51:52.702601769 +0000 -@@ -0,0 +1,285 @@ -+/********************************************************************** -+* -+* Copyright(c) Imagination Technologies Ltd. -+* -+* The contents of this file are subject to the MIT license as set out below. -+* -+* Permission is hereby granted, free of charge, to any person obtaining a copy -+* of this software and associated documentation files (the "Software"), -+* to deal in the Software without restriction, including without limitation -+* the rights to use, copy, modify, merge, publish, distribute, sublicense, -+* and/or sell copies of the Software, and to permit persons to whom the -+* Software is furnished to do so, subject to the following conditions: -+* -+* The above copyright notice and this permission notice shall be included -+* in all copies or substantial portions of the Software. -+* -+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -+* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -+* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -+* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT -+* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -+* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+* -+* This License is also included in this distribution in the file called -+* "COPYING". -+* -+******************************************************************************/ -+ -+ -+ -+#if !defined(__WSEGL_H__) -+#define __WSEGL_H__ -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/* -+// WSEGL Platform-specific definitions -+*/ -+#if defined(__linux__) -+#define WSEGL_EXPORT __attribute__((visibility("default"))) -+#define WSEGL_IMPORT -+#else -+#define WSEGL_EXPORT -+#define WSEGL_IMPORT -+#endif -+ -+/* -+// WSEGL API Version Number -+*/ -+ -+#define WSEGL_VERSION 2 -+#define WSEGL_DEFAULT_DISPLAY 0 -+#define WSEGL_DEFAULT_NATIVE_ENGINE 0 -+ -+#define WSEGL_FALSE 0 -+#define WSEGL_TRUE 1 -+#define WSEGL_NULL 0 -+ -+#define WSEGL_UNREFERENCED_PARAMETER(param) (param) = (param) -+ -+/* -+// WSEGL handles -+*/ -+typedef void *WSEGLDisplayHandle; -+typedef void *WSEGLDrawableHandle; -+ -+/* -+// Display capability type -+*/ -+typedef enum WSEGLCapsType_TAG -+{ -+ WSEGL_NO_CAPS = 0, -+ WSEGL_CAP_MIN_SWAP_INTERVAL = 1, /* System default value = 1 */ -+ WSEGL_CAP_MAX_SWAP_INTERVAL = 2, /* System default value = 1 */ -+ WSEGL_CAP_WINDOWS_USE_HW_SYNC = 3, /* System default value = 0 (FALSE) */ -+ WSEGL_CAP_PIXMAPS_USE_HW_SYNC = 4, /* System default value = 0 (FALSE) */ -+ -+} WSEGLCapsType; -+ -+/* -+// Display capability -+*/ -+typedef struct WSEGLCaps_TAG -+{ -+ WSEGLCapsType eCapsType; -+ unsigned long ui32CapsValue; -+ -+} WSEGLCaps; -+ -+/* -+// Drawable type -+*/ -+#define WSEGL_NO_DRAWABLE 0x0 -+#define WSEGL_DRAWABLE_WINDOW 0x1 -+#define WSEGL_DRAWABLE_PIXMAP 0x2 -+ -+ -+/* -+// Pixel format of display/drawable -+*/ -+typedef enum WSEGLPixelFormat_TAG -+{ -+ /* These must not be re-ordered */ -+ WSEGL_PIXELFORMAT_RGB565 = 0, -+ WSEGL_PIXELFORMAT_ARGB4444 = 1, -+ WSEGL_PIXELFORMAT_ARGB8888 = 2, -+ WSEGL_PIXELFORMAT_ARGB1555 = 3, -+ WSEGL_PIXELFORMAT_ABGR8888 = 4, -+ WSEGL_PIXELFORMAT_XBGR8888 = 5, -+ -+ /* These are compatibility names only; new WSEGL -+ * modules should not use them. -+ */ -+ WSEGL_PIXELFORMAT_565 = WSEGL_PIXELFORMAT_RGB565, -+ WSEGL_PIXELFORMAT_4444 = WSEGL_PIXELFORMAT_ARGB4444, -+ WSEGL_PIXELFORMAT_8888 = WSEGL_PIXELFORMAT_ARGB8888, -+ WSEGL_PIXELFORMAT_1555 = WSEGL_PIXELFORMAT_ARGB1555, -+ -+} WSEGLPixelFormat; -+ -+/* -+// Transparent of display/drawable -+*/ -+typedef enum WSEGLTransparentType_TAG -+{ -+ WSEGL_OPAQUE = 0, -+ WSEGL_COLOR_KEY = 1, -+ -+} WSEGLTransparentType; -+ -+/* -+// Display/drawable configuration -+*/ -+typedef struct WSEGLConfig_TAG -+{ -+ /* -+ // Type of drawables this configuration applies to - -+ // OR'd values of drawable types. -+ */ -+ unsigned long ui32DrawableType; -+ -+ /* Pixel format */ -+ WSEGLPixelFormat ePixelFormat; -+ -+ /* Native Renderable - set to WSEGL_TRUE if native renderable */ -+ unsigned long ulNativeRenderable; -+ -+ /* FrameBuffer Level Parameter */ -+ unsigned long ulFrameBufferLevel; -+ -+ /* Native Visual ID */ -+ unsigned long ulNativeVisualID; -+ -+ /* Native Visual */ -+ void *hNativeVisual; -+ -+ /* Transparent Type */ -+ WSEGLTransparentType eTransparentType; -+ -+ /* Transparent Color - only used if transparent type is COLOR_KEY */ -+ unsigned long ulTransparentColor; /* packed as 0x00RRGGBB */ -+ -+ -+} WSEGLConfig; -+ -+/* -+// WSEGL errors -+*/ -+typedef enum WSEGLError_TAG -+{ -+ WSEGL_SUCCESS = 0, -+ WSEGL_CANNOT_INITIALISE = 1, -+ WSEGL_BAD_NATIVE_DISPLAY = 2, -+ WSEGL_BAD_NATIVE_WINDOW = 3, -+ WSEGL_BAD_NATIVE_PIXMAP = 4, -+ WSEGL_BAD_NATIVE_ENGINE = 5, -+ WSEGL_BAD_DRAWABLE = 6, -+ WSEGL_BAD_MATCH = 7, -+ WSEGL_OUT_OF_MEMORY = 8, -+ -+ /* These are compatibility names only; new WSEGL -+ * modules should not use them. -+ */ -+ WSEGL_BAD_CONFIG = WSEGL_BAD_MATCH, -+ -+} WSEGLError; -+ -+/* -+// Drawable orientation (in degrees anti-clockwise) -+*/ -+typedef enum WSEGLRotationAngle_TAG -+{ -+ WSEGL_ROTATE_0 = 0, -+ WSEGL_ROTATE_90 = 1, -+ WSEGL_ROTATE_180 = 2, -+ WSEGL_ROTATE_270 = 3 -+ -+} WSEGLRotationAngle; -+ -+/* -+// Drawable information required by OpenGL-ES driver -+*/ -+typedef struct WSEGLDrawableParams_TAG -+{ -+ /* Width in pixels of the drawable */ -+ unsigned long ui32Width; -+ -+ /* Height in pixels of the drawable */ -+ unsigned long ui32Height; -+ -+ /* Stride in pixels of the drawable */ -+ unsigned long ui32Stride; -+ -+ /* Pixel format of the drawable */ -+ WSEGLPixelFormat ePixelFormat; -+ -+ /* User space cpu virtual address of the drawable */ -+ void *pvLinearAddress; -+ -+ /* HW address of the drawable */ -+ unsigned long ui32HWAddress; -+ -+ /* Private data for the drawable */ -+ void *hPrivateData; -+ -+ -+} WSEGLDrawableParams; -+ -+ -+/* -+// Table of function pointers that is returned by WSEGL_GetFunctionTablePointer() -+// -+// The first entry in the table is the version number of the wsegl.h header file that -+// the module has been written against, and should therefore be set to WSEGL_VERSION -+*/ -+typedef struct WSEGL_FunctionTable_TAG -+{ -+ unsigned long ui32WSEGLVersion; -+ -+ WSEGLError (*pfnWSEGL_IsDisplayValid)(NativeDisplayType); -+ -+ WSEGLError (*pfnWSEGL_InitialiseDisplay)(NativeDisplayType, WSEGLDisplayHandle *, const WSEGLCaps **, WSEGLConfig **); -+ -+ WSEGLError (*pfnWSEGL_CloseDisplay)(WSEGLDisplayHandle); -+ -+ WSEGLError (*pfnWSEGL_CreateWindowDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativeWindowType, WSEGLRotationAngle *); -+ -+ WSEGLError (*pfnWSEGL_CreatePixmapDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativePixmapType, WSEGLRotationAngle *); -+ -+ WSEGLError (*pfnWSEGL_DeleteDrawable)(WSEGLDrawableHandle); -+ -+ WSEGLError (*pfnWSEGL_SwapDrawable)(WSEGLDrawableHandle, unsigned long); -+ -+ WSEGLError (*pfnWSEGL_SwapControlInterval)(WSEGLDrawableHandle, unsigned long); -+ -+ WSEGLError (*pfnWSEGL_WaitNative)(WSEGLDrawableHandle, unsigned long); -+ -+ WSEGLError (*pfnWSEGL_CopyFromDrawable)(WSEGLDrawableHandle, NativePixmapType); -+ -+ WSEGLError (*pfnWSEGL_CopyFromPBuffer)(void *, unsigned long, unsigned long, unsigned long, WSEGLPixelFormat, NativePixmapType); -+ -+ WSEGLError (*pfnWSEGL_GetDrawableParameters)(WSEGLDrawableHandle, WSEGLDrawableParams *, WSEGLDrawableParams *); -+ -+ WSEGLError (*pfnWSEGL_ConnectDrawable)(WSEGLDrawableHandle); -+ -+ WSEGLError (*pfnWSEGL_DisconnectDrawable)(WSEGLDrawableHandle); -+ -+ -+} WSEGL_FunctionTable; -+ -+ -+WSEGL_IMPORT const WSEGL_FunctionTable *WSEGL_GetFunctionTablePointer(void); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* __WSEGL_H__ */ -+ -+/****************************************************************************** -+ End of file (wsegl.h) -+******************************************************************************/ -diff -Nurp qt-everywhere-opensource-src-4.6.3-orig//src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c qt-everywhere-opensource-src-4.6.3/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c ---- qt-everywhere-opensource-src-4.6.3-orig//src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2010-06-02 02:03:17.000000000 +0000 -+++ qt-everywhere-opensource-src-4.6.3/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2011-05-16 23:08:51.618597097 +0000 -@@ -378,6 +378,20 @@ static WSEGLError wseglGetDrawableParame - return WSEGL_SUCCESS; - } - -+/* Function stub for ConnectDrawable() */ -+static WSEGLError wseglConnectDrawable(WSEGLDrawableHandle hDrawable) -+{ -+ WSEGL_UNREFERENCED_PARAMETER(hDrawable); -+ return WSEGL_SUCCESS; -+} -+ -+/* Function stub for DisconnectDrawable() */ -+static WSEGLError wseglDisconnectDrawable(WSEGLDrawableHandle hDrawable) -+{ -+ WSEGL_UNREFERENCED_PARAMETER(hDrawable); -+ return WSEGL_SUCCESS; -+} -+ - static WSEGL_FunctionTable const wseglFunctions = { - WSEGL_VERSION, - wseglIsDisplayValid, -@@ -391,7 +405,9 @@ static WSEGL_FunctionTable const wseglFu - wseglWaitNative, - wseglCopyFromDrawable, - wseglCopyFromPBuffer, -- wseglGetDrawableParameters -+ wseglGetDrawableParameters, -+ wseglConnectDrawable, -+ wseglDisconnectDrawable - }; - - /* Return the table of WSEGL functions to the EGL implementation */ diff --git a/recipes/qt4/files/blacklist-fraudulent-comodo-certificates-patch.diff b/recipes/qt4/files/blacklist-fraudulent-comodo-certificates-patch.diff deleted file mode 100644 index 00faf75932..0000000000 --- a/recipes/qt4/files/blacklist-fraudulent-comodo-certificates-patch.diff +++ /dev/null @@ -1,134 +0,0 @@ -Security advisory: Fraudulent certificates - -Background: - -Recently a group of people managed to get fraudulent SSL certificates signed -by a Certificate Authority (CA). - -These certificates potentially enable their owners to pretend to be other -entities on the Web; the attackers can present valid certificates for e.g. -mail.google.com, login.yahoo.com and login.live.com, among others. - -The patch below solves this problem by blacklisting those fake certificates -and aborting an SSL handshake with entities that present these certificates. -The patch applies to all 4.6 and 4.7 versions, and should be applied to all Qt -4.6.x and 4.7.x versions; upcoming Qt releases will contain a fix for this -problem. - -More technical background: - -In order to trick a user into establishing an SSL connection to a site using -one of those fake certificates, in addition to controlling the certificate, an -attacker would need to either control the DNS server used by the victim, or -have control over a proxy that the victim uses. That way, the attacker could -trick the victim to connect to the attacker?s site and then present the user -with a valid certificate. - -One obvious question now is: Should those certificates not just be revoked, -which would solve the problem? - -First, they have been revoked by the affected Certificate Authority (see above -link). - -However, the problem in this case, and probably part of the reason why most -browser vendors release new versions blacklisting those certificates, is that -by default browsers do not treat invalid responses from an OCSP server (a -server used for checking the revocation status of a certificate) as fatal, and -will allow the SSL connection to proceed anyway. Qt itself does not support -OCSP yet, which makes blacklisting the certificates the only valid option (now -would be a good moment to vote on the task for implementing OCSP in Qt); since -Qt is relying on the system root certificates since version 4.7, it cannot -control the root certificates that Qt trusts automatically anymore. - -http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html -http://qt.nokia.com/files/qt-patches/blacklist-fraudulent-comodo-certificates-patch.diff/view - -diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp -index 618ac79..a5cdf01 100644 ---- a/src/network/ssl/qsslcertificate.cpp -+++ b/src/network/ssl/qsslcertificate.cpp -@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const - Returns true if this certificate is valid; otherwise returns - false. - -- Note: Currently, this function only checks that the current -+ Note: Currently, this function checks that the current - data-time is within the date-time range during which the -- certificate is considered valid. No other checks are -- currently performed. -+ certificate is considered valid, and checks that the -+ certificate is not in a blacklist of fraudulent certificates. - - \sa isNull() - */ - bool QSslCertificate::isValid() const - { - const QDateTime currentTime = QDateTime::currentDateTime(); -- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter; -+ return currentTime >= d->notValidBefore && -+ currentTime <= d->notValidAfter && -+ ! QSslCertificatePrivate::isBlacklisted(*this); - } - - /*! -@@ -798,6 +800,30 @@ QList QSslCertificatePrivate::certificatesFromDer(const QByteAr - return certificates; - } - -+// These certificates are known to be fraudulent and were created during the comodo -+// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html -+static const char *certificate_blacklist[] = { -+ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e", -+ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06", -+ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3", -+ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29", -+ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71", -+ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47", -+ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43", -+ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0", -+ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0", -+ 0 -+}; -+ -+bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate) -+{ -+ for (int a = 0; certificate_blacklist[a] != 0; a++) { -+ if (certificate.serialNumber() == certificate_blacklist[a]) -+ return true; -+ } -+ return false; -+} -+ - #ifndef QT_NO_DEBUG_STREAM - QDebug operator<<(QDebug debug, const QSslCertificate &certificate) - { -diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h -index cdceb0f..1ce33d3 100644 ---- a/src/network/ssl/qsslcertificate_p.h -+++ b/src/network/ssl/qsslcertificate_p.h -@@ -96,6 +96,7 @@ public: - static QSslCertificate QSslCertificate_from_X509(X509 *x509); - static QList certificatesFromPem(const QByteArray &pem, int count = -1); - static QList certificatesFromDer(const QByteArray &der, int count = -1); -+ static bool isBlacklisted(const QSslCertificate &certificate); - - friend class QSslSocketBackendPrivate; - -diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp -index 0866534..2427193 100644 ---- a/src/network/ssl/qsslsocket_openssl.cpp -+++ b/src/network/ssl/qsslsocket_openssl.cpp -@@ -1193,6 +1193,13 @@ bool QSslSocketBackendPrivate::startHandshake() - X509 *x509 = q_SSL_get_peer_certificate(ssl); - configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509); - q_X509_free(x509); -+ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) { -+ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted")); -+ q->setSocketError(QAbstractSocket::SslHandshakeFailedError); -+ emit q->error(QAbstractSocket::SslHandshakeFailedError); -+ plainSocket->disconnectFromHost(); -+ return false; -+ } - - // Start translating errors. - QList errors; diff --git a/recipes/qt4/files/compile.test-lflags.patch b/recipes/qt4/files/compile.test-lflags.patch deleted file mode 100644 index e4b256b0ce..0000000000 --- a/recipes/qt4/files/compile.test-lflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: qt-everywhere-opensource-src-4.6.3/config.tests/unix/compile.test -=================================================================== ---- qt-everywhere-opensource-src-4.6.3.orig/config.tests/unix/compile.test 2010-06-02 06:03:18.000000000 +0400 -+++ qt-everywhere-opensource-src-4.6.3/config.tests/unix/compile.test 2010-10-04 17:35:07.587783460 +0400 -@@ -11,7 +11,7 @@ - EXE=`basename "$6"` - DESCRIPTION=$7 - shift 7 --LFLAGS="" -+LFLAGS="$LDFLAGS" - INCLUDEPATH="" - CXXFLAGS="" - MAC_ARCH_CXXFLAGS="" diff --git a/recipes/qt4/files/palmpre/qte.sh b/recipes/qt4/files/palmpre/qte.sh deleted file mode 100644 index bb8dfae6c2..0000000000 --- a/recipes/qt4/files/palmpre/qte.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -e /dev/input/touchscreen0 ] -then - QWS_MOUSE_PROTO=LinuxInput:/dev/input/touchscreen0 - export QWS_MOUSE_PROTO -fi diff --git a/recipes/qt4/files/qte.sh b/recipes/qt4/files/qte.sh deleted file mode 100644 index 21d6ecbd6a..0000000000 --- a/recipes/qt4/files/qte.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -if [ -e /dev/input/touchscreen0 ] -then - QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0 - export QWS_MOUSE_PROTO -fi diff --git a/recipes/qt4/qt-4.6.0.inc b/recipes/qt4/qt-4.6.0.inc new file mode 100644 index 0000000000..91565f7e0e --- /dev/null +++ b/recipes/qt4/qt-4.6.0.inc @@ -0,0 +1,77 @@ +DEFAULT_PREFERENCE = "-1" + +FILESPATHPKG .= ":qt-${PV}" + +SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ + file://0001-cross-compile.patch;patch=1 \ + file://0002-fix-resinit-declaration.patch;patch=1 \ + file://0004-no-qmake.patch;patch=1 \ + file://0006-freetype-host-includes.patch;patch=1 \ + file://0008-qt-lib-infix.patch;patch=1 \ + file://0009-support-2bpp.patch;patch=1 \ + file://0010-no-simpledecoration-example.patch;patch=1 \ + file://fix-config-tests.patch;patch=1 \ + file://g++.conf \ + file://linux.conf \ + " + +# Patches for '4.6' qt branch +SRC_URI += "\ + file://0860-Added-caching-of-vectorpaths-to-the-GL-paint-engine.patch;patch=1 \ + file://0917-Better-check-for-EGL-extension-strings.patch;patch=1 \ + file://0919-Rebind-window-surface-fbo-after-native-GL-rendering.patch;patch=1 \ + file://0943-Fixed-OpenGL-graphicssystem-issues-for-OpenGL-ES-2.0.patch;patch=1 \ + file://0945-Add-EGL_BUFFER_SIZE-to-QEglProperties-reduceConfigur.patch;patch=1 \ + file://0946-Fix-WA_TranslucentBackground-for-QGLWidgets-on-X11-E.patch;patch=1 \ + file://0947-Compressed-texture-binding-for-QtOpenGL-ETC1-and-PVR.patch;patch=1 \ + file://0951-Detect-GL2-paint-engine-based-on-fragment-shaders-no.patch;patch=1 \ + file://0971-Fix-GL_BGRA-formats-under-OpenGL-ES-systems.patch;patch=1 \ + file://0991-QGtkStyle-support-for-the-inner-border-property-in-G.patch;patch=1 \ + file://0992-Make-sure-a-context-is-current-when-loading-compress.patch;patch=1 \ + file://0993-Fix-upside-down-PVR-compressed-textures.patch;patch=1 \ + file://0996-Export-QGLShareRegister-because-qgl_share_reg-is-exp.patch;patch=1 \ + file://0998-Set-stacking-class-for-stays-on-top-windows-in-DFB.patch;patch=1 \ + file://0999-Enable-customizing-of-DirectFB-layer-to-use.patch;patch=1 \ + file://1008-GLES-2-should-not-use-a-multisampled-format-by-defau.patch;patch=1 \ + file://1115-Fix-QGLWidgets-created-with-an-alpha-channel-on-X11-.patch;patch=1 \ + file://1118-Fix-EGL-surface-leaks-when-re-parenting-QGLWidget-on.patch;patch=1 \ + file://1136-Disable-depth-testing-during-the-2D-QGLWidget-render.patch;patch=1 \ + file://1149-GL2Engine-Don-t-mark-brush-as-dirty-if-it-hasn-t-cha.patch;patch=1 \ + file://1157-Align-GL_RGB-lines-on-a-4-byte-boundary-when-uploadi.patch;patch=1 \ +# file://1165-NEON-configure-detection-and-initial-blend-function-.patch;patch=1 \ + file://1175-Fix-memory-leak-of-QGLGlyphCoord-objects-in-the-Open.patch;patch=1 \ + file://1197-Add-GLfloat-2-2-GLfloat-3-3-uniform-setters-to-QGLSh.patch;patch=1 \ + file://1198-Handle-broken-shaders-better-in-the-GL2-engine-s-sha.patch;patch=1 \ + file://1205-Fix-text-rendering-on-GL2-paint-engine.patch;patch=1 \ +" + +S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" + +do_configure_prepend() { + sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf + sed -i \ + -e /QMAKE_MOC\ /d \ + -e /QMAKE_UIC\ /d \ + -e /QMAKE_UIC3\ /d \ + -e /QMAKE_RCC\ /d \ + ${S}/configure +} + +QT_GLFLAGS ?= "" +QT_CONFIG_FLAGS += "${QT_GLFLAGS}" + +do_compile() { + unset CFLAGS CXXFLAGS + oe_runmake ${EXTRA_ENV} +} + +do_install_append() { + install -d ${D}${bindir} + for i in rcc uic moc ; do + install -m 0755 ${S}/bin/$i ${D}${bindir}/ + done +} + +LICENSE = "LGPLv2.1 GPLv3" +SRC_URI += " \ + file://hack-out-pg_config.patch;patch=1" diff --git a/recipes/qt4/qt-4.6.0/0838-Fixed-the-GL2-engine-stroker-to-handle-Qt-SvgMiterJo.patch b/recipes/qt4/qt-4.6.0/0838-Fixed-the-GL2-engine-stroker-to-handle-Qt-SvgMiterJo.patch new file mode 100644 index 0000000000..a517d3ce41 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0838-Fixed-the-GL2-engine-stroker-to-handle-Qt-SvgMiterJo.patch @@ -0,0 +1,25 @@ +From 0f61a0f1ce02bb0248cb87055240a8a474dce452 Mon Sep 17 00:00:00 2001 +From: Kim Motoyoshi Kalland +Date: Fri, 27 Nov 2009 16:17:25 +0100 +Subject: [PATCH 0838/1244] Fixed the GL2 engine stroker to handle Qt::SvgMiterJoin. + +Reviewed-by: Trond +--- + .../gl2paintengineex/qtriangulatingstroker.cpp | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +index c78f73f..6082f49 100644 +--- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp ++++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +@@ -313,6 +313,7 @@ void QTriangulatingStroker::join(const qreal *pts) + switch (m_join_style) { + case Qt::BevelJoin: + break; ++ case Qt::SvgMiterJoin: + case Qt::MiterJoin: { + // Find out on which side the join should be. + int count = m_vertices.size(); +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0860-Added-caching-of-vectorpaths-to-the-GL-paint-engine.patch b/recipes/qt4/qt-4.6.0/0860-Added-caching-of-vectorpaths-to-the-GL-paint-engine.patch new file mode 100644 index 0000000000..794380ab91 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0860-Added-caching-of-vectorpaths-to-the-GL-paint-engine.patch @@ -0,0 +1,317 @@ +From dbfdfdb1bc37dd18dd1b723b5d5b0b65c37f3f41 Mon Sep 17 00:00:00 2001 +From: Gunnar Sletta +Date: Tue, 1 Dec 2009 09:18:47 +0100 +Subject: [PATCH 0860/1244] Added caching of vectorpaths to the GL paint engine. + +The first time a path is drawn we call makeCachable on the path, which +means that if it is drawn again, we start caching it. This is a bit of +a trick to avoid caching paths that are drawn once and discared while +at the same time cache paths that are reused automatically. + +The GL engine owns the vertex information and is responsible for cleaning +it up. If the vectorpath is destroyed first, it will call the cleanup function. +if the engine dies first, we still require some hooks to clean up the cache +in the path. More to come. When VBO's are used, these will be a leaked if the +path is destroyed after the engine. + +Reviewed-by: Samuel +--- + src/gui/painting/qpaintengineex.cpp | 16 +++- + src/gui/painting/qvectorpath_p.h | 13 ++- + src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h | 2 + + .../gl2paintengineex/qpaintengineex_opengl2.cpp | 115 +++++++++++++++++++- + .../gl2paintengineex/qpaintengineex_opengl2_p.h | 4 + + 5 files changed, 139 insertions(+), 11 deletions(-) + +diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp +index 7d1c109..9a0e319 100644 +--- a/src/gui/painting/qpaintengineex.cpp ++++ b/src/gui/painting/qpaintengineex.cpp +@@ -56,6 +56,20 @@ QT_BEGIN_NAMESPACE + * class QVectorPath + * + */ ++QVectorPath::~QVectorPath() ++{ ++ if (m_hints & ShouldUseCacheHint) { ++ CacheEntry *e = m_cache; ++ while (e) { ++ if (e->data) ++ e->cleanup(e->engine, e->data); ++ CacheEntry *n = e->next; ++ delete e; ++ e = n; ++ } ++ } ++} ++ + + QRectF QVectorPath::controlPointRect() const + { +@@ -94,7 +108,7 @@ QRectF QVectorPath::controlPointRect() const + + + QVectorPath::CacheEntry *QVectorPath::addCacheData(QPaintEngineEx *engine, void *data, +- qvectorpath_cache_cleanup cleanup) { ++ qvectorpath_cache_cleanup cleanup) const{ + Q_ASSERT(!lookupCacheData(engine)); + if ((m_hints & IsCachedHint) == 0) { + m_cache = 0; +diff --git a/src/gui/painting/qvectorpath_p.h b/src/gui/painting/qvectorpath_p.h +index ec27970..5eaddf4 100644 +--- a/src/gui/painting/qvectorpath_p.h ++++ b/src/gui/painting/qvectorpath_p.h +@@ -68,7 +68,7 @@ QT_MODULE(Gui) + + class QPaintEngineEx; + +-typedef void (*qvectorpath_cache_cleanup)(void *data); ++typedef void (*qvectorpath_cache_cleanup)(QPaintEngineEx *engine, void *data); + + struct QRealRect { + qreal x1, y1, x2, y2; +@@ -118,6 +118,8 @@ public: + { + } + ++ ~QVectorPath(); ++ + QRectF controlPointRect() const; + + inline Hint shape() const { return (Hint) (m_hints & ShapeMask); } +@@ -128,6 +130,7 @@ public: + inline bool hasImplicitClose() const { return m_hints & ImplicitClose; } + inline bool hasWindingFill() const { return m_hints & WindingFill; } + ++ inline void makeCacheable() const { m_hints |= ShouldUseCacheHint; m_cache = 0; } + inline uint hints() const { return m_hints; } + + inline const QPainterPath::ElementType *elements() const { return m_elements; } +@@ -146,9 +149,9 @@ public: + CacheEntry *next; + }; + +- CacheEntry *addCacheData(QPaintEngineEx *engine, void *data, qvectorpath_cache_cleanup cleanup); ++ CacheEntry *addCacheData(QPaintEngineEx *engine, void *data, qvectorpath_cache_cleanup cleanup) const; + inline CacheEntry *lookupCacheData(QPaintEngineEx *engine) const { +- Q_ASSERT(m_hints & IsCachedHint); ++ Q_ASSERT(m_hints & ShouldUseCacheHint); + CacheEntry *e = m_cache; + while (e) { + if (e->engine == engine) +@@ -162,14 +165,14 @@ public: + private: + Q_DISABLE_COPY(QVectorPath) + +- CacheEntry *m_cache; +- + const QPainterPath::ElementType *m_elements; + const qreal *m_points; + const int m_count; + + mutable uint m_hints; + mutable QRealRect m_cp_rect; ++ ++ mutable CacheEntry *m_cache; + }; + + Q_GUI_EXPORT const QVectorPath &qtVectorPathForPath(const QPainterPath &path); +diff --git a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +index 03aec17..98eaa91 100644 +--- a/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h ++++ b/src/opengl/gl2paintengineex/qgl2pexvertexarray_p.h +@@ -112,6 +112,8 @@ public: + int stopCount() const { return vertexArrayStops.size(); } + QGLRect boundingRect() const; + ++ int vertexCount() const { return vertexArray.size(); } ++ + void lineToArray(const GLfloat x, const GLfloat y); + + private: +diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +index 6a708b4..3fce384 100644 +--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp ++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +@@ -62,6 +62,8 @@ + and use the correct program when we really need it. + */ + ++// #define QT_OPENGL_CACHE_AS_VBOS ++ + #include "qpaintengineex_opengl2_p.h" + + #include //for memcpy +@@ -344,6 +346,13 @@ extern QImage qt_imageForBrush(int brushStyle, bool invert); + QGL2PaintEngineExPrivate::~QGL2PaintEngineExPrivate() + { + delete shaderManager; ++ ++ while (pathCaches.size()) { ++ QVectorPath::CacheEntry *e = *(pathCaches.constBegin()); ++ e->cleanup(e->engine, e->data); ++ e->data = 0; ++ e->engine = 0; ++ } + } + + void QGL2PaintEngineExPrivate::updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id) +@@ -846,6 +855,30 @@ void QGL2PaintEngineExPrivate::transferMode(EngineMode newMode) + mode = newMode; + } + ++struct QGL2PEVectorPathCache ++{ ++#ifdef QT_OPENGL_CACHE_AS_VBOS ++ GLuint vbo; ++#else ++ float *vertices; ++#endif ++ int vertexCount; ++ GLenum primitiveType; ++ qreal iscale; ++}; ++ ++void qopengl2paintengine_cleanup_vectorpath(QPaintEngineEx *engine, void *data) ++{ ++ QGL2PEVectorPathCache *c = (QGL2PEVectorPathCache *) data; ++#ifdef QT_OPENGL_CACHE_AS_VBOS ++ QGL2PaintEngineExPrivate *d = QGL2PaintEngineExPrivate::getData((QGL2PaintEngineEx *) engine); ++ d->unusedVBOSToClean << c->vbo; ++#else ++ qFree(c->vertices); ++#endif ++ delete c; ++} ++ + // Assumes everything is configured for the brush you want to use + void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) + { +@@ -863,10 +896,74 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) + prepareForDraw(currentBrush->isOpaque()); + composite(rect); + } else if (path.isConvex()) { +- vertexCoordinateArray.clear(); +- vertexCoordinateArray.addPath(path, inverseScale, false); +- prepareForDraw(currentBrush->isOpaque()); +- drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); ++ ++ if (path.isCacheable()) { ++ QVectorPath::CacheEntry *data = path.lookupCacheData(q); ++ QGL2PEVectorPathCache *cache; ++ ++ if (data) { ++ cache = (QGL2PEVectorPathCache *) data->data; ++ // Check if scale factor is exceeded for curved paths and generate curves if so... ++ if (path.isCurved()) { ++ qreal scaleFactor = cache->iscale / inverseScale; ++ if (scaleFactor < 0.5 || scaleFactor > 2.0) { ++#ifdef QT_OPENGL_CACHE_AS_VBOS ++ glDeleteBuffers(1, &cache->vbo); ++ cache->vbo = 0; ++#else ++ qFree(cache->vertices); ++#endif ++ cache->vertexCount = 0; ++ } ++ } ++ } else { ++ cache = new QGL2PEVectorPathCache; ++ cache->vertexCount = 0; ++ data = const_cast(path).addCacheData(q, cache, qopengl2paintengine_cleanup_vectorpath); ++ } ++ ++ // Flatten the path at the current scale factor and fill it into the cache struct. ++ if (!cache->vertexCount) { ++ vertexCoordinateArray.clear(); ++ vertexCoordinateArray.addPath(path, inverseScale, false); ++ int vertexCount = vertexCoordinateArray.vertexCount(); ++ int floatSizeInBytes = vertexCount * 2 * sizeof(float); ++ cache->vertexCount = vertexCount; ++ cache->primitiveType = GL_TRIANGLE_FAN; ++ cache->iscale = inverseScale; ++#ifdef QT_OPENGL_CACHE_AS_VBOS ++ glGenBuffers(1, &cache->vbo); ++ glBindBuffer(GL_ARRAY_BUFFER, cache->vbo); ++ glBufferData(GL_ARRAY_BUFFER, floatSizeInBytes, vertexCoordinateArray.data(), GL_STATIC_DRAW); ++#else ++ cache->vertices = (float *) qMalloc(floatSizeInBytes); ++ memcpy(cache->vertices, vertexCoordinateArray.data(), floatSizeInBytes); ++#endif ++ } ++ ++ prepareForDraw(currentBrush->isOpaque()); ++ glEnableVertexAttribArray(QT_VERTEX_COORDS_ATTR); ++#ifdef QT_OPENGL_CACHE_AS_VBOS ++ glBindBuffer(GL_ARRAY_BUFFER, cache->vbo); ++ glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT, false, 0, 0); ++#else ++ glVertexAttribPointer(QT_VERTEX_COORDS_ATTR, 2, GL_FLOAT, false, 0, cache->vertices); ++#endif ++ glDrawArrays(cache->primitiveType, 0, cache->vertexCount); ++ ++ } else { ++ // printf(" - Marking path as cachable...\n"); ++ // Tag it for later so that if the same path is drawn twice, it is assumed to be static and thus cachable ++ // ### Remove before release... ++ static bool do_vectorpath_cache = qgetenv("QT_OPENGL_NO_PATH_CACHE").isEmpty(); ++ if (do_vectorpath_cache) ++ path.makeCacheable(); ++ vertexCoordinateArray.clear(); ++ vertexCoordinateArray.addPath(path, inverseScale, false); ++ prepareForDraw(currentBrush->isOpaque()); ++ drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); ++ } ++ + } else { + // The path is too complicated & needs the stencil technique + vertexCoordinateArray.clear(); +@@ -1756,7 +1853,8 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) + d->device->beginPaint(); + + #if !defined(QT_OPENGL_ES_2) +- bool success = qt_resolve_version_2_0_functions(d->ctx); ++ bool success = qt_resolve_version_2_0_functions(d->ctx) ++ && qt_resolve_buffer_extensions(d->ctx); + Q_ASSERT(success); + Q_UNUSED(success); + #endif +@@ -1817,6 +1915,13 @@ bool QGL2PaintEngineEx::end() + delete d->shaderManager; + d->shaderManager = 0; + ++#ifdef QT_OPENGL_CACHE_AS_VBOS ++ if (!d->unusedVBOSToClean.isEmpty()) { ++ glDeleteBuffers(d->unusedVBOSToClean.size(), d->unusedVBOSToClean.constData()); ++ d->unusedVBOSToClean.clear(); ++ } ++#endif ++ + return false; + } + +diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +index b554f6d..0084476 100644 +--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h ++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +@@ -221,6 +221,7 @@ public: + void restoreDepthRangeForRenderText(); + + static QGLEngineShaderManager* shaderManagerForEngine(QGL2PaintEngineEx *engine) { return engine->d_func()->shaderManager; } ++ static QGL2PaintEngineExPrivate *getData(QGL2PaintEngineEx *engine) { return engine->d_func(); } + + QGL2PaintEngineEx* q; + QGLPaintDevice* device; +@@ -294,6 +295,9 @@ public: + QScopedPointer fastBlurFilter; + QScopedPointer dropShadowFilter; + QScopedPointer fastDropShadowFilter; ++ ++ QSet pathCaches; ++ QVector unusedVBOSToClean; + }; + + QT_END_NAMESPACE +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0917-Better-check-for-EGL-extension-strings.patch b/recipes/qt4/qt-4.6.0/0917-Better-check-for-EGL-extension-strings.patch new file mode 100644 index 0000000000..9febe7553e --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0917-Better-check-for-EGL-extension-strings.patch @@ -0,0 +1,34 @@ +From 108ab335537d20bc74aa9115d46cf91243223c4e Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Fri, 4 Dec 2009 17:03:41 +1000 +Subject: [PATCH 0917/1244] Better check for EGL extension strings + +The previous code might have failed if the desired extension name +was a prefix of another name: "EGL_foo" member of "EGL_foo_bar". +This change introduces a more precise check. + +Task-number: QTBUG-6454 +Reviewed-by: Sarah Smith +--- + src/gui/egl/qegl.cpp | 5 ++++- + 1 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp +index cf28dc4..6ee4bfc 100644 +--- a/src/gui/egl/qegl.cpp ++++ b/src/gui/egl/qegl.cpp +@@ -429,7 +429,10 @@ QString QEglContext::extensions() + + bool QEglContext::hasExtension(const char* extensionName) + { +- return extensions().contains(QLatin1String(extensionName)); ++ QList extensions = ++ QByteArray(reinterpret_cast ++ (eglQueryString(QEglContext::defaultDisplay(0), EGL_EXTENSIONS))).split(' '); ++ return extensions.contains(extensionName); + } + + QEglContext *QEglContext::currentContext(QEgl::API api) +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0919-Rebind-window-surface-fbo-after-native-GL-rendering.patch b/recipes/qt4/qt-4.6.0/0919-Rebind-window-surface-fbo-after-native-GL-rendering.patch new file mode 100644 index 0000000000..f3dbdb57e7 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0919-Rebind-window-surface-fbo-after-native-GL-rendering.patch @@ -0,0 +1,95 @@ +From c0b81480b2909b18ac15bdd124a562ae005c2f41 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Fri, 4 Dec 2009 17:17:00 +1000 +Subject: [PATCH 0919/1244] Rebind window surface fbo after native GL rendering + +If the user called QGLFramebufferObject::bind()/release() during a +beginNativePainting() callout, the release() would reset the context's +fbo to zero, not the actual window surface fbo. + +Task-number: QTBUG-6204 +Reviewed-by: Tom +--- + src/opengl/qgl.cpp | 1 + + src/opengl/qgl_p.h | 1 + + src/opengl/qglframebufferobject.cpp | 4 ++-- + src/opengl/qglpaintdevice.cpp | 10 ++++++++++ + 4 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 5ada125..94b8aa5 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -1495,6 +1495,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format) + version_flags_cached = false; + version_flags = QGLFormat::OpenGL_Version_None; + current_fbo = 0; ++ default_fbo = 0; + active_engine = 0; + } + +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index 8e472e5..ab72c9c 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -328,6 +328,7 @@ public: + GLint max_texture_size; + + GLuint current_fbo; ++ GLuint default_fbo; + QPaintEngine *active_engine; + + static inline QGLContextGroup *contextGroup(const QGLContext *ctx) { return ctx->d_ptr->group; } +diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp +index d79283e..d0297c9 100644 +--- a/src/opengl/qglframebufferobject.cpp ++++ b/src/opengl/qglframebufferobject.cpp +@@ -899,8 +899,8 @@ bool QGLFramebufferObject::release() + #endif + + if (current) { +- current->d_ptr->current_fbo = 0; +- glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); ++ current->d_ptr->current_fbo = current->d_ptr->default_fbo; ++ glBindFramebuffer(GL_FRAMEBUFFER_EXT, current->d_ptr->default_fbo); + } + + return true; +diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp +index 2867de5..bcd90a5 100644 +--- a/src/opengl/qglpaintdevice.cpp ++++ b/src/opengl/qglpaintdevice.cpp +@@ -89,6 +89,12 @@ void QGLPaintDevice::beginPaint() + ctx->d_ptr->current_fbo = m_thisFBO; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_thisFBO); + } ++ ++ // Set the default fbo for the context to m_thisFBO so that ++ // if some raw GL code between beginNativePainting() and ++ // endNativePainting() calls QGLFramebufferObject::release(), ++ // painting will revert to the window surface's fbo. ++ ctx->d_ptr->default_fbo = m_thisFBO; + } + + void QGLPaintDevice::ensureActiveTarget() +@@ -101,6 +107,8 @@ void QGLPaintDevice::ensureActiveTarget() + ctx->d_ptr->current_fbo = m_thisFBO; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_thisFBO); + } ++ ++ ctx->d_ptr->default_fbo = m_thisFBO; + } + + void QGLPaintDevice::endPaint() +@@ -111,6 +119,8 @@ void QGLPaintDevice::endPaint() + ctx->d_ptr->current_fbo = m_previousFBO; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_previousFBO); + } ++ ++ ctx->d_ptr->default_fbo = 0; + } + + QGLFormat QGLPaintDevice::format() const +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0943-Fixed-OpenGL-graphicssystem-issues-for-OpenGL-ES-2.0.patch b/recipes/qt4/qt-4.6.0/0943-Fixed-OpenGL-graphicssystem-issues-for-OpenGL-ES-2.0.patch new file mode 100644 index 0000000000..5ef0b28822 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0943-Fixed-OpenGL-graphicssystem-issues-for-OpenGL-ES-2.0.patch @@ -0,0 +1,146 @@ +From 60be72310c0f9469b3201b250b257473184ccf2a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Samuel=20R=C3=B8dal?= +Date: Thu, 3 Dec 2009 11:53:31 +0100 +Subject: [PATCH 0943/1244] Fixed OpenGL graphicssystem issues for OpenGL ES 2.0 platforms. + +The format and internal_format parameters to glTexImage2D need to always +match on OpenGL ES 2.0. + +Reviewed-by: Tom Cooksey +--- + src/opengl/qgl_p.h | 3 ++- + src/opengl/qpixmapdata_gl.cpp | 38 ++++++++++++++++++++++++++++++-------- + src/opengl/qwindowsurface_gl.cpp | 9 ++++----- + 3 files changed, 36 insertions(+), 14 deletions(-) + +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index ab72c9c..b2407ba 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -518,7 +518,8 @@ bool qt_gl_preferGL2Engine(); + + inline GLenum qt_gl_preferredTextureFormat() + { +- return QSysInfo::ByteOrder == QSysInfo::BigEndian ? GL_RGBA : GL_BGRA; ++ return (QGLExtensions::glExtensions & QGLExtensions::BGRATextureFormat) && QSysInfo::ByteOrder == QSysInfo::LittleEndian ++ ? GL_BGRA : GL_RGBA; + } + + inline GLenum qt_gl_preferredTextureTarget() +diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp +index fb55097..ab17789 100644 +--- a/src/opengl/qpixmapdata_gl.cpp ++++ b/src/opengl/qpixmapdata_gl.cpp +@@ -321,25 +321,47 @@ void QGLPixmapData::ensureCreated() const + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + m_ctx = ctx; + +- const GLenum format = qt_gl_preferredTextureFormat(); ++ const GLenum internal_format = m_hasAlpha ? GL_RGBA : GL_RGB; ++#ifdef QT_OPENGL_ES_2 ++ const GLenum external_format = internal_format; ++#else ++ const GLenum external_format = qt_gl_preferredTextureFormat(); ++#endif + const GLenum target = GL_TEXTURE_2D; + + if (!m_texture.id) { + glGenTextures(1, &m_texture.id); + glBindTexture(target, m_texture.id); +- GLenum format = m_hasAlpha ? GL_RGBA : GL_RGB; +- glTexImage2D(target, 0, format, w, h, 0, +- GL_RGBA, GL_UNSIGNED_BYTE, 0); ++ glTexImage2D(target, 0, internal_format, w, h, 0, external_format, GL_UNSIGNED_BYTE, 0); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + } + + if (!m_source.isNull()) { +- const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, format); ++ if (external_format == GL_RGB) { ++ QImage tx = m_source.convertToFormat(QImage::Format_RGB32); ++ ++ QVector pixelData(w * h * 3); ++ uchar *p = &pixelData[0]; ++ QRgb *src = (QRgb *)tx.bits(); ++ ++ for (int i = 0; i < w * h; ++i) { ++ *p++ = qRed(*src); ++ *p++ = qGreen(*src); ++ *p++ = qBlue(*src); ++ ++src; ++ } + +- glBindTexture(target, m_texture.id); +- glTexSubImage2D(target, 0, 0, 0, w, h, format, +- GL_UNSIGNED_BYTE, tx.bits()); ++ glBindTexture(target, m_texture.id); ++ glTexSubImage2D(target, 0, 0, 0, w, h, external_format, ++ GL_UNSIGNED_BYTE, &pixelData[0]); ++ } else { ++ const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format); ++ ++ glBindTexture(target, m_texture.id); ++ glTexSubImage2D(target, 0, 0, 0, w, h, external_format, ++ GL_UNSIGNED_BYTE, tx.bits()); ++ } + + if (useFramebufferObjects()) + m_source = QImage(); +diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp +index e353f5d..7194f9d 100644 +--- a/src/opengl/qwindowsurface_gl.cpp ++++ b/src/opengl/qwindowsurface_gl.cpp +@@ -493,7 +493,6 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & + } + #endif + d_ptr->paintedRegion = QRegion(); +- + context()->swapBuffers(); + } else { + glFlush(); +@@ -688,11 +687,13 @@ void QGLWindowSurface::updateGeometry() { + d_ptr->size = rect.size(); + + if (d_ptr->ctx) { ++#ifndef QT_OPENGL_ES_2 + if (d_ptr->destructive_swap_buffers) { + glBindTexture(target, d_ptr->tex_id); + glTexImage2D(target, 0, GL_RGBA, rect.width(), rect.height(), 0, GL_RGB, GL_UNSIGNED_BYTE, 0); + glBindTexture(target, 0); + } ++#endif + return; + } + +@@ -756,11 +757,7 @@ void QGLWindowSurface::updateGeometry() { + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); +-#ifndef QT_OPENGL_ES + glOrtho(0, d_ptr->pb->width(), d_ptr->pb->height(), 0, -999999, 999999); +-#else +- glOrthof(0, d_ptr->pb->width(), d_ptr->pb->height(), 0, -999999, 999999); +-#endif + + d_ptr->pb->d_ptr->qctx->d_func()->internal_context = true; + return; +@@ -774,6 +771,7 @@ void QGLWindowSurface::updateGeometry() { + + ctx->makeCurrent(); + ++#ifndef QT_OPENGL_ES_2 + if (d_ptr->destructive_swap_buffers) { + glGenTextures(1, &d_ptr->tex_id); + glBindTexture(target, d_ptr->tex_id); +@@ -783,6 +781,7 @@ void QGLWindowSurface::updateGeometry() { + glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glBindTexture(target, 0); + } ++#endif + + qDebug() << "QGLWindowSurface: Using plain widget as window surface" << this;; + d_ptr->ctx = ctx; +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0945-Add-EGL_BUFFER_SIZE-to-QEglProperties-reduceConfigur.patch b/recipes/qt4/qt-4.6.0/0945-Add-EGL_BUFFER_SIZE-to-QEglProperties-reduceConfigur.patch new file mode 100644 index 0000000000..1afcee62dd --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0945-Add-EGL_BUFFER_SIZE-to-QEglProperties-reduceConfigur.patch @@ -0,0 +1,33 @@ +From 92e9fcc25c62870c383c8558d576abc509a8c683 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Fri, 4 Dec 2009 19:42:07 +0100 +Subject: [PATCH 0945/1244] Add EGL_BUFFER_SIZE to QEglProperties::reduceConfiguration() + +Reviewed-by: Trustme +--- + src/gui/egl/qeglproperties.cpp | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp +index 2d37edb..4d4410a 100644 +--- a/src/gui/egl/qeglproperties.cpp ++++ b/src/gui/egl/qeglproperties.cpp +@@ -229,6 +229,15 @@ void QEglProperties::setRenderableType(QEgl::API api) + // reductions in complexity are possible. + bool QEglProperties::reduceConfiguration() + { ++ // EGL chooses configs with the highest color depth over ++ // those with smaller (but faster) lower color depths. One ++ // way around this is to set EGL_BUFFER_SIZE to 16, which ++ // trumps the others. Of course, there may not be a 16-bit ++ // config avaliable, so it's the first restraint we remove. ++ if (value(EGL_BUFFER_SIZE) == 16) { ++ removeValue(EGL_BUFFER_SIZE); ++ return true; ++ } + if (removeValue(EGL_SAMPLE_BUFFERS)) { + removeValue(EGL_SAMPLES); + return true; +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0946-Fix-WA_TranslucentBackground-for-QGLWidgets-on-X11-E.patch b/recipes/qt4/qt-4.6.0/0946-Fix-WA_TranslucentBackground-for-QGLWidgets-on-X11-E.patch new file mode 100644 index 0000000000..6cdd9d13da --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0946-Fix-WA_TranslucentBackground-for-QGLWidgets-on-X11-E.patch @@ -0,0 +1,180 @@ +From 76c415b586991d978d46a888fb40c631513407dc Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Fri, 4 Dec 2009 20:48:53 +0100 +Subject: [PATCH 0946/1244] Fix WA_TranslucentBackground for QGLWidgets on X11/EGL + +Also check for existing QEglContext before creating a new one and +leaking a context. + +Reviewed-by: TrustMe +--- + src/opengl/qgl_x11egl.cpp | 118 ++++++++++++++++++++++++++++----------------- + 1 files changed, 73 insertions(+), 45 deletions(-) + +diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp +index b51c239..a868e83 100644 +--- a/src/opengl/qgl_x11egl.cpp ++++ b/src/opengl/qgl_x11egl.cpp +@@ -63,6 +63,7 @@ void qt_egl_add_platform_config(QEglProperties& props, QPaintDevice *device) + props.setPixelFormat(static_cast(device)->format()); + } + ++// Chooses the EGL config and creates the EGL context + bool QGLContext::chooseContext(const QGLContext* shareContext) + { + Q_D(QGLContext); +@@ -73,56 +74,74 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) + int devType = device()->devType(); + + // Get the display and initialize it. +- d->eglContext = new QEglContext(); +- d->eglContext->setApi(QEgl::OpenGL); +- if (!d->eglContext->openDisplay(device())) { +- delete d->eglContext; +- d->eglContext = 0; +- return false; +- } ++ if (d->eglContext == 0) { ++ d->eglContext = new QEglContext(); ++ d->eglContext->setApi(QEgl::OpenGL); ++ if (!d->eglContext->openDisplay(device())) { ++ delete d->eglContext; ++ d->eglContext = 0; ++ return false; ++ } + +- // Construct the configuration we need for this surface. +- QEglProperties configProps; +- qt_egl_set_format(configProps, devType, d->glFormat); +- qt_egl_add_platform_config(configProps, device()); +- configProps.setRenderableType(QEgl::OpenGL); +- +- QEgl::PixelFormatMatch matchType = QEgl::BestPixelFormat; +- if (device()->depth() == 16) { +- configProps.setValue(EGL_RED_SIZE, 5); +- configProps.setValue(EGL_GREEN_SIZE, 6); +- configProps.setValue(EGL_BLUE_SIZE, 5); +- configProps.setValue(EGL_ALPHA_SIZE, 0); +- matchType = QEgl::ExactPixelFormat; +- } +- configProps.setRenderableType(QEgl::OpenGL); ++ // Construct the configuration we need for this surface. ++ QEglProperties configProps; ++ qt_egl_set_format(configProps, devType, d->glFormat); ++ qt_egl_add_platform_config(configProps, device()); ++ configProps.setRenderableType(QEgl::OpenGL); ++ ++#if We_have_an_EGL_library_which_bothers_to_check_EGL_BUFFER_SIZE ++ if (device()->depth() == 16 && configProps.value(EGL_ALPHA_SIZE) <= 0) { ++ qDebug("Setting EGL_BUFFER_SIZE to 16"); ++ configProps.setValue(EGL_BUFFER_SIZE, 16); ++ configProps.setValue(EGL_ALPHA_SIZE, 0); ++ } + +- // Search for a matching configuration, reducing the complexity +- // each time until we get something that matches. +- if (!d->eglContext->chooseConfig(configProps, matchType)) { +- delete d->eglContext; +- d->eglContext = 0; +- return false; +- } ++ if (!d->eglContext->chooseConfig(configProps, QEgl::BestPixelFormat)) { ++ delete d->eglContext; ++ d->eglContext = 0; ++ return false; ++ } ++#else ++ QEgl::PixelFormatMatch matchType = QEgl::BestPixelFormat; ++ if ((device()->depth() == 16) && configProps.value(EGL_ALPHA_SIZE) == 0) { ++ configProps.setValue(EGL_RED_SIZE, 5); ++ configProps.setValue(EGL_GREEN_SIZE, 6); ++ configProps.setValue(EGL_BLUE_SIZE, 5); ++ configProps.setValue(EGL_ALPHA_SIZE, 0); ++ matchType = QEgl::ExactPixelFormat; ++ } + +- // Inform the higher layers about the actual format properties. +- qt_egl_update_format(*(d->eglContext), d->glFormat); ++ // Search for a matching configuration, reducing the complexity ++ // each time until we get something that matches. ++ if (!d->eglContext->chooseConfig(configProps, matchType)) { ++ delete d->eglContext; ++ d->eglContext = 0; ++ return false; ++ } ++#endif + +- // Create a new context for the configuration. +- if (!d->eglContext->createContext +- (shareContext ? shareContext->d_func()->eglContext : 0)) { +- delete d->eglContext; +- d->eglContext = 0; +- return false; +- } +- d->sharing = d->eglContext->isSharing(); +- if (d->sharing && shareContext) +- const_cast(shareContext)->d_func()->sharing = true; ++// qDebug("QGLContext::chooseContext() - using EGL config %d:", d->eglContext->config()); ++// qDebug() << QEglProperties(d->eglContext->config()).toString(); ++ ++ // Create a new context for the configuration. ++ if (!d->eglContext->createContext ++ (shareContext ? shareContext->d_func()->eglContext : 0)) { ++ delete d->eglContext; ++ d->eglContext = 0; ++ return false; ++ } ++ d->sharing = d->eglContext->isSharing(); ++ if (d->sharing && shareContext) ++ const_cast(shareContext)->d_func()->sharing = true; + + #if defined(EGL_VERSION_1_1) +- if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget) +- eglSwapInterval(d->eglContext->display(), d->glFormat.swapInterval()); ++ if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget) ++ eglSwapInterval(d->eglContext->display(), d->glFormat.swapInterval()); + #endif ++ } ++ ++ // Inform the higher layers about the actual format properties. ++ qt_egl_update_format(*(d->eglContext), d->glFormat); + + return true; + } +@@ -160,6 +179,9 @@ bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig conf + + memset(&vi, 0, sizeof(XVisualInfo)); + ++ EGLint eglConfigColorSize; ++ eglGetConfigAttrib(display, config, EGL_BUFFER_SIZE, &eglConfigColorSize); ++ + // Check to see if EGL is suggesting an appropriate visual id: + EGLint nativeVisualId; + eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &nativeVisualId); +@@ -189,8 +211,12 @@ bool qt_egl_setup_x11_visual(XVisualInfo &vi, EGLDisplay display, EGLConfig conf + } else + #endif + { +-// qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid); +- vi = *chosenVisualInfo; ++ if (eglConfigColorSize == chosenVisualInfo->depth) { ++// qDebug("Using opaque X Visual ID (%d) provided by EGL", (int)vi.visualid); ++ vi = *chosenVisualInfo; ++ } else ++ qWarning("Warning: EGL suggested using X visual ID %d (%d bpp) for config %d (%d bpp), but the depths do not match!", ++ nativeVisualId, chosenVisualInfo->depth, (int)config, eglConfigColorSize); + } + XFree(chosenVisualInfo); + } +@@ -300,6 +326,8 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, + + bool createFailed = false; + if (!d->glcx->isValid()) { ++ // Create the QGLContext here, which in turn chooses the EGL config ++ // and creates the EGL context: + if (!d->glcx->create(shareContext ? shareContext : oldcx)) + createFailed = true; + } +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0947-Compressed-texture-binding-for-QtOpenGL-ETC1-and-PVR.patch b/recipes/qt4/qt-4.6.0/0947-Compressed-texture-binding-for-QtOpenGL-ETC1-and-PVR.patch new file mode 100644 index 0000000000..605a913cb7 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0947-Compressed-texture-binding-for-QtOpenGL-ETC1-and-PVR.patch @@ -0,0 +1,771 @@ +From 147195bccfdf90924a1525398e9c7b3119c1e278 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Thu, 3 Dec 2009 10:07:22 +1000 +Subject: [PATCH 0947/1244] Compressed texture binding for QtOpenGL: ETC1 and PVRTC + +The QGLContext::bindTexture(QString) function has been augmented +with support for ETC1, PVRTC2, and PVRTC4 compressed textures, +in addition to the existing DDS support. + +The QGLPixmapData class has also been modified to recognize +compressed texture formats in fromFile() and fromData(). + +This change also fixes a bug in bindTexture() that prevented +the same compressed texture file from being bound in multiple +contexts. There is now a separate file cache for each context group. + +Task-number: QT-2547 +Reviewed-by: Trond +--- + src/opengl/qgl.cpp | 485 +++++++++++++++++++++++++++++++---------- + src/opengl/qgl_p.h | 16 ++- + src/opengl/qglextensions_p.h | 17 ++ + src/opengl/qpixmapdata_gl.cpp | 57 +++++ + src/opengl/qpixmapdata_gl_p.h | 4 + + 5 files changed, 461 insertions(+), 118 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 94b8aa5..b376901 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -127,18 +127,6 @@ Q_GLOBAL_STATIC(QGLDefaultOverlayFormat, defaultOverlayFormatInstance) + QGLExtensions::Extensions QGLExtensions::glExtensions = 0; + bool QGLExtensions::nvidiaFboNeedsFinish = false; + +-#ifndef APIENTRY +-# define APIENTRY +-#endif +-typedef void (APIENTRY *pfn_glCompressedTexImage2DARB) (GLenum, GLint, GLenum, GLsizei, +- GLsizei, GLint, GLsizei, const GLvoid *); +-static pfn_glCompressedTexImage2DARB qt_glCompressedTexImage2DARB = 0; +- +- +-#ifndef APIENTRY +-#define APIENTRY +-#endif +- + Q_GLOBAL_STATIC(QGLSignalProxy, theSignalProxy) + QGLSignalProxy *QGLSignalProxy::instance() + { +@@ -1887,118 +1875,42 @@ void QGLContextPrivate::cleanup() + { + } + +-typedef QHash QGLDDSCache; +-Q_GLOBAL_STATIC(QGLDDSCache, qgl_dds_cache) +- + /*! + \overload + +- Reads the DirectDrawSurface (DDS) compressed file \a fileName and +- generates a 2D GL texture from it. ++ Reads the compressed texture file \a fileName and generates a 2D GL ++ texture from it. + +- Only the DXT1, DXT3 and DXT5 DDS formats are supported. ++ This function can load DirectDrawSurface (DDS) textures in the ++ DXT1, DXT3 and DXT5 DDS formats if the \c GL_ARB_texture_compression ++ and \c GL_EXT_texture_compression_s3tc extensions are supported. + +- Note that this will only work if the implementation supports the +- \c GL_ARB_texture_compression and \c GL_EXT_texture_compression_s3tc +- extensions. ++ Since 4.6.1, textures in the ETC1 format can be loaded if the ++ \c GL_OES_compressed_ETC1_RGB8_texture extension is supported ++ and the ETC1 texture has been encapsulated in the PVR container format. ++ Also, textures in the PVRTC2 and PVRTC4 formats can be loaded ++ if the \c GL_IMG_texture_compression_pvrtc extension is supported. + + \sa deleteTexture() + */ + + GLuint QGLContext::bindTexture(const QString &fileName) + { +- if (!qt_glCompressedTexImage2DARB) { +- qWarning("QGLContext::bindTexture(): The GL implementation does not support texture" +- "compression extensions."); +- return 0; +- } +- +- QGLDDSCache::const_iterator it = qgl_dds_cache()->constFind(fileName); +- if (it != qgl_dds_cache()->constEnd()) { ++ Q_D(QGLContext); ++ QGLDDSCache *dds_cache = &(d->group->m_dds_cache); ++ QGLDDSCache::const_iterator it = dds_cache->constFind(fileName); ++ if (it != dds_cache->constEnd()) { + glBindTexture(GL_TEXTURE_2D, it.value()); + return it.value(); + } + +- QFile f(fileName); +- f.open(QIODevice::ReadOnly); +- +- char tag[4]; +- f.read(&tag[0], 4); +- if (strncmp(tag,"DDS ", 4) != 0) { +- qWarning("QGLContext::bindTexture(): not a DDS image file."); +- return 0; +- } +- +- DDSFormat ddsHeader; +- f.read((char *) &ddsHeader, sizeof(DDSFormat)); +- +- if (!ddsHeader.dwLinearSize) { +- qWarning("QGLContext::bindTexture() DDS image size is not valid."); +- return 0; +- } +- +- int factor = 4; +- int bufferSize = 0; +- int blockSize = 16; +- GLenum format; +- +- switch(ddsHeader.ddsPixelFormat.dwFourCC) { +- case FOURCC_DXT1: +- format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; +- factor = 2; +- blockSize = 8; +- break; +- case FOURCC_DXT3: +- format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; +- break; +- case FOURCC_DXT5: +- format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; +- break; +- default: +- qWarning("QGLContext::bindTexture() DDS image format not supported."); ++ QGLTexture texture(this); ++ QSize size = texture.bindCompressedTexture(fileName); ++ if (!size.isValid()) + return 0; +- } +- +- if (ddsHeader.dwMipMapCount > 1) +- bufferSize = ddsHeader.dwLinearSize * factor; +- else +- bufferSize = ddsHeader.dwLinearSize; +- +- GLubyte *pixels = (GLubyte *) malloc(bufferSize*sizeof(GLubyte)); +- f.seek(ddsHeader.dwSize + 4); +- f.read((char *) pixels, bufferSize); +- f.close(); +- +- GLuint tx_id; +- glGenTextures(1, &tx_id); +- glBindTexture(GL_TEXTURE_2D, tx_id); +- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); +- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); +- +- int size; +- int offset = 0; +- int w = ddsHeader.dwWidth; +- int h = ddsHeader.dwHeight; + +- // load mip-maps +- for(int i = 0; i < (int) ddsHeader.dwMipMapCount; ++i) { +- if (w == 0) w = 1; +- if (h == 0) h = 1; +- +- size = ((w+3)/4) * ((h+3)/4) * blockSize; +- qt_glCompressedTexImage2DARB(GL_TEXTURE_2D, i, format, w, h, 0, +- size, pixels + offset); +- offset += size; +- +- // half size for each mip-map level +- w = w/2; +- h = h/2; +- } +- +- free(pixels); +- +- qgl_dds_cache()->insert(fileName, tx_id); +- return tx_id; ++ dds_cache->insert(fileName, texture.id); ++ return texture.id; + } + + static inline QRgb qt_gl_convertToGLFormatHelper(QRgb src_pixel, GLenum texture_format) +@@ -2593,17 +2505,20 @@ GLuint QGLContext::bindTexture(const QPixmap &pixmap, QMacCompatGLenum target, Q + */ + void QGLContext::deleteTexture(GLuint id) + { ++ Q_D(QGLContext); ++ + if (QGLTextureCache::instance()->remove(this, id)) + return; + + // check the DDS cache if the texture wasn't found in the pixmap/image + // cache +- QList ddsKeys = qgl_dds_cache()->keys(); ++ QGLDDSCache *dds_cache = &(d->group->m_dds_cache); ++ QList ddsKeys = dds_cache->keys(); + for (int i = 0; i < ddsKeys.size(); ++i) { +- GLuint texture = qgl_dds_cache()->value(ddsKeys.at(i)); ++ GLuint texture = dds_cache->value(ddsKeys.at(i)); + if (id == texture) { + glDeleteTextures(1, &texture); +- qgl_dds_cache()->remove(ddsKeys.at(i)); ++ dds_cache->remove(ddsKeys.at(i)); + return; + } + } +@@ -4907,8 +4822,14 @@ void QGLExtensions::init_extensions() + glExtensions |= SampleBuffers; + if (extensions.contains("GL_SGIS_generate_mipmap")) + glExtensions |= GenerateMipmap; +- if (extensions.contains("GL_EXT_texture_compression_s3tc")) ++ if (extensions.contains("GL_ARB_texture_compression")) + glExtensions |= TextureCompression; ++ if (extensions.contains("GL_EXT_texture_compression_s3tc")) ++ glExtensions |= DDSTextureCompression; ++ if (extensions.contains("GL_OES_compressed_ETC1_RGB8_texture")) ++ glExtensions |= ETC1TextureCompression; ++ if (extensions.contains("GL_IMG_texture_compression_pvrtc")) ++ glExtensions |= PVRTCTextureCompression; + if (extensions.contains("GL_ARB_fragment_program")) + glExtensions |= FragmentProgram; + if (extensions.contains("GL_ARB_texture_mirrored_repeat")) +@@ -4951,12 +4872,6 @@ void QGLExtensions::init_extensions() + + if (extensions.contains("GL_EXT_bgra")) + glExtensions |= BGRATextureFormat; +- +- +- QGLContext cx(QGLFormat::defaultFormat()); +- if (glExtensions & TextureCompression) { +- qt_glCompressedTexImage2DARB = (pfn_glCompressedTexImage2DARB) cx.getProcAddress(QLatin1String("glCompressedTexImage2DARB")); +- } + } + + /* +@@ -5112,4 +5027,340 @@ void QGLSharedResourceGuard::setContext(const QGLContext *context) + } + } + ++QSize QGLTexture::bindCompressedTexture ++ (const QString& fileName, const char *format) ++{ ++ QFile file(fileName); ++ if (!file.open(QIODevice::ReadOnly)) ++ return QSize(); ++ QByteArray contents = file.readAll(); ++ file.close(); ++ return bindCompressedTexture ++ (contents.constData(), contents.size(), format); ++} ++ ++// PVR header format for container files that store textures compressed ++// with the ETC1, PVRTC2, and PVRTC4 encodings. Format information from the ++// PowerVR SDK at http://www.imgtec.com/powervr/insider/powervr-sdk.asp ++// "PVRTexTool Reference Manual, version 1.11f". ++struct PvrHeader ++{ ++ quint32 headerSize; ++ quint32 height; ++ quint32 width; ++ quint32 mipMapCount; ++ quint32 flags; ++ quint32 dataSize; ++ quint32 bitsPerPixel; ++ quint32 redMask; ++ quint32 greenMask; ++ quint32 blueMask; ++ quint32 alphaMask; ++ quint32 magic; ++ quint32 surfaceCount; ++}; ++ ++#define PVR_MAGIC 0x21525650 // "PVR!" in little-endian ++ ++#define PVR_FORMAT_MASK 0x000000FF ++#define PVR_FORMAT_PVRTC2 0x00000018 ++#define PVR_FORMAT_PVRTC4 0x00000019 ++#define PVR_FORMAT_ETC1 0x00000036 ++ ++#define PVR_HAS_MIPMAPS 0x00000100 ++#define PVR_TWIDDLED 0x00000200 ++#define PVR_NORMAL_MAP 0x00000400 ++#define PVR_BORDER_ADDED 0x00000800 ++#define PVR_CUBE_MAP 0x00001000 ++#define PVR_FALSE_COLOR_MIPMAPS 0x00002000 ++#define PVR_VOLUME_TEXTURE 0x00004000 ++#define PVR_ALPHA_IN_TEXTURE 0x00008000 ++#define PVR_VERTICAL_FLIP 0x00010000 ++ ++#ifndef GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG ++#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 ++#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 ++#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 ++#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 ++#endif ++ ++#ifndef GL_ETC1_RGB8_OES ++#define GL_ETC1_RGB8_OES 0x8D64 ++#endif ++ ++bool QGLTexture::canBindCompressedTexture ++ (const char *buf, int len, const char *format, bool *hasAlpha) ++{ ++ if (QSysInfo::ByteOrder != QSysInfo::LittleEndian) { ++ // Compressed texture loading only supported on little-endian ++ // systems such as x86 and ARM at the moment. ++ return false; ++ } ++ if (!format) { ++ // Auto-detect the format from the header. ++ if (len >= 4 && !qstrncmp(buf, "DDS ", 4)) { ++ *hasAlpha = true; ++ return true; ++ } else if (len >= 52 && !qstrncmp(buf + 44, "PVR!", 4)) { ++ const PvrHeader *pvrHeader = ++ reinterpret_cast(buf); ++ *hasAlpha = (pvrHeader->alphaMask != 0); ++ return true; ++ } ++ } else { ++ // Validate the format against the header. ++ if (!qstricmp(format, "DDS")) { ++ if (len >= 4 && !qstrncmp(buf, "DDS ", 4)) { ++ *hasAlpha = true; ++ return true; ++ } ++ } else if (!qstricmp(format, "PVR") || !qstricmp(format, "ETC1")) { ++ if (len >= 52 && !qstrncmp(buf + 44, "PVR!", 4)) { ++ const PvrHeader *pvrHeader = ++ reinterpret_cast(buf); ++ *hasAlpha = (pvrHeader->alphaMask != 0); ++ return true; ++ } ++ } ++ } ++ return false; ++} ++ ++#define ctx QGLContext::currentContext() ++ ++QSize QGLTexture::bindCompressedTexture ++ (const char *buf, int len, const char *format) ++{ ++ if (QSysInfo::ByteOrder != QSysInfo::LittleEndian) { ++ // Compressed texture loading only supported on little-endian ++ // systems such as x86 and ARM at the moment. ++ return QSize(); ++ } ++#if !defined(QT_OPENGL_ES) ++ if (!glCompressedTexImage2D) { ++ if (!(QGLExtensions::glExtensions & QGLExtensions::TextureCompression)) { ++ qWarning("QGLContext::bindTexture(): The GL implementation does " ++ "not support texture compression extensions."); ++ return QSize(); ++ } ++ glCompressedTexImage2D = (_glCompressedTexImage2DARB) ctx->getProcAddress(QLatin1String("glCompressedTexImage2DARB")); ++ if (!glCompressedTexImage2D) { ++ qWarning("QGLContext::bindTexture(): could not resolve " ++ "glCompressedTexImage2DARB."); ++ return QSize(); ++ } ++ } ++#endif ++ if (!format) { ++ // Auto-detect the format from the header. ++ if (len >= 4 && !qstrncmp(buf, "DDS ", 4)) ++ return bindCompressedTextureDDS(buf, len); ++ else if (len >= 52 && !qstrncmp(buf + 44, "PVR!", 4)) ++ return bindCompressedTexturePVR(buf, len); ++ } else { ++ // Validate the format against the header. ++ if (!qstricmp(format, "DDS")) { ++ if (len >= 4 && !qstrncmp(buf, "DDS ", 4)) ++ return bindCompressedTextureDDS(buf, len); ++ } else if (!qstricmp(format, "PVR") || !qstricmp(format, "ETC1")) { ++ if (len >= 52 && !qstrncmp(buf + 44, "PVR!", 4)) ++ return bindCompressedTexturePVR(buf, len); ++ } ++ } ++ return QSize(); ++} ++ ++QSize QGLTexture::bindCompressedTextureDDS(const char *buf, int len) ++{ ++ // We only support 2D texture loading at present. ++ if (target != GL_TEXTURE_2D) ++ return QSize(); ++ ++ // Bail out if the necessary extension is not present. ++ if (!(QGLExtensions::glExtensions & QGLExtensions::DDSTextureCompression)) { ++ qWarning("QGLContext::bindTexture(): DDS texture compression is not supported."); ++ return QSize(); ++ } ++ ++ const DDSFormat *ddsHeader = reinterpret_cast(buf + 4); ++ if (!ddsHeader->dwLinearSize) { ++ qWarning("QGLContext::bindTexture(): DDS image size is not valid."); ++ return QSize(); ++ } ++ ++ int blockSize = 16; ++ GLenum format; ++ ++ switch(ddsHeader->ddsPixelFormat.dwFourCC) { ++ case FOURCC_DXT1: ++ format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; ++ blockSize = 8; ++ break; ++ case FOURCC_DXT3: ++ format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; ++ break; ++ case FOURCC_DXT5: ++ format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; ++ break; ++ default: ++ qWarning("QGLContext::bindTexture(): DDS image format not supported."); ++ return QSize(); ++ } ++ ++ const GLubyte *pixels = ++ reinterpret_cast(buf + ddsHeader->dwSize + 4); ++ ++ glGenTextures(1, &id); ++ glBindTexture(GL_TEXTURE_2D, id); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ ++ int size; ++ int offset = 0; ++ int available = len - int(ddsHeader->dwSize + 4); ++ int w = ddsHeader->dwWidth; ++ int h = ddsHeader->dwHeight; ++ ++ // load mip-maps ++ for(int i = 0; i < (int) ddsHeader->dwMipMapCount; ++i) { ++ if (w == 0) w = 1; ++ if (h == 0) h = 1; ++ ++ size = ((w+3)/4) * ((h+3)/4) * blockSize; ++ if (size > available) ++ break; ++ glCompressedTexImage2D(GL_TEXTURE_2D, i, format, w, h, 0, ++ size, pixels + offset); ++ offset += size; ++ available -= size; ++ ++ // half size for each mip-map level ++ w = w/2; ++ h = h/2; ++ } ++ ++ // DDS images are not inverted. ++ options &= ~QGLContext::InvertedYBindOption; ++ ++ return QSize(ddsHeader->dwWidth, ddsHeader->dwHeight); ++} ++ ++QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len) ++{ ++ // We only support 2D texture loading at present. Cube maps later. ++ if (target != GL_TEXTURE_2D) ++ return QSize(); ++ ++ // Determine which texture format we will be loading. ++ const PvrHeader *pvrHeader = reinterpret_cast(buf); ++ GLenum textureFormat; ++ quint32 minWidth, minHeight; ++ switch (pvrHeader->flags & PVR_FORMAT_MASK) { ++ case PVR_FORMAT_PVRTC2: ++ if (pvrHeader->alphaMask) ++ textureFormat = GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; ++ else ++ textureFormat = GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG; ++ minWidth = 16; ++ minHeight = 8; ++ break; ++ ++ case PVR_FORMAT_PVRTC4: ++ if (pvrHeader->alphaMask) ++ textureFormat = GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; ++ else ++ textureFormat = GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG; ++ minWidth = 8; ++ minHeight = 8; ++ break; ++ ++ case PVR_FORMAT_ETC1: ++ textureFormat = GL_ETC1_RGB8_OES; ++ minWidth = 4; ++ minHeight = 4; ++ break; ++ ++ default: ++ qWarning("QGLContext::bindTexture(): PVR image format 0x%x not supported.", int(pvrHeader->flags & PVR_FORMAT_MASK)); ++ return QSize(); ++ } ++ ++ // Bail out if the necessary extension is not present. ++ if (textureFormat == GL_ETC1_RGB8_OES) { ++ if (!(QGLExtensions::glExtensions & ++ QGLExtensions::ETC1TextureCompression)) { ++ qWarning("QGLContext::bindTexture(): ETC1 texture compression is not supported."); ++ return QSize(); ++ } ++ } else { ++ if (!(QGLExtensions::glExtensions & ++ QGLExtensions::PVRTCTextureCompression)) { ++ qWarning("QGLContext::bindTexture(): PVRTC texture compression is not supported."); ++ return QSize(); ++ } ++ } ++ ++ // Boundary check on the buffer size. ++ quint32 bufferSize = pvrHeader->headerSize + pvrHeader->dataSize; ++ if (bufferSize > quint32(len)) { ++ qWarning("QGLContext::bindTexture(): PVR image size is not valid."); ++ return QSize(); ++ } ++ ++ // Create the texture. ++ glPixelStorei(GL_UNPACK_ALIGNMENT, 1); ++ glGenTextures(1, &id); ++ glBindTexture(GL_TEXTURE_2D, id); ++ if (pvrHeader->mipMapCount) { ++ if ((options & QGLContext::LinearFilteringBindOption) != 0) { ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); ++ } else { ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); ++ } ++ } else if ((options & QGLContext::LinearFilteringBindOption) != 0) { ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ } else { ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ++ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ++ } ++ ++ // Load the compressed mipmap levels. ++ const GLubyte *buffer = ++ reinterpret_cast(buf + pvrHeader->headerSize); ++ bufferSize = pvrHeader->dataSize; ++ quint32 level = 0; ++ quint32 width = pvrHeader->width; ++ quint32 height = pvrHeader->height; ++ while (bufferSize > 0 && level < pvrHeader->mipMapCount) { ++ quint32 size = ++ (qMax(width, minWidth) * qMax(height, minHeight) * ++ pvrHeader->bitsPerPixel) / 8; ++ if (size > bufferSize) ++ break; ++ glCompressedTexImage2D(GL_TEXTURE_2D, GLint(level), textureFormat, ++ GLsizei(width), GLsizei(height), 0, ++ GLsizei(size), buffer); ++ width /= 2; ++ height /= 2; ++ buffer += size; ++ ++level; ++ } ++ ++ // Restore the default pixel alignment for later texture uploads. ++ glPixelStorei(GL_UNPACK_ALIGNMENT, 4); ++ ++ // Set the invert flag for the texture. ++ if ((pvrHeader->flags & PVR_VERTICAL_FLIP) != 0) ++ options |= QGLContext::InvertedYBindOption; ++ else ++ options &= ~QGLContext::InvertedYBindOption; ++ ++ return QSize(pvrHeader->width, pvrHeader->height); ++} ++ ++#undef ctx ++ + QT_END_NAMESPACE +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index b2407ba..0f785a5 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -222,6 +222,8 @@ public: + class QGLContextResource; + class QGLSharedResourceGuard; + ++typedef QHash QGLDDSCache; ++ + // QGLContextPrivate has the responsibility of creating context groups. + // QGLContextPrivate and QGLShareRegister will both maintain the reference counter and destroy + // context groups when needed. +@@ -246,6 +248,7 @@ private: + QHash m_resources; + QGLSharedResourceGuard *m_guards; // double-linked list of active guards. + QAtomicInt m_refs; ++ QGLDDSCache m_dds_cache; + + void cleanupResources(const QGLContext *ctx); + +@@ -377,7 +380,10 @@ public: + PixelBufferObject = 0x00000800, + FramebufferBlit = 0x00001000, + NPOTTextures = 0x00002000, +- BGRATextureFormat = 0x00004000 ++ BGRATextureFormat = 0x00004000, ++ DDSTextureCompression = 0x00008000, ++ ETC1TextureCompression = 0x00010000, ++ PVRTCTextureCompression = 0x00020000 + }; + Q_DECLARE_FLAGS(Extensions, Extension) + +@@ -482,6 +488,14 @@ public: + QPixmapData* boundPixmap; + #endif + ++ bool canBindCompressedTexture ++ (const char *buf, int len, const char *format, bool *hasAlpha); ++ QSize bindCompressedTexture ++ (const QString& fileName, const char *format = 0); ++ QSize bindCompressedTexture ++ (const char *buf, int len, const char *format = 0); ++ QSize bindCompressedTextureDDS(const char *buf, int len); ++ QSize bindCompressedTexturePVR(const char *buf, int len); + }; + + class QGLTextureCache { +diff --git a/src/opengl/qglextensions_p.h b/src/opengl/qglextensions_p.h +index 3510765..62e216c 100644 +--- a/src/opengl/qglextensions_p.h ++++ b/src/opengl/qglextensions_p.h +@@ -184,6 +184,10 @@ typedef void (APIENTRY *_glBlitFramebufferEXT) (int srcX0, int srcY0, int srcX1, + typedef void (APIENTRY *_glRenderbufferStorageMultisampleEXT) (GLenum target, GLsizei samples, + GLenum internalformat, GLsizei width, GLsizei height); + ++// ARB_texture_compression ++typedef void (APIENTRY *_glCompressedTexImage2DARB) (GLenum, GLint, GLenum, GLsizei, ++ GLsizei, GLint, GLsizei, const GLvoid *); ++ + QT_BEGIN_NAMESPACE + + struct QGLExtensionFuncs +@@ -289,6 +293,11 @@ struct QGLExtensionFuncs + #endif + qt_glMapBufferARB = 0; + qt_glUnmapBufferARB = 0; ++ ++#if !defined(QT_OPENGL_ES) ++ // Texture compression ++ qt_glCompressedTexImage2DARB = 0; ++#endif + } + + +@@ -397,6 +406,10 @@ struct QGLExtensionFuncs + _glMapBufferARB qt_glMapBufferARB; + _glUnmapBufferARB qt_glUnmapBufferARB; + ++#if !defined(QT_OPENGL_ES) ++ // Texture compression ++ _glCompressedTexImage2DARB qt_glCompressedTexImage2DARB; ++#endif + }; + + +@@ -732,6 +745,10 @@ struct QGLExtensionFuncs + #define glClearDepth glClearDepthf + #endif + ++#if !defined(QT_OPENGL_ES) ++#define glCompressedTexImage2D QGLContextPrivate::extensionFuncs(ctx).qt_glCompressedTexImage2DARB ++#endif ++ + extern bool qt_resolve_framebufferobject_extensions(QGLContext *ctx); + bool qt_resolve_buffer_extensions(QGLContext *ctx); + +diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp +index ab17789..0299cea 100644 +--- a/src/opengl/qpixmapdata_gl.cpp ++++ b/src/opengl/qpixmapdata_gl.cpp +@@ -53,6 +53,8 @@ + #include + + #include ++#include ++#include + + QT_BEGIN_NAMESPACE + +@@ -407,6 +409,61 @@ void QGLPixmapData::fromImage(const QImage &image, + } + } + ++bool QGLPixmapData::fromFile(const QString &filename, const char *format, ++ Qt::ImageConversionFlags flags) ++{ ++ if (pixelType() == QPixmapData::BitmapType) ++ return QPixmapData::fromFile(filename, format, flags); ++ QFile file(filename); ++ if (!file.open(QIODevice::ReadOnly)) ++ return false; ++ QByteArray data = file.peek(64); ++ bool alpha; ++ if (m_texture.canBindCompressedTexture ++ (data.constData(), data.size(), format, &alpha)) { ++ resize(0, 0); ++ data = file.readAll(); ++ file.close(); ++ QSize size = m_texture.bindCompressedTexture ++ (data.constData(), data.size(), format); ++ if (!size.isEmpty()) { ++ w = size.width(); ++ h = size.height(); ++ is_null = false; ++ d = 32; ++ m_hasAlpha = alpha; ++ m_source = QImage(); ++ m_dirty = isValid(); ++ return true; ++ } ++ return false; ++ } ++ fromImage(QImageReader(&file, format).read(), flags); ++ return !isNull(); ++} ++ ++bool QGLPixmapData::fromData(const uchar *buffer, uint len, const char *format, ++ Qt::ImageConversionFlags flags) ++{ ++ bool alpha; ++ const char *buf = reinterpret_cast(buffer); ++ if (m_texture.canBindCompressedTexture(buf, int(len), format, &alpha)) { ++ resize(0, 0); ++ QSize size = m_texture.bindCompressedTexture(buf, int(len), format); ++ if (!size.isEmpty()) { ++ w = size.width(); ++ h = size.height(); ++ is_null = false; ++ d = 32; ++ m_hasAlpha = alpha; ++ m_source = QImage(); ++ m_dirty = isValid(); ++ return true; ++ } ++ } ++ return QPixmapData::fromData(buffer, len, format, flags); ++} ++ + bool QGLPixmapData::scroll(int dx, int dy, const QRect &rect) + { + Q_UNUSED(dx); +diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h +index 8a13e03..007c52a 100644 +--- a/src/opengl/qpixmapdata_gl_p.h ++++ b/src/opengl/qpixmapdata_gl_p.h +@@ -106,6 +106,10 @@ public: + // Re-implemented from QPixmapData: + void resize(int width, int height); + void fromImage(const QImage &image, Qt::ImageConversionFlags flags); ++ bool fromFile(const QString &filename, const char *format, ++ Qt::ImageConversionFlags flags); ++ bool fromData(const uchar *buffer, uint len, const char *format, ++ Qt::ImageConversionFlags flags); + void copy(const QPixmapData *data, const QRect &rect); + bool scroll(int dx, int dy, const QRect &rect); + void fill(const QColor &color); +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0951-Detect-GL2-paint-engine-based-on-fragment-shaders-no.patch b/recipes/qt4/qt-4.6.0/0951-Detect-GL2-paint-engine-based-on-fragment-shaders-no.patch new file mode 100644 index 0000000000..787868e7c5 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0951-Detect-GL2-paint-engine-based-on-fragment-shaders-no.patch @@ -0,0 +1,68 @@ +From 8fea31ca0ab98ef6fed7bb2d87d97f4f425b2078 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Mon, 7 Dec 2009 10:07:13 +1000 +Subject: [PATCH 0951/1244] Detect GL2 paint engine based on fragment shaders, not programs + +The auto-detect logic was looking for fragment programs to check +for OpenGL2 support. It should have been looking for fragment shaders. + +Task-number: QTBUG-5638 +Reviewed-by: Sarah Smith +--- + src/opengl/qgl.cpp | 7 +++++-- + src/opengl/qgl_p.h | 3 ++- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index b376901..1ff102f 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -173,12 +173,12 @@ public: + #else + // We can't do this in the constructor for this object because it + // needs to be called *before* the QApplication constructor. +- // Also check for the FragmentProgram extension in conjunction with ++ // Also check for the FragmentShader extension in conjunction with + // the 2.0 version flag, to cover the case where we export the display + // from an old GL 1.1 server to a GL 2.x client. In that case we can't + // use GL 2.0. + if ((QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0) +- && (QGLExtensions::glExtensions & QGLExtensions::FragmentProgram) ++ && (QGLExtensions::glExtensions & QGLExtensions::FragmentShader) + && qgetenv("QT_GL_USE_OPENGL1ENGINE").isEmpty()) + engineType = QPaintEngine::OpenGL2; + else +@@ -4832,6 +4832,8 @@ void QGLExtensions::init_extensions() + glExtensions |= PVRTCTextureCompression; + if (extensions.contains("GL_ARB_fragment_program")) + glExtensions |= FragmentProgram; ++ if (extensions.contains("GL_ARB_fragment_shader")) ++ glExtensions |= FragmentShader; + if (extensions.contains("GL_ARB_texture_mirrored_repeat")) + glExtensions |= MirroredRepeat; + if (extensions.contains("GL_EXT_framebuffer_object")) +@@ -4849,6 +4851,7 @@ void QGLExtensions::init_extensions() + #if defined(QT_OPENGL_ES_2) + glExtensions |= FramebufferObject; + glExtensions |= GenerateMipmap; ++ glExtensions |= FragmentShader; + #endif + #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) + if (extensions.contains("GL_OES_framebuffer_object")) +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index 0f785a5..179d69a 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -383,7 +383,8 @@ public: + BGRATextureFormat = 0x00004000, + DDSTextureCompression = 0x00008000, + ETC1TextureCompression = 0x00010000, +- PVRTCTextureCompression = 0x00020000 ++ PVRTCTextureCompression = 0x00020000, ++ FragmentShader = 0x00040000 + }; + Q_DECLARE_FLAGS(Extensions, Extension) + +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0971-Fix-GL_BGRA-formats-under-OpenGL-ES-systems.patch b/recipes/qt4/qt-4.6.0/0971-Fix-GL_BGRA-formats-under-OpenGL-ES-systems.patch new file mode 100644 index 0000000000..37ac6f20c4 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0971-Fix-GL_BGRA-formats-under-OpenGL-ES-systems.patch @@ -0,0 +1,40 @@ +From 05d4b4c72a5089885c1515833e34177607c2c511 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Tue, 8 Dec 2009 11:02:46 +1000 +Subject: [PATCH 0971/1244] Fix GL_BGRA formats under OpenGL/ES systems + +OpenGL/ES requires that the internal and external formats be the +same when calling glTexImage2D(). This caused problems with +devices that had the GL_EXT_bgra extension. + +This change makes the formats the same just before the upload and +also makes sure that the pixel type is GL_UNSIGNED_BYTE when +GL_BGRA is used. No change for desktop systems. + +Reviewed-by: Donald Carr +--- + src/opengl/qgl.cpp | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 1ff102f..967ba48 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -2234,6 +2234,14 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G + } + } + } ++#ifdef QT_OPENGL_ES ++ // OpenGL/ES requires that the internal and external formats be identical. ++ // This is typically used to convert GL_RGBA into GL_BGRA. ++ // Also, we need to use GL_UNSIGNED_BYTE when the format is GL_BGRA. ++ internalFormat = externalFormat; ++ if (pixel_type == GL_UNSIGNED_INT_8_8_8_8_REV) ++ pixel_type = GL_UNSIGNED_BYTE; ++#endif + #ifdef QGL_BIND_TEXTURE_DEBUG + printf(" - uploading, image.format=%d, externalFormat=0x%x, internalFormat=0x%x, pixel_type=0x%x\n", + img.format(), externalFormat, internalFormat, pixel_type); +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0991-QGtkStyle-support-for-the-inner-border-property-in-G.patch b/recipes/qt4/qt-4.6.0/0991-QGtkStyle-support-for-the-inner-border-property-in-G.patch new file mode 100644 index 0000000000..ee812f71f1 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0991-QGtkStyle-support-for-the-inner-border-property-in-G.patch @@ -0,0 +1,92 @@ +From f3c37838ab149a8a570b7f1df987705815ae45c0 Mon Sep 17 00:00:00 2001 +From: Robert Griebl +Date: Tue, 8 Dec 2009 17:10:57 +0100 +Subject: [PATCH 0991/1244] QGtkStyle: support for the inner-border property in GtkButtons + +This additional padding was not taken into account up to now. It didn't +matter for desktop themes, but Maemo5 uses a large (8pix) padding that can +not be ignored. + +Reviewed-by: jbache +--- + src/gui/styles/qgtkstyle.cpp | 16 ++++++++++++++++ + src/gui/styles/qgtkstyle_p.cpp | 2 ++ + src/gui/styles/qgtkstyle_p.h | 2 ++ + 3 files changed, 20 insertions(+), 0 deletions(-) + +diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp +index afa3325..097a2b5 100644 +--- a/src/gui/styles/qgtkstyle.cpp ++++ b/src/gui/styles/qgtkstyle.cpp +@@ -3375,12 +3375,28 @@ QIcon QGtkStyle::standardIconImplementation(StandardPixmap standardIcon, + /*! \reimp */ + QRect QGtkStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const + { ++ Q_D(const QGtkStyle); ++ + QRect r = QCleanlooksStyle::subElementRect(element, option, widget); + switch (element) { + case SE_ProgressBarLabel: + case SE_ProgressBarContents: + case SE_ProgressBarGroove: + return option->rect; ++ case SE_PushButtonContents: ++ if (!d->gtk_check_version(2, 10, 0)) { ++ GtkWidget *gtkButton = d->gtkWidget(QLS("GtkButton")); ++ GtkBorder *border = 0; ++ d->gtk_widget_style_get(gtkButton, "inner-border", &border, NULL); ++ if (border) { ++ r = option->rect.adjusted(border->left, border->top, -border->right, -border->top); ++ d->gtk_border_free(border); ++ } else { ++ r = option->rect.adjusted(1, 1, -1, -1); ++ } ++ r = visualRect(option->direction, option->rect, r); ++ } ++ break; + default: + break; + } +diff --git a/src/gui/styles/qgtkstyle_p.cpp b/src/gui/styles/qgtkstyle_p.cpp +index 22dfc62..a644a5b 100644 +--- a/src/gui/styles/qgtkstyle_p.cpp ++++ b/src/gui/styles/qgtkstyle_p.cpp +@@ -158,6 +158,7 @@ Ptr_gtk_window_get_type QGtkStylePrivate::gtk_window_get_type = 0; + Ptr_gtk_widget_get_type QGtkStylePrivate::gtk_widget_get_type = 0; + Ptr_gtk_rc_get_style_by_paths QGtkStylePrivate::gtk_rc_get_style_by_paths = 0; + Ptr_gtk_check_version QGtkStylePrivate::gtk_check_version = 0; ++Ptr_gtk_border_free QGtkStylePrivate::gtk_border_free = 0; + + Ptr_pango_font_description_get_size QGtkStylePrivate::pango_font_description_get_size = 0; + Ptr_pango_font_description_get_weight QGtkStylePrivate::pango_font_description_get_weight = 0; +@@ -416,6 +417,7 @@ void QGtkStylePrivate::resolveGtk() const + gtk_widget_get_type =(Ptr_gtk_widget_get_type)libgtk.resolve("gtk_widget_get_type"); + gtk_rc_get_style_by_paths =(Ptr_gtk_rc_get_style_by_paths)libgtk.resolve("gtk_rc_get_style_by_paths"); + gtk_check_version =(Ptr_gtk_check_version)libgtk.resolve("gtk_check_version"); ++ gtk_border_free =(Ptr_gtk_border_free)libgtk.resolve("gtk_border_free"); + pango_font_description_get_size = (Ptr_pango_font_description_get_size)libgtk.resolve("pango_font_description_get_size"); + pango_font_description_get_weight = (Ptr_pango_font_description_get_weight)libgtk.resolve("pango_font_description_get_weight"); + pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family"); +diff --git a/src/gui/styles/qgtkstyle_p.h b/src/gui/styles/qgtkstyle_p.h +index f6ab8a3..c27308f 100644 +--- a/src/gui/styles/qgtkstyle_p.h ++++ b/src/gui/styles/qgtkstyle_p.h +@@ -176,6 +176,7 @@ typedef GtkWidget* (*Ptr_gtk_file_chooser_dialog_new)(const gchar *title, + typedef void (*Ptr_gtk_file_chooser_set_current_name) (GtkFileChooser *, const gchar *); + typedef gboolean (*Ptr_gtk_file_chooser_set_filename) (GtkFileChooser *chooser, const gchar *name); + typedef gint (*Ptr_gtk_dialog_run) (GtkDialog*); ++typedef void (*Ptr_gtk_border_free)(GtkBorder *); + + typedef guchar* (*Ptr_gdk_pixbuf_get_pixels) (const GdkPixbuf *pixbuf); + typedef int (*Ptr_gdk_pixbuf_get_width) (const GdkPixbuf *pixbuf); +@@ -371,6 +372,7 @@ public: + static Ptr_gtk_widget_get_type gtk_widget_get_type; + static Ptr_gtk_rc_get_style_by_paths gtk_rc_get_style_by_paths; + static Ptr_gtk_check_version gtk_check_version; ++ static Ptr_gtk_border_free gtk_border_free; + + static Ptr_pango_font_description_get_size pango_font_description_get_size; + static Ptr_pango_font_description_get_weight pango_font_description_get_weight; +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch b/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch new file mode 100644 index 0000000000..301fba29fd --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0992-Make-sure-a-context-is-current-when-loading-compress.patch @@ -0,0 +1,33 @@ +From 51297287f1be5c31337203cbf5a0e3eae6047a88 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Wed, 9 Dec 2009 08:46:37 +1000 +Subject: [PATCH 0992/1244] Make sure a context is current when loading compressed textures. + +Reviewed-by: trustme +--- + src/opengl/qpixmapdata_gl.cpp | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp +index 0299cea..4e1d50d 100644 +--- a/src/opengl/qpixmapdata_gl.cpp ++++ b/src/opengl/qpixmapdata_gl.cpp +@@ -424,6 +424,7 @@ bool QGLPixmapData::fromFile(const QString &filename, const char *format, + resize(0, 0); + data = file.readAll(); + file.close(); ++ QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QSize size = m_texture.bindCompressedTexture + (data.constData(), data.size(), format); + if (!size.isEmpty()) { +@@ -449,6 +450,7 @@ bool QGLPixmapData::fromData(const uchar *buffer, uint len, const char *format, + const char *buf = reinterpret_cast(buffer); + if (m_texture.canBindCompressedTexture(buf, int(len), format, &alpha)) { + resize(0, 0); ++ QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QSize size = m_texture.bindCompressedTexture(buf, int(len), format); + if (!size.isEmpty()) { + w = size.width(); +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0993-Fix-upside-down-PVR-compressed-textures.patch b/recipes/qt4/qt-4.6.0/0993-Fix-upside-down-PVR-compressed-textures.patch new file mode 100644 index 0000000000..70aeb7bbf0 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0993-Fix-upside-down-PVR-compressed-textures.patch @@ -0,0 +1,36 @@ +From 62fac41edfff5e42e4c3308376cb08e5d9a10afe Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Wed, 9 Dec 2009 09:10:11 +1000 +Subject: [PATCH 0993/1244] Fix upside down PVR compressed textures. + +The "vertical flip" flag in the PVR format is the inverse of the +"inverted y" state that we use in Qt. + +Reviewed-by: trustme +--- + src/opengl/qgl.cpp | 7 ++++--- + 1 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 967ba48..8003a29 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -5363,11 +5363,12 @@ QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len) + // Restore the default pixel alignment for later texture uploads. + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + +- // Set the invert flag for the texture. ++ // Set the invert flag for the texture. The "vertical flip" ++ // flag in PVR is the opposite sense to our sense of inversion. + if ((pvrHeader->flags & PVR_VERTICAL_FLIP) != 0) +- options |= QGLContext::InvertedYBindOption; +- else + options &= ~QGLContext::InvertedYBindOption; ++ else ++ options |= QGLContext::InvertedYBindOption; + + return QSize(pvrHeader->width, pvrHeader->height); + } +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0996-Export-QGLShareRegister-because-qgl_share_reg-is-exp.patch b/recipes/qt4/qt-4.6.0/0996-Export-QGLShareRegister-because-qgl_share_reg-is-exp.patch new file mode 100644 index 0000000000..52303d9ed8 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0996-Export-QGLShareRegister-because-qgl_share_reg-is-exp.patch @@ -0,0 +1,26 @@ +From f59908d4a6edcd333a156d4c94ddbd9b30f7e810 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Wed, 9 Dec 2009 11:06:30 +1000 +Subject: [PATCH 0996/1244] Export QGLShareRegister because qgl_share_reg() is exported + +Reviewed-by: trustme +--- + src/opengl/qgl_p.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index 179d69a..615fb60 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -397,7 +397,7 @@ public: + Q_DECLARE_OPERATORS_FOR_FLAGS(QGLExtensions::Extensions) + + +-class Q_AUTOTEST_EXPORT QGLShareRegister ++class Q_OPENGL_EXPORT QGLShareRegister + { + public: + QGLShareRegister() {} +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0998-Set-stacking-class-for-stays-on-top-windows-in-DFB.patch b/recipes/qt4/qt-4.6.0/0998-Set-stacking-class-for-stays-on-top-windows-in-DFB.patch new file mode 100644 index 0000000000..b8687949e0 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0998-Set-stacking-class-for-stays-on-top-windows-in-DFB.patch @@ -0,0 +1,39 @@ +From 472c13edc85a6c7efef1e3b904333d0c9a5f9da6 Mon Sep 17 00:00:00 2001 +From: Anders Bakken +Date: Thu, 3 Dec 2009 08:55:20 -0800 +Subject: [PATCH 0998/1244] Set stacking class for stays-on-top windows in DFB + +For better compatibility with non-QWS DirectFB apps running in the same +session we should set the stacking class of Windows that have the +StaysOnTop flag set. This corresponds nicely to DWSC_UPPER. + +Reviewed-by: Jervey Kong +--- + .../gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +index 021d52e..b79418a 100644 +--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +@@ -128,7 +128,6 @@ IDirectFBWindow *QDirectFBWindowSurface::directFBWindow() const + return (dfbWindow ? dfbWindow : (sibling ? sibling->dfbWindow : 0)); + } + +- + void QDirectFBWindowSurface::createWindow(const QRect &rect) + { + IDirectFBDisplayLayer *layer = screen->dfbDisplayLayer(); +@@ -169,6 +168,9 @@ void QDirectFBWindowSurface::createWindow(const QRect &rect) + DirectFBErrorFatal("QDirectFBWindowSurface::createWindow", result); + + if (window()) { ++ if (window()->windowFlags() & Qt::WindowStaysOnTopHint) { ++ dfbWindow->SetStackingClass(dfbWindow, DWSC_UPPER); ++ } + DFBWindowID winid; + result = dfbWindow->GetID(dfbWindow, &winid); + if (result != DFB_OK) { +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/0999-Enable-customizing-of-DirectFB-layer-to-use.patch b/recipes/qt4/qt-4.6.0/0999-Enable-customizing-of-DirectFB-layer-to-use.patch new file mode 100644 index 0000000000..5dcc670845 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/0999-Enable-customizing-of-DirectFB-layer-to-use.patch @@ -0,0 +1,41 @@ +From 941c6637a83f765c028f40973bb7bcca0ecbafb5 Mon Sep 17 00:00:00 2001 +From: Anders Bakken +Date: Tue, 8 Dec 2009 08:19:58 -0800 +Subject: [PATCH 0999/1244] Enable customizing of DirectFB layer to use + +This patch enables you to use a different layer for Qt apps by +specifying: + +E.g. + +QWS_DISPLAY=directfb:layerid=2 + +Reviewed-by: Donald Carr +--- + .../gfxdrivers/directfb/qdirectfbscreen.cpp | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +index 4cb0184..d3fe183 100644 +--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +@@ -1259,11 +1259,14 @@ bool QDirectFBScreen::connect(const QString &displaySpec) + setIntOption(displayArgs, QLatin1String("height"), &h); + + #ifndef QT_NO_DIRECTFB_LAYER +- result = d_ptr->dfb->GetDisplayLayer(d_ptr->dfb, DLID_PRIMARY, ++ int layerId = DLID_PRIMARY; ++ setIntOption(displayArgs, QLatin1String("layerid"), &layerId); ++ ++ result = d_ptr->dfb->GetDisplayLayer(d_ptr->dfb, static_cast(layerId), + &d_ptr->dfbLayer); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreen::connect: " +- "Unable to get primary display layer!", result); ++ "Unable to get display layer!", result); + return false; + } + result = d_ptr->dfbLayer->GetScreen(d_ptr->dfbLayer, &d_ptr->dfbScreen); +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1008-GLES-2-should-not-use-a-multisampled-format-by-defau.patch b/recipes/qt4/qt-4.6.0/1008-GLES-2-should-not-use-a-multisampled-format-by-defau.patch new file mode 100644 index 0000000000..f504599638 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1008-GLES-2-should-not-use-a-multisampled-format-by-defau.patch @@ -0,0 +1,46 @@ +From c4d66e27ea69b84bf280209fc72239132924930d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= +Date: Wed, 9 Dec 2009 12:14:58 +0100 +Subject: [PATCH 1008/1244] GLES 2 should *not* use a multisampled format by default. + +This is a platform regression and should never have been there in the +first place. Having this as the default format on embedded devices +may drop the framerates with as much as 30% on selected HW. + +Reviewed-by: Tom Cooksey +--- + src/opengl/qgl.cpp | 3 +-- + src/opengl/qgl_p.h | 3 --- + 2 files changed, 1 insertions(+), 5 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 25285b5..dcf8c00 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -397,8 +397,7 @@ static inline GLint qgluProject(GLdouble objx, GLdouble objy, GLdouble objz, + \i \link setDirectRendering() Direct rendering:\endlink Enabled. + \i \link setOverlay() Overlay:\endlink Disabled. + \i \link setPlane() Plane:\endlink 0 (i.e., normal plane). +- \i \link setSampleBuffers() Multisample buffers:\endlink Enabled on +- OpenGL/ES 2.0, disabled on other platforms. ++ \i \link setSampleBuffers() Multisample buffers:\endlink Disabled. + \endlist + */ + +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index 615fb60..8a0b31f 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -133,9 +133,6 @@ public: + : ref(1) + { + opts = QGL::DoubleBuffer | QGL::DepthBuffer | QGL::Rgba | QGL::DirectRendering | QGL::StencilBuffer; +-#if defined(QT_OPENGL_ES_2) +- opts |= QGL::SampleBuffers; +-#endif + pln = 0; + depthSize = accumSize = stencilSize = redSize = greenSize = blueSize = alphaSize = -1; + numSamples = -1; +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1115-Fix-QGLWidgets-created-with-an-alpha-channel-on-X11-.patch b/recipes/qt4/qt-4.6.0/1115-Fix-QGLWidgets-created-with-an-alpha-channel-on-X11-.patch new file mode 100644 index 0000000000..6b3ad4e860 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1115-Fix-QGLWidgets-created-with-an-alpha-channel-on-X11-.patch @@ -0,0 +1,30 @@ +From 6b29466ed7b5328ee61c1751bd4efb72f70946d3 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Tue, 15 Dec 2009 17:26:37 +0100 +Subject: [PATCH 1115/1244] Fix QGLWidgets created with an alpha channel on X11/EGL + +If the QGLWidget's QGLFormat says it should have an alpha +channel, try to find an ARGB Visual. + +Reviewed-By: Trond +Task-number: QT-2602 +--- + src/opengl/qgl_x11egl.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp +index b10e7e9..19026b3 100644 +--- a/src/opengl/qgl_x11egl.cpp ++++ b/src/opengl/qgl_x11egl.cpp +@@ -336,7 +336,7 @@ void QGLWidget::setContext(QGLContext *context, const QGLContext* shareContext, + // If the application has set WA_TranslucentBackground and not explicitly set + // the alpha buffer size to zero, modify the format so it have an alpha channel + QGLFormat& fmt = d->glcx->d_func()->glFormat; +- const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground); ++ const bool tryArgbVisual = testAttribute(Qt::WA_TranslucentBackground) || fmt.alpha(); + if (tryArgbVisual && fmt.alphaBufferSize() == -1) + fmt.setAlphaBufferSize(1); + +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1118-Fix-EGL-surface-leaks-when-re-parenting-QGLWidget-on.patch b/recipes/qt4/qt-4.6.0/1118-Fix-EGL-surface-leaks-when-re-parenting-QGLWidget-on.patch new file mode 100644 index 0000000000..b0a2147020 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1118-Fix-EGL-surface-leaks-when-re-parenting-QGLWidget-on.patch @@ -0,0 +1,116 @@ +From 9f3ae04fae52cd37855b135a0f2f519d1c5b969c Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Tue, 15 Dec 2009 18:11:05 +0100 +Subject: [PATCH 1118/1244] Fix EGL surface leaks when re-parenting QGLWidget on X11/EGL + +When a QGLWidget is re-parented, it's native X11 window usually +gets destroyed and re-created. This also happens when you set a +window attribute or flag. On EGL, we must destroy the surface +for the window before destroying the window itself, otherwise +we can leak the surface. This also fixes lots of BadDrawable +errors when running the autotests (which were due to surface +leaks!). + +Reviewed-By: TrustMe +--- + src/opengl/qgl.cpp | 5 +++++ + src/opengl/qgl.h | 1 + + src/opengl/qgl_egl.cpp | 34 +++++++++++++++++++++------------- + src/opengl/qgl_p.h | 1 + + 4 files changed, 28 insertions(+), 13 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 2a3ce54..32534aa 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -3810,6 +3810,11 @@ bool QGLWidget::event(QEvent *e) + } + + #if defined(QT_OPENGL_ES) ++ // A re-parent is likely to destroy the X11 window and re-create it. It is important ++ // that we free the EGL surface _before_ the winID changes - otherwise we can leak. ++ if (e->type() == QEvent::ParentAboutToChange) ++ d->glcx->d_func()->destroyEglSurfaceForDevice(); ++ + if ((e->type() == QEvent::ParentChange) || (e->type() == QEvent::WindowStateChange)) { + // The window may have been re-created during re-parent or state change - if so, the EGL + // surface will need to be re-created. +diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h +index 079953f..2076c46 100644 +--- a/src/opengl/qgl.h ++++ b/src/opengl/qgl.h +@@ -546,6 +546,7 @@ private: + friend class QGLPixelBuffer; + friend class QGLPixelBufferPrivate; + friend class QGLContext; ++ friend class QGLContextPrivate; + friend class QGLOverlayWidget; + friend class QOpenGLPaintEngine; + friend class QGLPaintDevice; +diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp +index fbf0349..839e8eb 100644 +--- a/src/opengl/qgl_egl.cpp ++++ b/src/opengl/qgl_egl.cpp +@@ -142,19 +142,7 @@ void QGLContext::reset() + d->cleanup(); + doneCurrent(); + if (d->eglContext) { +- if (d->eglSurface != EGL_NO_SURFACE) { +-#ifdef Q_WS_X11 +- // Make sure we don't call eglDestroySurface on a surface which +- // was created for a different winId: +- if (d->paintDevice->devType() == QInternal::Widget) { +- QGLWidget* w = static_cast(d->paintDevice); +- +- if (w->d_func()->eglSurfaceWindowId == w->winId()) +- eglDestroySurface(d->eglContext->display(), d->eglSurface); +- } else +-#endif +- eglDestroySurface(d->eglContext->display(), d->eglSurface); +- } ++ d->destroyEglSurfaceForDevice(); + delete d->eglContext; + } + d->eglContext = 0; +@@ -198,6 +186,26 @@ void QGLContext::swapBuffers() const + d->eglContext->swapBuffers(d->eglSurface); + } + ++void QGLContextPrivate::destroyEglSurfaceForDevice() ++{ ++ if (eglSurface != EGL_NO_SURFACE) { ++#ifdef Q_WS_X11 ++ // Make sure we don't call eglDestroySurface on a surface which ++ // was created for a different winId: ++ if (paintDevice->devType() == QInternal::Widget) { ++ QGLWidget* w = static_cast(paintDevice); ++ ++ if (w->d_func()->eglSurfaceWindowId == w->winId()) ++ eglDestroySurface(eglContext->display(), eglSurface); ++ else ++ qWarning("WARNING: Potential EGL surface leak!"); ++ } else ++#endif ++ eglDestroySurface(eglContext->display(), eglSurface); ++ eglSurface = EGL_NO_SURFACE; ++ } ++} ++ + void QGLWidget::setMouseTracking(bool enable) + { + QWidget::setMouseTracking(enable); +diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h +index 11770d3..99c0f33 100644 +--- a/src/opengl/qgl_p.h ++++ b/src/opengl/qgl_p.h +@@ -288,6 +288,7 @@ public: + #if defined(QT_OPENGL_ES) + QEglContext *eglContext; + EGLSurface eglSurface; ++ void destroyEglSurfaceForDevice(); + #elif defined(Q_WS_X11) || defined(Q_WS_MAC) + void* cx; + #endif +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1136-Disable-depth-testing-during-the-2D-QGLWidget-render.patch b/recipes/qt4/qt-4.6.0/1136-Disable-depth-testing-during-the-2D-QGLWidget-render.patch new file mode 100644 index 0000000000..30abab6468 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1136-Disable-depth-testing-during-the-2D-QGLWidget-render.patch @@ -0,0 +1,54 @@ +From 7371d787d9b2667132c0caadb9964189b1d8c9fc Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Thu, 17 Dec 2009 11:17:11 +1000 +Subject: [PATCH 1136/1244] Disable depth testing during the 2D QGLWidget::renderText() + +Also document the depth testing conditions for the 2D and 3D +versions of the function. + +Task-number: QTBUG-5041 +Reviewed-by: Daniel Pope +--- + src/opengl/qgl.cpp | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp +index 32534aa..466e851 100644 +--- a/src/opengl/qgl.cpp ++++ b/src/opengl/qgl.cpp +@@ -4302,6 +4302,7 @@ static void qt_save_gl_state() + glDisable(GL_CULL_FACE); + glDisable(GL_LIGHTING); + glDisable(GL_STENCIL_TEST); ++ glDisable(GL_DEPTH_TEST); + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + } +@@ -4355,6 +4356,10 @@ static void qt_gl_draw_text(QPainter *p, int x, int y, const QString &str, + \note This function clears the stencil buffer. + + \note This function is not supported on OpenGL/ES systems. ++ ++ \note This function temporarily disables depth-testing when the ++ text is drawn. ++ + \l{Overpainting Example}{Overpaint} with QPainter::drawText() instead. + */ + +@@ -4445,6 +4450,13 @@ void QGLWidget::renderText(int x, int y, const QString &str, const QFont &font, + have the labels move with the model as it is rotated etc. + + \note This function is not supported on OpenGL/ES systems. ++ ++ \note If depth testing is enabled before this function is called, ++ then the drawn text will be depth-tested against the models that ++ have already been drawn in the scene. Use \c{glDisable(GL_DEPTH_TEST)} ++ before calling this function to annotate the models without ++ depth-testing the text. ++ + \l{Overpainting Example}{Overpaint} with QPainter::drawText() instead. + */ + void QGLWidget::renderText(double x, double y, double z, const QString &str, const QFont &font, int) +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1149-GL2Engine-Don-t-mark-brush-as-dirty-if-it-hasn-t-cha.patch b/recipes/qt4/qt-4.6.0/1149-GL2Engine-Don-t-mark-brush-as-dirty-if-it-hasn-t-cha.patch new file mode 100644 index 0000000000..49cd32bc07 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1149-GL2Engine-Don-t-mark-brush-as-dirty-if-it-hasn-t-cha.patch @@ -0,0 +1,307 @@ +From ca30ced65ead8e81dfcb25178f4bfb6244487356 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Thu, 17 Dec 2009 14:34:16 +0100 +Subject: [PATCH 1149/1244] GL2Engine: Don't mark brush as dirty if it hasn't changed +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If the same brush is used over and over again, this gives a +huge performance boost (measured to be 25% faster on desktop +and 73% faster on SGX). + +Reviewed-By: Samuel Rødal +--- + .../gl2paintengineex/qglengineshadermanager.cpp | 1 + + .../gl2paintengineex/qpaintengineex_opengl2.cpp | 69 +++++++++++--------- + .../gl2paintengineex/qpaintengineex_opengl2_p.h | 5 +- + 3 files changed, 41 insertions(+), 34 deletions(-) + +diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +index 8a8f483..1187c2d 100644 +--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp ++++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +@@ -406,6 +406,7 @@ void QGLEngineShaderManager::setDirty() + + void QGLEngineShaderManager::setSrcPixelType(Qt::BrushStyle style) + { ++ Q_ASSERT(style != Qt::NoBrush); + if (srcPixelType == PixelSrcType(style)) + return; + +diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +index fb9bcb4..8ca2fd4 100644 +--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp ++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +@@ -386,19 +386,25 @@ inline QColor qt_premultiplyColor(QColor c, GLfloat opacity) + } + + +-void QGL2PaintEngineExPrivate::setBrush(const QBrush* brush) ++void QGL2PaintEngineExPrivate::setBrush(const QBrush& brush) + { ++ Q_ASSERT(brush.style() != Qt::NoBrush); ++ ++ if (qbrush_fast_equals(currentBrush, brush)) ++ return; ++ + currentBrush = brush; ++ + brushTextureDirty = true; + brushUniformsDirty = true; +- if (currentBrush->style() == Qt::TexturePattern +- && qHasPixmapTexture(*brush) && brush->texture().isQBitmap()) ++ if (currentBrush.style() == Qt::TexturePattern ++ && qHasPixmapTexture(brush) && brush.texture().isQBitmap()) + { + shaderManager->setSrcPixelType(QGLEngineShaderManager::TextureSrcWithPattern); + } else { +- shaderManager->setSrcPixelType(currentBrush->style()); ++ shaderManager->setSrcPixelType(currentBrush.style()); + } +- shaderManager->optimiseForBrushTransform(currentBrush->transform()); ++ shaderManager->optimiseForBrushTransform(currentBrush.transform()); + } + + +@@ -420,7 +426,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() + { + Q_Q(QGL2PaintEngineEx); + // qDebug("QGL2PaintEngineExPrivate::updateBrushTexture()"); +- Qt::BrushStyle style = currentBrush->style(); ++ Qt::BrushStyle style = currentBrush.style(); + + if ( (style >= Qt::Dense1Pattern) && (style <= Qt::DiagCrossPattern) ) { + // Get the image data for the pattern +@@ -433,7 +439,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() + else if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern) { + // Gradiant brush: All the gradiants use the same texture + +- const QGradient* g = currentBrush->gradient(); ++ const QGradient* g = currentBrush.gradient(); + + // We apply global opacity in the fragment shaders, so we always pass 1.0 + // for opacity to the cache. +@@ -450,7 +456,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() + updateTextureFilter(GL_TEXTURE_2D, GL_CLAMP_TO_EDGE, q->state()->renderHints & QPainter::SmoothPixmapTransform); + } + else if (style == Qt::TexturePattern) { +- const QPixmap& texPixmap = currentBrush->texture(); ++ const QPixmap& texPixmap = currentBrush.texture(); + + glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); + QGLTexture *tex = ctx->d_func()->bindTexture(texPixmap, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); +@@ -464,15 +470,15 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() + void QGL2PaintEngineExPrivate::updateBrushUniforms() + { + // qDebug("QGL2PaintEngineExPrivate::updateBrushUniforms()"); +- Qt::BrushStyle style = currentBrush->style(); ++ Qt::BrushStyle style = currentBrush.style(); + + if (style == Qt::NoBrush) + return; + +- QTransform brushQTransform = currentBrush->transform(); ++ QTransform brushQTransform = currentBrush.transform(); + + if (style == Qt::SolidPattern) { +- QColor col = qt_premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity); ++ QColor col = qt_premultiplyColor(currentBrush.color(), (GLfloat)q->state()->opacity); + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::FragmentColor), col); + } + else { +@@ -480,7 +486,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms() + QPointF translationPoint; + + if (style <= Qt::DiagCrossPattern) { +- QColor col = qt_premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity); ++ QColor col = qt_premultiplyColor(currentBrush.color(), (GLfloat)q->state()->opacity); + + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col); + +@@ -488,7 +494,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms() + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize); + } + else if (style == Qt::LinearGradientPattern) { +- const QLinearGradient *g = static_cast(currentBrush->gradient()); ++ const QLinearGradient *g = static_cast(currentBrush.gradient()); + + QPointF realStart = g->start(); + QPointF realFinal = g->finalStop(); +@@ -508,7 +514,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms() + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize); + } + else if (style == Qt::ConicalGradientPattern) { +- const QConicalGradient *g = static_cast(currentBrush->gradient()); ++ const QConicalGradient *g = static_cast(currentBrush.gradient()); + translationPoint = g->center(); + + GLfloat angle = -(g->angle() * 2 * Q_PI) / 360.0; +@@ -519,7 +525,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms() + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize); + } + else if (style == Qt::RadialGradientPattern) { +- const QRadialGradient *g = static_cast(currentBrush->gradient()); ++ const QRadialGradient *g = static_cast(currentBrush.gradient()); + QPointF realCenter = g->center(); + QPointF realFocal = g->focalPoint(); + qreal realRadius = g->radius(); +@@ -537,10 +543,10 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms() + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::HalfViewportSize), halfViewportSize); + } + else if (style == Qt::TexturePattern) { +- const QPixmap& texPixmap = currentBrush->texture(); ++ const QPixmap& texPixmap = currentBrush.texture(); + +- if (qHasPixmapTexture(*currentBrush) && currentBrush->texture().isQBitmap()) { +- QColor col = qt_premultiplyColor(currentBrush->color(), (GLfloat)q->state()->opacity); ++ if (qHasPixmapTexture(currentBrush) && currentBrush.texture().isQBitmap()) { ++ QColor col = qt_premultiplyColor(currentBrush.color(), (GLfloat)q->state()->opacity); + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::PatternColor), col); + } + +@@ -561,7 +567,7 @@ void QGL2PaintEngineExPrivate::updateBrushUniforms() + QTransform gl_to_qt(1, 0, 0, -1, 0, height); + QTransform inv_matrix; + if (style == Qt::TexturePattern && textureInvertedY == -1) +- inv_matrix = gl_to_qt * (QTransform(1, 0, 0, -1, 0, currentBrush->texture().height()) * brushQTransform * matrix).inverted() * translate; ++ inv_matrix = gl_to_qt * (QTransform(1, 0, 0, -1, 0, currentBrush.texture().height()) * brushQTransform * matrix).inverted() * translate; + else + inv_matrix = gl_to_qt * (brushQTransform * matrix).inverted() * translate; + +@@ -866,7 +872,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) + // Check to see if there's any hints + if (path.shape() == QVectorPath::RectangleHint) { + QGLRect rect(points[0].x(), points[0].y(), points[2].x(), points[2].y()); +- prepareForDraw(currentBrush->isOpaque()); ++ prepareForDraw(currentBrush.isOpaque()); + composite(rect); + } else if (path.isConvex()) { + +@@ -914,7 +920,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) + #endif + } + +- prepareForDraw(currentBrush->isOpaque()); ++ prepareForDraw(currentBrush.isOpaque()); + glEnableVertexAttribArray(QT_VERTEX_COORDS_ATTR); + #ifdef QT_OPENGL_CACHE_AS_VBOS + glBindBuffer(GL_ARRAY_BUFFER, cache->vbo); +@@ -933,7 +939,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) + path.makeCacheable(); + vertexCoordinateArray.clear(); + vertexCoordinateArray.addPath(path, inverseScale, false); +- prepareForDraw(currentBrush->isOpaque()); ++ prepareForDraw(currentBrush.isOpaque()); + drawVertexArrays(vertexCoordinateArray, GL_TRIANGLE_FAN); + } + +@@ -958,7 +964,7 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) + glStencilFunc(GL_NOTEQUAL, 0, GL_STENCIL_HIGH_BIT); + } + +- prepareForDraw(currentBrush->isOpaque()); ++ prepareForDraw(currentBrush.isOpaque()); + + if (inRenderText) + prepareDepthRangeForRenderText(); +@@ -1155,10 +1161,10 @@ bool QGL2PaintEngineExPrivate::prepareForDraw(bool srcPixelsAreOpaque) + : QGLEngineShaderManager::NoOpacity; + if (stateHasOpacity && (mode != ImageDrawingMode)) { + // Using a brush +- bool brushIsPattern = (currentBrush->style() >= Qt::Dense1Pattern) && +- (currentBrush->style() <= Qt::DiagCrossPattern); ++ bool brushIsPattern = (currentBrush.style() >= Qt::Dense1Pattern) && ++ (currentBrush.style() <= Qt::DiagCrossPattern); + +- if ((currentBrush->style() == Qt::SolidPattern) || brushIsPattern) ++ if ((currentBrush.style() == Qt::SolidPattern) || brushIsPattern) + opacityMode = QGLEngineShaderManager::NoOpacity; // Global opacity handled by srcPixel shader + } + } +@@ -1286,7 +1292,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush) + d->matrixDirty = true; + } + +- d->setBrush(&brush); ++ d->setBrush(brush); + d->fill(path); + + if (doOffset) { +@@ -1325,7 +1331,7 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) + } + + bool opaque = penBrush.isOpaque() && s->opacity > 0.99; +- d->setBrush(&penBrush); ++ d->setBrush(penBrush); + d->transferMode(BrushDrawingMode); + + // updateMatrix() is responsible for setting the inverse scale on +@@ -1604,7 +1610,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly + glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, textureCoordinateArray.data()); + + QBrush pensBrush = q->state()->pen.brush(); +- setBrush(&pensBrush); ++ setBrush(pensBrush); + + if (inRenderText) + prepareDepthRangeForRenderText(); +@@ -1649,7 +1655,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly + q->state()->opacity = 1; + opacityUniformDirty = true; + pensBrush = Qt::white; +- setBrush(&pensBrush); ++ setBrush(pensBrush); + } + + compositionModeDirty = false; // I can handle this myself, thank you very much +@@ -1670,7 +1676,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(const QPointF &p, QFontEngineGly + q->state()->opacity = oldOpacity; + opacityUniformDirty = true; + pensBrush = q->state()->pen.brush(); +- setBrush(&pensBrush); ++ setBrush(pensBrush); + } + + compositionModeDirty = false; +@@ -1815,6 +1821,7 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) + d->opacityUniformDirty = true; + d->needsSync = true; + d->use_system_clip = !systemClip().isEmpty(); ++ d->currentBrush = QBrush(); + + d->dirtyStencilRegion = QRect(0, 0, d->width, d->height); + d->stencilClean = true; +diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +index 77ca3a8..33ce24d 100644 +--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h ++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +@@ -171,7 +171,6 @@ public: + q(q_ptr), + width(0), height(0), + ctx(0), +- currentBrush(0), + inverseScale(1), + shaderManager(0), + inRenderText(false) +@@ -185,7 +184,7 @@ public: + void updateCompositionMode(); + void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id = -1); + +- void setBrush(const QBrush* brush); ++ void setBrush(const QBrush& brush); + + void transferMode(EngineMode newMode); + void resetGLState(); +@@ -244,7 +243,7 @@ public: + QRect currentScissorBounds; + uint maxClip; + +- const QBrush* currentBrush; // May not be the state's brush! ++ QBrush currentBrush; // May not be the state's brush! + + GLfloat inverseScale; + +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1157-Align-GL_RGB-lines-on-a-4-byte-boundary-when-uploadi.patch b/recipes/qt4/qt-4.6.0/1157-Align-GL_RGB-lines-on-a-4-byte-boundary-when-uploadi.patch new file mode 100644 index 0000000000..4029d0dc33 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1157-Align-GL_RGB-lines-on-a-4-byte-boundary-when-uploadi.patch @@ -0,0 +1,45 @@ +From 87777f7c0f4c3e338d23d2c3d368a8a484a35a6e Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Fri, 18 Dec 2009 15:01:07 +1000 +Subject: [PATCH 1157/1244] Align GL_RGB lines on a 4-byte boundary when uploading pixmap textures + +Previous code was aligning lines on a 3-byte boundary. + +Task-number: QTBUG-6902 +Reviewed-by: Julian de Bhal +--- + src/opengl/qpixmapdata_gl.cpp | 15 ++------------- + 1 files changed, 2 insertions(+), 13 deletions(-) + +diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp +index 4e1d50d..92c990b 100644 +--- a/src/opengl/qpixmapdata_gl.cpp ++++ b/src/opengl/qpixmapdata_gl.cpp +@@ -341,22 +341,11 @@ void QGLPixmapData::ensureCreated() const + + if (!m_source.isNull()) { + if (external_format == GL_RGB) { +- QImage tx = m_source.convertToFormat(QImage::Format_RGB32); +- +- QVector pixelData(w * h * 3); +- uchar *p = &pixelData[0]; +- QRgb *src = (QRgb *)tx.bits(); +- +- for (int i = 0; i < w * h; ++i) { +- *p++ = qRed(*src); +- *p++ = qGreen(*src); +- *p++ = qBlue(*src); +- ++src; +- } ++ const QImage tx = m_source.convertToFormat(QImage::Format_RGB888); + + glBindTexture(target, m_texture.id); + glTexSubImage2D(target, 0, 0, 0, w, h, external_format, +- GL_UNSIGNED_BYTE, &pixelData[0]); ++ GL_UNSIGNED_BYTE, tx.bits()); + } else { + const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format); + +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1165-NEON-configure-detection-and-initial-blend-function-.patch b/recipes/qt4/qt-4.6.0/1165-NEON-configure-detection-and-initial-blend-function-.patch new file mode 100644 index 0000000000..9d2ca87654 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1165-NEON-configure-detection-and-initial-blend-function-.patch @@ -0,0 +1,593 @@ + +Adds new NEON configure test and -no-neon configure option. NEON +implementations can also be turned off by setting the QT_NO_NEON +environment variable. + +Performance improvements (in frames per second): +- Blending ARGB32 on RGB32/ARGB32, mostly opaque: 71 % +- Blending ARGB32 on RGB32/ARGB32, no opaque pixels: 108 % +- Blending ARGB32 on RGB32/ARGB32, with 0.5 opacity: 158 % +- Blending RGB32 on RGB32/ARGB32, with 0.5 opacity: 189 % + +Task-number: QTBUG-6684 +Reviewed-by: Gunnar Sletta +Reviewed-by: Paul Olav Tvete +--- + config.tests/unix/neon/neon.cpp | 51 +++++++ + config.tests/unix/neon/neon.pro | 2 + + configure | 22 +++- + src/gui/painting/painting.pri | 7 + + src/gui/painting/qblendfunctions.cpp | 2 +- + src/gui/painting/qdrawhelper.cpp | 16 ++- + src/gui/painting/qdrawhelper_neon.cpp | 260 +++++++++++++++++++++++++++++++++ + src/gui/painting/qdrawhelper_neon_p.h | 76 ++++++++++ + 8 files changed, 432 insertions(+), 4 deletions(-) + create mode 100644 config.tests/unix/neon/neon.cpp + create mode 100644 config.tests/unix/neon/neon.pro + create mode 100644 src/gui/painting/qdrawhelper_neon.cpp + create mode 100644 src/gui/painting/qdrawhelper_neon_p.h + +diff --git a/config.tests/unix/neon/neon.cpp b/config.tests/unix/neon/neon.cpp +new file mode 100644 +index 0000000..c31a9fd +--- /dev/null ++++ b/config.tests/unix/neon/neon.cpp +@@ -0,0 +1,51 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ++** All rights reserved. ++** Contact: Nokia Corporation (qt-info@nokia.com) ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** No Commercial Usage ++** This file contains pre-release code and may not be distributed. ++** You may use this file in accordance with the terms and conditions ++** contained in the Technology Preview License Agreement accompanying ++** this package. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Nokia gives you certain additional ++** rights. These rights are described in the Nokia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** If you have questions regarding the use of this file, please contact ++** Nokia at qt-info@nokia.com. ++** ++** ++** ++** ++** ++** ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include ++ ++int main(int, char**) ++{ ++ int32x4_t null = vdupq_n_s32(0x0); ++ ++ int result; ++ vst1q_lane_s32(&result, null, 0); ++ return result; ++} +diff --git a/config.tests/unix/neon/neon.pro b/config.tests/unix/neon/neon.pro +new file mode 100644 +index 0000000..de20c4e +--- /dev/null ++++ b/config.tests/unix/neon/neon.pro +@@ -0,0 +1,2 @@ ++SOURCES = neon.cpp ++CONFIG -= x11 qt +diff --git a/configure b/configure +index 2114863..22e6bd4 100755 +--- a/configure ++++ b/configure +@@ -745,6 +745,7 @@ CFG_HOST_ENDIAN=auto + CFG_DOUBLEFORMAT=auto + CFG_ARMFPA=auto + CFG_IWMMXT=no ++CFG_NEON=auto + CFG_CLOCK_GETTIME=auto + CFG_CLOCK_MONOTONIC=auto + CFG_MREMAP=auto +@@ -1604,6 +1605,13 @@ while [ "$#" -gt 0 ]; do + iwmmxt) + CFG_IWMMXT="yes" + ;; ++ neon) ++ if [ "$VAL" = "no" ]; then ++ CFG_NEON="$VAL" ++ else ++ UNKNOWN_OPT=yes ++ fi ++ ;; + reduce-relocations) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_REDUCE_RELOCATIONS="$VAL" +@@ -3889,6 +3897,7 @@ Qt for Embedded Linux only: + -iwmmxt ............ Compile using the iWMMXt instruction set + (available on some XScale CPUs). + ++ -no-neon ........... Do not compile with use of NEON instructions. + EOF + fi + +@@ -4509,6 +4518,15 @@ if [ "$CFG_IWMMXT" = "yes" ]; then + fi + fi + ++# detect neon support ++if ([ "${CFG_ARCH}" = "arm" ] || [ "${CFG_ARCH}" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then ++ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then ++ CFG_NEON=yes ++ else ++ CFG_NEON=no ++ fi ++fi ++ + # detect zlib + if [ "$CFG_ZLIB" = "no" ]; then + # Note: Qt no longer support builds without zlib +@@ -6124,6 +6142,7 @@ fi + [ "$CFG_SSE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse" + [ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2" + [ "$CFG_IWMMXT" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG iwmmxt" ++[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon" + [ "$PLATFORM_MAC" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG $CFG_MAC_ARCHS" + if [ "$CFG_IPV6" = "yes" ]; then + QT_CONFIG="$QT_CONFIG ipv6" +@@ -7416,8 +7435,9 @@ echo "Declarative module .. $CFG_DECLARATIVE" + echo "STL support ......... $CFG_STL" + echo "PCH support ......... $CFG_PRECOMPILE" + echo "MMX/3DNOW/SSE/SSE2.. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}" +-if [ "${CFG_ARCH}" = "arm" ]; then ++if [ "${CFG_ARCH}" = "arm" ] || [ "${CFG_ARCH}" = "armv6" ]; then + echo "iWMMXt support ...... ${CFG_IWMMXT}" ++ echo "NEON support ........ ${CFG_NEON}" + fi + [ "${PLATFORM_QWS}" != "yes" ] && echo "Graphics System ..... $CFG_GRAPHICS_SYSTEM" + echo "IPv6 support ........ $CFG_IPV6" +diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri +index 628a109..0b1e79a 100644 +--- a/src/gui/painting/painting.pri ++++ b/src/gui/painting/painting.pri +@@ -379,6 +379,13 @@ symbian { + QMAKE_CXXFLAGS.ARMCC *= -O3 + } + ++neon { ++ DEFINES += QT_HAVE_NEON ++ HEADERS += painting/qdrawhelper_neon_p.h ++ SOURCES += painting/qdrawhelper_neon.cpp ++ ++} ++ + contains(QT_CONFIG, zlib) { + INCLUDEPATH += ../3rdparty/zlib + } else:!contains(QT_CONFIG, no-zlib) { +diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp +index 1d15dac..81d1515 100644 +--- a/src/gui/painting/qblendfunctions.cpp ++++ b/src/gui/painting/qblendfunctions.cpp +@@ -605,7 +605,7 @@ static void qt_blend_argb32_on_argb32(uchar *destPixels, int dbpl, + } + + +-static void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl, ++void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha) +diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp +index 23236ec..84cf5cc 100644 +--- a/src/gui/painting/qdrawhelper.cpp ++++ b/src/gui/painting/qdrawhelper.cpp +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -7725,7 +7726,8 @@ enum CPUFeatures { + SSE = 0x10, + SSE2 = 0x20, + CMOV = 0x40, +- IWMMXT = 0x80 ++ IWMMXT = 0x80, ++ NEON = 0x100 + }; + + static uint detectCPUFeatures() +@@ -7751,6 +7753,9 @@ static uint detectCPUFeatures() + // runtime detection only available when running as a previlegied process + static const bool doIWMMXT = !qgetenv("QT_NO_IWMMXT").toInt(); + return doIWMMXT ? IWMMXT : 0; ++#elif defined(QT_HAVE_NEON) ++ static const bool doNEON = !qgetenv("QT_NO_NEON").toInt(); ++ return doNEON ? NEON : 0; + #else + uint features = 0; + #if defined(__x86_64__) || defined(Q_OS_WIN64) +@@ -8122,7 +8127,14 @@ void qInitDrawhelperAsm() + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_armv6; + qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_armv6; + qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_armv6; +-#endif // Q_CC_RVCT && QT_HAVE_ARMV6 ++#elif defined(QT_HAVE_NEON) ++ if (features & NEON) { ++ qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; ++ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_neon; ++ qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; ++ qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_neon; ++ } ++#endif + + if (functionForModeSolidAsm) { + const int destinationMode = QPainter::CompositionMode_Destination; +diff --git a/src/gui/painting/qdrawhelper_neon.cpp b/src/gui/painting/qdrawhelper_neon.cpp +new file mode 100644 +index 0000000..7fe11bf +--- /dev/null ++++ b/src/gui/painting/qdrawhelper_neon.cpp +@@ -0,0 +1,260 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ++** All rights reserved. ++** Contact: Nokia Corporation (qt-info@nokia.com) ++** ++** This file is part of the QtGui module of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** No Commercial Usage ++** This file contains pre-release code and may not be distributed. ++** You may use this file in accordance with the terms and conditions ++** contained in the Technology Preview License Agreement accompanying ++** this package. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 as published by the Free Software ++** Foundation and appearing in the file LICENSE.LGPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU Lesser General Public License version 2.1 requirements ++** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** In addition, as a special exception, Nokia gives you certain additional ++** rights. These rights are described in the Nokia Qt LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** If you have questions regarding the use of this file, please contact ++** Nokia at qt-info@nokia.com. ++** ++** ++** ++** ++** ++** ++** ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include ++ ++#ifdef QT_HAVE_NEON ++ ++#include ++#include ++ ++QT_BEGIN_NAMESPACE ++ ++static inline int16x8_t qvdiv_255_s16(int16x8_t x, int16x8_t half) ++{ ++ // result = (x + (x >> 8) + 0x80) >> 8 ++ ++ const int16x8_t temp = vshrq_n_s16(x, 8); // x >> 8 ++ const int16x8_t sum_part = vaddq_s16(x, half); // x + 0x80 ++ const int16x8_t sum = vaddq_s16(temp, sum_part); ++ ++ return vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(sum), 8)); ++} ++ ++static inline int16x8_t qvbyte_mul_s16(int16x8_t x, int16x8_t alpha, int16x8_t half) ++{ ++ // t = qRound(x * alpha / 255.0) ++ ++ const int16x8_t t = vmulq_s16(x, alpha); // t ++ return qvdiv_255_s16(t, half); ++} ++ ++static inline int16x8_t qvinterpolate_pixel_255(int16x8_t x, int16x8_t a, int16x8_t y, int16x8_t b, int16x8_t half) ++{ ++ // t = x * a + y * b ++ ++ const int16x8_t ta = vmulq_s16(x, a); ++ const int16x8_t tb = vmulq_s16(y, b); ++ ++ return qvdiv_255_s16(vaddq_s16(ta, tb), half); ++} ++ ++static inline int16x8_t qvsource_over_s16(int16x8_t src16, int16x8_t dst16, int16x8_t half, int16x8_t full) ++{ ++ const int16x4_t alpha16_high = vdup_lane_s16(vget_high_s16(src16), 3); ++ const int16x4_t alpha16_low = vdup_lane_s16(vget_low_s16(src16), 3); ++ ++ const int16x8_t alpha16 = vsubq_s16(full, vcombine_s16(alpha16_low, alpha16_high)); ++ ++ return vaddq_s16(src16, qvbyte_mul_s16(dst16, alpha16, half)); ++} ++ ++void qt_blend_argb32_on_argb32_neon(uchar *destPixels, int dbpl, ++ const uchar *srcPixels, int sbpl, ++ int w, int h, ++ int const_alpha) ++{ ++ const uint *src = (const uint *) srcPixels; ++ uint *dst = (uint *) destPixels; ++ int16x8_t half = vdupq_n_s16(0x80); ++ int16x8_t full = vdupq_n_s16(0xff); ++ if (const_alpha == 256) { ++ for (int y = 0; y < h; ++y) { ++ int x = 0; ++ for (; x < w-3; x += 4) { ++ int32x4_t src32 = vld1q_s32((int32_t *)&src[x]); ++ if ((src[x] & src[x+1] & src[x+2] & src[x+3]) >= 0xff000000) { ++ // all opaque ++ vst1q_s32((int32_t *)&dst[x], src32); ++ } else if (src[x] | src[x+1] | src[x+2] | src[x+3]) { ++ int32x4_t dst32 = vld1q_s32((int32_t *)&dst[x]); ++ ++ const uint8x16_t src8 = vreinterpretq_u8_s32(src32); ++ const uint8x16_t dst8 = vreinterpretq_u8_s32(dst32); ++ ++ const uint8x8_t src8_low = vget_low_u8(src8); ++ const uint8x8_t dst8_low = vget_low_u8(dst8); ++ ++ const uint8x8_t src8_high = vget_high_u8(src8); ++ const uint8x8_t dst8_high = vget_high_u8(dst8); ++ ++ const int16x8_t src16_low = vreinterpretq_s16_u16(vmovl_u8(src8_low)); ++ const int16x8_t dst16_low = vreinterpretq_s16_u16(vmovl_u8(dst8_low)); ++ ++ const int16x8_t src16_high = vreinterpretq_s16_u16(vmovl_u8(src8_high)); ++ const int16x8_t dst16_high = vreinterpretq_s16_u16(vmovl_u8(dst8_high)); ++ ++ const int16x8_t result16_low = qvsource_over_s16(src16_low, dst16_low, half, full); ++ const int16x8_t result16_high = qvsource_over_s16(src16_high, dst16_high, half, full); ++ ++ const int32x2_t result32_low = vreinterpret_s32_s8(vmovn_s16(result16_low)); ++ const int32x2_t result32_high = vreinterpret_s32_s8(vmovn_s16(result16_high)); ++ ++ vst1q_s32((int32_t *)&dst[x], vcombine_s32(result32_low, result32_high)); ++ } ++ } ++ for (; x= 0xff000000) ++ dst[x] = s; ++ else if (s != 0) ++ dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); ++ } ++ dst = (quint32 *)(((uchar *) dst) + dbpl); ++ src = (const quint32 *)(((const uchar *) src) + sbpl); ++ } ++ } else if (const_alpha != 0) { ++ const_alpha = (const_alpha * 255) >> 8; ++ int16x8_t const_alpha16 = vdupq_n_s16(const_alpha); ++ for (int y = 0; y < h; ++y) { ++ int x = 0; ++ for (; x < w-3; x += 4) { ++ if (src[x] | src[x+1] | src[x+2] | src[x+3]) { ++ int32x4_t src32 = vld1q_s32((int32_t *)&src[x]); ++ int32x4_t dst32 = vld1q_s32((int32_t *)&dst[x]); ++ ++ const uint8x16_t src8 = vreinterpretq_u8_s32(src32); ++ const uint8x16_t dst8 = vreinterpretq_u8_s32(dst32); ++ ++ const uint8x8_t src8_low = vget_low_u8(src8); ++ const uint8x8_t dst8_low = vget_low_u8(dst8); ++ ++ const uint8x8_t src8_high = vget_high_u8(src8); ++ const uint8x8_t dst8_high = vget_high_u8(dst8); ++ ++ const int16x8_t src16_low = vreinterpretq_s16_u16(vmovl_u8(src8_low)); ++ const int16x8_t dst16_low = vreinterpretq_s16_u16(vmovl_u8(dst8_low)); ++ ++ const int16x8_t src16_high = vreinterpretq_s16_u16(vmovl_u8(src8_high)); ++ const int16x8_t dst16_high = vreinterpretq_s16_u16(vmovl_u8(dst8_high)); ++ ++ const int16x8_t srcalpha16_low = qvbyte_mul_s16(src16_low, const_alpha16, half); ++ const int16x8_t srcalpha16_high = qvbyte_mul_s16(src16_high, const_alpha16, half); ++ ++ const int16x8_t result16_low = qvsource_over_s16(srcalpha16_low, dst16_low, half, full); ++ const int16x8_t result16_high = qvsource_over_s16(srcalpha16_high, dst16_high, half, full); ++ ++ const int32x2_t result32_low = vreinterpret_s32_s8(vmovn_s16(result16_low)); ++ const int32x2_t result32_high = vreinterpret_s32_s8(vmovn_s16(result16_high)); ++ ++ vst1q_s32((int32_t *)&dst[x], vcombine_s32(result32_low, result32_high)); ++ } ++ } ++ for (; x> 8; ++ int one_minus_const_alpha = 255 - const_alpha; ++ int16x8_t const_alpha16 = vdupq_n_s16(const_alpha); ++ int16x8_t one_minus_const_alpha16 = vdupq_n_s16(255 - const_alpha); ++ for (int y = 0; y < h; ++y) { ++ int x = 0; ++ for (; x < w-3; x += 4) { ++ int32x4_t src32 = vld1q_s32((int32_t *)&src[x]); ++ int32x4_t dst32 = vld1q_s32((int32_t *)&dst[x]); ++ ++ const uint8x16_t src8 = vreinterpretq_u8_s32(src32); ++ const uint8x16_t dst8 = vreinterpretq_u8_s32(dst32); ++ ++ const uint8x8_t src8_low = vget_low_u8(src8); ++ const uint8x8_t dst8_low = vget_low_u8(dst8); ++ ++ const uint8x8_t src8_high = vget_high_u8(src8); ++ const uint8x8_t dst8_high = vget_high_u8(dst8); ++ ++ const int16x8_t src16_low = vreinterpretq_s16_u16(vmovl_u8(src8_low)); ++ const int16x8_t dst16_low = vreinterpretq_s16_u16(vmovl_u8(dst8_low)); ++ ++ const int16x8_t src16_high = vreinterpretq_s16_u16(vmovl_u8(src8_high)); ++ const int16x8_t dst16_high = vreinterpretq_s16_u16(vmovl_u8(dst8_high)); ++ ++ const int16x8_t result16_low = qvinterpolate_pixel_255(src16_low, const_alpha16, dst16_low, one_minus_const_alpha16, half); ++ const int16x8_t result16_high = qvinterpolate_pixel_255(src16_high, const_alpha16, dst16_high, one_minus_const_alpha16, half); ++ ++ const int32x2_t result32_low = vreinterpret_s32_s8(vmovn_s16(result16_low)); ++ const int32x2_t result32_high = vreinterpret_s32_s8(vmovn_s16(result16_high)); ++ ++ vst1q_s32((int32_t *)&dst[x], vcombine_s32(result32_low, result32_high)); ++ } ++ for (; x ++ ++QT_BEGIN_NAMESPACE ++ ++#ifdef QT_HAVE_NEON ++ ++void qt_blend_argb32_on_argb32_neon(uchar *destPixels, int dbpl, ++ const uchar *srcPixels, int sbpl, ++ int w, int h, ++ int const_alpha); ++ ++void qt_blend_rgb32_on_rgb32_neon(uchar *destPixels, int dbpl, ++ const uchar *srcPixels, int sbpl, ++ int w, int h, ++ int const_alpha); ++ ++#endif // QT_HAVE_NEON ++ ++QT_END_NAMESPACE ++ ++#endif // QDRAWHELPER_NEON_P_H +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1175-Fix-memory-leak-of-QGLGlyphCoord-objects-in-the-Open.patch b/recipes/qt4/qt-4.6.0/1175-Fix-memory-leak-of-QGLGlyphCoord-objects-in-the-Open.patch new file mode 100644 index 0000000000..7c79b6ba1c --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1175-Fix-memory-leak-of-QGLGlyphCoord-objects-in-the-Open.patch @@ -0,0 +1,60 @@ +From c2dca4c9f1eb360305de5ea520a0b322737dc600 Mon Sep 17 00:00:00 2001 +From: Rhys Weatherley +Date: Mon, 21 Dec 2009 08:35:43 +1000 +Subject: [PATCH 1175/1244] Fix memory leak of QGLGlyphCoord objects in the OpenGL1 paint engine + +Task-number: QTBUG-6936 +Reviewed-by: Julian de Bhal +--- + src/opengl/qpaintengine_opengl.cpp | 14 +++++++++++--- + 1 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp +index 4823408..9c15d56 100644 +--- a/src/opengl/qpaintengine_opengl.cpp ++++ b/src/opengl/qpaintengine_opengl.cpp +@@ -4707,6 +4707,12 @@ typedef QHash QGLFontGlyphHash; + typedef QHash QGLFontTexHash; + typedef QHash QGLContextHash; + ++static inline void qt_delete_glyph_hash(QGLGlyphHash *hash) ++{ ++ qDeleteAll(*hash); ++ delete hash; ++} ++ + class QGLGlyphCache : public QObject + { + Q_OBJECT +@@ -4747,7 +4753,7 @@ void QGLGlyphCache::fontEngineDestroyed(QObject *o) + if (font_cache->find(fe) != font_cache->end()) { + ctx = keys.at(i); + QGLGlyphHash *cache = font_cache->take(fe); +- delete cache; ++ qt_delete_glyph_hash(cache); + break; + } + } +@@ -4784,7 +4790,7 @@ void QGLGlyphCache::cleanupContext(const QGLContext *ctx) + QList keys = font_cache->keys(); + for (int i=0; i < keys.size(); ++i) { + QFontEngine *fe = keys.at(i); +- delete font_cache->take(fe); ++ qt_delete_glyph_hash(font_cache->take(fe)); + quint64 font_key = (reinterpret_cast(ctx) << 32) | reinterpret_cast(fe); + QGLFontTexture *font_tex = qt_font_textures.take(font_key); + if (font_tex) { +@@ -4825,7 +4831,9 @@ void QGLGlyphCache::cleanCache() + QList keys = qt_context_cache.keys(); + for (int i=0; i < keys.size(); ++i) { + QGLFontGlyphHash *font_cache = qt_context_cache.value(keys.at(i)); +- qDeleteAll(*font_cache); ++ QGLFontGlyphHash::Iterator it = font_cache->begin(); ++ for (; it != font_cache->end(); ++it) ++ qt_delete_glyph_hash(it.value()); + font_cache->clear(); + } + qDeleteAll(qt_context_cache); +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1196-Fix-build-with-neon-instructions-enabled-but-not-set.patch b/recipes/qt4/qt-4.6.0/1196-Fix-build-with-neon-instructions-enabled-but-not-set.patch new file mode 100644 index 0000000000..972e4900d5 --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1196-Fix-build-with-neon-instructions-enabled-but-not-set.patch @@ -0,0 +1,29 @@ +From b97aedb9e68c6fe610aff10792c92b2292da0b07 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Tue, 22 Dec 2009 13:37:06 +0100 +Subject: [PATCH 1196/1244] Fix build with neon instructions enabled but not set in mkspec +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reviewed-By: Samuel Rødal +--- + src/gui/painting/painting.pri | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri +index 0b1e79a..a6cc9c7 100644 +--- a/src/gui/painting/painting.pri ++++ b/src/gui/painting/painting.pri +@@ -383,7 +383,7 @@ neon { + DEFINES += QT_HAVE_NEON + HEADERS += painting/qdrawhelper_neon_p.h + SOURCES += painting/qdrawhelper_neon.cpp +- QMAKE.CXXFLAGS *= -mfpu=neon ++ QMAKE_CXXFLAGS *= -mfpu=neon + } + + contains(QT_CONFIG, zlib) { +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1197-Add-GLfloat-2-2-GLfloat-3-3-uniform-setters-to-QGLSh.patch b/recipes/qt4/qt-4.6.0/1197-Add-GLfloat-2-2-GLfloat-3-3-uniform-setters-to-QGLSh.patch new file mode 100644 index 0000000000..2fe027bb3c --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1197-Add-GLfloat-2-2-GLfloat-3-3-uniform-setters-to-QGLSh.patch @@ -0,0 +1,121 @@ +From 2b4d3391fd922dfc5ac28815bbd5f36c4041b658 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Mon, 21 Dec 2009 16:36:14 +0100 +Subject: [PATCH 1197/1244] Add GLfloat[2][2] & GLfloat[3][3] uniform setters to QGLShaderProgram + +Reviewed-By: Rhys Weatherley +--- + src/opengl/qglshaderprogram.cpp | 67 +++++++++++++++++++++++++++++++++++++++ + src/opengl/qglshaderprogram.h | 4 ++ + 2 files changed, 71 insertions(+), 0 deletions(-) + +diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp +index b4191dc..f9737a5 100644 +--- a/src/opengl/qglshaderprogram.cpp ++++ b/src/opengl/qglshaderprogram.cpp +@@ -2275,6 +2275,42 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix4x4& value + \overload + + Sets the uniform variable at \a location in the current context ++ to a 2x2 matrix \a value. The matrix elements must be specified ++ in column-major order. ++ ++ \sa setAttributeValue() ++ \since 4.6.2 ++*/ ++void QGLShaderProgram::setUniformValue(int location, const GLfloat value[2][2]) ++{ ++ Q_D(QGLShaderProgram); ++ Q_UNUSED(d); ++ if (location != -1) ++ glUniformMatrix2fv(location, 1, GL_FALSE, value[0]); ++} ++ ++/*! ++ \overload ++ ++ Sets the uniform variable at \a location in the current context ++ to a 3x3 matrix \a value. The matrix elements must be specified ++ in column-major order. ++ ++ \sa setAttributeValue() ++ \since 4.6.2 ++*/ ++void QGLShaderProgram::setUniformValue(int location, const GLfloat value[3][3]) ++{ ++ Q_D(QGLShaderProgram); ++ Q_UNUSED(d); ++ if (location != -1) ++ glUniformMatrix3fv(location, 1, GL_FALSE, value[0]); ++} ++ ++/*! ++ \overload ++ ++ Sets the uniform variable at \a location in the current context + to a 4x4 matrix \a value. The matrix elements must be specified + in column-major order. + +@@ -2288,6 +2324,37 @@ void QGLShaderProgram::setUniformValue(int location, const GLfloat value[4][4]) + glUniformMatrix4fv(location, 1, GL_FALSE, value[0]); + } + ++ ++/*! ++ \overload ++ ++ Sets the uniform variable called \a name in the current context ++ to a 2x2 matrix \a value. The matrix elements must be specified ++ in column-major order. ++ ++ \sa setAttributeValue() ++ \since 4.6.2 ++*/ ++void QGLShaderProgram::setUniformValue(const char *name, const GLfloat value[2][2]) ++{ ++ setUniformValue(uniformLocation(name), value); ++} ++ ++/*! ++ \overload ++ ++ Sets the uniform variable called \a name in the current context ++ to a 3x3 matrix \a value. The matrix elements must be specified ++ in column-major order. ++ ++ \sa setAttributeValue() ++ \since 4.6.2 ++*/ ++void QGLShaderProgram::setUniformValue(const char *name, const GLfloat value[3][3]) ++{ ++ setUniformValue(uniformLocation(name), value); ++} ++ + /*! + \overload + +diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h +index deeaee2..4eb80dd 100644 +--- a/src/opengl/qglshaderprogram.h ++++ b/src/opengl/qglshaderprogram.h +@@ -216,6 +216,8 @@ public: + void setUniformValue(int location, const QMatrix4x2& value); + void setUniformValue(int location, const QMatrix4x3& value); + void setUniformValue(int location, const QMatrix4x4& value); ++ void setUniformValue(int location, const GLfloat value[2][2]); ++ void setUniformValue(int location, const GLfloat value[3][3]); + void setUniformValue(int location, const GLfloat value[4][4]); + void setUniformValue(int location, const QTransform& value); + +@@ -242,6 +244,8 @@ public: + void setUniformValue(const char *name, const QMatrix4x2& value); + void setUniformValue(const char *name, const QMatrix4x3& value); + void setUniformValue(const char *name, const QMatrix4x4& value); ++ void setUniformValue(const char *name, const GLfloat value[2][2]); ++ void setUniformValue(const char *name, const GLfloat value[3][3]); + void setUniformValue(const char *name, const GLfloat value[4][4]); + void setUniformValue(const char *name, const QTransform& value); + +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1198-Handle-broken-shaders-better-in-the-GL2-engine-s-sha.patch b/recipes/qt4/qt-4.6.0/1198-Handle-broken-shaders-better-in-the-GL2-engine-s-sha.patch new file mode 100644 index 0000000000..d81051dd9b --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1198-Handle-broken-shaders-better-in-the-GL2-engine-s-sha.patch @@ -0,0 +1,269 @@ +From b784d4991b186037ccd2b60ae3101697a2251160 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Tue, 22 Dec 2009 09:10:14 +0100 +Subject: [PATCH 1198/1244] Handle broken shaders better in the GL2 engine's shader manager + +The shader manager will now a) not seg-fault and b) actually tell you +which shader has the error. + +Reviewed-By: Kim +--- + .../gl2paintengineex/qglengineshadermanager.cpp | 191 ++++++++++++-------- + 1 files changed, 114 insertions(+), 77 deletions(-) + +diff --git a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +index 1187c2d..9d545b9 100644 +--- a/src/opengl/gl2paintengineex/qglengineshadermanager.cpp ++++ b/src/opengl/gl2paintengineex/qglengineshadermanager.cpp +@@ -170,13 +170,15 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) + source.append(qShaderSnippets[MainVertexShader]); + source.append(qShaderSnippets[PositionOnlyVertexShader]); + vertexShader = new QGLShader(QGLShader::Vertex, context, this); +- vertexShader->compileSourceCode(source); ++ if (!vertexShader->compileSourceCode(source)) ++ qWarning("Vertex shader for simpleShaderProg (MainVertexShader & PositionOnlyVertexShader) failed to compile"); + + source.clear(); + source.append(qShaderSnippets[MainFragmentShader]); + source.append(qShaderSnippets[ShockingPinkSrcFragmentShader]); + fragShader = new QGLShader(QGLShader::Fragment, context, this); +- fragShader->compileSourceCode(source); ++ if (!fragShader->compileSourceCode(source)) ++ qWarning("Fragment shader for simpleShaderProg (MainFragmentShader & ShockingPinkSrcFragmentShader) failed to compile"); + + simpleShaderProg = new QGLShaderProgram(context, this); + simpleShaderProg->addShader(vertexShader); +@@ -193,13 +195,15 @@ QGLEngineSharedShaders::QGLEngineSharedShaders(const QGLContext* context) + source.append(qShaderSnippets[MainWithTexCoordsVertexShader]); + source.append(qShaderSnippets[UntransformedPositionVertexShader]); + vertexShader = new QGLShader(QGLShader::Vertex, context, this); +- vertexShader->compileSourceCode(source); ++ if (!vertexShader->compileSourceCode(source)) ++ qWarning("Vertex shader for blitShaderProg (MainWithTexCoordsVertexShader & UntransformedPositionVertexShader) failed to compile"); + + source.clear(); + source.append(qShaderSnippets[MainFragmentShader]); + source.append(qShaderSnippets[ImageSrcFragmentShader]); + fragShader = new QGLShader(QGLShader::Fragment, context, this); +- fragShader->compileSourceCode(source); ++ if (!fragShader->compileSourceCode(source)) ++ qWarning("Fragment shader for blitShaderProg (MainFragmentShader & ImageSrcFragmentShader) failed to compile"); + + blitShaderProg = new QGLShaderProgram(context, this); + blitShaderProg->addShader(vertexShader); +@@ -234,84 +238,95 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS + } + } + +- QByteArray source; +- source.append(qShaderSnippets[prog.mainFragShader]); +- source.append(qShaderSnippets[prog.srcPixelFragShader]); +- if (prog.srcPixelFragShader == CustomImageSrcFragmentShader) +- source.append(prog.customStageSource); +- if (prog.compositionFragShader) +- source.append(qShaderSnippets[prog.compositionFragShader]); +- if (prog.maskFragShader) +- source.append(qShaderSnippets[prog.maskFragShader]); +- QGLShader* fragShader = new QGLShader(QGLShader::Fragment, ctxGuard.context(), this); +- fragShader->compileSourceCode(source); +- +- source.clear(); +- source.append(qShaderSnippets[prog.mainVertexShader]); +- source.append(qShaderSnippets[prog.positionVertexShader]); +- QGLShader* vertexShader = new QGLShader(QGLShader::Vertex, ctxGuard.context(), this); +- vertexShader->compileSourceCode(source); ++ QGLShader *vertexShader = 0; ++ QGLShader *fragShader = 0; ++ QGLEngineShaderProg *newProg = 0; ++ bool success = false; ++ ++ do { ++ QByteArray source; ++ source.append(qShaderSnippets[prog.mainFragShader]); ++ source.append(qShaderSnippets[prog.srcPixelFragShader]); ++ if (prog.srcPixelFragShader == CustomImageSrcFragmentShader) ++ source.append(prog.customStageSource); ++ if (prog.compositionFragShader) ++ source.append(qShaderSnippets[prog.compositionFragShader]); ++ if (prog.maskFragShader) ++ source.append(qShaderSnippets[prog.maskFragShader]); ++ fragShader = new QGLShader(QGLShader::Fragment, ctxGuard.context(), this); ++ QByteArray description; ++#if defined(QT_DEBUG) ++ // Name the shader for easier debugging ++ description.append("Fragment shader: main="); ++ description.append(snippetNameStr(prog.mainFragShader)); ++ description.append(", srcPixel="); ++ description.append(snippetNameStr(prog.srcPixelFragShader)); ++ if (prog.compositionFragShader) { ++ description.append(", composition="); ++ description.append(snippetNameStr(prog.compositionFragShader)); ++ } ++ if (prog.maskFragShader) { ++ description.append(", mask="); ++ description.append(snippetNameStr(prog.maskFragShader)); ++ } ++ fragShader->setObjectName(QString::fromLatin1(description)); ++#endif ++ if (!fragShader->compileSourceCode(source)) { ++ qWarning() << "Warning:" << description << "failed to compile!"; ++ break; ++ } + ++ source.clear(); ++ source.append(qShaderSnippets[prog.mainVertexShader]); ++ source.append(qShaderSnippets[prog.positionVertexShader]); ++ vertexShader = new QGLShader(QGLShader::Vertex, ctxGuard.context(), this); + #if defined(QT_DEBUG) +- // Name the shaders for easier debugging +- QByteArray description; +- description.append("Fragment shader: main="); +- description.append(snippetNameStr(prog.mainFragShader)); +- description.append(", srcPixel="); +- description.append(snippetNameStr(prog.srcPixelFragShader)); +- if (prog.compositionFragShader) { +- description.append(", composition="); +- description.append(snippetNameStr(prog.compositionFragShader)); +- } +- if (prog.maskFragShader) { +- description.append(", mask="); +- description.append(snippetNameStr(prog.maskFragShader)); +- } +- fragShader->setObjectName(QString::fromLatin1(description)); +- +- description.clear(); +- description.append("Vertex shader: main="); +- description.append(snippetNameStr(prog.mainVertexShader)); +- description.append(", position="); +- description.append(snippetNameStr(prog.positionVertexShader)); +- vertexShader->setObjectName(QString::fromLatin1(description)); ++ // Name the shader for easier debugging ++ description.clear(); ++ description.append("Vertex shader: main="); ++ description.append(snippetNameStr(prog.mainVertexShader)); ++ description.append(", position="); ++ description.append(snippetNameStr(prog.positionVertexShader)); ++ vertexShader->setObjectName(QString::fromLatin1(description)); + #endif ++ if (!vertexShader->compileSourceCode(source)) { ++ qWarning() << "Warning:" << description << "failed to compile!"; ++ break; ++ } + +- QGLEngineShaderProg* newProg = new QGLEngineShaderProg(prog); +- +- // If the shader program's not found in the cache, create it now. +- newProg->program = new QGLShaderProgram(ctxGuard.context(), this); +- newProg->program->addShader(vertexShader); +- newProg->program->addShader(fragShader); +- +- // We have to bind the vertex attribute names before the program is linked: +- newProg->program->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR); +- if (newProg->useTextureCoords) +- newProg->program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR); +- if (newProg->useOpacityAttribute) +- newProg->program->bindAttributeLocation("opacityArray", QT_OPACITY_ATTR); +- +- newProg->program->link(); +- if (!newProg->program->isLinked()) { +- QLatin1String none("none"); +- QLatin1String br("\n"); +- QString error; +- error = QLatin1String("Shader program failed to link,") ++ newProg = new QGLEngineShaderProg(prog); ++ ++ // If the shader program's not found in the cache, create it now. ++ newProg->program = new QGLShaderProgram(ctxGuard.context(), this); ++ newProg->program->addShader(vertexShader); ++ newProg->program->addShader(fragShader); ++ ++ // We have to bind the vertex attribute names before the program is linked: ++ newProg->program->bindAttributeLocation("vertexCoordsArray", QT_VERTEX_COORDS_ATTR); ++ if (newProg->useTextureCoords) ++ newProg->program->bindAttributeLocation("textureCoordArray", QT_TEXTURE_COORDS_ATTR); ++ if (newProg->useOpacityAttribute) ++ newProg->program->bindAttributeLocation("opacityArray", QT_OPACITY_ATTR); ++ ++ newProg->program->link(); ++ if (!newProg->program->isLinked()) { ++ QLatin1String none("none"); ++ QLatin1String br("\n"); ++ QString error; ++ error = QLatin1String("Shader program failed to link,") + #if defined(QT_DEBUG) +- + br +- + QLatin1String(" Shaders Used:") + br +- + QLatin1String(" ") + vertexShader->objectName() + QLatin1String(": ") + br +- + QLatin1String(vertexShader->sourceCode()) + br +- + QLatin1String(" ") + fragShader->objectName() + QLatin1String(": ") + br +- + QLatin1String(fragShader->sourceCode()) + br ++ + br ++ + QLatin1String(" Shaders Used:") + br ++ + QLatin1String(" ") + vertexShader->objectName() + QLatin1String(": ") + br ++ + QLatin1String(vertexShader->sourceCode()) + br ++ + QLatin1String(" ") + fragShader->objectName() + QLatin1String(": ") + br ++ + QLatin1String(fragShader->sourceCode()) + br + #endif +- + QLatin1String(" Error Log:\n") +- + QLatin1String(" ") + newProg->program->log(); +- qWarning() << error; +- delete newProg; // Deletes the QGLShaderProgram in it's destructor +- newProg = 0; +- } +- else { ++ + QLatin1String(" Error Log:\n") ++ + QLatin1String(" ") + newProg->program->log(); ++ qWarning() << error; ++ break; ++ } + if (cachedPrograms.count() > 30) { + // The cache is full, so delete the last 5 programs in the list. + // These programs will be least used, as a program us bumped to +@@ -323,6 +338,22 @@ QGLEngineShaderProg *QGLEngineSharedShaders::findProgramInCache(const QGLEngineS + } + + cachedPrograms.insert(0, newProg); ++ ++ success = true; ++ } while (false); ++ ++ // Clean up everything if we weren't successful ++ if (!success) { ++ if (newProg) { ++ delete newProg; // Also deletes the QGLShaderProgram which in turn deletes the QGLShaders ++ newProg = 0; ++ } ++ else { ++ if (vertexShader) ++ delete vertexShader; ++ if (fragShader) ++ delete fragShader; ++ } + } + + return newProg; +@@ -364,6 +395,9 @@ QGLEngineShaderManager::~QGLEngineShaderManager() + + uint QGLEngineShaderManager::getUniformLocation(Uniform id) + { ++ if (!currentShaderProg) ++ return 0; ++ + QVector &uniformLocations = currentShaderProg->uniformLocations; + if (uniformLocations.isEmpty()) + uniformLocations.fill(GLuint(-1), NumUniforms); +@@ -468,7 +502,10 @@ void QGLEngineShaderManager::removeCustomStage() + + QGLShaderProgram* QGLEngineShaderManager::currentProgram() + { +- return currentShaderProg->program; ++ if (currentShaderProg) ++ return currentShaderProg->program; ++ else ++ return simpleProgram(); + } + + QGLShaderProgram* QGLEngineShaderManager::simpleProgram() +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.0/1205-Fix-text-rendering-on-GL2-paint-engine.patch b/recipes/qt4/qt-4.6.0/1205-Fix-text-rendering-on-GL2-paint-engine.patch new file mode 100644 index 0000000000..548ed9246f --- /dev/null +++ b/recipes/qt4/qt-4.6.0/1205-Fix-text-rendering-on-GL2-paint-engine.patch @@ -0,0 +1,83 @@ +From a8c3ed1dbe209488866e687d1a63c6143a04cfe0 Mon Sep 17 00:00:00 2001 +From: Tom Cooksey +Date: Wed, 23 Dec 2009 10:38:56 +0100 +Subject: [PATCH 1205/1244] Fix text rendering on GL2 paint engine + +If you draw with a brush, then draw a pixmap, then draw with the +same brush, the GL2 engine wouldn't update the fragment shader to +use the brush. This is because it detected the brush hadn't changed +and so didn't need updating. To fix this, we now set the current +brush to noBrush when drawing an image/pixmap so the engine knows +it needs to update the GL state for the brush. + +Reviewed-By: Kim +--- + .../gl2paintengineex/qpaintengineex_opengl2.cpp | 15 ++++++++++----- + .../gl2paintengineex/qpaintengineex_opengl2_p.h | 1 + + 2 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +index f52ed92..32fa3dc 100644 +--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp ++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +@@ -388,21 +388,24 @@ inline QColor qt_premultiplyColor(QColor c, GLfloat opacity) + + void QGL2PaintEngineExPrivate::setBrush(const QBrush& brush) + { +- Q_ASSERT(brush.style() != Qt::NoBrush); +- + if (qbrush_fast_equals(currentBrush, brush)) + return; + ++ const Qt::BrushStyle newStyle = qbrush_style(brush); ++ Q_ASSERT(newStyle != Qt::NoBrush); ++ + currentBrush = brush; ++ brushUniformsDirty = true; // All brushes have at least one uniform ++ ++ if (newStyle > Qt::SolidPattern) ++ brushTextureDirty = true; + +- brushTextureDirty = true; +- brushUniformsDirty = true; + if (currentBrush.style() == Qt::TexturePattern + && qHasPixmapTexture(brush) && brush.texture().isQBitmap()) + { + shaderManager->setSrcPixelType(QGLEngineShaderManager::TextureSrcWithPattern); + } else { +- shaderManager->setSrcPixelType(currentBrush.style()); ++ shaderManager->setSrcPixelType(newStyle); + } + shaderManager->optimiseForBrushTransform(currentBrush.transform()); + } +@@ -700,6 +703,7 @@ static inline void setCoords(GLfloat *coords, const QGLRect &rect) + void QGL2PaintEngineExPrivate::drawTexture(const QGLRect& dest, const QGLRect& src, const QSize &textureSize, bool opaque, bool pattern) + { + // Setup for texture drawing ++ currentBrush = noBrush; + shaderManager->setSrcPixelType(pattern ? QGLEngineShaderManager::PatternSrc : QGLEngineShaderManager::ImageSrc); + if (prepareForDraw(opaque)) + shaderManager->currentProgram()->setUniformValue(location(QGLEngineShaderManager::ImageTexture), QT_IMAGE_TEXTURE_UNIT); +@@ -1782,6 +1786,7 @@ void QGL2PaintEngineEx::drawPixmaps(const QDrawPixmaps::Data *drawingData, int d + state()->renderHints & QPainter::SmoothPixmapTransform, texture->id); + + // Setup for texture drawing ++ d->currentBrush = d->noBrush; + d->shaderManager->setSrcPixelType(isBitmap ? QGLEngineShaderManager::PatternSrc : QGLEngineShaderManager::ImageSrc); + if (d->prepareForDraw(isOpaque)) + d->shaderManager->currentProgram()->setUniformValue(d->location(QGLEngineShaderManager::ImageTexture), QT_IMAGE_TEXTURE_UNIT); +diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +index f1ec6e6..8de4a82 100644 +--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h ++++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +@@ -244,6 +244,7 @@ public: + uint maxClip; + + QBrush currentBrush; // May not be the state's brush! ++ const QBrush noBrush; + + GLfloat inverseScale; + +-- +1.6.5 + diff --git a/recipes/qt4/qt-4.6.3.inc b/recipes/qt4/qt-4.6.2.inc similarity index 54% rename from recipes/qt4/qt-4.6.3.inc rename to recipes/qt4/qt-4.6.2.inc index 1d5df7040b..94777e5d04 100644 --- a/recipes/qt4/qt-4.6.3.inc +++ b/recipes/qt4/qt-4.6.2.inc @@ -1,21 +1,16 @@ DEFAULT_PREFERENCE = "-1" -LICENSE = "LGPLv2.1 GPLv3" FILESPATHPKG .= ":qt-${PV}" SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ - file://blacklist-fraudulent-comodo-certificates-patch.diff \ - file://0001-cross-compile.patch \ - file://0002-fix-resinit-declaration.patch \ - file://0004-no-qmake.patch \ - file://hack-out-pg_config.patch \ - file://0006-freetype-host-includes.patch \ - file://0008-qt-lib-infix.patch \ - file://0009-support-2bpp.patch \ - file://0010-no-simpledecoration-example.patch \ - file://fix-config-tests.patch \ - file://qt-config.patch \ - file://0001-wsegl2-support.patch \ + file://0001-cross-compile.patch;patch=1 \ + file://0002-fix-resinit-declaration.patch;patch=1 \ + file://0004-no-qmake.patch;patch=1 \ + file://0006-freetype-host-includes.patch;patch=1 \ + file://0008-qt-lib-infix.patch;patch=1 \ + file://0009-support-2bpp.patch;patch=1 \ + file://0010-no-simpledecoration-example.patch;patch=1 \ + file://fix-config-tests.patch;patch=1 \ file://g++.conf \ file://linux.conf \ " @@ -53,12 +48,8 @@ do_install_append() { for i in rcc uic moc ; do install -m 0755 ${S}/bin/$i ${D}${bindir}/ done - - #Append an E to the qtdemo file - if [ -n "${QT_LIBINFIX}" ] ; then - mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} - fi } -SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" -SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" +LICENSE = "LGPLv2.1 GPLv3" +SRC_URI += " \ + file://hack-out-pg_config.patch;patch=1" diff --git a/recipes/qt4/qt-4.7.3.inc b/recipes/qt4/qt-4.7.3.inc deleted file mode 100644 index b29d892515..0000000000 --- a/recipes/qt4/qt-4.7.3.inc +++ /dev/null @@ -1,59 +0,0 @@ -DEFAULT_PREFERENCE = "-1" -LICENSE = "LGPLv2.1 GPLv3" - -FILESPATHPKG =. "qt-${PV}:" - -SRC_URI = "\ - ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ - file://0004-no-qmake.patch \ - file://hack-out-pg2-4.7.0.patch \ - file://0006-freetype-host-includes.patch \ - file://0001-Added-Openembedded-crossarch-option.patch \ - file://0010-phonon-gstreamer-rgb-endianess.patch \ - file://fix-translations.patch \ - file://0001-wsegl2-support.patch \ - file://g++.conf \ - file://linux.conf \ - " - -S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" - -FILES_${QT_BASE_NAME}-tools += "${bindir}/qml" - -do_configure_prepend() { - for pro in $(find ${S} -name "*.pro") ; do - sed -i 's:$$LRELEASE:${STAGING_BINDIR_NATIVE}/lrelease4:g' $pro - done - - sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf - sed -i \ - -e /QMAKE_MOC\ /d \ - -e /QMAKE_UIC\ /d \ - -e /QMAKE_UIC3\ /d \ - -e /QMAKE_RCC\ /d \ - ${S}/configure -} - -QT_GLFLAGS ?= "" -QT_CONFIG_FLAGS += " -javascript-jit -script -scripttools -declarative -xmlpatterns -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}" - -do_compile() { - unset CFLAGS CXXFLAGS - - oe_runmake ${EXTRA_ENV} -} - -do_install_append() { - install -d ${D}${bindir} - for i in rcc uic moc ; do - install -m 0755 ${S}/bin/$i ${D}${bindir}/ - done - - #Append an E to the qtdemo file - if [ -n "${QT_LIBINFIX}" ] ; then - mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} - fi -} - -SRC_URI[md5sum] = "49b96eefb1224cc529af6fe5608654fe" -SRC_URI[sha256sum] = "d02b6fd69d089c01f4a787aa18175d074ccaecf8980a5956e328c2991905937e" diff --git a/recipes/qt4/qt-4.7.3/0001-Added-Openembedded-crossarch-option.patch b/recipes/qt4/qt-4.7.3/0001-Added-Openembedded-crossarch-option.patch deleted file mode 100644 index 71a04a59d2..0000000000 --- a/recipes/qt4/qt-4.7.3/0001-Added-Openembedded-crossarch-option.patch +++ /dev/null @@ -1,44 +0,0 @@ -From b1ba119f6a824dc01bd42ee00dba4a1653867b72 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Matthias=20G=C3=BCnther?= -Date: Wed, 12 May 2010 16:52:45 +0200 -Subject: [PATCH 1/9] Added Openembedded "-crossarch" option - ---- - configure | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/configure b/configure -index facd192..9d15136 100755 ---- a/configure -+++ b/configure -@@ -954,7 +954,7 @@ while [ "$#" -gt 0 ]; do - shift - VAL=$1 - ;; -- -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config) -+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-crossarch) - VAR=`echo $1 | sed "s,^-\(.*\),\1,"` - shift - VAL="$1" -@@ -1443,6 +1443,9 @@ while [ "$#" -gt 0 ]; do - xplatform) - XPLATFORM="$VAL" - ;; -+ crossarch) -+ CROSSARCH="$VAL" -+ ;; - debug-and-release) - if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then - CFG_DEBUG_RELEASE="$VAL" -@@ -2918,6 +2921,8 @@ elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then - CFG_ARCH=$CFG_HOST_ARCH - fi - -+CFG_ARCH="$CROSSARCH" -+ - if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then - if [ "$OPT_VERBOSE" = "yes" ]; then - echo " '$CFG_ARCH' is supported" --- -1.7.0.4 - diff --git a/recipes/qt4/qt-4.7.3/0010-phonon-gstreamer-rgb-endianess.patch b/recipes/qt4/qt-4.7.3/0010-phonon-gstreamer-rgb-endianess.patch deleted file mode 100644 index d43366c3a4..0000000000 --- a/recipes/qt4/qt-4.7.3/0010-phonon-gstreamer-rgb-endianess.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/src/3rdparty/phonon/gstreamer/qwidgetvideosink.cpp -+++ b/src/3rdparty/phonon/gstreamer/qwidgetvideosink.cpp -@@ -18,6 +18,7 @@ - #include - #include "videowidget.h" - #include "qwidgetvideosink.h" -+#include - - QT_BEGIN_NAMESPACE - -@@ -106,11 +107,7 @@ static GstStaticPadTemplate template_factory_rgb = - GST_STATIC_PAD_TEMPLATE("sink", - GST_PAD_SINK, - GST_PAD_ALWAYS, -- GST_STATIC_CAPS("video/x-raw-rgb, " -- "framerate = (fraction) [ 0, MAX ], " -- "width = (int) [ 1, MAX ], " -- "height = (int) [ 1, MAX ]," -- "bpp = (int) 32")); -+ GST_STATIC_CAPS(GST_VIDEO_CAPS_xRGB_HOST_ENDIAN)); - - template - struct template_factory; diff --git a/recipes/qt4/qt-4.7.3/fix-translations.patch b/recipes/qt4/qt-4.7.3/fix-translations.patch deleted file mode 100644 index fe20b5b73c..0000000000 --- a/recipes/qt4/qt-4.7.3/fix-translations.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/translations/translations.pro b/translations/translations.pro -index cdaf04a..24fa668 100644 ---- a/translations/translations.pro -+++ b/translations/translations.pro -@@ -20,7 +20,7 @@ updateqm.name = LRELEASE ${QMAKE_FILE_IN} - updateqm.CONFIG += no_link - QMAKE_EXTRA_COMPILERS += updateqm - --isEmpty(vcproj) { -+!isEmpty(vcproj) { - QMAKE_LINK = @: IGNORE THIS LINE - OBJECTS_DIR = - win32:CONFIG -= embed_manifest_exe -@@ -30,7 +30,7 @@ isEmpty(vcproj) { - phony_src.input = PHONY_DEPS - phony_src.output = phony.c - phony_src.variable_out = GENERATED_SOURCES -- phony_src.commands = echo int main() { return 0; } > phony.c -+ phony_src.commands = echo \"int main() { return 0; }\" > phony.c - phony_src.name = CREATE phony.c - phony_src.CONFIG += combine - QMAKE_EXTRA_COMPILERS += phony_src diff --git a/recipes/qt4/qt-4.7.3/g++.conf b/recipes/qt4/qt-4.7.3/g++.conf deleted file mode 100644 index 80f925cc5e..0000000000 --- a/recipes/qt4/qt-4.7.3/g++.conf +++ /dev/null @@ -1,60 +0,0 @@ -# -# qmake configuration for common gcc -# - -QMAKE_CC = $(OE_QMAKE_CC) -QMAKE_CFLAGS += -pipe $(OE_QMAKE_CFLAGS) -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS) -QMAKE_CFLAGS_DEPS += -M -QMAKE_CFLAGS_WARN_ON += -Wall -W -QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -QMAKE_CFLAGS_DEBUG += -g -QMAKE_CFLAGS_SHLIB += -fPIC -QMAKE_CFLAGS_STATIC_LIB += -fPIC -QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses -QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} - -QMAKE_CXX = $(OE_QMAKE_CXX) -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS $(OE_QMAKE_CXXFLAGS) -QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB -QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB -QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden -QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} -QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE - -QMAKE_LINK = $(OE_QMAKE_LINK) -QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK) -QMAKE_LINK_C = $(OE_QMAKE_LINK) -QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK) -QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS) -QMAKE_LFLAGS_RELEASE += -QMAKE_LFLAGS_DEBUG += -QMAKE_LFLAGS_APP += -QMAKE_LFLAGS_SHLIB += -shared -QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME += -Wl,-soname, -QMAKE_LFLAGS_THREAD += -QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined -QMAKE_LFLAGS_RPATH = -Wl,-rpath-link, - -QMAKE_PCH_OUTPUT_EXT = .gch - -# -Bsymbolic-functions (ld) support -QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions -QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, - -# some linking helper... -CONFIG += rpath_libdirs - -# for the SDK -isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG) diff --git a/recipes/qt4/qt-4.7.3/hack-out-pg2-4.7.0.patch b/recipes/qt4/qt-4.7.3/hack-out-pg2-4.7.0.patch deleted file mode 100644 index 5c588ff0f7..0000000000 --- a/recipes/qt4/qt-4.7.3/hack-out-pg2-4.7.0.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: qt-everywhere-opensource-src-4.7.0/configure -=================================================================== ---- qt-everywhere-opensource-src-4.7.0.orig/configure 2010-09-22 15:43:51.191162141 -0400 -+++ qt-everywhere-opensource-src-4.7.0/configure 2010-09-22 15:44:35.179981232 -0400 -@@ -4921,10 +4921,10 @@ - psql) - if [ "$CFG_SQL_psql" != "no" ]; then - # Be careful not to use native pg_config when cross building. -- if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then -- QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null` -- QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null` -- fi -+# if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then -+# QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null` -+# QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null` -+# fi - [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL" - [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL" - # But, respect PSQL_LIBS if set diff --git a/recipes/qt4/qt-demo-init/qtdemo-init b/recipes/qt4/qt-demo-init/qtdemo-init deleted file mode 100644 index affb9589ea..0000000000 --- a/recipes/qt4/qt-demo-init/qtdemo-init +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh - -set -e - -if [ -f /usr/bin/qtdemo ]; then - QTDEMO="qtdemo > /var/log/Xsession.log 2> &1" -else - QTDEMO="qtdemoE -qws" -fi - -case "$1" in - start) - echo "Starting qtdemo" - if [ -f /etc/profile.d/tslib.sh ]; then - source /etc/profile.d/tslib.sh - fi - if [ -e $TSLIB_TSDEVICE ]; then - if [ ! -f /etc/pointercal ]; then - /usr/bin/ts_calibrate - fi - if [ $QTDEMO == qtdemo ]; then - Xorg & - export DISPLAY=:0 - $QTDEMO & - else - QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO & - fi - else - if [ $QTDEMO == qtdemo ]; then - Xorg & - export DISPLAY=:0 - fi - $QTDEMO & - fi - ;; - stop) - echo "Stopping qtdemo" - if [ $QTDEMO == qtdemo ]; then - killall Xorg - killall qtdemo - else - killall qtdemoE - fi - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "usage: $0 { start | stop | restart }" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/recipes/qt4/qt-demo-init_0.1.bb b/recipes/qt4/qt-demo-init_0.1.bb deleted file mode 100644 index 6de544eee7..0000000000 --- a/recipes/qt4/qt-demo-init_0.1.bb +++ /dev/null @@ -1,16 +0,0 @@ -DESCRIPTION = "Init script for qtdemo" -LICENSE = "MIT" -SRC_URI = "file://qtdemo-init" -PR = "r2" - -PACKAGE_ARCH = "all" - -do_install() { - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/qtdemo-init ${D}${sysconfdir}/init.d/qtdemo -} - -inherit update-rc.d - -INITSCRIPT_NAME = "qtdemo" -INITSCRIPT_PARAMS = "start 99 5 2 . stop 19 0 1 6 ." diff --git a/recipes/qt4/qt4-embedded-4.4.3/0003-no-tools.patch b/recipes/qt4/qt4-embedded-4.4.3/0003-no-tools.patch new file mode 100644 index 0000000000..bb36444f80 --- /dev/null +++ b/recipes/qt4/qt4-embedded-4.4.3/0003-no-tools.patch @@ -0,0 +1,16 @@ +--- /tmp/src.pro 2008-07-08 10:43:30.000000000 +0200 ++++ qt-embedded-linux-opensource-src-4.4.0/src/src.pro 2008-07-08 11:28:24.000000000 +0200 +@@ -6,12 +6,9 @@ + wince*:{ + SRC_SUBDIRS += src_corelib src_xml src_gui src_sql src_network src_script src_testlib + } else { +- SRC_SUBDIRS += src_tools_moc src_tools_rcc src_tools_uic src_corelib src_xml src_network src_gui src_sql src_script src_testlib ++ SRC_SUBDIRS += src_corelib src_xml src_network src_gui src_sql src_script src_testlib + contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support + contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus +- !cross_compile { +- contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3 +- } + } + win32:!contains(QT_EDITION, OpenSource|Console): { + SRC_SUBDIRS += src_activeqt diff --git a/recipes/qt4/qt4-embedded-4.4.3/0006-freetype-host-includes.patch b/recipes/qt4/qt4-embedded-4.4.3/0006-freetype-host-includes.patch new file mode 100644 index 0000000000..cc8e115fee --- /dev/null +++ b/recipes/qt4/qt4-embedded-4.4.3/0006-freetype-host-includes.patch @@ -0,0 +1,23 @@ +From c9ab62bd9a56643574b3ae6e59e0ca776d4860d2 Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Mon, 4 Jun 2007 14:48:50 +0200 +Subject: [PATCH] freetype host includes + +--- + config.tests/unix/freetype/freetype.pri | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/config.tests/unix/freetype/freetype.pri b/config.tests/unix/freetype/freetype.pri +index 84974bf..ab9a6f2 100644 +--- a/config.tests/unix/freetype/freetype.pri ++++ b/config.tests/unix/freetype/freetype.pri +@@ -1,5 +1,5 @@ + !cross_compile { +- TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH ++ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH + for(p, TRY_INCLUDEPATHS) { + p = $$join(p, "", "", "/freetype2") + exists($$p):INCLUDEPATH *= $$p +-- +1.5.0.7 + diff --git a/recipes/qt4/qt4-embedded-4.4.3/0007-openssl-host-includes.patch b/recipes/qt4/qt4-embedded-4.4.3/0007-openssl-host-includes.patch new file mode 100644 index 0000000000..35b71d9694 --- /dev/null +++ b/recipes/qt4/qt4-embedded-4.4.3/0007-openssl-host-includes.patch @@ -0,0 +1,23 @@ +From d45943adb443ad4b85ca4504952dee743c675e1e Mon Sep 17 00:00:00 2001 +From: Michael Krelin +Date: Mon, 4 Jun 2007 14:58:34 +0200 +Subject: [PATCH] openssl host includes + +--- + config.tests/unix/openssl/openssl.pri | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/config.tests/unix/openssl/openssl.pri b/config.tests/unix/openssl/openssl.pri +index 756e5fe..19b4061 100644 +--- a/config.tests/unix/openssl/openssl.pri ++++ b/config.tests/unix/openssl/openssl.pri +@@ -1,5 +1,5 @@ + !cross_compile { +- TRY_INCLUDEPATHS = /include /usr/include /usr/local/include $$QMAKE_INCDIR $$INCLUDEPATH ++ TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$INCLUDEPATH + for(p, TRY_INCLUDEPATHS) { + pp = $$join(p, "", "", "/openssl") + exists($$pp):INCLUDEPATH *= $$p +-- +1.5.0.7 + diff --git a/recipes/qt4/qt4-embedded-4.4.3/0008-qt-lib-infix.patch b/recipes/qt4/qt4-embedded-4.4.3/0008-qt-lib-infix.patch new file mode 100644 index 0000000000..b1a443f24c --- /dev/null +++ b/recipes/qt4/qt4-embedded-4.4.3/0008-qt-lib-infix.patch @@ -0,0 +1,45 @@ +diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/mkspecs/features/uitools.prf qt-embedded-linux-opensource-src-4.4.3/mkspecs/features/uitools.prf +--- qt-embedded-linux-opensource-src-4.4.3.orig/mkspecs/features/uitools.prf 2008-09-27 11:01:24.000000000 +0200 ++++ qt-embedded-linux-opensource-src-4.4.3/mkspecs/features/uitools.prf 2008-12-11 20:47:10.000000000 +0100 +@@ -2,10 +2,10 @@ + qt:load(qt) + + # Include the correct version of the UiLoader library +-QTUITOOLS_LINKAGE = -lQtUiTools ++QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} + CONFIG(debug, debug|release) { +- mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug +- win32: QTUITOOLS_LINKAGE = -lQtUiToolsd ++ mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug ++ win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d + } + LIBS += $$QTUITOOLS_LINKAGE + +diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/tools/designer/src/lib/lib.pro qt-embedded-linux-opensource-src-4.4.3/tools/designer/src/lib/lib.pro +--- qt-embedded-linux-opensource-src-4.4.3.orig/tools/designer/src/lib/lib.pro 2008-09-27 11:01:29.000000000 +0200 ++++ qt-embedded-linux-opensource-src-4.4.3/tools/designer/src/lib/lib.pro 2008-12-11 20:36:40.000000000 +0100 +@@ -58,8 +58,8 @@ + include(shared/shared.pri) + PRECOMPILED_HEADER=lib_pch.h + +-include(../components/component.pri) + include(../sharedcomponents.pri) ++include(../components/component.pri) + + target.path=$$[QT_INSTALL_LIBS] + INSTALLS += target +diff -urN qt-embedded-linux-opensource-src-4.4.3.orig/tools/designer/src/uitools/uitools.pro qt-embedded-linux-opensource-src-4.4.3/tools/designer/src/uitools/uitools.pro +--- qt-embedded-linux-opensource-src-4.4.3.orig/tools/designer/src/uitools/uitools.pro 2008-09-27 11:01:30.000000000 +0200 ++++ qt-embedded-linux-opensource-src-4.4.3/tools/designer/src/uitools/uitools.pro 2008-12-11 19:56:34.000000000 +0100 +@@ -1,5 +1,5 @@ + TEMPLATE = lib +-TARGET = $$qtLibraryTarget(QtUiTools) ++TARGET = QtUiTools + QT += xml + CONFIG += qt staticlib + DESTDIR = ../../../../lib +@@ -38,3 +38,4 @@ + QMAKE_PKGCONFIG_DESTDIR = pkgconfig + } + ++TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end diff --git a/recipes/qt4/qt4-embedded-4.6.3/0006-freetype-host-includes.patch b/recipes/qt4/qt4-embedded-4.6.0/0006-freetype-host-includes.patch similarity index 100% rename from recipes/qt4/qt4-embedded-4.6.3/0006-freetype-host-includes.patch rename to recipes/qt4/qt4-embedded-4.6.0/0006-freetype-host-includes.patch diff --git a/recipes/qt4/qt4-embedded-4.6.3/0008-qt-lib-infix.patch b/recipes/qt4/qt4-embedded-4.6.0/0008-qt-lib-infix.patch similarity index 100% rename from recipes/qt4/qt4-embedded-4.6.3/0008-qt-lib-infix.patch rename to recipes/qt4/qt4-embedded-4.6.0/0008-qt-lib-infix.patch diff --git a/recipes/qt4/qt4-embedded-4.6.3/0010-no-simpledecoration-example.patch b/recipes/qt4/qt4-embedded-4.6.0/0010-no-simpledecoration-example.patch similarity index 100% rename from recipes/qt4/qt4-embedded-4.6.3/0010-no-simpledecoration-example.patch rename to recipes/qt4/qt4-embedded-4.6.0/0010-no-simpledecoration-example.patch diff --git a/recipes/qt4/qt4-embedded-4.6.3/linux.conf b/recipes/qt4/qt4-embedded-4.6.0/linux.conf similarity index 100% rename from recipes/qt4/qt4-embedded-4.6.3/linux.conf rename to recipes/qt4/qt4-embedded-4.6.0/linux.conf diff --git a/recipes/qt4/qt4-embedded/0006-freetype-host-includes.patch b/recipes/qt4/qt4-embedded-4.6.2/0006-freetype-host-includes.patch similarity index 100% rename from recipes/qt4/qt4-embedded/0006-freetype-host-includes.patch rename to recipes/qt4/qt4-embedded-4.6.2/0006-freetype-host-includes.patch diff --git a/recipes/qt4/qt4-x11-free-4.6.3/0008-qt-lib-infix.patch b/recipes/qt4/qt4-embedded-4.6.2/0008-qt-lib-infix.patch similarity index 100% rename from recipes/qt4/qt4-x11-free-4.6.3/0008-qt-lib-infix.patch rename to recipes/qt4/qt4-embedded-4.6.2/0008-qt-lib-infix.patch diff --git a/recipes/qt4/qt4-x11-free-4.6.3/0010-no-simpledecoration-example.patch b/recipes/qt4/qt4-embedded-4.6.2/0010-no-simpledecoration-example.patch similarity index 100% rename from recipes/qt4/qt4-x11-free-4.6.3/0010-no-simpledecoration-example.patch rename to recipes/qt4/qt4-embedded-4.6.2/0010-no-simpledecoration-example.patch diff --git a/recipes/qt4/qt4-x11-free-4.6.3/linux.conf b/recipes/qt4/qt4-embedded-4.6.2/linux.conf similarity index 100% rename from recipes/qt4/qt4-x11-free-4.6.3/linux.conf rename to recipes/qt4/qt4-embedded-4.6.2/linux.conf diff --git a/recipes/qt4/qt4-embedded-gles-4.6.3/cursor-hack.diff b/recipes/qt4/qt4-embedded-gles-4.6.3/cursor-hack.diff deleted file mode 100644 index e297e520a0..0000000000 --- a/recipes/qt4/qt4-embedded-gles-4.6.3/cursor-hack.diff +++ /dev/null @@ -1,34 +0,0 @@ -Patch originally done by Bin Liu, rediffed by Koen Kooi for Qt 4.6.2 - -This patch is a first step to get a working cursor when using the powervr driver, it flickers when hovering over a QGLWidget, but still better than no cursor at all - ---- /tmp/pvreglscreen.cpp 2010-04-19 09:30:32.000000000 +0200 -+++ qt-everywhere-opensource-src-4.6.2/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp 2010-04-19 09:31:30.000000000 +0200 -@@ -85,6 +85,9 @@ - bool PvrEglScreen::initDevice() - { - openTty(); -+#ifndef QT_NO_QWS_CURSOR -+ QScreenCursor::initSoftwareCursor(); -+#endif - return true; - } - ---- /tmp/qwindowsystem_qws.cpp 2010-04-19 09:32:47.000000000 +0200 -+++ qt-everywhere-opensource-src-4.6.2/src/gui/embedded/qwindowsystem_qws.cpp 2010-04-19 09:33:30.000000000 +0200 -@@ -3501,7 +3501,6 @@ - } - - #ifdef QT_QWS_CLIENTBLIT --#ifdef QT_NO_QWS_CURSOR - // This optimization only really works when there isn't a crazy cursor - // wizzing around. - QRegion directPaint = (r - transparentRegion); // in gloal coords -@@ -3513,7 +3512,6 @@ - QWSRegionEvent::DirectPaint, id); - } - #endif --#endif - } - - if (doLock) diff --git a/recipes/qt4/qt4-embedded-gles/linux.conf b/recipes/qt4/qt4-embedded-gles/linux.conf index 4394fbc5f7..12b5633f57 100644 --- a/recipes/qt4/qt4-embedded-gles/linux.conf +++ b/recipes/qt4/qt4-embedded-gles/linux.conf @@ -12,12 +12,10 @@ QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) QMAKE_INCDIR_EGL = ${STAGING_INCDIR}/GLES2 -QMAKE_INCDIR_OPENGL = ${STAGING_INCDIR}/GLES -QMAKE_INCDIR_OPENGL_ES1 = ${STAGING_INCDIR}/GLES +QMAKE_INCDIR_OPENGL = ${STAGING_INCDIR}/GLES2 QMAKE_INCDIR_OPENGL_ES2 = ${STAGING_INCDIR}/GLES2 QMAKE_LIBDIR_EGL = ${STAGING_LIBDIR} QMAKE_LIBDIR_OPENGL = ${STAGING_LIBDIR} -QMAKE_LIBDIR_OPENGL_ES1 = ${STAGING_LIBDIR} QMAKE_LIBDIR_OPENGL_ES2 = ${STAGING_LIBDIR} QMAKE_LIBS = -Wl,-rpath-link,SEDME/lib -lglib-2.0 @@ -26,9 +24,7 @@ QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) QMAKE_LIBS_NIS = -lnsl QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um -QMAKE_LIBS_OPENGL = -lEGL -lGLES_CM -lIMGegl -lsrv_um -QMAKE_LIBS_OPENGL_QT = -lEGL -lGLES_CM -lIMGegl -lsrv_um -QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um +QMAKE_LIBS_OPENGL_QT = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um QMAKE_LIBS_THREAD = -lpthread @@ -61,6 +57,6 @@ QMAKE_INSTALL_FILE = install -m 644 -p QMAKE_INSTALL_PROGRAM = install -m 755 -p #These defines are documented in the powervr README, please read it -DEFINES += QT_QWS_CLIENTBLIT +DEFINES += QT_NO_OPENVG QT_QWS_CLIENTBLIT QT_NO_QWS_CURSOR include(unix.conf) diff --git a/recipes/qt4/qt4-embedded-gles_4.5.2.bb.disabled b/recipes/qt4/qt4-embedded-gles_4.5.2.bb.disabled index ce3d8f6c50..a888e7d6be 100644 --- a/recipes/qt4/qt4-embedded-gles_4.5.2.bb.disabled +++ b/recipes/qt4/qt4-embedded-gles_4.5.2.bb.disabled @@ -10,7 +10,7 @@ LICENSE = "LGPLv2.1 GPLv3" DEPENDS += "virtual/egl" PROVIDES += "qt4-embedded" -SRC_URI += "file://sgx-hack.patch" +SRC_URI += "file://sgx-hack.patch;patch=1" export EXTRA_QMAKE_MUNGE = " glmunge " diff --git a/recipes/qt4/qt4-embedded-gles_4.6.0.bb b/recipes/qt4/qt4-embedded-gles_4.6.0.bb new file mode 100644 index 0000000000..915dd0734f --- /dev/null +++ b/recipes/qt4/qt4-embedded-gles_4.6.0.bb @@ -0,0 +1,14 @@ +require qt4-embedded.inc +PR = "${INC_PR}.1" + +PROVIDES += "qt4-embedded" +QT_GLFLAGS = "-opengl es2 -openvg" + +require qt-4.6.0.inc + + +FILESPATHPKG .= ":qt4-embedded-${PV}:qt4-embedded" + +DEPENDS += "virtual/egl" + + diff --git a/recipes/qt4/qt4-embedded-gles_4.6.3.bb b/recipes/qt4/qt4-embedded-gles_4.6.2.bb similarity index 51% rename from recipes/qt4/qt4-embedded-gles_4.6.3.bb rename to recipes/qt4/qt4-embedded-gles_4.6.2.bb index 0b047fc5de..f518a47f63 100644 --- a/recipes/qt4/qt4-embedded-gles_4.6.3.bb +++ b/recipes/qt4/qt4-embedded-gles_4.6.2.bb @@ -1,14 +1,14 @@ require qt4-embedded.inc -PR = "${INC_PR}.8" +PR = "${INC_PR}.4" PROVIDES += "qt4-embedded" -QT_GLFLAGS = "-opengl es2 -depths 16,24,32 -plugin-gfx-powervr" +QT_GLFLAGS = "-opengl es2 -no-openvg -plugin-gfx-powervr" require qt-${PV}.inc -SRC_URI += "file://cursor-hack.diff" FILESPATHPKG .= ":qt4-embedded-${PV}:qt4-embedded" DEPENDS += "virtual/egl" -require recipes/egl/egl.inc + + diff --git a/recipes/qt4/qt4-embedded-gles_4.7.3.bb b/recipes/qt4/qt4-embedded-gles_4.7.3.bb deleted file mode 100644 index 8ab5a6c7a1..0000000000 --- a/recipes/qt4/qt4-embedded-gles_4.7.3.bb +++ /dev/null @@ -1,19 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -require qt4-embedded.inc - -PR = "${INC_PR}.10" - -QT_CONFIG_FLAGS_append_armv6 = " -no-neon " - -PROVIDES += "qt4-embedded" -QT_GLFLAGS = "-opengl es2 -depths 16,24,32 -plugin-gfx-powervr" - -FILESPATHPKG .= ":qt4-embedded-${PV}:qt4-embedded" - -require qt-${PV}.inc - -QT_CONFIG_FLAGS += " \ - -exceptions \ -" - diff --git a/recipes/qt4/qt4-embedded.inc b/recipes/qt4/qt4-embedded.inc index 168a8677e8..39a5e98ca5 100644 --- a/recipes/qt4/qt4-embedded.inc +++ b/recipes/qt4/qt4-embedded.inc @@ -4,7 +4,7 @@ LICENSE = "GPL QPL" PRIORITY = "optional" HOMEPAGE = "http://www.trolltech.com" DEPENDS += "directfb tslib" -INC_PR = "r33" +INC_PR = "r17" QT_BASE_NAME ?= "qt4-embedded" QT_BASE_LIB ?= "libqt-embedded" @@ -12,40 +12,30 @@ QT_DIR_NAME = "qtopia" QT_LIBINFIX = "E" SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \ - file://0001-cross-compile.patch \ - file://0002-fix-resinit-declaration.patch \ - file://0003-no-tools.patch \ - file://0004-no-qmake.patch \ - file://0006-freetype-host-includes.patch \ - file://0007-openssl-host-includes.patch \ - file://0008-qt-lib-infix.patch \ - file://0009-support-2bpp.patch \ - file://fix-config-tests.patch \ + file://0001-cross-compile.patch;patch=1 \ + file://0002-fix-resinit-declaration.patch;patch=1 \ + file://0003-no-tools.patch;patch=1 \ + file://0004-no-qmake.patch;patch=1 \ + file://0006-freetype-host-includes.patch;patch=1 \ + file://0007-openssl-host-includes.patch;patch=1 \ + file://0008-qt-lib-infix.patch;patch=1 \ + file://0009-support-2bpp.patch;patch=1 \ + file://fix-config-tests.patch;patch=1 \ file://g++.conf \ file://linux.conf \ " - -# Set necessary variables in the profile -SRC_URI += "file://qte.sh" - S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}" QT_CONFIG_FLAGS += " \ -qtlibinfix ${QT_LIBINFIX} \ + -qt-decoration-styled -plugin-decoration-default -plugin-decoration-windows \ -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb \ - -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb -qt-mouse-linuxinput \ - -qt-kbd-tty -qt-kbd-linuxinput \ + -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb \ + -qt-kbd-tty \ -DQT_KEYPAD_NAVIGATION \ " require qt4.inc -do_install_append() { - install -d ${D}${sysconfdir}/profile.d/ - install -m 0755 ${WORKDIR}/qte.sh ${D}${sysconfdir}/profile.d/ -} - -FILES_${PN} += " ${sysconfdir}/profile.d/qte.sh" - inherit qt4e diff --git a/recipes/qt4/qt4-embedded_4.4.3.bb b/recipes/qt4/qt4-embedded_4.4.3.bb new file mode 100644 index 0000000000..075aafd936 --- /dev/null +++ b/recipes/qt4/qt4-embedded_4.4.3.bb @@ -0,0 +1,3 @@ +require qt4-embedded.inc + +PR = "${INC_PR}.2" diff --git a/recipes/qt4/qt4-embedded_4.5.2.bb b/recipes/qt4/qt4-embedded_4.5.2.bb index 3e0c8600ec..c941b25dd4 100644 --- a/recipes/qt4/qt4-embedded_4.5.2.bb +++ b/recipes/qt4/qt4-embedded_4.5.2.bb @@ -3,8 +3,5 @@ require qt4-embedded.inc PR = "${INC_PR}.1" LICENSE = "LGPLv2.1 GPLv3" -SRC_URI += "file://0010-no-simpledecoration-example.patch \ - file://hack-out-pg_config.patch" - -SRC_URI[md5sum] = "62186345c609a72b89f16d83bc7a130f" -SRC_URI[sha256sum] = "272301a27e2f7bcd44c8d09f496e1c749c80b86d9489ea9c30bb265bf2dd02fc" +SRC_URI += "file://0010-no-simpledecoration-example.patch;patch=1 \ + file://hack-out-pg_config.patch;patch=1" diff --git a/recipes/qt4/qt4-embedded_4.6.0.bb b/recipes/qt4/qt4-embedded_4.6.0.bb new file mode 100644 index 0000000000..58fda71ad1 --- /dev/null +++ b/recipes/qt4/qt4-embedded_4.6.0.bb @@ -0,0 +1,6 @@ +require qt4-embedded.inc + +PR = "${INC_PR}.0" + +require qt-4.6.0.inc + diff --git a/recipes/qt4/qt4-embedded_4.6.2.bb b/recipes/qt4/qt4-embedded_4.6.2.bb new file mode 100644 index 0000000000..8583752d6d --- /dev/null +++ b/recipes/qt4/qt4-embedded_4.6.2.bb @@ -0,0 +1,8 @@ +require qt4-embedded.inc + +PR = "${INC_PR}.1" + +QT_CONFIG_FLAGS_append_armv6 = " -no-neon " + +require qt-${PV}.inc + diff --git a/recipes/qt4/qt4-embedded_4.6.3.bb b/recipes/qt4/qt4-embedded_4.6.3.bb deleted file mode 100644 index 8c883f54a8..0000000000 --- a/recipes/qt4/qt4-embedded_4.6.3.bb +++ /dev/null @@ -1,11 +0,0 @@ -require qt4-embedded.inc - -PR = "${INC_PR}.2" - -QT_CONFIG_FLAGS_append_armv6 = " -no-neon " - -require qt-${PV}.inc - -# SRC_URI from qt4-embedded.inc was replaced in .inc above and qte.sh lost -# Set necessary variables in the profile -SRC_URI += "file://qte.sh" diff --git a/recipes/qt4/qt4-embedded_4.7.3.bb b/recipes/qt4/qt4-embedded_4.7.3.bb deleted file mode 100644 index 47176a9c0b..0000000000 --- a/recipes/qt4/qt4-embedded_4.7.3.bb +++ /dev/null @@ -1,18 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -require qt4-embedded.inc - -PR = "${INC_PR}.1" - -QT_CONFIG_FLAGS_append_armv6 = " -no-neon " - -require qt-${PV}.inc - -# SRC_URI from qt4-embedded.inc was replaced in .inc above and qte.sh lost -# Set necessary variables in the profile -SRC_URI += "file://qte.sh" - -QT_CONFIG_FLAGS += " \ - -exceptions \ -" - diff --git a/recipes/qt4/qt4-native_4.6.3.bb b/recipes/qt4/qt4-native_4.6.3.bb deleted file mode 100644 index b0c9bcb1dc..0000000000 --- a/recipes/qt4/qt4-native_4.6.3.bb +++ /dev/null @@ -1,13 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -require qt4-native.inc -LICENSE = "LGPLv2.1 GPLv3" -PR = "${INC_PR}.0" - -EXTRA_OECONF += " -no-fast -silent -no-rpath" - -TOBUILD := "src/tools/bootstrap ${TOBUILD}" - -SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" -SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" - diff --git a/recipes/qt4/qt4-native_4.7.3.bb b/recipes/qt4/qt4-native_4.7.3.bb deleted file mode 100644 index a6880a693a..0000000000 --- a/recipes/qt4/qt4-native_4.7.3.bb +++ /dev/null @@ -1,19 +0,0 @@ -require qt4-native.inc -LICENSE = "LGPLv2.1 GPLv3" - -PR = "${INC_PR}.0" - -# Find the g++.conf/linux.conf in the right directory. -FILESPATHPKG =. "qt-${PV}:" -SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ - file://qt-config.patch \ - file://g++.conf \ - file://linux.conf" -S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" - -EXTRA_OECONF += " -no-fast -silent -no-rpath" - -TOBUILD := "src/tools/bootstrap ${TOBUILD}" - -SRC_URI[md5sum] = "49b96eefb1224cc529af6fe5608654fe" -SRC_URI[sha256sum] = "d02b6fd69d089c01f4a787aa18175d074ccaecf8980a5956e328c2991905937e" diff --git a/recipes/qt4/qt4-native.inc b/recipes/qt4/qt4-tools-native.inc similarity index 56% rename from recipes/qt4/qt4-native.inc rename to recipes/qt4/qt4-tools-native.inc index 2156023793..bd0d2e138e 100644 --- a/recipes/qt4/qt4-native.inc +++ b/recipes/qt4/qt4-tools-native.inc @@ -1,17 +1,16 @@ -DESCRIPTION = "Native version Qt/[X11|Mac|Embedded]" -DEPENDS = "zlib-native dbus-native" +DESCRIPTION = "Native tools for Qt/[X11|Mac|Embedded] version 4.x" +DEPENDS = "zlib-native dbus-native libsm-native" SECTION = "libs" HOMEPAGE = "http://www.trolltech.com" PRIORITY = "optional" LICENSE = "GPL" -PROVIDES = "qt4-tools-native" -INC_PR = "r1" +INC_PR = "r6" inherit native SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ - file://qt-config.patch \ + file://qt-config.patch;patch=1 \ file://g++.conf \ file://linux.conf" S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" @@ -20,14 +19,13 @@ EXTRA_OECONF = "-prefix ${prefix} \ -L ${STAGING_LIBDIR_NATIVE} \ -I ${STAGING_INCDIR_NATIVE} \ -qt-libjpeg -qt-gif -system-zlib \ - -no-libjpeg -no-libpng -no-libmng -no-libtiff \ + -no-libjpeg -no-libpng \ -no-accessibility \ -no-cups \ + -no-exceptions \ -no-nas-sound \ - -no-nis -no-openssl \ - -verbose -release \ - -embedded -no-freetype -no-glib -no-iconv \ - -exceptions -xmlpatterns \ + -no-nis \ + -verbose -release -static \ -qt3support" # yank default -e, otherwise we get the following error: @@ -42,15 +40,13 @@ TOBUILD = "\ src/tools/moc \ src/corelib \ src/sql \ + src/dbus \ + src/qt3support \ src/xml \ - src/network \ src/tools/uic \ src/tools/rcc \ - src/xmlpatterns \ - src/dbus \ + src/network \ src/gui \ - src/testlib \ - src/qt3support \ src/tools/uic3 \ tools/linguist/lrelease \ tools/linguist/lupdate \ @@ -63,22 +59,17 @@ do_compile() { done } -NATIVE_INSTALL_WORKS = "1" - -do_install() { - install -d ${D}${bindir}/ - install -m 0755 bin/qmake ${D}${bindir}/qmake2 +do_stage() { + install -d ${STAGING_BINDIR_NATIVE}/ + install -m 0755 bin/qmake ${STAGING_BINDIR_NATIVE}/qmake2 for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do - install -m 0755 bin/${i} ${D}${bindir}/${i}4 + install -m 0755 bin/${i} ${STAGING_BINDIR_NATIVE}/${i}4 done + + install -d ${STAGING_DATADIR_NATIVE}/qt4/ + cp -PfR mkspecs ${STAGING_DATADIR_NATIVE}/qt4/ + ln -sf linux-g++ ${STAGING_DATADIR_NATIVE}/qt4/mkspecs/${BUILD_OS}-oe-g++ + cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf ${STAGING_DATADIR_NATIVE}/qt4/mkspecs/common/ - install -d ${D}${datadir}/qt4/ - cp -PfR mkspecs ${D}${datadir}/qt4/ - ln -sf linux-g++ ${D}${datadir}/qt4/mkspecs/${BUILD_OS}-oe-g++ - cp -f ${WORKDIR}/g++.conf ${WORKDIR}/linux.conf ${D}${datadir}/qt4/mkspecs/common/ - install -m 0644 tools/porting/src/q3porting.xml ${D}${datadir}/qt4/ - - for i in ${TOBUILD}; do - cd ${S}/$i && oe_runmake install INSTALL_ROOT=${D} - done + install -m 0644 tools/porting/src/q3porting.xml ${STAGING_DATADIR_NATIVE}/qt4/ } diff --git a/recipes/qt4/qt4-tools-native_4.4.3.bb b/recipes/qt4/qt4-tools-native_4.4.3.bb new file mode 100644 index 0000000000..3ad402f0ed --- /dev/null +++ b/recipes/qt4/qt4-tools-native_4.4.3.bb @@ -0,0 +1,18 @@ +require qt4-tools-native.inc + +# Older releases have different source archive name, than .inc +SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \ + file://configure-lflags.patch;patch=1 \ + file://qt-config.patch;patch=1 \ + file://g++.conf \ + file://linux.conf" + +S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}" + +EXTRA_OECONF += " -fast" + +do_configure() { + (echo o; echo yes) | LFLAGS="-L${STAGING_LIBDIR_NATIVE}" ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}" +} + +PR = "${INC_PR}.1" diff --git a/recipes/qt4/qt4-native_4.5.2.bb b/recipes/qt4/qt4-tools-native_4.5.2.bb similarity index 70% rename from recipes/qt4/qt4-native_4.5.2.bb rename to recipes/qt4/qt4-tools-native_4.5.2.bb index 8a94694f74..c083aa0197 100644 --- a/recipes/qt4/qt4-native_4.5.2.bb +++ b/recipes/qt4/qt4-tools-native_4.5.2.bb @@ -1,9 +1,9 @@ -require qt4-native.inc +require qt4-tools-native.inc # Older releases have different source archive name, than .inc SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \ - file://configure-lflags.patch \ - file://qt-config.patch \ + file://configure-lflags.patch;patch=1 \ + file://qt-config.patch;patch=1 \ file://g++.conf \ file://linux.conf" @@ -19,6 +19,3 @@ LICENSE = "LGPLv2.1 GPLv3" PR = "${INC_PR}.2" TOBUILD := "src/tools/bootstrap ${TOBUILD}" - -SRC_URI[md5sum] = "62186345c609a72b89f16d83bc7a130f" -SRC_URI[sha256sum] = "272301a27e2f7bcd44c8d09f496e1c749c80b86d9489ea9c30bb265bf2dd02fc" diff --git a/recipes/qt4/qt4-tools-native_4.6.0.bb b/recipes/qt4/qt4-tools-native_4.6.0.bb new file mode 100644 index 0000000000..44258b205c --- /dev/null +++ b/recipes/qt4/qt4-tools-native_4.6.0.bb @@ -0,0 +1,9 @@ +DEFAULT_PREFERENCE = "-1" + +require qt4-tools-native.inc +LICENSE = "LGPLv2.1 GPLv3" +PR = "${INC_PR}.0" + +EXTRA_OECONF += " -fast" + +TOBUILD := "src/tools/bootstrap ${TOBUILD}" diff --git a/recipes/qt4/qt4-tools-native_4.6.2.bb b/recipes/qt4/qt4-tools-native_4.6.2.bb new file mode 100644 index 0000000000..894e497a9d --- /dev/null +++ b/recipes/qt4/qt4-tools-native_4.6.2.bb @@ -0,0 +1,9 @@ +DEFAULT_PREFERENCE = "-1" + +require qt4-tools-native.inc +LICENSE = "LGPLv2.1 GPLv3" +PR = "${INC_PR}.0" + +EXTRA_OECONF += " -no-fast -silent -no-rpath" + +TOBUILD := "src/tools/bootstrap ${TOBUILD}" diff --git a/recipes/qt4/qt4-tools-sdk_4.5.2.bb b/recipes/qt4/qt4-tools-sdk_4.5.2.bb index 0fd489044d..c0f2f7aad4 100644 --- a/recipes/qt4/qt4-tools-sdk_4.5.2.bb +++ b/recipes/qt4/qt4-tools-sdk_4.5.2.bb @@ -8,8 +8,8 @@ LICENSE = "LGPLv2.1 GPLv3" inherit sdk SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-embedded-linux-opensource-src-${PV}.tar.bz2 \ - file://configure-lflags.patch \ - file://qt-config.patch \ + file://configure-lflags.patch;patch=1 \ + file://qt-config.patch;patch=1 \ file://g++.conf \ file://linux.conf" S = "${WORKDIR}/qt-embedded-linux-opensource-src-${PV}" @@ -69,6 +69,3 @@ do_install() { done } - -SRC_URI[md5sum] = "62186345c609a72b89f16d83bc7a130f" -SRC_URI[sha256sum] = "272301a27e2f7bcd44c8d09f496e1c749c80b86d9489ea9c30bb265bf2dd02fc" diff --git a/recipes/qt4/qt4-tools-sdk_4.6.3.bb b/recipes/qt4/qt4-tools-sdk_4.6.0.bb similarity index 74% rename from recipes/qt4/qt4-tools-sdk_4.6.3.bb rename to recipes/qt4/qt4-tools-sdk_4.6.0.bb index 152d06845c..b74b8a27e0 100644 --- a/recipes/qt4/qt4-tools-sdk_4.6.3.bb +++ b/recipes/qt4/qt4-tools-sdk_4.6.0.bb @@ -5,15 +5,12 @@ HOMEPAGE = "http://www.trolltech.com" PRIORITY = "optional" LICENSE = "LGPLv2.1 GPLv3" -PR = "r1" - DEFAULT_PREFERENCE = "-1" inherit sdk SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ - file://configure-lflags.patch \ - file://compile.test-lflags.patch \ - file://qt-config.patch \ + file://configure-lflags.patch;patch=1 \ + file://qt-config.patch;patch=1 \ file://g++.conf \ file://linux.conf" @@ -32,7 +29,6 @@ EXTRA_OECONF = "-prefix ${prefix} \ -verbose -release -fast -static \ -qt3support \ -I${STAGING_DIR_NATIVE}/usr/include \ - -I${STAGING_DIR_NATIVE}/usr/include/freetype2 \ -I${STAGING_DIR_NATIVE}/usr/include/dbus-1.0 \ -I${STAGING_DIR_NATIVE}/usr/lib/dbus-1.0/include" @@ -74,17 +70,5 @@ do_install() { for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do install -m 0755 bin/${i} ${D}${bindir}/${i}4 done - - (cd ${D}${bindir}; \ - ln -s qmake2 qmake; \ - for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \ - ln -s ${i}4 ${i}; \ - done) - - # make a symbolic link to mkspecs for compatibility with Nokia's SDK - # and QTCreator - (cd ${D}${bindir}/..; ln -s ${TARGET_SYS}/usr/share/qtopia/mkspecs mkspecs;) } -SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" -SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" diff --git a/recipes/qt4/qt4-tools-sdk.inc b/recipes/qt4/qt4-tools-sdk_4.6.2.bb similarity index 66% rename from recipes/qt4/qt4-tools-sdk.inc rename to recipes/qt4/qt4-tools-sdk_4.6.2.bb index bd70046e61..b74b8a27e0 100644 --- a/recipes/qt4/qt4-tools-sdk.inc +++ b/recipes/qt4/qt4-tools-sdk_4.6.2.bb @@ -5,15 +5,12 @@ HOMEPAGE = "http://www.trolltech.com" PRIORITY = "optional" LICENSE = "LGPLv2.1 GPLv3" -INC_PR = "r3" - -FILESPATHPKG =. "qt-${PV}:" +DEFAULT_PREFERENCE = "-1" inherit sdk SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ - file://configure-lflags.patch \ - file://compile.test-lflags.patch \ - file://qt-config.patch \ + file://configure-lflags.patch;patch=1 \ + file://qt-config.patch;patch=1 \ file://g++.conf \ file://linux.conf" @@ -23,18 +20,17 @@ S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}" # FIXME: make it work with "${STAGING_BINDIR_NATIVE}/pkg-config --cflags dbus-1" EXTRA_OECONF = "-prefix ${prefix} \ -qt-libjpeg -qt-gif -system-zlib \ - -no-libjpeg -no-libpng -no-libmng -no-libtiff \ + -no-libjpeg -no-libpng \ -no-accessibility \ -no-cups \ -no-exceptions \ -no-nas-sound \ - -no-nis -no-openssl \ + -no-nis \ -verbose -release -fast -static \ - -embedded -no-freetype -no-glib -no-iconv \ -qt3support \ - -I${STAGING_DIR}/${HOST_SYS}${target_includedir} \ - -I${STAGING_DIR}/${HOST_SYS}${target_includedir}/dbus-1.0 \ - -I${STAGING_DIR}/${HOST_SYS}${target_libdir}/dbus-1.0/include" + -I${STAGING_DIR_NATIVE}/usr/include \ + -I${STAGING_DIR_NATIVE}/usr/include/dbus-1.0 \ + -I${STAGING_DIR_NATIVE}/usr/lib/dbus-1.0/include" # yank default -e, otherwise we get the following error: # moc_qbuffer.cpp: No such file or directory @@ -74,15 +70,5 @@ do_install() { for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do install -m 0755 bin/${i} ${D}${bindir}/${i}4 done - - (cd ${D}${bindir}; \ - ln -s qmake2 qmake; \ - for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \ - ln -s ${i}4 ${i}; \ - done) - - # make a symbolic link to mkspecs for compatibility with Nokia's SDK - # and QTCreator - (cd ${D}${bindir}/..; ln -s ${TARGET_SYS}/usr/share/qtopia/mkspecs mkspecs;) } diff --git a/recipes/qt4/qt4-tools-sdk_4.7.3.bb b/recipes/qt4/qt4-tools-sdk_4.7.3.bb deleted file mode 100644 index 832d3896f8..0000000000 --- a/recipes/qt4/qt4-tools-sdk_4.7.3.bb +++ /dev/null @@ -1,8 +0,0 @@ -require qt4-tools-sdk.inc - -PR = "${INC_PR}.0" - -DEFAULT_PREFERENCE = "-1" - -SRC_URI[md5sum] = "49b96eefb1224cc529af6fe5608654fe" -SRC_URI[sha256sum] = "d02b6fd69d089c01f4a787aa18175d074ccaecf8980a5956e328c2991905937e" diff --git a/recipes/qt4/qt4-x11-free-4.6.0/0008-qt-lib-infix.patch b/recipes/qt4/qt4-x11-free-4.6.0/0008-qt-lib-infix.patch new file mode 100644 index 0000000000..61e60a0eb6 --- /dev/null +++ b/recipes/qt4/qt4-x11-free-4.6.0/0008-qt-lib-infix.patch @@ -0,0 +1,32 @@ +--- /tmp/uitools.prf 2009-12-01 18:38:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/mkspecs/features/uitools.prf 2009-12-01 18:58:16.000000000 +0100 +@@ -3,11 +3,11 @@ + + # Include the correct version of the UiLoader library + symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib +-else: QTUITOOLS_LINKAGE = -lQtUiTools ++else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} + + CONFIG(debug, debug|release) { +- mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug +- win32: QTUITOOLS_LINKAGE = -lQtUiToolsd ++ mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug ++ win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d + } + LIBS += $$QTUITOOLS_LINKAGE + +--- /tmp/uitools.pro 2009-12-01 18:40:28.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/tools/designer/src/uitools/uitools.pro 2009-12-01 18:59:18.000000000 +0100 +@@ -1,5 +1,5 @@ + TEMPLATE = lib +-TARGET = $$qtLibraryTarget(QtUiTools) ++TARGET = QtUiTools + QT += xml + CONFIG += qt staticlib + DESTDIR = ../../../../lib +@@ -43,3 +43,5 @@ + QMAKE_PKGCONFIG_DESTDIR = pkgconfig + QMAKE_PKGCONFIG_REQUIRES += QtXml + } ++ ++TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end diff --git a/recipes/qt4/qt4-x11-free-4.6.0/0010-no-simpledecoration-example.patch b/recipes/qt4/qt4-x11-free-4.6.0/0010-no-simpledecoration-example.patch new file mode 100644 index 0000000000..fce5bba938 --- /dev/null +++ b/recipes/qt4/qt4-x11-free-4.6.0/0010-no-simpledecoration-example.patch @@ -0,0 +1,11 @@ +--- /tmp/qws.pro 2009-12-10 19:30:08.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/examples/qws/qws.pro 2009-12-10 19:30:21.000000000 +0100 +@@ -1,7 +1,7 @@ + TEMPLATE = subdirs + # no /dev/fbX + !qnx:!vxworks:SUBDIRS = framebuffer +-SUBDIRS += mousecalibration simpledecoration ++SUBDIRS += mousecalibration + + # install + sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro diff --git a/recipes/qt4/qt-4.7.3/linux.conf b/recipes/qt4/qt4-x11-free-4.6.0/linux.conf similarity index 75% rename from recipes/qt4/qt-4.7.3/linux.conf rename to recipes/qt4/qt4-x11-free-4.6.0/linux.conf index a54135513b..68ae80b929 100644 --- a/recipes/qt4/qt-4.7.3/linux.conf +++ b/recipes/qt4/qt4-x11-free-4.6.0/linux.conf @@ -13,27 +13,15 @@ QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) QMAKE_INCDIR_OPENGL = QMAKE_LIBDIR_OPENGL = -QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL -QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL -QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL -QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL -QMAKE_INCDIR_EGL = -QMAKE_LIBDIR_EGL = -QMAKE_INCDIR_OPENVG = -QMAKE_LIBDIR_OPENVG = -QMAKE_LIBS = +QMAKE_LIBS = -Wl,-rpath-link,SEDME/lib -lglib-2.0 QMAKE_LIBS_DYNLOAD = -ldl QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) QMAKE_LIBS_NIS = -lnsl -QMAKE_LIBS_EGL = -lEGL QMAKE_LIBS_OPENGL = -lGLU -lGL QMAKE_LIBS_OPENGL_QT = -lGL -QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM -QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 -QMAKE_LIBS_OPENVG = -lOpenVG QMAKE_LIBS_THREAD = -lpthread QMAKE_MOC = $(OE_QMAKE_MOC) @@ -44,7 +32,7 @@ QMAKE_QDBUSCPP2XML = $(OE_QMAKE_QDBUSCPP2XML) QMAKE_QDBUSXML2CPP = $(OE_QMAKE_QDBUSXML2CPP) QMAKE_AR = $(OE_QMAKE_AR) cqs -QMAKE_OBJCOPY = objcopy +QMAKE_OBJCOPY = ${OBJCOPY} QMAKE_RANLIB = QMAKE_TAR = tar -cf diff --git a/recipes/qt4/qt4-x11-free-4.6.2/0008-qt-lib-infix.patch b/recipes/qt4/qt4-x11-free-4.6.2/0008-qt-lib-infix.patch new file mode 100644 index 0000000000..61e60a0eb6 --- /dev/null +++ b/recipes/qt4/qt4-x11-free-4.6.2/0008-qt-lib-infix.patch @@ -0,0 +1,32 @@ +--- /tmp/uitools.prf 2009-12-01 18:38:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/mkspecs/features/uitools.prf 2009-12-01 18:58:16.000000000 +0100 +@@ -3,11 +3,11 @@ + + # Include the correct version of the UiLoader library + symbian: QTUITOOLS_LINKAGE = -lQtUiTools.lib +-else: QTUITOOLS_LINKAGE = -lQtUiTools ++else: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX} + + CONFIG(debug, debug|release) { +- mac: QTUITOOLS_LINKAGE = -lQtUiTools_debug +- win32: QTUITOOLS_LINKAGE = -lQtUiToolsd ++ mac: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}_debug ++ win32: QTUITOOLS_LINKAGE = -lQtUiTools$${QT_LIBINFIX}d + } + LIBS += $$QTUITOOLS_LINKAGE + +--- /tmp/uitools.pro 2009-12-01 18:40:28.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/tools/designer/src/uitools/uitools.pro 2009-12-01 18:59:18.000000000 +0100 +@@ -1,5 +1,5 @@ + TEMPLATE = lib +-TARGET = $$qtLibraryTarget(QtUiTools) ++TARGET = QtUiTools + QT += xml + CONFIG += qt staticlib + DESTDIR = ../../../../lib +@@ -43,3 +43,5 @@ + QMAKE_PKGCONFIG_DESTDIR = pkgconfig + QMAKE_PKGCONFIG_REQUIRES += QtXml + } ++ ++TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end diff --git a/recipes/qt4/qt4-x11-free-4.6.2/0010-no-simpledecoration-example.patch b/recipes/qt4/qt4-x11-free-4.6.2/0010-no-simpledecoration-example.patch new file mode 100644 index 0000000000..fce5bba938 --- /dev/null +++ b/recipes/qt4/qt4-x11-free-4.6.2/0010-no-simpledecoration-example.patch @@ -0,0 +1,11 @@ +--- /tmp/qws.pro 2009-12-10 19:30:08.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.0/examples/qws/qws.pro 2009-12-10 19:30:21.000000000 +0100 +@@ -1,7 +1,7 @@ + TEMPLATE = subdirs + # no /dev/fbX + !qnx:!vxworks:SUBDIRS = framebuffer +-SUBDIRS += mousecalibration simpledecoration ++SUBDIRS += mousecalibration + + # install + sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS README *.pro diff --git a/recipes/qt4/qt4-x11-free-4.6.2/linux.conf b/recipes/qt4/qt4-x11-free-4.6.2/linux.conf new file mode 100644 index 0000000000..68ae80b929 --- /dev/null +++ b/recipes/qt4/qt4-x11-free-4.6.2/linux.conf @@ -0,0 +1,54 @@ +# +# qmake configuration for common linux +# + +QMAKE_CFLAGS_THREAD += -D_REENTRANT +QMAKE_CXXFLAGS_THREAD += $$QMAKE_CFLAGS_THREAD + +QMAKE_INCDIR = +QMAKE_LIBDIR = +QMAKE_INCDIR_X11 = +QMAKE_LIBDIR_X11 = +QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) +QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) +QMAKE_INCDIR_OPENGL = +QMAKE_LIBDIR_OPENGL = + + +QMAKE_LIBS = -Wl,-rpath-link,SEDME/lib -lglib-2.0 +QMAKE_LIBS_DYNLOAD = -ldl +QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) +QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) +QMAKE_LIBS_NIS = -lnsl +QMAKE_LIBS_OPENGL = -lGLU -lGL +QMAKE_LIBS_OPENGL_QT = -lGL +QMAKE_LIBS_THREAD = -lpthread + +QMAKE_MOC = $(OE_QMAKE_MOC) +QMAKE_UIC = $(OE_QMAKE_UIC) +QMAKE_UIC3 = $(OE_QMAKE_UIC3) +QMAKE_RCC = $(OE_QMAKE_RCC) +QMAKE_QDBUSCPP2XML = $(OE_QMAKE_QDBUSCPP2XML) +QMAKE_QDBUSXML2CPP = $(OE_QMAKE_QDBUSXML2CPP) + +QMAKE_AR = $(OE_QMAKE_AR) cqs +QMAKE_OBJCOPY = ${OBJCOPY} +QMAKE_RANLIB = + +QMAKE_TAR = tar -cf +QMAKE_GZIP = gzip -9f + +QMAKE_COPY = cp -f +QMAKE_COPY_FILE = $(COPY) +QMAKE_COPY_DIR = $(COPY) -r +QMAKE_MOVE = mv -f +QMAKE_DEL_FILE = rm -f +QMAKE_DEL_DIR = rmdir +QMAKE_STRIP = $(OE_QMAKE_STRIP) +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_CHK_DIR_EXISTS = test -d +QMAKE_MKDIR = mkdir -p +QMAKE_INSTALL_FILE = install -m 644 -p +QMAKE_INSTALL_PROGRAM = install -m 755 -p + +include(unix.conf) diff --git a/recipes/qt4/qt4-x11-free-gles/linux.conf b/recipes/qt4/qt4-x11-free-gles/linux.conf index 70eccce125..b825e5dc16 100644 --- a/recipes/qt4/qt4-x11-free-gles/linux.conf +++ b/recipes/qt4/qt4-x11-free-gles/linux.conf @@ -12,12 +12,10 @@ QMAKE_LIBDIR_X11 = QMAKE_INCDIR_QT = $(OE_QMAKE_INCDIR_QT) QMAKE_LIBDIR_QT = $(OE_QMAKE_LIBDIR_QT) QMAKE_INCDIR_EGL = ${STAGING_INCDIR}/GLES2 -QMAKE_INCDIR_OPENGL = ${STAGING_INCDIR}/GLES -QMAKE_INCDIR_OPENGL_ES1 = ${STAGING_INCDIR}/GLES +QMAKE_INCDIR_OPENGL = ${STAGING_INCDIR}/GLES2 QMAKE_INCDIR_OPENGL_ES2 = ${STAGING_INCDIR}/GLES2 QMAKE_LIBDIR_EGL = ${STAGING_LIBDIR} QMAKE_LIBDIR_OPENGL = ${STAGING_LIBDIR} -QMAKE_LIBDIR_OPENGL_ES1 = ${STAGING_LIBDIR} QMAKE_LIBDIR_OPENGL_ES2 = ${STAGING_LIBDIR} QMAKE_LIBS = -Wl,-rpath-link,SEDME/lib -lglib-2.0 @@ -26,9 +24,7 @@ QMAKE_LIBS_X11 = $(OE_QMAKE_LIBS_X11) QMAKE_LIBS_X11SM = $(OE_QMAKE_LIBS_X11SM) QMAKE_LIBS_NIS = -lnsl QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um -QMAKE_LIBS_OPENGL = -lEGL -lGLES_CM -lIMGegl -lsrv_um -QMAKE_LIBS_OPENGL_QT = -lEGL -lGLES_CM -lIMGegl -lsrv_um -QMAKE_LIBS_OPENGL_ES1 = -lEGL -lGLES_CM -lIMGegl -lsrv_um +QMAKE_LIBS_OPENGL_QT = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lGLES_CM -lIMGegl -lsrv_um QMAKE_LIBS_THREAD = -lpthread diff --git a/recipes/qt4/qt4-x11-free-gles_4.5.2.bb b/recipes/qt4/qt4-x11-free-gles_4.5.2.bb index 57e15242ed..a3f60bf982 100644 --- a/recipes/qt4/qt4-x11-free-gles_4.5.2.bb +++ b/recipes/qt4/qt4-x11-free-gles_4.5.2.bb @@ -11,10 +11,9 @@ require qt4-x11-free_${PV}.bb PR = "${INC_PR}.3" DEPENDS += "virtual/egl" -require recipes/egl/egl.inc PROVIDES += "qt4-x11-free" -#SRC_URI += "file://sgx-hack.patch" -SRC_URI += "file://hack-out-pg_config.patch" +#SRC_URI += "file://sgx-hack.patch;patch=1" +SRC_URI += "file://hack-out-pg_config.patch;patch=1" export EXTRA_QMAKE_MUNGE = " glmunge " diff --git a/recipes/qt4/qt4-x11-free-gles_4.7.3.bb b/recipes/qt4/qt4-x11-free-gles_4.6.0.bb similarity index 57% rename from recipes/qt4/qt4-x11-free-gles_4.7.3.bb rename to recipes/qt4/qt4-x11-free-gles_4.6.0.bb index c5fd6f30ea..8d09d89f8d 100644 --- a/recipes/qt4/qt4-x11-free-gles_4.7.3.bb +++ b/recipes/qt4/qt4-x11-free-gles_4.6.0.bb @@ -1,11 +1,9 @@ -DEFAULT_PREFERENCE = "-1" - require qt4-x11-free.inc -PR = "${INC_PR}.7" +PR = "${INC_PR}.3" -QT_GLFLAGS = "-opengl es2 -depths 16,24,32 " +QT_GLFLAGS = "-opengl es2 -openvg" -require qt-${PV}.inc +require qt-4.6.0.inc QT_CONFIG_FLAGS += " \ -no-embedded \ @@ -15,5 +13,6 @@ QT_CONFIG_FLAGS += " \ FILESPATHPKG .= ":qt4-x11-free-${PV}:qt4-x11-free" DEPENDS += "virtual/egl" -require recipes/egl/egl.inc PROVIDES += "qt4-x11-free" + + diff --git a/recipes/qt4/qt4-x11-free-gles_4.6.3.bb b/recipes/qt4/qt4-x11-free-gles_4.6.2.bb similarity index 69% rename from recipes/qt4/qt4-x11-free-gles_4.6.3.bb rename to recipes/qt4/qt4-x11-free-gles_4.6.2.bb index b7cbde5591..669cbf651e 100644 --- a/recipes/qt4/qt4-x11-free-gles_4.6.3.bb +++ b/recipes/qt4/qt4-x11-free-gles_4.6.2.bb @@ -1,7 +1,7 @@ require qt4-x11-free.inc -PR = "${INC_PR}.7" +PR = "${INC_PR}.5" -QT_GLFLAGS = "-opengl es2 -depths 16,24,32 " +QT_GLFLAGS = "-opengl es2 -no-openvg" require qt-${PV}.inc @@ -13,5 +13,6 @@ QT_CONFIG_FLAGS += " \ FILESPATHPKG .= ":qt4-x11-free-${PV}:qt4-x11-free" DEPENDS += "virtual/egl" -require recipes/egl/egl.inc PROVIDES += "qt4-x11-free" + + diff --git a/recipes/qt4/qt4-x11-free-gles_git.bb.disabled b/recipes/qt4/qt4-x11-free-gles_git.bb.disabled index 289eb889cc..59778910b5 100644 --- a/recipes/qt4/qt4-x11-free-gles_git.bb.disabled +++ b/recipes/qt4/qt4-x11-free-gles_git.bb.disabled @@ -13,17 +13,17 @@ DEPENDS += "virtual/egl" SRCREV = "9ec431c" SRC_URI = "git://git.gitorious.org/qt/qt.git;protocol=http \ - file://0001-cross-compile.patch \ - file://0002-fix-resinit-declaration.patch \ - file://0003-no-tools.patch \ - file://0004-no-qmake.patch \ - file://0006-freetype-host-includes.patch \ - file://0007-openssl-host-includes.patch \ - file://0008-qt-lib-infix.patch \ + file://0001-cross-compile.patch;patch=1 \ + file://0002-fix-resinit-declaration.patch;patch=1 \ + file://0003-no-tools.patch;patch=1 \ + file://0004-no-qmake.patch;patch=1 \ + file://0006-freetype-host-includes.patch;patch=1 \ + file://0007-openssl-host-includes.patch;patch=1 \ + file://0008-qt-lib-infix.patch;patch=1 \ file://g++.conf \ file://linux.conf \ " -#SRC_URI += "file://sgx-hack.patch" +#SRC_URI += "file://sgx-hack.patch;patch=1" S = "${WORKDIR}/git" diff --git a/recipes/qt4/qt4-x11-free.inc b/recipes/qt4/qt4-x11-free.inc index 70d85c2068..fd33a21787 100644 --- a/recipes/qt4/qt4-x11-free.inc +++ b/recipes/qt4/qt4-x11-free.inc @@ -3,19 +3,19 @@ SECTION = "x11/libs" PRIORITY = "optional" HOMEPAGE = "http://www.trolltech.com" LICENSE = "GPL QPL" -DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" +DEPENDS += "virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor" -INC_PR = "r28" +INC_PR = "r16" SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \ - file://0001-cross-compile.patch \ - file://0002-fix-resinit-declaration.patch \ - file://0003-no-tools.patch \ - file://0004-no-qmake.patch \ - file://0006-freetype-host-includes.patch \ - file://0007-openssl-host-includes.patch \ - file://0008-qt-lib-infix.patch \ - file://fix-config-tests.patch \ + file://0001-cross-compile.patch;patch=1 \ + file://0002-fix-resinit-declaration.patch;patch=1 \ + file://0003-no-tools.patch;patch=1 \ + file://0004-no-qmake.patch;patch=1 \ + file://0006-freetype-host-includes.patch;patch=1 \ + file://0007-openssl-host-includes.patch;patch=1 \ + file://0008-qt-lib-infix.patch;patch=1 \ + file://fix-config-tests.patch;patch=1 \ file://g++.conf \ file://linux.conf \ " diff --git a/recipes/qt4/qt4-x11-free_4.4.3.bb b/recipes/qt4/qt4-x11-free_4.4.3.bb new file mode 100644 index 0000000000..4a52083cbd --- /dev/null +++ b/recipes/qt4/qt4-x11-free_4.4.3.bb @@ -0,0 +1,3 @@ +require qt4-x11-free.inc +PR = "${INC_PR}.1" +QT_CONFIG_FLAGS += "-no-tablet" diff --git a/recipes/qt4/qt4-x11-free_4.5.2.bb b/recipes/qt4/qt4-x11-free_4.5.2.bb index b545dea629..7aebd68320 100644 --- a/recipes/qt4/qt4-x11-free_4.5.2.bb +++ b/recipes/qt4/qt4-x11-free_4.5.2.bb @@ -2,7 +2,4 @@ require qt4-x11-free.inc LICENSE = "LGPLv2.1 GPLv3" PR = "${INC_PR}.3" -SRC_URI += "file://hack-out-pg_config.patch" - -SRC_URI[md5sum] = "d8bcc070a58db25c228b7729ffad4550" -SRC_URI[sha256sum] = "4e4c8619335cac14ba0c52d1555fab549a562fb774c1c08dcbd2be9de38120a2" +SRC_URI += "file://hack-out-pg_config.patch;patch=1" diff --git a/recipes/qt4/qt4-x11-free_4.6.0.bb b/recipes/qt4/qt4-x11-free_4.6.0.bb new file mode 100644 index 0000000000..685b7add57 --- /dev/null +++ b/recipes/qt4/qt4-x11-free_4.6.0.bb @@ -0,0 +1,11 @@ +require qt4-x11-free.inc +PR = "${INC_PR}.1" + +require qt-4.6.0.inc + +QT_CONFIG_FLAGS += " \ + -no-embedded \ + -xrandr \ + -x11" + + diff --git a/recipes/qt4/qt4-x11-free_4.6.3.bb b/recipes/qt4/qt4-x11-free_4.6.2.bb similarity index 98% rename from recipes/qt4/qt4-x11-free_4.6.3.bb rename to recipes/qt4/qt4-x11-free_4.6.2.bb index 53efd7c8bb..fe03daa971 100644 --- a/recipes/qt4/qt4-x11-free_4.6.3.bb +++ b/recipes/qt4/qt4-x11-free_4.6.2.bb @@ -9,3 +9,5 @@ QT_CONFIG_FLAGS += " \ -no-embedded \ -xrandr \ -x11" + + diff --git a/recipes/qt4/qt4-x11-free_4.7.3.bb b/recipes/qt4/qt4-x11-free_4.7.3.bb deleted file mode 100644 index 79a765ed74..0000000000 --- a/recipes/qt4/qt4-x11-free_4.7.3.bb +++ /dev/null @@ -1,15 +0,0 @@ -DEFAULT_PREFERENCE = "-1" - -require qt4-x11-free.inc - -PR = "${INC_PR}.0" - -QT_CONFIG_FLAGS_append_armv6 = " -no-neon " - -require qt-${PV}.inc - -QT_CONFIG_FLAGS += " \ - -no-embedded \ - -xrandr \ - -x11" - diff --git a/recipes/qt4/qt4.inc b/recipes/qt4/qt4.inc index b37e7ffb5c..bd1f6010ca 100644 --- a/recipes/qt4/qt4.inc +++ b/recipes/qt4/qt4.inc @@ -1,6 +1,6 @@ inherit qmake_base -DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base mysql5 postgresql sqlite sqlite3" +DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 gstreamer gst-plugins-base mysql postgresql sqlite sqlite3" require qt4_arch.inc QT_ARCH := "${@qt_arch(d)}" @@ -17,14 +17,13 @@ EXTRA_OEMAKE = "-e" EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \ INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \ QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \ - AR="${TARGET_PREFIX}ar cqs" QMAKE_LRELEASE="${STAGING_BINDIR_NATIVE}/lrelease4" \ - QMAKE_RCC="${STAGING_BINDIR_NATIVE}/rcc4" QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc4" \ - QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' + AR="${TARGET_PREFIX}ar cqs" \ + MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' export QT_CONF_PATH="${WORKDIR}/qt.conf" # Library packages -QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns phonon QtMultimedia QtOpenVG QtMediaServices QtDeclarative" +QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml phonon QtMultimedia QtOpenVG" QT_EXTRA_LIBS = "pvrQWSWSEGL" @@ -35,7 +34,7 @@ python __anonymous () { dev_packages = [] dbg_packages = [] for name in bb.data.getVar("QT_LIB_NAMES", d, 1).split(): - pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4" + pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" # NOTE: the headers for QtAssistantClient are different incname = name.replace("QtAssistantClient", "QtAssistant") bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals(), d) @@ -53,7 +52,7 @@ python __anonymous () { dbg_packages.append("%s-dbg" % name) for name in bb.data.getVar("QT_EXTRA_LIBS", d, 1).split(): - pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "").replace("_", "-") + "4" + pkg = "${QT_BASE_LIB}" + name.lower().replace("qt", "") + "4" bb.data.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals(), d) bb.data.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl ${libdir}/lib%(name)s.a @@ -80,72 +79,47 @@ OTHER_PACKAGES = "\ ${QT_BASE_NAME}-designer \ ${QT_BASE_NAME}-examples \ ${QT_BASE_NAME}-fonts \ - ${QT_BASE_NAME}-fonts-ttf-vera \ - ${QT_BASE_NAME}-fonts-ttf-dejavu \ - ${QT_BASE_NAME}-fonts-pfa \ - ${QT_BASE_NAME}-fonts-pfb \ - ${QT_BASE_NAME}-fonts-qpf \ ${QT_BASE_NAME}-linguist \ ${QT_BASE_NAME}-makeqpf \ ${QT_BASE_NAME}-mkspecs \ ${QT_BASE_NAME}-pixeltool \ - ${QT_BASE_NAME}-qmlviewer \ - ${QT_BASE_NAME}-xmlpatterns \ - ${QT_BASE_NAME}-qt3to4 \ - ${QT_BASE_NAME}-qml-plugins" + ${QT_BASE_NAME}-qt3to4" PACKAGES += "${LIB_PACKAGES} ${DEV_PACKAGES} ${DBG_PACKAGES} ${OTHER_PACKAGES}" -PACKAGES_DYNAMIC = "${QT_BASE_NAME}-plugin-* ${QT_BASE_NAME}-translation-* ${QT_BASE_NAME}-fonts-*" +PACKAGES_DYNAMIC = "${QT_BASE_NAME}-plugin-* ${QT_BASE_NAME}-translation-*" ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${QT_BASE_NAME}-fonts = "1" FILES_${PN} = "" FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" FILES_${PN}-dbg = "" RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}" RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}" RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}" -RRECOMMENDS_${QT_BASE_NAME}-fonts = " \ - ${QT_BASE_NAME}-fonts-ttf-vera \ - ${QT_BASE_NAME}-fonts-ttf-dejavu \ - ${QT_BASE_NAME}-fonts-pfa \ - ${QT_BASE_NAME}-fonts-pfb \ - ${QT_BASE_NAME}-fonts-qpf" FILES_${QT_BASE_NAME}-tools = "${bindir}/uic* ${bindir}/moc ${bindir}/rcc ${bindir}/qttracereplay ${bindir}/qdoc*" -FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc ${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc*" FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator" FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator" FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig" FILES_${QT_BASE_NAME}-common-dbg = "${bindir}/.debug/qtconfig" FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer" FILES_${QT_BASE_NAME}-dbus-dbg = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer" -FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/*" -FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/.debug/* ${bindir}/${QT_DIR_NAME}/demos/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/*/.debug" +FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo ${bindir}/${QT_DIR_NAME}/demos/*" +FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo ${bindir}/${QT_DIR_NAME}/demos/.debug/* ${bindir}/${QT_DIR_NAME}/demos/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/*/.debug" FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*" FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*" FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*" -FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/*/.debug/* ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/.debug/*" -FILES_${QT_BASE_NAME}-fonts-ttf-vera = "${libdir}/fonts/Vera*.ttf" -FILES_${QT_BASE_NAME}-fonts-ttf-dejavu = "${libdir}/fonts/DejaVu*.ttf" -FILES_${QT_BASE_NAME}-fonts-pfa = "${libdir}/fonts/*.pfa" -FILES_${QT_BASE_NAME}-fonts-pfb = "${libdir}/fonts/*.pfb" -FILES_${QT_BASE_NAME}-fonts-qpf = "${libdir}/fonts/*.qpf" +FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug" +FILES_${QT_BASE_NAME}-fonts = "${libdir}/fonts" FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts" FILES_${QT_BASE_NAME}-linguist-dbg = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts" FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool" FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool" FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml" FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4" -FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer" -FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer" FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf" FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/*" -FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*" -FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*" -FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/*" -FILES_${QT_BASE_NAME}-qml-plugins-dbg = "${libdir}/${QT_DIR_NAME}/imports/*/*/*/.debug/* ${libdir}/${QT_DIR_NAME}/imports/*/.debug" + do_configure() { unset QMAKESPEC @@ -168,7 +142,6 @@ do_configure() { echo "Libraries=${libdir}" >> $QT_CONF_PATH echo "Binaries=${bindir}" >> $QT_CONF_PATH echo "Plugins=${libdir}/${QT_DIR_NAME}/plugins" >> $QT_CONF_PATH - echo "Imports=${libdir}/${QT_DIR_NAME}/imports" >> $QT_CONF_PATH echo "Data=${datadir}/${QT_DIR_NAME}" >> $QT_CONF_PATH echo "Translations=${datadir}/${QT_DIR_NAME}/translations" >> $QT_CONF_PATH echo "Settings=${sysconfdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH @@ -186,7 +159,6 @@ do_configure() { -docdir ${docdir}/${QT_DIR_NAME} \ -headerdir ${includedir}/${QT_DIR_NAME} \ -plugindir ${libdir}/${QT_DIR_NAME}/plugins \ - -importdir ${libdir}/${QT_DIR_NAME}/imports \ -translationdir ${datadir}/${QT_DIR_NAME}/translations \ -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ -demosdir ${bindir}/${QT_DIR_NAME}/demos \ @@ -260,7 +232,6 @@ python populate_packages_prepend() { qtopia_split('script', 'script', '^libqtscript(.*)\.so$') qtopia_split('styles', 'style', '^libq(.*)\.so$') qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$') - qtopia_split('bearer', 'bearer', '^libq(.*)bearer\.so$') } do_install() { @@ -281,22 +252,21 @@ do_install() { -e 's#Iin#I${in#g' \ ${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc - sed -i -e s#" -Wl,-rpath-link,${S}/lib"##g \ - ${D}${datadir}/${QT_DIR_NAME}/mkspecs/common/linux.conf - # fix pkgconfig files sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \ -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \ ${D}${libdir}/pkgconfig/*.pc for name in ${QT_LIB_NAMES}; do sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc - if [ -f ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc ]; then - sed -i -e /^includedir=/s#"/${name}"## \ - -e /^Cflags:/s#"${QT_DIR_NAME}"#"${name}"# \ - ${D}${libdir}/pkgconfig/${name}${QT_LIBINFIX}.pc - fi done + # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here: + for pc in ${D}${libdir}/pkgconfig/*.pc ; do + sed -i -e "s:prefix}include/${QT_BASE_NAME}/$(basename $pc .pc):prefix}/include:" \ + -e "s,Cflags: ,Cflags: -IP{includedir}/${QT_BASE_NAME}/$(basename $pc .pc) ," \ + -e 's:IP{:I${:g' $pc + done + install -d ${D}/${libdir}/fonts touch ${D}/${libdir}/fonts/fontdir } diff --git a/recipes/qt4/qt4_arch.inc b/recipes/qt4/qt4_arch.inc index e8c8fabe68..7f4be63bca 100644 --- a/recipes/qt4/qt4_arch.inc +++ b/recipes/qt4/qt4_arch.inc @@ -17,9 +17,9 @@ def qt_arch(d): def qt_endian(d): import bb - if bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "le": + if bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "le": return "-little-endian" - elif bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "be": + elif bb.data.getVar('SITEINFO_ENDIANESS', d, True) == "be": return "-big-endian" else: assert False