From 26d9a81c9c85c24ee2be2dd27b9cdf3a37b68332 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Mon, 5 Jun 2017 07:26:00 -0700 Subject: [PATCH] install_deps.sh: first cut at cygwin support --- scripts/install_deps.sh | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 6cf6723..1461838 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -51,20 +51,42 @@ install_from_github() { CPPFLAGS="-I/usr/local/include" \ LDFLAGS="-L/usr/local/lib -Wl,-R/usr/local/lib" \ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" - make - sudo make install + make -j2 + $SUDO make install cd - rm -rf "${distname}" "${distname}.tar.gz" } -if [ $(uname -s) = "Darwin" ]; then +SUDO=sudo +CFLAGS="-g -O2" +case $(uname -s) in +Darwin) brew update brew install libarchive --with-xz brew install openssl brew install kyua -elif [ $(uname -s) = "Linux" ]; then + ;; +Linux) install_from_github atf 0.21 install_from_github lutok 0.4 install_from_github kyua 0.12 -fi + ;; +CYGWIN*) + SUDO="" + apt-cyg update + apt-cyg install lua-devel libsqlite3-devel + install_from_github lutok 0.4 + + # Work around + # utils/process/system.cpp:59:68: error: invalid conversion from ‘pid_t (*)(pid_t, __wait_status_ptr_t, int) {aka int (*)(int, void*, int)}’ to ‘pid_t (*)(pid_t, int*, int) {aka int (*)(int, int*, int)}’ [-fpermissive] + # pid_t (*detail::syscall_waitpid)(const pid_t, int*, const int) = ::waitpid; + # ^ + # make[1]: *** [Makefile:7014: utils/process/libutils_a-system.o] Error 1 + export CXXFLAGS="-g -O2 -fpermissive" + install_from_github kyua 0.12 + unset CXXFLAGS + + install_from_github atf 0.21 + ;; +esac