From: Rafael Sadowski Subject: Re: update: zziplib to 0.13.80 - fixes llvm 22 build To: Matthieu Herrb Cc: ports@openbsd.org Date: Sat, 16 May 2026 00:22:04 +0200 On Fri May 15, 2026 at 09:13:48PM +0200, Matthieu Herrb wrote: > Hi again, > > the patch below updates zziplib to 0.13.80. Among others it fixes > build with llvm 22. > > Another pair of eyes over the cmake patch (which fixxes 'multiple > definitions of zzlib.so' ninja errors) are welcome as cmake is not my > native language... Looks good, personally I would prefer remove instead comment out "#" because it make the diff easier to read. Anyway, you can remove the MODCMAKE_POLICY_VERSION_OVERRIDE line if i builds fine with out it. Otherwise OK rsadowski > > Index: Makefile > =================================================================== > RCS file: /cvs/OpenBSD/ports/archivers/zziplib/Makefile,v > diff -u -p -u -r1.27 Makefile > --- Makefile 13 Feb 2026 12:02:13 -0000 1.27 > +++ Makefile 15 May 2026 19:08:59 -0000 > @@ -4,10 +4,9 @@ CATEGORIES= archivers > > GH_ACCOUNT = gdraheim > GH_PROJECT = zziplib > -GH_TAGNAME = v0.13.72 > -REVISION = 1 > +GH_TAGNAME = v0.13.80 > > -SHARED_LIBS += zzip 16.0 # 0.0 > +SHARED_LIBS += zzip 16.1 # 0.0 > SHARED_LIBS += zzipfseeko 14.0 # 0.0 > SHARED_LIBS += zzipmmapped 14.0 # 0.0 > SHARED_LIBS += zzipwrap 14.0 # 0.0 > @@ -30,7 +29,10 @@ MODULES = devel/cmake \ > MODPY_RUNDEP = No > > MODCMAKE_LDFLAGS = -L${LOCALBASE}/lib > -MODCMAKE_POLICY_VERSION_OVERRIDE = Yes > +# MODCMAKE_POLICY_VERSION_OVERRIDE = Yes > + > +CONFIGURE_ARGS += -DZZIP_LIBTOOL=OFF \ > + -DZZIP_COMPAT=OFF > > TEST_TARGET = tests > > Index: distinfo > =================================================================== > RCS file: /cvs/OpenBSD/ports/archivers/zziplib/distinfo,v > diff -u -p -u -r1.8 distinfo > --- distinfo 8 Jul 2022 05:14:48 -0000 1.8 > +++ distinfo 15 May 2026 19:08:59 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (zziplib-0.13.72.tar.gz) = k+9Evx8eok/GYIBCakad+C+mMdE8o7Lkq66riVOFGNw= > -SIZE (zziplib-0.13.72.tar.gz) = 1162175 > +SHA256 (zziplib-0.13.80.tar.gz) = IfQNERwPejmM/uOwowsgxdkhJLCOpCkAVfv+e91Toiw= > +SIZE (zziplib-0.13.80.tar.gz) = 1192948 > Index: patches/patch-zzip_CMakeLists_txt > =================================================================== > RCS file: /cvs/OpenBSD/ports/archivers/zziplib/patches/patch-zzip_CMakeLists_txt,v > diff -u -p -u -r1.1 patch-zzip_CMakeLists_txt > --- patches/patch-zzip_CMakeLists_txt 8 Jul 2022 05:14:48 -0000 1.1 > +++ patches/patch-zzip_CMakeLists_txt 15 May 2026 19:08:59 -0000 > @@ -1,8 +1,8 @@ > Index: zzip/CMakeLists.txt > --- zzip/CMakeLists.txt.orig > +++ zzip/CMakeLists.txt > -@@ -189,16 +189,16 @@ target_link_libraries(libzzipmmapped ZLIB::ZLIB ) > - target_include_directories (libzzipmmapped PRIVATE ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}) > +@@ -242,16 +242,16 @@ add_custom_command(OUTPUT libzzipmmapped.so.gcov > + add_custom_target(libzzipmmapped.gcov DEPENDS libzzipmmapped.so.gcov) > endif() > > -set_target_properties(libzzip PROPERTIES OUTPUT_NAME "zzip" RELEASE_POSTFIX "-${RELNUM}") > @@ -20,4 +20,74 @@ Index: zzip/CMakeLists.txt > +set_target_properties(libzzipmmapped PROPERTIES OUTPUT_NAME "zzipmmapped") > SET_TARGET_PROPERTIES(libzzipmmapped PROPERTIES VERSION ${VERNUM}.${FIXNUM} SOVERSION ${VERNUM}) > endif() > + > +@@ -415,42 +415,42 @@ if(ZZIP_LIBLATEST) > + get_target_property(libname libzzip OUTPUT_NAME) > + get_target_property(librelease libzzip RELEASE_POSTFIX) > + set(libzzip_target "${lib}${libname}${dll}") > +- add_custom_command(OUTPUT ${libzzip_target} > +- COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${libzzip_target} > +- ) > +- add_custom_target(libzzip_latest ALL > +- DEPENDS ${libzzip_target} > +- ) > +- install(FILES > +- ${outdir}/${lib}${libname}${dll} > +- DESTINATION ${CMAKE_INSTALL_LIBDIR}) > ++# add_custom_command(OUTPUT ${libzzip_target} > ++# COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${libzzip_target} > ++# ) > ++# add_custom_target(libzzip_latest ALL > ++# DEPENDS ${libzzip_target} > ++# ) > ++# install(FILES > ++# ${outdir}/${lib}${libname}${dll} > ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}) > + if(ZZIPFSEEKO) > + get_target_property(libname libzzipfseeko OUTPUT_NAME) > + get_target_property(librelease libzzipfseeko RELEASE_POSTFIX) > + set(libzzipfseeko_target "${lib}${libname}${dll}") > +- add_custom_command(OUTPUT ${libzzipfseeko_target} > +- COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${libzzipfseeko_target} > +- ) > +- add_custom_target(libzzipfseeko_latest ALL > +- DEPENDS ${libzzipfseeko_target} > +- ) > +- install(FILES > +- ${outdir}/${lib}${libname}${dll} > +- DESTINATION ${CMAKE_INSTALL_LIBDIR}) > ++# add_custom_command(OUTPUT ${libzzipfseeko_target} > ++# COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${libzzipfseeko_target} > ++# ) > ++# add_custom_target(libzzipfseeko_latest ALL > ++# DEPENDS ${libzzipfseeko_target} > ++# ) > ++# install(FILES > ++# ${outdir}/${lib}${libname}${dll} > ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}) > + endif(ZZIPFSEEKO) > + if(ZZIPMMAPPED) > + get_target_property(libname libzzipmmapped OUTPUT_NAME) > + get_target_property(librelease libzzipmmapped RELEASE_POSTFIX) > + set(libzzipmmapped_target "${lib}${libname}${dll}") > +- add_custom_command(OUTPUT ${libzzipmmapped_target} > +- COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${libzzipmmapped_target} > +- ) > +- add_custom_target(libzzipmmaped_latest ALL > +- DEPENDS ${libzzipmmapped_target} > +- ) > +- install(FILES > +- ${outdir}/${lib}${libname}${dll} > +- DESTINATION ${CMAKE_INSTALL_LIBDIR}) > ++# add_custom_command(OUTPUT ${libzzipmmapped_target} > ++# COMMAND ${CMAKE_COMMAND} -E create_symlink $ ${libzzipmmapped_target} > ++# ) > ++# add_custom_target(libzzipmmaped_latest ALL > ++# DEPENDS ${libzzipmmapped_target} > ++# ) > ++# install(FILES > ++# ${outdir}/${lib}${libname}${dll} > ++# DESTINATION ${CMAKE_INSTALL_LIBDIR}) > + endif(ZZIPMMAPPED) > + endif(ZZIP_LIBLATEST) > > Index: patches/patch-zzip_mmapped_c > =================================================================== > RCS file: patches/patch-zzip_mmapped_c > diff -N patches/patch-zzip_mmapped_c > --- patches/patch-zzip_mmapped_c 10 Jan 2023 17:57:56 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,24 +0,0 @@ > -error: incompatible pointer to integer conversion > -https://github.com/gdraheim/zziplib/pull/141/commits/38e4d5f561318fa825e6544c2ef55ac5899c81b0 > - > -Index: zzip/mmapped.c > ---- zzip/mmapped.c.orig > -+++ zzip/mmapped.c > -@@ -661,7 +661,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR > - > - ___ /* a ZIP64 extended block may follow. */ > - size_t csize = zzip_file_header_csize(header); > -- off_t offset = zzip_file_header_to_data(header); > -+ size_t offset = zzip_file_header_sizeto_end(header); > - if (csize == 0xFFFFu) { > - struct zzip_extra_zip64* zip64 = > - zzip_file_header_to_extras(header); > -@@ -682,7 +682,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTR > - file->zlib.zalloc = Z_NULL; > - file->zlib.zfree = Z_NULL; > - file->zlib.avail_in = csize; > -- file->zlib.next_in = offset; > -+ file->zlib.next_in = (Bytef *)header + offset; > - ____; > - > - DBG2("compressed size %i", (int) file->zlib.avail_in); > Index: patches/patch-zzipwrap_CMakeLists_txt > =================================================================== > RCS file: /cvs/OpenBSD/ports/archivers/zziplib/patches/patch-zzipwrap_CMakeLists_txt,v > diff -u -p -u -r1.1 patch-zzipwrap_CMakeLists_txt > --- patches/patch-zzipwrap_CMakeLists_txt 8 Jul 2022 05:14:48 -0000 1.1 > +++ patches/patch-zzipwrap_CMakeLists_txt 15 May 2026 19:08:59 -0000 > @@ -1,7 +1,7 @@ > Index: zzipwrap/CMakeLists.txt > --- zzipwrap/CMakeLists.txt.orig > +++ zzipwrap/CMakeLists.txt > -@@ -48,7 +48,7 @@ add_library(libzzipwrap ${libzzipwrap_SRCS} ) > +@@ -53,7 +53,7 @@ add_library(libzzipwrap ${libzzipwrap_SRCS} ) > target_link_libraries(libzzipwrap libzzip ZLIB::ZLIB ) > target_include_directories(libzzipwrap PRIVATE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") > > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/OpenBSD/ports/archivers/zziplib/pkg/PLIST,v > diff -u -p -u -r1.9 PLIST > --- pkg/PLIST 8 Jul 2022 05:14:48 -0000 1.9 > +++ pkg/PLIST 15 May 2026 19:08:59 -0000 > @@ -12,12 +12,11 @@ include/SDL_rwops_zzip/ > include/SDL_rwops_zzip/SDL_rwops_zzip.c > include/SDL_rwops_zzip/SDL_rwops_zzip.h > include/zzip/ > -include/zzip-io.h > -include/zzip.h > include/zzip/_config.h > include/zzip/_msvc.h > -include/zzip/autoconf.h > +include/zzip/cdecl.h > include/zzip/conf.h > +include/zzip/cstdint.h > include/zzip/fetch.h > include/zzip/file.h > include/zzip/format.h > @@ -33,12 +32,16 @@ include/zzip/wrap.h > include/zzip/write.h > include/zzip/zzip.h > include/zzip/zzip32.h > -include/zziplib.h > +lib/cmake/ > +lib/cmake/zziplib/ > +lib/cmake/zziplib/zziplib-config.cmake > +lib/cmake/zziplib/zziplibTargets${MODCMAKE_BUILD_SUFFIX} > +lib/cmake/zziplib/zziplibTargets.cmake > @lib lib/libzzip.so.${LIBzzip_VERSION} > @lib lib/libzzipfseeko.so.${LIBzzipfseeko_VERSION} > @lib lib/libzzipmmapped.so.${LIBzzipmmapped_VERSION} > +@so lib/libzzipwrap.so > @lib lib/libzzipwrap.so.${LIBzzipwrap_VERSION} > -lib/pkgconfig/SDL_rwops_zzip.pc > lib/pkgconfig/zzipfseeko.pc > lib/pkgconfig/zziplib.pc > lib/pkgconfig/zzipmmapped.pc > @@ -62,26 +65,6 @@ lib/pkgconfig/zzipwrap.pc > @man man/man3/zzip_dir_stat.3 > @man man/man3/zzip_dirfd.3 > @man man/man3/zzip_dirhandle.3 > -@man man/man3/zzip_disk_buffer.3 > -@man man/man3/zzip_disk_close.3 > -@man man/man3/zzip_disk_entry_fopen.3 > -@man man/man3/zzip_disk_entry_strdup_comment.3 > -@man man/man3/zzip_disk_entry_strdup_name.3 > -@man man/man3/zzip_disk_entry_to_data.3 > -@man man/man3/zzip_disk_entry_to_file_header.3 > -@man man/man3/zzip_disk_fclose.3 > -@man man/man3/zzip_disk_feof.3 > -@man man/man3/zzip_disk_findfile.3 > -@man man/man3/zzip_disk_findfirst.3 > -@man man/man3/zzip_disk_findmatch.3 > -@man man/man3/zzip_disk_findnext.3 > -@man man/man3/zzip_disk_fopen.3 > -@man man/man3/zzip_disk_fread.3 > -@man man/man3/zzip_disk_init.3 > -@man man/man3/zzip_disk_mmap.3 > -@man man/man3/zzip_disk_munmap.3 > -@man man/man3/zzip_disk_new.3 > -@man man/man3/zzip_disk_open.3 > @man man/man3/zzip_entry_data_offset.3 > @man man/man3/zzip_entry_fclose.3 > @man man/man3/zzip_entry_feof.3 > @@ -104,6 +87,7 @@ lib/pkgconfig/zzipwrap.pc > @man man/man3/zzip_file_real.3 > @man man/man3/zzip_file_stat.3 > @man man/man3/zzip_filesize.3 > +@man man/man3/zzip_filesize32.3 > @man man/man3/zzip_fopen.3 > @man man/man3/zzip_fread.3 > @man man/man3/zzip_freopen.3 > @@ -111,6 +95,7 @@ lib/pkgconfig/zzipwrap.pc > @man man/man3/zzip_get_default_io.3 > @man man/man3/zzip_inflate_init.3 > @man man/man3/zzip_init_io.3 > +@man man/man3/zzip_io_size_off_t.3 > @man man/man3/zzip_open.3 > @man man/man3/zzip_open_ext_io.3 > @man man/man3/zzip_open_shared_io.3 > @@ -135,3 +120,4 @@ lib/pkgconfig/zzipwrap.pc > @man man/man3/zzip_telldir32.3 > share/aclocal/ > share/aclocal/zziplib.m4 > +share/pkgconfig/SDL_rwops_zzip.pc > > -- > Matthieu Herrb >