Permalink
Browse files

xs: embed libffi sources

  • Loading branch information...
1 parent 831b5ac commit effef574af80655b8bc2b83eea8b84a39c6bb0e4 @ghedo committed Sep 20, 2012
Showing with 23 additions and 13 deletions.
  1. +3 −0 .gitmodules
  2. +1 −0 Changes
  3. +12 −5 MANIFEST.SKIP
  4. +6 −8 inc/MakeMaker.pm
  5. +1 −0 xs/libffi
View
@@ -0,0 +1,3 @@
+[submodule "xs/libffi"]
+ path = xs/libffi
+ url = git://github.com/atgreen/libffi.git
View
@@ -3,6 +3,7 @@ Revision history for FFI-Raw
{{$NEXT}}
- Fix build on Windows (GH#5)
+ - Embed libffi sources to ease building
0.13 2012-09-19 18:44:55 Europe/Rome
View
@@ -1,8 +1,15 @@
Raw.bs
Raw.c
Raw.o
-t/01-argless.so
-t/02-simple-args.so
-t/03-simple-returns.so
-t/04-pointers.so
-t/05-callbacks.so
+.*\.o
+.*\.a
+.*\.so
+.*\.la
+.*\.lo
+.*\.Plo
+.*\.pc$
+stamp-h1
+libtool$
+.*\.status
+.*\.dirstamp
+ffi(config)?.h$
View
@@ -1,18 +1,17 @@
package inc::MakeMaker;
use Moose;
-use Devel::CheckLib;
extends 'Dist::Zilla::Plugin::MakeMaker::Awesome';
override _build_MakeFile_PL_template => sub {
my ($self) = @_;
my $template = <<'TEMPLATE';
-use Devel::CheckLib;
-
-check_lib_or_exit(lib => 'dl') if $^O ne 'MSWin32';
-check_lib_or_exit(lib => 'ffi');
+chdir('xs/libffi');
+system('./configure --disable-builddir --with-pic');
+system('make');
+chdir('../..');
TEMPLATE
@@ -22,9 +21,8 @@ TEMPLATE
override _build_WriteMakefile_args => sub {
return +{
%{ super() },
- LIBS => ['-lffi'],
- INC => '-I.',
- OBJECT => '$(O_FILES)',
+ INC => '-I. -Ixs/libffi/include',
+ OBJECT => '$(O_FILES) xs/libffi/.libs/libffi.a',
}
};
Submodule libffi added at d330f1

0 comments on commit effef57

Please sign in to comment.