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

name                py-dulwich
version             0.22.6
categories-append   devel
maintainers         {danchr @danchr} openmaintainer
license             {GPL-2+ Apache-2+}

description         Pure-Python Git Library
long_description    Simple Pure-Python implementation of the Git file \
                    formats and protocols. Dulwich is the place where \
                    Mr. and Mrs. Git live in one of the Monty Python sketches.

homepage            https://www.dulwich.io

checksums           ${distname}${extract.suffix} \
                    rmd160  f04759f31a7ebad396283f3415d193c743f67081 \
                    sha256  c1f44d599fa5dc59ca43e0789f835b8689b4d831d8de5ae009c442192a1408b5 \
                    size    450726

python.versions     39 310 311 312 313

set dulwich_darwin_min_ver 11

if {${name} ne ${subport}} {
    if {${python.version} < 310} {
        depends_build-append \
            port:py${python.version}-importlib-metadata
    }

    patchfiles      patch-archflags.diff

    depends_lib-append \
                    port:py${python.version}-urllib3

    if {${os.platform} eq "darwin" && ${os.major} < ${dulwich_darwin_min_ver}} {
        build.env-append \
                    PURE=1
    } else {
        PortGroup   rust 1.0

        depends_build-append \
                    port:py${python.version}-setuptools-rust

        cargo.crates \
        autocfg 1.4.0 ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26 \
        cfg-if 1.0.0 baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd \
        heck 0.5.0 2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea \
        indoc 2.0.5 b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5 \
        libc 0.2.162 18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398 \
        memchr 2.7.4 78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3 \
        memoffset 0.9.1 488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a \
        once_cell 1.20.2 1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775 \
        portable-atomic 1.9.0 cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2 \
        proc-macro2 1.0.89  f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e \
        pyo3 0.23.0 d51da03e17ef97ae4185cd606a4b316e04bb6f047d66913d6b57d4e6acfb41ec \
        pyo3-build-config 0.23.0 455f646b3d007fb6d85cffccff9c7dfb752f24ec9fb0a04cb49537e7e9bdc2dd \
        pyo3-ffi 0.23.0 432fc20d4dd419f8d1dd402a659bb42e75430706b50d367cc978978778638084 \
        pyo3-macros 0.23.0 ae1cd532e9356f90d1be1317d8bf51873e4a9468b9305b950c20e8aef786cc16 \
        pyo3-macros-backend 0.23.0 975b289b3d3901442a6def73eedf8251dc1aed2cdc0a80d1c4f3998d868a97aa \
        quote 1.0.37 b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af \
        syn 2.0.87 25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d \
        target-lexicon 0.12.16 61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1 \
        unicode-ident 1.0.13 e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe \
        unindent 0.2.3 c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce
    }
}
