summaryrefslogtreecommitdiffhomepage
path: root/vars
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-06 02:49:26 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-06 04:23:24 +0000
commitd5afb4ad3d60f078e64e402e403f0e55fc711714 (patch)
tree97b07d1cb8e54c3c7003a7743da069b9517f6bd4 /vars
parent8ee843a21869a1dc38a7fc7b543b7a5a1231a4e9 (diff)
downloadmidipix_build-d5afb4ad3d60f078e64e402e403f0e55fc711714.tar.bz2
midipix_build-d5afb4ad3d60f078e64e402e403f0e55fc711714.tar.xz
build.sh, {subr,vars}/*: general cleanup.
Diffstat (limited to 'vars')
-rw-r--r--vars/gcc.vars22
-rw-r--r--vars/musl.vars12
-rw-r--r--vars/perl.vars5
-rw-r--r--vars/psxstub.vars2
4 files changed, 23 insertions, 18 deletions
diff --git a/vars/gcc.vars b/vars/gcc.vars
index b1f6abab..1660334e 100644
--- a/vars/gcc.vars
+++ b/vars/gcc.vars
@@ -39,9 +39,9 @@ pkgp_gcc_setup_env() {
};
pkgp_gcc_configure() {
- build_fileop rm "${PKG_BUILD_DIR}";
- build_fileop mkdir "${PKG_BUILD_DIR}";
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop rm "${WORKDIR}/${PKG_BUILD_DIR}";
+ build_fileop mkdir "${WORKDIR}/${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
"../cbb-gcc-${PKG_GCC_VERSION}/configure" "${@}"\
--disable-bootstrap \
--disable-libmudflap \
@@ -72,6 +72,10 @@ pkg_gcc_stage1_cross_x86_64_w64_mingw32_all() {
};
pkg_gcc_stage1_native_x86_64_w64_mingw32_all() {
+ export AR="${TARGET}-ar";
+ export CC="${TARGET}-gcc";
+ export CXX="${TARGET}-g++";
+ export RANLIB="${TARGET}-ranlib";
pkg_gcc_stage1_all "${@}";
};
@@ -114,7 +118,7 @@ pkg_gcc_stage1_all() {
--with-sysroot="${PREFIX}/${PKG_TARGET}"\
--without-headers; ;;
gcc_stage1_native_x86_64_w64_mingw32)
- patch -b -d cbb-gcc-4.6.4 -p1 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch";
+ patch -b -d "${WORKDIR}/cbb-gcc-4.6.4" -p1 < "${MIDIPIX_BUILD_PWD}/patches/${PKG_NAME}.local.patch";
pkgp_gcc_configure \
--build=x86_64-unknown-linux-gnu \
--enable-sjlj-exceptions \
@@ -128,7 +132,7 @@ pkg_gcc_stage1_all() {
--without-headers; ;;
esac;
else
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
fi;
if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-gcc;
@@ -157,7 +161,7 @@ pkg_gcc_runtime_all() {
local _restart_at="${1}";
export MAKE="make LIBTOOL=slibtool";
set_build_dir "cbb-gcc-${PKG_GCC_RUNTIME_VERSION}" cross;
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
# GCC, compiler runtime.
if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-target-libgcc;
@@ -174,7 +178,7 @@ pkg_gcc_libstdcpp_v3_all() {
local _restart_at="${1}";
export MAKE="make LIBTOOL=slibtool";
set_build_dir "cbb-gcc-${PKG_GCC_LIBSTDCPP_V3_VERSION}" cross;
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
# GCC, libstdc++-v3.
if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-target-libstdc++-v3;
@@ -191,7 +195,7 @@ pkg_gcc_full_all() {
local _restart_at="${1}";
export MAKE="make LIBTOOL=slibtool";
set_build_dir "cbb-gcc-${PKG_GCC_FULL_VERSION}" cross;
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
# GCC, everything else.
if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS};
@@ -231,7 +235,7 @@ pkg_gcc_native_all() {
--with-mpfr="${PKG_PREFIX}" \
--with-sysroot=;
else
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
fi;
if ! is_build_script_done "${PKG_NAME}" build "${_restart_at}"; then
make ${MAKEFLAGS} all-gcc;
diff --git a/vars/musl.vars b/vars/musl.vars
index 5ba6e793..d5c88aac 100644
--- a/vars/musl.vars
+++ b/vars/musl.vars
@@ -4,9 +4,9 @@
#
pkgp_musl_configure() {
- build_fileop rm "${PKG_BUILD_DIR}";
- build_fileop mkdir "${PKG_BUILD_DIR}";
- build_fileop cd "${PKG_BUILD_DIR}";
+ build_fileop rm "${WORKDIR}/${PKG_BUILD_DIR}";
+ build_fileop mkdir "${WORKDIR}/${PKG_BUILD_DIR}";
+ build_fileop cd "${WORKDIR}/${PKG_BUILD_DIR}";
env lz_cflags_cmdline="" \
lz_debug="yes" \
../lazy/lazy \
@@ -31,15 +31,15 @@ pkg_musl_no_complex_all() {
if ! is_build_script_done "${PKG_NAME}" fetch "${_restart_at}"; then
pkg_fetch "http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz" \
"${PKG_MUSL_NO_COMPLEX_SHA256SUM}";
- build_fileop rm mmglue;
+ build_fileop rm "${WORKDIR}/mmglue";
pkg_fetch -git "mmglue=${GITROOT}/mmglue";
set_build_script_done "${PKG_NAME}" fetch -extract;
fi;
if ! is_build_script_done "${PKG_NAME}" extract "${_restart_at}"; then
build_fileop rm "musl-${PKG_MUSL_VERSION}";
- tar -xf "${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz";
+ tar -C "${WORKDIR}" -xf "${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz";
set +o noglob;
- build_fileop cp mmglue/* "musl-${PKG_MUSL_VERSION}/";
+ build_fileop cp ${WORKDIR}/mmglue/* "${WORKDIR}/musl-${PKG_MUSL_VERSION}/";
set -o noglob;
set_build_script_done "${PKG_NAME}" extract -configure;
fi;
diff --git a/vars/perl.vars b/vars/perl.vars
index f7ce19e0..edfd111b 100644
--- a/vars/perl.vars
+++ b/vars/perl.vars
@@ -4,6 +4,7 @@
pkg_perl_extract_post() {
local _fname_src _fname_dst _cflag;
+ (build_fileop cd "${WORKDIR}";
for _fname_src in $(find perl-cross -type f \
-not -path perl-cross/.git/\* -not -name .gitignore); do
_fname_dst="perl-${PKG_VERSION}${_fname_src#perl-cross}";
@@ -11,10 +12,10 @@ pkg_perl_extract_post() {
build_fileop mv "${_fname_dst}" "${_fname_dst}.orig";
fi;
if [ ! -d "$(dirname "${_fname_dst}")" ]; then
- mkdir -p -- "$(dirname "${_fname_dst}")";
+ build_fileop mkdir "$(dirname "${_fname_dst}")";
fi;
build_fileop cp "${_fname_src}" "${_fname_dst}";
- done;
+ done);
for _cflag in ${PKG_CFLAGS_CONFIGURE}; do
PKG_CONFIGURE_ARGS="${PKG_CONFIGURE_ARGS:+${PKG_CONFIGURE_ARGS} }-A ccflags=${_cflag}";
done;
diff --git a/vars/psxstub.vars b/vars/psxstub.vars
index e0ba9c5f..35399663 100644
--- a/vars/psxstub.vars
+++ b/vars/psxstub.vars
@@ -5,7 +5,7 @@
pkg_psxstub_install() {
if [ "${TARGET}" = i686-nt32-midipix ] \
|| [ "${TARGET}" = x86_64-nt64-midipix ]; then
- build_fileop cd psxstub;
+ build_fileop cd "${WORKDIR}/psxstub";
make ${MAKEFLAGS} "DESTDIR=${PKG_PREFIX}" "TARGET=${TARGET}" install;
if [ -e "${PKG_PREFIX}/lib/libpsxscl.a" ]; then
build_fileop rm "${PKG_PREFIX}/lib/libpsxscl.a";