2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2005-04-26 08:26:14 +02:00
|
|
|
#
|
|
|
|
# freetype
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-10-21 14:19:59 +02:00
|
|
|
|
2016-07-06 10:20:10 +02:00
|
|
|
FREETYPE_VERSION = 2.6.4
|
2008-10-09 14:50:56 +02:00
|
|
|
FREETYPE_SOURCE = freetype-$(FREETYPE_VERSION).tar.bz2
|
2013-12-05 15:04:47 +01:00
|
|
|
FREETYPE_SITE = http://downloads.sourceforge.net/project/freetype/freetype2/$(FREETYPE_VERSION)
|
2008-10-09 14:50:56 +02:00
|
|
|
FREETYPE_INSTALL_STAGING = YES
|
2014-09-27 21:32:38 +02:00
|
|
|
FREETYPE_MAKE_OPTS = CCexe="$(HOSTCC)"
|
2012-12-27 06:39:10 +01:00
|
|
|
FREETYPE_LICENSE = Dual FTL/GPLv2+
|
2012-12-28 01:34:17 +01:00
|
|
|
FREETYPE_LICENSE_FILES = docs/FTL.TXT docs/GPLv2.TXT
|
2013-10-27 00:44:54 +02:00
|
|
|
FREETYPE_DEPENDENCIES = host-pkgconf
|
2013-02-07 13:35:06 +01:00
|
|
|
FREETYPE_CONFIG_SCRIPTS = freetype-config
|
2008-10-09 14:50:56 +02:00
|
|
|
|
2012-10-22 17:47:52 +02:00
|
|
|
HOST_FREETYPE_DEPENDENCIES = host-pkgconf
|
2014-09-27 21:32:44 +02:00
|
|
|
HOST_FREETYPE_CONF_OPTS = --without-zlib --without-bzip2 --without-png
|
2013-10-27 00:44:54 +02:00
|
|
|
|
2014-04-22 19:12:40 +02:00
|
|
|
# Regen required because the tarball ships with an experimental ltmain.sh
|
|
|
|
# that can't be patched by our infra.
|
|
|
|
# autogen.sh is because autotools stuff lives in other directories and
|
2014-09-27 21:32:50 +02:00
|
|
|
# even AUTORECONF with _OPTS doesn't do it properly.
|
2014-04-22 19:12:40 +02:00
|
|
|
# POST_PATCH is because we still need to patch libtool after the regen.
|
|
|
|
define FREETYPE_RUN_AUTOGEN
|
|
|
|
cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
|
|
|
|
endef
|
|
|
|
FREETYPE_POST_PATCH_HOOKS += FREETYPE_RUN_AUTOGEN
|
2014-04-23 03:10:21 +02:00
|
|
|
HOST_FREETYPE_POST_PATCH_HOOKS += FREETYPE_RUN_AUTOGEN
|
2014-04-22 19:12:40 +02:00
|
|
|
FREETYPE_DEPENDENCIES += host-automake host-autoconf host-libtool
|
|
|
|
HOST_FREETYPE_DEPENDENCIES += host-automake host-autoconf host-libtool
|
|
|
|
|
2013-10-27 00:44:54 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
FREETYPE_DEPENDENCIES += zlib
|
2014-09-27 21:32:44 +02:00
|
|
|
FREETYPE_CONF_OPTS += --with-zlib
|
2013-10-27 00:44:54 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FREETYPE_CONF_OPTS += --without-zlib
|
2013-10-27 00:44:54 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
|
|
|
FREETYPE_DEPENDENCIES += bzip2
|
2014-09-27 21:32:44 +02:00
|
|
|
FREETYPE_CONF_OPTS += --with-bzip2
|
2013-10-27 00:44:54 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FREETYPE_CONF_OPTS += --without-bzip2
|
2013-10-27 00:44:54 +02:00
|
|
|
endif
|
2009-11-03 00:10:08 +01:00
|
|
|
|
2013-10-25 13:34:38 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
|
|
|
FREETYPE_DEPENDENCIES += libpng
|
2014-09-27 21:32:44 +02:00
|
|
|
FREETYPE_CONF_OPTS += LIBPNG_CFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --cflags`" \
|
2013-10-25 13:34:38 +02:00
|
|
|
LIBPNG_LDFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --ldflags`"
|
2013-11-10 15:03:09 +01:00
|
|
|
FREETYPE_LIBPNG_LIBS = "`$(STAGING_DIR)/usr/bin/libpng-config --libs`"
|
2013-10-25 13:34:38 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
FREETYPE_CONF_OPTS += --without-png
|
2013-10-25 13:34:38 +02:00
|
|
|
endif
|
|
|
|
|
2013-06-13 15:00:23 +02:00
|
|
|
# Extra fixing since includedir and libdir are expanded from configure values
|
|
|
|
define FREETYPE_FIX_CONFIG_FILE
|
|
|
|
$(SED) 's:^includedir=.*:includedir="$${prefix}/include":' \
|
|
|
|
-e 's:^libdir=.*:libdir="$${exec_prefix}/lib":' \
|
|
|
|
$(STAGING_DIR)/usr/bin/freetype-config
|
|
|
|
endef
|
|
|
|
FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE
|
|
|
|
|
2013-11-10 15:03:09 +01:00
|
|
|
# libpng isn't included in freetype-config & freetype2.pc :-/
|
|
|
|
define FREETYPE_FIX_CONFIG_FILE_LIBS
|
|
|
|
$(SED) "s,^Libs.private:,& $(FREETYPE_LIBPNG_LIBS)," \
|
|
|
|
$(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc
|
|
|
|
$(SED) "s,-lfreetype,& $(FREETYPE_LIBPNG_LIBS)," \
|
|
|
|
$(STAGING_DIR)/usr/bin/freetype-config
|
|
|
|
endef
|
|
|
|
FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE_LIBS
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2012-07-03 00:06:54 +02:00
|
|
|
$(eval $(host-autotools-package))
|
2014-05-05 16:08:22 +02:00
|
|
|
|
2015-02-27 10:19:22 +01:00
|
|
|
# freetype-patch and host-freetype-patch use autogen.sh so add
|
|
|
|
# host-automake as a order-only-prerequisite because it is a phony
|
|
|
|
# target.
|
|
|
|
$(FREETYPE_TARGET_PATCH) $(HOST_FREETYPE_TARGET_PATCH): | host-automake
|