2006-07-22 22:29:01 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libpng
|
2008-06-20 13:18:33 +00:00
|
|
|
PKG_VERSION:=1.2.29
|
2006-07-22 22:29:01 +00:00
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
2008-06-20 13:18:33 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
2006-07-22 22:29:01 +00:00
|
|
|
PKG_SOURCE_URL:=@SF/libpng
|
2008-06-20 13:18:33 +00:00
|
|
|
PKG_MD5SUM:=f588cb4ee39e3a333604096f937ea157
|
2006-07-22 22:29:01 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libpng
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
DEPENDS:=+zlib
|
|
|
|
TITLE:=A PNG format files handling library
|
|
|
|
URL:=http://www.libpng.org/pub/png/libpng.html
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2006-10-28 22:43:08 +00:00
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--with-zlib="$(STAGING_DIR)/usr" \
|
|
|
|
)
|
2006-07-22 22:29:01 +00:00
|
|
|
endef
|
|
|
|
|
2008-08-06 22:43:15 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
2006-07-22 22:29:01 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2007-12-23 01:27:48 +00:00
|
|
|
mkdir -p $(2)/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/libpng{,12}-config $(2)/bin/
|
2007-10-07 03:20:26 +00:00
|
|
|
mkdir -p $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/png{,conf}.h $(1)/usr/include/
|
2008-06-20 13:18:33 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpng12 $(1)/usr/include/
|
2007-10-07 03:20:26 +00:00
|
|
|
mkdir -p $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.{a,so*} $(1)/usr/lib/
|
|
|
|
mkdir -p $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpng{,12}.pc $(1)/usr/lib/pkgconfig/
|
2007-12-23 01:27:48 +00:00
|
|
|
$(SED) 's,^[ILR]_opts=".\+",,g' $(2)/bin/libpng*-config
|
2006-07-22 22:29:01 +00:00
|
|
|
endef
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
define Package/libpng/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-28 22:43:08 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpng{,12}.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
2006-07-22 22:29:01 +00:00
|
|
|
$(eval $(call BuildPackage,libpng))
|