# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup legacysupport 1.1 PortGroup makefile 1.0 PortGroup compiler_blacklist_versions 1.0 # utimensat legacysupport.newest_darwin_requires_legacy 16 name 7zip version 24.09 revision 0 categories archivers license LGPL-2.1 maintainers {gmail.com:srirangav @srirangav} openmaintainer description ${name} is a file archiver with a high compression ratio. long_description ${name} is a file archiver that has a high compression \ ratio in 7z format with LZMA and LZMA2 compression, \ supports packing and unpacking XZ, BZIP2, GZIP, TAR, \ ZIP and WIM archives, and unpacking AR, ARJ, CAB, CHM, \ CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, \ LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, \ UDF, UEFI, VDI, VHD, VHDX, VMDK, WIM, XAR and Z archives. homepage https://www.7-zip.org master_sites ${homepage}/a/ supported_archs arm64 x86_64 use_xz yes distname 7z[string map {. {}} ${version}]-src checksums rmd160 1fbcad35e77fe3e7dac96bcf437cddae7a530aca \ sha256 49c05169f49572c1128453579af1632a952409ced028259381dac30726b6133a \ size 1511288 extract.mkdir yes patchfiles patch-7zip_gcc_mak.diff post-patch { reinplace "s|#include |//#include |" \ ${worksrcpath}/CPP/7zip/Common/FileStreams.cpp \ ${worksrcpath}/CPP/7zip/UI/Common/UpdateCallback.cpp # needed for legacysupport reinplace "s|LDFLAGS = $\(LDFLAGS_STATIC\)|LDFLAGS += $\(LDFLAGS_STATIC\)|" \ ${worksrcpath}/C/7zip_gcc_c.mak \ ${worksrcpath}/CPP/7zip/7zip_gcc.mak # ld: warning: option -s is obsolete and being ignored # atom not found in symbolIndex on 10.6 reinplace "s|LFLAGS_STRIP = -s|LFLAGS_STRIP =|" \ ${worksrcpath}/C/7zip_gcc_c.mak \ ${worksrcpath}/CPP/7zip/7zip_gcc.mak # do not force -O2 flag during compilation reinplace "s|CFLAGS_BASE = $\(MY_ARCH_2\) -O2|CFLAGS_BASE = $\(MY_ARCH_2\) -O2 ${configure.cflags}|" \ ${worksrcpath}/C/7zip_gcc_c.mak reinplace "s|CFLAGS_BASE = -O2|CFLAGS_BASE = -O2 ${configure.cxxflags}|" \ ${worksrcpath}/CPP/7zip/7zip_gcc.mak } # uses newer assembly features on Intel compiler.blacklist-append {*gcc-[3-4].*} {clang < 1100} build.dir ${worksrcpath}/CPP/7zip/Bundles/Alone2 if {${build_arch} eq "x86_64"} { build.args-append -f ../../cmpl_mac_x64.mak destroot { xinstall -m 755 \ -s ${worksrcpath}/CPP/7zip/Bundles/Alone2/b/m_x64/7zz \ ${destroot}${prefix}/bin } } elseif {${build_arch} eq "arm64"} { build.args-append -f ../../cmpl_mac_arm64.mak destroot { xinstall -m 755 \ -s ${worksrcpath}/CPP/7zip/Bundles/Alone2/b/m_arm64/7zz \ ${destroot}${prefix}/bin } } post-destroot { set docdir ${prefix}/share/doc/${subport} xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath}/DOC/ \ 7zC.txt 7zFormat.txt 7zip.hhp 7zip.wxs copying.txt License.txt lzma.txt Methods.txt \ readme.txt src-history.txt unRarLicense.txt \ ${destroot}${docdir} } livecheck.type regex livecheck.url https://www.7-zip.org/history.txt livecheck.regex "^(\\d+.\\d+)"