-termux_step_pre_configure () {
- local _ARCHFILE=$TERMUX_PKG_BUILDER_DIR/arch-arm.h
- $TERMUX_TOUCH -d "next hour" $_ARCHFILE
- perl -p -i -e "s|TARGET_ARCH_FILE=.*|TARGET_ARCH_FILE=$_ARCHFILE|" $TERMUX_PKG_SRCDIR/Makefile.in
+termux_step_post_extract_package () {
+ rm -rdf $TERMUX_PKG_SRCDIR/jpeg
+ rm -rdf $TERMUX_PKG_SRCDIR/libpng
+
+ if [ -f $PREFIX/include/libandroid-support/time.h ]; then
+ mv $PREFIX/include/libandroid-support/time.h $PREFIX/include/libandroid-support/time.h_
+ fi
+ # Patch needed to libandroid's time.h? ghostscript/src/base/stat_.h includes stat_.h which includes time.h which creates a loop.
+ # See http://stackoverflow.com/questions/14947691/c-system-file-bits-stat-h-suddenly-breaks-with-error-field-st-atim-has-inc
+}
+
+termux_step_post_make_install () {
+ if [ -f $PREFIX/include/libandroid-support/time.h_ ]; then
+ mv $PREFIX/include/libandroid-support/time.h_ $PREFIX/include/libandroid-support/time.h
+ fi