1 ################################################################################
5 ################################################################################
7 FREETYPE_VERSION
= 2.7.1
8 FREETYPE_SOURCE
= freetype-
$(FREETYPE_VERSION
).
tar.bz2
9 FREETYPE_SITE
= http
://download.savannah.gnu.org
/releases
/freetype
10 FREETYPE_INSTALL_STAGING
= YES
11 FREETYPE_MAKE_OPTS
= CCexe
="$(HOSTCC)"
12 FREETYPE_LICENSE
= Dual FTL
/GPLv2
+
13 FREETYPE_LICENSE_FILES
= docs
/FTL.TXT docs
/GPLv2.TXT
14 FREETYPE_DEPENDENCIES
= host-pkgconf
15 FREETYPE_CONFIG_SCRIPTS
= freetype-config
17 HOST_FREETYPE_DEPENDENCIES
= host-pkgconf
18 HOST_FREETYPE_CONF_OPTS
= --without-zlib
--without-bzip2
--without-png
20 # Regen required because the tarball ships with an experimental ltmain.sh
21 # that can't be patched by our infra.
22 # autogen.sh is because autotools stuff lives in other directories and
23 # even AUTORECONF with _OPTS doesn't do it properly.
24 # POST_PATCH is because we still need to patch libtool after the regen.
25 define FREETYPE_RUN_AUTOGEN
26 cd
$(@D
) && PATH
=$(BR_PATH
) .
/autogen.sh
28 FREETYPE_POST_PATCH_HOOKS
+= FREETYPE_RUN_AUTOGEN
29 HOST_FREETYPE_POST_PATCH_HOOKS
+= FREETYPE_RUN_AUTOGEN
30 FREETYPE_DEPENDENCIES
+= host-automake host-autoconf host-libtool
31 HOST_FREETYPE_DEPENDENCIES
+= host-automake host-autoconf host-libtool
33 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
34 FREETYPE_DEPENDENCIES
+= zlib
35 FREETYPE_CONF_OPTS
+= --with-zlib
37 FREETYPE_CONF_OPTS
+= --without-zlib
40 ifeq ($(BR2_PACKAGE_BZIP2
),y
)
41 FREETYPE_DEPENDENCIES
+= bzip2
42 FREETYPE_CONF_OPTS
+= --with-bzip2
44 FREETYPE_CONF_OPTS
+= --without-bzip2
47 ifeq ($(BR2_PACKAGE_LIBPNG
),y
)
48 FREETYPE_DEPENDENCIES
+= libpng
49 FREETYPE_CONF_OPTS
+= LIBPNG_CFLAGS
="`$(STAGING_DIR)/usr/bin/libpng-config --cflags`" \
50 LIBPNG_LDFLAGS
="`$(STAGING_DIR)/usr/bin/libpng-config --ldflags`"
51 FREETYPE_LIBPNG_LIBS
= "`$(STAGING_DIR)/usr/bin/libpng-config --libs`"
53 FREETYPE_CONF_OPTS
+= --without-png
56 # Extra fixing since includedir and libdir are expanded from configure values
57 define FREETYPE_FIX_CONFIG_FILE
58 $(SED
) 's:^includedir=.*:includedir="$${prefix}/include":' \
59 -e
's:^libdir=.*:libdir="$${exec_prefix}/lib":' \
60 $(STAGING_DIR
)/usr
/bin
/freetype-config
62 FREETYPE_POST_INSTALL_STAGING_HOOKS
+= FREETYPE_FIX_CONFIG_FILE
64 # libpng isn't included in freetype-config & freetype2.pc :-/
65 define FREETYPE_FIX_CONFIG_FILE_LIBS
66 $(SED
) "s,^Libs.private:,& $(FREETYPE_LIBPNG_LIBS)," \
67 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/freetype2.
pc
68 $(SED
) "s,-lfreetype,& $(FREETYPE_LIBPNG_LIBS)," \
69 $(STAGING_DIR
)/usr
/bin
/freetype-config
71 FREETYPE_POST_INSTALL_STAGING_HOOKS
+= FREETYPE_FIX_CONFIG_FILE_LIBS
73 $(eval
$(autotools-package
))
74 $(eval
$(host-autotools-package
))
76 # freetype-patch and host-freetype-patch use autogen.sh so add
77 # host-automake as a order-only-prerequisite because it is a phony
79 $(FREETYPE_TARGET_PATCH
) $(HOST_FREETYPE_TARGET_PATCH
): | host-automake