Files
2026-02-14 14:56:38 -05:00

74 lines
2.5 KiB
Tcl

# -*- 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
# memmem, filesystem
legacysupport.newest_darwin_requires_legacy 18
legacysupport.use_mp_libcxx yes
github.setup hzeller timg 1.6.3 v
github.tarball_from archive
revision 0
categories graphics
maintainers {outoforder.cc:urkle @urkle} openmaintainer
description Terminal Image and Video Viewer
long_description A user-friendly terminal image viewer that uses graphic \
capabilities of terminals (Sixel, Kitty or iterm2), or 24-Bit \
color capabilities and unicode character blocks if these are not \
available.
license GPL-2
homepage https://timg.sh/
checksums rmd160 346e156ef3cb6cf1620c0a3648194692f20c9c5b \
sha256 59c908867f18c81106385a43065c232e63236e120d5b2596b179ce56340d7b01 \
size 1223853
installs_libs no
depends_build-append \
path:bin/pkg-config:pkgconfig
set ffmpeg_v 8
depends_lib-append port:GraphicsMagick \
port:webp \
path:include/turbojpeg.h:libjpeg-turbo \
port:libexif \
port:ffmpeg${ffmpeg_v} \
port:libdeflate \
port:openslide \
path:lib/pkgconfig/poppler.pc:poppler
compiler.cxx_standard 2017
configure.pkg_config_path-append \
${prefix}/libexec/ffmpeg${ffmpeg_v}/lib/pkgconfig
configure.args-append \
-DWITH_OPENSLIDE_SUPPORT=ON \
-DTIMG_VERSION_FROM_GIT=OFF \
-DWITH_LIBSIXEL=OFF \
-DWITH_RSVG=OFF
variant librsvg description {Build with librsvg for best quality} {
configure.args-replace \
-DWITH_RSVG=OFF \
-DWITH_RSVG=ON
depends_lib-append \
path:lib/pkgconfig/librsvg-2.0.pc:librsvg \
path:lib/pkgconfig/cairo.pc:cairo
}
# https://trac.macports.org/ticket/71226
# https://github.com/hzeller/timg/issues/142
# timg requires a fresh librsvg, which is unbuildable on macOS <10.7
if {${os.platform} eq "darwin" && ${os.major} > 10} {
default_variants +librsvg
}