Skip to content

Commit

Permalink
Install GnuTLS in Travis builds
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 9, 2019
1 parent 18a7f92 commit 6000301
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deps:
deps: install_gnutls
emacs \
-batch \
-l tests/setup/init.el \
Expand All @@ -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
6 changes: 3 additions & 3 deletions tests/setup/install-deps.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 6000301

Please sign in to comment.