33set -ex
44
55DEP_SRC=$HOME /dependency_source/
6+ DEP_ROOT=$HOME /staging
67
78install_gnustep_make () {
89 cd $DEP_SRC
910 git clone https://github.com/gnustep/make.git
1011 cd make
11- if [ $LIBRARY_COMBO = ' ng-gnu-gnu' ]
12+ if [ " $LIBRARY_COMBO " = ' ng-gnu-gnu' ]
1213 then
1314 ADDITIONAL_FLAGS=" --enable-objc-nonfragile-abi"
1415 else
1516 ADDITIONAL_FLAGS=" "
1617 fi
17- ./configure --prefix=$HOME /staging --with-library-combo=$LIBRARY_COMBO $ADDITIONAL_FLAGS
18+ ./configure --prefix=$DEP_ROOT --with-library-combo=$LIBRARY_COMBO $ADDITIONAL_FLAGS
1819 make install
1920}
2021
@@ -31,26 +32,27 @@ install_ng_runtime() {
3132 export CC=" clang"
3233 export CXX=" clang++"
3334 export CXXFLAGS=" -std=c++11"
34- cmake -DTESTS=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGNUSTEP_INSTALL_TYPE=NONE -DCMAKE_INSTALL_PREFIX:PATH=$HOME /staging ../
35+ cmake -DTESTS=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DGNUSTEP_INSTALL_TYPE=NONE -DCMAKE_INSTALL_PREFIX:PATH=$DEP_ROOT ../
3536 make install
3637}
3738
3839install_libdispatch () {
3940 cd $DEP_SRC
40- git clone https://github.com/ngrewe/libdispatch.git
41- mkdir libdispatch/build
42- cd libdispatch/build
41+ # will reference upstream after https://github.com/apple/swift-corelibs-libdispatch/pull/534 is merged
42+ git clone -b system-blocksruntime https://github.com/ngrewe/swift-corelibs-libdispatch.git
43+ mkdir swift-corelibs-libdispatch/build
44+ cd swift-corelibs-libdispatch/build
4345 export CC=" clang"
4446 export CXX=" clang++"
45- export LIBRARY_PATH=$HOME /staging /lib;
46- export LD_LIBRARY_PATH=$HOME /staging /lib:$LD_LIBRARY_PATH ;
47- export CPATH=$HOME /staging /include;
48- cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=$HOME /staging ../
47+ export LIBRARY_PATH=$DEP_ROOT /lib;
48+ export LD_LIBRARY_PATH=$DEP_ROOT /lib:$LD_LIBRARY_PATH ;
49+ export CPATH=$DEP_ROOT /include;
50+ cmake -DBUILD_TESTING=off - DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:PATH=$HOME /staging -DINSTALL_PRIVATE_HEADERS=1 -DBlocksRuntime_INCLUDE_DIR= $DEP_ROOT /include -DBlocksRuntime_LIBRARIES= $DEP_ROOT /lib/libobjc.so ../
4951 make install
5052}
5153
5254mkdir -p $DEP_SRC
53- if [ $LIBRARY_COMBO = ' ng-gnu-gnu' ]
55+ if [ " $LIBRARY_COMBO " = ' ng-gnu-gnu' ]
5456then
5557 install_ng_runtime
5658 install_libdispatch
0 commit comments