Building the scriptbasic compiler from source

From ScriptBasic
Jump to: navigation, search

Building the ScriptBasic package from source

Make the build directory current

mkdir ~/build/scriba
cd ~/build/scriba

Move the source tarball and patches to the build directory

mv ~/download/scriba-v2.0b0-source.tar.gz ./
mv ~/download/

Extract the source tarball

gunzip scriba-v2.0b0-source.tar.gz
tar xf scriba-v2.0b0-source.tar

Change the source file permissions to allow updates

chmod u+w memory.c
chmod u+w memory.h
chmod u+w commands/function.c
chmod u+w mt/interface.c

Extract the patch files


Remove the binary patches

rm -rf gcc4_fix/exe
rm mt/

Apply the patch files

mv gcc4_fix/memory.c ./
mv gcc4_fix/memory.h ./
mv gcc4_fix/commands/function.c ./commands/
mv gcc4_fix/mt/interface.c ./mt/

Remove the cruft files

rm -rf gcc4_fix
rm -rf scriba-v2.0b0-source.tar

Installing the module

It is necessary to install the module in order to compile the source code. This must be done with appropriate privileges:

mkdir /usr/local/lib/site_perl
perl -i

Enter a fakeroot environment for the source build


Compile the scriptbasic package


Note: various errors may occur during the build process. These are related to optional modules, and can be ignored.

Exit the fakeroot environment


Gain root privileges

You will need to gain appropriate privileges to install the interpreter and support libraries.


Install the scriptbasic interpreter

cp bin/exe/scriba /usr/bin

Install the scriptbasic runtime libraries

mkdir /usr/lib/scriba
cp bin/lib/*.a /usr/lib/scriba/

Drop root privileges