Merge pull request #5211 from dibdot/adblock
[feed/packages.git] / libs / freetype / Makefile
1 #
2 # Copyright (C) 2006-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=freetype
11 PKG_VERSION:=2.8.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/freetype
16 PKG_HASH:=e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78
17
18 PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB
19 PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h
20 PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
21
22 PKG_FIXUP:=autoreconf
23 PKG_LIBTOOL_PATHS:=builds/unix
24
25 include $(INCLUDE_DIR)/host-build.mk
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libfreetype
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=A free, high-quality and portable font engine
32 URL:=http://www.freetype.org/
33 DEPENDS:=+zlib +libbz2 +libpng
34 endef
35
36 define Package/libfreetype/description
37 The FreeType project is a team of volunteers who develop free,
38 portable and high-quality software solutions for digital typography.
39 They specifically target embedded systems and focus on bringing small,
40 efficient and ubiquitous products.
41 endef
42
43 TARGET_CFLAGS += $(FPIC)
44
45 CONFIGURE_ARGS += \
46 --enable-shared \
47 --enable-static \
48 --with-bzip2=yes \
49 --with-zlib=yes \
50 --with-png=yes
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
54 endef
55
56 define Build/InstallDev
57 $(INSTALL_DIR) $(1)/bin
58 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(1)/bin/
59 $(INSTALL_DIR) $(2)/bin
60 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/
65 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/
67
68 $(SED) \
69 's,/usr/include,$$$${prefix}/include,g; \
70 s,/usr/lib,$$$${exec_prefix}/lib,g' \
71 $(1)/usr/lib/pkgconfig/freetype2.pc
72 endef
73
74
75 define Package/libfreetype/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call HostBuild))
81 $(eval $(call BuildPackage,libfreetype))