The cpan command enters module exploration and installation mode.
>i/Modulo/
informs the modules and their author in the database.
When I say >i/Curses/
several curses appear but not what I need.
I'm trying to add Curses-1.06 from William Setzer (WPS).
Informing cpan> i /wps/
shows me the author but not its module. AND...
cpan> i /WPS/Curses-1.06/
No objects found of any type for argument /WPS/Curses-1.06
I managed to download by
cpan> install WPS/Curses-1.06.tar.gz
Saving to:
'/data/data/com.termux/files/home/.cpan/sources/authors/id/W/WP/WPS/CHECKSUMS.tmp6759'
And then fails in perl Makefile.PL guess_cfg...
Configuring W/WP/WPS/Curses-1.06.tar.gz with Makefile.PL
FATAL: internal error: guess_cfg is bad
Warning: No success on
command[/data/data/com.termux/files/usr/bin/perl Makefile.PL]
WPS/Curses-1.06.tar.gz
/data/data/com.termux/files/usr/bin/perl
Makefile.PL -- NOT OK
Failed during this command:
WPS/Curses-1.06.tar.gz
: writemakefile NO '/data/data/com.termux/files/usr/bin/perl Makefile.PL' returned status 65280
I opened the Makefile.PL file and I'm trying to add an Android as I don't see one. And I don't know if I'm doing it right.
SCREENSHOT
Notes for Solaris:
# In 2.3, it was reported that to make the module compile correctly
# with gcc, you must add `-DSYSV=1' to $inc. This will disable the
# reset memcpy to bcopy which is present in /usr/include/curses.h.
# [Courtesy of Dave Blaszyk <dvb@ycc.Kodak.COM>]
#
# $inc also contained "-I/usr/include", but this seems to cause a huge
# too many problems for gcc in perl5.002 so i removed it by default.
# I tested Curses-a9 with perl5.002 and gcc263 and Sun's unbundled
# cc on Solaris 2.4 with $inc empty and no problems, but your
# mileage may vary.
#
# If you are having problems compiling on Solaris, try several
# combinations of "-I/usr/include" and "-DSYSV=1" in $inc to see if
# it fixes things.
First of all, note that you will need to install the ncurses C library before you can install (any version of) this module since it's merely an interface to that C library.
This can be done as follows:
pkg install ncurses
Secondly, you don't need version 1.06 specifically.
You're trying to install WPS/Curses-1.06.tar.gz. This version dates back to 2001, which is ancient.
Thankfully, you don't need that version specifically. That is the minimum version you need. We will focus on installing the latest version, 1.44.
Finally, time to install the module.
While the installation process has become less platform-dependent since 1.06, there's still some platform-dependent aspects in the installer.
Unfortunately, the latest version at this time does not support termux, but it's not hard to add the support manually.
First, obtain the distribution.
wget https://cpan.metacpan.org/authors/id/G/GI/GIRAFFED/Curses-1.44.tar.gz
tar xzf Curses-1.44.tar.gz
cd Curses-1.44
Secondly, add support for your OS.
cp -i hints/c-linux.ncurses.h hints/c-android.h
Third, we need to tell the installer where to find the ncurses C library since the installer doesn't find them.
export CURSES_CFLAGS="-I/data/data/com.termux/files/usr/include"
export CURSES_LDFLAGS="-L/data/data/com.termux/files/usr/lib -lncurses"
Finally, complete the installation.
perl Makefile.PL && make test && make install