lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [6/6] git commit: refs/heads/master - Remove dependency of Clownfish::CFC::Perl::Build on Charmonizer
Date Tue, 22 Apr 2014 21:08:42 GMT
Remove dependency of Clownfish::CFC::Perl::Build on Charmonizer

Add a new field 'cflags' to the 'clownfish_params' Module::Build
property to pass additional compiler flags.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/f24561ff
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/f24561ff
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/f24561ff

Branch: refs/heads/master
Commit: f24561ff4624c5563add8fb77a3e5206392bd293
Parents: 340d691
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Jul 21 00:00:30 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Tue Apr 22 23:05:37 2014 +0200

----------------------------------------------------------------------
 perl/buildlib/Lucy/Build.pm | 22 ++++++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/f24561ff/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 1118474..ebfabb5 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -17,7 +17,10 @@ use strict;
 use warnings;
 
 package Lucy::Build;
-use base qw( Clownfish::CFC::Perl::Build );
+use base qw(
+    Clownfish::CFC::Perl::Build
+    Clownfish::CFC::Perl::Build::Charmonic
+);
 
 our $VERSION = '0.003000';
 $VERSION = eval $VERSION;
@@ -85,8 +88,6 @@ sub ACTION_lemon {
 sub ACTION_copy_clownfish_includes {
     my $self = shift;
 
-    $self->depends_on('charmony');
-
     $self->SUPER::ACTION_copy_clownfish_includes;
 
     $self->cf_copy_include_file( qw( Lucy Util ToolSet.h ) );
@@ -233,7 +234,20 @@ sub ACTION_parsers {
 sub ACTION_compile_custom_xs {
     my $self = shift;
 
-    $self->depends_on('parsers');
+    $self->depends_on(qw( parsers charmony ));
+
+    # Add extra compiler flags from Charmonizer.
+    my $charm_cflags = $self->charmony('EXTRA_CFLAGS');
+    if ($charm_cflags) {
+        my $cf_cflags = $self->clownfish_params('cflags');
+        if ($cf_cflags) {
+            $cf_cflags .= " $charm_cflags";
+        }
+        else {
+            $cf_cflags = $charm_cflags;
+        }
+        $self->clownfish_params( cflags => $cf_cflags );
+    }
 
     $self->SUPER::ACTION_compile_custom_xs;
 }


Mime
View raw message