archivers/minizip*: Add minizip-ng and zlib-ng and create USES=minizip

Import minizip-ng and zlib-ng

Minizip was originally developed in 1998. It was first included in the zlib
distribution as an additional code contribution starting in zlib 1.1.2. Since
that time, it has been continually improved upon and contributed to by many
people.

+ Creating and extracting zip archives.
+ Adding and removing entries from zip archives.
+ Read and write raw zip entry data.
+ Reading and writing zip archives from memory.
+ Zlib, BZIP2, LZMA, and ZSTD compression methods.
+ Password protection through Traditional PKWARE and WinZIP AES encryption.
+ Buffered streaming for improved I/O performance.

some ports bundle it, some ports allow building against a systemwide
one, some ports bundle/rely on an incompatible version - all those will be
fixed in following commits.

Mk/Uses: Introduce USES=minizip[:ng]

To simplify, the LIB_DEPENDS part a new USES tag is added.

USES=minizip will add a LIB_DEPENDS on legacy minizip and
USES=minizip:ng will add a LIB_DEPENDS on minizip-ng.

minizip [1]:

    databases/spatialite
    databases/spatialite-tools
    devel/collada-dom
    games/mrboom
    games/oolite
    graphics/comical
    misc/xiphos
    science/libkml
    textproc/sigil
    www/domoticz
    deskutils/anydesk
    emulators/mupen64plus-core
    multimedia/assimp
    multimedia/vlc
    net-im/psi
    net-im/telegram-desktop

minizip-ng:

    devel/axmldec

[1] Some are known to work with minizip-ng but have to be patched.

Approved by:	tcberner (portmgr)
Differential Revision:	https://reviews.freebsd.org/D33771
This commit is contained in:
Loïc Bartoletti 2022-01-25 07:33:45 +01:00
parent 5f4c60eac0
commit 45ab80b9df
28 changed files with 155 additions and 46 deletions

19
Mk/Uses/minizip.mk Normal file
View file

@ -0,0 +1,19 @@
# handle minizip version
#
# Feature: minizip
# Usage: USES=minizip[:ng]
#
# MAINTAINER: lbartoletti@FreeBSD.org
.if !defined(_INCLUDE_USES_MINIZIP_MK)
_INCLUDE_USES_MINIZIP_MK= yes
. if empty(minizip_ARGS)
LIB_DEPENDS+= libminizip.so:archivers/minizip
. elif ${minizip_ARGS} == "ng"
LIB_DEPENDS+= libminizip-ng.so:archivers/minizip-ng
. else
IGNORE= Incorrect 'USES+=minizip:${minizip_ARGS}' expecting 'USES+=minizip[:ng]'
. endif
.endif

View file

@ -88,6 +88,7 @@
SUBDIR += mar SUBDIR += mar
SUBDIR += maxcso SUBDIR += maxcso
SUBDIR += minizip SUBDIR += minizip
SUBDIR += minizip-ng
SUBDIR += mscompress SUBDIR += mscompress
SUBDIR += mtf SUBDIR += mtf
SUBDIR += nfpm SUBDIR += nfpm
@ -265,6 +266,7 @@
SUBDIR += zip-ada SUBDIR += zip-ada
SUBDIR += zipmix SUBDIR += zipmix
SUBDIR += zipper SUBDIR += zipper
SUBDIR += zlib-ng
SUBDIR += zoo SUBDIR += zoo
SUBDIR += zopfli SUBDIR += zopfli
SUBDIR += zstd SUBDIR += zstd

View file

