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

name                libguestfs
version             1.58.1
revision            1
categories          devel
license             LGPL-2+ GPL-2+
maintainers         {makr @mohd-akram} openmaintainer

description         tools for accessing and modifying VM disk images

long_description    libguestfs is a set of tools for accessing and modifying \
                    virtual machine (VM) disk images. You can use this for \
                    viewing and editing files inside guests, scripting changes \
                    to VMs, monitoring disk used/free statistics, creating \
                    guests, P2V, V2V, performing backups, cloning VMs, building \
                    VMs, formatting disks, resizing disks, and much more.

homepage            https://libguestfs.org

set branch          [join [lrange [split ${version} .] 0 1] .]

master_sites        https://download.libguestfs.org/${branch}-stable

checksums           rmd160  d00bbf9d92d72f0b776ba264c873a52dd1bf719b \
                    sha256  1b8e5b4ef43e86302c3cedcb6fbc014be5bca5e85ca2875ef17c3cf67c671180 \
                    size    19012505

depends_build       path:bin/pkg-config:pkgconfig \
                    path:bin/grealpath:coreutils \
                    port:bash-completion \
                    port:gettext \
                    port:ocaml \
                    port:ocaml-findlib \
                    port:p${perl5.major}-module-build \
                    port:xorriso

depends_lib         port:gettext-runtime \
                    path:lib/pkgconfig/glib-2.0.pc:glib2 \
                    port:json-c \
                    port:libconfig-hr \
                    port:libvirt \
                    port:libxml2 \
                    port:ncurses \
                    port:pcre2 \
                    port:readline

depends_run         port:qemu

patchfiles          patch-hvf.diff

configure.args      --disable-daemon \
                    --disable-appliance \
                    --disable-fuse \
                    --disable-python \
                    --disable-ruby \
                    --with-java=no \
                    --disable-haskell \
                    --disable-php \
                    --disable-erlang \
                    --disable-lua \
                    --disable-golang \
                    --disable-rust \
                    --with-guestfs-path=${prefix}/lib/guestfs \
                    INSTALL_OCAMLLIB=${prefix}/lib/ocaml/site-lib

configure.perl      ${perl5.bin}

destroot.keepdirs   ${destroot}${prefix}/lib/guestfs
