From e5a65dc002dc676b3ba6ba05f69381f2c550391c Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Tue, 27 Feb 2018 17:20:38 +0100 Subject: [PATCH] new package: unzip --- src/unzip-1-fixes.patch | 40 ++++++++++++++++++++++++++++++++++++++++ src/unzip.mk | 28 ++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/unzip-1-fixes.patch create mode 100644 src/unzip.mk diff --git a/src/unzip-1-fixes.patch b/src/unzip-1-fixes.patch new file mode 100644 index 00000000..1cc6c749 --- /dev/null +++ b/src/unzip-1-fixes.patch @@ -0,0 +1,40 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand +Date: Tue, 27 Feb 2018 17:10:54 +0100 +Subject: [PATCH 1/2] MXE build fix + +https://sourceforge.net/p/mingw-w64/bugs/682/ + +diff --git a/win32/nt.c b/win32/nt.c +index 1111111..2222222 100644 +--- a/win32/nt.c ++++ b/win32/nt.c +@@ -37,8 +37,8 @@ + + #define WIN32_LEAN_AND_MEAN + #define UNZIP_INTERNAL +-#include "../unzip.h" + #include ++#include "../unzip.h" + #ifdef __RSXNT__ + # include "../win32/rsxntwin.h" + #endif +diff --git a/win32/win32.c b/win32/win32.c +index 1111111..2222222 100644 +--- a/win32/win32.c ++++ b/win32/win32.c +@@ -54,8 +54,8 @@ + + + #define UNZIP_INTERNAL +-#include "../unzip.h" + #include /* must be AFTER unzip.h to avoid struct G problems */ ++#include "../unzip.h" + #ifdef __RSXNT__ + # include "../win32/rsxntwin.h" + #endif + diff --git a/src/unzip.mk b/src/unzip.mk new file mode 100644 index 00000000..a2587b4c --- /dev/null +++ b/src/unzip.mk @@ -0,0 +1,28 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := unzip +$(PKG)_WEBSITE := http://www.info-zip.org +$(PKG)_DESCR := Info-ZIP +$(PKG)_IGNORE := +$(PKG)_VERSION := 6.10b +$(PKG)_CHECKSUM := 6cf44ac86789008d9493896b7816027f6022be24ad90a15d472393902584a5a2 +$(PKG)_VERSIONF := $(shell echo $($(PKG)_VERSION) | tr -d .) +$(PKG)_SUBDIR := $(PKG)$($(PKG)_VERSIONF) +$(PKG)_FILE := $(PKG)$($(PKG)_VERSIONF).zip +$(PKG)_URL := $(SOURCEFORGE_MIRROR)/project/infozip/unreleased%20Betas/UnZip%20betas/$($(PKG)_FILE) +$(PKG)_DEPS := cc zlib + +define $(PKG)_UPDATE + echo 'NOTE: automatic updates for unzip are disabled.' >&2; + echo $(unzip_VERSION) +endef + +define $(PKG)_BUILD + $(MAKE) -C '$(1)' -j '$(JOBS)' -f win32/Makefile.gcc \ + CC=$(TARGET)-gcc \ + RC=$(TARGET)-windres \ + USEZLIB=1 \ + CC_CPU_OPT='-mtune=generic' + + $(INSTALL) '$(1)'/*.exe '$(PREFIX)'/$(TARGET)/bin +endef