# Note: depends on pkg-config
# Note: depends on gtkglext
# Note: depends on gtkmm2
# Note: depends on pangomm
# Sorry about the mess, this package is just so outdated it requires extensive patching to work with non-ancient gtk+2/glib etc.
wget -c http://ftp.gnome.org/pub/GNOME/sources/gtkglextmm/1.2/gtkglextmm-1.2.0.tar.bz2
tar -xjf gtkglextmm-1.2.0.tar.bz2
cd gtkglextmm-1.2.0
sed -i -e '/glshapes/d;/gl_draw_/d;' gdkglext/gdkmm/gl/drawable.cc
sed -i -e 's/gdkglfont/gdk/;s/retvalue =/&(Glib::RefPtr<Pango::Font>)0;/;/gl_font/{s/.*//;n;s/.*//;n;s/.*//;}' gdkglext/gdkmm/gl/font.cc
sed -i -e '/value_type/,/}/d' gdkglext/gdkmm/gl/tokens.cc gdkglext/gdkmm/gl/config.cc
sed -i -e 's/#error .*/#undef GDKGLEXTMM_MULTIHEAD_SUPPORT/' configure
sed -i -e 's/-D\([^ ]*_DISABLE_DEPRECATED\)/-U\1/g' gdkglext/gdkmm/gl/Makefile.in
sed -i -e 's/-D\([^ ]*_DISABLE_DEPRECATED\)/-U\1/g' gtkglext/gtkmm/gl/Makefile.in
echo "CXXFLAGS += -DGLIBMM_DISABLE_DEPRECATED=1" >> gdkglext/gdkmm/gl/Makefile.in
mkdir -p build
cd build
../configure --prefix="/usr" --disable-maintainer-mode CXXFLAGS="-std=c++11"
make # Doesn't mind -j#
make install