This section describes how to compile the GTK+ library and necessary dependencies.
Content
libiconv is a text encoding library.
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/libiconv-1.15.tar.gz && \ cd libiconv-1.15 && \ ./configure --prefix=${LOCALDESTDIR} --docdir=${LOCALDESTDIR}/share/doc/libiconv-1.15 && \ make && \ make install
gettext is a tool for localizing and translating programs.
Build and install the gettext runtime by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/gettext-0.19.8.tar.gz && \ mv gettext-0.19.8 gettext-0.19.8-runtime && \ cd gettext-0.19.8-runtime && \ cat gettext-tools/woe32dll/gettextlib-exports.c | grep -v rpl_opt > gettext-tools/woe32dll/gettextlib-exports.c.new && \ mv gettext-tools/woe32dll/gettextlib-exports.c.new gettext-tools/woe32dll/gettextlib-exports.c && \ CFLAGS="-mms-bitfields -mthreads -O2" ./configure --prefix=${LOCALDESTDIR} --enable-threads=win32 --enable-relocatable && \ cd gettext-runtime && \ make && \ make install
Build and install the gettext tools by executing the following commands:
cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/gettext-0.19.8.tar.gz && \ mv gettext-0.19.8 gettext-0.19.8-static && \ cd gettext-0.19.8-static && \ CFLAGS="-mms-bitfields -mthreads -O2" ./configure --prefix=${LOCALDESTDIR} --enable-threads=win32 --enable-relocatable --disable-shared && \ make && \ install gettext-tools/src/msgfmt.exe ${LOCALDESTDIR}/bin && \ install gettext-tools/src/msgmerge.exe ${LOCALDESTDIR}/bin && \ install gettext-tools/src/xgettext.exe ${LOCALDESTDIR}/bin
References:
ICU are the International Components for Unicode.
Build and install ICU by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget --no-check-certificate -c http://download.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.tgz && \ cd ${LOCALBUILDDIR} && \ tar zxf ${LOCALSOURCEDIR}/icu4c-58_2-src.tgz && \ mv icu icu4c-58_2 && \ cd icu4c-58_2 && \ cd source && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
References:
libffi is a a portable foreign function interface library.
Build and install libffi by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar zxf ${LOCALSOURCEDIR}/libffi-3.2.1.tar.gz && \ cd libffi-3.2.1 && \ sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \ -i include/Makefile.in && sed -e '/^includedir/ s/=.*$/=@includedir@/' \ -e 's/^Cflags: -I${includedir}/Cflags:/' \ -i libffi.pc.in && ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
References:
glib is a low-level core library that forms the basis of GTK+.
Build and install glib by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.acc.umu.se/pub/gnome/sources/glib/2.52/glib-2.52.2.tar.xz && \ cd ${LOCALBUILDDIR} && \ tar xJf ${LOCALSOURCEDIR}/glib-2.52.2.tar.xz && \ cd glib-2.52.2 && \ ./configure --prefix=${LOCALDESTDIR} --with-pcre=internal --enable-debug=no --disable-gtk-doc && \ make && \ make install
pkg-config is a helper tool used when compiling applications and libraries.
This build will replace the static binary we installed earlier.
Build and install pkg-config by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c --no-check-certificate http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/pkg-config-0.29.2.tar.gz && \ cd pkg-config-0.29.2 && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
Freetype is a library for rendering TrueType fonts.
Build and install freetype by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://download.savannah.gnu.org/releases/freetype/freetype-2.8.tar.bz2 && \ wget -c http://ingar.satgnu.net/devenv/mingw32/files/patches/freetype-2.8-config.patch && \ cd ${LOCALBUILDDIR} && \ tar xjf ${LOCALSOURCEDIR}/freetype-2.8.tar.bz2 && \ mv freetype-2.8 freetype-2.8-without-harfbuzz && \ cd freetype-2.8-without-harfbuzz && \ patch -Np0 -i ${LOCALSOURCEDIR}/freetype-2.8-config.patch && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
Command explanation:
Harfbuzz is een OpenType text shaping engine.
Build and install libffi by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c --no-check-certificate http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.4.6.tar.bz2 && \ cd ${LOCALBUILDDIR} && \ ( tar jxf ${LOCALSOURCEDIR}/harfbuzz-1.4.6.tar.bz2 || exit 0 ) && \ cd harfbuzz-1.4.6 && \ ./configure --prefix=${LOCALDESTDIR} --with-gobject && \ make && \ make install
Command explanation:
At this point you need to build freetype a second time, to work around a circular dependency between harfbuzz and freetype.
cd ${LOCALSOURCEDIR} && \ wget -c http://download.savannah.gnu.org/releases/freetype/freetype-2.8.tar.bz2 && \ wget -c http://ingar.satgnu.net/devenv/mingw32/files/patches/freetype-2.8-config.patch && \ wget -c http://ingar.satgnu.net/devenv/mingw32/files/patches/freetype-2.8-config-harfbuzz.patch && \ cd ${LOCALBUILDDIR} && \ tar xjf ${LOCALSOURCEDIR}/freetype-2.8.tar.bz2 && \ cd freetype-2.8 && \ patch -Np0 -i ${LOCALSOURCEDIR}/freetype-2.8-config.patch && \ patch -Np0 -i ${LOCALSOURCEDIR}/freetype-2.8-config-harfbuzz.patch && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
If you need the SDL2_ttf library, you can build it now.
expat is an XML parsing library.
Build and install expat by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget --no-check-certificate -c https://downloads.sourceforge.net/project/expat/expat/2.2.0/expat-2.2.0.tar.bz2 && \ cd ${LOCALBUILDDIR} && \ tar xjf ${LOCALSOURCEDIR}/expat-2.2.0.tar.bz2 && \ cd expat-2.2.0 && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
libxml2 is an XML parsing library.
Build and install libxml2 by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/libxml2-2.9.4.tar.gz && \ cd libxml2-2.9.4 && \ ./configure --prefix=${LOCALDESTDIR} --with-zlib=${LOCALDESTDIR} --without-python --without-debug && \ make && \ make install
Configuration options:
libxslt extends libxml2 with support for XSLT files.
Build and install libxslt by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://xmlsoft.org/sources/libxslt-1.1.29.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/libxslt-1.1.29.tar.gz && \ cd libxslt-1.1.29 && \ autoreconf -fi && \ ./configure --prefix=${LOCALDESTDIR} --without-python --without-debug && \ make && \ make install
Command explanation:
Gperf generates a perfect hash function from a key set.
Build and install gperf by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c --no-check-certificate http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/gperf-3.1.tar.gz && \ cd gperf-3.1 && \ ./configure --prefix=${LOCALDESTDIR} --docdir=${LOCALDESTDIR}/share/doc/gperf-3.1 && \ make && \ make install
fontconfig is a library for font customization and configuration.
Build and install fontconfig by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c --no-check-certificate http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.3.tar.gz && \ wget -c http://ingar.satgnu.net/devenv/mingw32/files/patches/fontconfig-2.12.3-size_t.patch && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/fontconfig-2.12.3.tar.gz && \ cd fontconfig-2.12.3 && \ patch -Np1 -i ${LOCALSOURCEDIR}/fontconfig-2.12.3-size_t.patch && \ ./configure --prefix=${LOCALDESTDIR} --enable-libxml2 --disable-docs && \ make && \ make install
pixman is a low-level pixel manipulation library.
Build and install pixman by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget --no-check-certificate -c http://cairographics.org/releases/pixman-0.34.0.tar.gz && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/pixman-0.34.0.tar.gz && \ cd pixman-0.34.0 && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
cairo is a 2d graphics library.
Build and install cairo by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget --no-check-certificate -c http://cairographics.org/releases/cairo-1.14.8.tar.xz && \ cd ${LOCALBUILDDIR} && \ tar xJf ${LOCALSOURCEDIR}/cairo-1.14.8.tar.xz && \ cd cairo-1.14.8 && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
pango is a text rendering library.
Build and install pango by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.gnome.org/pub/gnome/sources/pango/1.40/pango-1.40.6.tar.xz && \ cd ${LOCALBUILDDIR} && \ tar xJf ${LOCALSOURCEDIR}/pango-1.40.6.tar.xz && \ cd pango-1.40.6 && \ ./configure --prefix=${LOCALDESTDIR} --with-included-modules=yes --disable-debug --disable-gtk-doc && \ make && \ make install
Configuration options:
atk is the gnome accessibility toolkit.
Build and install atk by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.gnome.org/pub/gnome/sources/atk/2.24/atk-2.24.0.tar.xz && \ cd ${LOCALBUILDDIR} && \ tar xJf ${LOCALSOURCEDIR}/atk-2.24.0.tar.xz && \ cd atk-2.24.0 && \ ./configure --prefix=${LOCALDESTDIR} && \ make && \ make install
GdkPixBuf provides pixel buffer and rendering functions.
Build and install GdkPixBuf by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.6.tar.xz && \ cd ${LOCALBUILDDIR} && \ tar xJf ${LOCALSOURCEDIR}/gdk-pixbuf-2.36.6.tar.xz && \ cd gdk-pixbuf-2.36.6 && \ ./configure --prefix=${LOCALDESTDIR} --with-included-loaders=yes \ --without-libjasper --disable-debug && \ make && \ make install
Configuration options::
gtk2 is an application framework library.
Build and install gtk2 by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.31.tar.xz && \ cd ${LOCALBUILDDIR} && \ tar xJf ${LOCALSOURCEDIR}/gtk+-2.24.31.tar.xz && \ cd gtk+-2.24.31 && \ ./configure --prefix=${LOCALDESTDIR} --with-gdktarget=win32 --with-included-immodules=ime --disable-debug --disable-gtk-doc && \ rm gtk/gtk.def && \ make && \ make install
Configuration options:
Command explanation:
At this point, you should test your gtk installation. The pixbuf-demo demonstrates image capabilities.
cd demos ./pixbuf-demo
You should see a window with rotating icons.
The gtk-demo demonstrates gtk2 widgets:
cd gtk-demo gtk-demo
References:
gtkglext is an opengl extension for gtk2
gtkglext does not build without patching, the patch provided is from the arch linux gtkglext package.
Build and install gtkglext by executing the following commands:
cd ${LOCALSOURCEDIR} && \ wget -c --no-check-certificate https://downloads.sourceforge.net/gtkglext/gtkglext-1.2.0.tar.gz && \ wget -c http://ingar.satgnu.net/devenv/mingw32/files/patches/gtkglext-1.2.0-gtk-2.20.patch && \ cd ${LOCALBUILDDIR} && \ tar xzf ${LOCALSOURCEDIR}/gtkglext-1.2.0.tar.gz && \ cd gtkglext-1.2.0 && \ patch -Np1 -i ${LOCALSOURCEDIR}/gtkglext-1.2.0-gtk-2.20.patch && \ cat configure | sed 's/pangox/pangowin32/' > configure.new && \ mv configure.new configure && \ ./configure --prefix=${LOCALDESTDIR} --with-gdktarget=win32 --enable-debug=no && \ make && \ make install && \ cd examples && \ make wglinfo.exe && \ install wglinfo.exe ${LOCALDESTDIR}/bin
Command explanation:
Build and install the wglinfo program:
cd examples make wglinfo.exe install wglinfo.exe ${LOCALDESTDIR}/bin