diff options
-rw-r--r-- | subr/build.subr | 3 | ||||
-rw-r--r-- | subr/post_strip.subr | 3 | ||||
-rw-r--r-- | vars/apr.vars | 4 | ||||
-rw-r--r-- | vars/apr_util.vars | 4 | ||||
-rw-r--r-- | vars/clang_host.vars | 11 | ||||
-rw-r--r-- | vars/cmake.vars | 56 | ||||
-rw-r--r-- | vars/git.vars | 5 | ||||
-rw-r--r-- | vars/libxml2.vars | 12 | ||||
-rw-r--r-- | vars/llvm_host.vars | 9 | ||||
-rw-r--r-- | vars/mingw_w64.vars | 44 | ||||
-rw-r--r-- | vars/perl.vars | 12 | ||||
-rw-r--r-- | vars/pkgconf_host.vars | 12 | ||||
-rw-r--r-- | vars/psxstub.vars | 6 | ||||
-rw-r--r-- | vars/python3.vars | 8 |
14 files changed, 74 insertions, 115 deletions
diff --git a/subr/build.subr b/subr/build.subr index 698a71e8..35b8a22f 100644 --- a/subr/build.subr +++ b/subr/build.subr @@ -21,6 +21,9 @@ build_fileop() { elif [ "${_op}" = ln_symbolic ]; then log_msg varn "Linking \`${1}' to \`${2}' w/ -fs"; [ \( -n "${1}" \) -a \( -n "${2}" \) ] && ln -fs -- "${1}" "${2}"; + elif [ "${_op}" = mv ]; then + log_msg varn "Moving \`${1}' to \`${2}' w/ -fs"; + [ \( -n "${1}" \) -a \( -n "${2}" \) ] && mv -f -- "${1}" "${2}"; elif [ "${_op}" = mkdir ]\ || [ "${_op}" = rm ]; then while [ ${#} -gt 0 ]; do diff --git a/subr/post_strip.subr b/subr/post_strip.subr index 5225021b..fd045561 100644 --- a/subr/post_strip.subr +++ b/subr/post_strip.subr @@ -4,8 +4,7 @@ post_strip() { local __; - if [ ${BUILD_SCRIPT_RC:-0} -eq 0 ]\ - && [ "${BUILD}" = release ]; then + if [ "${BUILD}" = release ]; then for __ in $(find ${PREFIX_NATIVE}/bin -perm -0100 \( -type f -or -type l \)); do if objdump -sj .debug_info >/dev/null 2>&1; then log_msg vnfo "${PKG_TARGET}-strip ${__}"; diff --git a/vars/apr.vars b/vars/apr.vars index 6342e358..a36daa44 100644 --- a/vars/apr.vars +++ b/vars/apr.vars @@ -6,8 +6,8 @@ pkg_apr_install_post() { sed -e 's,echo "\$APR_BUILD_DIR/libtool",echo '"${PREFIX}"'/bin/slibtool,' \ -e 's,echo "\${installbuilddir}/libtool",echo '"${PREFIX}"'/bin/slibtool,' \ -e 's,flags="\$flags -I\$includedir \$EXTRA_INCLUDES",flags="-I'"${PKG_PREFIX}"'/include/apr-1",' \ - ${PKG_PREFIX}/bin/apr-1-config > ${PREFIX}/bin/${PKG_TARGET}-apr-1-config; - chmod +x ${PREFIX}/bin/${PKG_TARGET}-apr-1-config; + "${PKG_PREFIX}/bin/apr-1-config" > "${PREFIX}/bin/${PKG_TARGET}-apr-1-config"; + chmod +x "${PREFIX}/bin/${PKG_TARGET}-apr-1-config"; }; # vim:filetype=sh diff --git a/vars/apr_util.vars b/vars/apr_util.vars index 83564489..d4014b99 100644 --- a/vars/apr_util.vars +++ b/vars/apr_util.vars @@ -4,8 +4,8 @@ pkg_apr_util_install_post() { build_fileop cp \ - ${PKG_PREFIX}/bin/apu-1-config \ - ${PREFIX}/bin/${PKG_TARGET}-apu-1-config; + "${PKG_PREFIX}/bin/apu-1-config" \ + "${PREFIX}/bin/${PKG_TARGET}-apu-1-config"; }; # vim:filetype=sh diff --git a/vars/clang_host.vars b/vars/clang_host.vars index 56793f99..03ded26f 100644 --- a/vars/clang_host.vars +++ b/vars/clang_host.vars @@ -3,15 +3,16 @@ # pkg_clang_host_configure_pre() { - build_fileop rm ${WORKDIR}/Makefile; + build_fileop rm "${WORKDIR}/Makefile"; }; pkg_clang_host_configure() { - build_fileop rm ../cfe-${PKG_VERSION}-host; - build_fileop mkdir ../cfe-${PKG_VERSION}-host; - build_fileop 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 \ + ("${PREFIX}/bin/cmake" \ + "../cfe-${PKG_VERSION}.src" \ -DCLANG_BUILD_EXAMPLES:BOOL=OFF \ -DCLANG_INCLUDE_DOCS:BOOL=OFF \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \ diff --git a/vars/cmake.vars b/vars/cmake.vars index bbcfacb6..ceee8157 100644 --- a/vars/cmake.vars +++ b/vars/cmake.vars @@ -3,36 +3,36 @@ # pkg_cmake_configure() { - build_fileop cp ../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake \ - ../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake; - build_fileop rm ../cmake-${PKG_VERSION}-host; - build_fileop mkdir ../cmake-${PKG_VERSION}-host; - build_fileop cd ../cmake-${PKG_VERSION}-host; + build_fileop cp "../cmake-${PKG_VERSION}/Modules/Platform/BSDOS.cmake" \ + "../cmake-${PKG_VERSION}/Modules/Platform/Midipix.cmake"; + 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}; - make ${DEFAULT_MAKEFLAGS_BUILD} DESTDIR=${PREFIX} install); + "../cmake-${PKG_VERSION}/configure" ${PKG_CONFIGURE_ARGS}; + make ${DEFAULT_MAKEFLAGS_BUILD} "DESTDIR=${PREFIX}" install); log_msg info "Finished bootstrapping cmake."; - stat ../cmake-${PKG_VERSION}; + stat "../cmake-${PKG_VERSION}"; }; pkg_cmake_build() { local _prefix; - 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}; + 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..."; - _prefix=${PREFIX}; + _prefix="${PREFIX}"; env CFLAGS="-L${PKG_PREFIX}/lib --sysroot=${PKG_PREFIX}" \ PREFIX="" cmake \ - -DBZIP2_INCLUDE_DIR=${PKG_PREFIX}/include \ - -DBZIP2_LIBRARIES=${PKG_PREFIX}/lib/libbz2.a \ - -DCMAKE_AR=${_prefix}/bin/${AR} \ - -DCMAKE_C_COMPILER=${_prefix}/bin/${CC} \ - -DCMAKE_CXX_COMPILER=${_prefix}/bin/${PKG_TARGET}-g++ \ + -DBZIP2_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DBZIP2_LIBRARIES="${PKG_PREFIX}/lib/libbz2.a" \ + -DCMAKE_AR="${_prefix}/bin/${AR}" \ + -DCMAKE_C_COMPILER="${_prefix}/bin/${CC}" \ + -DCMAKE_CXX_COMPILER="${_prefix}/bin/${PKG_TARGET}-g++" \ -DCMAKE_INSTALL_PREFIX= \ - -DCMAKE_RANLIB=${_prefix}/bin/${RANLIB} \ + -DCMAKE_RANLIB="${_prefix}/bin/${RANLIB}" \ -DCMAKE_SYSTEM_NAME=Midipix \ -DCMAKE_USE_SYSTEM_BZIP2=ON \ -DCMAKE_USE_SYSTEM_CURL=ON \ @@ -40,20 +40,20 @@ pkg_cmake_build() { -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON \ -DCMAKE_USE_SYSTEM_ZLIB=ON \ -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCURL_INCLUDE_DIR=${PKG_PREFIX}/include/curl \ - -DCURL_LIBRARY=${PKG_PREFIX}/lib/libcurl.lib.a \ - -DCURSES_NCURSES_LIBRARY=${PKG_PREFIX}/lib/libncurses.so \ + -DCURL_INCLUDE_DIR="${PKG_PREFIX}/include/curl" \ + -DCURL_LIBRARY="${PKG_PREFIX}/lib/libcurl.lib.a" \ + -DCURSES_NCURSES_LIBRARY="${PKG_PREFIX}/lib/libncurses.so" \ -DKWSYS_LFS_WORKS=YES \ - -DLibArchive_INCLUDE_DIR=${PKG_PREFIX}/include \ - -DLibArchive_LIBRARY=${PKG_PREFIX}/lib/libarchive.lib.a \ + -DLibArchive_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLibArchive_LIBRARY="${PKG_PREFIX}/lib/libarchive.lib.a" \ -DLIBLZMA_HAS_AUTO_DECODER=YES \ -DLIBLZMA_HAS_EASY_ENCODER=YES \ -DLIBLZMA_HAS_LZMA_PRESET=YES \ - -DLIBLZMA_INCLUDE_DIR=${PKG_PREFIX}/include \ - -DLIBLZMA_LIBRARY=${PKG_PREFIX}/lib/liblzma.lib.a \ - -DZLIB_INCLUDE_DIR=${PKG_PREFIX}/include \ - -DZLIB_LIBRARY=${PKG_PREFIX}/lib/libz.a \ - ../cmake-${PKG_VERSION}; + -DLIBLZMA_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DLIBLZMA_LIBRARY="${PKG_PREFIX}/lib/liblzma.lib.a" \ + -DZLIB_INCLUDE_DIR="${PKG_PREFIX}/include" \ + -DZLIB_LIBRARY="${PKG_PREFIX}/lib/libz.a" \ + "../cmake-${PKG_VERSION}"; log_msg info "Calling make..."; make ${DEFAULT_MAKEFLAGS_BUILD}; }; diff --git a/vars/git.vars b/vars/git.vars index d9d9a4be..4e9b4195 100644 --- a/vars/git.vars +++ b/vars/git.vars @@ -4,10 +4,9 @@ pkg_git_install_post() { local __ _new; - for __ in $(find ${PKG_PREFIX}/share/man -name Git*::* -type f); do + for __ in $(find "${PKG_PREFIX}/share/man" -name "Git*::*" -type f); do _new="$(echo ${__} | sed "s/::/./g")"; - echo mv -f ${__} ${_new}; - mv -f ${__} ${_new}; + build_fileop mv "${__}" "${_new}"; done; }; diff --git a/vars/libxml2.vars b/vars/libxml2.vars index 4d4f2696..f0bd0f02 100644 --- a/vars/libxml2.vars +++ b/vars/libxml2.vars @@ -3,17 +3,17 @@ # pkg_libxml2_install_post() { - if [ -e ${PREFIX}/bin/${TARGET}-xml2-config ]; then - build_fileop rm ${PREFIX}/bin/${TARGET}-xml2-config; + if [ -e "${PREFIX}/bin/${TARGET}-xml2-config" ]; then + build_fileop rm "${PREFIX}/bin/${TARGET}-xml2-config"; fi; - cat > ${PREFIX}/bin/${TARGET}-xml2-config <<EOF + cat > "${PREFIX}/bin/${TARGET}-xml2-config" <<EOF #!/bin/sh case "\${1}" in ---cflags) echo -I${PREFIX_NATIVE}/include/libxml2; ;; ---libs) echo -L${PREFIX_NATIVE}/lib -lxml2 -lz -llzma -lpthread -lm; ;; +--cflags) echo "-I${PREFIX_NATIVE}/include/libxml2"; ;; +--libs) echo "-L${PREFIX_NATIVE}/lib" -lxml2 -lz -llzma -lpthread -lm; ;; esac; EOF - chmod +x ${PREFIX}/bin/${TARGET}-xml2-config; + chmod +x "${PREFIX}/bin/${TARGET}-xml2-config"; }; diff --git a/vars/llvm_host.vars b/vars/llvm_host.vars index c13d31d3..88fa55ec 100644 --- a/vars/llvm_host.vars +++ b/vars/llvm_host.vars @@ -3,11 +3,12 @@ # pkg_llvm_host_configure() { - build_fileop rm ../llvm-${PKG_VERSION}-host; - build_fileop mkdir ../llvm-${PKG_VERSION}-host; - build_fileop 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 \ + ("${PREFIX}/bin/cmake" \ + "../llvm-${PKG_VERSION}.src" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="" \ -DCMAKE_VERBOSE_MAKEFILE=NO \ diff --git a/vars/mingw_w64.vars b/vars/mingw_w64.vars deleted file mode 100644 index 0fd445c6..00000000 --- a/vars/mingw_w64.vars +++ /dev/null @@ -1,44 +0,0 @@ -# -# set -o errexit -o noglob are assumed. -# - -pkg_mingw_w64_configure() { - local _configure_args; - if [ "${ARCH}" = nt32 ]; then - _configure_args="--host=i686-nt32-midipix"; - else - _configure_args="--host=x86_64-nt64-midipix"; - fi; - ../${PKG_SUBDIR}/configure \ - --disable-bootstrap \ - --disable-libmudflap \ - --disable-multilib \ - --disable-nls \ - --disable-obsolete \ - --disable-sjlj-exceptions \ - --disable-symvers \ - --enable-canonical-system-headers \ - --enable-__cxa_atexit \ - --enable-debug \ - --enable-gnu-indirect-function \ - --enable-gnu-unique-object \ - --enable-initfini-array \ - --enable-languages=c,c++,objc,lto \ - --enable-libstdcxx-debug \ - --enable-lto \ - --enable-multiarch \ - --enable-secureplt \ - --enable-shared \ - --enable-threads=posix \ - --prefix=${PREFIX} \ - --target=${TARGET} \ - --with-elf=${PKG_PREFIX} \ - --with-fpmath=sse \ - --with-gmp=${PKG_PREFIX} \ - --with-mpc=${PKG_PREFIX} \ - --with-mpfr=${PKG_PREFIX} \ - --with-sysroot=${PKG_PREFIX} \ - ${_configure_args}; -}; - -# vim:filetype=sh diff --git a/vars/perl.vars b/vars/perl.vars index 486975b7..f7ce19e0 100644 --- a/vars/perl.vars +++ b/vars/perl.vars @@ -6,14 +6,14 @@ pkg_perl_extract_post() { local _fname_src _fname_dst _cflag; 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}; - if [ -f ${_fname_dst} ]; then - mv -- ${_fname_dst} ${_fname_dst}.orig; + _fname_dst="perl-${PKG_VERSION}${_fname_src#perl-cross}"; + if [ -f "${_fname_dst}" ]; then + build_fileop mv "${_fname_dst}" "${_fname_dst}.orig"; fi; - if [ ! -d "$(dirname ${_fname_dst})" ]; then - mkdir -p -- $(dirname ${_fname_dst}); + if [ ! -d "$(dirname "${_fname_dst}")" ]; then + mkdir -p -- "$(dirname "${_fname_dst}")"; fi; - build_fileop cp ${_fname_src} ${_fname_dst}; + build_fileop cp "${_fname_src}" "${_fname_dst}"; done; for _cflag in ${PKG_CFLAGS_CONFIGURE}; do PKG_CONFIGURE_ARGS="${PKG_CONFIGURE_ARGS:+${PKG_CONFIGURE_ARGS} }-A ccflags=${_cflag}"; diff --git a/vars/pkgconf_host.vars b/vars/pkgconf_host.vars index ee07fc70..7dc06309 100644 --- a/vars/pkgconf_host.vars +++ b/vars/pkgconf_host.vars @@ -3,17 +3,17 @@ # pkg_pkgconf_host_install_post() { - if [ -e ${PREFIX}/bin/${TARGET}-pkg-config ]; then - build_fileop rm ${PREFIX}/bin/${TARGET}-pkg-config; + if [ -e "${PREFIX}/bin/${TARGET}-pkg-config" ]; then + build_fileop rm "${PREFIX}/bin/${TARGET}-pkg-config"; fi; - cat > ${PREFIX}/bin/${TARGET}-pkg-config <<EOF + cat > "${PREFIX}/bin/${TARGET}-pkg-config" <<EOF #!/bin/sh if [ -z "\${PREFIX_NATIVE}" ]; then - PREFIX_NATIVE=${PREFIX_NATIVE}; + PREFIX_NATIVE="${PREFIX_NATIVE}"; fi; -"\$(dirname "\${0}")"/pkgconf --define-variable=prefix=\${PREFIX_NATIVE%/}/ "\$@"; +"\$(dirname "\${0}")"/pkgconf --define-variable=prefix="\${PREFIX_NATIVE%/}/" "\${@}"; EOF - chmod +x ${PREFIX}/bin/${TARGET}-pkg-config; + chmod +x "${PREFIX}/bin/${TARGET}-pkg-config"; }; # vim:filetype=sh diff --git a/vars/psxstub.vars b/vars/psxstub.vars index fcf018cd..e0ba9c5f 100644 --- a/vars/psxstub.vars +++ b/vars/psxstub.vars @@ -6,9 +6,9 @@ pkg_psxstub_install() { if [ "${TARGET}" = i686-nt32-midipix ] \ || [ "${TARGET}" = x86_64-nt64-midipix ]; then build_fileop cd 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; + make ${MAKEFLAGS} "DESTDIR=${PKG_PREFIX}" "TARGET=${TARGET}" install; + if [ -e "${PKG_PREFIX}/lib/libpsxscl.a" ]; then + build_fileop rm "${PKG_PREFIX}/lib/libpsxscl.a"; fi; fi; }; diff --git a/vars/python3.vars b/vars/python3.vars index 2077d53e..70e1fa9b 100644 --- a/vars/python3.vars +++ b/vars/python3.vars @@ -3,15 +3,15 @@ # pkg_python3_configure_pre() { - (cd ../${PKG_SUBDIR} && autoconf); + (build_fileop cd "../${PKG_SUBDIR}" && autoconf); (unset AR BLDSHARED CC CFLAGS CPPFLAGS CXX LDFLAGS RANLIB; - mv -- config.cache ../${PKG_SUBDIR}/config.cache; - ../${PKG_SUBDIR}/configure; + build_fileop mv config.cache "../${PKG_SUBDIR}/config.cache"; + "../${PKG_SUBDIR}/configure"; make _FIP=Programs/host_freeze_importlib Programs/host_freeze_importlib \ BUILDPYTHON=hostpython hostpython \ PGEN=Parser/hostpgen Parser/hostpgen; make distclean); - mv -- ../${PKG_SUBDIR}/config.cache .; + build_fileop mv "../${PKG_SUBDIR}/config.cache" .; }; # vim:filetype=sh |