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

legacysupport.newest_darwin_requires_legacy 0

github.setup        guyiicn cli-reader 14c795a2179e3cda76949bec034c0e59df87969e
version             20250818
revision            0
categories          office sysutils
license             MIT
maintainers         nomaintainer
description         Terminal e-book reader
long_description    ${name}: epub, txt, md, mobi and azw3.
checksums           rmd160  b9203b6e27a60f053ed039d13ce9985c78a2583e \
                    sha256  90356d5f9674485f7f156bab8fff9a2b5faf74391679e5218eebe4877d5fc434 \
                    size    186393
github.tarball_from archive

legacysupport.redirect_bins new_lastreader

# https://github.com/guyiicn/cli-reader/issues/1
# https://github.com/guyiicn/cli-reader/issues/3
patchfiles-append   patch-CMakeLists.txt

depends_build-append \
                    path:bin/pkg-config:pkgconfig

depends_lib-append  port:cpr \
                    port:FTXUI \
                    port:gumbo-parser \
                    port:libmobi \
                    port:libzip \
                    port:ncurses \
                    port:nlohmann-json \
                    path:lib/pkgconfig/poppler.pc:poppler \
                    port:sqlite3 \
                    port:tinyxml2 \
                    port:zlib

compiler.cxx_standard   2017

# https://github.com/guyiicn/cli-reader/issues/4
notes "
During initial set-up please set the library path explicitly. Default value ~/.all_reader will do.
"
