#!/bin/sh

cat >>$WRKSRC/Makefile <<END || exit 1;

all:
	cd src; make OPT=-O
END

mv $WRKSRC/src/p2cc.perl $WRKSRC/src/p2cc.perl.orig || exit 1;
sed -e 1s/--.*// < $WRKSRC/src/p2cc.perl.orig > $WRKSRC/src/p2cc.perl || exit 1;

cat >>$WRKSRC/src/Makefile <<END || exit 1;
HOMEDIR=$PREFIX/lib/p2c
INCDIR=$PREFIX/include/p2c
BINDIR=$PREFIX/bin
LIBDIR=$PREFIX/lib
MANDIR=$PREFIX/man/man1
ABSHOMEDIR=$PREFIX/lib/p2c
END

exit 0;


syntax highlighted by Code2HTML, v. 0.9.1