You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2010/01/25 23:15:36 UTC

svn commit: r902998 - /lucene/lucy/trunk/perl/buildlib/Lucy/Build.pm

Author: marvin
Date: Mon Jan 25 22:15:36 2010
New Revision: 902998

URL: http://svn.apache.org/viewvc?rev=902998&view=rev
Log:
Work around a kooky bug in Valgrind's suppressions generation.  Make
generation of ppport.h conditional upon it not already existing, and resolve
the licensing issue comment regarding distributing ppport.h file rather than
requiring Devel::PPPort as a module.

Modified:
    lucene/lucy/trunk/perl/buildlib/Lucy/Build.pm

Modified: lucene/lucy/trunk/perl/buildlib/Lucy/Build.pm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/perl/buildlib/Lucy/Build.pm?rev=902998&r1=902997&r2=902998&view=diff
==============================================================================
--- lucene/lucy/trunk/perl/buildlib/Lucy/Build.pm (original)
+++ lucene/lucy/trunk/perl/buildlib/Lucy/Build.pm Mon Jan 25 22:15:36 2010
@@ -340,14 +340,16 @@
 # allows us to use more up-to-date XS API while still supporting Perls back to
 # 5.8.3.
 #
-# TODO: Devel::PPPort recommends that we distribute ppport.h rather than
-# require Devel::PPPort itself, but at this point further investigation is
-# required as to whether that's possible under the Apache license.
+# The Devel::PPPort docs recommend that we distribute ppport.h rather than
+# require Devel::PPPort itself, but ppport.h isn't compatible with the Apache
+# license.
 sub ACTION_ppport {
     my $self = shift;
-    require Devel::PPPort;
-    $self->add_to_cleanup('ppport.h');
-    Devel::PPPort::WriteFile();
+    if ( !-e 'ppport.h' ) {
+        require Devel::PPPort;
+        $self->add_to_cleanup('ppport.h');
+        Devel::PPPort::WriteFile();
+    }
 }
 
 sub ACTION_suppressions {
@@ -374,6 +376,9 @@
         $rule_number++;
     }
 
+    # Change e.g. fun:_vgrZU_libcZdsoZa_calloc to fun:calloc
+    $suppressions =~ s/fun:\w+_((m|c|re)alloc)/fun:$1/g;
+
     # Write local suppressions file.
     open( my $supp_fh, '>', $LOCAL_SUPP )
         or confess("Can't open '$LOCAL_SUPP': $!");
@@ -451,7 +456,7 @@
     my $xs_filepath = $self->xs_filepath;
 
     $self->dispatch('ppport');
-    
+
     require ExtUtils::ParseXS;
 
     my $cbuilder = Lucy::Build::CBuilder->new;