blob: 81181cc8b4fa251eb8714856cd18a3c3f655491a (
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
63
64
65
66
67
68
|
#############################################################
#
# fontconfig
#
#############################################################
FONTCONFIG_VERSION = 2.6.0
FONTCONFIG_SOURCE = fontconfig-$(FONTCONFIG_VERSION).tar.gz
FONTCONFIG_SITE = http://fontconfig.org/release
FONTCONFIG_AUTORECONF = YES
FONTCONFIG_USE_CONFIG_CACHE = NO
FONTCONFIG_INSTALL_STAGING = YES
FONTCONFIG_INSTALL_TARGET = YES
# This package does not like using the target cflags for some reason.
FONTCONFIG_CONF_ENV = CFLAGS="-I$(STAGING_DIR)/usr/include/freetype2"
FONTCONFIG_CONF_OPT = --with-arch=$(GNU_TARGET_NAME) \
--with-freetype-config="$(STAGING_DIR)/usr/bin/freetype-config" \
--with-cache-dir=/var/cache/fontconfig \
--with-expat="$(STAGING_DIR)/usr/lib" \
--with-expat-lib=$(STAGING_DIR)/usr/lib \
--with-expat-includes=$(STAGING_DIR)/usr/include \
--disable-docs
FONTCONFIG_DEPENDENCIES = uclibc freetype expat
$(eval $(call AUTOTARGETS,package,fontconfig))
# fontconfig for the host
FONTCONFIG_HOST_DIR:=$(BUILD_DIR)/fontconfig-$(FONTCONFIG_VERSION)-host
FONTCONFIG_HOST_BINARY:=$(HOST_DIR)/usr/bin/fc-cache
$(FONTCONFIG_HOST_DIR)/.unpacked: $(DL_DIR)/$(FONTCONFIG_SOURCE)
mkdir -p $(@D)
$(INFLATE$(suffix $(FONTCONFIG_SOURCE))) $< | \
$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
touch $@
$(FONTCONFIG_HOST_DIR)/.configured: $(FONTCONFIG_HOST_DIR)/.unpacked $(FREETYPE_HOST_BINARY) $(EXPAT_HOST_BINARY)
(cd $(@D); rm -rf config.cache; \
$(HOST_CONFIGURE_OPTS) \
CFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
$(@D)/configure \
--prefix=$(HOST_DIR)/usr \
--sysconfdir=$(HOST_DIR)/etc \
--disable-docs \
--disable-static \
)
touch $@
$(FONTCONFIG_HOST_DIR)/.compiled: $(FONTCONFIG_HOST_DIR)/.configured
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
touch $@
$(FONTCONFIG_HOST_BINARY): $(FONTCONFIG_HOST_DIR)/.compiled
$(HOST_MAKE_ENV) $(MAKE) -C $(<D) install
host-fontconfig: $(FONTCONFIG_HOST_BINARY)
host-fontconfig-source: fontconfig-source
host-fontconfig-clean:
rm -f $(addprefix $(FONTCONFIG_HOST_DIR)/,.unpacked .configured .compiled)
-$(MAKE) -C $(FONTCONFIG_HOST_DIR) uninstall
-$(MAKE) -C $(FONTCONFIG_HOST_DIR) clean
host-fontconfig-dirclean:
rm -rf $(FONTCONFIG_HOST_DIR)
|