Installing GNUStep on FreeBSD 15.0-RELEASE

 

 


Installing GNUStep in FreeBSD 15.0 RELEASE 

Installing FreeBSD ports

For installing the required ports at first update the ports tree. Us can use portmaster or pkg.

As user root do a:

 # portsnap fetch extract update


Then install the portmaster port which will make installing subsequent ports easier:

 # cd /usr/ports/ports-mgmt/portmaster && make install clean

To update outdated ports later do a

 # portsnap fetch update

to update the ports tree and

 # pkg version -l "<"

or

 # portmaster -L

to check for outdated ports,

followed by a

 # portmaster -a

or

 # portmaster -af

(if some port fails) on a regular basis.
 

Install bash

as root do:

# pkg install bash

I've chosen the default options for bash and all its dependencies  
# pkg install xorg
# pkg install gnustep

Installing the Virtual Box Guest Additions port


as root:

 # pkg install virtualbox-ose-additions
pw groupmod wheel -m gnustep



enabling Guest Additions: 

Add this to /etc/rc.conf in the FreeBSD guest:

 vboxguest_enable="YES"
 vboxservice_enable="YES"

Xorg uses HAL to autodetect keyboards and mice. The sysutils/hal and devel/dbus ports are installed as dependencies of x11/xorg, but must be enabled by the following entries in the /etc/rc.conf file:

 hald_enable="YES"
 dbus_enable="YES"

Reboot or start both services by hand:

 /usr/local/etc/rc.d/dbus start
 /usr/local/etc/rc.d/hald start

Installing the Window Maker port

as root:

 # pkg install windowmaker

enabling Window Maker

In order to run wmaker, a user needs to have an ~/.xinitrc file consisting of something similar to

 #!/bin/sh
 exec wmaker

add this for both user root and gnustep 

Installing GNUstep from FreeBSD ports into the System Domain

Installing the necessary tools

Installing the Subversion port

Subversion is needed to check out the sources from GNUstep SVN.

as root:

 # pkg install subversion

Installing the Sudo port

sudo is needed during the GNUstep installation process.

as root:

 # pkg install sudo

Choose the default options 
 
now logout/login

as root:

 # visudo

uncomment the line:
 # %wheel ALL=(ALL) ALL

to enable sudo for the group "wheel" and so for the user gnustep (which is part of the wheel group)

Installing the GNUstep libraries and framewoks

I've chosen the way of installing the GNUstep ports into the System domain so I don't need to look after the right dependencies for myself but let the FreeBSD's port system handle this.

Installing the Objective-C 2 runtime

as root:

 # pkg install libobjc2

use the default options

Install GNUstep make

 #pkg install gnustep-make

use the default options

install GNUstep base (Foundation)

 # pkg install gnustep-base

Choose the default options except for

gnustep-base-1.24.6_6
 

Install GNUstep gui (AppKit)

 # pkg install gnustep-gui

Choose the default options except for

gnustep-gui-0.24.0_5
 

Install GNUstep back

 # pkg install gnustep-back

use the default options
 
 

Optional: Trying to install the GNUstep examples port (currently broken)

GNUstep examples are a collection of simple GNUstep apps to guide you into developing for GNUstep.


 # portmaster misc/gnustep-examples

this port is currently broken

Installing the System Preferences port

System Preferences' purpose is to control certain settings of your GNUstep environment.


 # portmaster deskutils/systempreferences

use the default options

Installing the GWorkspace port

GWorkspace is GNUsteps Workspace manager.


 # portmaster deskutils/gworkspace

use the default options

Installing the Terminal.app port

Terminal.app is GNUstep's terminal emulator.


 # portmaster x11/terminal.app

use the default options

Installing the ProjectCenter port

ProjectCenter is GNUstep's integrated development environment (IDE).


 # portmaster devel/projectcenter

use the default options

Installing the GORM port (Graphical Object Relationship Modeller)

GORM is GNUsteps Interface Builder clone.


 # portmaster devel/gorm

Setting up the GNUstep environment

