2015-10-15 22:12:13 +00:00
|
|
|
#
|
2013-07-28 23:27:34 +00:00
|
|
|
# Copyright (C) 2006-2013 OpenWrt.org
|
2006-06-27 00:35:46 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
2005-03-21 08:12:49 +00:00
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
2005-04-14 06:11:36 +00:00
|
|
|
PKG_NAME:=zlib
|
2022-10-21 12:36:47 +00:00
|
|
|
PKG_VERSION:=1.2.13
|
2023-05-17 13:08:40 +00:00
|
|
|
PKG_RELEASE:=1
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2022-10-21 12:36:47 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
|
|
|
PKG_SOURCE_URL:=https://github.com/madler/zlib/releases/download/v$(PKG_VERSION)
|
|
|
|
PKG_HASH:=d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=Zlib
|
2012-10-19 15:34:28 +00:00
|
|
|
PKG_LICENSE_FILES:=README
|
2017-09-28 02:55:46 +00:00
|
|
|
PKG_CPE_ID:=cpe:/a:gnu:zlib
|
2012-10-19 15:34:28 +00:00
|
|
|
|
2017-09-05 17:31:10 +00:00
|
|
|
PKG_CONFIG_DEPENDS:= CONFIG_ZLIB_OPTIMIZE_SPEED
|
|
|
|
|
2006-06-21 02:32:39 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2017-09-05 17:31:10 +00:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 19:06:22 +00:00
|
|
|
define Package/zlib
|
2006-09-23 13:31:54 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Library implementing the deflate compression method
|
|
|
|
URL:=http://www.zlib.net/
|
2006-05-10 19:06:22 +00:00
|
|
|
endef
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2016-01-07 21:08:13 +00:00
|
|
|
define Package/zlib-dev
|
|
|
|
SECTION:=devel
|
|
|
|
CATEGORY:=Development
|
|
|
|
SUBMENU:=Libraries
|
|
|
|
DEPENDS:=zlib
|
|
|
|
TITLE:=Development files for the zlib library
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/zlib/description
|
|
|
|
zlib is a lossless data-compression library.
|
|
|
|
This package includes the shared library.
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/zlib-dev/description
|
|
|
|
zlib is a lossless data-compression library.
|
|
|
|
This package includes the development support files.
|
|
|
|
endef
|
|
|
|
|
2017-09-05 17:31:10 +00:00
|
|
|
define Package/zlib/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
|
|
|
endef
|
|
|
|
|
2017-09-05 17:31:10 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2017-09-05 17:31:10 +00:00
|
|
|
ifeq ($(CONFIG_ZLIB_OPTIMIZE_SPEED),y)
|
|
|
|
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
|
|
|
|
endif
|
|
|
|
|
2018-01-04 13:43:34 +00:00
|
|
|
CMAKE_OPTIONS += \
|
|
|
|
-DARMv8=$$$$(echo -e '\#ifdef __ARM_NEON__\nON\n\#else\nOFF\n\#endif' | $$(TARGET_CC) $$(TARGET_CFLAGS) -x c -E - | grep -xE 'ON|OFF')
|
2017-09-05 18:38:07 +00:00
|
|
|
|
2006-05-29 01:29:46 +00:00
|
|
|
define Build/InstallDev
|
2007-09-28 01:45:11 +00:00
|
|
|
mkdir -p $(1)/usr/include
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \
|
2007-09-28 01:45:11 +00:00
|
|
|
$(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.{a,so*} \
|
2007-09-28 01:45:11 +00:00
|
|
|
$(1)/usr/lib/
|
2011-10-25 21:10:37 +00:00
|
|
|
mkdir -p $(1)/usr/lib/pkgconfig
|
2017-09-05 17:31:10 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \
|
2011-10-25 21:10:37 +00:00
|
|
|
$(1)/usr/lib/pkgconfig/
|
2006-05-29 01:29:46 +00:00
|
|
|
endef
|
2006-06-18 18:30:40 +00:00
|
|
|
|
2007-08-01 12:32:53 +00:00
|
|
|
# libz.so is needed for openssl (zlib-dynamic)
|
2006-06-18 18:30:40 +00:00
|
|
|
define Package/zlib/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2007-08-01 12:32:53 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
|
2006-06-18 18:30:40 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
|
2006-05-29 01:29:46 +00:00
|
|
|
endef
|
2006-05-10 19:16:02 +00:00
|
|
|
|
2016-01-07 21:08:13 +00:00
|
|
|
define Package/zlib-dev/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zconf.h \
|
|
|
|
$(1)/usr/include/
|
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zlib.h \
|
|
|
|
$(1)/usr/include/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.a $(1)/usr/lib/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
2017-09-05 17:31:10 +00:00
|
|
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/pkgconfig/zlib.pc \
|
2016-01-07 21:08:13 +00:00
|
|
|
$(1)/usr/lib/pkgconfig/
|
|
|
|
endef
|
|
|
|
|
2006-05-10 19:16:02 +00:00
|
|
|
$(eval $(call BuildPackage,zlib))
|
2016-01-07 21:08:13 +00:00
|
|
|
$(eval $(call BuildPackage,zlib-dev))
|