-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild-freebsd
executable file
·68 lines (57 loc) · 1.69 KB
/
build-freebsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
export CC=clang
export CXX=clang++
export MAKE=gmake
export SUDO=sudo
# export LDFLAGS=-fuse-ld=gold
ROOT=/
USR_ROOT=${ROOT}usr
GNUSTEP_ROOT=${USR_ROOT}/GNUstep
export GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
export GNUSTEP_INSTALL_LD_SO_CONF=no
echo ""
echo "Installation directory is $GNUSTEP_ROOT"
echo "Building GNUstep for FreeBSD"
echo ""
# Build make
echo "======== Build make"
cd tools-make
./configure --with-library-combo=ng-gnu-gnu --with-layout=gnustep --prefix=${GNUSTEP_ROOT}
${MAKE}
${SUDO} -u root ${MAKE} install
. ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh
echo "==="
# Build libjobc2
echo "======== Build libobjc2"
cd ../libobjc2 && [ -d Build ] && rm -rf Build && mkdir Build && cd Build && cmake .. \
-DGNUSTEP_INSTALL_TYPE=SYSTEM \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++; \
${SUDO} -u root ${MAKE} install
echo "==="
# Build base
echo "======== Build base"
cd ../../libs-base
./configure --with-installation-domain=SYSTEM --disable-icu --disable-invocations
LDFLAGS=${LDFLAGS} CC=${CC} CXX=${CXX} ${MAKE} debug=yes messages=no -j4
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
echo "==="
# Build gui
echo "======== Build gui"
cd ../libs-gui
./configure
LDFLAGS=${LDFLAGS} CC=${CC} CXX=${CXX} ${MAKE} debug=yes messages=no -j4
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
echo "==="
# Build backend
echo "======== Build back"
cd ../libs-back
./configure --enable-graphics=cairo
LDFLAGS=${LDFLAGS} CC=${CC} CXX=${CXX} ${MAKE} debug=yes messages=no -j4
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
echo "==="
# Set default backend
# defaults write NSGlobalDomain GSBackend libgnustep-cairo
echo "Done."
exit 0