diff --git a/Makefile b/Makefile index 4616da4..b72c0df 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -deps: +deps: install_gnutls emacs \ -batch \ -l tests/setup/init.el \ @@ -24,4 +24,22 @@ test: build: @: -.PHONY: deps test build +install_gnutls: +ifeq ($(TRAVIS_OS_NAME),osx) +# GnuTLS can be upgraded with Homebrew instead of apt-get (which obviously does not exist on macOS) + @echo "Upgrade GnuTLS 3" + @if brew outdated --quiet | grep --quiet "gnutls"; then brew upgrade gnutls; fi +else + @echo "Install GnuTLS 3" + @sudo apt-get -qq update + @sudo apt-get install -y build-essential nettle-dev libgmp-dev + @wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz + @tar -xf gnutls-3.1.23.tar.xz + @cd gnutls-3.1.23 \ + && ./configure $(SILENT) \ + && make -j$(MAKE_JOBS) $(SILENT) \ + && sudo make install $(SILENT) \ + && sudo ln -s /usr/local/lib/libgnutls.so.28 /usr/lib/libgnutls.so.28 +endif + +.PHONY: deps test build install_gnutls diff --git a/tests/setup/install-deps.el b/tests/setup/install-deps.el index 8ede501..b2d2638 100644 --- a/tests/setup/install-deps.el +++ b/tests/setup/install-deps.el @@ -11,9 +11,9 @@ (defun xenops-dependencies-setup-package-repositories () (setq package-archives (list (if melpa-stable - '("melpa-stable" . "http://stable.melpa.org/packages/") - '("melpa" . "http://melpa.org/packages/")) - '("gnu" . "http://elpa.gnu.org/packages/"))) + '("melpa-stable" . "https://stable.melpa.org/packages/") + '("melpa" . "https://melpa.org/packages/")) + '("gnu" . "https://elpa.gnu.org/packages/"))) (package-refresh-contents) t)