blob: aff5fb958c45f4a2f9ab162191e567d8526a1330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
outdir=out
cd ${WRKSRC} || exit 2
echo "Patching for FlexLexer.h <->gcc3 issues"
file=""
candidates=`find /usr/include -name FlexLexer.h`
#take first found file.
for d in $candidates; do if [ -f $d ]; then file=$d; break; fi; done
if [ -z "${file}" ]; then echo "Cannot find FlexLexer.h"; exit 2; fi
echo -n "Copying and fixing $file... "
mkdir -p lily/$outdir
rm -f lily/$outdir/FlexLexer.h
sed \
-e 's/istream/std::istream/' \
-e 's/[^i]ostream/std::ostream/' \
-e 's/iostream.h/iostream/' \
$file > lily/$outdir/FlexLexer.h
echo "done"
|