Pull request for branch various-bumps
Hello,
This stack of patches does a number of things :
* Bumps WebKit/Midori/Cairo/Glib/ATK/Pango/libsoup
* Adds a new libgail package, which is a new dependency of WebKit
* Solves bug #1051 (webkit build issue), #1405 (webkit build issue), #829 (webkit build issue) and probably #1741 (gettext build issue, but rather related to the toolchain)
* Fixes the build of icu after changes to the definition of TARGET_CXX that have been merged some time ago.
Thanks,
Thomas
The following changes since commit 3435c1afb58307240be8e4607b5bb7d239fac4e9:
Peter Korsgaard (1):
kconfig: implement KCONFIG_PROBABILITY for rand{,package}config
are available in the git repository at:
git://git.busybox.net/~tpetazzoni/git/buildroot various-bumps
Lionel Landwerlin (4):
libglib2: bump to 2.24.0
atk: bump to 1.30
pango: bump to 1.28
package: add libgail packageThomas Petazzoni (12):
webkit: bump to webkitgtk 1.2.3
midori: bump to 0.2.6
icu: add quotes around TARGET_CXX
cairo: bump to 1.8.10
libsoup: bump version to 2.31.2
xkeyboard-config: add dependency on host-xapp_xkbcomp
xserver: tell the X server where fonts are installed
xserver: Add xkeyboard-config as a dependency
midori: make sure it can't be selected if webkit can't be enabled
webkit: the X11 variant needs libXt
webkit: Fix build failure on uClibc
Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc
package/Config.in | 1 + package/atk/atk.mk | 6 +- package/cairo/cairo-1.6.4-directfb-all.patch | 1012 -------------------- package/cairo/cairo-1.8.10-directfb.patch | 39 + package/cairo/cairo.mk | 3 +- package/icu/icu.mk | 2 +- package/libgail/Config.in | 15 + .../libgail-1.22.3-Relax-X11-dependencies.patch | 42 + package/libgail/libgail.mk | 28 + package/libglib2/Config.in | 1 + package/libglib2/libglib2.mk | 8 +- package/libsoup/libsoup.mk | 9 +- package/midori/Config.in | 7 +- package/midori/midori-0.0.18-webkit.patch | 67 -- package/midori/midori.mk | 27 +- package/pango/pango.mk | 7 +- package/webkit/Config.in | 2 + package/webkit/gtk-doc.make | 173 ---- ...webkit-1.2.3-fix-build-issue-with-old-gtk.patch | 22 + .../webkit/webkit-1.2.3-pthread_getattr_np.patch | 79 ++ package/webkit/webkit-r30267-trunc.patch | 11 - package/webkit/webkit.mk | 22 +- package/x11r7/libxcb/libxcb.mk | 3 + package/x11r7/pthread-stubs/pthread-stubs.mk | 1 + package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk | 2 + package/x11r7/xcb-proto/xcb-proto.mk | 1 + package/x11r7/xkeyboard-config/xkeyboard-config.mk | 2 +- package/x11r7/xlib_libX11/xlib_libX11.mk | 3 + package/x11r7/xlib_libXau/xlib_libXau.mk | 4 + package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk | 4 + package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk | 4 + .../x11r7/xproto_inputproto/xproto_inputproto.mk | 1 + package/x11r7/xproto_kbproto/xproto_kbproto.mk | 1 + .../x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk | 1 + package/x11r7/xproto_xextproto/xproto_xextproto.mk | 1 + .../xproto_xf86bigfontproto.mk | 1 + package/x11r7/xserver_xorg-server/Config.in | 1 + .../xserver_xorg-server/xserver_xorg-server.mk | 4 +- .../x11r7/xutil_util-macros/xutil_util-macros.mk | 1 + target/Config.in.arch | 5 + toolchain/external-toolchain/ext-tool.mk | 2 +- toolchain/gcc/gcc-uclibc-4.x.mk | 8 +- 42 files changed, 326 insertions(+), 1307 deletions(-) delete mode 100644 package/cairo/cairo-1.6.4-directfb-all.patch create mode 100644 package/cairo/cairo-1.8.10-directfb.patch create mode 100644 package/libgail/Config.in create mode 100644 package/libgail/libgail-1.22.3-Relax-X11-dependencies.patch create mode 100644 package/libgail/libgail.mk delete mode 100644 package/midori/midori-0.0.18-webkit.patch delete mode 100644 package/webkit/gtk-doc.make create mode 100644 package/webkit/webkit-1.2.3-fix-build-issue-with-old-gtk.patch create mode 100644 package/webkit/webkit-1.2.3-pthread_getattr_np.patch delete mode 100644 package/webkit/webkit-r30267-trunc.patch
Thanks,
Signature · 1 line
Thomas Petazzoni
PATCH 1/16 libglib2: bump to 2.24.0
From: Lionel Landwerlin <[email protected]>
--- package/libglib2/Config.in | 1 + package/libglib2/libglib2.mk | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-)
package/libglib2/Config.in +1 -0
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBGLIB2 select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_ZLIB depends on BR2_USE_WCHAR # gettext help Low-level core library that forms the basis of GTK+ and GNOME.
package/libglib2/libglib2.mk +4 -4
@@ -3,8 +3,8 @@ # libglib2 # ############################################################# -LIBGLIB2_VERSION_MAJOR = 2.22 -LIBGLIB2_VERSION_MINOR = 5 +LIBGLIB2_VERSION_MAJOR = 2.24 +LIBGLIB2_VERSION_MINOR = 0 LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).$(LIBGLIB2_VERSION_MINOR) LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.bz2 LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR)
@@ -55,9 +55,9 @@ HOST_LIBGLIB2_CONF_OPT = \ --disable-gtk-doc \ --enable-debug=no \ -LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 $(if $(BR2_NEEDS_GETTEXT),gettext libintl) +LIBGLIB2_DEPENDENCIES = host-pkg-config host-libglib2 zlib $(if $(BR2_NEEDS_GETTEXT),gettext libintl) -HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config +HOST_LIBGLIB2_DEPENDENCIES = host-pkg-config host-zlib ifneq ($(BR2_ENABLE_LOCALE),y) LIBGLIB2_DEPENDENCIES+=libiconv
Signature · 1 line
1.7.0.4
PATCH 2/16 atk: bump to 1.30
In reply to Thomas PetazzoniFrom: Lionel Landwerlin <[email protected]>
--- package/atk/atk.mk | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
package/atk/atk.mk +4 -2
@@ -3,11 +3,13 @@ # atk # ############################################################# -ATK_VERSION = 1.22.0 +ATK_VERSION_MAJOR = 1.30 +ATK_VERSION = $(ATK_VERSION_MAJOR).0 ATK_SOURCE = atk-$(ATK_VERSION).tar.bz2 -ATK_SITE = http://ftp.gnome.org/pub/gnome/sources/atk/1.22/ +ATK_SITE = http://ftp.gnome.org/pub/gnome/sources/atk/$(ATK_VERSION_MAJOR)/ ATK_INSTALL_STAGING = YES ATK_INSTALL_TARGET = YES +ATK_LIBTOOL_PATCH = NO ATK_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install ATK_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes \
Signature · 1 line
1.7.0.4
PATCH 3/16 pango: bump to 1.28
In reply to Thomas PetazzoniFrom: Lionel Landwerlin <[email protected]>
--- package/pango/pango.mk | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
package/pango/pango.mk +5 -2
@@ -3,9 +3,12 @@ # pango # ############################################################# -PANGO_VERSION = 1.20.5 +PANGO_VERSION_MAJOR = 1.28 +PANGO_VERSION_MINOR = 0 +PANGO_VERSION = $(PANGO_VERSION_MAJOR).$(PANGO_VERSION_MINOR) + PANGO_SOURCE = pango-$(PANGO_VERSION).tar.bz2 -PANGO_SITE = http://ftp.gnome.org/pub/GNOME/sources/pango/1.20 +PANGO_SITE = http://ftp.gnome.org/pub/GNOME/sources/pango/$(PANGO_VERSION_MAJOR) PANGO_AUTORECONF = YES PANGO_INSTALL_STAGING = YES PANGO_INSTALL_TARGET = YES
Signature · 1 line
1.7.0.4
PATCH 4/16 package: add libgail package
In reply to Thomas PetazzoniFrom: Lionel Landwerlin <[email protected]>
This package include a patch for directfb support. This patch has been proposed for upstream integration
(https://bugzilla.gnome.org/show_bug.cgi?id=614199).
--- package/Config.in | 1 + package/libgail/Config.in | 15 +++++++ .../libgail-1.22.3-Relax-X11-dependencies.patch | 42 ++++++++++++++++++++ package/libgail/libgail.mk | 28 +++++++++++++ 4 files changed, 86 insertions(+), 0 deletions(-) create mode 100644 package/libgail/Config.in create mode 100644 package/libgail/libgail-1.22.3-Relax-X11-dependencies.patch create mode 100644 package/libgail/libgail.mk
package/Config.in +1 -0
@@ -267,6 +267,7 @@ source "package/gtk2-themes/Config.in" source "package/jpeg/Config.in" source "package/libart/Config.in" source "package/libdrm/Config.in" +source "package/libgail/Config.in" source "package/libglade/Config.in" source "package/libgtk12/Config.in" source "package/libgtk2/Config.in"
package/libgail/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBGAIL + bool "libgail" + select BR2_PACKAGE_GTK2 + help + GAIL provides accessibility support for gtk+ and + libgnomecanvas by implementing AtkObjects for widgets in + gtk+ and libgnomecanvas. The GAIL library is a GTK+ module. + For example, if the module is loaded in a program which + calls gtk_widget_get_accessible() for a GtkEntry an instance + of GailEntry is returned. This module is normally used with + the atk-bridge GTK+ module from at-spi to allow an assistive + technology, e.g a screenreader, to query or drive the + program. + + http://developer.gnome.org/projects/gap
package/libgail/libgail-1.22.3-Relax-X11-dependencies.patch new file +42 -0
42 lines not on this page · raw message
package/libgail/libgail.mk new file +28 -0
@@ -0,0 +1,28 @@ +############################################################# +# +# libgail +# +############################################################# +LIBGAIL_VERSION_MAJOR = 1.22 +LIBGAIL_VERSION_MINOR = 3 +LIBGAIL_VERSION = $(LIBGAIL_VERSION_MAJOR).$(LIBGAIL_VERSION_MINOR) +LIBGAIL_SOURCE = gail-$(LIBGAIL_VERSION).tar.bz2 +LIBGAIL_SITE = http://ftp.gnome.org/pub/gnome/sources/gail/$(LIBGAIL_VERSION_MAJOR) + +LIBGAIL_AUTORECONF = YES +LIBGAIL_LIBTOOL_PATCH = NO +LIBGAIL_INSTALL_STAGING = YES +LIBGAIL_INSTALL_TARGET = YES + +LIBGAIL_CONF_OPT = --enable-shared \ + --enable-static + +ifneq ($(BR2_PACKAGE_XLIB_LIBX11),y) +LIBGAIL_CONF_OPT += --disable-x +endif + +LIBGAIL_DEPENDENCIES = libgtk2 pango + +HOST_LIBGAIL_DEPENDENCIES = host-pkg-config + +$(eval $(call AUTOTARGETS,package,libgail))
Signature · 1 line
1.7.0.4
PATCH 5/16 webkit: bump to webkitgtk 1.2.3
In reply to Thomas Petazzoni--- package/webkit/Config.in | 1 + package/webkit/gtk-doc.make | 173 -------------------- ...webkit-1.2.3-fix-build-issue-with-old-gtk.patch | 22 +++ package/webkit/webkit-r30267-trunc.patch | 11 -- package/webkit/webkit.mk | 20 +-- 5 files changed, 27 insertions(+), 200 deletions(-) delete mode 100644 package/webkit/gtk-doc.make create mode 100644 package/webkit/webkit-1.2.3-fix-build-issue-with-old-gtk.patch delete mode 100644 package/webkit/webkit-r30267-trunc.patch
package/webkit/Config.in +1 -0
@@ -11,6 +11,7 @@ config BR2_PACKAGE_WEBKIT select BR2_PACKAGE_ENCHANT select BR2_PACKAGE_LIBSOUP select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_LIBGAIL help WebKit is an open source, standards compliant web browser engine.
package/webkit/gtk-doc.make deleted +0 -173
173 lines not on this page · raw message
package/webkit/webkit-1.2.3-fix-build-issue-with-old-gtk.patch new file +22 -0
@@ -0,0 +1,22 @@ +The WebKit code conditionally calls getRootCoords() when the Gtk +version is old (i.e < 2.17.3), but fails to declare the prototype of +this function (which is implemented after its call site). This build +failure has probably been missed due to the fact that not many people +try to compile recent WebKit versions with old Gtk. + +Signed-off-by: Thomas Petazzoni <[email protected]> + +Index: webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp +=================================================================== +--- webkit-1.2.3.orig/WebKitTools/DumpRenderTree/gtk/EventSender.cpp 2010-07-19 20:42:27.000000000 +0200 ++++ webkit-1.2.3/WebKitTools/DumpRenderTree/gtk/EventSender.cpp 2010-07-19 20:42:57.000000000 +0200 +@@ -86,6 +86,9 @@ + static void sendOrQueueEvent(GdkEvent event); + static void dispatchEvent(GdkEvent event); + static guint getStateFlags(); ++#if !GTK_CHECK_VERSION(2,17,3) ++static void getRootCoords(GtkWidget* view, int* rootX, int* rootY); ++#endif + + static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception) + {
package/webkit/webkit-r30267-trunc.patch deleted +0 -11
@@ -1,11 +0,0 @@ ---- a/JavaScriptCore/wtf/MathExtras.h 2008-02-04 21:09:08.000000000 -0500 -+++ b/JavaScriptCore/wtf/MathExtras.h 2008-02-11 13:31:28.000000000 -0500 -@@ -75,6 +75,8 @@ inline bool signbit(double x) { return x - - #endif - -+inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); } -+ - #if COMPILER(MSVC) - - inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }
package/webkit/webkit.mk +4 -16
@@ -3,16 +3,15 @@ # webkit # ############################################################# -WEBKIT_VERSION = r44552 -WEBKIT_SOURCE = WebKit-$(WEBKIT_VERSION).tar.bz2 -WEBKIT_SITE = http://nightly.webkit.org/files/trunk/src/ +WEBKIT_VERSION = 1.2.3 +WEBKIT_SOURCE = webkit-$(WEBKIT_VERSION).tar.gz +WEBKIT_SITE = http://www.webkitgtk.org WEBKIT_INSTALL_STAGING = YES -WEBKIT_INSTALL_TARGET = YES WEBKIT_LIBTOOL_PATCH = NO WEBKIT_DEPENDENCIES = host-flex host-gperf icu curl libxml2 libxslt \ - libgtk2 sqlite enchant libsoup jpeg + libgtk2 sqlite enchant libsoup jpeg libgail WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config
@@ -28,15 +27,4 @@ endif WEBKIT_CONF_OPT += --disable-video -define WEBKIT_AUTOGEN_PATCH -$(SED) 's%ACLOCAL_FLAGS=.*%ACLOCAL_FLAGS="-I autotools -I $(STAGING_DIR)/usr/share/aclocal"%' $(WEBKIT_DIR)/autogen.sh -$(SED) 's/AUTOMAKE_FLAGS=.*/AUTOMAKE_FLAGS="--foreign --add-missing --copy"/' $(WEBKIT_DIR)/autogen.sh -$(SED) 's/LIBTOOLIZE_FLAGS=.*/LIBTOOLIZE_FLAGS="--force --automake --copy"/' $(WEBKIT_DIR)/autogen.sh -cp package/webkit/gtk-doc.make $(WEBKIT_DIR)/ -# Don't run the configure step yet -cd $(WEBKIT_DIR); $(HOST_CONFIGURE_OPTS) AUTOGEN_CONFIGURE_ARGS=--version ./autogen.sh -endef - -WEBKIT_POST_EXTRACT_HOOKS += WEBKIT_AUTOGEN_PATCH - $(eval $(call AUTOTARGETS,package,webkit))
Signature · 1 line
1.7.0.4
PATCH 6/16 midori: bump to 0.2.6
In reply to Thomas Petazzoni--- package/midori/Config.in | 2 +- package/midori/midori-0.0.18-webkit.patch | 67 ----------------------------- package/midori/midori.mk | 27 +++++++++--- 3 files changed, 22 insertions(+), 74 deletions(-) delete mode 100644 package/midori/midori-0.0.18-webkit.patch
package/midori/Config.in +1 -1
@@ -2,7 +2,7 @@ config BR2_PACKAGE_MIDORI bool "midori" select BR2_PACKAGE_WEBKIT select BR2_PACKAGE_LIBSEXY - depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_LIBGTK2 help Midori is a lightweight web browser based on WebKit
package/midori/midori-0.0.18-webkit.patch deleted +0 -67
67 lines not on this page · raw message
package/midori/midori.mk +21 -6
@@ -4,13 +4,28 @@ # ############################################################# -MIDORI_VERSION = 0.0.18 -MIDORI_SOURCE = midori-$(MIDORI_VERSION).tar.gz -MIDORI_SITE = http://software.twotoasts.de/media/midori/ -MIDORI_AUTORECONF = YES +MIDORI_VERSION = 0.2.6 +MIDORI_SOURCE = midori-$(MIDORI_VERSION).tar.bz2 +MIDORI_SITE = http://archive.xfce.org/src/apps/midori/0.2/ MIDORI_INSTALL_STAGING = NO MIDORI_INSTALL_TARGET = YES -MIDORI_DEPENDENCIES = host-pkg-config webkit libsexy xserver_xorg-server +MIDORI_DEPENDENCIES = host-pkg-config webkit libsexy host-intltool -$(eval $(call AUTOTARGETS,package,midori)) +define MIDORI_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./waf configure \ + --prefix=/usr \ + ) +endef + +define MIDORI_BUILD_CMDS + (cd $(@D); ./waf build -j $(BR2_JLEVEL)) +endef + +define MIDORI_INSTALL_TARGET_CMDS + (cd $(@D); ./waf --destdir=$(TARGET_DIR) install) +endef + +$(eval $(call GENTARGETS,package,midori))
Signature · 1 line
1.7.0.4
PATCH 7/16 icu: add quotes around TARGET_CXX
In reply to Thomas PetazzoniNow that TARGET_CXX contains a --sysroot= option and therefore spaces, it needs to be used with quotes.
--- package/icu/icu.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
package/icu/icu.mk +1 -1
@@ -33,7 +33,7 @@ $(ICU_DIR)/.configured: $(ICU_HOST_DIR)/.configured (cd $(ICU_DIR); rm -rf config.cache; \ $(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_ARGS) \ - CXX=$(TARGET_CXX) \ + CXX="$(TARGET_CXX)" \ ./configure $(QUIET) \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \
Signature · 1 line
1.7.0.4
PATCH 8/16 cairo: bump to 1.8.10
In reply to Thomas PetazzoniThis commit bumps Cairo to 1.8.10 and updates the DirectFB support patch. The work has been done by Lionel Landwerlin <[email protected]>.
--- package/cairo/cairo-1.6.4-directfb-all.patch | 1012 -------------------------- package/cairo/cairo-1.8.10-directfb.patch | 39 + package/cairo/cairo.mk | 3 +- 3 files changed, 41 insertions(+), 1013 deletions(-) delete mode 100644 package/cairo/cairo-1.6.4-directfb-all.patch create mode 100644 package/cairo/cairo-1.8.10-directfb.patch
package/cairo/cairo-1.6.4-directfb-all.patch deleted +0 -1012
@@ -1,1012 +0,0 @@ -diff --git a/.gitignore b/.gitignore -new file mode 100644 -index 0000000..99849ce ---- /dev/null -+++ b/.gitignore -@@ -0,0 +1,13 @@ -+.deps -+.libs -+*.o -+*.la -+*.lo -+Makefile -+boot -+boot.log -+config.h -+config.log -+config.status -+libtool -+stamp-h1 -diff --git a/src/.gitignore b/src/.gitignore -new file mode 100644 -index 0000000..17146ae ---- /dev/null -+++ b/src/.gitignore -@@ -0,0 +1,11 @@ -+cairo-directfb.pc -+cairo-features.h -+cairo-ft.pc -+cairo-no-features.h -+cairo-pdf.pc -+cairo-png.pc -+cairo-ps.pc -+cairo-svg.pc -+cairo-xlib-xrender.pc -+cairo-xlib.pc -+cairo.pc -diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c -index f20bf2b..57e3980 100644 ---- a/src/cairo-directfb-surface.c -+++ b/src/cairo-directfb-surface.c -@@ -34,7 +34,8 @@ - * Michael Emmel <[email protected]> - * Claudio Ciccani <[email protected]> - */ -- -+ -+//#define DIRECT_ENABLE_DEBUG - - #include "cairoint.h" - #include "cairo-directfb.h" -@@ -42,6 +43,8 @@ - #include <stdlib.h> - - #include <directfb.h> -+#include <directfb_util.h> -+ - #include <direct/types.h> - #include <direct/debug.h> - #include <direct/memcpy.h> -@@ -63,7 +66,7 @@ - /* - * CompositeTrapezoids works (without antialiasing). - */ --#define DFB_COMPOSITE_TRAPEZOIDS 0 -+#define DFB_COMPOSITE_TRAPEZOIDS 1 - - /* - * ShowGlyphs works fine. -@@ -71,7 +74,13 @@ - #define DFB_SHOW_GLYPHS 1 - - --D_DEBUG_DOMAIN (Cairo_DirectFB, "Cairo/DirectFB", "Cairo DirectFB backend"); -+D_DEBUG_DOMAIN( CairoDFB_Acquire, "CairoDFB/Acquire", "Cairo DirectFB Acquire" ); -+D_DEBUG_DOMAIN( CairoDFB_Clip, "CairoDFB/Clip", "Cairo DirectFB Clipping" ); -+D_DEBUG_DOMAIN( CairoDFB_Font, "CairoDFB/Font", "Cairo DirectFB Font Rendering" ); -+D_DEBUG_DOMAIN( CairoDFB_Glyphs, "CairoDFB/Glyphs", "Cairo DirectFB Font Rendering - Glyphs" ); -+D_DEBUG_DOMAIN( CairoDFB_Render, "CairoDFB/Render", "Cairo DirectFB Rendering" ); -+D_DEBUG_DOMAIN( CairoDFB_Surface, "CairoDFB/Surface", "Cairo DirectFB Surface" ); -+D_DEBUG_DOMAIN( CairoDFB_SurfExt, "CairoDFB/SurfExt", "Cairo DirectFB Surface Extents" ); - - /*****************************************************************************/ - -@@ -89,7 +98,7 @@ typedef struct _cairo_directfb_surface { - cairo_surface_t *color; - - DFBRegion *clips; -- int n_clips; -+ int n_clips; // -1 = don't draw at all - - int width; - int height; -@@ -122,7 +131,7 @@ static int _directfb_argb_font = 0; - - - #define RUN_CLIPPED( surface, clip, func ) {\ -- if ((surface)->clips) {\ -+ if ((surface)->n_clips) {\ - int k;\ - for (k = 0; k < (surface)->n_clips; k++) {\ - if (clip) {\ -@@ -155,15 +164,15 @@ static int _directfb_argb_font = 0; - } - - #define TRANSFORM_POINT2X( m, x, y, ret_x, ret_y ) {\ -- double _x = (x);\ -- double _y = (y);\ -+ float _x = (x);\ -+ float _y = (y);\ - (ret_x) = (_x * (m).xx + (m).x0);\ - (ret_y) = (_y * (m).yy + (m).y0);\ - } - - #define TRANSFORM_POINT3X( m, x, y, ret_x, ret_y ) {\ -- double _x = (x);\ -- double _y = (y);\ -+ float _x = (x);\ -+ float _y = (y);\ - (ret_x) = (_x * (m).xx + _y * (m).xy + (m).x0);\ - (ret_y) = (_x * (m).yx + _y * (m).yy + (m).y0);\ - } -@@ -291,6 +300,7 @@ _directfb_get_operator (cairo_operator_t operator, - dstblend = DSBF_ONE; - break; - default: -+ D_DEBUG_AT (CairoDFB_Render, "=> UNSUPPORTED OPERATOR %d\n", operator); - return CAIRO_INT_STATUS_UNSUPPORTED; - } - -@@ -312,6 +322,8 @@ _directfb_buffer_surface_create (IDirectFB *dfb, - DFBSurfaceDescription dsc; - DFBResult ret; - -+ D_DEBUG_AT( CairoDFB_Surface, "%s( %4dx%4d %s )\n", __FUNCTION__, width, height, dfb_pixelformat_name(format) ); -+ - dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; - dsc.width = width; - dsc.height = height; -@@ -339,26 +351,24 @@ _directfb_acquire_surface (cairo_directfb_surface_t *surface, - cairo_format_t cairo_format; - void *data; - int pitch; -- -+ - if (surface->format == (cairo_format_t) -1) { -- DFBSurfaceCapabilities caps; -- - if (intrest_rec) { - source_rect.x = intrest_rec->x; - source_rect.y = intrest_rec->y; - source_rect.w = intrest_rec->width; - source_rect.h = intrest_rec->height; - } else { -- source_rect.x = 0; -- source_rect.y = 0; -- surface->dfbsurface->GetSize (surface->dfbsurface, -- &source_rect.w, &source_rect.h); -+ /* Use GetVisibleRectangle() here, because GetSize() might return huge values of a sub surface */ -+ surface->dfbsurface->GetVisibleRectangle (surface->dfbsurface, &source_rect); - } - - if (surface->tmpsurface) { - int w, h; - surface->tmpsurface->GetSize (surface->tmpsurface, &w, &h); -- if (w < source_rect.w || h < source_rect.h) { -+ if (w < source_rect.w || h < source_rect.h || -+ ((w*4 > source_rect.w*5 || h*4 > source_rect.h*5) && (w > 32 || h > 32))) -+ { - surface->tmpsurface->Release (surface->tmpsurface); - surface->tmpsurface = NULL; - } -@@ -366,7 +376,7 @@ _directfb_acquire_surface (cairo_directfb_surface_t *surface, - - cairo_format = _cairo_format_from_content (surface->content); - if (!surface->tmpsurface) { -- D_DEBUG_AT (Cairo_DirectFB, "Allocating buffer for surface %p.\n", surface); -+ D_DEBUG_AT (CairoDFB_Acquire, " -> Allocating %dx%d buffer\n", source_rect.w, source_rect.h); - - surface->tmpsurface = - _directfb_buffer_surface_create (surface->dfb, -@@ -377,14 +387,12 @@ _directfb_acquire_surface (cairo_directfb_surface_t *surface, - } - buffer = surface->tmpsurface; - -- surface->dfbsurface->GetCapabilities (surface->dfbsurface, &caps); -- if (caps & DSCAPS_FLIPPING) { -- DFBRegion region = { .x1 = source_rect.x, .y1 = source_rect.y, -- .x2 = source_rect.x + source_rect.w - 1, -- .y2 = source_rect.y + source_rect.h - 1 }; -- surface->dfbsurface->Flip (surface->dfbsurface, ®ion, DSFLIP_BLIT); -- } -+ D_DEBUG_AT( CairoDFB_Render, " => Blit( 0,0-%4dx%4d <- %4d,%4d )\n", -+ source_rect.w, source_rect.h, source_rect.x, source_rect.y ); -+ -+ buffer->SetBlittingFlags (buffer, DSBLIT_NOFX); - buffer->Blit (buffer, surface->dfbsurface, &source_rect, 0, 0); -+ buffer->ReleaseSource (buffer); - } - else { - /*might be a subsurface get the offset*/ -@@ -396,7 +404,7 @@ _directfb_acquire_surface (cairo_directfb_surface_t *surface, - *image_extra = buffer; - - if (buffer->Lock (buffer, lock_flags, &data, &pitch)) { -- D_DEBUG_AT (Cairo_DirectFB, "Couldn't lock surface!\n"); -+ D_DEBUG_AT (CairoDFB_Acquire, "Couldn't lock surface!\n"); - goto ERROR; - } - -@@ -443,9 +451,9 @@ _cairo_directfb_surface_create_similar (void *abstract_src, - cairo_directfb_surface_t *surface; - cairo_format_t format; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( src=%p, content=0x%x, width=%d, height=%d).\n", -- __FUNCTION__, source, content, width, height); -+ D_DEBUG_AT (CairoDFB_Surface, "%s( src=%p, content=%s%s, width=%d, height=%d)\n", __FUNCTION__, source, -+ (content & CAIRO_CONTENT_COLOR) ? "COLOR" : "", -+ (content & CAIRO_CONTENT_ALPHA) ? "+ALPHA" : "", width, height); - - width = (width <= 0) ? 1 : width; - height = (height<= 0) ? 1 : height; -@@ -497,8 +505,7 @@ _cairo_directfb_surface_finish (void *data) - { - cairo_directfb_surface_t *surface = (cairo_directfb_surface_t *)data; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p ).\n", __FUNCTION__, surface); -+ D_DEBUG_AT (CairoDFB_Surface, "%s( surface=%p ).\n", __FUNCTION__, surface); - - if (surface->clips) { - free (surface->clips); -@@ -534,8 +541,8 @@ _cairo_directfb_surface_acquire_source_image (void *abstract_s - { - cairo_directfb_surface_t *surface = abstract_surface; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p ).\n", __FUNCTION__, surface); -+ D_DEBUG_AT( CairoDFB_Acquire, "%s( %p - %dx%d 0x%x )\n", __FUNCTION__, -+ surface, surface->width, surface->height, surface->format ); - - return _directfb_acquire_surface (surface, NULL, image_out, - NULL, image_extra, DSLF_READ); -@@ -549,8 +556,7 @@ _cairo_directfb_surface_release_source_image (void *abstract_su - cairo_directfb_surface_t *surface = abstract_surface; - IDirectFBSurface *buffer = image_extra; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p ).\n", __FUNCTION__, surface); -+ D_DEBUG_AT (CairoDFB_Acquire, "%s( %p )\n", __FUNCTION__, surface); - - buffer->Unlock (buffer); - -@@ -564,18 +570,58 @@ _cairo_directfb_surface_acquire_dest_image (void *abstract_s - cairo_rectangle_int_t *image_rect_out, - void **image_extra) - { -+ cairo_status_t status; - cairo_directfb_surface_t *surface = abstract_surface; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p, interest_rect={ %d %d %d %d } ).\n", -- __FUNCTION__, surface, -+ D_DEBUG_AT (CairoDFB_Acquire, -+ "%s( %p - %dx%d 0x%x { %u %u %u %u } )\n", -+ __FUNCTION__, surface, surface->width, surface->height, surface->format, - interest_rect ? interest_rect->x : 0, - interest_rect ? interest_rect->y : 0, -- interest_rect ? interest_rect->width : surface->width, -- interest_rect ? interest_rect->height : surface->height); -+ interest_rect ? interest_rect->width : (unsigned) surface->width, -+ interest_rect ? interest_rect->height : (unsigned) surface->height); - -- return _directfb_acquire_surface (surface, interest_rect, image_out, -- image_rect_out, image_extra, DSLF_READ | DSLF_WRITE); -+ status = _directfb_acquire_surface (surface, interest_rect, image_out, -+ image_rect_out, image_extra, DSLF_READ | DSLF_WRITE); -+ if (status) -+ return status; -+ -+ /* Ensure that the new image has the same clip, if it's the same buffer */ -+ if ((IDirectFBSurface*) *image_extra == surface->dfbsurface && -+ surface->clips) -+ { -+ cairo_surface_t *s = (cairo_surface_t*) *image_out; -+ -+ unsigned int clip_serial = _cairo_surface_allocate_clip_serial (s); -+ -+ cairo_region_t clip_region; -+ -+ if (surface->n_clips == 1) { -+ cairo_rectangle_int_t rect = { surface->clips[0].x1, surface->clips[0].y1, -+ surface->clips[0].x2 - surface->clips[0].x1 + 1, -+ surface->clips[0].y2 - surface->clips[0].y1 + 1 }; -+ _cairo_region_init_rect (&clip_region, &rect); -+ } else { -+ cairo_box_int_t *boxes = _cairo_malloc_ab (surface->n_clips, sizeof(cairo_box_int_t)); -+ int k; -+ -+ for (k = 0; k < surface->n_clips; k++) { -+ boxes[k].p1.x = surface->clips[k].x1; -+ boxes[k].p1.y = surface->clips[k].y1; -+ boxes[k].p2.x = surface->clips[k].x2 + 1; -+ boxes[k].p2.y = surface->clips[k].y2 + 1; -+ } -+ -+ _cairo_region_init_boxes (&clip_region, boxes, surface->n_clips); -+ free (boxes); -+ } -+ -+ _cairo_surface_set_clip_region (s, &clip_region, clip_serial); -+ -+ _cairo_region_fini (&clip_region); -+ } -+ -+ return CAIRO_STATUS_SUCCESS; - } - - static void -@@ -586,21 +632,31 @@ _cairo_directfb_surface_release_dest_image (void *abstract_surf - void *image_extra) - { - cairo_directfb_surface_t *surface = abstract_surface; -- IDirectFBSurface *buffer = image_extra; -+ IDirectFBSurface *buffer = image_extra; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p ).\n", __FUNCTION__, surface); -+ D_DEBUG_AT (CairoDFB_Acquire, -+ "%s( %p - %dx%d 0x%x { %u %u %u %u } )\n", -+ __FUNCTION__, surface, surface->width, surface->height, surface->format, -+ interest_rect ? interest_rect->x : 0, -+ interest_rect ? interest_rect->y : 0, -+ interest_rect ? interest_rect->width : (unsigned) surface->width, -+ interest_rect ? interest_rect->height : (unsigned) surface->height); - - buffer->Unlock (buffer); - - if (surface->dfbsurface != buffer) { -- DFBRegion region = { .x1 = interest_rect->x, .y1 = interest_rect->y, -- .x2 = interest_rect->x+interest_rect->width-1, -- .y2 = interest_rect->y+interest_rect->height-1 }; -- surface->dfbsurface->SetClip (surface->dfbsurface, ®ion); -+ DFBRectangle sr = { 0, 0, image_rect->width, image_rect->height }; -+ -+ D_DEBUG_AT( CairoDFB_Render, " => Blit( %4d,%4d-%4dx%4d <- 0,0 )\n", -+ image_rect->x, image_rect->y, sr.w, sr.h ); -+ - surface->dfbsurface->SetBlittingFlags (surface->dfbsurface, DSBLIT_NOFX); -- surface->dfbsurface->Blit (surface->dfbsurface, buffer, -- NULL, image_rect->x, image_rect->y); -+ -+ RUN_CLIPPED( surface, NULL, -+ surface->dfbsurface->Blit (surface->dfbsurface, -+ buffer, &sr, image_rect->x, image_rect->y)); -+ -+ surface->dfbsurface->ReleaseSource (surface->dfbsurface); - } - - cairo_surface_destroy (&image->base); -@@ -618,13 +674,15 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, - cairo_directfb_surface_t *surface = abstract_surface; - cairo_directfb_surface_t *clone; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p, src=%p ).\n", __FUNCTION__, surface, src); -+ D_DEBUG_AT (CairoDFB_Surface, "%s( surface=%p, src=%p [%d,%d-%dx%d] )\n", -+ __FUNCTION__, surface, src, src_x, src_y, width, height); - - if (src->backend == surface->base.backend) { - cairo_surface_reference (src); - *clone_out = src; - -+ D_DEBUG_AT (CairoDFB_Surface, " -> lightweight - referenced :)\n"); -+ - return CAIRO_STATUS_SUCCESS; - } - else if (_cairo_surface_is_image (src)) { -@@ -640,7 +698,8 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, - image_src->width, image_src->height); - if (!clone) - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -- -+ -+ - ret = clone->dfbsurface->Lock (clone->dfbsurface, - DSLF_WRITE, (void *)&dst, &pitch); - if (ret) { -@@ -653,6 +712,8 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, - src += image_src->stride * src_y; - - if (image_src->format == CAIRO_FORMAT_A1) { -+ D_DEBUG_AT (CairoDFB_Surface, " ==> converting A1 -> A8 data\n"); -+ - /* A1 -> A8 */ - for (i = 0; i < height; i++) { - for (j = src_x; j < src_x + width; j++) -@@ -665,10 +726,14 @@ _cairo_directfb_surface_clone_similar (void *abstract_surface, - int len; - - if (image_src->format == CAIRO_FORMAT_A8) { -+ D_DEBUG_AT (CairoDFB_Surface, " ==> copying A8 data\n"); -+ - dst += src_x; - src += src_x; - len = width; - } else { -+ D_DEBUG_AT (CairoDFB_Surface, " ==> copying ARGB data\n"); -+ - dst += src_x * 4; - src += src_x * 4; - len = width * 4; -@@ -722,11 +787,17 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, - cairo_pattern_t *tmp; - int tmp_x, tmp_y; - -- if (src_pattern->type != CAIRO_PATTERN_TYPE_SOLID || -- sblend == DSBF_INVDESTALPHA) /* Doesn't work correctly */ -+ if (src_pattern->type != CAIRO_PATTERN_TYPE_SOLID) { /* Doesn't work correctly */ -+ D_DEBUG_AT (CairoDFB_Render, "=> PATTERN TYPE %d WITH MASK NOT SUPPORTED\n", src_pattern->type); - return CAIRO_INT_STATUS_UNSUPPORTED; -+ } - -- D_DEBUG_AT (Cairo_DirectFB, "Replacing src pattern by mask pattern.\n"); -+ if (sblend == DSBF_INVDESTALPHA) { /* Doesn't work correctly */ -+ D_DEBUG_AT (CairoDFB_Render, "=> SOURCE BLEND %d WITH MASK NOT SUPPORTED\n", sblend); -+ return CAIRO_INT_STATUS_UNSUPPORTED; -+ } -+ -+ D_DEBUG_AT (CairoDFB_Render, "-> Replacing src pattern by mask pattern.\n"); - - tmp = src_pattern; - tmp_x = *src_x; tmp_y = *src_y; -@@ -748,6 +819,10 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, - color.r = pattern->color.red_short >> 8; - color.g = pattern->color.green_short >> 8; - color.b = pattern->color.blue_short >> 8; -+ -+ D_DEBUG_AT (CairoDFB_Render, "-> SOLID MASK (%02x %02x %02x %02x)\n", -+ pattern->color.alpha_short >> 8, pattern->color.red_short >> 8, -+ pattern->color.green_short >> 8, pattern->color.blue_short >> 8 ); - } - else { - color.a = color.r = color.g = color.b = 0xff; -@@ -756,6 +831,10 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, - if (src_pattern->type == CAIRO_PATTERN_TYPE_SOLID) { - cairo_solid_pattern_t *pattern = (cairo_solid_pattern_t *)src_pattern; - -+ D_DEBUG_AT (CairoDFB_Render, "-> SOLID PATTERN (%02x %02x %02x %02x)\n", -+ pattern->color.alpha_short >> 8, pattern->color.red_short >> 8, -+ pattern->color.green_short >> 8, pattern->color.blue_short >> 8 ); -+ - if (!dst->color) { - dst->color = _cairo_directfb_surface_create_similar (dst, - CAIRO_CONTENT_COLOR_ALPHA, 1, 1); -@@ -777,6 +856,8 @@ _directfb_prepare_composite (cairo_directfb_surface_t *dst, - src_attr.y_offset = 0; - } - else { -+ D_DEBUG_AT (CairoDFB_Render, "-> PATTERN TYPE %d\n", src_pattern->type ); -+ - ret = _cairo_pattern_acquire_surface (src_pattern, &dst->base, - *src_x, *src_y, width, height, - (cairo_surface_t **)&src, &src_attr); -@@ -838,6 +919,9 @@ _directfb_finish_composite (cairo_directfb_surface_t *dst, - { - if (src != dst->color) - _cairo_pattern_release_surface (src_pattern, src, src_attr); -+ -+ if (dst->dfbsurface) -+ dst->dfbsurface->ReleaseSource( dst->dfbsurface ); - } - #endif /* DFB_COMPOSITE || DFB_COMPOSITE_TRAPEZOIDS */ - -@@ -848,20 +932,38 @@ _directfb_categorize_operation (cairo_surface_attributes_t *src_attr) - cairo_matrix_t *m = &src_attr->matrix; - - if (m->xy != 0 || m->yx != 0 || m->xx < 0 || m->yy < 0) { -- if (src_attr->extend != CAIRO_EXTEND_NONE) -- return DFXL_NONE; -+ D_DEBUG_AT (CairoDFB_Render, "-> NON-RECTANGULAR TRANSFORM\n" ); -+ -+ if (src_attr->extend != CAIRO_EXTEND_NONE) { -+ D_DEBUG_AT (CairoDFB_Render, "=> EXTEND MODE %d NOT SUPPORTED\n", src_attr->extend ); -+ return DFXL_NONE; -+ } -+ - return DFXL_TEXTRIANGLES; - } - - if (m->xx != 1 || m->yy != 1) { -- if (src_attr->extend != CAIRO_EXTEND_NONE) -- return DFXL_NONE; -+ D_DEBUG_AT (CairoDFB_Render, "-> RECTANGULAR TRANSFORM\n" ); -+ -+ if (src_attr->extend != CAIRO_EXTEND_NONE) { -+ D_DEBUG_AT (CairoDFB_Render, "=> EXTEND MODE %d NOT SUPPORTED\n", src_attr->extend ); -+ -+ /* TODO: support EXTEND_PAD in special cases */ -+ -+ return DFXL_NONE; -+ } -+ - return DFXL_STRETCHBLIT; - } - -+ D_DEBUG_AT (CairoDFB_Render, "-> NO TRANSFORM\n" ); -+ - if (src_attr->extend != CAIRO_EXTEND_NONE && - src_attr->extend != CAIRO_EXTEND_REPEAT) -+ { -+ D_DEBUG_AT (CairoDFB_Render, "=> EXTEND MODE %d NOT SUPPORTED\n", src_attr->extend ); - return DFXL_NONE; -+ } - - return DFXL_BLIT; - } -@@ -880,13 +982,13 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - cairo_directfb_surface_t *dst = abstract_dst; - cairo_directfb_surface_t *src; - cairo_surface_attributes_t src_attr; -- DFBAccelerationMask accel, mask; -+ DFBAccelerationMask accel; - cairo_int_status_t ret; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( op=%d, src_pattern=%p, mask_pattern=%p, dst=%p," -+ D_DEBUG_AT (CairoDFB_Render, -+ "%s( op=%d, src=%p, mask=%p, dst=%p," - " src_x=%d, src_y=%d, mask_x=%d, mask_y=%d, dst_x=%d," -- " dst_y=%d, width=%u, height=%u ).\n", -+ " dst_y=%d, width=%u, height=%u )\n", - __FUNCTION__, op, src_pattern, mask_pattern, dst, - src_x, src_y, mask_x, mask_y, dst_x, dst_y, width, height); - -@@ -895,16 +997,12 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - width, height, &src, &src_attr); - if (ret) - return ret; -- -+ - accel = _directfb_categorize_operation (&src_attr); -- -- dst->dfbsurface->GetAccelerationMask (dst->dfbsurface, src->dfbsurface, &mask); -- if (!(mask & accel)) { -- D_DEBUG_AT (Cairo_DirectFB, "No acceleration (%08x)!\n", accel); -- if (accel != DFXL_BLIT) { -- _directfb_finish_composite (dst, src_pattern, &src->base, &src_attr); -- return CAIRO_INT_STATUS_UNSUPPORTED; -- } -+ if (!accel) { -+ D_DEBUG_AT (CairoDFB_Render, " ====>> UNSUPPORTED!!!\n"); -+ _directfb_finish_composite (dst, src_pattern, &src->base, &src_attr); -+ return CAIRO_INT_STATUS_UNSUPPORTED; - } - - src_x += src_attr.x_offset; -@@ -920,7 +1018,8 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - sr.h = height; - - if (src_attr.extend == CAIRO_EXTEND_NONE) { -- D_DEBUG_AT (Cairo_DirectFB, "Running Blit().\n"); -+ D_DEBUG_AT( CairoDFB_Render, " ==> Blit( %4d,%4d-%4dx%4d <- %4d,%4d )\n", -+ dst_x, dst_y, sr.w, sr.h, sr.x, sr.y ); - - RUN_CLIPPED( dst, NULL, - dst->dfbsurface->Blit (dst->dfbsurface, -@@ -934,7 +1033,8 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - clip.x2 = dst_x + width - 1; - clip.y2 = dst_y + height - 1; - -- D_DEBUG_AT (Cairo_DirectFB, "Running TileBlit().\n"); -+ D_DEBUG_AT( CairoDFB_Render, " ==> TileBlit( %4d,%4d-%4dx%4d <- %4d,%4d-%4dx%4d )\n", -+ dst_x, dst_y, width, height, sr.x, sr.y, sr.w, sr.h ); - - RUN_CLIPPED( dst, &clip, - dst->dfbsurface->TileBlit (dst->dfbsurface, -@@ -944,7 +1044,7 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - - case DFXL_STRETCHBLIT: { - DFBRectangle sr, dr; -- double x1, y1, x2, y2; -+ float x1, y1, x2, y2; - - TRANSFORM_POINT2X (src_attr.matrix, - src_x, src_y, x1, y1); -@@ -961,7 +1061,8 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - dr.w = width; - dr.h = height; - -- D_DEBUG_AT (Cairo_DirectFB, "Running StretchBlit().\n"); -+ D_DEBUG_AT( CairoDFB_Render, " ==> StretchBlit( %4d,%4d-%4dx%4d <- %4d,%4d-%4dx%4d )\n", -+ dst_x, dst_y, width, height, sr.x, sr.y, sr.w, sr.h ); - - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->StretchBlit (dst->dfbsurface, -@@ -1019,7 +1120,7 @@ _cairo_directfb_surface_composite (cairo_operator_t op, - clip.x2 = dst_x + width - 1; - clip.y2 = dst_y + height - 1; - -- D_DEBUG_AT (Cairo_DirectFB, "Running TextureTriangles().\n"); -+ D_DEBUG_AT (CairoDFB_Render, " ==> TextureTriangles( ... )\n"); - - RUN_CLIPPED (dst, &clip, - dst->dfbsurface->TextureTriangles (dst->dfbsurface, -@@ -1052,8 +1153,7 @@ _cairo_directfb_surface_fill_rectangles (void *abstract_surface - DFBRectangle r[n_rects]; - int i; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( dst=%p, op=%d, color=%p, rects=%p, n_rects=%d ).\n", -+ D_DEBUG_AT (CairoDFB_Render, "%s( dst=%p, op=%d, color=%p, rects=%p, n_rects=%d )\n", - __FUNCTION__, dst, op, color, rects, n_rects); - - if (_directfb_get_operator (op, &sblend, &dblend)) -@@ -1094,14 +1194,19 @@ _cairo_directfb_surface_fill_rectangles (void *abstract_surface - color->green_short >> 8, - color->blue_short >> 8, - color->alpha_short >> 8 ); -+ -+ D_DEBUG_AT( CairoDFB_Render, " -> %02x %02x %02x %02x\n", color->alpha_short >> 8, -+ color->red_short >> 8, color->green_short >> 8, color->blue_short >> 8 ); - - for (i = 0; i < n_rects; i++) { - r[i].x = rects[i].x; - r[i].y = rects[i].y; - r[i].w = rects[i].width; - r[i].h = rects[i].height; -+ -+ D_DEBUG_AT( CairoDFB_Render, " ==> Fill %4d,%4d-%4dx%4d [%d]\n", DFB_RECTANGLE_VALS(&r[i]), i ); - } -- -+ - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->FillRectangles (dst->dfbsurface, r, n_rects)); - -@@ -1128,7 +1233,7 @@ _cairo_directfb_surface_composite_trapezoids (cairo_operator_t op, - cairo_status_t ret; - DFBAccelerationMask accel; - -- D_DEBUG_AT (Cairo_DirectFB, -+ D_DEBUG_AT (CairoDFB_Render, - "%s( op=%d, pattern=%p, dst=%p, antialias=%d," - " src_x=%d, src_y=%d, dst_x=%d, dst_y=%d," - " width=%u, height=%u, traps=%p, num_traps=%d ).\n", -@@ -1235,7 +1340,7 @@ _cairo_directfb_surface_composite_trapezoids (cairo_operator_t op, - - #undef ADD_TRI - -- D_DEBUG_AT (Cairo_DirectFB, "Running TextureTriangles().\n"); -+ D_DEBUG_AT (CairoDFB_Render, "Running TextureTriangles().\n"); - - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->TextureTriangles (dst->dfbsurface, src->dfbsurface, -@@ -1256,9 +1361,7 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface, - { - cairo_directfb_surface_t *surface = abstract_surface; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p, region=%p ).\n", -- __FUNCTION__, surface, region); -+ D_DEBUG_AT (CairoDFB_Clip, "%s( surface=%p, region=%p )\n", __FUNCTION__, surface, region); - - if (region) { - cairo_box_int_t *boxes; -@@ -1267,15 +1370,33 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface, - int i; - - status = _cairo_region_get_boxes (region, &n_boxes, &boxes); -- if (status) -- return status; -+ if (status) { -+ D_DEBUG_AT( CairoDFB_Clip, " -> status %d!\n", status ); -+ return status; -+ } -+ -+ if (n_boxes == 0) { -+ D_DEBUG_AT( CairoDFB_Clip, " -> EMPTY region (fully clipped)\n" ); -+ -+ if (surface->clips) { -+ free (surface->clips); -+ surface->clips = NULL; -+ } -+ -+ surface->n_clips = -1; -+ -+ return CAIRO_STATUS_SUCCESS; -+ } -+ -+ D_DEBUG_AT( CairoDFB_Clip, " -> %d box%s\n", n_boxes, (n_boxes > 1) ? "es" : "" ); - -- if (surface->n_clips != n_boxes) { -+ if (surface->n_clips < n_boxes || surface->n_clips - n_boxes > 10) { - if (surface->clips) - free (surface->clips); - - surface->clips = _cairo_malloc_ab (n_boxes, sizeof(DFBRegion)); - if (!surface->clips) { -+ D_OOM(); - surface->n_clips = 0; - _cairo_region_boxes_fini (region, boxes); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -@@ -1287,18 +1408,24 @@ _cairo_directfb_surface_set_clip_region (void *abstract_surface, - for (i = 0; i < n_boxes; i++) { - surface->clips[i].x1 = boxes[i].p1.x; - surface->clips[i].y1 = boxes[i].p1.y; -- surface->clips[i].x2 = boxes[i].p2.x; -- surface->clips[i].y2 = boxes[i].p2.y; -+ surface->clips[i].x2 = boxes[i].p2.x - 1; -+ surface->clips[i].y2 = boxes[i].p2.y - 1; -+ -+ D_DEBUG_AT( CairoDFB_Clip, " = CLIP %4d,%4d-%4dx%4d [%d]\n", -+ DFB_RECTANGLE_VALS_FROM_REGION(&surface->clips[i]), i ); - } - - _cairo_region_boxes_fini (region, boxes); - } - else { -+ D_DEBUG_AT( CairoDFB_Clip, " -> NULL region (unclipped)\n" ); -+ - if (surface->clips) { - free (surface->clips); - surface->clips = NULL; -- surface->n_clips = 0; - } -+ -+ surface->n_clips = 0; - } - - return CAIRO_STATUS_SUCCESS; -@@ -1310,9 +1437,7 @@ _cairo_directfb_abstract_surface_get_extents (void *abstract_su - { - cairo_directfb_surface_t *surface = abstract_surface; - -- D_DEBUG_AT (Cairo_DirectFB, -- "%s( surface=%p, rectangle=%p ).\n", -- __FUNCTION__, surface, rectangle); -+ D_DEBUG_AT (CairoDFB_SurfExt, "%s( surface=%p, rectangle=%p )\n", __FUNCTION__, surface, rectangle); - - if (rectangle) { - if (!surface->local) { -@@ -1323,6 +1448,8 @@ _cairo_directfb_abstract_surface_get_extents (void *abstract_su - rectangle->y = 0; - rectangle->width = surface->width; - rectangle->height = surface->height; -+ -+ D_DEBUG_AT (CairoDFB_SurfExt, " -> %dx%d\n", surface->width, surface->height); - } - - return CAIRO_STATUS_SUCCESS; -@@ -1379,21 +1506,29 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - int h = 8; - int i; - -+ D_DEBUG_AT (CairoDFB_Font, "%s( %p [%d] )\n", __FUNCTION__, glyphs, num_glyphs ); -+ - if (scaled_font->surface_private) { - cache = scaled_font->surface_private; - x = cache->x; - y = cache->y; - } -- -+ -+ _cairo_cache_freeze( scaled_font->glyphs ); -+ - for (i = 0; i < num_glyphs; i++) { - cairo_scaled_glyph_t *scaled_glyph; - cairo_image_surface_t *img; - -+ D_DEBUG_AT (CairoDFB_Glyphs, " -> [%2d] = %4lu\n", i, glyphs[i].index ); -+ - ret = _cairo_scaled_glyph_lookup (scaled_font, glyphs[i].index, - CAIRO_SCALED_GLYPH_INFO_SURFACE, - &scaled_glyph); -- if (ret) -+ if (ret) { -+ _cairo_cache_thaw( scaled_font->glyphs ); - return ret; -+ } - - img = scaled_glyph->surface; - switch (img->format) { -@@ -1402,19 +1537,26 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - case CAIRO_FORMAT_ARGB32: - break; - default: -- D_DEBUG_AT (Cairo_DirectFB, -- "Unsupported font format %d!\n", img->format); -+ D_DEBUG_AT (CairoDFB_Glyphs, -+ " -> Unsupported font format %d!\n", img->format); -+ _cairo_cache_thaw( scaled_font->glyphs ); - return CAIRO_INT_STATUS_UNSUPPORTED; - } - - points[n].x = _cairo_lround (glyphs[i].x - img->base.device_transform.x0); - points[n].y = _cairo_lround (glyphs[i].y - img->base.device_transform.y0); - -+// D_DEBUG_AT (CairoDFB_Glyphs, " (%4d,%4d) [%2d]\n", points[n].x, points[n].y, n ); -+ - if (points[n].x >= surface->width || - points[n].y >= surface->height || - points[n].x+img->width <= 0 || - points[n].y+img->height <= 0) -- continue; -+ { -+ D_DEBUG_AT (CairoDFB_Glyphs, -+ " -> Unsupported font format %d!\n", img->format); -+ continue; -+ } - - if (!scaled_glyph->surface_private) { - DFBRectangle *rect; -@@ -1436,30 +1578,31 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - - /* Remember glyph location */ - rect = malloc (sizeof(DFBRectangle)); -- if (!rect) -+ if (!rect) { -+ _cairo_cache_thaw( scaled_font->glyphs ); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -+ } - *rect = rects[n]; - - scaled_glyph->surface_private = rect; - chars[num_chars++] = scaled_glyph; - -- /*D_DEBUG_AT (Cairo_DirectFB, -- "Glyph %lu will be loaded at (%d,%d).\n", -- glyphs[i].index, rects[n].x, rects[n].y);*/ -+ D_DEBUG_AT (CairoDFB_Glyphs, " -> loading at %4d,%2d <- rect %p, img %p, entry %p\n", -+ rects[n].x, rects[n].y, rect, scaled_glyph->surface, scaled_glyph); - } - else { - rects[n] = *((DFBRectangle *)scaled_glyph->surface_private); - -- /*D_DEBUG_AT (Cairo_DirectFB, -- "Glyph %lu already loaded at (%d,%d).\n", -- glyphs[i].index, rects[n].x, rects[n].y);*/ -+ D_DEBUG_AT (CairoDFB_Glyphs, " -> exists at %4d,%2d\n", rects[n].x, rects[n].y); - } - - n++; - } - -- if (!n) -+ if (!n) { -+ _cairo_cache_thaw( scaled_font->glyphs ); - return CAIRO_INT_STATUS_NOTHING_TO_DO; -+ } - - h += y; - w = MAX (w, 8); -@@ -1472,27 +1615,30 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - w = MAX (w, cache->width); - h = MAX (h, cache->height); - -- D_DEBUG_AT (Cairo_DirectFB, -- "Reallocating font cache (%dx%d).\n", w, h); -+ D_DEBUG_AT (CairoDFB_Font, " -> Reallocating font cache (%dx%d).\n", w, h); - - new_cache = _directfb_allocate_font_cache (surface->dfb, w, h); -- if (!new_cache) -+ if (!new_cache) { -+ _cairo_cache_thaw( scaled_font->glyphs ); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -+ } - - new_cache->dfbsurface->Blit (new_cache->dfbsurface, - cache->dfbsurface, NULL, 0, 0); -+ new_cache->dfbsurface->ReleaseSource (new_cache->dfbsurface); - - _directfb_destroy_font_cache (cache); - scaled_font->surface_private = cache = new_cache; - } - } - else { -- D_DEBUG_AT (Cairo_DirectFB, -- "Allocating font cache (%dx%d).\n", w, h); -+ D_DEBUG_AT (CairoDFB_Font, " -> Allocating font cache (%dx%d).\n", w, h); - - cache = _directfb_allocate_font_cache (surface->dfb, w, h); -- if (!cache) -+ if (!cache) { -+ _cairo_cache_thaw( scaled_font->glyphs ); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -+ } - - scaled_font->surface_backend = &cairo_directfb_surface_backend; - scaled_font->surface_private = cache; -@@ -1504,17 +1650,30 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - - if (cache->dfbsurface->Lock (cache->dfbsurface, - DSLF_WRITE, (void *)&data, &pitch)) -+ { -+ _cairo_cache_thaw( scaled_font->glyphs ); - return _cairo_error (CAIRO_STATUS_NO_MEMORY); -+ } - -+ D_DEBUG_AT (CairoDFB_Font, " => %d chars to load, cache %dx%d\n", num_chars, cache->width, cache->height); -+ - for (i = 0; i < num_chars; i++) { - cairo_image_surface_t *img = chars[i]->surface; - DFBRectangle *rect = chars[i]->surface_private; - unsigned char *dst = data; -- unsigned char *src = img->data; -+ unsigned char *src; - int j; - -+ D_DEBUG_AT (CairoDFB_Glyphs, " -> loading [%2d] <- rect %p, img %p, entry %p\n", i, rect, img, chars[i]); -+ -+ src = img->data; -+ -+ D_DEBUG_AT (CairoDFB_Glyphs, " from %p\n", src); -+ - dst += rect->y * pitch + (_directfb_argb_font ? (rect->x<<2) : rect->x); - -+ D_DEBUG_AT (CairoDFB_Glyphs, " to %4d,%2d (%p)\n", rect->x, rect->y, dst); -+ - if (img->format == CAIRO_FORMAT_A1) { - for (h = rect->h; h; h--) { - if (_directfb_argb_font) { -@@ -1563,9 +1722,13 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, - cache->dfbsurface->Unlock (cache->dfbsurface); - } - -+ _cairo_cache_thaw( scaled_font->glyphs ); -+ - cache->x = x; - cache->y = y; - -+ D_DEBUG_AT (CairoDFB_Font, " => cache %d,%d, %p [%d]\n", x, y, cache, n); -+ - *ret_cache = cache; - *ret_num = n; - -@@ -1577,7 +1740,7 @@ _cairo_directfb_surface_scaled_font_fini (cairo_scaled_font_t *scaled_font) - { - cairo_directfb_font_cache_t *cache = scaled_font->surface_private; - -- D_DEBUG_AT (Cairo_DirectFB, -+ D_DEBUG_AT (CairoDFB_Font, - "%s( scaled_font=%p ).\n", __FUNCTION__, scaled_font); - - if (cache) { -@@ -1590,7 +1753,7 @@ static void - _cairo_directfb_surface_scaled_glyph_fini (cairo_scaled_glyph_t *scaled_glyph, - cairo_scaled_font_t *scaled_font) - { -- D_DEBUG_AT (Cairo_DirectFB, -+ D_DEBUG_AT (CairoDFB_Font, - "%s( scaled_glyph=%p, scaled_font=%p ).\n", - __FUNCTION__, scaled_glyph, scaled_font); - -@@ -1619,7 +1782,7 @@ _cairo_directfb_surface_show_glyphs (void *abstract_dst, - DFBPoint points[num_glyphs]; - int num; - -- D_DEBUG_AT (Cairo_DirectFB, -+ D_DEBUG_AT (CairoDFB_Font, - "%s( dst=%p, op=%d, pattern=%p, glyphs=%p, num_glyphs=%d, scaled_font=%p ).\n", - __FUNCTION__, dst, op, pattern, glyphs, num_glyphs, scaled_font); - -@@ -1660,12 +1823,14 @@ _cairo_directfb_surface_show_glyphs (void *abstract_dst, - dst->dfbsurface->SetDstBlendFunction (dst->dfbsurface, dblend); - dst->dfbsurface->SetColor (dst->dfbsurface, color.r, color.g, color.b, color.a); - -- D_DEBUG_AT (Cairo_DirectFB, "Running BatchBlit().\n"); -+ D_DEBUG_AT (CairoDFB_Font, " ===> BatchBlit()\n"); - - RUN_CLIPPED (dst, NULL, - dst->dfbsurface->BatchBlit (dst->dfbsurface, - cache->dfbsurface, rects, points, num)); - -+ dst->dfbsurface->ReleaseSource (dst->dfbsurface); -+ - return CAIRO_STATUS_SUCCESS; - } - #endif /* DFB_SHOW_GLYPHS */ -@@ -1758,7 +1923,7 @@ cairo_directfb_surface_backend_init (IDirectFB *dfb) - cairo_directfb_surface_backend.scaled_glyph_fini = NULL; - cairo_directfb_surface_backend.show_glyphs = NULL; - #endif -- D_DEBUG_AT (Cairo_DirectFB, "Acceleration disabled.\n"); -+ D_DEBUG_AT (CairoDFB_Surface, "Acceleration disabled.\n"); - } - else { - DFBGraphicsDeviceDescription dsc; -@@ -1766,19 +1931,19 @@ cairo_directfb_surface_backend_init (IDirectFB *dfb) - dfb->GetDeviceDescription (dfb, &dsc); - - #if DFB_COMPOSITE -- if (!(dsc.acceleration_mask & DFXL_BLIT)) -- cairo_directfb_surface_backend.composite = NULL; -+// if (!(dsc.acceleration_mask & DFXL_BLIT)) -+// cairo_directfb_surface_backend.composite = NULL; - #endif - - #if DFB_COMPOSITE_TRAPEZOIDS -- if (!(dsc.acceleration_mask & DFXL_TEXTRIANGLES)) -- cairo_directfb_surface_backend.composite_trapezoids = NULL; -+// if (!(dsc.acceleration_mask & DFXL_TEXTRIANGLES)) -+// cairo_directfb_surface_backend.composite_trapezoids = NULL; - #endif - } - - if (getenv ("CAIRO_DIRECTFB_ARGB_FONT")) { - _directfb_argb_font = 1; -- D_DEBUG_AT (Cairo_DirectFB, "Using ARGB fonts.\n"); -+ D_DEBUG_AT (CairoDFB_Surface, "Using ARGB fonts.\n"); - } - - done = 1;
package/cairo/cairo-1.8.10-directfb.patch new file +39 -0
@@ -0,0 +1,39 @@ +diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c +index bb02dbf..65f2d55 100644 +--- a/src/cairo-directfb-surface.c ++++ b/src/cairo-directfb-surface.c +@@ -609,6 +609,8 @@ _cairo_directfb_surface_release_dest_image (void *abstract_surf + surface->dfbsurface->Blit (surface->dfbsurface, + buffer, NULL, + image_rect->x, image_rect->y)); ++ ++ surface->dfbsurface->ReleaseSource (surface->dfbsurface); + } + + cairo_surface_destroy (&image->base); +@@ -848,6 +850,9 @@ _directfb_finish_composite (cairo_directfb_surface_t *dst, + cairo_surface_attributes_t *src_attr) + { + _cairo_pattern_release_surface (src_pattern, src, src_attr); ++ ++ if (dst->dfbsurface) ++ dst->dfbsurface->ReleaseSource( dst->dfbsurface ); + } + #endif /* DFB_COMPOSITE || DFB_COMPOSITE_TRAPEZOIDS */ + +@@ -1555,6 +1560,7 @@ _directfb_acquire_font_cache (cairo_directfb_surface_t *surface, + + new_cache->dfbsurface->Blit (new_cache->dfbsurface, + cache->dfbsurface, NULL, 0, 0); ++ new_cache->dfbsurface->ReleaseSource (new_cache->dfbsurface); + + _directfb_destroy_font_cache (cache); + scaled_font->surface_private = cache = new_cache; +@@ -1778,6 +1784,7 @@ _cairo_directfb_surface_show_glyphs (void *abstract_dst, + RUN_CLIPPED (dst, NULL, + dst->dfbsurface->BatchBlit (dst->dfbsurface, + cache->dfbsurface, rects, points, num)); ++ dst->dfbsurface->ReleaseSource (dst->dfbsurface); + + return CAIRO_STATUS_SUCCESS; + }
package/cairo/cairo.mk +2 -1
@@ -3,12 +3,13 @@ # cairo # ############################################################# -CAIRO_VERSION = 1.6.4 +CAIRO_VERSION = 1.8.10 CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.gz CAIRO_SITE = http://cairographics.org/releases CAIRO_AUTORECONF = NO CAIRO_INSTALL_STAGING = YES CAIRO_INSTALL_TARGET = YES +CAIRO_LIBTOOL_PATCH = NO CAIRO_CONF_ENV = ac_cv_func_posix_getpwuid_r=yes glib_cv_stack_grows=no \ glib_cv_uscore=no ac_cv_func_strtod=yes \
Signature · 1 line
1.7.0.4
PATCH 9/16 libsoup: bump version to 2.31.2
In reply to Thomas Petazzoni--- package/libsoup/libsoup.mk | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
package/libsoup/libsoup.mk +4 -5
@@ -4,13 +4,12 @@ # ############################################################# -LIBSOUP_MAJOR_VERSION:=2.26 +LIBSOUP_MAJOR_VERSION:=2.31 LIBSOUP_VERSION:=$(LIBSOUP_MAJOR_VERSION).2 LIBSOUP_SOURCE:=libsoup-$(LIBSOUP_VERSION).tar.bz2 LIBSOUP_SITE:=http://ftp.gnome.org/pub/gnome/sources/libsoup/$(LIBSOUP_MAJOR_VERSION) -LIBSOUP_AUTORECONF = YES LIBSOUP_INSTALL_STAGING = YES -LIBSOUP_INSTALL_TARGET = YES +LIBSOUP_LIBTOOL_PATCH = NO LIBSOUP_CONF_ENV = ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY)
@@ -23,8 +22,8 @@ LIBSOUP_CONF_OPT = \ --enable-static \ --disable-explicit-deps \ --disable-glibtest \ - --without-gnome \ - --disable-gtk-doc + --disable-ssl \ + --without-gnome LIBSOUP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext libintl) host-pkg-config host-libglib2 libglib2 libxml2
Signature · 1 line
1.7.0.4
PATCH 10/16 xkeyboard-config: add dependency on host-xapp_xkbcomp
In reply to Thomas PetazzoniIn order to get xkeyboard-config to build, it needs xkbcomp to be built on the host, i.e host-xapp_xkbcomp. In turn, xapp_xkbcomp needs xlib_libX11 and xlib_libxkbfile, which in turn need a few libraries.
This commit adds all the relevant dependencies to build everything that is needed to get xkeyboard-config to build correctly.
--- package/x11r7/libxcb/libxcb.mk | 3 +++ package/x11r7/pthread-stubs/pthread-stubs.mk | 1 + package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk | 2 ++ package/x11r7/xcb-proto/xcb-proto.mk | 1 + package/x11r7/xkeyboard-config/xkeyboard-config.mk | 2 +- package/x11r7/xlib_libX11/xlib_libX11.mk | 3 +++ package/x11r7/xlib_libXau/xlib_libXau.mk | 4 ++++ package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk | 4 ++++ package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk | 4 ++++ .../x11r7/xproto_inputproto/xproto_inputproto.mk | 1 + package/x11r7/xproto_kbproto/xproto_kbproto.mk | 1 + .../x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk | 1 + package/x11r7/xproto_xextproto/xproto_xextproto.mk | 1 + .../xproto_xf86bigfontproto.mk | 1 + .../x11r7/xutil_util-macros/xutil_util-macros.mk | 1 + 15 files changed, 29 insertions(+), 1 deletions(-)
package/x11r7/libxcb/libxcb.mk +3 -0
@@ -16,5 +16,8 @@ LIBXCB_CONF_ENV = STAGING_DIR="$(STAGING_DIR)" HOST_PYTHON_VERSION=$(shell python --version 2>&1 | sed 's/Python \([0-9]\.[^\.]\).*/\1/') LIBXCB_MAKE_OPT = XCBPROTO_XCBINCLUDEDIR=$(STAGING_DIR)/usr/share/xcb XCBPROTO_XCBPYTHONDIR=$(STAGING_DIR)/usr/lib/python$(HOST_PYTHON_VERSION)/site-packages +HOST_LIBXCB_DEPENDENCIES = host-libxslt host-pthread-stubs host-xcb-proto host-xlib_libXdmcp host-xlib_libXau + $(eval $(call AUTOTARGETS,package/x11r7,libxcb)) +$(eval $(call AUTOTARGETS,package/x11r7,libxcb,host))
package/x11r7/pthread-stubs/pthread-stubs.mk +1 -0
@@ -11,4 +11,5 @@ PTHREAD_STUBS_LIBTOOL_PATCH = NO PTHREAD_STUBS_INSTALL_STAGING = YES $(eval $(call AUTOTARGETS,package/x11r7,pthread-stubs)) +$(eval $(call AUTOTARGETS,package/x11r7,pthread-stubs,host))
package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk +2 -0
@@ -9,5 +9,7 @@ XAPP_XKBCOMP_SOURCE = xkbcomp-$(XAPP_XKBCOMP_VERSION).tar.bz2 XAPP_XKBCOMP_SITE = http://xorg.freedesktop.org/releases/individual/app XAPP_XKBCOMP_AUTORECONF = NO XAPP_XKBCOMP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile +HOST_XAPP_XKBCOMP_DEPENDENCIES = host-xlib_libX11 host-xlib_libxkbfile $(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbcomp)) +$(eval $(call AUTOTARGETS,package/x11r7,xapp_xkbcomp,host))
package/x11r7/xcb-proto/xcb-proto.mk +1 -0
@@ -10,4 +10,5 @@ XCB_PROTO_SITE = http://xcb.freedesktop.org/dist/ XCB_PROTO_INSTALL_STAGING = YES $(eval $(call AUTOTARGETS,package/x11r7,xcb-proto)) +$(eval $(call AUTOTARGETS,package/x11r7,xcb-proto,host))
package/x11r7/xkeyboard-config/xkeyboard-config.mk +1 -1
@@ -10,7 +10,7 @@ XKEYBOARD_CONFIG_AUTORECONF = NO XKEYBOARD_CONFIG_INSTALL_STAGING = NO XKEYBOARD_CONFIG_INSTALL_TARGET = YES XKEYBOARD_CONFIG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install -XKEYBOARD_CONFIG_DEPENDENCIES = host-intltool +XKEYBOARD_CONFIG_DEPENDENCIES = host-intltool host-xapp_xkbcomp XKEYBOARD_CONFIG_CONF_OPT = GMSGFMT=/usr/bin/msgfmt
package/x11r7/xlib_libX11/xlib_libX11.mk +3 -0
@@ -18,7 +18,10 @@ XLIB_LIBX11_CONF_OPT = \ --with-keysymdef=$(STAGING_DIR)/usr/include/X11/keysymdef.h \ --disable-specs +HOST_XLIB_LIBX11_DEPENDENCIES = host-xproto_xextproto host-libxcb host-xutil_util-macros host-xlib_xtrans host-xlib_libXau host-xlib_libXdmcp host-xproto_kbproto host-xproto_xproto host-xproto_xextproto host-xproto_inputproto host-xproto_xf86bigfontproto xproto_bigreqsproto host-xproto_xcmiscproto + $(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11)) +$(eval $(call AUTOTARGETS,package/x11r7,xlib_libX11,host)) # src/util/makekeys is executed at build time to generate ks_tables.h, so # it should get compiled for the host. The libX11 makefile unfortunately
package/x11r7/xlib_libXau/xlib_libXau.mk +4 -0
@@ -13,4 +13,8 @@ XLIB_LIBXAU_INSTALL_STAGING = YES XLIB_LIBXAU_DEPENDENCIES = xutil_util-macros xproto_xproto XLIB_LIBXAU_CONF_OPT = --enable-shared --disable-static +HOST_XLIB_LIBXAU_DEPENDENCIES = host-xutil_util-macros host-xproto_xproto +HOST_XLIB_LIBXAU_CONF_OPT = --enable-shared --disable-static + $(eval $(call AUTOTARGETS,package/x11r7,xlib_libXau)) +$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXau,host))
package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk +4 -0
@@ -13,4 +13,8 @@ XLIB_LIBXDMCP_INSTALL_STAGING = YES XLIB_LIBXDMCP_DEPENDENCIES = xutil_util-macros xproto_xproto XLIB_LIBXDMCP_CONF_OPT = --enable-shared --disable-static +HOST_XLIB_LIBXDMCP_DEPENDENCIES = host-xutil_util-macros host-xproto_xproto +HOST_XLIB_LIBXDMCP_CONF_OPT = --enable-shared --disable-static + $(eval $(call AUTOTARGETS,package/x11r7,xlib_libXdmcp)) +$(eval $(call AUTOTARGETS,package/x11r7,xlib_libXdmcp,host))
package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk +4 -0
@@ -12,4 +12,8 @@ XLIB_LIBXKBFILE_INSTALL_STAGING = YES XLIB_LIBXKBFILE_DEPENDENCIES = xlib_libX11 xproto_kbproto XLIB_LIBXKBFILE_CONF_OPT = --enable-shared --disable-static +HOST_XLIB_LIBXKBFILE_DEPENDENCIES = host-xlib_libX11 host-xproto_kbproto +HOST_XLIB_LIBXKBFILE_CONF_OPT = --enable-shared --disable-static + $(eval $(call AUTOTARGETS,package/x11r7,xlib_libxkbfile)) +$(eval $(call AUTOTARGETS,package/x11r7,xlib_libxkbfile,host))
package/x11r7/xproto_inputproto/xproto_inputproto.mk +1 -0
@@ -12,3 +12,4 @@ XPROTO_INPUTPROTO_INSTALL_STAGING = YES XPROTO_INPUTPROTO_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xproto_inputproto)) +$(eval $(call AUTOTARGETS,package/x11r7,xproto_inputproto,host))
package/x11r7/xproto_kbproto/xproto_kbproto.mk +1 -0
@@ -12,3 +12,4 @@ XPROTO_KBPROTO_INSTALL_STAGING = YES XPROTO_KBPROTO_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xproto_kbproto)) +$(eval $(call AUTOTARGETS,package/x11r7,xproto_kbproto,host))
package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk +1 -0
@@ -12,3 +12,4 @@ XPROTO_XCMISCPROTO_INSTALL_STAGING = YES XPROTO_XCMISCPROTO_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xproto_xcmiscproto)) +$(eval $(call AUTOTARGETS,package/x11r7,xproto_xcmiscproto,host))
package/x11r7/xproto_xextproto/xproto_xextproto.mk +1 -0
@@ -12,3 +12,4 @@ XPROTO_XEXTPROTO_INSTALL_STAGING = YES XPROTO_XEXTPROTO_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xproto_xextproto)) +$(eval $(call AUTOTARGETS,package/x11r7,xproto_xextproto,host))
package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk +1 -0
@@ -12,3 +12,4 @@ XPROTO_XF86BIGFONTPROTO_INSTALL_STAGING = YES XPROTO_XF86BIGFONTPROTO_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86bigfontproto)) +$(eval $(call AUTOTARGETS,package/x11r7,xproto_xf86bigfontproto,host))
package/x11r7/xutil_util-macros/xutil_util-macros.mk +1 -0
@@ -12,3 +12,4 @@ XUTIL_UTIL_MACROS_INSTALL_STAGING = YES XUTIL_UTIL_MACROS_INSTALL_TARGET = NO $(eval $(call AUTOTARGETS,package/x11r7,xutil_util-macros)) +$(eval $(call AUTOTARGETS,package/x11r7,xutil_util-macros,host))
Signature · 1 line
1.7.0.4
PATCH 11/16 xserver: tell the X server where fonts are installed
In reply to Thomas PetazzoniAll fonts are installed in /usr/share/fonts/X11 and not in /usr/lib/X11/fonts/ where the X server looks by default.
--- .../xserver_xorg-server/xserver_xorg-server.mk | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +2 -1
@@ -60,7 +60,8 @@ XSERVER_XORG_SERVER_DEPENDENCIES = \ XSERVER_XORG_SERVER_CONF_OPT = --disable-config-hal \ --disable-xnest --disable-xephyr --disable-xvfb \ --with-builder-addr=buildroot at uclibc.org \ - CFLAGS="-I$(STAGING_DIR)/usr/include/pixman-1" + CFLAGS="-I$(STAGING_DIR)/usr/include/pixman-1" \ + --with-fontdir=/usr/share/fonts/X11/ ifeq ($(BR2_PACKAGE_XSERVER_xorg),y) XSERVER_XORG_SERVER_CONF_OPT += --enable-xorg --disable-glx
Signature · 1 line
1.7.0.4
PATCH 12/16 xserver: Add xkeyboard-config as a dependency
In reply to Thomas Petazzonixkeyboard-config is required to install keymap files to the target, without which the X server does not start.
--- package/x11r7/xserver_xorg-server/Config.in | 1 + .../xserver_xorg-server/xserver_xorg-server.mk | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
package/x11r7/xserver_xorg-server/Config.in +1 -0
@@ -47,6 +47,7 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO select BR2_PACKAGE_XPROTO_XPROTO select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XKEYBOARD_CONFIG depends on !BR2_avr32 help xorg-server 1.7.5
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +1 -0
@@ -53,6 +53,7 @@ XSERVER_XORG_SERVER_DEPENDENCIES = \ xproto_xf86rushproto \ xproto_xf86vidmodeproto \ xproto_xproto \ + xkeyboard-config \ pixman \ openssl \ mcookie
Signature · 1 line
1.7.0.4
PATCH 13/16 midori: make sure it can't be selected if webkit can't be enabled
In reply to Thomas Petazzoni--- package/midori/Config.in | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
package/midori/Config.in +5 -0
@@ -3,7 +3,12 @@ config BR2_PACKAGE_MIDORI select BR2_PACKAGE_WEBKIT select BR2_PACKAGE_LIBSEXY depends on BR2_PACKAGE_LIBGTK2 + depends on BR2_INSTALL_LIBSTDCPP # webkit + depends on BR2_USE_WCHAR # webkit help Midori is a lightweight web browser based on WebKit http://software.twotoasts.de/?page=midori + +comment "midori requires a toolchain with C++ support and WCHAR enabled" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
Signature · 1 line
1.7.0.4
PATCH 14/16 webkit: the X11 variant needs libXt
In reply to Thomas PetazzoniFixes bug #829.
--- package/webkit/Config.in | 1 + package/webkit/webkit.mk | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
package/webkit/Config.in +1 -0
@@ -12,6 +12,7 @@ config BR2_PACKAGE_WEBKIT select BR2_PACKAGE_LIBSOUP select BR2_PACKAGE_CAIRO_PNG select BR2_PACKAGE_LIBGAIL + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7 help WebKit is an open source, standards compliant web browser engine.
package/webkit/webkit.mk +1 -1
@@ -17,7 +17,7 @@ WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config ifeq ($(BR2_PACKAGE_XORG7),y) WEBKIT_CONF_OPT += --with-target=x11 - WEBKIT_DEPENDENCIES += xserver_xorg-server + WEBKIT_DEPENDENCIES += xserver_xorg-server xlib_libXt endif ifeq ($(BR2_PACKAGE_DIRECTFB),y)
Signature · 1 line
1.7.0.4
PATCH 15/16 webkit: Fix build failure on uClibc
In reply to Thomas PetazzoniuClibc does not define pthread_getattr_np(), so we need to workaround this using a patch.
Fixes bug #1405.
--- .../webkit/webkit-1.2.3-pthread_getattr_np.patch | 79 ++++++++++++++++++++ 1 files changed, 79 insertions(+), 0 deletions(-) create mode 100644 package/webkit/webkit-1.2.3-pthread_getattr_np.patch
package/webkit/webkit-1.2.3-pthread_getattr_np.patch new file +79 -0
@@ -0,0 +1,79 @@ +Patch WebKit because pthread_getattr_np is not implemented in uClibc + +Define UCLIBC_USE_PROC_SELF_MAPS etc. as a workaround for uClibc. This +code was in the qtoipa webkit but appears to have been removed from +more recent versions of webkit. + +See: http://bugreports.qt.nokia.com/browse/QTBUG-6551 +Credit for fix: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=545066#545066 + +Signed-off-by: Paul Jones <[email protected]> + +Index: webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp +=================================================================== +--- webkit-1.2.3.orig/JavaScriptCore/runtime/Collector.cpp 2010-07-22 17:16:19.000000000 +0200 ++++ webkit-1.2.3/JavaScriptCore/runtime/Collector.cpp 2010-07-22 17:25:02.000000000 +0200 +@@ -75,6 +75,18 @@ + #endif + #include <unistd.h> + ++#if defined(__UCLIBC__) ++// versions of uClibc 0.9.31 and below do not have ++// pthread_getattr_np or pthread_attr_getstack. ++#if __UCLIBC_MAJOR__ == 0 && \ ++ (__UCLIBC_MINOR__ < 9 || \ ++ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 31)) ++#define UCLIBC_USE_PROC_SELF_MAPS 1 ++#include <stdio_ext.h> ++extern int *__libc_stack_end; ++#endif ++#endif ++ + #if OS(SOLARIS) + #include <thread.h> + #else +@@ -610,6 +622,36 @@ + get_thread_info(find_thread(NULL), &threadInfo); + return threadInfo.stack_end; + #elif OS(UNIX) ++#ifdef UCLIBC_USE_PROC_SELF_MAPS ++ // Read /proc/self/maps and locate the line whose address ++ // range contains __libc_stack_end. ++ FILE *file = fopen("/proc/self/maps", "r"); ++ if (!file) ++ return 0; ++ __fsetlocking(file, FSETLOCKING_BYCALLER); ++ char *line = NULL; ++ size_t lineLen = 0; ++ while (!feof_unlocked(file)) { ++ if (getdelim(&line, &lineLen, '\n', file) <= 0) ++ break; ++ long from; ++ long to; ++ if (sscanf (line, "%lx-%lx", &from, &to) != 2) ++ continue; ++ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { ++ fclose(file); ++ free(line); ++#ifdef _STACK_GROWS_UP ++ return (void *)from; ++#else ++ return (void *)to; ++#endif ++ } ++ } ++ fclose(file); ++ free(line); ++ return 0; ++#else + static void* stackBase = 0; + static size_t stackSize = 0; + static pthread_t stackThread; +@@ -631,6 +673,7 @@ + stackThread = thread; + } + return static_cast<char*>(stackBase) + stackSize; ++#endif + #elif OS(WINCE) + if (g_stackBase) + return g_stackBase;
Signature · 1 line
1.7.0.4
PATCH 16/16 Create <tuple>/lib -> <sysroot>/lib symlink before installing cross gcc
In reply to Thomas PetazzoniThis commit solves bug #1051. The problem in this bug in that WebKit compiles a sample C program, which uses WebKit. As WebKit is written in C++, even though the program it built with CROSS-gcc, it must be linked with libstdc++. However, CROSS-gcc can't find the libstdc++ has it's hidden inside <sysroot>/<tuple>/lib.
Therefore, this commit creates a symbolic link <sysroot>/<tuple>/lib -> <sysroot>/lib before running the CROSS-gcc installation. While this may look like a hack, this is the solution used by both Crosstool-NG and OpenWRT.
Moreover, with this symbolic link in place, I think bug #1741 may also be solved. The problem in this bug is that the linker tries to link against /lib/libc.so.0. This is due to the fact that the linker finds a libc.so script file in the original toolchain location and not inside the copy of the toolchain sysroot in $(STAGING_DIR). As the script file is found outside of the current toolchain sysroot, ld considers the script has non-sysrooted, and therefore doesn't prefix all paths found in the script file (such as /lib/libc.so.0) with the sysroot path, leading to the failure.
So, in details, this commit :
* Adds a BR2_ARCH_IS_64 invisible config knob that is used to know if the arch is a 64 bits architecture or not.
* Creates the <sysroot>/<tuple>/lib -> <sysroot>/lib symbolic link, and the <sysroot>/<tuple>/lib64 -> <sysroot>/lib64 symbolic link if needed.
* Fixes the external toolchain sysroot detection code so that the 'sed' replacement is done *after* the readlink -f evaluation.
I have tested this by building ARM, x86 and x86_64 toolchains with Buildroot, and then use these toolchains as external toolchains to build a full X.org/Gtk/WebKit/Midori stack. I have also done a complete ARM Buildroot internal toolchain build with the same full X.org/Gtk/WebKit/Midori stack.
--- target/Config.in.arch | 5 +++++ toolchain/external-toolchain/ext-tool.mk | 2 +- toolchain/gcc/gcc-uclibc-4.x.mk | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-)
target/Config.in.arch +5 -0
@@ -1,3 +1,6 @@ +config BR2_ARCH_IS_64 + bool + choice prompt "Target Architecture" default BR2_i386
@@ -38,8 +41,10 @@ config BR2_sparc bool "sparc" config BR2_sparc64 bool "sparc64" + select BR2_ARCH_IS_64 config BR2_x86_64 bool "x86_64" + select BR2_ARCH_IS_64 config BR2_xtensa bool "xtensa" endchoice
toolchain/external-toolchain/ext-tool.mk +1 -1
@@ -306,7 +306,7 @@ endif # ! no threads TARGET_CC_NO_SYSROOT=$(filter-out --sysroot=%,$(TARGET_CC)) SYSROOT_DIR=$(shell $(TARGET_CC_NO_SYSROOT) -print-sysroot 2>/dev/null) ifeq ($(SYSROOT_DIR),) -SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a |sed -r -e 's:usr/lib/libc\.a::;')) +SYSROOT_DIR=$(shell readlink -f $$(LANG=C $(TARGET_CC_NO_SYSROOT) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;') endif # Now, find if the toolchain specifies a sub-directory for the
toolchain/gcc/gcc-uclibc-4.x.mk +6 -2
@@ -261,8 +261,11 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ) mkdir -p $(GCC_BUILD_DIR2) # Important! Required for limits.h to be fixed. ln -snf ../include/ $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include - #-rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib - #ln -snf ../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib + -rmdir $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib + mkdir -p $(STAGING_DIR)/lib + ln -snf ../../lib $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib + $(if $(BR2_ARCH_IS_64),mkdir -p $(STAGING_DIR)/lib64) + $(if $(BR2_ARCH_IS_64),ln -snf ../../lib64 $(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64) (cd $(GCC_BUILD_DIR2); rm -rf config.cache; \ $(HOST_CONFIGURE_OPTS) \ $(GCC_SRC_DIR)/configure $(QUIET) \
@@ -307,6 +310,7 @@ $(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled fi; \ mv "$(STAGING_DIR)/lib64/"* "$(STAGING_DIR)/lib/"; \ rmdir "$(STAGING_DIR)/lib64"; \ + rm "$(STAGING_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib64";\ fi # Strip the host binaries ifeq ($(GCC_STRIP_HOST_BINARIES),true)
Signature · 1 line
1.7.0.4