summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-12-25 13:15:48 +0100
committerAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2009-12-25 13:15:48 +0100
commita3a449c0e19d3a09c53e7f92d1c4fb561991bca3 (patch)
treec531b0e46c5f60b81d2e1dbfb058cab4aafe64fc
parentf6bba1b6d30e827f946acc8eaf63811449506fce (diff)
downloadembtoolkit-a3a449c0e19d3a09c53e7f92d1c4fb561991bca3.tar.gz
embtoolkit-a3a449c0e19d3a09c53e7f92d1c4fb561991bca3.tar.bz2
embtoolkit-a3a449c0e19d3a09c53e7f92d1c4fb561991bca3.tar.xz
Packages: New cairo: add cairo as buildable package
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r--kconfig/packages.kconfig1
-rw-r--r--mk/packages.mk7
-rw-r--r--packages/graphics/cairo/cairo.kconfig49
-rw-r--r--packages/graphics/cairo/cairo.mk97
4 files changed, 154 insertions, 0 deletions
diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig
index 84563e9..37f7d57 100644
--- a/kconfig/packages.kconfig
+++ b/kconfig/packages.kconfig
@@ -62,6 +62,7 @@ menu "Compression packages"
endmenu
menu "Graphics packages"
+source packages/graphics/cairo/cairo.kconfig
source packages/graphics/directfb/directfb.kconfig
source packages/graphics/fontconfig/fontconfig.kconfig
source packages/graphics/freetype/freetype.kconfig
diff --git a/mk/packages.mk b/mk/packages.mk
index f3283ac..e129c80 100644
--- a/mk/packages.mk
+++ b/mk/packages.mk
@@ -68,6 +68,13 @@ ROOTFS_COMPONENTS_CLEAN += mtd-utils_target_clean
########################### Graphics packages ##################################
+#Cairo
+include $(EMBTK_ROOT)/packages/graphics/cairo/cairo.mk
+ifeq ($(CONFIG_EMBTK_HAVE_CAIRO),y)
+ROOTFS_COMPONENTS += cairo_install
+endif
+ROOTFS_COMPONENTS_CLEAN += cairo_clean
+
#DirectFB
include $(EMBTK_ROOT)/packages/graphics/directfb/directfb.mk
ifeq ($(CONFIG_EMBTK_HAVE_DIRECTFB),y)
diff --git a/packages/graphics/cairo/cairo.kconfig b/packages/graphics/cairo/cairo.kconfig
new file mode 100644
index 0000000..77c0ab2
--- /dev/null
+++ b/packages/graphics/cairo/cairo.kconfig
@@ -0,0 +1,49 @@
+################################################################################
+# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# Copyright(C) 2009 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
+# (Version 2 or later) published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+################################################################################
+#
+# \file cairo.kconfig
+# \brief cairo.kconfig of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date December 2009
+################################################################################
+
+config EMBTK_HAVE_CAIRO
+ bool "Have cairo"
+ select EMBTK_HAVE_PIXMAN
+ help
+ Cairo is a 2D graphics library with support for multiple output
+ devices. Currently supported output targets include the X Window
+ System, Quartz, Win32, image buffers, PostScript, PDF, and SVG
+ file output.
+ 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).
+choice
+ prompt "Cairo version you wish"
+ depends on EMBTK_HAVE_CAIRO
+ help
+ Here you can choose which version of cairo you want to use.
+
+ config EMBTK_CAIRO_VERSION_1_8_8
+ bool "cairo-1.8.8"
+endchoice
+
+config EMBTK_CAIRO_VERSION_STRING
+ string
+ default "1.8.8" if EMBTK_CAIRO_VERSION_1_8_8
+
diff --git a/packages/graphics/cairo/cairo.mk b/packages/graphics/cairo/cairo.mk
new file mode 100644
index 0000000..9151850
--- /dev/null
+++ b/packages/graphics/cairo/cairo.mk
@@ -0,0 +1,97 @@
+################################################################################
+# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# Copyright(C) 2009 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
+# (Version 2 or later) published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+################################################################################
+#
+# \file cairo.mk
+# \brief cairo.mk of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date December 2009
+################################################################################
+
+CAIRO_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_CAIRO_VERSION_STRING)))
+CAIRO_SITE := http://www.cairographics.org/releases
+CAIRO_PACKAGE := cairo-$(CAIRO_VERSION).tar.gz
+CAIRO_BUILD_DIR := $(PACKAGES_BUILD)/cairo-$(CAIRO_VERSION)
+
+CAIRO_BINS =
+CAIRO_SBINS =
+CAIRO_INCLUDES = cairo
+CAIRO_LIBS = libcairo*
+CAIRO_PKGCONFIGS = cairo*.pc
+
+cairo_install: $(CAIRO_BUILD_DIR)/.installed
+
+$(CAIRO_BUILD_DIR)/.installed: pixman_install libpng_install freetype_install \
+ fontconfig_install download_cairo \
+ $(CAIRO_BUILD_DIR)/.decompressed $(CAIRO_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ cairo-$(CAIRO_VERSION) in your root filesystem...")
+ $(Q)$(MAKE) -C $(CAIRO_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(CAIRO_BUILD_DIR) DESTDIR=$(SYSROOT)/tempcairo install
+ $(Q)$(MAKE) libtool_files_adapt
+ $(Q)$(MAKE) pkgconfig_files_adapt
+ @touch $@
+
+download_cairo:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(CAIRO_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(CAIRO_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(CAIRO_PACKAGE) \
+ $(CAIRO_SITE)/$(CAIRO_PACKAGE)
+
+$(CAIRO_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(CAIRO_PACKAGE) ...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(CAIRO_PACKAGE)
+ @touch $@
+
+$(CAIRO_BUILD_DIR)/.configured:
+ $(Q)cd $(CAIRO_BUILD_DIR); \
+ CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) \
+ AR=$(TARGETAR) \
+ RANLIB=$(TARGETRANLIB) \
+ AS=$(CROSS_COMPILE)as \
+ LD=$(TARGETLD) \
+ NM=$(TARGETNM) \
+ STRIP=$(TARGETSTRIP) \
+ OBJDUMP=$(TARGETOBJDUMP) \
+ OBJCOPY=$(TARGETOBJCOPY) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="-L$(SYSROOT)/lib -L$(SYSROOT)/usr/lib \
+ -L$(SYSROOT)/lib32 -L$(SYSROOT)/usr/lib32" \
+ CPPFLGAS="-I$(SYSROOT)/usr/include" \
+ PKG_CONFIG=$(PKGCONFIG_BIN) \
+ PKG_CONFIG_PATH=$(SYSROOT)/usr/lib/pkgconfig \
+ PKG_CONFIG_LIBDIR=$(SYSROOT)/usr/lib \
+ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \
+ --target=$(STRICT_GNU_TARGET) \
+ --prefix=/usr --without-x
+ @touch $@
+
+cairo_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"cleanup cairo-$(CAIRO_VERSION)...")
+ $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(CAIRO_BINS)
+ $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(CAIRO_SBINS)
+ $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(CAIRO_INCLUDES)
+ $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(CAIRO_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(CAIRO_PKGCONFIGS)
+ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y)
+ $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(CAIRO_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(CAIRO_PKGCONFIGS)
+endif
+