Bug 263864 - [NEW PORT] sysutils/vtm: Terminal multiplexer with window manager and session sharing
Summary: [NEW PORT] sysutils/vtm: Terminal multiplexer with window manager and session...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-08 16:06 UTC by Daniel Pérez
Modified: 2025-03-16 10:26 UTC (History)
2 users (show)

See Also:


Attachments
Diff patch for the tree (1.90 KB, patch)
2022-05-08 16:06 UTC, Daniel Pérez
no flags Details | Diff
sysutils/vtm.patch (1.88 KB, patch)
2025-03-08 00:20 UTC, Yusuf Yaman
no flags Details | Diff
sysutils/vtm.patch (3.10 KB, patch)
2025-03-08 16:31 UTC, Yusuf Yaman
no flags Details | Diff
sysutils/vtm.patch (3.99 KB, patch)
2025-03-09 20:02 UTC, Yusuf Yaman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Pérez 2022-05-08 16:06:14 UTC
Created attachment 233810 [details]
Diff patch for the tree

Adds new port, vtm, which is a terminal multiplexer with UTF-8, truecolor and mouse support. It has the ability to render terminal buffers as tiling "windows" inside a terminal, and sharing these as a session.
Do not confuse with sysutils/dvtm.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2023-04-28 09:47:40 UTC
Thank you for your submission.  I apologise it took so long to get this looked at. Make sure to set "maintainer-approval" on your patches so they get looked at.  As for your new port, here are some issues I found:

 - MASTER_SITES=GH seems bogus.  No MASTER_SITES is needed with USE_GITHUB=yes
 - please remove WWW: from pkg-descr and instead add a WWW variable to the
   Makefile.  This was changed last autumn.
 - please update the patch to refer to the newest release if possible.

Port looks good otherwise!  Will proceed with a build test once I hear back from you.  Make sure to set maintainer-approval on the new patch!
Comment 2 Yusuf Yaman 2025-03-08 00:17:43 UTC
I want to help creating this port but i don't have much CMake knowledge to handle the lua thing in CMakeLists.txt. I will attach my patch that does what fuz@ said.

Any help appreciated, thanks in advance.
Comment 3 Yusuf Yaman 2025-03-08 00:18:25 UTC
===>  Performing out-of-source build
/bin/mkdir -p /wrkdirs/usr/ports/sysutils/vtm/work/.build
CMake Warning:
  Ignoring extra path from command line:

   "/wrkdirs/usr/ports/sysutils/vtm/work/.build/FETCHCONTENT_FULLY_DISCONNECTED=BOOL:off"


CMake Warning at /usr/local/share/cmake/Modules/FetchContent.cmake:2111 (message):
  FETCHCONTENT_FULLY_DISCONNECTED is set to true, which requires the source
  directory for dependency lua to already be populated.  This generally means
  it must not be set to true the first time CMake is run in a build
  directory.  The following source directory should already be populated, but
  it doesn't exist:

    /wrkdirs/usr/ports/sysutils/vtm/work/.build/_deps/lua-src

  Policy CMP0170 controls enforcement of this requirement.
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
  CMakeLists.txt:38 (FetchContent_MakeAvailable)


-- Configuring done (0.0s)
CMake Error at CMakeLists.txt:41 (add_library):
  No SOURCES given to target: lua


