Fix compilation when modules are selected or not, should fix buildbot spam :p
[openwrt/svn-archive/archive.git] / libs / freetype / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libfreetype
12 PKG_VERSION:=2.3.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=freetype-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/freetype
17 PKG_MD5SUM:=11e1186ca5520c5a284fa0a03f652035
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/freetype-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libfreetype
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+zlib
29 TITLE:=A free, high-quality and portable font engine
30 DESCRIPTION:=\
31 The FreeType project is a team of volunteers who develop free, \\\
32 portable and high-quality software solutions for digital typography.\\\
33 They specifically target embedded systems and focus on bringing small, \\\
34 efficient and ubiquitous products.
35 URL:=http://www.freetype.org/
36 endef
37
38 define Build/Configure
39 $(call Build/Configure/Default, \
40 --enable-shared \
41 --enable-static \
42 )
43 $(SED) 's|^sys_lib_dlsearch_path_spec=.*|sys_lib_dlsearch_path_spec="$(STAGING_DIR)/usr/lib $(STAGING_DIR)/lib"|g' \
44 $(PKG_BUILD_DIR)/builds/unix/libtool
45 endef
46
47 define Build/Compile
48 $(MAKE) -C $(PKG_BUILD_DIR) \
49 DESTDIR="$(PKG_INSTALL_DIR)" \
50 all install
51 endef
52
53 define Build/InstallDev
54 mkdir -p $(STAGING_DIR)/usr/bin
55 $(CP) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(STAGING_DIR)/usr/bin/
56 mkdir -p $(STAGING_DIR)/usr/include
57 $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(STAGING_DIR)/usr/include/
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(STAGING_DIR)/usr/include/
59 mkdir -p $(STAGING_DIR)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(STAGING_DIR)/usr/lib/
61 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(STAGING_DIR)/usr/lib/pkgconfig/
63 $(SED) 's,-I$$$${includedir}/freetype2,,g' $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc
64 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc
65 endef
66
67 define Build/UninstallDev
68 rm -rf \
69 $(STAGING_DIR)/usr/bin/freetype-config \
70 $(STAGING_DIR)/usr/include/freetype2 \
71 $(STAGING_DIR)/usr/include/ft2build.h \
72 $(STAGING_DIR)/usr/lib/libfreetype.{a,so*} \
73 $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc
74 endef
75
76 define Package/libfreetype/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
79 endef
80
81 $(eval $(call BuildPackage,libfreetype))