openbsd-ports/math/octave/patches/patch-libcruft_mkf77def_in
2008-01-21 18:30:13 +00:00

14 lines
749 B
Plaintext

$OpenBSD: patch-libcruft_mkf77def_in,v 1.2 2008/01/21 18:30:13 steven Exp $
--- libcruft/mkf77def.in.orig Sat Oct 13 03:42:21 2007
+++ libcruft/mkf77def.in Sat Dec 29 17:24:23 2007
@@ -43,4 +43,8 @@ else
awkcmd="$AWK '{ printf (\"%s%s\n\", tolower (\$0), \"$uscore\"); }'"
fi
-$SED -n -e 'y/ABCDEFGHIJLKMNOPQRSTUVWXYZ/abcdefghijlkmnopqrstuvwxyz/; s/^\( \| \)[ ]*\(.*function\|subroutine\|entry\)[ ]*\([^ (]*\).*$/\3/p' | eval $awkcmd
+#$SED -n -e 'y/ABCDEFGHIJLKMNOPQRSTUVWXYZ/abcdefghijlkmnopqrstuvwxyz/; s/^\( \| \)[ ]*\(.*function\|subroutine\|entry\)[ ]*\([^ (]*\).*$/\3/p' | eval $awkcmd
+perl -pi \
+ -e 's/([A-Z])/\l\1/g;' \
+ -e 's/^\s+(.*function|subroutine|entry)\s*([^\s(]*).*$/\2/ or $_=undef' | \
+ eval $awkcmd