@ -0,0 +1,22 @@
PORTNAME= minizip-ng
DISTVERSION= 3.0.4
CATEGORIES= archivers
MAINTAINER= lbartoletti@FreeBSD.org
COMMENT= Fork of the popular minizip found in the zlib distribution
LICENSE= ZLIB
LIB_DEPENDS= libzstd.so:archivers/zstd
USES= cmake:testing iconv pkgconfig ssl
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= zlib-ng
CMAKE_ON= BUILD_SHARED_LIBS
CMAKE_ARGS= -DMZ_PROJECT_SUFFIX=-ng \
-DCMAKE_INSTALL_INCLUDEDIR=${LOCALBASE}/include/minizip-ng
CMAKE_TESTING_ON= MZ_BUILD_TEST MZ_BUILD_UNIT_TEST
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1641396331
SHA256 (zlib-ng-minizip-ng-3.0.4_GH0.tar.gz) = 2ab219f651901a337a7d3c268128711b80330a99ea36bdc528c76b591a624c3c
SIZE (zlib-ng-minizip-ng-3.0.4_GH0.tar.gz) = 638956

View file

@ -0,0 +1,14 @@
Minizip was originally developed in 1998. It was first included in the zlib
distribution as an additional code contribution starting in zlib 1.1.2. Since
that time, it has been continually improved upon and contributed to by many
people.
+ Creating and extracting zip archives.
+ Adding and removing entries from zip archives.
+ Read and write raw zip entry data.
+ Reading and writing zip archives from memory.
+ Zlib, BZIP2, LZMA, and ZSTD compression methods.
+ Password protection through Traditional PKWARE and WinZIP AES encryption.
+ Buffered streaming for improved I/O performance.
WWW: https://github.com/zlib-ng/minizip-ng

View file

@ -0,0 +1,27 @@
include/minizip-ng/mz.h
include/minizip-ng/mz_compat.h
include/minizip-ng/mz_crypt.h
include/minizip-ng/mz_os.h
include/minizip-ng/mz_strm.h
include/minizip-ng/mz_strm_buf.h
include/minizip-ng/mz_strm_bzip.h
include/minizip-ng/mz_strm_lzma.h
include/minizip-ng/mz_strm_mem.h
include/minizip-ng/mz_strm_os.h
include/minizip-ng/mz_strm_pkcrypt.h
include/minizip-ng/mz_strm_split.h
include/minizip-ng/mz_strm_wzaes.h
include/minizip-ng/mz_strm_zlib.h
include/minizip-ng/mz_strm_zstd.h
include/minizip-ng/mz_zip.h
include/minizip-ng/mz_zip_rw.h
include/minizip-ng/unzip.h
include/minizip-ng/zip.h
lib/cmake/minizip-ng/minizip-ng-config-version.cmake
lib/cmake/minizip-ng/minizip-ng-config.cmake
lib/cmake/minizip-ng/minizip-ng-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/minizip-ng/minizip-ng.cmake
lib/libminizip-ng.so
lib/libminizip-ng.so.3
lib/libminizip-ng.so.3.0.4
libdata/pkgconfig/minizip-ng.pc

View file

@ -0,0 +1,16 @@
PORTNAME= zlib-ng
DISTVERSION= 2.0.6
CATEGORIES= archivers
MAINTAINER= lbartoletti@FreeBSD.org
COMMENT= Fork of the zlib data compression library
LICENSE= ZLIB
USES= cmake:testing
USE_LDCONFIG= yes
USE_GITHUB= yes
CMAKE_TESTING_ON= ZLIB_ENABLE_TESTS
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1641394914
SHA256 (zlib-ng-zlib-ng-2.0.6_GH0.tar.gz) = 8258b75a72303b661a238047cb348203d88d9dddf85d480ed885f375916fcab6
SIZE (zlib-ng-zlib-ng-2.0.6_GH0.tar.gz) = 817951

View file

@ -0,0 +1,13 @@
Zlib replacement with optimizations for next generation systems.
The motivation for this fork came after seeing several 3rd party contributions
containing new optimizations not getting implemented into the official zlib
repository.
Mark Adler has been maintaining zlib for a very long time, and he has done a
great job and hopefully he will continue for a long time yet.
The idea of zlib-ng is not to replace zlib, but to co-exist as a drop-in
replacement with a lower threshold for code change.
WWW: https://github.com/zlib-ng/zlib-ng

