Add a patch for libpng's pkgconfig install
[openwrt.git] / openwrt / package / libpng / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=libpng
6 PKG_VERSION:=1.2.8
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=e5a39003eed16103cbbd3b6a8bc6b1f9
9
10 PKG_SOURCE_URL:=@SF/libpng
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-config.tar.gz
12 PKG_CAT:=zcat
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-config
15
16 include $(TOPDIR)/package/rules.mk
17
18 $(eval $(call PKG_template,LIBPNG,libpng,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
19
20 $(PKG_BUILD_DIR)/.configured:
21 (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
22 $(TARGET_CONFIGURE_OPTS) \
23 CFLAGS="$(TARGET_CFLAGS)" \
24 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
25 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
26 ./configure \
27 --target=$(GNU_TARGET_NAME) \
28 --host=$(GNU_TARGET_NAME) \
29 --build=$(GNU_HOST_NAME) \
30 --prefix=$(STAGING_DIR)/usr \
31 --with-zlib=$(STAGING_DIR)/usr/ \
32 --enable-shared \
33 --enable-static \
34 --with-zlib=$(STAGING_DIR)/usr/ \
35 $(DISABLE_NLS) \
36 $(DISABLE_LARGEFILE) \
37 )
38 touch $(PKG_BUILD_DIR)/.configured
39
40 $(PKG_BUILD_DIR)/.built:
41 $(MAKE) -C $(PKG_BUILD_DIR) all
42
43 $(IPKG_LIBPNG):
44 install -d -m0755 $(IDIR_LIBPNG)/usr/lib
45 cp -fpR $(PKG_BUILD_DIR)/.libs/libpng{,12}.so.* $(IDIR_LIBPNG)/usr/lib/
46 $(RSTRIP) $(IDIR_LIBPNG)
47 $(IPKG_BUILD) $(IDIR_LIBPNG) $(PACKAGE_DIR)
48
49 $(STAGING_DIR)/usr/lib/libpng.so: $(PKG_BUILD_DIR)/.built
50 $(MAKE) -C $(PKG_BUILD_DIR) all
51
52 install-dev: $(STAGING_DIR)/usr/lib/libpng.so
53
54 uninstall-dev:
55 rm -rf \
56 $(STAGING_DIR)/usr/bin/libpng{,12}-config \
57 $(STAGING_DIR)/usr/include/png{,conf}.h \
58 $(STAGING_DIR)/usr/include/libpng \
59 $(STAGING_DIR)/usr/lib/libpng{,12}.{a,so*} \
60 $(STAGING_DIR)/usr/lib/pkgconfig/libpng{,12}.pc
61
62 compile: install-dev
63 clean: uninstall-dev
64
This page took 0.038188 seconds and 5 git commands to generate.