# -*- 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 github 1.0 PortGroup makefile 1.0 github.setup hashcat hashcat 7.0.0 v github.tarball_from archive revision 1 categories security platforms {darwin >= 19} license MIT maintainers @gaming-hacker openmaintainer description World's fastest and most advanced password recovery utility. long_description hashcat is the world's fastest and most advanced \ password recovery utility, supporting five unique modes \ of attack for over 200 highly-optimized hashing algorithms. \ hashcat currently supports CPUs, GPUs, and other hardware \ accelerators on Linux, Windows, and macOS, and has \ facilities to help enable distributed password cracking homepage https://hashcat.net/hashcat/ build.target {} checksums rmd160 251e1f0a26605774babdf6411c556580659fda78 \ sha256 842b71d0d34b02000588247aae9fec9a0fc13277f2cd3a6a4925b0f09b33bf75 \ size 19084663 set python_branch 3.13 set python_version [string map {. ""} ${python_branch}] set perl_version 5.34 depends_lib-append port:xxhash \ port:zlib \ port:minizip \ port:libiconv \ port:python${python_version} depends_run-append port:py${python_version}-python-snappy \ port:py${python_version}-plyvel \ port:py${python_version}-cryptography \ port:py${python_version}-pycryptodome \ port:py${python_version}-protobuf3 \ port:py${python_version}-asn1 \ port:perl${perl_version} \ port:p${perl_version}-dbd-sqlite patchfiles-append patch-remove-arch.patch post-patch { reinplace "s|MACOSX_DEPLOYMENT_TARGET=15.0|MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}|" ${worksrcpath}/src/Makefile reinplace "s|python3-config|${prefix}/bin/python${python_branch}-config|" {*}[glob ${worksrcpath}/src/bridges/bridge_python_*.mk] reinplace -E "s|#! */usr/bin/(env)* *python3*|#!${prefix}/bin/python${python_branch}\\\n|" {*}[glob ${worksrcpath}/tools/*hashcat.py] reinplace "s|#! */usr/bin/env *perl|#!${prefix}/bin/perl${perl_version}|" {*}[glob ${worksrcpath}/tools/*hashcat.pl] # These scripts are missing shebang foreach script {shiro1-to-hashcat keybag2hashcat veeamvbk2hashcat bitlocker2hashcat} { system -W ${worksrcpath}/tools "grep -q '^#!' ${script}.py || sed -i '' '1i\\\n#!${prefix}/bin/python${python_branch}\\\n\\\n' ${script}.py" } } set build_env { SHARED=1 USE_SYSTEM_ZLIB=1 USE_SYSTEM_OPENCL=1 USE_SYSTEM_XXHASH=1 } build.env-append {*}$build_env destroot.env-append {*}$build_env post-destroot { xinstall -d ${destroot}${prefix}/share/bash-completion/completions xinstall -m 0644 ${worksrcpath}/extra/tab_completion/${name}.sh ${destroot}${prefix}/share/bash-completion/completions/${name} }