2007-01-14 04:39:53 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# fontconfig
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
FONTCONFIG_VERSION:=2.4.2
|
|
|
|
FONTCONFIG_SOURCE:=fontconfig-$(FONTCONFIG_VERSION).tar.gz
|
|
|
|
FONTCONFIG_SITE:=http://fontconfig.org/release
|
|
|
|
FONTCONFIG_CAT:=$(ZCAT)
|
|
|
|
FONTCONFIG_DIR:=$(BUILD_DIR)/fontconfig-$(FONTCONFIG_VERSION)
|
|
|
|
|
|
|
|
$(DL_DIR)/$(FONTCONFIG_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(FONTCONFIG_SITE)/$(FONTCONFIG_SOURCE)
|
|
|
|
|
|
|
|
fontconfig-source: $(DL_DIR)/$(FONTCONFIG_SOURCE)
|
|
|
|
|
|
|
|
$(FONTCONFIG_DIR)/.unpacked: $(DL_DIR)/$(FONTCONFIG_SOURCE)
|
|
|
|
$(FONTCONFIG_CAT) $(DL_DIR)/$(FONTCONFIG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-01-15 22:26:43 +01:00
|
|
|
toolchain/patch-kernel.sh $(FONTCONFIG_DIR) package/fontconfig/ \*.patch*
|
2007-05-22 12:31:25 +02:00
|
|
|
# use freetype-host for host tools
|
|
|
|
FREETYPE_CFLAGS="$(shell $(FREETYPE_HOST_DIR)/bin/freetype-config --cflags)"; \
|
|
|
|
FREETYPE_LIBS="$(shell $(FREETYPE_HOST_DIR)/bin/freetype-config --libs)"; \
|
|
|
|
for dir in fc-case fc-glyphname fc-lang fc-arch; \
|
|
|
|
do \
|
|
|
|
$(SED) "s~^FREETYPE_CFLAGS =.*~FREETYPE_CFLAGS = $$FREETYPE_CFLAGS~" \
|
|
|
|
-e "s~^FREETYPE_LIBS =.*~FREETYPE_LIBS = $$FREETYPE_LIBS~" \
|
|
|
|
$(FONTCONFIG_DIR)/$$dir/Makefile.in; \
|
|
|
|
done
|
2007-01-15 22:26:43 +01:00
|
|
|
$(CONFIG_UPDATE) $(FONTCONFIG_DIR)
|
2007-06-28 16:03:04 +02:00
|
|
|
touch $@
|
2007-01-14 04:39:53 +01:00
|
|
|
|
|
|
|
$(FONTCONFIG_DIR)/.configured: $(FONTCONFIG_DIR)/.unpacked
|
2007-08-22 11:56:41 +02:00
|
|
|
(cd $(FONTCONFIG_DIR); rm -rf config.cache; \
|
2007-06-28 16:03:04 +02:00
|
|
|
$(AUTORECONF) && \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-06-28 16:03:04 +02:00
|
|
|
CFLAGS_FOR_BUILD="-I$(FREETYPE_HOST_DIR)/include/freetype2 -I$(FREETYPE_HOST_DIR)/include" \
|
|
|
|
./configure \
|
2007-01-14 04:39:53 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--with-arch=$(GNU_TARGET_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-06-28 16:03:04 +02:00
|
|
|
--libdir=/usr/lib \
|
2007-01-14 04:39:53 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-06-28 16:03:04 +02:00
|
|
|
--includedir=/usr/include \
|
2007-01-14 04:39:53 +01:00
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2007-01-16 17:06:45 +01:00
|
|
|
--with-freetype-config="$(STAGING_DIR)/usr/bin/freetype-config" \
|
2007-08-12 14:05:55 +02:00
|
|
|
--with-expat="$(STAGING_DIR)/usr/lib" \
|
|
|
|
--with-expat-lib=$(STAGING_DIR)/usr/lib \
|
|
|
|
--with-expat-includes=$(STAGING_DIR)/usr/include \
|
2007-01-16 17:06:45 +01:00
|
|
|
--disable-docs \
|
2007-06-28 16:03:04 +02:00
|
|
|
)
|
|
|
|
touch $@
|
2007-01-14 04:39:53 +01:00
|
|
|
|
|
|
|
$(FONTCONFIG_DIR)/.compiled: $(FONTCONFIG_DIR)/.configured
|
2007-01-29 13:59:17 +01:00
|
|
|
$(MAKE) -C $(FONTCONFIG_DIR)
|
2007-06-28 16:03:04 +02:00
|
|
|
touch $@
|
2007-01-14 04:39:53 +01:00
|
|
|
|
2007-06-28 16:03:04 +02:00
|
|
|
$(STAGING_DIR)/usr/lib/libfontconfig.so: $(FONTCONFIG_DIR)/.compiled
|
2007-01-14 04:39:53 +01:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(FONTCONFIG_DIR) install
|
2007-06-28 16:03:04 +02:00
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libfontconfig.la
|
|
|
|
touch -c $@
|
2007-01-14 04:39:53 +01:00
|
|
|
|
2007-06-28 16:03:04 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/libfontconfig.so: $(STAGING_DIR)/usr/lib/libfontconfig.so
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libfontconfig.so* $(TARGET_DIR)/usr/lib/
|
2007-01-15 22:26:43 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/fonts
|
|
|
|
cp $(STAGING_DIR)/etc/fonts/fonts.conf $(TARGET_DIR)/etc/fonts/
|
2007-10-01 18:15:31 +02:00
|
|
|
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libfontconfig.so
|
2007-01-16 09:10:27 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/var/cache/fontconfig
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/bin
|
|
|
|
cp -a $(STAGING_DIR)/usr/bin/fc-cache $(TARGET_DIR)/usr/bin/
|
2007-10-01 18:15:31 +02:00
|
|
|
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/fc-cache
|
2007-01-16 09:10:27 +01:00
|
|
|
cp -a $(STAGING_DIR)/usr/bin/fc-list $(TARGET_DIR)/usr/bin/
|
2007-10-01 18:15:31 +02:00
|
|
|
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/bin/fc-list
|
2007-06-28 16:03:04 +02:00
|
|
|
touch -c $@
|
2007-01-14 04:39:53 +01:00
|
|
|
|
2007-06-28 16:03:04 +02:00
|
|
|
fontconfig: uclibc freetype host-freetype expat $(TARGET_DIR)/usr/lib/libfontconfig.so
|
2007-01-14 04:39:53 +01:00
|
|
|
|
|
|
|
fontconfig-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FONTCONFIG_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(FONTCONFIG_DIR) clean
|
|
|
|
|
|
|
|
fontconfig-dirclean:
|
|
|
|
rm -rf $(FONTCONFIG_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_FONTCONFIG)),y)
|
|
|
|
TARGETS+=fontconfig
|
|
|
|
endif
|