Skip to content

Commit

Permalink
Merge pull request #86 from timburks/travis-linux
Browse files Browse the repository at this point in the history
Add ubuntu.sh setup script and configure travis to test both osx and linux.
  • Loading branch information
timburks authored Apr 17, 2017
2 parents a6edfde + 0b14e7f commit d448bac
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
81 changes: 81 additions & 0 deletions ubuntu.sh
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit d448bac

Please sign in to comment.