From 0b14e7f8f264fb9adaf1b2ecbf7c54223a9d4cad Mon Sep 17 00:00:00 2001 From: Tim Burks Date: Sun, 16 Apr 2017 20:21:03 -0700 Subject: [PATCH] Add ubuntu.sh setup script and configure travis to test both osx and linux. --- .travis.yml | 12 +++++++- ubuntu.sh | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100755 ubuntu.sh diff --git a/.travis.yml b/.travis.yml index 398c70a..ac66d6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,14 @@ -language: objective-c +matrix: + include: + - os: linux + language: c + dist: trusty + sudo: required + - os: osx + language: objective-c + osx_image: xcode8.3 +before_install: + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./ubuntu.sh; fi before_script: - make - ./mininush tools/nuke install diff --git a/ubuntu.sh b/ubuntu.sh new file mode 100755 index 0000000..e642fbd --- /dev/null +++ b/ubuntu.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# +# Use this script in a bare Ubuntu distribution to install +# clang, libobjc2, GNUstep, and other dependencies that +# will allow you to build and run Nu. +# +# libobjc2 is an updated runtime that seeks compatibility +# with Apple's modern Objective-C runtime. This new runtime +# allows Nu to be ported to Linux+GNUstep without difficulty. +# +# Tested with ubuntu-14.04 +# Other Ubuntu and Debian installations may also work well. +# +# Thanks to Tobias Lensing for pointing the way. +# http://blog.tlensing.org/2013/02/24/objective-c-on-linux-setting-up-gnustep-clang-llvm-objective-c-2-0-blocks-runtime-gcd-on-ubuntu-12-04/ +# + +sudo apt-get update +sudo apt-get install curl -y +sudo apt-get install ssh -y +sudo apt-get install git -y +sudo apt-get install libreadline-dev -y +sudo apt-get install libicu-dev -y +sudo apt-get install openssl -y +sudo apt-get install build-essential -y +sudo apt-get install clang -y +sudo apt-get install libblocksruntime-dev -y +sudo apt-get install libkqueue-dev -y +sudo apt-get install libpthread-workqueue-dev -y +sudo apt-get install gobjc -y +sudo apt-get install libxml2-dev -y +sudo apt-get install libjpeg-dev -y +sudo apt-get install libtiff-dev -y +sudo apt-get install libpng12-dev -y +sudo apt-get install libcups2-dev -y +sudo apt-get install libfreetype6-dev -y +sudo apt-get install libcairo2-dev -y +sudo apt-get install libxt-dev -y +sudo apt-get install libgl1-mesa-dev -y +sudo apt-get remove libdispatch-dev -y +sudo apt-get install gdb -y + +mkdir -p /tmp/SETUP +cd /tmp/SETUP + +# +# A few modifications were needed to fix problems with +# libobjc2 and gnustep-base. To maintain stability, we +# work with a fork on github. +# +git clone https://github.com/nulang/gnustep-libobjc2.git +git clone https://github.com/nulang/gnustep-make.git +git clone https://github.com/nulang/gnustep-base.git + +echo Installing libobjc2 +export CC=clang +cd gnustep-libobjc2 +make clean +make +sudo make install +cd /tmp/SETUP + +echo Installing gnustep-make +cd gnustep-make +./configure +make clean +make +sudo make install +cd /tmp/SETUP + +echo Installing gnustep-base +cd gnustep-base +./configure +make clean +make +sudo make install +cd /tmp/SETUP + +sudo apt-get install libdispatch-dev -y + +echo Pre-install script finished successfully. You may now build Nu.