1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 11:23:57 +02:00
openwrt-packages/utils/zip/Makefile
p-wassi 39af758c7e utils/zip: fix LARGE_FILE_SUPPORT in configure script
Package zip is currently broken with a runtime error.
When zip is run, it immediately exits with
"zip warning : Not supported (uzoff_t not same size as zoff_t)"

The issue boils down to the package's configure script which tries to
determine LARGE_FILE_SUPPORT on *host* side. The conftest.c is
compiled and ran on the building host to see whether LFS is given or not.
This will fail when cross-compiling. The patch here is created by Romain Naour,
taken from http://lists.busybox.net/pipermail/buildroot/2015-January/117909.html
Reworked and tested by me. Now LFS is detected and the built binaries work
on the target.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
2016-11-20 22:05:42 +01:00

62 lines
1.5 KiB
Makefile

#
# Copyright (C) 2007-2016 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:=zip
PKG_REV:=30
PKG_VERSION:=3.0
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)$(PKG_REV).tar.gz
PKG_SOURCE_URL:=@SF/infozip
PKG_MD5SUM:=7b74551e63f8ee6aab6fbc86676c0d37
PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
PKG_LICENSE:=BSD-4-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/zip$(PKG_REV)
PKG_CHECK_FORMAT_SECURITY:=0
include $(INCLUDE_DIR)/package.mk
define Package/zip
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=
TITLE:=Archiver for .zip files
URL:=http://infozip.sourceforge.net/Zip.html
SUBMENU:=Compression
endef
define Package/zip/description
This is InfoZIP's zip program. It produces files that are fully
compatible with the popular PKZIP program; however, the command line
options are not identical. In other words, the end result is the same,
but the methods differ.
endef
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) -f unix/Makefile generic \
prefix="$(PKG_INSTALL_DIR)/usr" \
CFLAGS="$(TARGET_CFLAGS)" \
CC="$(TARGET_CC) $(TARGET_CFLAGS) -O $(TARGET_CPPFLAGS) -I. -DUNIX $(TARGET_LDFLAGS)" \
IZ_BZIP2="no" \
install
endef
define Package/zip/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
endef
$(eval $(call BuildPackage,zip))