install_deps.sh: first cut at cygwin support

feature/tap-sh
Dan Kegel 2017-06-05 07:26:00 -07:00
parent 8b4a4b831b
commit 26d9a81c9c
1 changed files with 27 additions and 5 deletions

View File

@ -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