#sh autogen.sh

# Only try and apply patches if we find out first patch file - otherwise this
# can cause a bailout of building all X packages (I think!)
if [ -f $PORTCWD/patch/driver/xf86-video-opentegra_0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch.xz ]; then
   auto_apply_patch $PORTCWD/patch/driver/xf86-video-opentegra_0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch.xz || exit 1
fi

# Switch errors to warnings -- wrong place since the makefile gets regenerated.
# See the pre-configure script.
#find . -type f -iname '*make*' -print0 | xargs -0 sed -i -e 's?-Werror=?-Wno-error=?g' -e 's?-Werror ?-Wall?g'
#sed -i -e 's?-Werror=?-Wno-error=?g' -e 's?-Werror ?-Wall ?g' Makefile
