Debian Codegraph @

.github/scripts/dependencies.sh

raw symbols SCIP
1 #! /usr/bin/env sh
2
3 set -ex
4
5 install_gnustep_make() {
6 echo "::group::GNUstep Make"
7 cd $DEPS_PATH
8 git clone -q -b ${TOOLS_MAKE_BRANCH:-master} https://github.com/gnustep/tools-make.git
9 cd tools-make
10 MAKE_OPTS=
11 if [ -n "$HOST" ]; then
12 MAKE_OPTS="$MAKE_OPTS --host=$HOST"
13 fi
14 if [ -n "$RUNTIME_VERSION" ]; then
15 MAKE_OPTS="$MAKE_OPTS --with-runtime-abi=$RUNTIME_VERSION"
16 fi
17 ./configure --prefix=$INSTALL_PATH --with-library-combo=$LIBRARY_COMBO $MAKE_OPTS || cat config.log
18 make install
19
20 echo Objective-C build flags:
21 $INSTALL_PATH/bin/gnustep-config --objc-flags
22 echo "::endgroup::"
23 }
24
25 install_libobjc2() {
26 echo "::group::libobjc2"
27 cd $DEPS_PATH
28 git clone -q https://github.com/gnustep/libobjc2.git
29 cd libobjc2
30 git submodule sync
31 git submodule update --init
32 mkdir build
33 cd build
34 cmake \
35 -DTESTS=off \
36 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
37 -DGNUSTEP_INSTALL_TYPE=NONE \
38 -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH \
39 ../
40 make install
41 echo "::endgroup::"
42 }
43
44 install_libdispatch() {
45 echo "::group::libdispatch"
46 cd $DEPS_PATH
47 # will reference upstream after https://github.com/apple/swift-corelibs-libdispatch/pull/534 is merged
48 git clone -q -b system-blocksruntime https://github.com/ngrewe/swift-corelibs-libdispatch.git libdispatch
49 mkdir libdispatch/build
50 cd libdispatch/build
51 # -Wno-error=void-pointer-to-int-cast to work around build error in queue.c due to -Werror
52 cmake \
53 -DBUILD_TESTING=off \
54 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
55 -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH \
56 -DCMAKE_C_FLAGS="-Wno-error=void-pointer-to-int-cast" \
57 -DINSTALL_PRIVATE_HEADERS=1 \
58 -DBlocksRuntime_INCLUDE_DIR=$INSTALL_PATH/include \
59 -DBlocksRuntime_LIBRARIES=$INSTALL_PATH/lib/libobjc.so \
60 ../
61 make install
62 echo "::endgroup::"
63 }
64
65 install_gnustep_gui() {
66 echo "::group::GNUstep GUI"
67 cd $DEPS_PATH
68 . $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh
69 git clone -q -b ${LIBS_GUI_BRANCH:-master} https://github.com/gnustep/libs-gui.git
70 cd libs-gui
71 ./configure
72 make
73 make install
74 echo "::endgroup::"
75 }
76
77 install_gnustep_base() {
78 echo "::group::GNUstep Base"
79 cd $DEPS_PATH
80 . $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh
81 git clone -q -b ${LIBS_BASE_BRANCH:-master} https://github.com/gnustep/libs-base.git
82 cd libs-base
83 ./configure
84 make
85 make install
86 echo "::endgroup::"
87 }
88
89 mkdir -p $DEPS_PATH
90
91 # Windows MSVC toolchain uses tools-windows-msvc scripts to install non-GNUstep dependencies
92 if [ "$LIBRARY_COMBO" = "ng-gnu-gnu" -a "$IS_WINDOWS_MSVC" != "true" ]; then
93 install_libobjc2
94 install_libdispatch
95 fi
96
97 install_gnustep_make
98 install_gnustep_base
99 install_gnustep_gui