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