SRC_FETCH_PATH="https://github.com/libgd/libgd/archive/gd-${PKGVER}.tar.gz" SRC_FETCH_METHOD="http" PATCH_LIST= MAKEDEPENDS=( 'libpng-*::: *.h *.so *.so.*' 'zlib-*::: *.h *.so *.so.*' ) function do_config { autoreconf -i CXXCPP="$CC -E -x c" CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ LDFLAGS="-L$FLXROOTDIR/usr/lib/" \ LIBPNG_CONFIG="/bin/true" \ ./configure --host="$FLXTARG" --build="$FLXHOST" --without-xpm --without-jpeg --without-tiff --without-fontconfig --without-freetype --without-webp --without-liq --without-x --with-png="$FLXROOTDIR/usr" --prefix=/usr --libdir=/usr/lib } # configure is unable to find sysroot libpng and incorrectly use host libpng instead, # so we disable libpng in configure and force it in make function do_compile_only { $FLXMAKE CFLAGS="-I$FLXROOTDIR/usr/include -D_GNU_SOURCE -DHAVE_LIBPNG" LDFLAGS="-L$FLXROOTDIR/usr/lib -lpng" } function do_prepack { $FLXMAKE install DESTDIR=$ROOTDIR }