Sign inSign up

hzitoun/gnustep

By hzitoun

•Updated almost 8 years ago

Ubuntu 16.04 LLVM 4 and dev tools GNUStep, allow to compile and execute Objective-C on ubuntu

Image
0

10K+

hzitoun/gnustep repository overview

⁠Login

username : appdev password : appsec

⁠Description

This container allows to compile and execute Objective-c code on ubuntu. GnuStep and dependency are installed with libobjc2. Note that this container is only meant to be extended. No command is called at the end of the dockerfile.

⁠Dockerfile

FROM williamyeh/ansible:ubuntu16.04
RUN apt-get update && apt-get install -y --force-yes \
supervisor \
sudo unzip cmake libxml2-dev libgnutls-dev

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
echo keyboard-configuration keyboard-configuration/layout select 'English (US)' | debconf-set-selections && \
echo keyboard-configuration keyboard-configuration/layoutcode select 'fr' | debconf-set-selections && \
apt-get update && apt-get install -y --force-yes xorg

RUN apt-get update && apt-get install -y --force-yes \
libfreetype6-dev libcairo2-dev libxt-dev libjpeg-dev libtiff5-dev \
openssh-server

RUN apt-get install -y --force-yes \
emacs24-nox \
clang-4.0 git \
autoconf automake \
libdispatch-dev    

RUN useradd -m -u 1000 -p `openssl passwd -crypt appsec` appdev && \
chsh -s /bin/bash appdev && \
addgroup appdev sudo

USER root
Add install-gnustep.sh ./install-gnustep.sh
RUN chmod +x install-gnustep.sh
RUN ./install-gnustep.sh

install-gnustep.sh is script found online and tweaked:

#!/bin/bash

GNUSTEP_MAKE_VERSION=2.7.0
GNUSTEP_BASE_VERSION=1.25.0
GNUSTEP_GUI_VERSION=0.25.1
GNUSTEP_BACK_VERSION=0.25.1

# Set clang as compiler
export CC=/usr/bin/clang-4.0
export CXX=/usr/bin/clang++-4.0

# Install Requirements
sudo apt update

echo -e "\n\n${GREEN}Installing dependencies...${NC}"

#sudo dpkg --add-architecture i386  # Enable 32-bit repos for libx11-dev:i386
sudo apt-get update
sudo apt -y install cmake libffi-dev libxml2-dev \
libgnutls28-dev libicu-dev libblocksruntime-dev libkqueue-dev libpthread-workqueue-dev autoconf libtool \
libjpeg-dev libtiff-dev libffi-dev libcairo-dev libxt-dev libxft-dev 

# sudo apt-get purge gcc clang-3.8 clang++-3.8 gcc-5 -y 
# sudo apt-get autoremove -y
 
# Create build directory
mkdir GNUstep-build

#fetch gnustep
wget ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-$GNUSTEP_MAKE_VERSION.tar.gz
wget ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-base-$GNUSTEP_BASE_VERSION.tar.gz
wget ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-gui-$GNUSTEP_GUI_VERSION.tar.gz
wget ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-back-$GNUSTEP_BACK_VERSION.tar.gz
#untar sources
tar xf gnustep-make-$GNUSTEP_MAKE_VERSION.tar.gz -C GNUstep-build 
tar xf gnustep-base-$GNUSTEP_BASE_VERSION.tar.gz -C GNUstep-build
tar xf gnustep-gui-$GNUSTEP_GUI_VERSION.tar.gz -C GNUstep-build
tar xf gnustep-back-$GNUSTEP_BACK_VERSION.tar.gz -C GNUstep-build

#change directory
cd GNUstep-build

# Checkout sources
echo -e "\n\n${GREEN}Checking out sources...${NC}"
git clone -b 1.8.1 https://github.com/gnustep/libobjc2.git

# Build libobjc2
echo -e "\n\n"
echo -e "${GREEN}Building libobjc2...${NC}"
cd libobjc2
rm -Rf build
mkdir build && cd build
export CC=clang-4.0;export CXX=clang++-4.0;cmake .. -DLLVM_OPTS=off  -DBUILD_STATIC_LIBOBJC=ON
make
sudo -E make install
rc=$?
if [[ rc == 0 ]]; then echo -e "Exit error when building libobjc2"; exit; fi
sudo ldconfig


# Build GNUstep make 
echo -e "\n\n"
echo -e "${GREEN}Building GNUstep-make for the second time...${NC}"
cd ../../gnustep-make-$GNUSTEP_MAKE_VERSION
export CC=clang-4.0;export CXX=clang++-4.0;./configure;make;sudo make install
if [[ rc == 0 ]]; then echo -e "Exit error when building gnustep-make"; exit; fi
sudo ldconfig

# Build GNUstep base
echo -e "\n\n"
echo -e "${GREEN}Building GNUstep-base...${NC}"
cd ../gnustep-base-$GNUSTEP_BASE_VERSION
export CC=clang-4.0;export CXX=clang++-4.0;./configure;make;sudo make install
if [[ rc == 0 ]]; then echo -e "Exit error when building gnustep-base"; exit; fi
sudo ldconfig

# Build GNUstep GUI
echo -e "\n\n"
echo -e "${GREEN} Building GNUstep-gui...${NC}"
cd ../gnustep-gui-$GNUSTEP_GUI_VERSION
export CC=clang-4.0;export CXX=clang++-4.0;./configure;make;sudo make install
if [[ rc == 0 ]]; then echo -e "Exit error when building gnustep-gui"; exit; fi

sudo ldconfig

# Build GNUstep back
echo -e "\n\n"
echo -e "${GREEN}Building GNUstep-back...${NC}"
cd ../gnustep-back-$GNUSTEP_BACK_VERSION
export CC=clang-4.0;export CXX=clang++-4.0;./configure;make;sudo make install
if [[ rc == 0 ]]; then echo -e "Exit error when building gnustep-back"; exit; fi
sudo ldconfig

echo -e "${GREEN}Exiting `pwd` and Cleaning...${NC}"
cd ../..
rm gnustep-make-$GNUSTEP_MAKE_VERSION.tar.gz
rm gnustep-base-$GNUSTEP_BASE_VERSION.tar.gz 
rm gnustep-gui-$GNUSTEP_GUI_VERSION.tar.gz 
rm gnustep-back-$GNUSTEP_BACK_VERSION.tar.gz

echo -e "\n\n"
echo -e "${GREEN}Install is done. Open a new terminal to start using.${NC}"

Tag summary

Content type

Image

Digest

Size

703.6 MB

Last updated

almost 8 years ago

docker pull hzitoun/gnustep