pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/ap2-perl



Module Name:    pkgsrc
Committed By:   nonaka
Date:           Thu Aug  4 14:18:15 UTC 2016

Modified Files:
        pkgsrc/www/ap2-perl: distinfo
Added Files:
        pkgsrc/www/ap2-perl/patches: patch-lib_Apache2_Build.pm

Log Message:
PR/51359: Automatic compiler flags for gcc 5 and clang.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/www/ap2-perl/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/ap2-perl/patches/patch-lib_Apache2_Build.pm

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/ap2-perl/distinfo
diff -u pkgsrc/www/ap2-perl/distinfo:1.20 pkgsrc/www/ap2-perl/distinfo:1.21
--- pkgsrc/www/ap2-perl/distinfo:1.20   Wed Nov  4 02:46:48 2015
+++ pkgsrc/www/ap2-perl/distinfo        Thu Aug  4 14:18:15 2016
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.20 2015/11/04 02:46:48 agc Exp $
+$NetBSD: distinfo,v 1.21 2016/08/04 14:18:15 nonaka Exp $
 
 SHA1 (mod_perl-2.0.9.tar.gz) = 5de3018214da21de186d758a429d5c78f827caa5
 RMD160 (mod_perl-2.0.9.tar.gz) = f4be60f1b4f4b5645aa7e97ad09d6b1871611bd4
 SHA512 (mod_perl-2.0.9.tar.gz) = 421d385f0d5d04cbe8c1e9559960eea86a017fa1bed88e614009143550baf852e2345001faff1fb849d9b3e6383786e0011f45ebc3e7d26ad57651fbad4e2f2c
 Size (mod_perl-2.0.9.tar.gz) = 3846584 bytes
+SHA1 (patch-lib_Apache2_Build.pm) = b2dd179612272ff6facb0280c00d9589aa93dad6
 SHA1 (patch-src_modules_perl_modperl_common_util.h) = a5fd094351fef2994b67c6c70abc18c772aec532

Added files:

Index: pkgsrc/www/ap2-perl/patches/patch-lib_Apache2_Build.pm
diff -u /dev/null pkgsrc/www/ap2-perl/patches/patch-lib_Apache2_Build.pm:1.1
--- /dev/null   Thu Aug  4 14:18:15 2016
+++ pkgsrc/www/ap2-perl/patches/patch-lib_Apache2_Build.pm      Thu Aug  4 14:18:15 2016
@@ -0,0 +1,48 @@
+$NetBSD: patch-lib_Apache2_Build.pm,v 1.1 2016/08/04 14:18:15 nonaka Exp $
+
+from mod_perl r1733566.
+
+-----
+Automatic compiler flags for gcc 5 and clang
+
+To make compilation easier on gcc5/clang hosts, this patch automatically selects the appropriate c89 option, when modperl is being built with either gcc 5 or clang.
+
+Tested by the author on Ubuntu 15.10 (with gcc 5.2.1), Fedora 23 (with gcc 5.3.1) and FreeBSD 10.2 (with clang).
+
+Thanks to Klaus S. Madsen <ksm%jobindex.dk@localhost> for the patch.
+-----
+
+--- lib/Apache2/Build.pm.orig  2015-06-19 05:13:53.000000000 +0900
++++ lib/Apache2/Build.pm       2016-07-26 17:27:03.000000000 +0900
+@@ -611,6 +611,14 @@ sub ap_ccopts {
+         $ccopts .= " -DMP_TRACE";
+     }
+ 
++    if ($self->has_gcc_version('5.0.0') && $ccopts !~ /-fgnu89-inline/) {
++        $ccopts .= " -fgnu89-inline";
++    }
++
++    if ($self->has_clang && $ccopts !~ /-std=gnu89/) {
++        $ccopts .= " -std=gnu89";
++    }
++
+     # make sure apr.h can be safely included
+     # for example Perl's included -D_GNU_SOURCE implies
+     # -D_LARGEFILE64_SOURCE on linux, but this won't happen on
+@@ -641,6 +649,16 @@ sub has_gcc_version {
+     return cmp_tuples(\@tuples, \@r_tuples) == 1;
+ }
+ 
++sub has_clang {
++    my $self = shift;
++
++    my $has_version = $self->perl_config('gccversion');
++
++    return 0 unless $has_version;
++
++    return $has_version =~ m/Clang/;
++}
++
+ sub cmp_tuples {
+     my ($num_a, $num_b) = @_;
+ 



Home | Main Index | Thread Index | Old Index