Skip to content

Commit bde3ae4

Browse files
committed
Merge branch 'master' of github.com:gnustep/tools-scripts
2 parents b6550c6 + 90be10f commit bde3ae4

3 files changed

Lines changed: 241 additions & 2 deletions

File tree

build-libs-tools-apps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Libraries/Apps/Tools
44
LIBS_FILES="libs-xcode libs-ppd libs-steptalk libs-ucsdata libs-renaissance apps-gorm libs-gdl2 libs-gsweb libs-java"
55
TOOLS_FILES="tools-charsets"
6-
APPS_FILES="apps-systempreferences apps-gworkspace apps-projectcenter apps-thematic apps-easydiff"
6+
APPS_FILES="apps-systempreferences apps-gworkspace apps-projectcenter apps-thematic apps-easydiff apps-videoplayer apps-fontbook"
77

88
# export
99
export GNUSTEP_MAKEFILES

clone-all-repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
PREFIX="git@github.com:gnustep/"
4-
FILES="libs-back libs-gui apps-projectcenter libs-palettes libs-boron apps-easydiff libs-opal libs-ec libs-mica libs-webservices libobjc2 libs-performance libs-base libs-sqlclient libs-corebase libs-dbuskit gitsvn-scripts plugins-themes-WinUXTheme plugins-themes-Gtk plugins-session plugins-gs-emacs libs-gscoredata apps-thematic apps-systempreferences tools-android android-examples tools-windows-development-installer tools-startup libs-gsweb tools-nfmake tools-installers tests-testsuite tests-retaincount tests-palettetest tests-gormtest libs-webserver libs-uikit libs-ucsdata libs-sysconfig apps-interfacecreator tests-examples libs-xcode libs-steptalk libs-smbkit libs-simplewebkit libs-ruby libs-renaissance libs-quartzcore libs-ppd libs-java libs-guile libs-gsldap libs-gsgd libs-gscrypt libs-gsantlr libs-gdl2 libs-corenetwork libs-coreimage gap libs-audiotoolbox apps-gworkspace apps-gsldapwebexplorer apps-gorm tools-make tools-scripts tools-model-main tools-charsets plugins-deprecated license libobjc webkit-cef apps-dock tools-bridge plugins-themes tools-windows-msvc"
4+
FILES="libs-back libs-gui apps-projectcenter libs-palettes libs-boron apps-easydiff libs-opal libs-ec libs-mica libs-webservices libobjc2 libs-performance libs-base libs-sqlclient libs-corebase libs-dbuskit gitsvn-scripts plugins-themes-WinUXTheme plugins-themes-Gtk plugins-session plugins-gs-emacs libs-gscoredata apps-thematic apps-systempreferences tools-android android-examples tools-windows-development-installer tools-startup libs-gsweb tools-nfmake tools-installers tests-testsuite tests-retaincount tests-palettetest tests-gormtest libs-webserver libs-uikit libs-ucsdata libs-sysconfig apps-interfacecreator tests-examples libs-xcode libs-steptalk libs-smbkit libs-simplewebkit libs-ruby libs-renaissance libs-quartzcore libs-ppd libs-java libs-guile libs-gsldap libs-gsgd libs-gscrypt libs-gsantlr libs-gdl2 libs-corenetwork libs-coreimage gap libs-audiotoolbox apps-gworkspace apps-gsldapwebexplorer apps-gorm tools-make tools-scripts tools-model-main tools-charsets plugins-deprecated license libobjc webkit-cef apps-dock tools-bridge plugins-themes tools-windows-msvc apps-videoplayer apps-fontbook"
55

66
for file in ${FILES}
77
do

