Building e17 From Source on FreeBSD 8.0-RELEASE

This How-To assumes that you have a fresh FreeBSD 8.0 system, a non-root user account that is in the wheel group, and a shell that you know how to use (I used zsh). We will install e17 to /usr/local/opt/e17. This will keep it separate from the rest of our programs and libraries and make it easy to blow the whole thing away if we screw up. If you want to use a different location, be my guest.

When you see prompts that begin with a ”#”, this is a root prompt. When the prompt is a ”%”, this is my user prompt.

DISCLAIMER: I don't claim to be an expert at ANYTHING. I am fairly new to FreeBSD (mostly an OpenBSD user). I have almost zero experience with e17. I will make changes to this document as I learn of better ways to do things. This is what worked for me. This may not work for you.

CREDIT: This is based on information in the e17 User Guide and the easy_e17.sh script by Brian 'morlenxus' Miculcy. All mistakes are probably my own.

Initial System Setup

Initially we will need to install some software. I will do so using pre-compiled packages. You will need to be root to do this.

Install sudo

I use sudo in the rest of this How-To, so if you don't have it installed do so now (as root):

# pkg_add -r sudo

Install X.Org

If you have not yet installed X.Org, do so now. This may take a while.

# pkg_add -r xorg

I will not explain how to configure X.Org. See the FreeBSD handbook.

Once that is done, feel free to add the dbus and hald lines to rc.conf and reboot (FreeBSD Handbook). Or, if you don't want to run hal, I suggest installing the xf86-input-keyboard and xf86-input-mouse packages. If you do that you will also want to add

Option "AllowEmptyInput" "off"

to the ServerLayout section of your xorg.conf. I'll wait…

Install Required Software

There is a list of required software in the e17 user guide. I'll copy that list here and make some notes:

  • m4
  • autoconf (the latest available to me was 2.62)
  • automake (the latest available to me was 1.9.6)
  • libtool
  • pkg-config (got installed during the xorg installation)
  • texinfo
  • zlib (already part of my base install it seems)
  • libpng (installed with xorg)
  • jpeg
  • freetype2 (installed with xorg)
  • xorg-x11 or xfree86 (obviously installed with xorg)
  • x11-libs (obviously installed with xorg)
  • dbus (installed with xorg)
  • hal (installed with xorg)
  • pam (required for desklock) (appears to already be part of the system)
  • liblua (5.1)

You will also need to install gmake. It looked to me initially like BSD make might do the job, but I was told there is something it won't handle correctly (wish I had more info) so I will use gmake.

# pkg_add -r m4
...
# pkg_add -r autoconf262
...
# pkg_add -r automake19
...
# pkg_add -r libtool
...
# pkg_add -r pkg-config
...
# pkg_add -r texinfo
...
# pkg_add -r jpeg
...
# pkg_add -r freetype2
...
# pkg_add -r lua51
...
# pkg_add -r gmake
...

Install Optional Dependencies

