lots of small package changes and dependency cleanups for the V= stuff
[openwrt.git] / package / freetype / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libfreetype
6 PKG_VERSION:=2.1.9
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=ec1b903e4be5f073caa72458ea58c29c
9
10 PKG_SOURCE_URL:=@SF/freetype
11 PKG_SOURCE:=freetype-$(PKG_VERSION).tar.bz2
12 PKG_CAT:=bzcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/freetype-$(PKG_VERSION)
15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
16
17 include $(TOPDIR)/package/rules.mk
18
19 $(eval $(call PKG_template,LIBFREETYPE,libfreetype,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
20
21 $(PKG_BUILD_DIR)/.configured:
22 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
23 CFLAGS="$(TARGET_CFLAGS)" \
24 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
25 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
26 $(TARGET_CONFIGURE_OPTS) \
27 ./configure \
28 --target=$(GNU_TARGET_NAME) \
29 --host=$(GNU_TARGET_NAME) \
30 --build=$(GNU_HOST_NAME) \
31 --program-prefix="" \
32 --program-suffix="" \
33 --prefix=/usr \
34 --exec-prefix=/usr \
35 --bindir=/usr/bin \
36 --sbindir=/usr/sbin \
37 --libexecdir=/usr/lib \
38 --sysconfdir=/etc \
39 --datadir=/usr/share \
40 --localstatedir=/var \
41 --mandir=/usr/man \
42 --infodir=/usr/info \
43 $(DISABLE_NLS) \
44 $(DISABLE_LARGEFILE) \
45 --enable-shared=yes \
46 --enable-static=yes \
47 --disable-rpath \
48 );
49 touch $@
50
51 $(PKG_BUILD_DIR)/.built:
52 rm -rf $(PKG_INSTALL_DIR)
53 mkdir -p $(PKG_INSTALL_DIR)
54 $(MAKE) -C $(PKG_BUILD_DIR) \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 all install
57 touch $@
58
59 $(IPKG_LIBFREETYPE):
60 install -d -m0755 $(IDIR_LIBFREETYPE)/usr/lib
61 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(IDIR_LIBFREETYPE)/usr/lib/
62 $(RSTRIP) $(IDIR_LIBFREETYPE)
63 $(IPKG_BUILD) $(IDIR_LIBFREETYPE) $(PACKAGE_DIR)
64
65 $(STAGING_DIR)/usr/lib/libfreetype.so: $(PKG_BUILD_DIR)/.built
66 mkdir -p $(STAGING_DIR)/usr/bin
67 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(STAGING_DIR)/usr/bin/
68 mkdir -p $(STAGING_DIR)/usr/include
69 cp -fpR $(PKG_INSTALL_DIR)/usr/include/freetype2 $(STAGING_DIR)/usr/include/
70 cp -fpR $(PKG_INSTALL_DIR)/usr/include/ft2build.h $(STAGING_DIR)/usr/include/
71 mkdir -p $(STAGING_DIR)/usr/lib
72 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(STAGING_DIR)/usr/lib/
73 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
74 cp -fpR $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(STAGING_DIR)/usr/lib/pkgconfig/
75 touch $@
76
77 install-dev: $(STAGING_DIR)/usr/lib/libfreetype.so
78
79 uninstall-dev:
80 rm -rf \
81 $(STAGING_DIR)/usr/bin/freetype-config \
82 $(STAGING_DIR)/usr/include/freetype2 \
83 $(STAGING_DIR)/usr/include/ft2build.h \
84 $(STAGING_DIR)/usr/lib/libfreetype.{a,so*} \
85 $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc \
86
87 compile-targets: install-dev
88 clean-targets: uninstall-dev
This page took 0.044317 seconds and 5 git commands to generate.