Google recently open-sourced the Google Gadgets framework for Linux (http://code.google.com/p/google-gadgets-for-linux/). As is most Google products, this is still in beta, so the installation experience on my Fedora 9 machine wasn't exactly smooth. But the quirks were easy to iron out.
The only dependency not available in the official repos is the SpiderMonkey library. Follow these steps to compile SpiderMonkey 1.7 on your machine.
Grab the source tarball and extract the contents.
tar xvf js-1.7.0.tar.gz
By default the build options for SpiderMonkey is set to create a debug version. Since I am not planning to use SpiderMonkey for development purposes, I compiled an optimized version of the library.
make -f Makefile.ref BUILD_OPT=1
If the compilation was successful, a folder titled Linux_ALL_OPT.OBJ will be created in the src directory. To test whether everything is working fine type:
You should see an output similar to the following:
A number is 'perfect' if it is equal to the sum of its
divisors (excluding itself).
The perfect numbers up to 500 are:
6 = 1 + 2 + 3
28 = 1 + 2 + 4 + 7 + 14
496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248
Create the following symbolic links for ease.
sudo ln -s Linux_ALL_OPT.OBJ/libjs.so /usr/lib/libjs.so
ln -s Linux_All_OPT.OBJ/jsautocfg.h
ln -s Linux_All_OPT.OBJ/jsautokw.h
SpiderMonkey is now ready for Google Gadgets.
Installing Google Gadgets
The public release of Google Gadgets threw up a lot of compilation errors at me. Most of them were trivial and I could fix them with single edits to the source files, but soon things got really ugly. Since I didn't want to spend time reading and understanding the WHOLE code base, I decided to grab the SVN source in the hopes that most of the bugs were fixed. It turns out I was right !
Grab the sources.
svn checkout http://google-gadgets-for-linux.googlecode.com/svn/trunk/ google-gadgets-for-linux-read-only
Setup the build environment.
cp /usr/share/automake-1.10/mkinstalldirs ./libltdl/
Run configure with the path to SpiderMonkey sources. I also disabled QT elements because I primarily use Gnome.
./configure --with-smjs-incdir=~/bin/spidermonkey/js/src --disable-libggadget-qt --disable-qt-system-framework --disable-qtwebkit-browser-element --disable-qt-host
Make and install.
make && sudo make install
Run GoogleGadgets !