[libmarpa-r2-perl] 16/32: Rearrange build to accomodate external shared libraries
Jonas Smedegaard
dr at jones.dk
Sat May 17 21:24:13 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag Marpa-R2-2.085_004
in repository libmarpa-r2-perl.
commit 0ba90beb914aefe2488bf15fc99198e7382e876f
Author: Jeffrey Kegler <JKEGL at cpan.org>
Date: Thu Apr 24 18:37:06 2014 -0700
Rearrange build to accomodate external shared libraries
---
cpan/{ => etc}/cp_libmarpa.sh | 0
cpan/inc/Marpa/R2/Build_Me.pm | 34 ++++++++++++++++++++++++----------
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/cpan/cp_libmarpa.sh b/cpan/etc/cp_libmarpa.sh
similarity index 100%
rename from cpan/cp_libmarpa.sh
rename to cpan/etc/cp_libmarpa.sh
diff --git a/cpan/inc/Marpa/R2/Build_Me.pm b/cpan/inc/Marpa/R2/Build_Me.pm
index ff840b6..18063de 100644
--- a/cpan/inc/Marpa/R2/Build_Me.pm
+++ b/cpan/inc/Marpa/R2/Build_Me.pm
@@ -277,16 +277,24 @@ sub process_xs {
File::Path::mkpath( $spec->{archdir}, 0, ( oct 777 ) )
if not -d $spec->{archdir};
- my $libmarpa_archive;
- if ( $Marpa::R2::USE_PERL_AUTOCONF ) {
+ FIND_LIBRARY: {
+ my $libmarpa_archive = $self->args('marpa-library');
+ last FIND_LIBRARY if defined $libmarpa_archive;
+ if ($Marpa::R2::USE_PERL_AUTOCONF) {
+ my $libmarpa_libs_dir =
+ File::Spec->catdir( $self->base_dir(), 'libmarpa_build',
+ 'blib', 'arch', 'auto', 'libmarpa' );
+ $libmarpa_archive = File::Spec->catfile( $libmarpa_libs_dir,
+ "libmarpa$Config{lib_ext}" );
+ last FIND_LIBRARY;
+ } ## end if ($Marpa::R2::USE_PERL_AUTOCONF)
my $libmarpa_libs_dir =
- File::Spec->catdir( $self->base_dir(), 'libmarpa_build', 'blib', 'arch', 'auto', 'libmarpa');
- $libmarpa_archive = File::Spec->catfile( $libmarpa_libs_dir, "libmarpa$Config{lib_ext}" );
- } else {
- my $libmarpa_libs_dir = File::Spec->catdir( $self->base_dir(), 'libmarpa_build', '.libs');
- $libmarpa_archive = File::Spec->catfile( $libmarpa_libs_dir, 'libmarpa.a');
- }
- push @{ $self->{properties}->{objects} }, $libmarpa_archive;
+ File::Spec->catdir( $self->base_dir(), 'libmarpa_build',
+ '.libs' );
+ $libmarpa_archive =
+ File::Spec->catfile( $libmarpa_libs_dir, 'libmarpa.a' );
+ push @{ $self->{properties}->{objects} }, $libmarpa_archive;
+ } ## end FIND_LIBRARY:
# .xs -> .bs
$self->add_to_cleanup( $spec->{bs_file} );
@@ -759,7 +767,13 @@ sub ACTION_code {
$self->file_write( $perl_version_pm,
qw(pperl Marpa R2 Perl Version.pm) );
} ## end if ( not $self->up_to_date( [ $config_pm_filename, ...]))
- $self->do_libmarpa();
+
+ # If we are not overriding it, ...
+ if (not defined $self->args('marpa-library')) {
+ # ... perform the default build.
+ $self->do_libmarpa();
+ }
+
return $self->SUPER::ACTION_code;
} ## end sub ACTION_code
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmarpa-r2-perl.git
More information about the Pkg-perl-cvs-commits
mailing list