In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c440907b5d816077e5dcc75bb0275152e9957afc?hp=859ef0cd29f8b6c71be648530456c6b4c6496869>
- Log ----------------------------------------------------------------- commit c440907b5d816077e5dcc75bb0275152e9957afc Author: Nicholas Clark <[email protected]> Date: Fri Sep 18 10:59:11 2009 +0100 Split XSLoader out from ext/DynaLoader into its own directory. M MANIFEST M Porting/Maintainers.pl M ext/DynaLoader/Makefile.PL D ext/DynaLoader/XSLoader_pm.PL D ext/DynaLoader/t/XSLoader.t A ext/XSLoader/Makefile.PL A ext/XSLoader/XSLoader_pm.PL A ext/XSLoader/t/XSLoader.t commit 6c8b0117f5a408f4d2467d5263133611dc283198 Author: Nicholas Clark <[email protected]> Date: Fri Sep 18 10:53:11 2009 +0100 Make make_ext.pl set PERL_CORE=1 in the environment. This simplifies the check in Makefile.PL, and means that "I'm building in the core" is passed down to build scripts invoked from the Makefile. M make_ext.pl ----------------------------------------------------------------------- Summary of changes: MANIFEST | 5 +- Porting/Maintainers.pl | 4 +- ext/DynaLoader/Makefile.PL | 9 +-- ext/XSLoader/Makefile.PL | 72 +++++++++++++++++++++++++++ ext/{DynaLoader => XSLoader}/XSLoader_pm.PL | 0 ext/{DynaLoader => XSLoader}/t/XSLoader.t | 0 make_ext.pl | 1 + 7 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 ext/XSLoader/Makefile.PL rename ext/{DynaLoader => XSLoader}/XSLoader_pm.PL (100%) rename ext/{DynaLoader => XSLoader}/t/XSLoader.t (100%) diff --git a/MANIFEST b/MANIFEST index a40b586..4350606 100644 --- a/MANIFEST +++ b/MANIFEST @@ -866,8 +866,6 @@ ext/DynaLoader/hints/openbsd.pl Hint for DynaLoader for named architecture ext/DynaLoader/Makefile.PL Dynamic Loader makefile writer ext/DynaLoader/README Dynamic Loader notes and intro ext/DynaLoader/t/DynaLoader.t See if DynaLoader works -ext/DynaLoader/t/XSLoader.t See if XSLoader works -ext/DynaLoader/XSLoader_pm.PL Simple XS Loader perl module ext/Encode/AUTHORS List of authors ext/Encode/bin/enc2xs Encode module generator ext/Encode/bin/piconv iconv by perl @@ -3162,6 +3160,9 @@ ext/XS-APItest/t/svpeek.t XS::APItest extension ext/XS-APItest/t/svsetsv.t Test behaviour of sv_setsv with/without PERL_CORE ext/XS-APItest/t/xs_special_subs_require.t for require too ext/XS-APItest/t/xs_special_subs.t Test that XS BEGIN/CHECK/INIT/END work +ext/XSLoader/Makefile.PL Dynamic Loader makefile writer +ext/XSLoader/t/XSLoader.t See if XSLoader works +ext/XSLoader/XSLoader_pm.PL Simple XS Loader perl module ext/XS-Typemap/Makefile.PL XS::Typemap extension ext/XS-Typemap/README XS::Typemap extension ext/XS-Typemap/stdio.c XS::Typemap extension diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 61f65fc..cf09eb5 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1737,9 +1737,7 @@ use File::Glob qw(:case); { 'MAINTAINER' => 'saper', 'DISTRIBUTION' => 'SAPER/XSLoader-0.10.tar.gz', - 'FILES' => q[ext/DynaLoader/t/XSLoader.t - ext/DynaLoader/XSLoader_pm.PL - ], + 'FILES' => q[ext/XSLoader], 'EXCLUDED' => [ qr{^eg/}, qw{t/pod.t t/podcover.t diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL index d3670a8..779523f 100644 --- a/ext/DynaLoader/Makefile.PL +++ b/ext/DynaLoader/Makefile.PL @@ -12,13 +12,10 @@ WriteMakefile( SKIP => [qw(dynamic dynamic_lib dynamic_bs)], XSPROTOARG => '-noprototypes', # XXX remove later? VERSION_FROM => 'DynaLoader_pm.PL', - PL_FILES => {'DynaLoader_pm.PL'=>'DynaLoader.pm', - 'XSLoader_pm.PL'=>'XSLoader.pm'}, - PM => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm', - 'XSLoader.pm' => '$(INST_LIBDIR)/XSLoader.pm'}, + PL_FILES => {'DynaLoader_pm.PL'=>'DynaLoader.pm'}, + PM => {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm'}, depend => {'DynaLoader$(OBJ_EXT)' => 'dlutils.c'}, - clean => {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm ' . - 'XSLoader.pm'}, + clean => {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm'}, ); sub MY::postamble { diff --git a/ext/XSLoader/Makefile.PL b/ext/XSLoader/Makefile.PL new file mode 100644 index 0000000..0383532 --- /dev/null +++ b/ext/XSLoader/Makefile.PL @@ -0,0 +1,72 @@ +# A template for Makefile.PL. +# - Set the $PACKAGE variable to the name of your module. +# - Set $LAST_API_CHANGE to reflect the last version you changed the API +# of your module. +# - Fill in your dependencies in PREREQ_PM +# Alternatively, you can say the hell with this and use h2xs. + +use ExtUtils::MakeMaker; +eval 'use ExtUtils::MakeMaker::Coverage'; + +$PACKAGE = 'XSLoader'; +($PACKAGE_FILE = $PACKAGE) =~ s|::|/|g; +$LAST_API_CHANGE = 0; + +eval "require $PACKAGE"; + +unless ($@) { # Make sure we did find the module. + print <<"CHANGE_WARN" if ${$PACKAGE.'::VERSION'} < $LAST_API_CHANGE; + +NOTE: There have been API changes between this version and any older +than version $LAST_API_CHANGE! Please read the Changes file if you +are upgrading from a version older than $LAST_API_CHANGE. + +CHANGE_WARN +} + +# In case the empty lib/ directory was not created. +mkdir 'lib', 0755 unless $ENV{PERL_CORE}; + +WriteMakefile( + NAME => $PACKAGE, + LICENSE => 'perl', + AUTHOR => 'Sebastien Aperghis-Tramoni <[email protected]>', + VERSION_FROM => 'XSLoader_pm.PL', + ABSTRACT_FROM => 'XSLoader_pm.PL', + INSTALLDIRS => 'perl', + PL_FILES => { 'XSLoader_pm.PL' => 'XSLoader.pm' }, + PM => { 'XSLoader.pm' => '$(INST_ARCHLIB)/XSLoader.pm' }, + PREREQ_PM => { + 'Test::More' => '0.62', + }, + dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, + clean => { FILES => 'XSLoader-*' }, +); + +# Unlink the .pm file included with the distribution +1 while unlink "XSLoader.pm"; + +{ + package MY; + + sub test_via_harness { + my($self, $orig_perl, $tests) = @_; + + my @perls = ($orig_perl); + push @perls, qw(bleadperl + perl5.6.1 + perl5.6.0 + perl5.005_03 + perl5.004_05 + perl5.004_04 + perl5.004) + if $ENV{PERL_TEST_ALL}; + + my $out; + foreach my $perl (@perls) { + $out .= $self->SUPER::test_via_harness($perl, $tests); + } + + return $out; + } +} diff --git a/ext/DynaLoader/XSLoader_pm.PL b/ext/XSLoader/XSLoader_pm.PL similarity index 100% rename from ext/DynaLoader/XSLoader_pm.PL rename to ext/XSLoader/XSLoader_pm.PL diff --git a/ext/DynaLoader/t/XSLoader.t b/ext/XSLoader/t/XSLoader.t similarity index 100% rename from ext/DynaLoader/t/XSLoader.t rename to ext/XSLoader/t/XSLoader.t diff --git a/make_ext.pl b/make_ext.pl index 1cb5c1b..9263945 100644 --- a/make_ext.pl +++ b/make_ext.pl @@ -260,6 +260,7 @@ sub build_extension { # another process has half-written. $ENV{PERL5LIB} = join $Config{path_sep}, (map {"$up/$_"} @toolchain), $lib_dir; + $ENV{PERL_CORE} = 1; unless (chdir "$ext_dir") { warn "Cannot cd to $ext_dir: $!"; -- Perl5 Master Repository
