src_prepare() {
epatch "${WORKDIR}"/${P}-ds9-5.4.patch
epatch "${FILESDIR}"/${P}-makefile.patch
sed -i -e "s:\${LINK}:\${LINK} ${LDFLAGS}:" mklib
eautoconf
}