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

# renameat
legacysupport.newest_darwin_requires_legacy 13

name                tevent
version             0.17.1
revision            0
categories          devel
license             LGPL-3+
maintainers         nomaintainer
description         event system
long_description    Tevent is an event system based on the talloc memory \
                    management library. It is the core event system used in \
                    Samba.

homepage            https://tevent.samba.org

master_sites        https://www.samba.org/ftp/${name}

checksums           rmd160  22e305f6879daee36f14a88dc3fd39fdf61170dd \
                    sha256  1be2dea737cde25fe06621f84945e63eb71259e0c43e9f8f5da482dab1a7be92 \
                    size    902444

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

depends_build       port:python${py_ver_nodot}

depends_lib         port:talloc

patchfiles          patch-samba-install.diff

# Missing required TLS support in pthread library
compiler.thread_local_storage   yes

configure.args      --disable-python
configure.python    ${prefix}/bin/python${py_ver}

build.env           PYTHON=${configure.python}
destroot.env        PYTHON=${configure.python}
