Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# . ./build.vars and set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# See warning at the top of build.vars.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 7fe25d
pkg_setup_env() {
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	PKG_SUBDIR_PATH=${PWD}/${PKG_SUBDIR#/};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	if [ -z "${PKG_CONFIGURE}" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		PKG_CONFIGURE=${PKG_SUBDIR_PATH}/configure;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	else
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		PKG_CONFIGURE=${PWD}/${PKG_CONFIGURE#/};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	if [ "${PKG_BUILD_TYPE}" = "host" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export AR=ar;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export CC=gcc;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export CXX=g++;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export RANLIB=ranlib;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	else
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export AR=${PKG_TARGET}-ar;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export CC=${PKG_TARGET}-gcc;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export CXX=${PKG_TARGET}-g++;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export RANLIB=${PKG_TARGET}-ranlib;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	if [ -x ${PKG_CONFIGURE} ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		export CFLAGS_FOR_BUILD="${HOST_TOOLCHAIN_CFLAGS_CONFIGURE_DEFAULT}";
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	else
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
		__no_autoconf=1;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) f539a4
	if [ "${PKG_SLIBTOOL}" != "default" ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) f539a4
		export MAKE="make LIBTOOL=${PKG_SLIBTOOL:-slibtool}";
Lucio Andrés Illanes Albornoz (arab, vxp) f539a4
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) bd97b6
	build_fileop cd ${PKG_BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) 5b02e1
	set_build_script_done setup distclean -configure;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# vim:filetype=sh