# -*- 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           cmake 1.1
PortGroup           github 1.0
PortGroup           legacysupport 1.1

# getline
legacysupport.newest_darwin_requires_legacy 10
legacysupport.redirect_bins fzf

github.setup        barracuda156 fzfpp 572639c4323115b5cd8579fded76463aaebb8899
version             0.2.1
revision            0
categories          sysutils
license             BSD
maintainers         {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
description         Command-line fuzzy finder (C++ implementation)
long_description    fzf++ is a high-performance, API-compatible implementation \
                    of the popular fzf fuzzy finder, written in modern C++20. \
                    It provides fuzzy matching with Smith-Waterman algorithm, \
                    interactive TUI with real-time filtering, multi-select mode, \
                    preview window with command execution and support for UTF-8.
checksums           rmd160  52e12ab6bd79e677a910aba10ce081958cffa77b \
                    sha256  dd56b9dda196731756a8bf1a39e09fdca14ee34e9a75d1c084aa97aaeece720e \
                    size    112840
github.tarball_from archive

installs_libs       no
conflicts           fzf

depends_lib-append  port:CLI11 \
                    port:utfcpp

configure.args-append \
                    -DUSE_SYSTEM_CLI11=ON \
                    -DUSE_SYSTEM_UTFCPP=ON \
                    -DCMAKE_BUILD_TYPE=Release

compiler.cxx_standard 2020

if {[string match *gcc* ${configure.compiler}] && ${configure.build_arch} in [list arm i386 ppc]} {
    configure.ldflags-append \
                    -latomic
}
