2013年8月22日木曜日

Bleeding edge

Are you the kind of person who is always looking for latest versions and bleeding edge software for testing those new functions? If yes, you've come to the right place.

Here are step by step instructions in how to install FreeBSD 10 with latest clang, libobjc and GNUstep.

These instructions are for a laptop with Intel graphics and shell is the default csh.

You may have to alter some points to match your system.

FreeBSD

Download the latest release and install as normal.
Boot up and login as root. 

Download most recent ports

# portsnap fetch
# portsnap extract

Intel KMS

Add to /etc/make.conf for Intel KMS support
WITH_KMS=YES
WITH_NEW_XORG=YES

Portmaster

A convenient tool for installing ports.
# cd /usr/ports/ports-mgmt/portmaster
# make install

Nano

We don't wanna use vi....
# portmaster -G editors/nano

Subversion

# portmaster -G devel/subversion

Clang

Required for latest Obj-C features.
# portmaster -G lang/clang33

Sudo
# portmaster -G security/sudo

Edit settings so that we can use sudo 
# visudo
Uncomment the line “%wheel ALL=(ALL) NOPASSWD: ALL”


Add user to wheel group to allow sudo# pw usermod [youruser] -G wheel
 

Xorg

# portmaster x11/xorg (select drivers as needed)
# portmaster -G x11-wm/openbox (my choice of wm)
# portmaster -G x11-wm/xcompmgr (optional, needed for transparent windows)


# cd ~
# Xorg -configure
# cp xorg.conf.new /etc/X11/xorg.conf


Add to /etc/X11/xorg.conf
section ServerLayout to enable mouse and keyboard (without hald)
Option          "AutoAddDevices" "Off"


Add to /home/[youruser]/.xinitrc
exec xcompmgr &
exec openbox-session


Now X can be started with “startx” after login.



Autologin

If you want auto login and auto start X do this:
Add to /etc/gettytab
# WB: autologin console as user "brilliant"
A|Al|Autologin console:\
       :ht:np:sp#115200:al=
brilliant


Edit line in /etc/ttys
ttyv1   "/usr/libexec/getty Al"       xterm  on  secure


Add to ~/.cshrc
# WB: startx if it isn't already running
set XPID = `/usr/bin/pgrep X`
if ( { [ -n "$XPID" ] } ) then
 #echo "X is already running"
else
 startx
 logout
endif


GNUstep

Prerequisites

# portmaster -G security/gnutls
# portmaster -G devel/icu
# portmaster -G devel/libdispatch


Make clang33 our default compiler
Add to ~/.cshrc and then re-login
setenv CC clang33
setenv CXX clang++33
setenv CPP clang-cpp33


Get source from SVN



$ cd ~
$ mkdir Download
$ cd Download
$ svn co http://svn.gna.org/svn/gnustep/tools/make/trunk make
$ svn co http://svn.gna.org/svn/gnustep/libs/base/trunk base
$ svn co http://svn.gna.org/svn/gnustep/libs/back/trunk back
$ svn co http://svn.gna.org/svn/gnustep/libs/gui/trunk gui
$ svn co http://svn.gna.org/svn/gnustep/libs/libobjc2/trunk libobjc2


Configure & Install



gnustep-make
You may choose other layout and prefix if you like
$ ./configure --with-layout=gnustep --prefix=/usr/GNUstep --enable-objc-nonfragile-abi
$ gmake
$ sudo -E gmake install
$ source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh


Add to ~/.cshrc
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh



libobjc2
$ gmake (cmake seems broken, use normal Makefile with gmake)
$ sudo -E gmake install
- Reinstall gnustep-make according to above so that it is configured to used the new libobjc2


gnustep-base
$ ./configure --disable-unicodeconstants --enable-fake-main
$ gmake
$ sudo -E gmake install


gnustep-gui
$ ./configure
$ gmake
$ sudo -E gmake install


gnustep-back
$ ./configure --enable-graphics=cairo --with-name=cairo
$ gmake
$ sudo -E gmake install


Set default backend to cairo
$ defaults write NSGlobalDomain GSBackend cairo

Play Time


Now everything should be set up so you can start compiling and running GNUstep applications.
If you have any problems, please let me know in the comments below.


Good Luck :)


記載されている会社名、および商品名等は、各社の商標または登録商標です。

0 コメント:

コメントを投稿

Related Posts Plugin for WordPress, Blogger...