These are listed as optional in the e17 Install Guide, but I installed them all.

  • librsvg2 (installs a bunch of stuff)
  • inotify (linux only) (obviously I didn't install this)
  • curl
  • openssl
  • libungif
  • libtiff (installed when I installed librsvg2)
  • gettext (already installed during xorg install)
# pkg_add -r librsvg2
...
# pkg_add -r curl
...
# pkg_add -r openssl
...
# pkg_add -r libungif
...

Getting The Source

We're going to install from source, so we will need to checkout the libraries and e17 from the subversion repository. To do this you will need subversion installed:

# pkg_add -r subversion

I recommend keeping these in a dir just off of your home dir. Exit your root account or logout and log back in as your user. Then:

% mkdir e_build
% cd e_build

Then you can grab the base libraries using svn:

~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/eina eina-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/eet eet-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/evas evas-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/ecore ecore-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/efreet efreet-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/embryo embryo-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/edje edje-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/e_dbus e_dbus-svn
...
~/e_build% svn co http://svn.enlightenment.org/svn/e/trunk/e e17-svn
...

Building e17

The libraries need to be installed in a specific order…

  1. Eina
  2. Eet
  3. Evas
  4. Ecore
  5. Efreet
  6. Embryo
  7. Edje
  8. E_DBus

We will also need to get our system and environment set up to make it all work out.

Preparing To Build

I'm going to install to /usr/local/opt/e17, so I will need this directory to exist.

% sudo mkdir -p /usr/local/opt/e17

I also plan to use a config.site script to set some environment variables for autoconf. This file will get read from $prefix/share/config.site.

% sudo mkdir /usr/local/opt/e17/share

The contents of the /usr/local/opt/e17/share/config.site file will be as follows:

PREFIX="/usr/local/opt/e17"
CFLAGS="-L/usr/local/lib -L/usr/X11R6/lib -L$PREFIX/lib -I/usr/local/include \
  -I/usr/X11R6/include -I$PREFIX/include -I/usr/local/share/libtool/libltdl"
LDFLAGS="-lintl -liconv"
CPPFLAGS="-I/usr/X11R6/include -I$PREFIX/include -I/usr/local/share/libtool/libltdl"
ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
LD_LIBRARY_PATH="/usr/X11R6/lib:/usr/local/opt/e17/lib:$LD_LIBRARY_PATH"

It's good practice to end the file with a newline.

You also need PKG_CONFIG_PATH set up, and it apparently doesn't work if you put it in the config.site file.

% export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/opt/e17/lib/pkgconfig"

Now is also a good time to add /usr/local/opt/e17/bin to your path; you will need that later. If you plan on actually using e17, you may as well edit your profile to include it.

% export PATH=$PATH:/usr/local/opt/e17/bin

Building Eina

Now we should be ready to do some compiling. First we need to compile Eina, so go into the eina-svn directory and do like so:

~/e_build/eina-svn% ./autogen.sh --prefix=/usr/local/opt/e17
...
~/e_build/eina-svn% ./configure --prefix=/usr/local/opt/e17
...
~/e_build/eina-svn% gmake
...
~/e_build/eina-svn% sudo gmake install

OK. If you didn't just get some errors (check back to make sure you did everything) then you should have some new stuff in your /usr/local/opt/e17 directory and in the lib directory under that. In theory, I think you are supposed to be able to just run autogen.sh, but I got stuck at one point and someone on IRC suggested running configure and I got going again. So I will suggest doing so unless someone lets me know it isn't needed anymore.

% ls -l /usr/local/opt/e17
total 8
drwxr-xr-x  2 root  wheel  512 Nov 30 21:27 bin
drwxr-xr-x  3 root  wheel  512 Nov 30 21:27 include
drwxr-xr-x  4 root  wheel  512 Nov 30 21:27 lib
drwxr-xr-x  2 root  wheel  512 Nov 30 21:15 share

% ls -l /usr/local/opt/e17/lib
total 432
drwxr-xr-x  3 root  wheel     512 Nov 30 21:27 eina
lrwxr-xr-x  1 root  wheel      27 Nov 30 21:27 libeina-ver-pre-svn-04.so -> libeina-ver-pre-svn-04.so.0
-rwxr-xr-x  1 root  wheel  189251 Nov 30 21:27 libeina-ver-pre-svn-04.so.0
-rw-r--r--  1 root  wheel  218888 Nov 30 21:27 libeina.a
-rwxr-xr-x  1 root  wheel    1122 Nov 30 21:27 libeina.la
lrwxr-xr-x  1 root  wheel      27 Nov 30 21:27 libeina.so -> libeina-ver-pre-svn-04.so.0
drwxr-xr-x  2 root  wheel     512 Nov 30 21:27 pkgconfig

There are some of those directories that we configured in our config.site file. If you appear to be successful at this point, let's move on.

Build Eet, Evas, etc...

So run these same commands inside eet-svn, evas-svn, ecore-svn, efreet-svn, embryo-svn, edje-svn, and e_dbus-svn IN THAT ORDER.

% ./autogen.sh --prefix=/usr/local/opt/e17
% ./configure --prefix=/usr/local/opt/e17
% gmake
% sudo gmake install

Build e17

Now, if all that went off without a hitch, do the same thing in the e17-svn directory.

If that configures and builds, you should be ready to run it!

Assuming you have a working /etc/X11/xorg.conf file (you are on your own, there), create a ~/.xinitrc file with this line in it:

exec /usr/local/opt/e17/bin/enlightenment_start

Then run:

% startx

You should get a slick looking e17 setup dialog. If you get some kind of error and fall back to your console, then you may have an X problem. Or you didn't get it compiled as well as you think you did…

howto/build_e17_from_source_on_freebsd_8.txt · Last modified: 2012/10/20 09:46 (external edit)