diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2017-02-03 18:07:44 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2017-02-03 18:28:30 +0100 |
commit | bd97b660147609b31020e06ecf552d8473dfb0d3 (patch) | |
tree | 41cc36e897e5cc64966c8910995b87e05641817f /vars | |
parent | d1adc7c60425c2b34039f713881c3cdf75534ef1 (diff) | |
download | midipix_build-bd97b660147609b31020e06ecf552d8473dfb0d3.tar.bz2 midipix_build-bd97b660147609b31020e06ecf552d8473dfb0d3.tar.xz |
build.sh, etc/build.usage, {subr,vars}/*: general cleanup.
Diffstat (limited to 'vars')
-rw-r--r-- | vars/apr_util.vars | 3 | ||||
-rw-r--r-- | vars/build.vars | 1 | ||||
-rw-r--r-- | vars/clang_host.vars | 8 | ||||
-rw-r--r-- | vars/cmake.vars | 14 | ||||
-rw-r--r-- | vars/cparser.vars | 2 | ||||
-rw-r--r-- | vars/gcc.vars | 28 | ||||
-rw-r--r-- | vars/libfirm.vars | 2 | ||||
-rw-r--r-- | vars/llvm_host.vars | 6 | ||||
-rw-r--r-- | vars/musl.vars | 20 | ||||
-rw-r--r-- | vars/ncursesw.vars | 3 | ||||
-rw-r--r-- | vars/nginx.vars | 2 | ||||
-rw-r--r-- | vars/perl.vars | 2 | ||||
-rw-r--r-- | vars/pkgconf_host.vars | 2 | ||||
-rw-r--r-- | vars/psxstub.vars | 4 |
14 files changed, 49 insertions, 48 deletions
diff --git a/vars/apr_util.vars b/vars/apr_util.vars index 296ae712..f6681b83 100644 --- a/vars/apr_util.vars +++ b/vars/apr_util.vars @@ -3,7 +3,8 @@ # pkg_apr_util_install_post() { - cp -p ${PKG_PREFIX}/bin/apu-1-config \ + build_fileop cp \ + ${PKG_PREFIX}/bin/apu-1-config \ ${PREFIX}/bin/${PKG_TARGET}-apu-1-config; }; diff --git a/vars/build.vars b/vars/build.vars index 4d8dab83..50503899 100644 --- a/vars/build.vars +++ b/vars/build.vars @@ -40,6 +40,7 @@ fi; : ${BUILD_LOG_FNAME:=${PREFIX}/build.log}; : ${BUILD_LOG_LAST_FNAME:=${PREFIX}/build.log.last}; : ${BUILD_STATUS_IN_PROGRESS_FNAME:=${PREFIX}/BUILD_IN_PROGRESS}; +: ${BUILD_STEPS:="all:abstract disabled:always fetch:main extract:main build_dir:always patch_pre:main autoconf:main patch:main setup_env:always distclean:main configure:main clean:main build:main install:main"}; : ${CHECK_PREREQ_CMDS:="aclocal autoconf autopoint awk basename bunzip2 find flex gcc git groff gunzip install ld libtool lzma make makeinfo msgfmt nl nroff openssl paste patch python sed sha256sum sort tar tee tic tr uname wget xz"}; : ${CHECK_PREREQ_FILES:="/usr/include/gmpxx.h /usr/include/mpc.h /usr/include/mpfr.h"}; : ${CHECK_PREREQ_FILES_DYNAMIC:='/usr/share/groff/$(groff -v 2>/dev/null | awk '\''/^GNU groff version /{print $NF}'\'')/tmac/e.tmac'}; diff --git a/vars/clang_host.vars b/vars/clang_host.vars index 861dab03..199a8633 100644 --- a/vars/clang_host.vars +++ b/vars/clang_host.vars @@ -3,13 +3,13 @@ # pkg_clang_host_configure_pre() { - secure_rm ${WORKDIR}/Makefile; + build_fileop rm ${WORKDIR}/Makefile; }; pkg_clang_host_configure() { - secure_rm ../cfe-${PKG_VERSION}-host; - insecure_mkdir ../cfe-${PKG_VERSION}-host; - cd ../cfe-${PKG_VERSION}-host; + build_fileop rm ../cfe-${PKG_VERSION}-host; + build_fileop mkdir ../cfe-${PKG_VERSION}-host; + build_fileop cd ../cfe-${PKG_VERSION}-host; log_msg info "Bootstrapping clang_host..."; (${PREFIX}/bin/cmake ../cfe-${PKG_VERSION}.src \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ diff --git a/vars/cmake.vars b/vars/cmake.vars index ee60c82f..160c8fcb 100644 --- a/vars/cmake.vars +++ b/vars/cmake.vars @@ -3,11 +3,11 @@ # pkg_cmake_configure() { - cp -p ../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake \ + build_fileop cp ../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake \ ../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake; - secure_rm ../cmake-${PKG_VERSION}-host; - insecure_mkdir ../cmake-${PKG_VERSION}-host; - cd ../cmake-${PKG_VERSION}-host; + build_fileop rm ../cmake-${PKG_VERSION}-host; + build_fileop mkdir ../cmake-${PKG_VERSION}-host; + build_fileop cd ../cmake-${PKG_VERSION}-host; log_msg info "Bootstrapping cmake..."; (unset AR CC CXX RANLIB; ../cmake-${PKG_VERSION}/configure ${PKG_CONFIGURE_ARGS}; @@ -17,9 +17,9 @@ pkg_cmake_configure() { }; pkg_cmake_build() { - secure_rm ../cmake-${PKG_VERSION}-native-${PKG_TARGET}; - insecure_mkdir ../cmake-${PKG_VERSION}-native-${PKG_TARGET}; - cd ${WORKDIR}/cmake-${PKG_VERSION}-native-${PKG_TARGET}; + build_fileop rm ../cmake-${PKG_VERSION}-native-${PKG_TARGET}; + build_fileop mkdir ../cmake-${PKG_VERSION}-native-${PKG_TARGET}; + build_fileop cd ${WORKDIR}/cmake-${PKG_VERSION}-native-${PKG_TARGET}; rm -f config.cache; log_msg info "Calling cmake..."; _pcb_prefix=${PREFIX}; diff --git a/vars/cparser.vars b/vars/cparser.vars index 1977745b..ad4559a2 100644 --- a/vars/cparser.vars +++ b/vars/cparser.vars @@ -3,7 +3,7 @@ # pkg_cparser_configure_pre() { - insecure_mkdir cparser+libfirm/sysroot cparser+libfirm/build/cparser; + build_fileop mkdir cparser+libfirm/sysroot cparser+libfirm/build/cparser; export CFLAGS_PATH="-I../../sysroot/include"; export LDFLAGS_PATH="-L../../sysroot/lib"; }; diff --git a/vars/gcc.vars b/vars/gcc.vars index 217c2b25..9d5f82b9 100644 --- a/vars/gcc.vars +++ b/vars/gcc.vars @@ -38,9 +38,9 @@ pkgp_gcc_setup_env() { }; pkgp_gcc_configure() { - secure_rm ${PKG_BUILD_DIR}; - insecure_mkdir ${PKG_BUILD_DIR}; - secure_cd ${PKG_BUILD_DIR}; + build_fileop rm ${PKG_BUILD_DIR}; + build_fileop mkdir ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; ../cbb-gcc-${PKG_GCC_VERSION}/configure "${@}" \ --disable-bootstrap \ --disable-libmudflap \ @@ -96,9 +96,9 @@ pkg_gcc_stage1_all() { fi; pkgp_gcc_setup_env ${PKG_GCC_VERSION}; if ! is_build_script_done configure; then - insecure_mkdir ${PKG_PREFIX}/include; + build_fileop mkdir ${PKG_PREFIX}/include; [ \! -d ${PKG_PREFIX}/usr ] && \ - ln -s -- . ${PKG_PREFIX}/usr; + build_fileop ln_symbolic . ${PKG_PREFIX}/usr; case ${PKG_NAME} in gcc_stage1) pkgp_gcc_configure \ @@ -126,7 +126,7 @@ pkg_gcc_stage1_all() { --without-headers; ;; esac; else - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; fi; if ! is_build_script_done clean; then make ${MAKEFLAGS} clean; @@ -147,8 +147,8 @@ pkg_gcc_stage1_all() { esac; __="$(uname -s)"; if [ "${__#*CYGWIN*}" != "${__}" ]; then - ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ - ln -s -- ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so; + build_fileop ln_symbolic ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.dll.a \ + build_fileop ln_symbolic ${PREFIX}/libexec/gcc/${PKG_TARGET}/${PKG_GCC_VERSION}/liblto_plugin.so; fi; set_build_script_done install finish; fi; @@ -157,7 +157,7 @@ pkg_gcc_stage1_all() { pkg_gcc_runtime_all() { export MAKE="make LIBTOOL=slibtool"; set_build_dir cbb-gcc-${PKG_GCC_RUNTIME_VERSION} cross; - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; # GCC, compiler runtime. if ! is_build_script_done build; then make ${MAKEFLAGS} all-target-libgcc; @@ -172,7 +172,7 @@ pkg_gcc_runtime_all() { pkg_gcc_libstdcpp_v3_all() { export MAKE="make LIBTOOL=slibtool"; set_build_dir cbb-gcc-${PKG_GCC_LIBSTDCPP_V3_VERSION} cross; - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; # GCC, libstdc++-v3. if ! is_build_script_done build; then make ${MAKEFLAGS} all-target-libstdc++-v3; @@ -187,7 +187,7 @@ pkg_gcc_libstdcpp_v3_all() { pkg_gcc_full_all() { export MAKE="make LIBTOOL=slibtool"; set_build_dir cbb-gcc-${PKG_GCC_FULL_VERSION} cross; - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; # GCC, everything else. if ! is_build_script_done build; then make ${MAKEFLAGS}; @@ -206,9 +206,9 @@ pkg_gcc_native_all() { set_build_dir cbb-gcc-${PKG_GCC_VERSION} native; pkgp_gcc_setup_env ${PKG_GCC_VERSION}; if ! is_build_script_done configure; then - insecure_mkdir ${PKG_PREFIX}/${PKG_TARGET}; + build_fileop mkdir ${PKG_PREFIX}/${PKG_TARGET}; if [ \! -d ${PKG_PREFIX}/${PKG_TARGET}/usr ]; then - ln -s -- . ${PKG_PREFIX}/${PKG_TARGET}/usr; + build_fileop ln_symbolic . ${PKG_PREFIX}/${PKG_TARGET}/usr; fi; if [ "${ARCH}" = nt32 ]; then _pgna_host="i686-nt32-midipix"; @@ -225,7 +225,7 @@ pkg_gcc_native_all() { --with-mpfr=${PKG_PREFIX} \ --with-sysroot=; else - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; fi; if ! is_build_script_done clean; then make ${MAKEFLAGS} clean; diff --git a/vars/libfirm.vars b/vars/libfirm.vars index 1d579108..b41a53d2 100644 --- a/vars/libfirm.vars +++ b/vars/libfirm.vars @@ -3,7 +3,7 @@ # pkg_libfirm_configure_pre() { - insecure_mkdir cparser+libfirm/sysroot cparser+libfirm/build/libfirm; + build_fileop mkdir cparser+libfirm/sysroot cparser+libfirm/build/libfirm; }; # vim:filetype=sh diff --git a/vars/llvm_host.vars b/vars/llvm_host.vars index 57b581fa..87341150 100644 --- a/vars/llvm_host.vars +++ b/vars/llvm_host.vars @@ -3,9 +3,9 @@ # pkg_llvm_host_configure() { - secure_rm ../llvm-${PKG_VERSION}-host; - insecure_mkdir ../llvm-${PKG_VERSION}-host; - cd ../llvm-${PKG_VERSION}-host; + build_fileop rm ../llvm-${PKG_VERSION}-host; + build_fileop mkdir ../llvm-${PKG_VERSION}-host; + build_fileop cd ../llvm-${PKG_VERSION}-host; log_msg info "Bootstrapping llvm_host..."; (${PREFIX}/bin/cmake ../llvm-${PKG_VERSION}.src \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/vars/musl.vars b/vars/musl.vars index 8d0e53bc..ed7444f4 100644 --- a/vars/musl.vars +++ b/vars/musl.vars @@ -4,9 +4,9 @@ # pkgp_musl_configure() { - secure_rm ${PKG_BUILD_DIR}; - insecure_mkdir ${PKG_BUILD_DIR}; - secure_cd ${PKG_BUILD_DIR}; + build_fileop rm ${PKG_BUILD_DIR}; + build_fileop mkdir ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; env lz_cflags_cmdline="" \ lz_debug="yes" \ ../lazy/lazy \ @@ -30,21 +30,21 @@ pkg_musl_no_complex_all() { if ! is_build_script_done fetch; then pkg_fetch http://www.musl-libc.org/releases/musl-${PKG_MUSL_VERSION}.tar.gz \ ${PKG_MUSL_NO_COMPLEX_SHA256SUM}; - secure_rm mmglue; + build_fileop rm mmglue; pkg_fetch -git "mmglue=${GITROOT}/mmglue"; set_build_script_done fetch -extract; fi; if ! is_build_script_done extract; then - secure_rm musl-${PKG_MUSL_VERSION}; + build_fileop rm musl-${PKG_MUSL_VERSION}; tar -xf ${DLCACHEDIR}/musl-${PKG_MUSL_VERSION}.tar.gz; - set +o noglob; cp -R -- mmglue/* musl-${PKG_MUSL_VERSION}/; set -o noglob; + set +o noglob; build_fileop cp mmglue/* musl-${PKG_MUSL_VERSION}/; set -o noglob; set_build_script_done extract -configure; fi; if ! is_build_script_done configure; then pkgp_musl_configure; set_build_script_done configure clean -build; else - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; fi; if ! is_build_script_done clean; then make ${MAKEFLAGS} clean; @@ -69,7 +69,7 @@ pkg_musl_native_all() { pkgp_musl_configure; set_build_script_done configure clean -build; else - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; fi; if ! is_build_script_done clean; then make ${MAKEFLAGS} clean; @@ -78,7 +78,7 @@ pkg_musl_native_all() { if ! is_build_script_done build; then ./lazy -e ${_install} \ -x build; - ln -sf -- ../lib/libc.so ${PKG_PREFIX}/bin/ldd; + build_fileop ln_symbolic ../lib/libc.so ${PKG_PREFIX}/bin/ldd; set_build_script_done build finish; fi; }; @@ -95,7 +95,7 @@ pkg_musl_full_all() { pkgp_musl_configure; set_build_script_done configure clean -build; else - cd ${PKG_BUILD_DIR}; + build_fileop cd ${PKG_BUILD_DIR}; fi; if ! is_build_script_done clean; then make ${MAKEFLAGS} clean; diff --git a/vars/ncursesw.vars b/vars/ncursesw.vars index 50024dec..03118da0 100644 --- a/vars/ncursesw.vars +++ b/vars/ncursesw.vars @@ -9,8 +9,7 @@ pkg_ncursesw_install_post() { lib/libformw* lib/libmenuw* lib/libncursesw* lib/libpanelw* \ share/man share/tabset share/terminfo; do set +o noglob; - echo cp -pr ${PKG_PREFIX}/${__} ${PREFIX_MINIPIX}/${__%%/*}; - cp -pr ${PKG_PREFIX}/${__} ${PREFIX_MINIPIX}/${__%%/*}; + build_fileop cp ${PKG_PREFIX}/${__} ${PREFIX_MINIPIX}/${__%%/*}; set -o noglob; done; }; diff --git a/vars/nginx.vars b/vars/nginx.vars index e9db7982..154c73b4 100644 --- a/vars/nginx.vars +++ b/vars/nginx.vars @@ -5,7 +5,7 @@ pkg_nginx_configure() { export CFLAGS="${PKG_CFLAGS_CONFIGURE} -I${PKG_PREFIX}/include -pipe -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror"; export LDFLAGS="${PKG_LDFLAGS_CONFIGURE} -L${PKG_PREFIX}/lib"; - insecure_mkdir objs/src objs/src/core objs/src/event objs/src/event/modules objs/src/http objs/src/http/modules objs/src/os/unix; + build_fileop mkdir objs/src objs/src/core objs/src/event objs/src/event/modules objs/src/http objs/src/http/modules objs/src/os/unix; set_build_script_done configure clean -build; }; diff --git a/vars/perl.vars b/vars/perl.vars index 28f9d9bd..3d021fa0 100644 --- a/vars/perl.vars +++ b/vars/perl.vars @@ -12,7 +12,7 @@ pkg_perl_extract_post() { if [ ! -d "$(dirname ${_ppep_fname_dst})" ]; then mkdir -p -- $(dirname ${_ppep_fname_dst}); fi; - cp -- ${_ppep_fname_src} ${_ppep_fname_dst}; + build_fileop cp ${_ppep_fname_src} ${_ppep_fname_dst}; done; for _ppep_cflag in ${PKG_CFLAGS_CONFIGURE}; do PKG_CONFIGURE_ARGS="${PKG_CONFIGURE_ARGS:+${PKG_CONFIGURE_ARGS} }-A ccflags=${_ppep_cflag}"; diff --git a/vars/pkgconf_host.vars b/vars/pkgconf_host.vars index 61d467a2..3435a2c0 100644 --- a/vars/pkgconf_host.vars +++ b/vars/pkgconf_host.vars @@ -4,7 +4,7 @@ pkg_pkgconf_host_install_post() { if [ -e ${PREFIX}/bin/${TARGET}-pkg-config ]; then - secure_rm ${PREFIX}/bin/${TARGET}-pkg-config; + build_fileop rm ${PREFIX}/bin/${TARGET}-pkg-config; fi; cat > ${PREFIX}/bin/${TARGET}-pkg-config <<EOF #!/bin/sh diff --git a/vars/psxstub.vars b/vars/psxstub.vars index 2dad9c4e..a476bd15 100644 --- a/vars/psxstub.vars +++ b/vars/psxstub.vars @@ -7,10 +7,10 @@ pkg_psxstub_all() { if ! is_build_script_done install; then if [ "${TARGET}" = i686-nt32-midipix ] \ || [ "${TARGET}" = x86_64-nt64-midipix ]; then - cd psxstub; + build_fileop cd psxstub; make ${MAKEFLAGS} DESTDIR=${PKG_PREFIX} TARGET=${TARGET} install; if [ -e ${PKG_PREFIX}/lib/libpsxscl.a ]; then - secure_rm ${PKG_PREFIX}/lib/libpsxscl.a; + build_fileop rm ${PKG_PREFIX}/lib/libpsxscl.a; fi; set_build_script_done install finish; fi; |