# -*- 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.8
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  0297743a8a7a24a9787bede54f2ff01cc57b1813 \
                    sha256  701547310415de300269331abe29cb5717aa1ea377af826bf513d0adfb1c209b \
                    size    466542

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.170  875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828 \
            memchr                           2.7.4  78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3 \
            memoffset                        0.9.1  488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a \
            once_cell                       1.20.3  945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e \
            portable-atomic                 1.11.0  350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e \
            proc-macro2                     1.0.93  60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99 \
            pyo3                            0.23.5  7778bffd85cf38175ac1f545509665d0b9b92a198ca7941f131f85f7a4f9a872 \
            pyo3-build-config               0.23.5  94f6cbe86ef3bf18998d9df6e0f3fc1050a8c5efa409bf712e661a4366e010fb \
            pyo3-ffi                        0.23.5  e9f1b4c431c0bb1c8fb0a338709859eed0d030ff6daa34368d3b152a63dfdd8d \
            pyo3-macros                     0.23.5  fbc2201328f63c4710f68abdf653c89d8dbc2858b88c5d88b0ff38a75288a9da \
            pyo3-macros-backend             0.23.5  fca6726ad0f3da9c9de093d6f116a93c1a38e417ed73bf138472cf4064f72028 \
            quote                           1.0.38  0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc \
            syn                             2.0.98  36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1 \
            target-lexicon                 0.12.16  61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1 \
            unicode-ident                   1.0.17  00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe \
            unindent                         0.2.3  c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce
    }
}
