How I made an octave sfs for Precise Puppy

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
Uten
Posts: 129
Joined: Tue 29 Jan 2008, 11:00

How I made an octave sfs for Precise Puppy

#1 Post by Uten »

I have had some trouble getting octave working with precise-5.7.1

This is how I finally managed.

1: Update package manager with the latest package information.
2: Select octave3.2_3.2.4-12
When asked examine dependencies.
When asked hit the download-only selected packages.
3: Then do the same for gnuplot_4.4.3

At this point I created a folder to be the base of my new octave-3.2.sfs

Code: Select all

# mkdir /mnt/sda1/octave-3.2
All the downloaded packages are at this point in /root.
Open a terminal and issue the commands

Code: Select all

#cd ~ 
# for f in *.deb; do echo $f; dpkg-deb -x $f /mnt/sda1/octave-3.2/ ; done
The folder /mnt/sda1/octave-3.2/usr/lib/i386-linux-gnu has to be converted to a link to its root folder to follow puppylinux folder structure.

Code: Select all

# mv /mnt/sda1/octave-3.2/usr/lib/i386-linux-gnu/** /mnt/sda1/octave-3.2/usr/lib/
# cd /mnt/sda1/octave-3.2/usr/lib/
# rm -r -f i386-linux-gnu
# ln -s ./ i386-linux-gnu

# cd /mnt/sda1/
We need a bootstrap script to start octave to make it pick up lapack and blas libraries. There should probably be a script to merge existsing ones with this information.

Code: Select all

# mkdir -p /mnt/sda1/octave/root/my-applications
# echo '#!/bin/sh' >> /mnt/sda1/octave-3.2/root/my-applications/bin/ocatve
# echo 'export LD_LIBRARY_PATH=/usr/lib/libblas:/usr/lib/lapack:/usr/lib/i386-linux-gnu:\$LD_LIBRARY_PATH' >> /mnt/sda1/octave-3.2/root/my-applications/bin/octave
echo 'octave3.2' >>/mnt/sda1/octave-3.2/root/my-applications/bin/octave
Now we can make the sfs file

Code: Select all

# cd /mnt/sda1
# dir2sfs octave-3.2
This results in the file: octave-3.2_5.7.1.sfs and octave-3.2_5.7.1.sfs.md5.txt

Now that all is done we load the sfs file. I usually just click on it in rox.
Then in a terminal window we issue the command

Code: Select all

# octave
This should give you a octave command prompt.
The we do a simple test.
[octave]#octave3.2:1>x=linspace(0,2*pi,100);
#octave3.2:1>y=sin(x);
#octave3.2:1>plot(x,y);[/octave]

Witch should pop up a plot with a sine wave in it.

Disclaimer: I have only tested this against anything but a ram only session. I have not tested octave throughly to se if all libraries are accessible.

EDIT: 07 Nov 2014: Discovered some minor bugs in the listed code.
Last edited by Uten on Fri 07 Nov 2014, 15:32, edited 1 time in total.

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

Re: How I made an octave sfs for Precise Puppy

#2 Post by Moose On The Loose »

Uten wrote:I have had some trouble getting octave working with precise-5.7.1
I have found a few things that help in using Octave:

1) I made a symbolic link to the fonts and did this:

Code: Select all

putenv("GDFONTPATH","/root/TTF");
putenv("GNUPLOT_DEFAULT_GDFONT","DejaVuSans-Bold.ttf");
set (0, "defaultaxesfontname", "/root/TTF/DejaVuSans-Bold.ttf");
set (0, "defaulttextfontname", "/root/TTF/DejaVuSans-Bold.ttf");
set (0, "defaultaxesfontsize", 8);
set (0, "defaulttextfontsize", 8);
This makes the printed png files use the font I wanted so I can print like this:

Code: Select all

  set(gcf,"papersize",[3,5])
  set(gcf,"paperposition",[0.05,0.05,4,4])
    
  print(FName,"-dpng");

User avatar
Uten
Posts: 129
Joined: Tue 29 Jan 2008, 11:00

#3 Post by Uten »

Thanks for the tip moose.

Any reason you cant use a direct reference to /usr/share/default/TTF/DejaVuSans-Bold.ttf?

I take it that the settings are placed in ~/.actaverc?

Just to clarify, my problems with octave on precise was related to conflicting libraries.

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#4 Post by Moose On The Loose »

Uten wrote:Thanks for the tip moose.

Any reason you cant use a direct reference to /usr/share/default/TTF/DejaVuSans-Bold.ttf?
Reasons:
1) There is no such path on 5.2.8 :wink:
2) /usr/share/fonts/default/TTF/DejeVuSans-Bold.ttf seemed not to work. I think there is a length limit.

I take it that the settings are placed in ~/.actaverc?
I always put them right in the main file so that it is all carried to work or home in one file.
Just to clarify, my problems with octave on precise was related to conflicting libraries.
Such is the crabgrass of life.

Post Reply