-
Notifications
You must be signed in to change notification settings - Fork 12
/
build-openbsd
executable file
·66 lines (55 loc) · 1.54 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
#!/bin/sh
export CC=egcc
export CXX=eg++
export LD=ld.bfd
export MAKE=gmake
export SUDO=sudo
# export CFLAGS=-I/usr/local/include/gnustep
# export LDFLAGS=-L/usr/local/lib
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'
# KERNEL=`uname -s | awk '{print tolower($0)}'`
scriptsdir="`pwd`/tools-scripts"
# Build make
cd tools-make
make clean
./configure --with-layout=gnustep CC=${CC} CXX=${CXX} LD=${LD} --prefix=${prefix}
echo "======== Build make"
${MAKE}
${SUDO} -u root ${MAKE} install
. ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh
# Build base
echo "======== Build base"
cd ../libs-base
./configure --with-installation-domain=SYSTEM
${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