# -*- 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           cmake 1.1
PortGroup           openssl 1.0

github.setup        mtrojnar osslsigncode 2.10
github.tarball_from archive
conflicts           osslsigncode-devel
revision            0

categories          devel security
maintainers         nomaintainer
license             GPL-3

description         OpenSSL-based signcode utility
long_description    Platform-independent tool for Authenticode signing of \
                    PE(EXE/SYS/DLL/etc), CAB and MSI files - uses OpenSSL \
                    and libcurl. It also supports timestamping (Authenticode \
                    and RFC3161).

checksums           rmd160  f8bf0b6c79e31a2681a0f7aff6460672fbbc0cce \
                    sha256  2a864e6127ee2350fb648070fa0d459c534ac6400ca0048886aeab7afb250f65 \
                    size    1038769

compiler.c_standard 2011

set py_ver          3.13
set py_ver_nodot    [string map {. {}} ${py_ver}]
configure.args-append -DPython3_EXECUTABLE=${prefix}/bin/python${py_ver}

depends_build-append \
                    path:bin/pkg-config:pkgconfig \
                    port:python${py_ver_nodot} \
                    port:py${py_ver_nodot}-cryptography

depends_lib-append  port:zlib

test.run            yes
test.cmd            ctest

subport osslsigncode-devel {
    github.setup    mtrojnar osslsigncode c23f92ca682c655442754ae8aa807467843e50ac
    github.tarball_from archive
    version         20250922

    checksums       rmd160  45e67cb722831dc70ad9d8ad3864e03a2aabebfa \
                    sha256  62e273e557b3e019e5cd9b126b6688a7e0cc2cf1656309a4093fc1bf58b32544 \
                    size    1039617

    conflicts       osslsigncode
}
