diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-24 20:53:23 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-24 20:53:23 +0100 |
commit | 93f18582678c9520bfa7d92facf68a826a0f6ba9 (patch) | |
tree | 397848cc89445e2f1289d76c1e4f3f42f7e55ed2 | |
parent | 1f80aa8b93badc69b39fcfc0e30ac07c4d2d0603 (diff) | |
download | embtoolkit-93f18582678c9520bfa7d92facf68a826a0f6ba9.tar.gz embtoolkit-93f18582678c9520bfa7d92facf68a826a0f6ba9.tar.bz2 embtoolkit-93f18582678c9520bfa7d92facf68a826a0f6ba9.tar.xz |
Packages: new fontconfig: add fontconfig as buildable package
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r-- | kconfig/packages.kconfig | 1 | ||||
-rw-r--r-- | mk/packages.mk | 7 | ||||
-rw-r--r-- | packages/graphics/fontconfig/fontconfig.kconfig | 44 | ||||
-rw-r--r-- | packages/graphics/fontconfig/fontconfig.mk | 94 |
4 files changed, 146 insertions, 0 deletions
diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig index 53b0f14..8639727 100644 --- a/kconfig/packages.kconfig +++ b/kconfig/packages.kconfig @@ -63,6 +63,7 @@ endmenu menu "Graphics packages" source packages/graphics/directfb/directfb.kconfig +source packages/graphics/fontconfig/fontconfig.kconfig source packages/graphics/freetype/freetype.kconfig source packages/graphics/libjpeg/libjpeg.kconfig source packages/graphics/libpng/libpng.kconfig diff --git a/mk/packages.mk b/mk/packages.mk index 582fefd..57314cc 100644 --- a/mk/packages.mk +++ b/mk/packages.mk @@ -75,6 +75,13 @@ ROOTFS_COMPONENTS += directfb_install endif ROOTFS_COMPONENTS_CLEAN += directfb_clean +#fontconfig +include $(EMBTK_ROOT)/packages/graphics/fontconfig/fontconfig.mk +ifeq ($(CONFIG_EMBTK_HAVE_FONTCONFIG),y) +ROOTFS_COMPONENTS += fontconfig_install +endif +ROOTFS_COMPONENTS_CLEAN += fontconfig_clean + #FreeType include $(EMBTK_ROOT)/packages/graphics/freetype/freetype.mk ifeq ($(CONFIG_EMBTK_HAVE_FREETYPE),y) diff --git a/packages/graphics/fontconfig/fontconfig.kconfig b/packages/graphics/fontconfig/fontconfig.kconfig new file mode 100644 index 0000000..f85e296 --- /dev/null +++ b/packages/graphics/fontconfig/fontconfig.kconfig @@ -0,0 +1,44 @@ +################################################################################ +# 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 fontconfig.kconfig +# \brief fontconfig.kconfig of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +config EMBTK_HAVE_FONTCONFIG + bool "Have fontconfig" + select EMBTK_HAVE_LIBXML2 + help + Fontconfig is a library for font customization and + configuration. +choice + prompt "fontconfig version you wish" + depends on EMBTK_HAVE_FONTCONFIG + help + Here you can choose which version of Pango you want to use. + + config EMBTK_FONTCONFIG_VERSION_2_8_0 + bool "fontconfig-2.8.0" +endchoice + +config EMBTK_FONTCONFIG_VERSION_STRING + string + default "2.8.0" if EMBTK_FONTCONFIG_VERSION_2_8_0 + diff --git a/packages/graphics/fontconfig/fontconfig.mk b/packages/graphics/fontconfig/fontconfig.mk new file mode 100644 index 0000000..4194e62 --- /dev/null +++ b/packages/graphics/fontconfig/fontconfig.mk @@ -0,0 +1,94 @@ +################################################################################ +# 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 fontconfig.mk +# \brief fontconfig.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +FONTCONFIG_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_FONTCONFIG_VERSION_STRING))) +FONTCONFIG_SITE := http://fontconfig.org/release +FONTCONFIG_PACKAGE := fontconfig-$(FONTCONFIG_VERSION).tar.gz +FONTCONFIG_BUILD_DIR := $(PACKAGES_BUILD)/fontconfig-$(FONTCONFIG_VERSION) + +FONTCONFIG_BINS = fc-cache fc-cat fc-list fc-match fc-query fc-scan +FONTCONFIG_SBINS = +FONTCONFIG_INCLUDES = fontconfig +FONTCONFIG_LIBS = libfontconfig* +FONTCONFIG_PKGCONFIGS = fontconfig.pc + +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) +LIBXML2_CFLAGS="-I$(SYSROOT)/usr/include/libxml2 -L$(SYSROOT)/usr/lib32" +else +LIBXML2_CFLAGS="-I$(SYSROOT)/usr/include/libxml2 -L$(SYSROOT)/usr/lib" +endif + +fontconfig_install: $(FONTCONFIG_BUILD_DIR)/.installed + +$(FONTCONFIG_BUILD_DIR)/.installed: libxml2_install download_fontconfig \ + $(FONTCONFIG_BUILD_DIR)/.decompressed \ + $(FONTCONFIG_BUILD_DIR)/.configured + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + fontconfig-$(FONTCONFIG_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(FONTCONFIG_BUILD_DIR) $(J) + $(Q)$(MAKE) -C $(FONTCONFIG_BUILD_DIR) DESTDIR=$(SYSROOT) install + $(Q)$(MAKE) libtool_files_adapt + $(Q)$(MAKE) pkgconfig_files_adapt + $(Q)mv $(SYSROOT)/usr/etc/fonts $(ROOTFS)/etc + @touch $@ + +download_fontconfig: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(FONTCONFIG_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(FONTCONFIG_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(FONTCONFIG_PACKAGE) \ + $(FONTCONFIG_SITE)/$(FONTCONFIG_PACKAGE) + +$(FONTCONFIG_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(FONTCONFIG_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xzvf $(DOWNLOAD_DIR)/$(FONTCONFIG_PACKAGE) + @touch $@ + +$(FONTCONFIG_BUILD_DIR)/.configured: + $(Q)cd $(FONTCONFIG_BUILD_DIR); \ + CC=$(TARGETCC_CACHED) CXX=$(TARGETCXX_CACHED) \ + CFLAGS="$(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) \ + LIBXML2_CFLAGS=$(LIBXML2_CFLAGS) \ + LIBXML2_LIBS="-lxml2" \ + ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ + --target=$(STRICT_GNU_TARGET) --with-arch=$(STRICT_GNU_TARGET) \ + --prefix=/usr --disable-docs + @touch $@ + +fontconfig_clean: + $(call EMBTK_GENERIC_MESSAGE,"cleanup fontconfig-$(FONTCONFIG_VERSION)...") + $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(FONTCONFIG_BINS) + $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(FONTCONFIG_SBINS) + $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(FONTCONFIG_INCLUDES) + $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(FONTCONFIG_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(FONTCONFIG_PKGCONFIGS) +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(FONTCONFIG_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(FONTCONFIG_PKGCONFIGS) +endif + |