# -*- 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 github 1.0 PortGroup legacysupport 1.1 # Availability.h legacysupport.newest_darwin_requires_legacy 8 github.setup tmux tmux 3.4 if {${subport} eq ${name}} { revision 1 conflicts tmux-devel } subport tmux-devel { github.setup tmux tmux 5039be657c4263f2539a149199cbc8d6780df1c3 version 20240712-[string range ${github.version} 0 6] revision 1 conflicts tmux } categories sysutils maintainers {evermeet.cx:tessarek @tessus} openmaintainer description terminal multiplexer long_description \ tmux is a \"terminal multiplexer\", it enables a number of terminals \ (or windows) to be accessed and controlled from a single terminal. \ tmux is intended to be a simple, modern, BSD-licensed alternative \ to programs such as GNU screen. homepage https://tmux.github.io license BSD depends_build path:bin/pkg-config:pkgconfig depends_lib port:libutf8proc \ port:libevent \ port:ncurses patchfiles queue.h.patch configure.args-append \ --enable-utf8proc \ --sysconfdir=${prefix}/etc if {${subport} eq ${name}} { github.tarball_from releases checksums rmd160 bb39acb78ce1f6e3ca227fb85b545eb8b44dc314 \ sha256 551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa \ size 707213 } subport tmux-devel { checksums rmd160 015b27238c59bd021332383ec0b5c9e82c79df51 \ sha256 80df57ded0ce6d75ebd0c473870a00cf44cbf20af2f59275e22889f010854fb0 \ size 1041760 use_autoreconf yes autoreconf.cmd ./autogen.sh autoreconf.args depends_build-append port:autoconf \ port:automake \ port:libtool post-extract { set reinplace_cmd [subst -nobackslashes -nocommands {s/AC_INIT\(\[tmux\], (next-[0-9]+\.[0-9]+)\)/AC_INIT([tmux], \1 (${version}))/g}] reinplace -E $reinplace_cmd ${worksrcpath}/configure.ac } # https://github.com/tmux/tmux/issues/4119 patchfiles-append patch-devel-gcc4.diff } platform darwin { if {${os.major} < 23} { # Before Sonoma, macOS lacked terminal descriptions for tmux, # tmux-256color. Fallback on a terminal definition that is available on # these older versions configure.args-append --with-TERM=screen-256color } } platform darwin 8 { # On Mac OS X 10.4 there's no libproc.h, so we use a previous version of osdep-darwin.c (c1b9948) post-extract { file copy -force ${filespath}/osdep-darwin.8.c ${worksrcpath}/osdep-darwin.c } # Normally `pkg-config ncurses --cflags` sets _XOPEN_SOURCE=600, which has a # side effect of setting _POSIX_C_SOURCE and hiding dozens of definitions # that are needed configure.env-append LIBNCURSES_CFLAGS=-D_APPLE_C_SOURCE # "No rule to make target `compat/forkpty-darwin.c'" depends_build-append port:gmake build.cmd gmake } post-destroot { xinstall -m 0755 -d ${destroot}${prefix}/share/doc/tmux xinstall -m 0644 ${worksrcpath}/example_tmux.conf ${destroot}${prefix}/share/doc/tmux xinstall -m 0755 -d ${destroot}${prefix}/share/vim/vimfiles/ftdetect xinstall -m 0644 ${filespath}/ftdetect-tmux.vim ${destroot}${prefix}/share/vim/vimfiles/ftdetect/tmux.vim } notes { On legacy systems, consider installing port tmux-pasteboard to\ integrate the system pasteboard with tmux. } github.livecheck.regex {([0-9.]+[a-z]?)}