#SRC_FETCH_PATH="http://www.libgd.org/releases/gd-2.0.35.tar.bz2" SRC_FETCH_PATH="ftp://ftp.eenet.ee/pub/FreeBSD/distfiles/gd-2.0.35.tar.bz2" SRC_FETCH_METHOD="http" MAKEDEPENDS=( 'libpng-*::: *.h *.so *.so.*' 'zlib-*::: *.h *.so *.so.*' ) function do_config { CC="$CC" CXX="$CXX" LD="$LD" \ RANLIB="$RANLIB" AR="$AR" AS="$AS" NM="$NM" OBJDUMP="$OBJDUMP" \ LDFLAGS="-L$FLXROOTDIR/usr/lib/" \ ./configure --host="$FLXTARG" --build="$FLXHOST" --without-xpm --without-jpeg --without-fontconfig --without-freetype --without-x --without-png --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/lib -lpng" } function do_prepack { $FLXMAKE install DESTDIR=$ROOTDIR }