Monday, 6 December 2010

Updated BLFS Packages - GTK

The reason for this update is two fold. Firstly I have nearly finished a stand alone post incorporating all the libraries, languages and programs that I found the applications I wanted to install (Firefox, OpenOffice et al) had as dependencies. If these are all installed in a one-er it makes it easier to go on and install the applications AND it makes it easier to update one post when there are version changes. Secondly, so much time had passed between my original post on GTK that that version was out of date. So, I need to bring GTK up to date. I will just be updating the All In One post, all the explanations set out in full in the main post still apply, but do not need to be rehearsed here.

So, the current installation idea is: Configuration, Toolchain, Actual Build, Hardware, Xorg, GTK, Shared Prerequisites, Desktop, and finally applications. Here is the new GTK. I had to go beyond BLFS and upgrade Glib and GTK+2 because they just did not work. In addition, Firefox in particular wanted the latest version of Cairo available, so I had to upgrade it, which meant that the Pixman version installed with Xorg was no longer good enough, so that needed updated as well. The latest version of GTK+2 wanted an updated pixbuf package, which I think used to be incorporated in GTK+2.

mkdir /sources/desktop
cd /sources/desktop
wget http://www.ijg.org/files/jpegsrc.v7.tar.gz
wget http://download.osgeo.org/libtiff/tiff-3.9.4.tar.gz
wget http://downloads.sourceforge.net/pcre/pcre-8.10.tar.bz2
wget http://cairographics.org/releases/pixman-0.21.2.tar.gz
wget http://cairographics.org/releases/cairo-1.10.0.tar.gz
wget http://ftp.gnome.org/pub/gnome/sources/glib/2.27/glib-2.27.3.tar.bz2
wget http://ftp.gnome.org/pub/gnome/sources/pango/1.28/pango-1.28.1.tar.bz2
wget http://ftp.gnome.org/pub/gnome/sources/atk/1.30/atk-1.30.0.tar.bz2
wget http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.22/gdk-pixbuf-2.22.1.tar.bz2
wget http://ftp.gnome.org/pub/gnome/sources/gtk+/2.22/gtk+-2.22.1.tar.bz2

cd /dev/shm

tar -xzvf /sources/desktop/jpegsrc.v7.tar.gz
cd jpeg-7
./configure --prefix=/usr --enable-static --enable-shared
make
make install
cd ..
rm -rf jpeg-7
ldconfig

tar -xzvf /sources/desktop/tiff-3.9.4.tar.gz
cd tiff-3.9.4
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf tiff-3.9.4

tar -xjvf /sources/desktop/pcre-8.10.tar.bz2
cd pcre-8.10
./configure --prefix=/usr --docdir=/usr/share/doc/pcre-8.10 --enable-utf8 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2
make $CORES_TO_USE
make install
mv -v /usr/lib/libpcre.so.* /lib/
ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
cd ..
rm -rvf pcre-8.10

tar -xzvf /sources/desktop/pixman-0.21.2.tar.gz
cd pixman-0.21.2
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf pixman-0.21.2

tar -xzvf /sources/desktop/cairo-1.10.0.tar.gz
cd cairo-1.10.0
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf cairo-1.10.0

tar -xjvf /sources/desktop/glib-2.27.3.tar.bz2
cd glib-2.27.3
./configure --prefix=/usr --with-pcre=system
make $CORES_TO_USE
make $CORES_TO_USE install
cat > /etc/profile.d/glib2-locale.sh << "EOF"
# Use the current locale charset for filenames
# in applications using GLib
export G_FILENAME_ENCODING=@locale
EOF
cd ..
rm -rvf glib-2.27.3

tar -xjvf /sources/desktop/pango-1.28.1.tar.bz2
cd pango-1.28.1
./configure --prefix=/usr --sysconfdir=/etc
make $CORES_TO_USE
make install
cd ..
rm -rvf pango-1.28.1

tar -xjvf /sources/desktop/atk-1.30.0.tar.bz2
cd atk-1.30.0
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf atk-1.30.0

tar -xjvf /sources/desktop/gdk-pixbuf-2.22.1.tar.bz2
cd gdk-pixbuf-2.22.1
./configure --prefix=/usr
make $CORES_TO_USE
make install
cd ..
rm -rvf gdk-pixbuf-2.22.1

tar -xjvf /sources/desktop/gtk+-2.22.1.tar.bz2
cd gtk+-2.22.1
./configure --prefix=/usr --sysconfdir=/etc &&
make $CORES_TO_USE
make install &&
install -v -m755 -d /usr/share/doc/gtk+-2.22.1/{faq,tutorial} &&
cp -v -R docs/faq/html/* /usr/share/doc/gtk+-2.22.1/faq &&
cp -v -R docs/tutorial/html/* /usr/share/doc/gtk+-2.22.1/tutorial &&
install -v -m644 docs/*.txt /usr/share/doc/gtk+-2.22.1
cd ..
rm -rvf gtk+-2.22.1

Version 2.22 of gtk+2 has problems with icons. In particular you need to install some icons to fill in some blanks. The easiest way to sort this is to install the gnome icon theme. We first of all need a program to make the theme names backwards compatible. Don't really know what this is about, but it also needs another XML::Type of Thing.

cd /sources/dependencies
wget http://cpan.org/authors/id/G/GR/GRANTM/XML-Simple-2.18.tar.gz
wget http://tango.freedesktop.org/releases/icon-naming-utils-0.8.90.tar.bz2
wget http://ftp.gnome.org/pub/gnome/sources/gnome-icon-theme/2.30/gnome-icon-theme-2.30.3.tar.bz2

cd /dev/shm

tar -xzvf /sources/dependencies/XML-Simple-2.18.tar.gz
cd XML-Simple-2.18
perl Makefile.PL
make $CORES_TO_USE
make install
cd ..
rm -rvf XML-Simple-2.18

tar -xjvf /sources/dependencies/icon-naming-utils-0.8.90.tar.bz2
cd icon-naming-utils-0.8.90
./configure --prefix=/usr --libexecdir=/usr/lib/icon-naming-utils &&
make $CORES_TO_USE
make install
cd ..
rm -rvf icon-naming-utils-0.8.90

tar -xjvf /sources/dependencies/gnome-icon-theme-2.30.3.tar.bz2
cd gnome-icon-theme-2.30.3
./configure --prefix=/usr &&
make $CORES_TO_USE
make install
cd ..
rm -rvf gnome-icon-theme-2.30.3

You then need to create a configuration file for gtk to point it to the new icons we just installed.

cat > ~/.gtkrc-2.0 << "EOF"
gtk-icon-theme-name="gnome"
EOF

No comments:

Post a Comment