From 96b80fc1263ef1ae3403dcbdce0c56cf5b341c84 Mon Sep 17 00:00:00 2001 From: miqlas Date: Tue, 12 Sep 2017 16:33:50 +0200 Subject: [PATCH] minizip: add recipe for version 1.2.11 (#1593) --- app-arch/minizip/licenses/Zlib | 21 ++++++ app-arch/minizip/minizip-1.2.11.recipe | 73 +++++++++++++++++++ .../minizip/patches/minizip-1.2.11.patchset | 61 ++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 app-arch/minizip/licenses/Zlib create mode 100644 app-arch/minizip/minizip-1.2.11.recipe create mode 100644 app-arch/minizip/patches/minizip-1.2.11.patchset diff --git a/app-arch/minizip/licenses/Zlib b/app-arch/minizip/licenses/Zlib new file mode 100644 index 000000000..bd6ea5ac9 --- /dev/null +++ b/app-arch/minizip/licenses/Zlib @@ -0,0 +1,21 @@ +Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +Jean-loup Gailly Mark Adler +jloup@gzip.org madler@alumni.caltech.edu + diff --git a/app-arch/minizip/minizip-1.2.11.recipe b/app-arch/minizip/minizip-1.2.11.recipe new file mode 100644 index 000000000..0e13ecfa8 --- /dev/null +++ b/app-arch/minizip/minizip-1.2.11.recipe @@ -0,0 +1,73 @@ +SUMMARY="Mini zip and unzip based on zlib" +DESCRIPTION="minizip is a simple tool which allows the creation of compressed \ +file archives in the ZIP format used by the MS-DOS utility PKZIP. It was \ +written as a demonstration of the zlib library and therefore lack many of \ +the features of the zip program." +HOMEPAGE="http://www.zlib.net/" +COPYRIGHT="1998-2010 Gilles Vollant and Mathias Svensson" +LICENSE="Zlib" +REVISION="1" +SOURCE_URI="http://zlib.net/fossils/zlib-$portVersion.tar.gz" +CHECKSUM_SHA256="c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" +SOURCE_DIR="zlib-$portVersion" +PATCHES="minizip-$portVersion.patchset" + +ARCHITECTURES="?x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="?x86" + +PROVIDES=" + minizip$secondaryArchSuffix = $portVersion + lib:libminizip$secondaryArchSuffix = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " + +PROVIDES_devel=" + minizip${secondaryArchSuffix}_devel = $portVersion + devel:libminizip$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + minizip$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:aclocal + cmd:autoconf + cmd:autoheader + cmd:automake + cmd:awk + cmd:gcc$secondaryArchSuffix + cmd:grep + cmd:libtoolize$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + cd contrib/minizip + cp Makefile Makefile.orig + cp ../README.contrib readme.txt + autoreconf --install + runConfigure ./configure + make +} + +INSTALL() +{ + cd contrib/minizip + make install + + rm -rf $libDir/libminizip.la + + prepareInstalledDevelLib libminizip + + # devel package + packageEntries devel \ + $developDir +} diff --git a/app-arch/minizip/patches/minizip-1.2.11.patchset b/app-arch/minizip/patches/minizip-1.2.11.patchset new file mode 100644 index 000000000..525fccf8a --- /dev/null +++ b/app-arch/minizip/patches/minizip-1.2.11.patchset @@ -0,0 +1,61 @@ +From 59e528634b46240167fb935339f6fec03d70eb74 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Thu, 24 Aug 2017 22:34:32 +0200 +Subject: Platform fix + + +diff --git a/contrib/minizip/ioapi.c b/contrib/minizip/ioapi.c +index 7f5c191..649255c 100644 +--- a/contrib/minizip/ioapi.c ++++ b/contrib/minizip/ioapi.c +@@ -14,7 +14,7 @@ + #define _CRT_SECURE_NO_WARNINGS + #endif + +-#if defined(__APPLE__) || defined(IOAPI_NO_64) ++#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__) + // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions + #define FOPEN_FUNC(filename, mode) fopen(filename, mode) + #define FTELLO_FUNC(stream) ftello(stream) +diff --git a/contrib/minizip/ioapi.h b/contrib/minizip/ioapi.h +index 8dcbdb0..1655288 100644 +--- a/contrib/minizip/ioapi.h ++++ b/contrib/minizip/ioapi.h +@@ -50,7 +50,7 @@ + #define ftello64 ftell + #define fseeko64 fseek + #else +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined (__HAIKU__) + #define fopen64 fopen + #define ftello64 ftello + #define fseeko64 fseeko +diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c +index 3d65401..a6caacf 100644 +--- a/contrib/minizip/miniunz.c ++++ b/contrib/minizip/miniunz.c +@@ -27,7 +27,7 @@ + #endif + #endif + +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(__HAIKU__) + // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions + #define FOPEN_FUNC(filename, mode) fopen(filename, mode) + #define FTELLO_FUNC(stream) ftello(stream) +diff --git a/contrib/minizip/minizip.c b/contrib/minizip/minizip.c +index 4288962..e3ec8e1 100644 +--- a/contrib/minizip/minizip.c ++++ b/contrib/minizip/minizip.c +@@ -28,7 +28,7 @@ + #endif + #endif + +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(__HAIKU__) + // In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions + #define FOPEN_FUNC(filename, mode) fopen(filename, mode) + #define FTELLO_FUNC(stream) ftello(stream) +-- +2.14.1 +