CMake Generate step failed.  Build files cannot be regenerated correctly.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/vtm
Comment 4 Yusuf Yaman 2025-03-08 00:20:28 UTC
Created attachment 258415 [details]
sysutils/vtm.patch
Comment 5 Yusuf Yaman 2025-03-08 00:31:37 UTC
I added "set(FETCHCONTENT_FULLY_DISCONNECTED FALSE)" to CMakeLists.txt because couldn't set it in Makefile correctly, it started to build and it's now at 97% now, I will let you know if it builds fine.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2025-03-08 09:28:48 UTC
(In reply to Yusuf Yaman from comment #5)

Hi Yusuf,

Luckily FETCHCONTENT_FULLY_DISCONNECTED is an option we set by default.  There should be no need to set it yourself.  The port looks reasonable.  As the submitter has not followed up, someone else would need to maintain the port for it to be accepted.  Could I interest you?
Comment 7 Yusuf Yaman 2025-03-08 15:54:37 UTC
(In reply to Robert Clausecker from comment #6)
I see, thanks for the information. I am interested in but i don't know how should i modify the CMakeLists.txt file to handle that lua thing. I looked at other ports with "find" tool to see what they do for this situation but I couldn't find a solution.
Comment 8 Yusuf Yaman 2025-03-08 16:31:17 UTC
Created attachment 258435 [details]
sysutils/vtm.patch

I added a patch to files directory that uses pkgconfig and makes pkgconfig to find lua module and compilation improved a bit after this. But now it's complaining about cannot find -llua. I'm trying to look at other ports but couldn't succeed yet, tried LDFLAGS but it still says -llua-${LUA_VER} not found. I test in poudriere via testport and "-i" flag. Thanks
Comment 9 Yusuf Yaman 2025-03-08 16:32:49 UTC
I also was added CFLAGS to point to Lua's include dir.

This is error i have.

[100% 2/2] : && /usr/local/libexec/ccache/c++ -O2 -pipe  -I/usr/local/include/lua54 -fstack-protector-strong -fno-strict-aliasing   -std=c++20 -pthread -O2 -pipe  -I/usr/local/include/lua54 -fstack-protector-strong -fno-strict-aliasing   -std=c++20  -DNDEBUG -fstack-protector-strong    -Xlinker --dependency-file=CMakeFiles/vtm.dir/link.d CMakeFiles/vtm.dir/src/vtm.cpp.o -o vtm  -llua && :
FAILED: vtm
: && /usr/local/libexec/ccache/c++ -O2 -pipe  -I/usr/local/include/lua54 -fstack-protector-strong -fno-strict-aliasing   -std=c++20 -pthread -O2 -pipe  -I/usr/local/include/lua54 -fstack-protector-strong -fno-strict-aliasing   -std=c++20  -DNDEBUG -fstack-protector-strong    -Xlinker --dependency-file=CMakeFiles/vtm.dir/link.d CMakeFiles/vtm.dir/src/vtm.cpp.o -o vtm  -llua && :
ld: error: unable to find library -llua
c++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/vtm
Comment 10 Yusuf Yaman 2025-03-08 17:08:14 UTC
Adding code below doesn't solve it either...

+LDFLAGS+=      -L${LUA_LIBDIR} -llua-${LUA_VER}
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2025-03-08 19:24:29 UTC
(In reply to Yusuf Yaman from comment #10)

Please try to post only one comment at a time as each time you add a commit, an email is sent to all subscribers.  You can write comments as long as you want, but try to put all of your stuff in one comment before hitting "save changes."

That said, I can go ahead and figure this out if you commit to maintaining the port.
Comment 12 Yusuf Yaman 2025-03-08 20:21:13 UTC
(In reply to Robert Clausecker from comment #11)
Oh, sorry, i'll be careful.

Thank you very much, yes i want to maintain this port.
Comment 13 Yusuf Yaman 2025-03-09 20:02:13 UTC
Created attachment 258500 [details]
sysutils/vtm.patch

I fixed the lua part, this port helped me creating the patch: /usr/ports/emulators/tic-80/files/patch-CMakeLists.txt

I also updated to latest distversion which released 3h ago, poudriere testport passes on 142amd64-default and i pet'd port{clippy,fmt,lint}.

Thanks for your interest.

As far as i can see, the port works fine in xterm, didn't work with my suckless st, though even though it's listed as tested.
Comment 14 commit-hook freebsd_committer freebsd_triage 2025-03-16 10:21:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=294265d4bd5108206dcd6fba0c5921e39b5a256c

commit 294265d4bd5108206dcd6fba0c5921e39b5a256c
Author:     Yusuf Yaman <nxjoseph@protonmail.com>
AuthorDate: 2025-03-08 00:19:45 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-03-16 10:19:28 +0000

    sysutils/vtm: New port: Text-based desktop environment

    Text based desktop environment inside the terminal.
    Allows for tiling terminal buffers, detaching sessions
    and remote collaborative work.

    WWW: https://github.com/directvt/vtm

    PR:             263864
    Reported by:    Daniel Pérez <y7v81xhon@mozmail.com>

 sysutils/Makefile                             |  1 +
 sysutils/vtm/Makefile (new)                   | 27 +++++++++++++++++++++++
 sysutils/vtm/distinfo (new)                   |  3 +++
 sysutils/vtm/files/patch-CMakeLists.txt (new) | 31 +++++++++++++++++++++++++++
 sysutils/vtm/pkg-descr (new)                  |  3 +++
 5 files changed, 65 insertions(+)
Comment 15 Yusuf Yaman 2025-03-16 10:24:41 UTC
Thanks!
Comment 16 Robert Clausecker freebsd_committer freebsd_triage 2025-03-16 10:26:12 UTC
Thank you for your contribution.
Sorry for the slow commit.