Perl TVision installation on Linux

The C library build requirements are "libncursesw" (note the 'w') and "libgpm" for mouse support. Install dev/devel packages if packaged separately i.e. on Debian, Fedora, and Ubuntu.

# On Arch Linux sudo pacman -S ncurses gpm

The Perl module build requires "Text::Template" to make "TVision-methods.xs" and "typemap". Install manually if missing.

# On Arch Linux sudo pacman -S perl-text-template # or via CPAN sudo cpanm -n Text::Template

From the Turbo Vision README, the runtime requirements are "xsel" or "xclip" for clipboard support in X11 or "wl-clipboard" in Wayland environments.

# On Arch Linux sudo pacman -S xsel # X11 sudo pacman -S wl-clipboard # Wayland

Build the "Turbo Vision" C shared library

This requires a line change in "source/CMakeLists.txt" or the Perl module will fail due to missing shared library.

git clone --depth=1 https://github.com/magiblot/tvision cd tvision sed -i 's! STATIC ! SHARED !g' source/CMakeLists.txt cmake . -B ./build -DCMAKE_BUILD_TYPE=Release cmake --build ./build sudo cmake --install ./build cd ..

Build the "TVision" Perl module

The GCC "-fpermissive" option is needed or the compiler will exit due to type mismatch.

Ignore the MANIFEST missing warnings. It assumes having "tvision.git" in this folder.

git clone --depth=1 https://github.com/vadrerko/perl-tvision cd perl-tvision X_CFLAGS="-I/usr/local/include -fpermissive -fPIC" X_LDFLAGS="-L/usr/local/lib -ltvision -lncursesw -lgpm" perl Makefile.PL --cflags="$X_CFLAGS" --ldflags="$X_LDFLAGS" make TVision-methods.xs make typemap make make test perl -Iblib/arch -Iblib/lib t/f.t perl -Iblib/arch -Iblib/lib demo/forms.pl perl -Iblib/arch -Iblib/lib demo/tdialog.pl sudo make install cd ..

This worked for me on Arch-based Linux distro.


In reply to Re^6: Curses-based applications? - TVision installation on Linux by marioroy
in thread Curses-based applications? by sedusedan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.