as root and as gnustep:

 $ echo . /usr/local/GNUstep/System/Library/Makefiles/GNUstep.sh >> ~/.profile
 $ echo gdnc >> ~/.profile

or, when using csh (root uses this maybe):

 # echo source /usr/local/GNUstep/System/Library/Makefiles/GNUstep.csh >> ~/.cshrc
 # echo gdnc >> ~/.cshrc

as root and as gnustep, edit the .xinitrc file:

 $ vi ~/.xinitrc

that it looks like this:

 #!/bin/sh
. /usr/local/GNUstep/System/Library/Makefiles/GNUstep.sh
 
exec wmaker 
exec openapp Workspace
 

Launching GWorkspace inside Window Maker

 $ startx

Installing GNUstep SVN trunk source into the Local Domain

Now continue to install the latest GNUstep from SVN trunk into the Local domain which supersedes the stuff in the System domain.

Checking out the sources from SVN trunk

as gnustep:

 $ mkdir GNUstep-sources
 $ cd GNUstep-sources/


check out all sources from GNUstep SVN:

 $ svn co svn://svn.gna.org/svn/gnustep/trunk .

Building libobjc2 (GNUstep Objective-C 2.0 runtime) from source

 $ cd ~/GNUstep-sources/modules/dev-libs/libobjc2/

for now use:

 $ CC=clang CXX=clang++ make
 $ sudo -E make install

enter gnustep user's password

in the future this will be the way to go:

 $ mkdir Build
 $ cd Build/
 $ cmake .. -DCMAKE_C_COMPILER=clang -DCMKAE_CXX_COMPILER=clang++
 $ make && sudo -E make install

enter gnustep user's password

Building GNUstep make from source

 $ cd ~/GNUstep-sources/modules/core/make/
 $ ./configure --prefix=/usr/local/GNUstep --with-config-file=/usr/local/GNUstep/GNUstep-trunk.conf --enable-objc-nonfragile-abi --enable-native-objc-exceptions --with-layout=gnustep --enable-debug-by-default CC=clang CXX=clang++
 $ sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Don't forget to source GNUstep.sh and make sure this is done on every login:

 $ . /System/Library/Makefiles/GNUstep.sh
 $ echo . /System/Library/Makefiles/GNUstep.sh >> ~/.profile

Building GNUstep base from source

 $ cd ~/GNUstep-sources/modules/core/base/
 $ ./configure --disable-mixedabi CC=clang CXX=clang++
 $ gmake && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Building GNUstep gui from source

 $ cd ~/GNUstep-sources/modules/core/gui/
 $ gmake && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Building GNUstep back from source

 $ cd ~/GNUstep-sources/modules/core/back/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Building GNUstep examples

 $ cd ~/GNUstep-sources/modules/usr-apps/examples/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

 Try the Calculator.app from the Examples

Building Developer Tools and GDL2 (Enterprise Objects Framework (EOF) clone)

Building GDL2 dependencies

as root: install PostgreSQL (needed for GDL2):

 $ su -
 # portmaster databases/postgresql94-server

use the default options

as root: install PostgreSQL ODBC support:

 # portmaster databases/postgresql-odbc

use the default options

as root: configure PostgreSQL:

 # echo postgresql_enable=\"YES\" >> /etc/rc.conf
 # /usr/local/etc/rc.d/postgresql initdb
 # /usr/local/etc/rc.d/postgresql start

as gnustep: install renaissance (needed for GDL2):

 $ cd ~/GNUstep-sources/modules/dev-libs/renaissance/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Building GDL2 from source

 $ cd ~/GNUstep-sources/modules/dev-libs/gdl2/
 $ ./configure CC=clang CXX=clang++
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Building ProjectCenter from source

 $ cd ~/GNUstep-sources/modules/dev-apps/projectcenter/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install

Building GORM from source

 $ cd ~/GNUstep-sources/modules/dev-apps/gorm/
 $ gmake -j 8 && sudo -E gmake GNUSTEP_INSTALLATION_DOMAIN=LOCAL install


That's it for now. 

Have fun developing with and for GNUstep!