# -*- 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.56.2
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  a03b672cbe5d1b72ef137832e6c814d2465ae321 \
                    sha256  bb44891a795e0b79213cee2c491495a6dd64b21f727445591730d7f78901689a \
                    size    19022635

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
