|
| 1 | +#!/bin/bash |
| 2 | +# |
| 3 | +# Use this script in a bare Ubuntu distribution to install |
| 4 | +# clang, libobjc2, GNUstep, and other dependencies that |
| 5 | +# will allow you to build and run Nu. |
| 6 | +# |
| 7 | +# libobjc2 is an updated runtime that seeks compatibility |
| 8 | +# with Apple's modern Objective-C runtime. This new runtime |
| 9 | +# allows Nu to be ported to Linux+GNUstep without difficulty. |
| 10 | +# |
| 11 | +# Tested with ubuntu-14.04 |
| 12 | +# Other Ubuntu and Debian installations may also work well. |
| 13 | +# |
| 14 | +# Thanks to Tobias Lensing for pointing the way. |
| 15 | +# 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/ |
| 16 | +# |
| 17 | + |
| 18 | +sudo apt-get update |
| 19 | +sudo apt-get install curl -y |
| 20 | +sudo apt-get install ssh -y |
| 21 | +sudo apt-get install git -y |
| 22 | +sudo apt-get install libreadline-dev -y |
| 23 | +sudo apt-get install libicu-dev -y |
| 24 | +sudo apt-get install openssl -y |
| 25 | +sudo apt-get install build-essential -y |
| 26 | +sudo apt-get install clang -y |
| 27 | +sudo apt-get install libblocksruntime-dev -y |
| 28 | +sudo apt-get install libkqueue-dev -y |
| 29 | +sudo apt-get install libpthread-workqueue-dev -y |
| 30 | +sudo apt-get install gobjc -y |
| 31 | +sudo apt-get install libxml2-dev -y |
| 32 | +sudo apt-get install libjpeg-dev -y |
| 33 | +sudo apt-get install libtiff-dev -y |
| 34 | +sudo apt-get install libpng12-dev -y |
| 35 | +sudo apt-get install libcups2-dev -y |
| 36 | +sudo apt-get install libfreetype6-dev -y |
| 37 | +sudo apt-get install libcairo2-dev -y |
| 38 | +sudo apt-get install libxt-dev -y |
| 39 | +sudo apt-get install libgl1-mesa-dev -y |
| 40 | +sudo apt-get remove libdispatch-dev -y |
| 41 | +sudo apt-get install gdb -y |
| 42 | + |
| 43 | +mkdir -p /tmp/SETUP |
| 44 | +cd /tmp/SETUP |
| 45 | + |
| 46 | +# |
| 47 | +# A few modifications were needed to fix problems with |
| 48 | +# libobjc2 and gnustep-base. To maintain stability, we |
| 49 | +# work with a fork on github. |
| 50 | +# |
| 51 | +git clone https://github.com/nulang/gnustep-libobjc2.git |
| 52 | +git clone https://github.com/nulang/gnustep-make.git |
| 53 | +git clone https://github.com/nulang/gnustep-base.git |
| 54 | + |
| 55 | +echo Installing libobjc2 |
| 56 | +export CC=clang |
| 57 | +cd gnustep-libobjc2 |
| 58 | +make clean |
| 59 | +make |
| 60 | +sudo make install |
| 61 | +cd /tmp/SETUP |
| 62 | + |
| 63 | +echo Installing gnustep-make |
| 64 | +cd gnustep-make |
| 65 | +./configure |
| 66 | +make clean |
| 67 | +make |
| 68 | +sudo make install |
| 69 | +cd /tmp/SETUP |
| 70 | + |
| 71 | +echo Installing gnustep-base |
| 72 | +cd gnustep-base |
| 73 | +./configure |
| 74 | +make clean |
| 75 | +make |
| 76 | +sudo make install |
| 77 | +cd /tmp/SETUP |
| 78 | + |
| 79 | +sudo apt-get install libdispatch-dev -y |
| 80 | + |
| 81 | +echo Pre-install script finished successfully. You may now build Nu. |
0 commit comments