summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2010-01-03 14:30:14 +0100
committerAbdoulaye Walsimou Gaye <walsimou@walsimou.com>2010-01-03 14:32:18 +0100
commit9854687f11588743efa5c3628be10ed4af7ee3a3 (patch)
tree5e1d2cc37552dc15df9435873116ce8a7d8a81c8
parentcea10346cac83b54112a591d8480a07964d86bc7 (diff)
downloadembtoolkit-9854687f11588743efa5c3628be10ed4af7ee3a3.tar.gz
embtoolkit-9854687f11588743efa5c3628be10ed4af7ee3a3.tar.bz2
embtoolkit-9854687f11588743efa5c3628be10ed4af7ee3a3.tar.xz
Packages: New freefont: Add installation of GNU freefont on target
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r--kconfig/packages.kconfig3
-rw-r--r--mk/packages.mk7
-rw-r--r--packages/graphics/freefont/freefont.kconfig74
-rw-r--r--packages/graphics/freefont/freefont.mk92
4 files changed, 176 insertions, 0 deletions
diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig
index beda425..5324650 100644
--- a/kconfig/packages.kconfig
+++ b/kconfig/packages.kconfig
@@ -72,6 +72,9 @@ source packages/graphics/libjpeg/libjpeg.kconfig
source packages/graphics/libpng/libpng.kconfig
source packages/graphics/pixman/pixman.kconfig
source packages/graphics/libtiff/libtiff.kconfig
+
+comment "Include fonts in the target root filesystem"
+source packages/graphics/freefont/freefont.kconfig
endmenu
menu "Networking packages"
diff --git a/mk/packages.mk b/mk/packages.mk
index ee99bf7..d396d31 100644
--- a/mk/packages.mk
+++ b/mk/packages.mk
@@ -96,6 +96,13 @@ ROOTFS_COMPONENTS += fontconfig_install
endif
ROOTFS_COMPONENTS_CLEAN += fontconfig_clean
+#FreeFont
+include $(EMBTK_ROOT)/packages/graphics/freefont/freefont.mk
+ifeq ($(CONFIG_EMBTK_HAVE_FREEFONT_TTF),y)
+ROOTFS_COMPONENTS += freefont_ttf_install
+endif
+ROOTFS_COMPONENTS_CLEAN += ttmkfdir_clean
+
#FreeType
include $(EMBTK_ROOT)/packages/graphics/freetype/freetype.mk
ifeq ($(CONFIG_EMBTK_HAVE_FREETYPE),y)
diff --git a/packages/graphics/freefont/freefont.kconfig b/packages/graphics/freefont/freefont.kconfig
new file mode 100644
index 0000000..ab900ea
--- /dev/null
+++ b/packages/graphics/freefont/freefont.kconfig
@@ -0,0 +1,74 @@
+################################################################################
+# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# Copyright(C) 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
+# (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 freefont.kconfig
+# \brief freefont.kconfig of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date January 2010
+################################################################################
+
+#####################
+#FreeFont: TrueType #
+#####################
+config EMBTK_HAVE_FREEFONT_TTF
+ bool "Have GNU FreeFont: TrueType format"
+ select EMBTK_HAVE_FREETYPE
+ help
+ GNU FreeFont is a free family of scalable outline fonts,
+ suitable for general use on computers and for desktop
+ publishing. It is Unicode-encoded for compatability with all
+ modern operating systems.
+choice
+ prompt "FreeFont version you wish: TrueType format"
+ depends on EMBTK_HAVE_FREEFONT_TTF
+ help
+ Here you can choose which version of FreeFont you want to use.
+
+ config EMBTK_FREEFONT_TTF_VERSION_20090104
+ bool "freefont-ttf-20090104"
+endchoice
+
+config EMBTK_FREEFONT_TTF_VERSION_STRING
+ string
+ default "20090104" if EMBTK_FREEFONT_TTF_VERSION_20090104
+
+#####################
+#FreeFont: OpenType #
+#####################
+#config EMBTK_HAVE_FREEFONT_OTF
+# bool "Have GNU FreeFont: OpenType format"
+# select EMBTK_HAVE_FREETYPE
+# help
+# GNU FreeFont is a free family of scalable outline fonts,
+# suitable for general use on computers and for desktop
+# publishing. It is Unicode-encoded for compatability with all
+# modern operating systems.
+#choice
+# prompt "FreeFont version you wish: OpenType format"
+# depends on EMBTK_HAVE_FREEFONT_OTF
+# help
+# Here you can choose which version of FreeFont you want to use.
+#
+# config EMBTK_FREEFONT_OTF_VERSION_20090104
+# bool "freefont-otf-20090104"
+#endchoice
+#
+#config EMBTK_FREEFONT_OTF_VERSION_STRING
+# string
+# default "20090104" if EMBTK_FREEFONT_TTF_VERSION_20090104
+
diff --git a/packages/graphics/freefont/freefont.mk b/packages/graphics/freefont/freefont.mk
new file mode 100644
index 0000000..60312e9
--- /dev/null
+++ b/packages/graphics/freefont/freefont.mk
@@ -0,0 +1,92 @@
+################################################################################
+# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# Copyright(C) 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
+# (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 freefont.mk
+# \brief freefont.mk of Embtoolkit
+# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com>
+# \date January 2010
+################################################################################
+
+TTMKFDIR_SITE := http://ftp.de.debian.org/debian/pool/main/t/ttmkfdir
+TTMKFDIR_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/ttmkfdir
+TTMKFDIR_VERSION := 3.0.9
+TTMKFDIR_PACKAGE := ttmkfdir_$(TTMKFDIR_VERSION).orig.tar.gz
+TTMKFDIR_BUILD_DIR := $(PACKAGES_BUILD)/ttmkfdir-$(TTMKFDIR_VERSION)
+
+FREEFONT_SITE := http://ftp.gnu.org/gnu/freefont
+FREEFONT_TTF_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_FREEFONT_TTF_VERSION_STRING)))
+FREEFONT_TTF_PACKAGE := freefont-ttf-$(FREEFONT_TTF_VERSION).tar.gz
+FREEFONT_TTF_BUILD_DIR := $(PACKAGES_BUILD)/freefont-$(FREEFONT_TTF_VERSION)
+
+FREEFONT_OTF_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_FREEFONT_OTF_VERSION_STRING)))
+FREEFONT_OTF_PACKAGE := freefont-otf-$(FREEFONT_OTF_VERSION).zip
+FREEFONT_OTF_BUILD_DIR := $(PACKAGES_BUILD)/freefont-otf-$(FREEFONT_OTF_VERSION)
+
+freefont_ttf_install: $(FREEFONT_TTF_BUILD_DIR)/.installed
+ttmkfdir_install: $(TTMKFDIR_BUILD_DIR)/.installed
+
+$(TTMKFDIR_BUILD_DIR)/.installed: download_ttmkfdir \
+ $(TTMKFDIR_BUILD_DIR)/.decompressed
+ $(Q)$(MAKE) -C $(TTMKFDIR_BUILD_DIR) CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) DEBUG=""
+ $(Q)$(MAKE) -C $(TTMKFDIR_BUILD_DIR) DESTDIR=$(SYSROOT) install
+ @touch $@
+
+$(TTMKFDIR_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(TTMKFDIR_PACKAGE)...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(TTMKFDIR_PACKAGE)
+ $(Q)cd $(TTMKFDIR_BUILD_DIR); \
+ patch -p1 < $(DOWNLOAD_DIR)/ttmkfdir-$(TTMKFDIR_VERSION).patch
+ @touch $@
+
+ttmkfdir_clean:
+ $(Q)rm -rf $(SYSROOT)/usr/bin/ttmkfdir
+
+download_ttmkfdir:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading ttmkfdir-$(TTMKFDIR_VERSION) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(TTMKFDIR_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(TTMKFDIR_PACKAGE) \
+ $(TTMKFDIR_SITE)/$(TTMKFDIR_PACKAGE)
+ @test -e $(DOWNLOAD_DIR)/ttmkfdir-$(TTMKFDIR_VERSION).patch || \
+ wget -O $(DOWNLOAD_DIR)/ttmkfdir-$(TTMKFDIR_VERSION).patch \
+ $(TTMKFDIR_PATCH_SITE)/ttmkfdir-$(TTMKFDIR_VERSION)-*.patch
+
+$(FREEFONT_TTF_BUILD_DIR)/.installed: freetype_install ttmkfdir_install \
+ download_freefont_ttf $(FREEFONT_TTF_BUILD_DIR)/.decompressed
+ $(call EMBTK_GENERIC_MESSAGE,"Installing \
+ freefont-$(FREEFONT_TTF_VERSION) in your root filesystem...")
+ $(Q)mkdir -p $(ROOTFS)/usr/share/fonts
+ $(Q)mkdir -p $(ROOTFS)/usr/share/fonts/trutype
+ $(Q)mkdir -p $(ROOTFS)/usr/share/fonts/trutype/freefont
+ $(Q)cp $(FREEFONT_TTF_BUILD_DIR)/*.ttf \
+ $(ROOTFS)/usr/share/fonts/trutype/freefont/
+ @touch $@
+
+download_freefont_ttf:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(FREEFONT_TTF_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(FREEFONT_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(FREEFONT_PACKAGE) \
+ $(FREEFONT_SITE)/$(FREEFONT_PACKAGE)
+
+$(FREEFONT_TTF_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(FREEFONT_TTF_PACKAGE)...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(FREEFONT_TTF_PACKAGE)
+ @touch $@
+