summaryrefslogtreecommitdiff
path: root/packages/graphics/fontconfig/fontconfig.mk
blob: 8209fed99d8e9282909c84205772654c281b57e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
################################################################################
# Embtoolkit
# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that 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, see <http://www.gnu.org/licenses/>.
#
################################################################################
#
# \file         fontconfig.mk
# \brief	fontconfig.mk of Embtoolkit
# \author       Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date         December 2009
################################################################################

FONTCONFIG_NAME		:= fontconfig
FONTCONFIG_VERSION	:= $(call embtk_get_pkgversion,fontconfig)
FONTCONFIG_SITE		:= http://fontconfig.org/release
FONTCONFIG_PACKAGE	:= fontconfig-$(FONTCONFIG_VERSION).tar.gz
FONTCONFIG_SRC_DIR	:= $(embtk_pkgb)/fontconfig-$(FONTCONFIG_VERSION)
FONTCONFIG_BUILD_DIR	:= $(embtk_pkgb)/fontconfig-$(FONTCONFIG_VERSION)

FONTCONFIG_BINS		:= fc-cache fc-cat fc-list fc-match fc-query fc-scan
FONTCONFIG_INCLUDES	:= fontconfig
FONTCONFIG_LIBS		:= libfontconfig*
FONTCONFIG_PKGCONFIGS	:= fontconfig.pc

LIBXML2_CFLAGS-y	:= -I$(embtk_sysroot)/usr/include/libxml2
LIBXML2_LIBS-y		:= -L$(embtk_sysroot)/usr/$(LIBDIR) -lxml2

FREETYPE_CFLAGS-y	= $(call embtk_pkgconfig-cflags,freetype2)
FREETYPE_LIBS-y		= $(call embtk_pkgconfig-libs,freetype2)

FONTCONFIG_CONFIGURE_ENV	= LIBXML2_CFLAGS="$(LIBXML2_CFLAGS-y)"
FONTCONFIG_CONFIGURE_ENV	+= LIBXML2_CFLAGS="$(LIBXML2_LIBS-y)"
FONTCONFIG_CONFIGURE_ENV	+= FREETYPE_CFLAGS="$(FREETYPE_CFLAGS-y)"
FONTCONFIG_CONFIGURE_ENV	+= FREETYPE_LIBS="$(FREETYPE_LIBS-y)"

FONTCONFIG_CONFIGURE_OPTS	:= --with-arch=$(STRICT_GNU_TARGET)	\
				--disable-docs --program-prefix=""	\
				--with-freetype-config=true

FONTCONFIG_MAKE_OPTS		= LIBXML2_CFLAGS="$(LIBXML2_CFLAGS-y)"
FONTCONFIG_MAKE_OPTS		+= LIBXML2_LIBS="$(LIBXML2_LIBS-y)"
FONTCONFIG_MAKE_OPTS		+= FREETYPE_CFLAGS="$(FREETYPE_CFLAGS-y)"
FONTCONFIG_MAKE_OPTS		+= FREETYPE_LIBS="$(FREETYPE_LIBS-y)"

FONTCONFIG_DEPS			:= libxml2_install freetype_install

define embtk_postinstall_fontconfig
	$(Q)-cp -R $(embtk_sysroot)/usr/etc/fonts $(embtk_rootfs)/etc/
endef