2016-07-13 08:43:56 +00:00
|
|
|
#! /usr/bin/env sh
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
DEP_SRC=$HOME/dependency_source/
|
|
|
|
|
|
|
|
install_gnustep_make() {
|
|
|
|
cd $DEP_SRC
|
2019-11-28 13:16:14 +00:00
|
|
|
git clone https://github.com/gnustep/tools-make.git
|
|
|
|
cd tools-make
|
2019-11-28 13:16:37 +00:00
|
|
|
if [ -n "$RUNTIME_VERSION" ]
|
|
|
|
then
|
|
|
|
echo "RUNTIME_VERSION=$RUNTIME_VERSION" > GNUstep.conf
|
|
|
|
fi
|
|
|
|
./configure --prefix=$HOME/staging --with-library-combo=$LIBRARY_COMBO --with-user-config-file=$PWD/GNUstep.conf
|
2016-07-13 08:43:56 +00:00
|
|
|
make install
|
|
|
|
}
|
|
|
|
|
|
|
|
install_ng_runtime() {
|
|
|
|
cd $DEP_SRC
|
|
|
|
git clone https://github.com/gnustep/libobjc2.git
|
2019-11-24 15:39:06 +00:00
|
|
|
cd libobjc2
|
2019-11-24 18:52:48 +00:00
|
|
|
git submodule init
|
2019-11-24 15:39:06 +00:00
|
|
|
git submodule sync
|
|
|
|
git submodule update
|
|
|
|
cd ..
|
2016-07-13 08:43:56 +00:00
|
|
|
mkdir libobjc2/build
|
|
|
|
cd libobjc2/build
|
|
|
|
export CC="clang"
|
|
|
|
export CXX="clang++"
|
2019-11-24 19:11:15 +00:00
|
|
|
export CXXFLAGS="-std=c++11"
|
2018-07-20 18:07:23 +00:00
|
|
|
cmake -DTESTS=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGNUSTEP_INSTALL_TYPE=NONE -DCMAKE_INSTALL_PREFIX:PATH=$HOME/staging ../
|
2016-07-13 08:43:56 +00:00
|
|
|
make install
|
|
|
|
}
|
|
|
|
|
|
|
|
install_libdispatch() {
|
|
|
|
cd $DEP_SRC
|
|
|
|
git clone https://github.com/ngrewe/libdispatch.git
|
|
|
|
mkdir libdispatch/build
|
|
|
|
cd libdispatch/build
|
|
|
|
export CC="clang"
|
|
|
|
export CXX="clang++"
|
|
|
|
export LIBRARY_PATH=$HOME/staging/lib;
|
|
|
|
export LD_LIBRARY_PATH=$HOME/staging/lib:$LD_LIBRARY_PATH;
|
|
|
|
export CPATH=$HOME/staging/include;
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=$HOME/staging ../
|
|
|
|
make install
|
|
|
|
}
|
|
|
|
|
|
|
|
mkdir -p $DEP_SRC
|
|
|
|
if [ $LIBRARY_COMBO = 'ng-gnu-gnu' ]
|
|
|
|
then
|
|
|
|
install_ng_runtime
|
|
|
|
install_libdispatch
|
|
|
|
fi
|
|
|
|
|
|
|
|
install_gnustep_make
|