All of the components of Sphere, except the video drivers, are compiled as static libraries, which are then compiled directly into the resulting executable. The video drivers are explicitly opened by the engine--the path 'system/video' is hardcoded into the engine.
That means all you need to do is copy the entire Sphere directory, and it will still work on Linux. Since we couldn't get the unix static library in Sphere to link properly to SDL, now libunix is a shared library. It needs to be installed properly somewhere. Normally, it wouldn't matter where Sphere was running from.
Since Audiere and Corona already have proper installation methods on Unix, and (ideally) Sphere doesn't need to be installed in any particular way, the last bit would be the ancient JS library. This should
definitely be handled with a ld conf file in the final build or installation method. conf files are how programs get away with using directories in the lib folder on Linux. That's how I handle libconfigmanager, libgraphic, and t5 in TurboSphere (and I recommend it for V8, although Chrom(ium) statically links, and Node is a million years behind in versions, so either it wouldn't matter or it would break everything anyway).
Here's how you do it. You need to be root for every step.
First,
check if there is already a file '/etc/ld.so.conf.d/engine.conf', or a folder /usr/lib/sphere. If there isn't, we're good to go. If there is, we need to change the names we will use to avoid a conflict.
Make a directory in /usr/lib. Say, /usr/lib/sphere. Put libjs.so (you don't need to do this since we already installed it, but you could put it there for organizational purposes if you wanted) and libunix.so in it. Then, make a file called '/etc/ld.so.conf.d/engine.conf', which contains in plain text '/usr/lib/sphere'. Then, run 'ldconfig'. If you've never run ldconfig, or haven't run it in a while, this can take a long time.
So (as root):
mkdir /usr/lib/sphere
cp ./libunix.so /usr/lib/sphere/libunix.so
echo '/usr/lib/sphere' > /etc/ld.so.conf.d/engine.conf
ldconfig
This makes the path /usr/lib/sphere 'hot', meaning any library there can be used by any executable. To undo that, just delete /etc/ld.so.conf.d/engine.conf, and run ldconfig again. Which you might need to do if some other program installed something called 'libunix.so', and it was getting Sphere's library instead of its own.
Scons can, in fact, do all this. I do these steps in TurboSphere's SConstruct file.