aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2015-03-09 22:26:34 +0800
committermat <mat@FreeBSD.org>2015-03-09 22:26:34 +0800
commita676db82fe7100ade6ebb08204a1c3bef850c0ac (patch)
treec0ae0ab788da174b23df694b4faf60ebd7afca16
parent539bd031ae8ae2f34b3faa592c42419b87c156ee (diff)
downloadfreebsd-ports-gnome-a676db82fe7100ade6ebb08204a1c3bef850c0ac.tar.gz
freebsd-ports-gnome-a676db82fe7100ade6ebb08204a1c3bef850c0ac.tar.zst
freebsd-ports-gnome-a676db82fe7100ade6ebb08204a1c3bef850c0ac.zip
Add an upstream patch fixing build with gcc5.
Submitted by: marino Sponsored by: Absolight
-rw-r--r--lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL39
-rw-r--r--lang/perl5.18/files/patch-ext_Errno_Errno__pm.PL39
-rw-r--r--lang/perl5.20/files/patch-ext_Errno_Errno__pm.PL39
3 files changed, 117 insertions, 0 deletions
diff --git a/lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL b/lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL
new file mode 100644
index 000000000000..88f40d765156
--- /dev/null
+++ b/lang/perl5.16/files/patch-ext_Errno_Errno__pm.PL
@@ -0,0 +1,39 @@
+--- ext/Errno/Errno_pm.PL.orig 2013-03-04 15:16:22 UTC
++++ ext/Errno/Errno_pm.PL
+@@ -242,20 +242,31 @@ sub write_errno_pm {
+ unless ($^O eq 'beos') { # trust what we have / get later
+ # invoke CPP and read the output
+
++ my $inhibit_linemarkers = '';
++ if ($Config{gccversion} =~ /\A(\d+)\./ and $1 >= 5) {
++ # GCC 5.0 interleaves expanded macros with line numbers breaking
++ # each line into multiple lines. RT#123784
++ $inhibit_linemarkers = ' -P';
++ }
++
+ if ($^O eq 'VMS') {
+- my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}";
++ my $cpp = "$Config{cppstdin} $Config{cppflags}" .
++ $inhibit_linemarkers . " $Config{cppminus}";
+ $cpp =~ s/sys\$input//i;
+ open(CPPO,"$cpp errno.c |") or
+ die "Cannot exec $Config{cppstdin}";
+ } elsif ($IsMSWin32 || $^O eq 'NetWare') {
+- open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
+- die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
++ my $cpp = "$Config{cpprun} $Config{cppflags}" .
++ $inhibit_linemarkers;
++ open(CPPO,"$cpp errno.c |") or
++ die "Cannot run '$cpp errno.c'";
+ } elsif ($IsSymbian) {
+- my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc -";
++ my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc" .
++ $inhibit_linemarkers ." -";
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ } else {
+- my $cpp = default_cpp();
++ my $cpp = default_cpp() . $inhibit_linemarkers;
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ }
diff --git a/lang/perl5.18/files/patch-ext_Errno_Errno__pm.PL b/lang/perl5.18/files/patch-ext_Errno_Errno__pm.PL
new file mode 100644
index 000000000000..65dba25dd6fd
--- /dev/null
+++ b/lang/perl5.18/files/patch-ext_Errno_Errno__pm.PL
@@ -0,0 +1,39 @@
+--- ext/Errno/Errno_pm.PL.orig 2014-10-01 01:33:00 UTC
++++ ext/Errno/Errno_pm.PL
+@@ -236,20 +236,31 @@ sub write_errno_pm {
+ { # BeOS (support now removed) did not enter this block
+ # invoke CPP and read the output
+
++ my $inhibit_linemarkers = '';
++ if ($Config{gccversion} =~ /\A(\d+)\./ and $1 >= 5) {
++ # GCC 5.0 interleaves expanded macros with line numbers breaking
++ # each line into multiple lines. RT#123784
++ $inhibit_linemarkers = ' -P';
++ }
++
+ if ($^O eq 'VMS') {
+- my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}";
++ my $cpp = "$Config{cppstdin} $Config{cppflags}" .
++ $inhibit_linemarkers . " $Config{cppminus}";
+ $cpp =~ s/sys\$input//i;
+ open(CPPO,"$cpp errno.c |") or
+ die "Cannot exec $Config{cppstdin}";
+ } elsif ($IsMSWin32 || $^O eq 'NetWare') {
+- open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
+- die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
++ my $cpp = "$Config{cpprun} $Config{cppflags}" .
++ $inhibit_linemarkers;
++ open(CPPO,"$cpp errno.c |") or
++ die "Cannot run '$cpp errno.c'";
+ } elsif ($IsSymbian) {
+- my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc -";
++ my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc" .
++ $inhibit_linemarkers ." -";
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ } else {
+- my $cpp = default_cpp();
++ my $cpp = default_cpp() . $inhibit_linemarkers;
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ }
diff --git a/lang/perl5.20/files/patch-ext_Errno_Errno__pm.PL b/lang/perl5.20/files/patch-ext_Errno_Errno__pm.PL
new file mode 100644
index 000000000000..8ced9e1d01a8
--- /dev/null
+++ b/lang/perl5.20/files/patch-ext_Errno_Errno__pm.PL
@@ -0,0 +1,39 @@
+--- ext/Errno/Errno_pm.PL.orig 2015-01-31 19:48:53 UTC
++++ ext/Errno/Errno_pm.PL
+@@ -225,20 +225,31 @@ sub write_errno_pm {
+ { # BeOS (support now removed) did not enter this block
+ # invoke CPP and read the output
+
++ my $inhibit_linemarkers = '';
++ if ($Config{gccversion} =~ /\A(\d+)\./ and $1 >= 5) {
++ # GCC 5.0 interleaves expanded macros with line numbers breaking
++ # each line into multiple lines. RT#123784
++ $inhibit_linemarkers = ' -P';
++ }
++
+ if ($^O eq 'VMS') {
+- my $cpp = "$Config{cppstdin} $Config{cppflags} $Config{cppminus}";
++ my $cpp = "$Config{cppstdin} $Config{cppflags}" .
++ $inhibit_linemarkers . " $Config{cppminus}";
+ $cpp =~ s/sys\$input//i;
+ open(CPPO,"$cpp errno.c |") or
+ die "Cannot exec $Config{cppstdin}";
+ } elsif ($IsMSWin32 || $^O eq 'NetWare') {
+- open(CPPO,"$Config{cpprun} $Config{cppflags} errno.c |") or
+- die "Cannot run '$Config{cpprun} $Config{cppflags} errno.c'";
++ my $cpp = "$Config{cpprun} $Config{cppflags}" .
++ $inhibit_linemarkers;
++ open(CPPO,"$cpp errno.c |") or
++ die "Cannot run '$cpp errno.c'";
+ } elsif ($IsSymbian) {
+- my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc -";
++ my $cpp = "gcc -E -I$ENV{SDK}\\epoc32\\include\\libc" .
++ $inhibit_linemarkers ." -";
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ } else {
+- my $cpp = default_cpp();
++ my $cpp = default_cpp() . $inhibit_linemarkers;
+ open(CPPO,"$cpp < errno.c |")
+ or die "Cannot exec $cpp";
+ }