-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathbuild-libs-tools-apps
More file actions
executable file
·87 lines (73 loc) · 1.91 KB
/
Copy pathbuild-libs-tools-apps
File metadata and controls
executable file
·87 lines (73 loc) · 1.91 KB
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
#!/bin/sh
# Libraries/Apps/Tools
LIBS_FILES="libs-xcode libs-ppd libs-steptalk libs-ucsdata libs-renaissance apps-gorm libs-gdl2 libs-gsweb libs-java libs-ruby libs-guile libs-simplewebkit libs-webkitcef"
TOOLS_FILES="tools-charsets"
APPS_FILES="apps-systempreferences apps-gworkspace apps-projectcenter apps-thematic apps-easydiff apps-videoplayer apps-fontbook apps-gsps"
# export
export GNUSTEP_MAKEFILES
if [ "$GNUSTEP_MAKEFILES" = "" ]; then
echo "\$GNUSTEP_MAKEFILES not set"
exit -1
fi
echo $GNUSTEP_MAKEFILES
# OS
OS=`uname -s`
# OpenBSD?
# number of processes
if [ "$OS" = "OpenBSD" ]; then
CPUS=`sysctl hw.ncpu | sed 's/hw.ncpu\=//g'`
MAKE="gmake"
else
CPUS=`nproc`
MAKE="make"
fi
# func..
build_and_install()
{
echo "***** Configuring ${1}..."
cd ${1}
if [ -f configure ]; then
./configure
fi
echo "***** Building ${1}..."
if [ -f Makefile ]; then
$MAKE -j${CPUS} -f Makefile
sudo $MAKE install
elif [ -f build.sh ]; then
./build.sh
# --install calls sudo, so we don't need to do it explicitly
./build.sh --install
elif [ -f GNUmakefile ]; then
$MAKE -j${CPUS} debug=yes
if [ "$OS" = "MINGW64_NT*" ]; then
. ${GNUSTEP_MAKEFILES}/GNUstep.sh && ${MAKE} GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install
else
sudo -E -- sh -c ". ${GNUSTEP_MAKEFILES}/GNUstep.sh && ${MAKE} GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install"
fi
elif ls *.xcodeproj > /dev/null 2>&1; then
buildtool
sudo buildtool install
fi
cd ..
echo "***** Done"
echo " "
}
install_files()
{
for file in ${1}
do
build_and_install $file
done
}
do_install()
{
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
echo "======= Building libraries."
install_files "${LIBS_FILES}"
echo "======= Building tools."
install_files "${TOOLS_FILES}"
echo "======= Building applications."
install_files "${APPS_FILES}"
}
do_install
exit 0