summaryrefslogtreecommitdiff
path: root/security/p5-GSSAPI/patches/patch-Makefile.PL
blob: 6b30dd474fe715eee2acccc3913f9f1aa28a118a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
$NetBSD: patch-Makefile.PL,v 1.2 2015/12/10 18:54:12 tron Exp $

1.) Handle the pkgsrc "krb5-config" wrapper for SunOS.
2.) Strip trailing linefeeds and other whitespace from the output of
    the "krb5-config" wrapper to avoid generation of a broken makefile.

--- Makefile.PL.orig	2010-04-24 13:37:38.000000000 +0100
+++ Makefile.PL	2015-12-10 18:50:38.000000000 +0000
@@ -115,7 +115,7 @@
     unless ($libconf) {
        die "$krb5cmd does not respond libconf!";
     } else {
-      if ($libconf =~ /Unknown/ && $implementation =~ /Solaris Kerberos/) {
+      if ($implementation =~ /Solaris Kerberos/) {
             $libconf = "-L/usr/lib -R/usr/lib -lgss";
       }
 
@@ -153,7 +153,7 @@
        #
        $incconf = '-I/usr/include';
     }
-    if ($incconf =~ /Unknown/ && $implementation =~ /Solaris Kerberos/) {
+    if ($implementation =~ /Solaris Kerberos/) {
           $incconf = "-I/usr/include/kerberosv5";
           push @EXTRADEFINES,  '-DSEAM';
     }
@@ -240,20 +240,26 @@
 sub krb5_libconfig {
    my ($cfgcmd) = @_;
    $cfgcmd || die 'no $cfgcmd ';
-   return `$cfgcmd --libs gssapi`;
+   my $output = `$cfgcmd --libs gssapi`;
+   chomp( $output );
+   return $output;
 }
 #-------------------------------------------------
 #-------------------------------------------------
 sub krb5_cflags  {
    my ($cfgcmd) = @_;
    $cfgcmd || die 'no $cfgcmd ';
-   return `$cfgcmd --cflags gssapi`;
+   my $output = `$cfgcmd --cflags gssapi`;
+   chomp( $output );
+   return $output;
 }
 #-------------------------------------------------
 sub krb5_version {
    my ($cfgcmd) = @_;
    $cfgcmd || die 'no $cfgcmd ';
-   return `$cfgcmd --version`;
+   my $output = `$cfgcmd --version`;
+   chomp( $output );
+   return $output;
 }
 #-------------------------------------------------
 #-------------------------------------------------