-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild-openbsd
executable file
·96 lines (83 loc) · 2.41 KB
/
build-openbsd
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/sh
if [ "X${WITH_ARC}" == "Xyes" ];then
echo "BUIDLING WITH CLANG and ARC"
GSMAKE_CC=clang
GSMAKE_CXX=clang++
GSMAKE_CPP="clang -E"
GSMAKE_LD=ld
GSMAKE_AS=llvm-as
EXTRA_GSMAKE_FLAGS="--with-objc-lib-flag=-lobjc2 --enable-strict-v2-mode --with-runtime-abi=gnustep-2.2 --with-library-combo=ng-gnu-gnu GS_WITH_ARC=1"
GSMAKE_CPPFLAGS="-I/usr/local/include -I/usr/local/include/gnustep"
GSMAKE_LDFLAGS="-L/usr/local/lib -lc++abi -lobjc2 -pthread"
else
echo "BUIDLING WITH GCC"
GSMAKE_CC=egcc
GSMAKE_CXX=eg++
GSMAKE_CPP="egcc -E"
GSMAKE_LD=ld.bfd
GSMAKE_AS=as
EXTRA_GSMAKE_FLAGS=""
GSMAKE_CPPFLAGS="-I/usr/local/include"
GSMAKE_LDFLAGS="-L/usr/local/lib"
fi
export MAKE=gmake
export SUDO=sudo
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
export prefix=${GNUSTEP_ROOT}
echo ""
echo "Installation directory is $GNUSTEP_ROOT"
echo "Building GNUstep for OpenBSD"
echo ""
CPUS=4
SUDO='sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH'
scriptsdir="`pwd`/tools-scripts"
# Build make
cd tools-make
${MAKE} clean
./configure --with-layout=gnustep --prefix="${prefix}" ${EXTRA_GSMAKE_FLAGS} CC="${GSMAKE_CC}" CXX="${GSMAKE_CXX}" CPP="${GSMAKE_CPP}" LD="${GSMAKE_LD}" AS="${GSMAKE_AS}" LDFLAGS="${GSMAKE_LDFLAGS}" CPPFLAGS="${GSMAKE_CPPFLAGS}"
echo "======== Build make"
${MAKE}
${SUDO} -u root ${MAKE} install
. ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh
# Build base
echo "======== Build base"
cd ../libs-base
${SUDO} ${MAKE} clean
./configure --with-installation-domain=SYSTEM
${MAKE} debug=yes messages=yes -j4
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
echo "==="
# Build gui
echo "======== Build gui"
cd ../libs-gui
${SUDO} ${MAKE} clean
./configure --with-x --enable-speech
${MAKE} debug=yes messages=yes -j4
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
echo "==="
# Build backend
echo "======== Build back"
cd ../libs-back
${SUDO} ${MAKE} clean
./configure --enable-graphics=cairo
${MAKE} debug=yes messages=yes -j4
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
echo "==="
# Set default backend
# defaults write NSGlobalDomain GSBackend libgnustep-cairo
echo "======== Build ProjectCenter"
cd ../apps-projectcenter
${SUDO} ${MAKE} clean
${MAKE} debug=yes messages=yes
${SUDO} ${MAKE} install
echo "======== Build Gorm"
cd ../apps-gorm
${SUDO} ${MAKE} clean
${MAKE} debug=yes messages=yes
${SUDO} ${MAKE} install
echo "Done."
exit 0