From c497546f591a3cc128abda42d0026c46ffdd6c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Sat, 6 Feb 2016 16:47:09 +0100 Subject: - Refactored package building procedure into build.vars. - Changed build directory name format to $[1}-{cross,native}-${TARGET}. - Fixed binutils.host DESTDIR and libelf installation bug. --- 200.coreutils.build | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) (limited to '200.coreutils.build') diff --git a/200.coreutils.build b/200.coreutils.build index 2eaf4428..89f03178 100644 --- a/200.coreutils.build +++ b/200.coreutils.build @@ -1,29 +1,21 @@ export CFLAGS="${CFLAGS_PACKAGES}"; -parse_with_pkg_name ${2} \ - https://ftp.gnu.org/gnu/coreutils/coreutils-${PKG_COREUTILS_VERSION}.tar.xz "" \ - https://ftp.gnu.org/gnu/diffutils/diffutils-${PKG_DIFFUTILS_VERSION}.tar.xz "" \ - http://alpha.gnu.org/gnu/findutils/findutils-${PKG_FINDUTILS_VERSION}.tar.gz \ - "CFLAGS=${CFLAGS:+${CFLAGS} }-Dendpwent=setpwent" \ - https://ftp.gnu.org/gnu/patch/patch-${PKG_PATCH_VERSION}.tar.gz "" \ - https://ftp.gnu.org/gnu/gawk/gawk-${PKG_GAWK_VERSION}.tar.xz "" \ - https://ftp.gnu.org/gnu/bash/bash-${PKG_BASH_VERSION}.tar.gz \ - _configure_extra_args=--without-bash-malloc \ - https://ftp.gnu.org/gnu/make/make-${PKG_MAKE_VERSION}.tar.bz2 "" \ - https://ftp.gnu.org/gnu/grep/grep-${PKG_GREP_VERSION}.tar.xz "" \ - https://ftp.gnu.org/gnu/sed/sed-${PKG_SED_VERSION}.tar.bz2 "" \ - ftp://sourceware.org/pub/binutils/snapshots/binutils-${PKG_BINUTILS_VERSION}.tar.bz2 ""; - +parse_with_pkg_name ${2} \ + coreutils diffutils findutils patch \ + gawk bash make grep sed binutils; if is_build_script_done finished; then exit 212; else fetch ${_pkg_url} ${_pkg_sha256sum}; if [ "x${_pkg_name}" = "xbinutils" ]\ && [ "x${3}" = "xhost" ]; then - _configure_args="--disable-werror,--prefix=${PREFIX},--with-sysroot=${PREFIX_TARGET}"; - _no_config_cache=${_no_prefix:=1}; _target=${TARGET}; + _no_config_cache=1; _no_destdir=1; + _configure_args="--disable-werror --prefix=${PREFIX} --with-sysroot=${PREFIX_TARGET}"; + set_build_dir ${_pkg_subdir} cross; else - _configure_args="-C,--host=${HOST_NATIVE},--prefix=${_configure_extra_args:+,${_configure_extra_args}}"; + _configure_args="-C --host=${HOST_NATIVE} --prefix="; + set_build_dir ${_pkg_subdir} native; fi; + _configure_args="${_configure_args}${_pkg_configure_extra_args:+ ${_pkg_configure_extra_args}}"; fi; if ! is_build_script_done extracted; then rm_if_exists ${_pkg_subdir}; @@ -36,23 +28,21 @@ if ! is_build_script_done patched; then set_build_script_done patched -configured; fi; if ! is_build_script_done configured; then - rm_if_exists -c -m ${_pkg_subdir}-build-${_target:-native}; + rm_if_exists -m -c ${_build_dir}; [ ${_no_config_cache:-0} -eq 0 ] &&\ cp -a ../portage/config.cache .; - run_configure_with_extra_args \ - ../${_pkg_subdir}/configure \ - "${_configure_args}" \ - --target=${TARGET}; + ../${_pkg_subdir}/configure \ + ${_configure_args} --target=${TARGET}; set_build_script_done configured -built; else - cd ${_pkg_subdir}-build-${_target:-native}; + cd ${_build_dir}; fi; if ! is_build_script_done built; then make ${MAKEFLAGS}; set_build_script_done built -installed; fi; if ! is_build_script_done installed; then - if [ ${_no_prefix:-0} -eq 0 ]; then + if [ ${_no_destdir:-0} -eq 0 ]; then make ${MAKEFLAGS} DESTDIR=${PREFIX_NATIVE} install; else make ${MAKEFLAGS} install; -- cgit v1.2.3