Last active
January 2, 2016 02:09
-
-
Save ronakbanka/8235347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get install -y build-essential | |
apt-get install -y clang | |
apt-get install -y libblocksruntime-dev | |
apt-get install -y libkqueue-dev | |
apt-get install -y libpthread-workqueue-dev | |
apt-get install -y gobjc | |
apt-get install -y libxml2-dev | |
apt-get install -y libjpeg-dev | |
apt-get install -y libtiff-dev | |
apt-get install -y libpng12-dev | |
apt-get install -y libcups2-dev | |
apt-get install -y libfreetype6-dev | |
apt-get install -y libcairo2-dev | |
apt-get install -y libxt-dev | |
apt-get install -y libgl1-mesa-dev | |
apt-get remove -y libdispatch-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir ${INSTALL_DIR:=gnustep-dev} | |
GIST=${GIST:-ronakbanka/8235347} | |
GIST_ROOT=${GIST_ROOT:-https://gist.github.com/${GIST}} | |
APT=${APT:-${GIST_ROOT}/raw/apt.sh} | |
GNUSTEP_SOURCES=${GNUSTEP_SOURCES:-${GIST_ROOT}/raw/sources.txt} | |
LIBOBJC2=${LIBOBJC2:-http://download.gna.org/gnustep/libobjc2-1.6.tar.gz} | |
# | |
cd ${INSTALL_DIR} || exit $? | |
# apt-get install required packages | |
sudo apt-get update | |
date >> $(basename ${PWD}).log | |
echo 'Asking for sudo to run apt-get:' | |
{ | |
curl -ks ${APT} | sudo bash - | |
} 2>&1 | tee -a $(basename ${PWD}).log | |
# Use clang | |
export CC=clang | |
# Install libobjc2 | |
LIBOBJC2_DIR=$(basename ${LIBOBJC2##*/} .tar.gz) | |
[ -d ${LIBOBJC2_DIR} ] || curl -ks ${LIBOBJC2} | tar zx || exit $? | |
( | |
cd ${LIBOBJC2_DIR} || exit $? | |
date >../$(basename ${PWD}).log | |
echo 'Building '$(basename ${PWD}) | |
make 2>&1 | tee -a ../$(basename ${PWD}).log | |
echo 'Asking for sudo to install '$(basename ${PWD}) | |
sudo make install 2>&1 | tee -a ../$(basename ${PWD}).log | |
) || exit $? | |
# Install GNUStep from source | |
curl -ks ${GNUSTEP_SOURCES} | while read dl; do | |
pkg=$(basename ${dl##*/} .tar.gz) | |
echo 'Downloading '${pkg} | |
( | |
curl -ks ${dl} | tar vzx && cd ${pkg} || exit $? | |
{ | |
./configure | |
make | |
sudo make install | |
} 2>&1 | tee ../$(basename ${PWD}).log | |
) 2>&1 | tee -a $(basename ${PWD}).log || exit $? | |
done | |
# Reinstall libdispatch-dev | |
sudo apt-get install -y libdispatch-dev | |
# Test it! | |
curl -ksO https://gist.github.com/ronakbanka/8235347/raw/1bf0f0371248caaae218b7be4317d6aee1d56b24/test.m && { | |
clang -o test test.m -I `gnustep-config --variable=GNUSTEP_SYSTEM_HEADERS` \ | |
-L `gnustep-config --variable=GNUSTEP_SYSTEM_LIBRARIES` \ | |
-lgnustep-base -fconstant-string-class=NSConstantString \ | |
-D_NATIVE_OBJC_EXCEPTIONS \ | |
-lobjc | |
} && LD_LIBRARY_PATH=/usr/local/lib ./test | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.6.2.tar.gz | |
ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-base-1.24.0.tar.gz | |
ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-gui-0.22.0.tar.gz | |
ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-back-0.22.0.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main(int argc, char * argv[]){ | |
NSLog(@"Hello world!\n"); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install build-essential -y | |
sudo apt-get install clang -y | |
sudo apt-get install gnustep -y | |
sudo apt-get install gnustep-make -y | |
sudo apt-get install gnustep-devel -y | |
sudo ln -s /usr/lib/gcc/i686-linux-gnu/4.7/include/objc /usr/local/include/objc | |
curl -ksO https://gist.github.com/ronakbanka/8235347/raw/1bf0f0371248caaae218b7be4317d6aee1d56b24/test.m && { | |
clang -o test test.m -I `gnustep-config --variable=GNUSTEP_SYSTEM_HEADERS` \ | |
-L `gnustep-config --variable=GNUSTEP_SYSTEM_LIBRARIES` \ | |
-lgnustep-base -fconstant-string-class=NSConstantString \ | |
-D_NATIVE_OBJC_EXCEPTIONS \ | |
-lobjc | |
} && LD_LIBRARY_PATH=/usr/local/lib ./test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment