Building:FreeBSD:SCons

From FIFE development wiki
Jump to: navigation, search

Freebsd.png Platform-dependent information: FreeBSD.

The following passage contains information that is specific to FreeBSD systems.

Customize dependency paths and other build options
Copy File.png build/freebsd6-config-dist.py to File.png freebsd6-config.py or File.png build/freebsd7-config-dist.py to File.png freebsd7-config.py in same folder, its content override the default settings

You need to make sure you have installed the dependencies via ports before compiling FIFE.

If you have scons installed via ports, in Folder.png trunk of checkout source run Command.pngscons ext=1 && scons. After FIFE has been successfully built it's sufficent to run just Command.pngscons

You can see compile flags, the descriptions, default and actual values by running Command.pngscons -h outside the source directory.

Builds problems
Required lib XXX not found
installed the dependencies via ports?
The damn lib is fine, but scons ignores it
ensure that scons finds the libs/headers; you can either:
  • register the libs (system-wide) for pkg-config
  • register the libs (as non-root) for pkg-config and build with:
Command.pngexport PKG_CONFIG_PATH=/some/path Command.pngscons useenv=yes
This may sound complicated, but if you know what the -I and -L compiler flags do, it isn't. Search for the pkg-config lib dir (e.g. /usr/lib/pkgconfig) and look at one of the files. If you want to register lib foo, the filename should be File.png foo.pc so just a copy an existing file and edit as required (probably Libs: and CFlags:, maybe Name:, too).
edit File.png freebsd6-config-dist.py or File.png freebsd7-config-dist.py
use context.env.Append() to add search paths either with CPPPATH or LIBPATH.