diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2010-03-07 23:12:38 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2010-03-07 23:14:30 +0100 |
commit | 007c6d385f331c7bdd1a0ea9939c3b1b8f5de682 (patch) | |
tree | 640181f4c9dcc1371b53ffadcb81ac521414d432 | |
parent | 48b82779acbe28349d2111a86ac2dde95adb59fd (diff) | |
download | embtoolkit-007c6d385f331c7bdd1a0ea9939c3b1b8f5de682.tar.gz embtoolkit-007c6d385f331c7bdd1a0ea9939c3b1b8f5de682.tar.bz2 embtoolkit-007c6d385f331c7bdd1a0ea9939c3b1b8f5de682.tar.xz |
Packages: Gtk/cairo: improvement to support X windowing system backend
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r-- | packages/graphics/cairo/cairo.kconfig | 13 | ||||
-rw-r--r-- | packages/graphics/cairo/cairo.mk | 28 | ||||
-rw-r--r-- | packages/graphics/gtk/gtk.kconfig | 23 | ||||
-rw-r--r-- | packages/graphics/gtk/gtk.mk | 31 |
4 files changed, 71 insertions, 24 deletions
diff --git a/packages/graphics/cairo/cairo.kconfig b/packages/graphics/cairo/cairo.kconfig index de4fec7..82617dd 100644 --- a/packages/graphics/cairo/cairo.kconfig +++ b/packages/graphics/cairo/cairo.kconfig @@ -25,7 +25,7 @@ config EMBTK_HAVE_CAIRO bool "Have cairo" select EMBTK_HAVE_PIXMAN - select EMBTK_HAVE_DIRECTFB + help Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window @@ -34,6 +34,17 @@ config EMBTK_HAVE_CAIRO Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available (eg. through the X Render Extension). + +config EMBTK_HAVE_CAIRO_WITH_DIRECTFB + bool "Build cairo with DirectFB support" + depends on EMBTK_HAVE_CAIRO + select EMBTK_HAVE_DIRECTFB + +config EMBTK_HAVE_CAIRO_WITH_LIBXCB + bool "Build cairo with XCB support" + depends on EMBTK_HAVE_CAIRO + select EMBTK_HAVE_LIBXCB + choice prompt "Cairo version you wish" depends on EMBTK_HAVE_CAIRO diff --git a/packages/graphics/cairo/cairo.mk b/packages/graphics/cairo/cairo.mk index 6733733..869fcf3 100644 --- a/packages/graphics/cairo/cairo.mk +++ b/packages/graphics/cairo/cairo.mk @@ -33,10 +33,28 @@ CAIRO_INCLUDES = cairo CAIRO_LIBS = libcairo* CAIRO_PKGCONFIGS = cairo*.pc +CAIRO_CONFIG_OPTS-y := +CAIRO_CONFIG_OPTS-n := +CAIRO_DEPS := pixman_install libpng_install freetype_install fontconfig_install + +ifeq ($(CONFIG_EMBTK_HAVE_CAIRO_WITH_DIRECTFB),y) +CAIRO_DEPS += directfb_install +CAIRO_CONFIG_OPTS-y += --enable-directfb=yes +else +CAIRO_CONFIG_OPTS-n += --enable-directfb=no +endif + +ifeq ($(CONFIG_EMBTK_HAVE_CAIRO_WITH_LIBXCB),y) +CAIRO_DEPS += xcbutil_install libx11_install +CAIRO_CONFIG_OPTS-y += --enable-xcb=yes +else +CAIRO_CONFIG_OPTS-n += --enable-xcb=no +CAIRO_CONFIG_OPTS-n += --without-x +endif + cairo_install: $(CAIRO_BUILD_DIR)/.installed -$(CAIRO_BUILD_DIR)/.installed: pixman_install libpng_install freetype_install \ - directfb_install fontconfig_install download_cairo \ +$(CAIRO_BUILD_DIR)/.installed: $(CAIRO_DEPS) download_cairo \ $(CAIRO_BUILD_DIR)/.decompressed $(CAIRO_BUILD_DIR)/.configured $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ cairo-$(CAIRO_VERSION) in your root filesystem...") @@ -71,14 +89,14 @@ $(CAIRO_BUILD_DIR)/.configured: STRIP=$(TARGETSTRIP) \ OBJDUMP=$(TARGETOBJDUMP) \ OBJCOPY=$(TARGETOBJCOPY) \ - CFLAGS="$(TARGET_CFLAGS)" \ - CXXFLAGS="$(TARGET_CFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS) -I$(SYSROOT)/usr/include" \ + CXXFLAGS="$(TARGET_CFLAGS) -I$(SYSROOT)/usr/include" \ LDFLAGS="-L$(SYSROOT)/$(LIBDIR) -L$(SYSROOT)/usr/$(LIBDIR)" \ CPPFLGAS="-I$(SYSROOT)/usr/include" \ PKG_CONFIG=$(PKGCONFIG_BIN) \ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) \ - --prefix=/usr --without-x --enable-directfb + --prefix=/usr $(CAIRO_CONFIG_OPTS-y) $(CAIRO_CONFIG_OPTS-n) @touch $@ cairo_clean: diff --git a/packages/graphics/gtk/gtk.kconfig b/packages/graphics/gtk/gtk.kconfig index f3d0059..77a8ede 100644 --- a/packages/graphics/gtk/gtk.kconfig +++ b/packages/graphics/gtk/gtk.kconfig @@ -1,6 +1,6 @@ ################################################################################ # GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> -# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# Copyright(C) 2009-2010 GAYE Abdoulaye Walsimou. All rights reserved. # # This program is free software; you can distribute it and/or modify it # under the terms of the GNU General Public License @@ -27,12 +27,11 @@ config EMBTK_HAVE_GTK select EMBTK_HAVE_GLIB select EMBTK_HAVE_PANGO select EMBTK_HAVE_ATK - select EMBTK_HAVE_LIBJEPG + select EMBTK_HAVE_LIBJPEG select EMBTK_HAVE_LIBPNG select EMBTK_HAVE_LIBTIFF select EMBTK_HAVE_FONTCONFIG select EMBTK_HAVE_CAIRO - select EMBTK_HAVE_DIRECTFB help GTK+ is a highly usable, feature rich toolkit for creating graphical user interfaces which boasts cross platform @@ -43,6 +42,24 @@ config EMBTK_HAVE_GTK proprietary software with GTK+ without any license fees or royalties. choice + prompt "gtk+ backend" + depends on EMBTK_HAVE_GTK + help + Which gtk+ backend to use + config EMBTK_GTK_BACKEND_DIRECTFB + bool "DirectFB" + select EMBTK_HAVE_DIRECTFB + select EMBTK_HAVE_CAIRO_WITH_DIRECTFB + config EMBTK_GTK_BACKEND_XSERVER + bool "X windowing system" + select EMBTK_HAVE_XSERVER + select EMBTK_HAVE_CAIRO_WITH_LIBXCB + select EMBTK_HAVE_LIBX11 + select EMBTK_HAVE_LIBXEXT + select EMBTK_HAVE_LIBXRENDER +endchoice + +choice prompt "gtk+ version you wish" depends on EMBTK_HAVE_GTK help diff --git a/packages/graphics/gtk/gtk.mk b/packages/graphics/gtk/gtk.mk index e8547da..214e05d 100644 --- a/packages/graphics/gtk/gtk.mk +++ b/packages/graphics/gtk/gtk.mk @@ -1,6 +1,6 @@ ################################################################################ # GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> -# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# Copyright(C) 2009-2010 GAYE Abdoulaye Walsimou. All rights reserved. # # This program is free software; you can distribute it and/or modify it # under the terms of the GNU General Public License @@ -34,18 +34,23 @@ GTK_INCLUDES = gail-* gtk-* GTK_LIBS = gtk-* libgail* libgdk-* libgdk_* libgtk-* GTK_PKGCONFIGS = gail*.pc gdk*.pc gtk*.pc -ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) -PKG_CONFIG_PATH=$(SYSROOT)/usr/lib32/pkgconfig +GTK_DEPS := + +ifeq ($(CONFIG_EMBTK_GTK_BACKEND_DIRECTFB),y) +GTK_BACKEND := --with-gdktarget=directfb --without-x +GTK_DEPS += directfb_install else -PKG_CONFIG_PATH=$(SYSROOT)/usr/lib/pkgconfig +GTK_BACKEND := --with-gdktarget=x11 --with-x +GTK_DEPS += xserver_install libxext_install libxrender_install endif +GTK_DEPS += libjpeg_install libpng_install libtiff_install fontconfig_install \ + glib_install atk_install cairo_install pango_install + gtk_install: $(GTK_BUILD_DIR)/.installed $(GTK_BUILD_DIR)/.special -$(GTK_BUILD_DIR)/.installed: directfb_install libtiff_install \ - fontconfig_install download_gtk glib_install atk_install cairo_install \ - pango_install $(GTK_BUILD_DIR)/.decompressed \ - $(GTK_BUILD_DIR)/.configured +$(GTK_BUILD_DIR)/.installed: $(GTK_DEPS) download_gtk \ + $(GTK_BUILD_DIR)/.decompressed $(GTK_BUILD_DIR)/.configured $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ gtk-$(GTK_VERSION) in your root filesystem...") $(call EMBTK_KILL_LT_RPATH, $(GTK_BUILD_DIR)) @@ -90,7 +95,7 @@ $(GTK_BUILD_DIR)/.configured: ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ --target=$(STRICT_GNU_TARGET) \ --prefix=/usr --disable-cups --disable-gtk-doc --disable-glibtest \ - --with-gdktarget=directfb --libdir=/usr/$(LIBDIR) + $(GTK_BACKEND) --libdir=/usr/$(LIBDIR) @touch $@ $(GTK_BUILD_DIR)/.patchlibtool: @@ -135,10 +140,6 @@ gtk_clean: $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(GTK_BINS) $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(GTK_SBINS) $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(GTK_INCLUDES) - $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(GTK_LIBS) - $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(GTK_PKGCONFIGS) -ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) - $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(GTK_LIBS) - $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(GTK_PKGCONFIGS) -endif + $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(GTK_LIBS) + $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(GTK_PKGCONFIGS) |