Skip to content

Commit a950df2

Browse files
authored
Merge pull request #25 from buzzdeee/master
Enhance OpenBSD support:
2 parents 443fbb9 + dffdb16 commit a950df2

4 files changed

Lines changed: 93 additions & 17 deletions

File tree

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,49 @@ The purposes of all of the scripts is as follows:
3434
* process-files - run the specified command on the current files that have been changed.
3535
* cleanup - whitespace cleanup and, likely, other cleanups to be done on currently changed files.
3636

37+
38+
39+
Install GNUstep dev environment
40+
===
41+
42+
* use ssh-agent forwarding, or have your key for GitHub locally on your dev machine and
43+
start ssh-agent locally.
44+
* have sudo configured, you may or may not want to use NOPASSWD
45+
* have the SSH key from GitHub accepted
46+
47+
Assume an empty development VM, i.e. Linux, OpenBSD, you name it:
48+
49+
```
50+
mkdir ~/gnustep
51+
cd ~/gnustep
52+
```
53+
54+
with curl already installed:
55+
```
56+
curl -fsSL > gnustep-web-install-dev https://raw.githubusercontent.com/gnustep/tools-scripts/refs/heads/master/gnustep-web-install-dev
57+
```
58+
or on OpenBSD with ftp:
59+
```
60+
ftp -o gnustep-web-install-dev https://raw.githubusercontent.com/gnustep/tools-scripts/refs/heads/master/gnustep-web-install-dev
61+
```
62+
63+
Review what the script is doing, and you may visit the other scripts it's fetching and installing. Once you're confident, it's good to go:
64+
65+
If you're on OpenBSD, the default invocation of ./gnustep-web-install-dev will build with gcc against gcc libobjc.
66+
If you want to build against libobjc2 with ARC support, before going on export WITH_ARC=yes environment variable.
67+
68+
```
69+
chmod 755 gnustep-web-install-dev
70+
./gnustep-web-install-dev
71+
```
72+
73+
Go grab a coffee, and wait a bit.
74+
75+
Once it finished, source GNUstep.sh and start developing:
76+
77+
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
78+
79+
3780
Please report any bugs you find with this set of scripts.
3881

3982
Thank you... GC

build-openbsd

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
11
#!/bin/sh
22

3-
export CC=egcc
4-
export CXX=eg++
5-
export LD=ld.bfd
3+
if [ "X${WITH_ARC}" == "Xyes" ];then
4+
echo "BUIDLING WITH CLANG and ARC"
5+
GSMAKE_CC=clang
6+
GSMAKE_CXX=clang++
7+
GSMAKE_CPP="clang -E"
8+
GSMAKE_LD=ld
9+
GSMAKE_AS=llvm-as
10+
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"
11+
GSMAKE_CPPFLAGS="-I/usr/local/include -I/usr/local/include/gnustep"
12+
GSMAKE_LDFLAGS="-L/usr/local/lib -lc++abi -lobjc2 -pthread"
13+
else
14+
echo "BUIDLING WITH GCC"
15+
GSMAKE_CC=egcc
16+
GSMAKE_CXX=eg++
17+
GSMAKE_CPP="egcc -E"
18+
GSMAKE_LD=ld.bfd
19+
GSMAKE_AS=as
20+
EXTRA_GSMAKE_FLAGS=""
21+
GSMAKE_CPPFLAGS="-I/usr/local/include"
22+
GSMAKE_LDFLAGS="-L/usr/local/lib"
23+
fi
624
export MAKE=gmake
725
export SUDO=sudo
8-
# export CFLAGS=-I/usr/local/include/gnustep
9-
# export LDFLAGS=-L/usr/local/lib
1026

1127
ROOT=/
1228
USR_ROOT=${ROOT}usr
@@ -22,13 +38,12 @@ echo ""
2238

2339
CPUS=4
2440
SUDO='sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH'
25-
# KERNEL=`uname -s | awk '{print tolower($0)}'`
2641
scriptsdir="`pwd`/tools-scripts"
2742

