added our own pkg-config wrapper, making the sed foo on *.pc files obselete 2/2
[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:=freetype
12 PKG_VERSION:=2.3.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=@SF/freetype
17 PKG_MD5SUM:=11e1186ca5520c5a284fa0a03f652035
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libfreetype
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=+zlib
25 TITLE:=A free, high-quality and portable font engine
26 URL:=http://www.freetype.org/
27 endef
28
29 define Package/libfreetype/description
30 The FreeType project is a team of volunteers who develop free,
31 portable and high-quality software solutions for digital typography.
32 They specifically target embedded systems and focus on bringing small,
33 efficient and ubiquitous products.
34 endef
35
36 CONFIGURE_ARGS += \
37 --enable-shared \
38 --enable-static \
39
40 define Build/Configure
41 $(call Build/Configure/Default)
42 $(call libtool_disable_rpath)
43 endef
44
45 define Build/Compile
46 $(MAKE) -C $(PKG_BUILD_DIR) all
47 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
48 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
49 endef
50
51 define Build/InstallDev
52 mkdir -p $(STAGING_DIR)/usr/bin
53 $(CP) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(STAGING_DIR)/usr/bin/
54 mkdir -p $(STAGING_DIR)/usr/include
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(STAGING_DIR)/usr/include/
56 $(CP) $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(STAGING_DIR)/usr/include/
57 mkdir -p $(STAGING_DIR)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(STAGING_DIR)/usr/lib/
59 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(STAGING_DIR)/usr/lib/pkgconfig/
61 $(SED) 's,-I$$$$includedir/freetype2,-I$(STAGING_DIR)/usr/include/freetype2,g' $(STAGING_DIR)/usr/bin/freetype-config
62 $(SED) 's,/usr/include/freetype2/,$(STAGING_DIR)/usr/include/freetype2/,g' $(STAGING_DIR)/usr/bin/freetype-config
63 endef
64
65 define Build/UninstallDev
66 rm -rf $(STAGING_DIR)/usr/bin/freetype-config \
67 $(STAGING_DIR)/usr/include/freetype2 \
68 $(STAGING_DIR)/usr/include/ft2build.h \
69 $(STAGING_DIR)/usr/lib/libfreetype.{a,so*} \
70 $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc
71 endef
72
73 define Package/libfreetype/install
74 $(INSTALL_DIR) $(1)/usr/lib
75 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
76 endef
77
78 $(eval $(call BuildPackage,libfreetype))