ports/137454: [patch] math/p5-Math-GSL: Fix issue with finding headers

Earl Gay earl at eeg3.net
Wed Aug 5 09:10:11 UTC 2009


>Number:         137454
>Category:       ports
>Synopsis:       [patch] math/p5-Math-GSL: Fix issue with finding headers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 05 09:10:10 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Earl Gay
>Release:        7.2
>Organization:
>Environment:
FreeBSD fbsdvm.eeg3.net 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 root at walker.cse.buffalo.edu:/usr/obj/src/sys/GENERIC i386
>Description:
The build fails due to a bug in inc/GSLBuilder.pm that adds broken arguments when building the module. It's essentially passing "-I -I/usr/local/lib/perl5/5.8.9/mach/CORE/", since there is an extra -I it doesn't actually pass the needed include path. 

The reason it is adding the extra -I is because there is a check to see if an array is defined, and if so it wants to add all of the elements to the include path list. The problem is that the array is always defined but it may just contain one blank element. The included patch checks to see if that element is empty and makes adjustments accordingly. 

I've tested the patch to fix the issue on 7.2-RELEASE(i386) and 8.0-BETA2(i386).
>How-To-Repeat:

>Fix:
Copy the attached patch to: files/patch-inc-GSLBuilder.pm

Patch attached with submission follows:

--- inc/GSLBuilder.pm	2009-05-20 02:50:44.000000000 -0400
+++ inc/GSLBuilder.pm	2009-08-04 20:15:57.000000000 -0400
@@ -154,7 +154,7 @@
 
   $cf->{installarchlib} = $Config{archlib};
 
-  my @include_dirs = @{$p->{include_dirs}} 
+  my @include_dirs = ( @{$p->{include_dirs}} && ( ${@{$p->{include_dirs}}}[0] ne "" ) ) 
 			? map {"-I$_"} (@{$p->{include_dirs}}, catdir($cf->{installarchlib}, 'CORE'))
 			: map {"-I$_"} ( catdir($cf->{installarchlib}, 'CORE') ) ;
 


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list