2005-04-26 08:26:14 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# freetype
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-01-14 04:52:21 +01:00
|
|
|
FREETYPE_VERSION:=2.2.1
|
2005-04-26 08:26:14 +02:00
|
|
|
FREETYPE_SOURCE:=freetype-$(FREETYPE_VERSION).tar.bz2
|
2005-06-09 14:15:00 +02:00
|
|
|
FREETYPE_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/freetype
|
2006-11-17 16:43:51 +01:00
|
|
|
FREETYPE_CAT:=$(BZCAT)
|
2005-04-26 08:26:14 +02:00
|
|
|
FREETYPE_DIR:=$(BUILD_DIR)/freetype-$(FREETYPE_VERSION)
|
2007-01-16 20:51:03 +01:00
|
|
|
FREETYPE_DIR1:=$(TOOL_BUILD_DIR)/freetype-$(FREETYPE_VERSION)
|
|
|
|
FREETYPE_HOST_DIR:=$(TOOL_BUILD_DIR)/freetype-$(FREETYPE_VERSION)-host
|
2005-04-26 08:26:14 +02:00
|
|
|
|
|
|
|
$(DL_DIR)/$(FREETYPE_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(FREETYPE_SITE)/$(FREETYPE_SOURCE)
|
|
|
|
|
|
|
|
$(FREETYPE_DIR)/.unpacked: $(DL_DIR)/$(FREETYPE_SOURCE)
|
|
|
|
$(FREETYPE_CAT) $(DL_DIR)/$(FREETYPE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(FREETYPE_DIR)/.unpacked
|
|
|
|
|
2007-01-16 20:51:03 +01:00
|
|
|
# freetype for the target
|
2005-04-26 08:26:14 +02:00
|
|
|
$(FREETYPE_DIR)/.configured: $(FREETYPE_DIR)/.unpacked
|
|
|
|
(cd $(FREETYPE_DIR); \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
./configure \
|
2007-01-14 04:52:21 +01:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
|
|
|
--libdir=/lib \
|
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-08-12 00:26:56 +02:00
|
|
|
--includedir=/usr/include \
|
2007-01-14 04:52:21 +01:00
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
|
|
|
);
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(FREETYPE_DIR)/.configured
|
2005-04-26 08:26:14 +02:00
|
|
|
|
|
|
|
$(FREETYPE_DIR)/.compiled: $(FREETYPE_DIR)/.configured
|
2007-01-14 04:52:21 +01:00
|
|
|
$(MAKE) CCexe="$(HOSTCC)" -C $(FREETYPE_DIR)
|
2005-04-26 08:26:14 +02:00
|
|
|
touch $(FREETYPE_DIR)/.compiled
|
|
|
|
|
2007-08-14 08:28:01 +02:00
|
|
|
$(STAGING_DIR)/usr/include/freetype:
|
|
|
|
ln -sf ./freetype2/freetype $(STAGING_DIR)/usr/include/freetype
|
|
|
|
|
|
|
|
$(STAGING_DIR)/include/freetype:
|
|
|
|
ln -sf ../usr/include/freetype2/freetype $(STAGING_DIR)/include/freetype
|
|
|
|
|
2007-01-11 00:54:35 +01:00
|
|
|
$(STAGING_DIR)/lib/libfreetype.so: $(FREETYPE_DIR)/.compiled
|
2007-01-14 04:52:21 +01:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(FREETYPE_DIR) install
|
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/lib\',g" $(STAGING_DIR)/lib/libfreetype.la
|
|
|
|
$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)\',g" \
|
|
|
|
-e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
|
2007-08-12 00:26:56 +02:00
|
|
|
-e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
|
2007-01-14 23:52:26 +01:00
|
|
|
-e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/lib\',g" \
|
2007-01-14 04:52:21 +01:00
|
|
|
$(STAGING_DIR)/usr/bin/freetype-config
|
2005-04-26 08:26:14 +02:00
|
|
|
touch -c $(STAGING_DIR)/lib/libfreetype.so
|
|
|
|
|
2007-01-11 00:54:35 +01:00
|
|
|
$(TARGET_DIR)/lib/libfreetype.so: $(STAGING_DIR)/lib/libfreetype.so
|
|
|
|
cp -dpf $(STAGING_DIR)/lib/libfreetype.so* $(TARGET_DIR)/lib/
|
|
|
|
-$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libfreetype.so
|
2005-04-26 08:26:14 +02:00
|
|
|
|
2007-01-16 20:51:03 +01:00
|
|
|
# freetype for the host, needed for build-tools of fontconfig
|
|
|
|
|
|
|
|
# great, it can't be built out of tree reliably
|
|
|
|
$(FREETYPE_DIR1)/.unpacked: $(DL_DIR)/$(FREETYPE_SOURCE)
|
|
|
|
$(FREETYPE_CAT) $(DL_DIR)/$(FREETYPE_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(FREETYPE_DIR1)/.unpacked
|
|
|
|
|
|
|
|
$(FREETYPE_DIR1)/.configured: $(FREETYPE_DIR1)/.unpacked
|
|
|
|
(cd $(FREETYPE_DIR1); \
|
|
|
|
./configure \
|
|
|
|
CC="$(HOSTCC)" \
|
|
|
|
--prefix="$(FREETYPE_HOST_DIR)" \
|
|
|
|
);
|
|
|
|
touch $(FREETYPE_DIR1)/.configured
|
|
|
|
|
|
|
|
$(FREETYPE_DIR1)/.compiled: $(FREETYPE_DIR1)/.configured
|
|
|
|
$(MAKE) CCexe="$(HOSTCC)" -C $(FREETYPE_DIR1)
|
|
|
|
touch $(FREETYPE_DIR1)/.compiled
|
|
|
|
|
|
|
|
$(FREETYPE_HOST_DIR)/lib/libfreetype.so: $(FREETYPE_DIR1)/.configured
|
|
|
|
$(MAKE) -C $(FREETYPE_DIR1) install
|
|
|
|
touch -c $@
|
|
|
|
|
2007-08-14 08:28:01 +02:00
|
|
|
.PHONY: freetype freetype-source freetype-links freetype-clean freetype-dirclean
|
2007-01-16 20:51:03 +01:00
|
|
|
|
2007-08-14 08:28:01 +02:00
|
|
|
freetype: uclibc pkgconfig $(TARGET_DIR)/lib/libfreetype.so freetype-links
|
|
|
|
|
|
|
|
freetype-source: $(DL_DIR)/$(FREETYPE_SOURCE)
|
|
|
|
|
|
|
|
freetype-links: $(STAGING_DIR)/usr/include/freetype $(STAGING_DIR)/include/freetype
|
2005-04-26 08:26:14 +02:00
|
|
|
|
|
|
|
freetype-clean:
|
|
|
|
$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FREETYPE_DIR) uninstall
|
|
|
|
-$(MAKE) -C $(FREETYPE_DIR) clean
|
|
|
|
|
|
|
|
freetype-dirclean:
|
|
|
|
rm -rf $(FREETYPE_DIR)
|
|
|
|
|
2007-08-14 08:28:01 +02:00
|
|
|
.PHONY: host-freetype
|
|
|
|
|
|
|
|
host-freetype: $(FREETYPE_HOST_DIR)/lib/libfreetype.so
|
|
|
|
|
2005-04-26 08:26:14 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_FREETYPE)),y)
|
|
|
|
TARGETS+=freetype
|
|
|
|
endif
|