compile-all-opal

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
#!/bin/bash
2+
3+
#
4+
# Run this script as root to configure, compile and install
5+
# gnustep-make, gnustep-base, gnustep-corebase, gnustep-gui,
6+
# opal, and the opal gnustep-back backend
7+
# with a single command
8+
#
9+
# Examples:
10+
#
11+
# ./compile-all
12+
#
13+
# <uses `--prefix=/usr/GNUstep' as option to configure>
14+
#
15+
# ./compile-all /usr/local/GNUstep
16+
#
17+
# <uses `--prefix=/usr/local/GNUstep' as option to configure>
18+
#
19+
20+
CPUS=`nproc`
21+
SUDO='sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH'
22+
KERNEL=`uname -s | awk '{print tolower($0)}'`
23+
scriptsdir="`pwd`/tools-scripts"
24+
25+
if [ "$1" != "" ]; then
26+
prefix="$1"
27+
else
28+
prefix="/usr/GNUstep"
29+
fi
30+
31+
if [ "$2" != "" ]; then
32+
compiler="$2"
33+
fi
34+
35+
if [ "$3" != "" ]; then
36+
cxxcompiler="$3"
37+
fi
38+
39+
if [ "$4" != "" ]; then
40+
linker=$4
41+
fi
42+
43+
44+
# Check if we are compiling under windows...
45+
UNAME=`uname | cut -d'-' -f1`
46+
if [ "$UNAME" != "MINGW32_NT" ] ; then
47+
if [ ! \( -d $prefix -a -w $prefix \) ] ; then
48+
if [ ! \( -d $(basename $prefix) -a -w $(basename $prefix) \) ] ; then
49+
NEEDSROOT="true"
50+
fi
51+
fi
52+
fi
53+
54+
# Get architecture
55+
ARCH=`uname -m`
56+
57+
# If we are installing into home, then we do not need root...
58+
if
59+
echo $prefix | grep "^/home/"
60+
then
61+
unset NEEDSROOT
62+
make_flags="--disable-importing-config-file"
63+
fi
64+
65+
if gmake -v >/dev/null 2>&1
66+
then
67+
export MAKE="gmake -j${CPUS}"
68+
else
69+
export MAKE="make -j${CPUS}"
70+
fi
71+
72+
if [ "$2" == "" ]; then
73+
export CC=gcc
74+
else
75+
export CC="$compiler"
76+
fi
77+
78+
if [ "$3" == "" ]; then
79+
export CXX=g++
80+
else
81+
export CXX=$cxxcompiler
82+
fi
83+
84+
if [[ "$CC" == gcc* ]]; then
85+
USING_GCC=true
86+
else
87+
USING_GCC=false
88+
fi
89+
90+
if [ "$4" == "" ]; then
91+
if ! $USING_GCC; then
92+
linker=ld.gold
93+
fi
94+
else
95+
LD=$(which "$linker")
96+
if $USING_GCC; then
97+
# We must create a directory and symlink the linker into there.
98+
mkdir temp_linker_dir
99+
cd temp_linker_dir
100+
ln -s "$LD" ./ld
101+
cd ..
102+
export LDFLAGS="$LDFLAGS -B$(realpath temp_linker_dir)"
103+
else
104+
# Clang allows constructions such as -fuse-ld=/usr/bin/ld.lld-18
105+
export LDFLAGS="$LDFLAGS -fuse-ld=$LD"
106+
fi
107+
fi
108+
echo "==== compile-all"
109+
echo "Using compiler $CC"
110+
echo "Using c++ compiler $CXX"
111+
if [ "$4" == "" ]; then
112+
echo "Using default linker"
113+
else
114+
echo "Using linker $LD"
115+
fi
116+
echo "===="
117+
118+
# Flags for windows build.
119+
if [ "$UNAME" == "MINGW32_NT" ] ; then
120+
export cc_flags="-fstrict-aliasing -fno-omit-frame-pointer"
121+
fi
122+
123+
# If we are building with clang, then add this to cc_flags
124+
if ! $USING_GCC; then
125+
export cc_flags="-fblocks -fobjc-nonfragile-abi ${cc_flags}"
126+
fi
127+
128+
# Install make
129+
echo "Installing GNUstep into ${prefix}"
130+
cd tools-make
131+
# make distclean
132+
if $USING_GCC; then
133+
echo "==== BUILDING WITH GCC"
134+
echo "Build command: CCFLAGS=$cc_flags CC=$CC ./configure --prefix=${prefix} --with-library-combo=gnu-gnu-gnu --with-layout=gnustep $make_flags"
135+
136+
echo "===="
137+
CCFLAGS=$cc_flags CXX=$CXX CC=$CC ./configure --prefix=${prefix} --with-library-combo=gnu-gnu-gnu --with-layout=gnustep ${make_flags}
138+
else
139+
echo "==== BUILDING WITH CLANG"
140+
unset CC
141+
unset CXX
142+
143+
# Assume the presence of libdispatch if we are using clang and libobjc2
144+
export CC=${compiler}
145+
export CXX=${cxxcompiler}
146+
# export LDFLAGS=-ldispatch
147+
echo "LDFLAGS=$LDFLAGS"
148+
echo "Build command: CCFLAGS=${cc_flags} CXX=${CXX} CC=${CC} ./configure --prefix=${prefix} --with-library-combo=ng-gnu-gnu --enable-objc-arc --enable-native-objc-exceptions --with-layout=gnustep ${make_flags}"
149+
CCFLAGS=${cc_flags} CXX=${CXX} CC=${CC} ./configure --prefix=${prefix} --with-library-combo=ng-gnu-gnu --enable-objc-arc --enable-native-objc-exceptions --with-layout=gnustep ${make_flags}
150+
fi
151+
152+
# Install make after configuration...
153+
echo "======== Installing Make..."
154+
$MAKE
155+
if [ "true" == "$NEEDSROOT" ]; then
156+
${SUDO} -u root $MAKE install
157+
else
158+
$MAKE install
159+
fi
160+
. $prefix/System/Library/Makefiles/GNUstep.sh
161+
162+
# Setup clang specific libraries...
163+
if ! $USING_GCC; then
164+
${scriptsdir}/clang-setup "$CLANG" "$CLANGPP"
165+
fi
166+
167+
# Install base
168+
echo "======== Installing Base..."
169+
cd ../libs-base
170+
make distclean
171+
. $prefix/System/Library/Makefiles/GNUstep.sh
172+
# Temporary until KVO issues are fixed...
173+
./configure # --disable-newkvo
174+
LDFLAGS="$LDFLAGS -ldispatch" $MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes || exit 1
175+
if [ "true" == "$NEEDSROOT" ]; then
176+
${SUDO} -u root ./install.sh $prefix $MAKE
177+
else
178+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
179+
fi
180+
181+
# Install corebase
182+
echo "======== Installing CoreBase..."
183+
cd ../libs-corebase
184+
make distclean
185+
. $prefix/System/Library/Makefiles/GNUstep.sh
186+
./configure
187+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes || exit 1
188+
if [ "true" == "$NEEDSROOT" ]; then
189+
${SUDO} -u root $MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
190+
else
191+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
192+
fi
193+
194+
# Install gui
195+
echo "======== Installing GUI..."
196+
cd ../libs-gui
197+
make distclean
198+
. $prefix/System/Library/Makefiles/GNUstep.sh
199+
./configure --enable-imagemagick
200+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes
201+
if [ "true" == "$NEEDSROOT" ]; then
202+
${SUDO} -u root ./install.sh $prefix $MAKE
203+
else
204+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
205+
fi
206+
207+
# Install opal
208+
echo "======== Installing Opal..."
209+
cd ../libs-opal
210+
make distclean
211+
. $prefix/System/Library/Makefiles/GNUstep.sh
212+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes
213+
if [ "true" == "$NEEDSROOT" ]; then
214+
${SUDO} -u root $MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
215+
else
216+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
217+
fi
218+
219+
# Install back
220+
echo "======== Installing Opal Backend..."
221+
cd ../libs-back
222+
make distclean
223+
. $prefix/System/Library/Makefiles/GNUstep.sh
224+
./configure --enable-graphics=opal
225+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes
226+
if [ "true" == "$NEEDSROOT" ]; then
227+
${SUDO} -u root ./install.sh $prefix $MAKE
228+
else
229+
$MAKE GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
230+
fi
231+
232+
# Perform other operations
233+
echo "Add script to etc and xsession..."
234+
if [ ! -e /etc/profile.d/GNUstep.sh ]; then
235+
${SUDO} -u root ln -s /usr/GNUstep/System/Library/Makefiles/GNUstep.sh /etc/profile.d/GNUstep.sh
236+
fi
237+
cd ../plugins-session
238+
${SUDO} -u root ./install.sh
239+
echo "Done."

0 commit comments

Comments
 (0)