Subject: | Build fix for Term::Terminfo on cygwin |
Date: | Mon, 2 Jul 2012 15:37:41 -0500 |
To: | bug-Term-Terminfo [...] rt.cpan.org |
From: | Casey Zacek <czacek [...] gmail.com> |
Hi,
Cygwin 1.7 with Perl v5.14.2
I haven't actually tried to use Term::Terminfo yet (soon), but I did build
it. I had to change Build.PL so it would find term.h (use
find_include_dirs_for instead of assert_compile_run, and add the
/usr/include/terminfo dir), and then again so this step would actually
compile (linking with libncurses is required in order to reference
cur_term, at least on this platform/version):
--- cut ---
diff -urN Term-Terminfo-0.07/Build.PL Term-Terminfo-0.07-UVrAfg/Build.PL
--- Term-Terminfo-0.07/Build.PL 2011-09-28 16:15:23.000000000 -0500
+++ Term-Terminfo-0.07-UVrAfg/Build.PL 2012-07-02 15:30:37.358221100 -0500
@@ -16,13 +16,16 @@
$cc->push_extra_linker_flags ( split ' ', ExtUtils::PkgConfig->libs(
"unibilium" ) );
}
else {
- $cc->assert_compile_run(
+ $cc->find_include_dirs_for(
diag => "no term.h",
+ dirs => [[qw(/usr/include/ncurses)]],
source => <<'EOF' );
#include <stdio.h>
#include <term.h>
int main(int argc, char *argv[]) {
- TERMINAL *term = cur_term;
+ char tmp[64];
+ TERMINAL term;
+ sprintf(tmp, "term._termname ptr = %p\n", term._termname);
return 0;
}
EOF
--- cut ---
--
Casey Zacek
czacek@gmail.com