Branch oldpackages for 14.07
[14.07/packages.git] / libs / freetype / Makefile
1 #
2 # Copyright (C) 2006-2012 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.4.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/freetype
16 PKG_MD5SUM:=dbf2caca1d3afd410a29217a9809d397
17
18 PKG_LICENSE:=FTL GPLv2 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
21 PKG_FIXUP:=autoreconf
22 PKG_LIBTOOL_PATHS:=builds/unix
23
24 include $(INCLUDE_DIR)/host-build.mk
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/libfreetype
28   SECTION:=libs
29   CATEGORY:=Libraries
30   TITLE:=A free, high-quality and portable font engine
31   URL:=http://www.freetype.org/
32   DEPENDS:=+zlib +libbz2
33 endef
34
35 define Package/libfreetype/description
36  The FreeType project is a team of volunteers who develop free,
37  portable and high-quality software solutions for digital typography.
38  They specifically target embedded systems and focus on bringing small,
39  efficient and ubiquitous products.
40 endef
41
42 TARGET_CFLAGS += $(FPIC)
43
44 CONFIGURE_ARGS += \
45         --enable-shared \
46         --enable-static \
47
48 define Build/Compile
49         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
50 endef
51
52 define Build/InstallDev
53         $(INSTALL_DIR) $(2)/bin
54         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/
55         $(INSTALL_DIR) $(1)/usr/include
56         $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/
57         $(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(1)/usr/include/
58         $(INSTALL_DIR) $(1)/usr/lib
59         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/
60         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
61         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/
62
63         $(SED) \
64                 's,^\(prefix\|exec_prefix\)=.*,\1="$(STAGING_DIR)/usr",g' \
65                  $(2)/bin/freetype-config
66 endef
67
68
69 define Package/libfreetype/install
70         $(INSTALL_DIR) $(1)/usr/lib
71         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
72 endef
73
74 $(eval $(call HostBuild))
75 $(eval $(call BuildPackage,libfreetype))