Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

xs: embed libffi sources

  • Loading branch information...
commit effef574af80655b8bc2b83eea8b84a39c6bb0e4 1 parent 831b5ac
@ghedo authored
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "xs/libffi"]
+ path = xs/libffi
+ url = git://github.com/atgreen/libffi.git
View
1  Changes
@@ -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
17 MANIFEST.SKIP
@@ -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
14 inc/MakeMaker.pm
@@ -1,7 +1,6 @@
package inc::MakeMaker;
use Moose;
-use Devel::CheckLib;
extends 'Dist::Zilla::Plugin::MakeMaker::Awesome';
@@ -9,10 +8,10 @@ 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',
}
};
1  xs/libffi
@@ -0,0 +1 @@
+Subproject commit d330f19292da8f39a78a9e2b0ba08df8094e3bc5
Please sign in to comment.
Something went wrong with that request. Please try again.