View file

@ -0,0 +1,7 @@
include/zconf-ng.h
include/zlib-ng.h
lib/libz-ng.a
lib/libz-ng.so
lib/libz-ng.so.2
lib/libz-ng.so.2.0.6
libdata/pkgconfig/zlib-ng.pc

View file

@ -13,11 +13,10 @@ LIB_DEPENDS= libgeos_c.so:graphics/geos \
libfreexl.so:textproc/freexl \ libfreexl.so:textproc/freexl \
libexpat.so:textproc/expat2 \ libexpat.so:textproc/expat2 \
libspatialite.so:databases/spatialite \ libspatialite.so:databases/spatialite \
libreadosm.so:astro/readosm \ libreadosm.so:astro/readosm
libminizip.so:archivers/minizip
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
USES= gmake gnome pkgconfig iconv sqlite USES= gmake gnome iconv minizip pkgconfig sqlite
USE_GNOME= libxml2 USE_GNOME= libxml2
CFLAGS+= -I${LOCALBASE}/include CFLAGS+= -I${LOCALBASE}/include

View file

@ -15,11 +15,10 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libgeos_c.so:graphics/geos \ LIB_DEPENDS= libgeos_c.so:graphics/geos \
libproj.so:graphics/proj \ libproj.so:graphics/proj \
libfreexl.so:textproc/freexl \ libfreexl.so:textproc/freexl \
libminizip.so:archivers/minizip \
librttopo.so:devel/librttopo librttopo.so:devel/librttopo
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
USES= gmake gnome iconv libtool pathfix pkgconfig sqlite USES= gmake gnome iconv libtool pathfix minizip pkgconfig sqlite
USE_GNOME= libxml2 USE_GNOME= libxml2
CFLAGS+= -I${WRKSRC}/src/headers -I${LOCALBASE}/include CFLAGS+= -I${WRKSRC}/src/headers -I${LOCALBASE}/include

View file

@ -19,9 +19,8 @@ LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libinotify.so:devel/libinotify \ libinotify.so:devel/libinotify \
libpolkit-gobject-1.so:sysutils/polkit \ libpolkit-gobject-1.so:sysutils/polkit \
libxkbfile.so:x11/libxkbfile \ libxkbfile.so:x11/libxkbfile \
libminizip.so:archivers/minizip \
USES= cpe gl gnome xorg USES= cpe gl gnome minizip xorg
USE_GL= gl glu USE_GL= gl glu
USE_GNOME= cairo gdkpixbuf2 glib20 gtk20 pangox-compat USE_GNOME= cairo gdkpixbuf2 glib20 gtk20 pangox-compat

View file

@ -12,10 +12,9 @@ COMMENT= Stand-alone binary AndroidManifest.xml decoder
LICENSE= ISCL LICENSE= ISCL
LICENSE_FILE= ${WRKSRC}/LICENSE.md LICENSE_FILE= ${WRKSRC}/LICENSE.md
LIB_DEPENDS= libminizip.so:archivers/minizip \ LIB_DEPENDS= libboost_system.so:devel/boost-libs
libboost_system.so:devel/boost-libs
USES= cmake compiler:c++14-lang cpe pkgconfig USES= cmake compiler:c++14-lang cpe minizip:ng pkgconfig
CPE_VENDOR= ${PORTNAME}_project CPE_VENDOR= ${PORTNAME}_project
USE_GITHUB= yes USE_GITHUB= yes
GH_ACCOUNT= ytsutano GH_ACCOUNT= ytsutano

View file

