midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame 006.musl.build

Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
export lz_arch=${ARCH} lz_cflags_debug=-O2 lz_target=${TARGET};
lalbornoz 340f4c
lalbornoz 340f4c
if is_build_script_done finished; then
lalbornoz 340f4c
        exit 212;
lalbornoz 340f4c
elif [ "x${3}" = "xno-complex" ]; then
lalbornoz 340f4c
	# Musl: build (no-complex)
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	unset _destdir;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	_install=install_no_complex;
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
	set_build_dir musl-${PKG_MUSL_VERSION}-${3} cross;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz	\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		${PKG_MUSL_SHA256SUM};
lalbornoz 340f4c
	if ! is_build_script_done extracted; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		rm_if_exists musl-${PKG_MUSL_VERSION};
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		tar -xf musl-${PKG_MUSL_VERSION}.tar.gz;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		cp -R mmglue/* musl-${PKG_MUSL_VERSION}/;
lalbornoz 340f4c
		set_build_script_done extracted -configured;
lalbornoz 340f4c
	fi;
lalbornoz 340f4c
elif [ "x${3}" = "xnative" ]; then
lalbornoz 340f4c
	# Musl: build (full)
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	_destdir=${PREFIX_NATIVE};
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	_install=install;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	set_build_dir musl-${PKG_MUSL_VERSION} ${3};
lalbornoz 340f4c
else
lalbornoz 340f4c
	# Musl: build (full)
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	unset _destdir;
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	_install=install;
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
	set_build_dir musl-${PKG_MUSL_VERSION} cross;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done configured; then
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	rm_if_exists -m -c ${BUILD_DIR};
lalbornoz 340f4c
	../lazy/lazy					\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		-a ${ARCH}				\
lalbornoz 340f4c
		-c gcc					\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		-f ${_destdir:-${PREFIX_TARGET}}	\
lalbornoz 340f4c
		-n musl					\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		-p ../musl-${PKG_MUSL_VERSION}		\
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
		-t ${lz_target}				\
lalbornoz 340f4c
		-x config;
lalbornoz 340f4c
	set_build_script_done configured -built;
lalbornoz 340f4c
else
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	cd ${BUILD_DIR};
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done built; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	./lazy	-e ${_install}				\
lalbornoz 340f4c
		-x build;
lalbornoz 340f4c
	set_build_script_done built finished;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
lalbornoz 340f4c
# vim:filetype=sh