summaryrefslogtreecommitdiff
path: root/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch')
-rw-r--r--dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch b/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch
new file mode 100644
index 000000000000..9602146b0af9
--- /dev/null
+++ b/dev-util/colorgcc/files/colorgcc-1.3.2-nohang.patch
@@ -0,0 +1,58 @@
+--- /usr/bin/colorgcc 2010-12-13 00:08:37.000000000 -0200
++++ colorgcc 2011-10-05 15:26:53.000000000 -0300
+@@ -221,17 +221,16 @@
+ # Figure out which compiler to invoke based on our program name.
+ $0 =~ m%.*/(.*)$%;
+ my $progName = $1 || $0;
+-my $compiler_pid;
++my $compiler;
+
+ # If called as "colorgcc", just filter STDIN to STDOUT.
+-if ($progName eq 'colorgcc')
++if ($progName =~ m/^colorgcc[-0-9.]*(\.pl)?$/)
+ {
+- open(GCCOUT, "<&STDIN");
++ $compiler = 'gcc';
+ }
+ else
+ {
+ # See if the user asked for a specific compiler.
+- my $compiler;
+ if (!defined($compiler = $compilerPaths{$progName}))
+ {
+ # Find our wrapper dir on the PATH and tweak the PATH to remove
+@@ -257,23 +256,23 @@
+ }
+ $compiler = $progName;
+ }
++}
+
+- # Get the terminal type.
+- my $terminal = $ENV{"TERM"} || "dumb";
++# Get the terminal type.
++my $terminal = $ENV{"TERM"} || "dumb";
+
+- # If it's in the list of terminal types not to color, or if
+- # we're writing to something that's not a tty, don't do color.
+- if (! -t STDOUT || $nocolor{$terminal})
+- {
++# If it's in the list of terminal types not to color, or if
++# we're writing to something that's not a tty, don't do color.
++if (! -t STDOUT || $nocolor{$terminal})
++{
+ exec $compiler, @ARGV
+ or die("Couldn't exec");
+- }
+-
+- # Keep the pid of the compiler process so we can get its return
+- # code and use that as our return code.
+- $compiler_pid = open3('<&STDIN', \*GCCOUT, \*GCCOUT, $compiler, @ARGV);
+ }
+
++# Keep the pid of the compiler process so we can get its return
++# code and use that as our return code.
++my $compiler_pid = open3('<&STDIN', \*GCCOUT, \*GCCOUT, $compiler, @ARGV);
++
+ # Colorize the output from the compiler.
+ while(<GCCOUT>)
+ {