slackbuilds_ponce/system/pdksh/patches/043_Debian-siglist.patch
2010-05-13 01:01:03 +02:00

23 lines
958 B
Diff

* siglist.sh: fix sed command line
* siglist.sh: pass `-' to trap call, fixes FTBFS on sparc.
Index: pdksh-5.2.14/siglist.sh
===================================================================
--- pdksh-5.2.14.orig/siglist.sh 2008-04-15 20:46:55.000000000 +0200
+++ pdksh-5.2.14/siglist.sh 2008-04-15 20:53:20.000000000 +0200
@@ -16,14 +16,14 @@
CPP="${1-cc -E}"
# The trap here to make up for a bug in bash (1.14.3(1)) that calls the trap
-(trap $trapsigs;
+(trap - $trapsigs;
echo '#include "sh.h"';
echo ' { QwErTy SIGNALS , "DUMMY" , "hook for number of signals" },';
sed -e '/^[ ]*#/d' -e 's/^[ ]*\([^ ][^ ]*\)[ ][ ]*\(.*[^ ]\)[ ]*$/#ifdef SIG\1\
{ QwErTy SIG\1 , "\1", "\2" },\
#endif/') > $in
$CPP $in > $out
-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
+sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k 3n -k 1n |
sed 's/^[0-9]* //' |
awk 'BEGIN { last=0; nsigs=0; }
{