From 01b3996d9adae4f8b2ff58f8e0de1a16720b8f43 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Sat, 30 Aug 2025 10:33:13 +0200 Subject: [PATCH] [7zip] Update, revise (#47119) --- ports/7zip/CMakeLists.txt | 297 ++++++++++-------- .../fix_timespec_get_broken_on_android.patch | 4 +- ports/7zip/portfile.cmake | 9 +- ports/7zip/sort-asm.diff | 13 + ports/7zip/vcpkg.json | 3 +- ports/openctm/portfile.cmake | 7 + ports/openctm/vcpkg.json | 2 +- scripts/vcpkg-tools.json | 22 +- versions/7-/7zip.json | 5 + versions/baseline.json | 6 +- versions/o-/openctm.json | 5 + 11 files changed, 225 insertions(+), 148 deletions(-) create mode 100644 ports/7zip/sort-asm.diff diff --git a/ports/7zip/CMakeLists.txt b/ports/7zip/CMakeLists.txt index e7a8e08962..74fad3423d 100644 --- a/ports/7zip/CMakeLists.txt +++ b/ports/7zip/CMakeLists.txt @@ -2,16 +2,40 @@ cmake_minimum_required(VERSION 3.19) project(7zip LANGUAGES C CXX) -if(VCPKG_TARGET_IS_WINDOWS) - enable_language(ASM_MASM) -elseif(VCPKG_TARGET_IS_LINUX) - enable_language(ASM) -endif() +# Starting points: +# DOC/readme.txt +# +# CPP/7zip/Bundles/Alone2 : 7-Zip console executable that supports all formats +# (but skip the bits for the executable) +# +# CPP/7zip/Bundles/Alone2/makefile : nmake (MSVC) +# -> CPP/7zip/Bundles/Format7zF/Arc.mak +# -> CPP/7zip/Bundles/7zip.mak +# +# CPP/7zip/Bundles/Alone2/(makefile.gcc|../../cmpl_.mak) : other +# -> CPP/7zip/Bundles/Format7zF/Arc_gcc.mak +# -> CPP/7zip/Bundles/7zip_gcc.mak + +option(USE_NO_ASM "Disable ASM") add_library(7zip) -# Check makefile in srcdir/CPP/7zip/Archive/7z/makefile +if(MSVC) + if(NOT USE_NO_ASM AND VCPKG_TARGET_ARCHITECTURE MATCHES "x86|x64") + enable_language(ASM_MASM) + endif() +else() + if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") + enable_language(ASM) + endif() +endif() +get_cmake_property(enabled_languages ENABLED_LANGUAGES) + + +# CPP/7zip/Bundles/Format7zF/Arc[_gcc].mak + target_sources(7zip PRIVATE + # COMPRESS_OBJS CPP/7zip/Compress/Bcj2Coder.cpp CPP/7zip/Compress/Bcj2Register.cpp CPP/7zip/Compress/BcjCoder.cpp @@ -24,7 +48,6 @@ target_sources(7zip PRIVATE CPP/7zip/Compress/BZip2Decoder.cpp CPP/7zip/Compress/BZip2Encoder.cpp CPP/7zip/Compress/BZip2Register.cpp - CPP/7zip/Compress/CodecExports.cpp CPP/7zip/Compress/CopyCoder.cpp CPP/7zip/Compress/CopyRegister.cpp CPP/7zip/Compress/Deflate64Register.cpp @@ -32,10 +55,7 @@ target_sources(7zip PRIVATE CPP/7zip/Compress/DeflateEncoder.cpp CPP/7zip/Compress/DeflateRegister.cpp CPP/7zip/Compress/DeltaFilter.cpp - #CPP/7zip/Compress/DllExports2Compress.cpp - #CPP/7zip/Compress/DllExportsCompress.cpp CPP/7zip/Compress/ImplodeDecoder.cpp - CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp CPP/7zip/Compress/LzfseDecoder.cpp CPP/7zip/Compress/LzhDecoder.cpp CPP/7zip/Compress/Lzma2Decoder.cpp @@ -67,6 +87,7 @@ target_sources(7zip PRIVATE CPP/7zip/Compress/ZlibEncoder.cpp CPP/7zip/Compress/ZstdDecoder.cpp + # CRYPTO_OBJS CPP/7zip/Crypto/7zAes.cpp CPP/7zip/Crypto/7zAesRegister.cpp CPP/7zip/Crypto/HmacSha1.cpp @@ -82,6 +103,7 @@ target_sources(7zip PRIVATE CPP/7zip/Crypto/ZipCrypto.cpp CPP/7zip/Crypto/ZipStrong.cpp + # C_OBJS C/7zBuf2.c C/7zStream.c C/Alloc.c @@ -100,8 +122,9 @@ target_sources(7zip PRIVATE C/Lzma2Dec.c C/Lzma2DecMt.c C/Lzma2Enc.c + C/LzmaDec.c C/LzmaEnc.c - C/LzmaLib.c + C/Md5.c C/MtCoder.c C/MtDec.c C/Ppmd7.c @@ -111,52 +134,44 @@ target_sources(7zip PRIVATE C/Ppmd8.c C/Ppmd8Dec.c C/Ppmd8Enc.c - C/Sha1.c - C/Sha256.c - C/Sort.c + C/Sha3.c + C/Sha512.c + C/Sha512Opt.c C/SwapBytes.c C/Threads.c + C/Xxh64.c C/Xz.c C/XzDec.c C/XzEnc.c C/XzIn.c - C/Aes.c - C/7zCrc.c - C/XzCrc64.c - C/Xxh64.c C/ZstdDec.c - C/Md5.c - C/Sha3.c - C/Sha512.c - C/Sha512Opt.c + # COMMON_OBJS CPP/Common/CRC.cpp CPP/Common/CrcReg.cpp CPP/Common/DynLimBuf.cpp CPP/Common/IntToString.cpp CPP/Common/LzFindPrepare.cpp + CPP/Common/Md5Reg.cpp CPP/Common/MyMap.cpp CPP/Common/MyString.cpp CPP/Common/MyVector.cpp - CPP/Common/MyWindows.cpp CPP/Common/MyXml.cpp CPP/Common/NewHandler.cpp - CPP/Common/Sha1Prepare.cpp CPP/Common/Sha1Reg.cpp - CPP/Common/Sha256Prepare.cpp CPP/Common/Sha256Reg.cpp + CPP/Common/Sha3Reg.cpp + CPP/Common/Sha512Reg.cpp + CPP/Common/Sha512Prepare.cpp CPP/Common/StringConvert.cpp CPP/Common/StringToInt.cpp CPP/Common/UTFConvert.cpp CPP/Common/Wildcard.cpp + CPP/Common/Xxh64Reg.cpp CPP/Common/XzCrc64Init.cpp CPP/Common/XzCrc64Reg.cpp - CPP/Common/Xxh64Reg.cpp - CPP/Common/Md5Reg.cpp - CPP/Common/Sha3Reg.cpp - CPP/Common/Sha512Prepare.cpp - CPP/Common/Sha512Reg.cpp + # 7ZIP_COMMON_OBJS CPP/7zip/Common/CreateCoder.cpp CPP/7zip/Common/CWrappers.cpp CPP/7zip/Common/InBuffer.cpp @@ -179,16 +194,20 @@ target_sources(7zip PRIVATE CPP/7zip/Common/UniqBlocks.cpp CPP/7zip/Common/VirtThread.cpp + # WIN_OBJS CPP/Windows/FileDir.cpp CPP/Windows/FileFind.cpp CPP/Windows/FileIO.cpp CPP/Windows/FileName.cpp CPP/Windows/PropVariant.cpp + CPP/Windows/PropVariantConv.cpp CPP/Windows/PropVariantUtils.cpp CPP/Windows/Synchronization.cpp CPP/Windows/System.cpp CPP/Windows/TimeUtils.cpp + # AR_OBJS + CPP/7zip/Archive/ApfsHandler.cpp CPP/7zip/Archive/ApmHandler.cpp CPP/7zip/Archive/ArHandler.cpp CPP/7zip/Archive/ArjHandler.cpp @@ -219,20 +238,21 @@ target_sources(7zip PRIVATE CPP/7zip/Archive/PpmdHandler.cpp CPP/7zip/Archive/QcowHandler.cpp CPP/7zip/Archive/RpmHandler.cpp + CPP/7zip/Archive/SparseHandler.cpp CPP/7zip/Archive/SplitHandler.cpp CPP/7zip/Archive/SquashfsHandler.cpp CPP/7zip/Archive/SwfHandler.cpp CPP/7zip/Archive/UefiHandler.cpp CPP/7zip/Archive/VdiHandler.cpp CPP/7zip/Archive/VhdHandler.cpp + CPP/7zip/Archive/VhdxHandler.cpp CPP/7zip/Archive/VmdkHandler.cpp CPP/7zip/Archive/XarHandler.cpp CPP/7zip/Archive/XzHandler.cpp CPP/7zip/Archive/ZHandler.cpp - CPP/7zip/Archive/ArchiveExports.cpp - CPP/7zip/Archive/DllExports2.cpp CPP/7zip/Archive/ZstdHandler.cpp + # AR_COMMON_OBJS CPP/7zip/Archive/Common/CoderMixer2.cpp CPP/7zip/Archive/Common/DummyOutStream.cpp CPP/7zip/Archive/Common/FindSignature.cpp @@ -244,6 +264,7 @@ target_sources(7zip PRIVATE CPP/7zip/Archive/Common/HandlerOut.cpp CPP/7zip/Archive/Common/ParseProperties.cpp + # 7Z_OBJS CPP/7zip/Archive/7z/7zCompressionMode.cpp CPP/7zip/Archive/7z/7zDecode.cpp CPP/7zip/Archive/7z/7zEncode.cpp @@ -259,28 +280,34 @@ target_sources(7zip PRIVATE CPP/7zip/Archive/7z/7zUpdate.cpp CPP/7zip/Archive/7z/7zRegister.cpp + # CAB_OBJS CPP/7zip/Archive/Cab/CabBlockInStream.cpp CPP/7zip/Archive/Cab/CabHandler.cpp CPP/7zip/Archive/Cab/CabHeader.cpp CPP/7zip/Archive/Cab/CabIn.cpp CPP/7zip/Archive/Cab/CabRegister.cpp + # CHM_OBJS CPP/7zip/Archive/Chm/ChmHandler.cpp CPP/7zip/Archive/Chm/ChmIn.cpp + # ISO_OBJS CPP/7zip/Archive/Iso/IsoHandler.cpp CPP/7zip/Archive/Iso/IsoHeader.cpp CPP/7zip/Archive/Iso/IsoIn.cpp CPP/7zip/Archive/Iso/IsoRegister.cpp + # NSIS_OBJS CPP/7zip/Archive/Nsis/NsisDecode.cpp CPP/7zip/Archive/Nsis/NsisHandler.cpp CPP/7zip/Archive/Nsis/NsisIn.cpp CPP/7zip/Archive/Nsis/NsisRegister.cpp + # RAR_OBJS CPP/7zip/Archive/Rar/RarHandler.cpp CPP/7zip/Archive/Rar/Rar5Handler.cpp + # TAR_OBJS CPP/7zip/Archive/Tar/TarHandler.cpp CPP/7zip/Archive/Tar/TarHandlerOut.cpp CPP/7zip/Archive/Tar/TarHeader.cpp @@ -289,14 +316,17 @@ target_sources(7zip PRIVATE CPP/7zip/Archive/Tar/TarUpdate.cpp CPP/7zip/Archive/Tar/TarRegister.cpp + # UDF_OBJS CPP/7zip/Archive/Udf/UdfHandler.cpp CPP/7zip/Archive/Udf/UdfIn.cpp + # WIM_OBJS CPP/7zip/Archive/Wim/WimHandler.cpp CPP/7zip/Archive/Wim/WimHandlerOut.cpp CPP/7zip/Archive/Wim/WimIn.cpp CPP/7zip/Archive/Wim/WimRegister.cpp + # ZIP_OBJS CPP/7zip/Archive/Zip/ZipAddCommon.cpp CPP/7zip/Archive/Zip/ZipHandler.cpp CPP/7zip/Archive/Zip/ZipHandlerOut.cpp @@ -305,111 +335,124 @@ target_sources(7zip PRIVATE CPP/7zip/Archive/Zip/ZipOut.cpp CPP/7zip/Archive/Zip/ZipUpdate.cpp CPP/7zip/Archive/Zip/ZipRegister.cpp - - CPP/7zip/Archive/Archive2.def - C/Util/LzmaLib/LzmaLib.def ) -# 7zCrcOpt -if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/7zCrcOpt.asm) - set_source_files_properties(Asm/x86/7zCrcOpt.asm PROPERTIES LANGUAGE ASM_MASM) - else() - target_sources(7zip PRIVATE C/7zCrcOpt.c) - endif() -else() - target_sources(7zip PRIVATE C/7zCrcOpt.c) -endif() +# Included by CPP/7zip/Bundles/Format7zF/Arc[_gcc].mak -# AesOpt -if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/AesOpt.asm) - set_source_files_properties(Asm/x86/AesOpt.asm PROPERTIES LANGUAGE ASM_MASM) - else() - target_sources(7zip PRIVATE C/AesOpt.c) - endif() +# CPP/7zip/Aes.mak +target_sources(7zip PRIVATE C/Aes.c) +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/x86/AesOpt.asm) + set_source_files_properties(Asm/x86/AesOpt.asm PROPERTIES LANGUAGE ASM_MASM) else() target_sources(7zip PRIVATE C/AesOpt.c) endif() -# LzFindOpt -if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/LzFindOpt.asm) - set_source_files_properties(Asm/x86/LzFindOpt.asm PROPERTIES LANGUAGE ASM_MASM) - else() - target_sources(7zip PRIVATE C/LzFindOpt.c) - endif() +# CPP/7zip/Crc.mak +target_sources(7zip PRIVATE C/7zCrc.c) +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/x86/7zCrcOpt.asm) + set_source_files_properties(Asm/x86/7zCrcOpt.asm PROPERTIES LANGUAGE ASM_MASM) else() - target_sources(7zip PRIVATE C/LzFindOpt.c) + target_sources(7zip PRIVATE C/7zCrcOpt.c) endif() -# LzmaDecOpt -target_sources(7zip PRIVATE C/LzmaDec.c) -if((VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") OR - (VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - ) - if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/LzmaDecOpt.asm) - set_source_files_properties(Asm/x86/LzmaDecOpt.asm PROPERTIES LANGUAGE ASM_MASM) - elseif(VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") - target_sources(7zip PRIVATE Asm/arm64/LzmaDecOpt.S) - set_source_files_properties(Asm/x86/LzmaDecOpt.asm PROPERTIES LANGUAGE ASM) - endif() - - get_source_file_property(defs C/LzmaDec.c COMPILE_DEFINITIONS) - list(APPEND defs "_LZMA_DEC_OPT") - set_source_files_properties(C/LzmaDec.c PROPERTIES COMPILE_DEFINITIONS "${defs}") -endif() - -# Sha1Opt -if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/Sha1Opt.asm) - set_source_files_properties(Asm/x86/Sha1Opt.asm PROPERTIES LANGUAGE ASM_MASM) - else() - target_sources(7zip PRIVATE C/Sha1Opt.c) - endif() -else() - target_sources(7zip PRIVATE C/Sha1Opt.c) -endif() - -# Sha256Opt -if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/Sha256Opt.asm) - set_source_files_properties(Asm/x86/Sha256Opt.asm PROPERTIES LANGUAGE ASM_MASM) - else() - target_sources(7zip PRIVATE C/Sha256Opt.c) - endif() -else() - target_sources(7zip PRIVATE C/Sha256Opt.c) -endif() - -# XzCrc64Opt -if(VCPKG_TARGET_IS_WINDOWS) - if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - target_sources(7zip PRIVATE Asm/x86/XzCrc64Opt.asm) - set_source_files_properties(Asm/x86/XzCrc64Opt.asm PROPERTIES LANGUAGE ASM_MASM) - else() - target_sources(7zip PRIVATE C/XzCrc64Opt.c) - endif() +# CPP/7zip/Crc64.mak +target_sources(7zip PRIVATE C/XzCrc64.c) +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/x86/XzCrc64Opt.asm) + set_source_files_properties(Asm/x86/XzCrc64Opt.asm PROPERTIES LANGUAGE ASM_MASM) else() target_sources(7zip PRIVATE C/XzCrc64Opt.c) endif() -target_compile_definitions(7zip - PUBLIC - -D_REENTRANT - -D_FILE_OFFSET_BITS=64 - -D_LARGEFILE_SOURCE - -DEXTERNAL_CODECS - -D_7ZIP_LARGE_PAGES - -DUNICODE - -D_UNICODE +# CPP/7zip/LzFindOpt.mak +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + target_sources(7zip PRIVATE Asm/x86/LzFindOpt.asm) + set_source_files_properties(Asm/x86/LzFindOpt.asm PROPERTIES LANGUAGE ASM_MASM) +else() + target_sources(7zip PRIVATE C/LzFindOpt.c) +endif() + +# CPP/7zip/LzmaDec[_gcc].mak +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + target_sources(7zip PRIVATE Asm/x86/LzmaDecOpt.asm) + set_source_files_properties(Asm/x86/LzmaDecOpt.asm PROPERTIES LANGUAGE ASM_MASM) + target_compile_definitions(7zip PRIVATE Z7_LZMA_DEC_OPT) +elseif("ASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/arm64/LzmaDecOpt.S) +endif() + +# CPP/7zip/Sha1.mak +target_sources(7zip PRIVATE CPP/Common/Sha1Prepare.cpp C/Sha1.c) +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/x86/Sha1Opt.asm) + set_source_files_properties(Asm/x86/Sha1Opt.asm PROPERTIES LANGUAGE ASM_MASM) +else() + target_sources(7zip PRIVATE C/Sha1Opt.c) +endif() + +# CPP/7zip/Sha256.mak +target_sources(7zip PRIVATE CPP/Common/Sha256Prepare.cpp C/Sha256.c) +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/x86/Sha256Opt.asm) + set_source_files_properties(Asm/x86/Sha256Opt.asm PROPERTIES LANGUAGE ASM_MASM) +else() + target_sources(7zip PRIVATE C/Sha256Opt.c) +endif() + +# Sort +if("ASM_MASM" IN_LIST enabled_languages AND NOT USE_NO_ASM) + target_sources(7zip PRIVATE Asm/x86/Sort.asm) + set_source_files_properties(Asm/x86/Sort.asm PROPERTIES LANGUAGE ASM_MASM) +else() + target_sources(7zip PRIVATE C/Sort.c) +endif() + +# CPP/7zip/Bundles/Format7zF/makefile[_gcc].mak +# CPP/7zip/7zip[_gcc].mak + +target_compile_definitions(7zip PRIVATE Z7_EXTERNAL_CODECS) +target_sources(7zip PRIVATE + CPP/7zip/Archive/ArchiveExports.cpp + CPP/7zip/Archive/DllExports2.cpp + CPP/7zip/Compress/CodecExports.cpp ) +if(WIN32) + target_compile_definitions(7zip + PUBLIC + -DUNICODE + -D_UNICODE + ) + target_sources(7zip PRIVATE + CPP/7zip/Archive/Archive2.def + CPP/7zip/Bundles/Format7zF/resource.rc + ) +else() + target_sources(7zip PRIVATE + CPP/Common/MyWindows.cpp + ) +endif() +if(NOT MSVC) + target_compile_definitions(7zip + PUBLIC + -D_REENTRANT + -D_FILE_OFFSET_BITS=64 + -D_LARGEFILE_SOURCE + ) +endif() + + +# LZMA SDK API, cf. #44085. +# Implementation is already in the 7zip lib. + +target_sources(7zip PRIVATE + C/LzmaLib.c + C/Util/LzmaLib/LzmaLib.def +) + + +# install target_include_directories(7zip INTERFACE @@ -441,13 +484,13 @@ install (FILES ${HEADERS} DESTINATION "include/7zip/CPP/7zip/Archive") include(CMakePackageConfigHelpers) configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/7zip-config.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/7zip-config.cmake" - INSTALL_DESTINATION "share/7zip" + "${CMAKE_CURRENT_SOURCE_DIR}/7zip-config.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/7zip-config.cmake" + INSTALL_DESTINATION "share/7zip" ) install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/7zip-config.cmake" - DESTINATION "share/7zip" + FILES "${CMAKE_CURRENT_BINARY_DIR}/7zip-config.cmake" + DESTINATION "share/7zip" ) install( diff --git a/ports/7zip/fix_timespec_get_broken_on_android.patch b/ports/7zip/fix_timespec_get_broken_on_android.patch index 87c2d99acd..2b0cad7866 100644 --- a/ports/7zip/fix_timespec_get_broken_on_android.patch +++ b/ports/7zip/fix_timespec_get_broken_on_android.patch @@ -3,10 +3,10 @@ index bbd79ba..8df3ea3 100644 --- a/CPP/Windows/TimeUtils.cpp +++ b/CPP/Windows/TimeUtils.cpp @@ -259,7 +259,7 @@ bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, - Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, Cygwin 2.9, mingw, MSVC 14, Android 9.0. + Android NDK defines TIME_UTC but doesn't have the timespec_get(). */ --#if defined(TIME_UTC) +-#if defined(TIME_UTC) && !defined(__ANDROID__) +#if defined(TIME_UTC) && (!defined(__ANDROID__) || __ANDROID_API__ >= 29) #define ZIP7_USE_timespec_get // #pragma message("ZIP7_USE_timespec_get") diff --git a/ports/7zip/portfile.cmake b/ports/7zip/portfile.cmake index 083b4578f9..c732702caf 100644 --- a/ports/7zip/portfile.cmake +++ b/ports/7zip/portfile.cmake @@ -1,10 +1,13 @@ +string(REGEX REPLACE "[.]([0-9])\$" ".0\\1" upstream_version "${VERSION}") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ip7z/7zip - REF "${VERSION}" - SHA512 dc0241ed96907965445550912d1171fe32230a52997b089558a4cc73a662fc6a17940db8dcb0794b805268964899d9e5a48ddb444e92b56fd243bbaa17c20a1c + REF "${upstream_version}" + SHA512 eb5ed600f82aca52f6dc8d2be3e4da4380670308dff2bcbfc96255d9d23bb5ca35dea073bd97070f0a1891b2f329d88a06b304f48e30f4ad89256c7664e9c1ea HEAD_REF main PATCHES + sort-asm.diff fix_timespec_get_broken_on_android.patch ) @@ -13,6 +16,8 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/7zip-config.cmake.in" DESTINATION "${SOURCE vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DVCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}" ) vcpkg_cmake_install() diff --git a/ports/7zip/sort-asm.diff b/ports/7zip/sort-asm.diff new file mode 100644 index 0000000000..63e3f5ec16 --- /dev/null +++ b/ports/7zip/sort-asm.diff @@ -0,0 +1,13 @@ +diff --git a/Asm/x86/Sort.asm b/Asm/x86/Sort.asm +index 517c615..85e167e 100644 +--- a/Asm/x86/Sort.asm ++++ b/Asm/x86/Sort.asm +@@ -1,7 +1,7 @@ + ; SortTest.asm -- ASM version of HeapSort() function + ; Igor Pavlov : Public domain + +-include ../../../../Asm/x86/7zAsm.asm ++include 7zAsm.asm + + MY_ASM_START + diff --git a/ports/7zip/vcpkg.json b/ports/7zip/vcpkg.json index a68bbe21e0..4f0eb43999 100644 --- a/ports/7zip/vcpkg.json +++ b/ports/7zip/vcpkg.json @@ -1,7 +1,6 @@ { "name": "7zip", - "version-string": "24.09", - "port-version": 1, + "version": "25.1", "description": "Library for archiving file with a high compression ratio.", "homepage": "https://www.7-zip.org", "license": "LGPL-2.1-or-later", diff --git a/ports/openctm/portfile.cmake b/ports/openctm/portfile.cmake index f62432c39f..17c29cc463 100644 --- a/ports/openctm/portfile.cmake +++ b/ports/openctm/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_sourceforge( PATCHES use-7zip.patch ) +file(REMOVE_RECURSE "${SOURCE_PATH}/lib/liblzma") file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") @@ -18,6 +19,12 @@ vcpkg_cmake_install() vcpkg_copy_pdbs() vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-openctm) +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/unofficial-openctm/unofficial-openctmConfig.cmake" +"# Generated by CMake" +[[# Generated by CMake +include(CMakeFindDependencyMacro) +find_dependency(7zip CONFIG)]]) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") diff --git a/ports/openctm/vcpkg.json b/ports/openctm/vcpkg.json index 82081186cb..1b1212d983 100644 --- a/ports/openctm/vcpkg.json +++ b/ports/openctm/vcpkg.json @@ -1,7 +1,7 @@ { "name": "openctm", "version": "1.0.3", - "port-version": 2, + "port-version": 3, "description": "OpenCTM — the Open Compressed Triangle Mesh file format — is a file format, a software library and a tool set for compression of 3D triangle meshes.", "homepage": "https://openctm.sourceforge.net/", "license": "Zlib", diff --git a/scripts/vcpkg-tools.json b/scripts/vcpkg-tools.json index a6215bb59e..9ea57f8f30 100644 --- a/scripts/vcpkg-tools.json +++ b/scripts/vcpkg-tools.json @@ -222,28 +222,28 @@ { "name": "7zip_msi", "os": "windows", - "version": "24.08", + "version": "25.01", "executable": "Files/7-Zip/7z.exe", - "url": "https://github.com/ip7z/7zip/releases/download/24.08/7z2408-x64.msi", - "sha512": "3259bf5e251382333c9d18a3fc01d83491fb41bc4ac4ddb25a02918494594c1074482b6608189a8a89e343d78e34d57420cdeff1d7ace5acfdcaacc8776f1be8", - "archive": "7z2408-x64.msi" + "url": "https://github.com/ip7z/7zip/releases/download/25.01/7z2501-x64.msi", + "sha512": "d481c49ff571d86e29eb9df700be4c79fe5a4bc8616b1524a3c10ef5ad3592a9d495b057e8be20952437760aad020087aca5ee9c73ddd716285a9848257fc1dc", + "archive": "7z2501-x64.msi" }, { "name": "7zip", "os": "windows", - "version": "24.09", + "version": "25.01", "executable": "7z.exe", - "url": "https://github.com/ip7z/7zip/releases/download/24.09/7z2409.exe", - "sha512": "a39a84b13b383ac5fca20eb6d92ec6b8bc85f1b6a545c441efdbe054d8d12c9ebe97d366235bdf1383bbdb2a9666d18d0145b10b6e589180502c0c2dfa26ef14", - "archive": "7z2409.7z.exe" + "url": "https://github.com/ip7z/7zip/releases/download/25.01/7z2501.exe", + "sha512": "1d6dd5ecadb2809dc4ee8ec6b022513cf7aa4f12ed6de2869c90c8c0f04db006fd0da214a7cdf3117572d4f9ea3f2e96de1af9e6042e9acff54ea2c177eda47a", + "archive": "7z2501.7z.exe" }, { "name": "7zr", "os": "windows", - "version": "24.09", + "version": "25.01", "executable": "7zr.exe", - "url": "https://github.com/ip7z/7zip/releases/download/24.09/7zr.exe", - "sha512": "44d8504a693ad4d6b79631b653fc19b572de6bbe38713b53c45d9c9d5d3710aa8df93ee867a2a24419ebe883b8255fd18f30f8cf374b2242145fd6acb2189659" + "url": "https://github.com/ip7z/7zip/releases/download/25.01/7zr.exe", + "sha512": "7d84fcad0a6a1cf8c2e7bb01606c671cd91bf2691595eee1f0d67c89711c551778188423f07bbbfdced6ea03eda33b513fffa39584c60e9a5079a0efb7e73bb0" }, { "name": "ninja", diff --git a/versions/7-/7zip.json b/versions/7-/7zip.json index d8b4ec5b6b..71db2f9ae3 100644 --- a/versions/7-/7zip.json +++ b/versions/7-/7zip.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a92e7bbff417f0728def797557491c0251d2602e", + "version": "25.1", + "port-version": 0 + }, { "git-tree": "68564a79f07645b24c9267fef692229c7a888559", "version-string": "24.09", diff --git a/versions/baseline.json b/versions/baseline.json index e21572fd31..bde46dbb7c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5,8 +5,8 @@ "port-version": 5 }, "7zip": { - "baseline": "24.09", - "port-version": 1 + "baseline": "25.1", + "port-version": 0 }, "ableton": { "baseline": "3.0.6", @@ -7010,7 +7010,7 @@ }, "openctm": { "baseline": "1.0.3", - "port-version": 2 + "port-version": 3 }, "opencv": { "baseline": "4.11.0", diff --git a/versions/o-/openctm.json b/versions/o-/openctm.json index 2c17747bca..33f21e03b1 100644 --- a/versions/o-/openctm.json +++ b/versions/o-/openctm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2c2cb06ce7f3751453d09b83d72c9c0773659896", + "version": "1.0.3", + "port-version": 3 + }, { "git-tree": "b9d159314b1bcd35f33fe6cc1f2c4ffa1ce50340", "version": "1.0.3",