# -*- 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.16.2
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  22a69c33baad38169f4671d2eea770a689674ff8 \
                    sha256  f0bbd29dfabbcbbce9f4718fc165410cdd4f7d8ee1f3dfc54618d4c03199cea3 \
                    size    897447

set py_ver          3.13
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}
