# -*- 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

github.setup        libyal libhmac 20260522
revision            0
categories          security devel crypto
license             LGPL-3+
maintainers         nomaintainer
description         Library to support cross-platform AES encryption
long_description    {*}${description}
distname            ${name}-alpha-${version}
checksums           rmd160  04ff35e05471a8c948b701d3b8de45e251594f7a \
                    sha256  769988eb1c80825f40be2bd519fe9825e35c4975b4df0af63683cf6832219942 \
                    size    1287793
github.tarball_from releases

worksrcdir          ${name}-${version}

set py_ver          3.14
set py_ver_nodot    [string map {. {}} ${py_ver}]

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

depends_lib-append  port:gettext-runtime \
                    port:libcerror \
                    port:libcfile \
                    port:libclocale \
                    port:libcnotify \
                    port:libcpath \
                    port:libcsplit \
                    port:libcthreads \
                    port:libiconv \
                    port:libuna \
                    port:python${py_ver_nodot}

configure.python    ${prefix}/bin/python${py_ver}
set python_root     ${frameworks_dir}/Python.framework/Versions/${py_ver}

configure.env-append \
                    PYTHON_CONFIG=${configure.python}-config

# TODO: FreeBSD disable openssl in these ports, but why?
configure.args-append \
                    --enable-python \
                    --with-libiconv-prefix=${prefix} \
                    --with-libintl-prefix=${prefix} \
                    --with-openssl=no \
                    --with-pyprefix=${python_root}
