HowTo:Install POV

From POV-Wiki
Revision as of 10:58, 2 January 2021 by Maurice (talk | contribs) (mixed wrappable code with <pre> since <source> tag seem a no-wrap)
Jump to navigation Jump to search
Termux

Below is what was tried and finally used (# is a comment sign) ...to compile some unofficial and official POV-Ray 3.8 for Termux on an armv7 achitecture, (32bits) of the Samsung Galaxy note 3 (both N900A and N9005, respectively with android 5 and 10): Android versions below 7 do not have X11 repo available and therefore no libxpm. Using --without-x is thus necessary for these versions ...But more recent terminals using android v 7 and above are welcome to remove and test for some way to have the X/sdl based preview working...!

termux-setup-storage
 
#pkg install x11-repo #no more needed --without-x, theoretically the below libxpm neither
pkg upgrade
pkg install -y libllvm clang autoconf automake boost imagemagick git pkg-config #libxpm #sdl
git clone https://github.com/POV-Ray/povray.git 

or to use HGPovray branch, replace the last line with:

git clone https://github.com/LeForgeron/povray.git

then, get into the directory

cd /data/data/com.termux/files/home/povray/unix/
bash prebuild.sh
cd ../
 
#--disable-shared creates a portable app with included libraries
#--without-openexr is advised to create non-redistributable only, 
# so we still need to find a Termux package with this library.
# also add -libsdl to LIBS flag when testing for the preview display... 
# remove --without-x in case the above works
./configure COMPILED_BY="your name <email@address>" --without-x --disable-io-restrictions LIBS="-lboost_system -lboost_thread" CXX=clang++ CC=clang CFLAGS="-mcpu=native" CXXFLAGS="-mcpu=native"#--disable-shared for portable version

then (the"check" is optional):

make check 

the biscuit + coffee render fine.

When trying

make install

something's wrong with permissions so more work is required.

(DON'T FORGET TO REPLACE your name <email@address> WITH YOUR NAME AND EMAIL) Termux does not follow Filesystem Hierarchy Standard unlike majority of Linux distributions. You cannot find directories like /bin, /etc, /usr, /tmp and others at usual location. Thus, all programs should be patched and recompiled to meet requirements of the Termux environment otherwise they will not be able to find their configuration files or other data. In the case of POV, This limitation is not a show stopper, since command line accepts all the needed arguments. But please do share if you know what (probably small) modification would allow the "make install" to work. Meanwhile a command to launch a render from povray folder working directory looks like this, outputting image to (dcim) camera gallery:

./unix/povray +I./distribution/scenes/advanced/grenadine/grenadine.pov +W1080 +H1920 +Fj +L./include +L./distribution/scenes/advanced/grenadine +O$HOME/storage/dcim/grenadine