Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the FFI CPAN distribution.

Report information
The Basics
Id: 8271
Status: resolved
Priority: 0/
Queue: FFI

People
Owner: Nobody in particular
Requestors: RURBAN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: MakeMaker fixes
Attached patch improves MakeMaker for MSVC makefile invocation, and gcc configure invocation. mingw32 not yet. Just for automatic CPAN building. BTW: ffcall/autoconf/* needs chmod +x -- http://xarch.tu-graz.ac.at/home/rurban/
--- FFI-1.00/Makefile.PL.orig 2000-10-31 16:56:06.000000000 +0200 +++ FFI-1.00/Makefile.PL 2004-11-06 16:08:33.796194400 +0200 @@ -1,5 +1,19 @@ use ExtUtils::MakeMaker; +$MY::lib_deps = ($^O eq "MSWin32") + ? "ffcall/callback/callback.lib ffcall/avcall/avcall.lib" + : "ffcall/callback/libcallback.a ffcall/avcall/libavcall.a"; +$MY::libs = ($^O eq "MSWin32") + ? "callback.lib avcall.lib" + : "-lcallback -lavcall"; + +sub MY::platform_constants { + return <<"EOM"; +MYEXTLIB = $MY::lib_deps + +EOM +} + WriteMakefile( 'NAME' => 'FFI', 'AUTHOR' => 'Paul Moore <gustav@morpheus.demon.co.uk>', @@ -8,7 +22,25 @@ 'PM' => { 'FFI.pm' => '$(INST_LIBDIR)/FFI.pm', 'Library.pm' => '$(INST_LIBDIR)/FFI/Library.pm', }, - 'LIBS' => ['ffcall/avcall/avcall.lib ffcall/callback/callback.lib'], + 'LIBS' => [$MY::libs], 'DEFINE' => ($^O eq "MSWin32" ? '-DWIN32' : ''), 'INC' => '-Iffcall', ); + +sub MY::postamble { + if ($^O eq "MSWin32") { + return <<'EOM'; +\$(MYEXTLIB): + cd ffcall && nmake -f Makefile.msvc + +EOM + } else { + use Cwd; + $PWD = getcwd(); + return <<"EOM"; +\$(MYEXTLIB): ffcall/autoconf + cd ffcall && chmod +x autoconf/* && /bin/sh configure --srcdir=$PWD/ffcall && make + +EOM + } +}
Thanks, 1.02 uses bundled binaries for Windows and on other systems relies on an installed ffcall. ffcall sources are no longer bundled with FFI.pm.