0
0
mirror of https://github.com/openwrt/packages.git synced 2025-07-17 05:14:46 +00:00
Files
packages/utils/unzip/Makefile
Tan Zien d3a2fb39a7 unzip: fix build GCC 15.1
refer to:

b7410ac718/main/unzip/gcc15.patch

fix this:

unix/unxcfg.h:120:15: error: conflicting types for 'gmtime'; have 'struct tm *(void)'
  120 |    struct tm *gmtime(), *localtime();
      |               ^~~~~~
In file included from unix/unxcfg.h:119:
/home/nasbdh9/openwrt/staging_dir/toolchain-x86_64_gcc-15.1.0_musl/include/time.h:59:12: note: previous declaration of 'gmtime' with type 'struct tm *(const time_t *)' {aka 'struct tm *(const long int *)'}
   59 | struct tm *gmtime (const time_t *);
      |            ^~~~~~
unix/unxcfg.h:120:26: error: conflicting types for 'localtime'; have 'struct tm *(void)'
  120 |    struct tm *gmtime(), *localtime();
      |                          ^~~~~~~~~
/home/nasbdh9/openwrt/staging_dir/toolchain-x86_64_gcc-15.1.0_musl/include/time.h:60:12: note: previous declaration of 'localtime' with type 'struct tm *(const time_t *)' {aka 'struct tm *(const long int *)'}
   60 | struct tm *localtime (const time_t *);
      |            ^~~~~~~~~

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
2025-07-09 18:52:06 +08:00

76 lines
1.8 KiB
Makefile

#
# Copyright (C) 2006-2017 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=unzip
PKG_REV:=60
PKG_VERSION:=6.0
PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
PKG_SOURCE_URL:=@SF/infozip
PKG_HASH:=036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=BSD-4-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CPE_ID:=cpe:/a:info-zip:unzip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/unzip$(PKG_REV)
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk
define Package/unzip
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=
TITLE:=De-archiver for .zip files
URL:=http://infozip.sourceforge.net/UnZip.html
SUBMENU:=Compression
endef
define Package/unzip/description
InfoZIP's unzip program. With the exception of multi-volume archives
(ie, .ZIP files that are split across several disks using PKZIP's /& option),
this can handle any file produced either by PKZIP, or the corresponding
InfoZIP zip program.
endef
define Build/Configure
endef
TARGET_CFLAGS += \
-DNO_LCHMOD \
-DLARGE_FILE_SUPPORT \
-DUNICODE_WCHAR \
-DUNICODE_SUPPORT \
-DUTF8_MAYBE_NATIVE \
-DZIP64_SUPPORT
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile unzips \
$(TARGET_CONFIGURE_OPTS) \
prefix="$(PKG_INSTALL_DIR)/usr" \
CFLAGS="$(TARGET_CFLAGS)" \
CF="$(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX" \
CC="$(TARGET_CC)" \
LD="$(TARGET_CC) $(TARGET_LDFLAGS)" \
install
endef
define Package/unzip/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/{funzip,unzip,unzipsfx,zipgrep} \
$(1)/usr/bin/
$(LN) unzip $(1)/usr/bin/zipinfo
endef
$(eval $(call BuildPackage,unzip))