@ -9,7 +9,7 @@
- -
+ include (FindPkgConfig) + include (FindPkgConfig)
+ if (PKG_CONFIG_FOUND) + if (PKG_CONFIG_FOUND)
+ pkg_check_modules(MINIZIP minizip) + pkg_check_modules(MINIZIP minizip-ng)
+ endif() + endif()
+ include_directories(${MINIZIP_INCLUDE_DIRS}) + include_directories(${MINIZIP_INCLUDE_DIRS})
+ find_library(MINIZIP_FROM_PORTS ${MINIZIP_LIBRARIES} + find_library(MINIZIP_FROM_PORTS ${MINIZIP_LIBRARIES}

View file

@ -9,12 +9,11 @@ COMMENT= COLLADA Document Object Model (DOM) C++ Library
LICENSE= MIT LICENSE= MIT
LIB_DEPENDS= libminizip.so:archivers/minizip \ LIB_DEPENDS= libpcre.so:devel/pcre \
libpcre.so:devel/pcre \
libboost_filesystem.so:devel/boost-libs \ libboost_filesystem.so:devel/boost-libs \
libboost_system.so:devel/boost-libs libboost_system.so:devel/boost-libs
USES= cmake gnome USES= cmake gnome minizip
USE_LDCONFIG= yes USE_LDCONFIG= yes
USE_GNOME= libxml2 USE_GNOME= libxml2
USE_GITHUB= yes USE_GITHUB= yes

View file

@ -11,8 +11,8 @@ EXTRACT_AFTER_ARGS?= "${DISTNAME}/source/${PORTNAME}-core/*" \
.if ${PKGNAMESUFFIX} == "-core" .if ${PKGNAMESUFFIX} == "-core"
LIB_DEPENDS+= libfreetype.so:print/freetype2 \ LIB_DEPENDS+= libfreetype.so:print/freetype2 \
libpng.so:graphics/png \ libpng.so:graphics/png
libminizip.so:archivers/minizip USES+= minizip
.else .else
PLIST= ${WRKDIR}/pkg-plist PLIST= ${WRKDIR}/pkg-plist
.endif .endif

View file

@ -12,10 +12,9 @@ COMMENT= 8 players Bomberman clone
LICENSE= MIT LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libminizip.so:archivers/minizip \ LIB_DEPENDS= libmodplug.so:audio/libmodplug
libmodplug.so:audio/libmodplug
USES= compiler:c++11-lang gmake sdl USES= compiler:c++11-lang gmake minizip sdl
USE_SDL= mixer2 sdl2 USE_SDL= mixer2 sdl2
MAKE_ENV+= LIBSDL2=1 MAKE_ENV+= LIBSDL2=1

View file

@ -18,10 +18,9 @@ BUILD_DEPENDS= zip:archivers/zip \
LIB_DEPENDS= libespeak.so:audio/espeak \ LIB_DEPENDS= libespeak.so:audio/espeak \
libnspr4.so:devel/nspr \ libnspr4.so:devel/nspr \
libvorbisfile.so:audio/libvorbis \ libvorbisfile.so:audio/libvorbis \
libpng.so:graphics/png \ libpng.so:graphics/png
libminizip.so:archivers/minizip
USES= gl gnustep openal:al perl5 python:3.5+,build sdl \ USES= gl gnustep openal:al minizip perl5 python:3.5+,build sdl \
tar:bzip2 xorg tar:bzip2 xorg
USE_CXXSTD= gnu++98 USE_CXXSTD= gnu++98
USE_GL= gl glu USE_GL= gl glu

View file

@ -12,10 +12,9 @@ COMMENT= Sequential image viewer
LICENSE= GPLv2+ LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libminizip.so:archivers/minizip \ LIB_DEPENDS= libunrar.so.6:archivers/libunrar6
libunrar.so.6:archivers/libunrar6
USES= compiler:c++11-lang gmake USES= compiler:c++11-lang gmake minizip
USE_WX= 2.8+ USE_WX= 2.8+
MAKE_ENV= WX_CONFIG=${WX_CONFIG} MAKE_ENV= WX_CONFIG=${WX_CONFIG}

View file

@ -22,14 +22,13 @@ LIB_DEPENDS= libbiblesync.so:misc/biblesync \
libdbus-glib-1.so:devel/dbus-glib \ libdbus-glib-1.so:devel/dbus-glib \
libenchant.so:textproc/enchant \ libenchant.so:textproc/enchant \
libicui18n.so:devel/icu \ libicui18n.so:devel/icu \
libminizip.so:archivers/minizip \
libsoup-2.4.so:devel/libsoup \ libsoup-2.4.so:devel/libsoup \
libsword.so:misc/sword \ libsword.so:misc/sword \
libuuid.so:misc/e2fsprogs-libuuid \ libuuid.so:misc/e2fsprogs-libuuid \
libwebkit2gtk-4.0.so:www/webkit2-gtk3 libwebkit2gtk-4.0.so:www/webkit2-gtk3
# gettext is always needed, even if NLS is off # gettext is always needed, even if NLS is off
USES= cmake compiler:c11 gettext gnome pkgconfig USES= cmake compiler:c11 gettext gnome minizip pkgconfig
USE_GNOME= cairo gconf2 gtk30 gtkhtml4 intltool libgsf USE_GNOME= cairo gconf2 gtk30 gtkhtml4 intltool libgsf
CMAKE_OFF= EPUB CMAKE_OFF= EPUB

View file

@ -9,9 +9,7 @@ COMMENT= Library to import various 3D model formats in a uniform manner
LICENSE= BSD3CLAUSE LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libminizip.so:archivers/minizip USES= cmake:testing compiler:c++11-lib localbase:ldflags minizip pkgconfig
USES= cmake:testing compiler:c++11-lib localbase:ldflags pkgconfig
USE_GITHUB= yes USE_GITHUB= yes
USE_LDCONFIG= yes USE_LDCONFIG= yes

View file

@ -299,9 +299,8 @@ SIDPLAY_LDFLAGS= -L${LOCALBASE}/lib/sidplay/builders
SIDPLAY_CONFIGURE_ENABLE= sid SIDPLAY_CONFIGURE_ENABLE= sid
CONFIGURE_ARGS+= --disable-sid CONFIGURE_ARGS+= --disable-sid
SKINS_USE= XORG=xext,xinerama,xpm SKINS_USE= XORG=xext,xinerama,xpm minizip
SKINS_LIB_DEPENDS= libminizip.so:archivers/minizip \ SKINS_LIB_DEPENDS= libtar.so:devel/libtar
libtar.so:devel/libtar
SKINS_CONFIGURE_ENABLE= skins2 libtar SKINS_CONFIGURE_ENABLE= skins2 libtar
SKINS_IMPLIES= QT5 SKINS_IMPLIES= QT5

View file

@ -10,10 +10,9 @@ COMMENT= Qt-based Jabber (XMPP) client
LICENSE= GPLv2+ LICENSE= GPLv2+
LIB_DEPENDS= libidn.so:dns/libidn \ LIB_DEPENDS= libidn.so:dns/libidn
libminizip.so:archivers/minizip
USES= cmake compiler:c++11-lang desktop-file-utils pkgconfig \ USES= cmake compiler:c++11-lang desktop-file-utils minizip pkgconfig \
qca qt:5 tar:xz xorg qca qt:5 tar:xz xorg
USE_QT= concurrent core dbus gui multimedia network svg widgets \ USE_QT= concurrent core dbus gui multimedia network svg widgets \
x11extras xml buildtools_build qmake_build imageformats_run x11extras xml buildtools_build qmake_build imageformats_run

View file

@ -31,7 +31,6 @@ LIB_DEPENDS= libavformat.so:multimedia/ffmpeg \
libhunspell-1.7.so:textproc/hunspell \ libhunspell-1.7.so:textproc/hunspell \
libjpeg.so:graphics/jpeg-turbo \ libjpeg.so:graphics/jpeg-turbo \
liblz4.so:archivers/liblz4 \ liblz4.so:archivers/liblz4 \
libminizip.so:archivers/minizip \
librnnoise.so:audio/rnnoise \ librnnoise.so:audio/rnnoise \
libopenal.so:audio/openal-soft \ libopenal.so:audio/openal-soft \
libopenh264.so:multimedia/openh264 \ libopenh264.so:multimedia/openh264 \

View file

@ -12,17 +12,15 @@ LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= boost-libs>=1.44.0:devel/boost-libs \ BUILD_DEPENDS= boost-libs>=1.44.0:devel/boost-libs \
googletest>=1.7.0:devel/googletest \ googletest>=1.7.0:devel/googletest
minizip>=1.2.8:archivers/minizip
LIB_DEPENDS= libboost_thread.so:devel/boost-libs \ LIB_DEPENDS= libboost_thread.so:devel/boost-libs \
libexpat.so:textproc/expat2 \ libexpat.so:textproc/expat2 \
libgtest.so:devel/googletest \ libgtest.so:devel/googletest \
libminizip.so:archivers/minizip \
liburiparser.so:net/uriparser liburiparser.so:net/uriparser
OPTIONS_DEFINE= EXAMPLES OPTIONS_DEFINE= EXAMPLES
USES= cmake compiler:c11 pathfix USES= cmake compiler:c11 minizip pathfix
CMAKE_OFF= WITH_JAVA WITH_PYTHON WITH_SWIG CMAKE_OFF= WITH_JAVA WITH_PYTHON WITH_SWIG
USE_CXXSTD= gnu++98 USE_CXXSTD= gnu++98

View file

@ -10,14 +10,13 @@ COMMENT= WYSIWYG ePub editor
LICENSE= GPLv3+ LICENSE= GPLv3+
LICENSE_FILE= ${WRKSRC}/COPYING.txt LICENSE_FILE= ${WRKSRC}/COPYING.txt
LIB_DEPENDS= libminizip.so:archivers/minizip \ LIB_DEPENDS= libpcre.so:devel/pcre \
libpcre.so:devel/pcre \
libhunspell-1.7.so:textproc/hunspell libhunspell-1.7.so:textproc/hunspell
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dulwich>=0.15.0:devel/dulwich@${PY_FLAVOR} \ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dulwich>=0.15.0:devel/dulwich@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR}
USES= cmake compiler:c++11-lib cpe desktop-file-utils \ USES= cmake compiler:c++11-lib cpe desktop-file-utils \
pkgconfig python:3.4+ qt:5 shebangfix minizip pkgconfig python:3.4+ qt:5 shebangfix
CPE_VENDOR= ${PORTNAME}-ebook CPE_VENDOR= ${PORTNAME}-ebook
USE_GITHUB= yes USE_GITHUB= yes

View file

@ -10,10 +10,10 @@ LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/License.txt LICENSE_FILE= ${WRKSRC}/License.txt
LIB_DEPENDS= libcurl.so:ftp/curl libboost_system.so:devel/boost-libs \ LIB_DEPENDS= libcurl.so:ftp/curl libboost_system.so:devel/boost-libs \
libminizip.so:archivers/minizip libjsoncpp.so:devel/jsoncpp libjsoncpp.so:devel/jsoncpp
BUILD_DEPENDS= cereal>=1.2.2:devel/cereal BUILD_DEPENDS= cereal>=1.2.2:devel/cereal
USES= cmake compiler:c++11-lang cpe pkgconfig ssl lua:53 sqlite USES= cmake compiler:c++11-lang cpe minizip pkgconfig ssl lua:53 sqlite
OPTIONS_SUB= YES OPTIONS_SUB= YES
OPTIONS_DEFINE= SMQTT PYTHON TELLDUS OPENZWAVE PRECOMP OPTIONS_DEFINE= SMQTT PYTHON TELLDUS OPENZWAVE PRECOMP