Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Dec 2014, 23:00
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How I made an octave sfs for Precise Puppy
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Uten

Joined: 29 Jan 2008
Posts: 53

PostPosted: Fri 10 Jan 2014, 02:35    Post_subject:  How I made an octave sfs for Precise Puppy
Sub_title: octave 3.2 on precise 5.7.1
 

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:
# mkdir /mnt/sda1/octave-3.2

All the downloaded packages are at this point in /root.
Open a terminal and issue the commands
Code:
#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:
# 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:
# 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:
# 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:
# 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.

Edited_time_total
Back to top
View user's profile Send_private_message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 547

PostPosted: Fri 10 Jan 2014, 12:04    Post_subject: Re: How I made an octave sfs for Precise Puppy
Sub_title: octave 3.2 on precise 5.7.1
 

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:

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:

  set(gcf,"papersize",[3,5])
  set(gcf,"paperposition",[0.05,0.05,4,4])
   
  print(FName,"-dpng");
Back to top
View user's profile Send_private_message 
Uten

Joined: 29 Jan 2008
Posts: 53

PostPosted: Mon 13 Jan 2014, 12:41    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 547

PostPosted: Tue 14 Jan 2014, 10:41    Post_subject:  

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.


Quote:

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.

Quote:

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


Such is the crabgrass of life.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0647s ][ Queries: 11 (0.0115s) ][ GZIP on ]