This is an old revision of the document!
Table of Contents
Compile on FreeBSD
This guide was tested on clean installation of FreeBSD 7.2.
Everything is done from command line, that means everything can be done over ssh on remote server.
In my case was only base system installed, that means after startup and login i was already in command line and working directory was my home directory.
If you are not in command line then you need to go here some way (ie if gnome is installed then open terminal).
1. Prerequisites.
To download PtokaX and TinyXml source you need wget.
For PtokaX compile you need gmake (tool controlling executable generation from sources) and Lua (programming language used for scripting).
They can be installed using package manager (Note: to install packages using package manager you need root permissions).
- a. Wget
Install it with command: pkg_add -r wget - b. Gmake
Install it with command: pkg_add -r gmake - c. Lua 5.1
Install it with command: pkg_add -r lua51
2. Downloading source and compile.
- a. PtokaX source
Download it with command: wget http://www.czdc.org/PtokaX/0.4.2.0-nix-src.tgz
Unpack downloaded archive with command: tar -xf 0.4.2.0-nix-src.tgz
Now we have in actual directory new dir PtokaX. Go to that directory with command: cd PtokaX - b. TinyXml source
TinyXml is library used by PtokaX for reading and writing xml files.
Download TinyXml with command: wget http://downloads.sourceforge.net/project/tinyxml/tinyxml/2.6.2/tinyxml_2_6_2.tar.gz
Unpack downloaded archive with command: tar -xf tinyxml_2_6_2.tar.gz - c. TinyXml compile
Go to TinyXml directory with command: cd tinyxml
Compile TinyXml with command: gmake
Return back to PtokaX directory with command: cd .. - d. PtokaX compile
PtokaX makefile need three changes.
Open makefile with command: vim makefile
Search for this line INCLUDE = -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1 and change it to INCLUDE = -Itinyxml/src -I/usr/include -I/usr/local/include -I/usr/local/include/lua51 -I/usr/include/lua5.1 -I/usr/pkg/include -I/usr/include/lua -I/usr/include/lua/5.1
Search for this line $(CXX) -lpthread -lz -llua5.1 -lrt -o PtokaX \ and change it to $(CXX) -lpthread -lz -lrt -o PtokaX \
Search for this line $(CURDIR)/tinyxml/tinyxml.a and change it to $(CURDIR)/tinyxml/tinyxml.a /usr/local/lib/lua51/liblua.a
Now you can finally compile PtokaX with command: gmake