2843
# Build make
2944
cd tools-make
30-
make clean
31-
./configure --with-layout=gnustep CC=${CC} CXX=${CXX} LD=${LD} --prefix=${prefix}
45+
${MAKE} clean
46+
./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}"
3247
echo "======== Build make"
3348
${MAKE}
3449
${SUDO} -u root ${MAKE} install
@@ -37,30 +52,45 @@ ${SUDO} -u root ${MAKE} install
3752
# Build base
3853
echo "======== Build base"
3954
cd ../libs-base
55+
${SUDO} ${MAKE} clean
4056
./configure --with-installation-domain=SYSTEM
41-
${MAKE} debug=yes messages=no -j4
57+
${MAKE} debug=yes messages=yes -j4
4258
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
4359
echo "==="
4460

4561
# Build gui
4662
echo "======== Build gui"
4763
cd ../libs-gui
48-
./configure
49-
LDFLAGS=${LDFLAGS} CC=${CC} CXX=${CXX} ${MAKE} debug=yes messages=no -j4
64+
${SUDO} ${MAKE} clean
65+
./configure --with-x --enable-speech
66+
${MAKE} debug=yes messages=yes -j4
5067
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
5168
echo "==="
5269

5370
# Build backend
5471
echo "======== Build back"
5572
cd ../libs-back
73+
${SUDO} ${MAKE} clean
5674
./configure --enable-graphics=cairo
57-
LDFLAGS=${LDFLAGS} CC=${CC} CXX=${CXX} ${MAKE} debug=yes messages=no -j4
75+
${MAKE} debug=yes messages=yes -j4
5876
${SUDO} -u root ./install.sh ${GNUSTEP_ROOT} ${MAKE}
5977
echo "==="
6078

6179
# Set default backend
6280
# defaults write NSGlobalDomain GSBackend libgnustep-cairo
6381

82+
echo "======== Build ProjectCenter"
83+
cd ../apps-projectcenter
84+
${SUDO} ${MAKE} clean
85+
${MAKE} debug=yes messages=yes
86+
${SUDO} ${MAKE} install
87+
88+
echo "======== Build Gorm"
89+
cd ../apps-gorm
90+
${SUDO} ${MAKE} clean
91+
${MAKE} debug=yes messages=yes
92+
${SUDO} ${MAKE} install
93+
6494
echo "Done."
6595

6696
exit 0

gnustep-web-install-dev

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ export KERNEL=`uname -s | sed "s/\-.*//g" | awk '{print(tolower($0))}'`
3636
echo "Begin setup for ${KERNEL}"
3737

3838
export USER=`whoami`
39-
curl -fsSL > ./setup-${KERNEL} https://raw.githubusercontent.com/gnustep/tools-scripts/master/setup-${KERNEL}
39+
if [ "X${KERNEL}" == "Xopenbsd" ];then
40+
ftp -o ./setup-${KERNEL} https://raw.githubusercontent.com/gnustep/tools-scripts/master/setup-${KERNEL}
41+
else
42+
curl -fsSL > ./setup-${KERNEL} https://raw.githubusercontent.com/gnustep/tools-scripts/master/setup-${KERNEL}
43+
fi
44+
4045
./setup-${KERNEL}
4146
rm ./setup-${KERNEL}
4247

@@ -52,7 +57,7 @@ echo "================ Install Dependencies ================"
5257

5358
echo "================ Build ================"
5459
# Build it...
55-
./tools-scripts/build-${KERNEL}
60+
WITH_ARC="${WITH_ARC}" ./tools-scripts/build-${KERNEL}
5661

5762
# Post installation
5863
echo "================ Post Installation ================"

install-dependencies-openbsd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ echo "NOTE: This file assumes that Xorg is installed and that sudo is installed.
99
echo " Change the SUDO= variable at top of script to use 'doas' instead"
1010
echo " Also, 'doas' or 'sudo' should be properly configured to allow running the script."
1111
echo "Installing..."
12-
${SUDO} pkg_add curl git sudo-- gmake cmake windowmaker jpeg tiff png \
13-
libxml gnutls libffi icu4c cairo avahi gcc%${GCC_MAJOR} \
14-
gobjc%${GCC_MAJOR} gmp gdb gnustep-libobjc2 flite
12+
${SUDO} pkg_add curl git sudo-- gmake cmake windowmaker jpeg tiff png libiconv libxml libxslt gnutls libffi icu4c cairo avahi gcc%${GCC_MAJOR} gobjc%${GCC_MAJOR} gmp gdb gnustep-libobjc2 flite libao libsndfile giflib cups aspell
1513
echo "Done..."
1614
exit 0

0 commit comments

Comments
 (0)