summaryrefslogtreecommitdiff
path: root/staging
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2012-01-20 20:41:20 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2012-01-20 20:41:20 -0300
commit33fcf0e7b95e530b849e59e90fdea4001e01283d (patch)
tree5eab4f238207cce42c8351067ade9999df065a1f /staging
parent3b0910bf6527c3b761d9579b2ed37a9a42595fa3 (diff)
parenta1922d0ec660fdc1892f2783515f781c090df0a9 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/gnash/PKGBUILD community/libopenraw/PKGBUILD community/smalltalk/PKGBUILD core/coreutils/PKGBUILD core/libarchive/PKGBUILD extra/dhcp/PKGBUILD extra/gmime/PKGBUILD extra/gvfs/PKGBUILD extra/kdeutils/PKGBUILD extra/libreoffice/PKGBUILD extra/lirc/PKGBUILD extra/php-suhosin/PKGBUILD extra/qtwebkit/PKGBUILD extra/sdl_image/PKGBUILD extra/sdl_net/PKGBUILD extra/sdl_ttf/PKGBUILD extra/spamassassin/PKGBUILD extra/tftp-hpa/PKGBUILD extra/totem-plparser/PKGBUILD extra/tumbler/PKGBUILD extra/vim/PKGBUILD extra/wipe/PKGBUILD extra/xfce4-netload-plugin/PKGBUILD kde-unstable/kdebase-workspace/PKGBUILD kde-unstable/kdebase-workspace/kde-np.pam kde-unstable/kdebase-workspace/kde.pam multilib/binutils-multilib/PKGBUILD multilib/chuck/PKGBUILD multilib/dev86/PKGBUILD multilib/gcc-multilib/PKGBUILD multilib/jack2-multilib/PKGBUILD multilib/lib32-gdk-pixbuf2/PKGBUILD multilib/lib32-glib2/PKGBUILD multilib/lib32-glibc/PKGBUILD multilib/lib32-glibc/lib32-glibc.conf multilib/lib32-gtk2/PKGBUILD multilib/lib32-libpulse/PKGBUILD multilib/lib32-pango/PKGBUILD multilib/lib32-sdl_image/PKGBUILD multilib/lib32-sdl_ttf/PKGBUILD multilib/libtool-multilib/PKGBUILD multilib/nspluginwrapper/PKGBUILD multilib/q4wine/PKGBUILD multilib/wine/PKGBUILD staging/php/PKGBUILD staging/php/php-fpm.conf.in.patch staging/php/php.ini.patch
Diffstat (limited to 'staging')
-rw-r--r--staging/abiword/PKGBUILD80
-rw-r--r--staging/abiword/abiword-2.8.6-libpng15.patch100
-rw-r--r--staging/abiword/abiword-2.8.6-no-undefined.patch21
-rw-r--r--staging/abiword/abiword.install11
-rw-r--r--staging/abiword/compat_libwpg_0_9.patch371
-rw-r--r--staging/allegro/PKGBUILD36
-rw-r--r--staging/alsaplayer/PKGBUILD37
-rw-r--r--staging/alsaplayer/alsaplayer.install11
-rw-r--r--staging/amule/PKGBUILD44
-rw-r--r--staging/autopano-sift-c/PKGBUILD31
-rw-r--r--staging/cairo/PKGBUILD38
-rw-r--r--staging/cairo/cairo-1.10.0-buggy_gradients.patch13
-rw-r--r--staging/celestia/PKGBUILD50
-rw-r--r--staging/celestia/celestia-1.5.1-gcc44.patch20
-rw-r--r--staging/celestia/celestia-1.6.1-gcc46.patch13
-rw-r--r--staging/celestia/celestia-1.6.1-gentoo.patch23
-rw-r--r--staging/celestia/celestia-1.6.1-libpng15.patch14
-rw-r--r--staging/celestia/celestia-1.6.1-linking.patch54
-rw-r--r--staging/dvdauthor/PKGBUILD35
-rw-r--r--staging/dvdauthor/dvdauthor-0.7.0-libpng15.patch19
-rw-r--r--staging/enblend-enfuse/PKGBUILD39
-rw-r--r--staging/enblend-enfuse/enblend-4.0-libpng15.patch220
-rw-r--r--staging/enblend-enfuse/enblend-enfuse.install22
-rw-r--r--staging/enblend-enfuse/libpng-1.4.patch14
-rw-r--r--staging/fbida/PKGBUILD27
-rw-r--r--staging/feh/PKGBUILD29
-rw-r--r--staging/fltk/PKGBUILD62
-rw-r--r--staging/fltk/fltk-games.install11
-rw-r--r--staging/fltk/fltk.install12
-rw-r--r--staging/fontforge/PKGBUILD40
-rw-r--r--staging/fvwm/PKGBUILD33
-rw-r--r--staging/fvwm/fvwm.desktop7
-rw-r--r--staging/gd/PKGBUILD31
-rw-r--r--staging/gd/libpng14.patch12
-rw-r--r--staging/gdk-pixbuf2/PKGBUILD33
-rw-r--r--staging/gdk-pixbuf2/gdk-pixbuf2.install11
-rw-r--r--staging/gegl/PKGBUILD36
-rw-r--r--staging/gif2png/PKGBUILD36
-rw-r--r--staging/gif2png/gif2png-2.5.4-libpng15.patch43
-rw-r--r--staging/glhack/PKGBUILD54
-rw-r--r--staging/glhack/glhack-libpng15.patch11
-rw-r--r--staging/glhack/glhack.install24
-rw-r--r--staging/gmime/PKGBUILD32
-rw-r--r--staging/graphicsmagick/PKGBUILD55
-rw-r--r--staging/graphviz/LICENSE87
-rw-r--r--staging/graphviz/PKGBUILD51
-rw-r--r--staging/graphviz/install12
-rw-r--r--staging/grilo-plugins/PKGBUILD39
-rw-r--r--staging/gtkglext/PKGBUILD35
-rw-r--r--staging/gtkglext/gtk2.20.patch77
-rw-r--r--staging/hugin/PKGBUILD34
-rw-r--r--staging/hugin/hugin.install15
-rw-r--r--staging/imagemagick/PKGBUILD84
-rw-r--r--staging/imagemagick/perlmagick.rpath.patch10
-rw-r--r--staging/imlib/CAN-2004-1026.patch510
-rw-r--r--staging/imlib/PKGBUILD40
-rw-r--r--staging/imlib/aclocal-fixes.patch20
-rw-r--r--staging/imlib/debian-bug448360.patch92
-rw-r--r--staging/imlib/imlib-1.9.15-libpng15.patch142
-rw-r--r--staging/kdelibs3/PKGBUILD94
-rw-r--r--staging/kdelibs3/acinclude.patch66
-rw-r--r--staging/kdelibs3/kconf_updaterc2
-rwxr-xr-xstaging/kdelibs3/kde3.profile6
-rw-r--r--staging/kdelibs3/kde4-compatibility.patch1012
-rw-r--r--staging/kdelibs3/kdelibs3-missing-include.patch10
-rw-r--r--staging/kdelibs3/kdelibs3.install12
-rw-r--r--staging/kdelibs3/openssl.patch180
-rw-r--r--staging/lbreakout2/PKGBUILD44
-rw-r--r--staging/lbreakout2/lbreakout2.desktop10
-rw-r--r--staging/lbreakout2/lbreakout2.pngbin0 -> 1930 bytes
-rw-r--r--staging/lcms/PKGBUILD28
-rw-r--r--staging/lcms2/PKGBUILD27
-rw-r--r--staging/libgdiplus/PKGBUILD29
-rw-r--r--staging/libgdiplus/gdiplus-png14.patch20
-rw-r--r--staging/libgdiplus/libpng15.patch164
-rw-r--r--staging/libpano13/PKGBUILD27
-rw-r--r--staging/libpng/PKGBUILD41
-rw-r--r--staging/librsvg/PKGBUILD31
-rw-r--r--staging/librsvg/librsvg.install11
-rw-r--r--staging/libtiff/PKGBUILD33
-rw-r--r--staging/libunique3/PKGBUILD27
-rw-r--r--staging/libwmf/PKGBUILD40
-rw-r--r--staging/libwmf/libwmf-0.2.8.4-libpng-1.5.patch12
-rw-r--r--staging/libwmf/libwmf-0.2.8.4-useafterfree.patch10
-rw-r--r--staging/libwmf/libwmf.install13
-rw-r--r--staging/libxfcegui4/PKGBUILD38
-rw-r--r--staging/libxfcegui4/libxfcegui4.install14
-rw-r--r--staging/links/PKGBUILD47
-rw-r--r--staging/links/links.desktop7
-rw-r--r--staging/mail-notification/PKGBUILD85
-rw-r--r--staging/mail-notification/dont-update-cache.patch22
-rw-r--r--staging/mail-notification/mail-notification-5.4-add-fallback-icon.patch16
-rw-r--r--staging/mail-notification/mail-notification-5.4-camel_headers.patch36
-rw-r--r--staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch122
-rw-r--r--staging/mail-notification/mail-notification-5.4-evolution-gtkhtml.patch12
-rw-r--r--staging/mail-notification/mail-notification-5.4-evolution.patch244
-rw-r--r--staging/mail-notification/mail-notification-5.4-gmime.patch63
-rw-r--r--staging/mail-notification/mail-notification-5.4-gtk3-support.patch1416
-rw-r--r--staging/mail-notification/mail-notification-5.4-icons.patch39
-rw-r--r--staging/mail-notification/mail-notification-5.4-kde-trayicon.patch72
-rw-r--r--staging/mail-notification/mail-notification-5.4-libx11.patch13
-rw-r--r--staging/mail-notification/mail-notification-5.4-popup-attach.patch45
-rw-r--r--staging/mail-notification/mail-notification-5.4-sasl_encode64.patch24
-rw-r--r--staging/mail-notification/mail-notification-5.4-weak.patch11
-rw-r--r--staging/mail-notification/mail-notification.install24
-rw-r--r--staging/mail-notification/remove-ubuntu-special-case.patch33
-rw-r--r--staging/neverball/PKGBUILD47
-rw-r--r--staging/neverball/neverball-1.5.4-underlink.patch22
-rw-r--r--staging/qrencode/PKGBUILD30
-rw-r--r--staging/qt/PKGBUILD126
-rw-r--r--staging/qt/assistant.desktop9
-rw-r--r--staging/qt/designer.desktop11
-rw-r--r--staging/qt/linguist.desktop10
-rw-r--r--staging/qt/qt.install12
-rw-r--r--staging/qt/qtconfig.desktop10
-rw-r--r--staging/qt3/PKGBUILD133
-rw-r--r--staging/qt3/eastern_asian_languagues.diff39
-rw-r--r--staging/qt3/gcc-4.6.patch33
-rw-r--r--staging/qt3/mysql.patch47
-rw-r--r--staging/qt3/qt-copy-kde-patches.tar.bz2bin0 -> 31498 bytes
-rw-r--r--staging/qt3/qt-font-default-subst.diff77
-rw-r--r--staging/qt3/qt-odbc.patch19
-rw-r--r--staging/qt3/qt-patches.tar.bz2bin0 -> 3708 bytes
-rw-r--r--staging/qt3/qt.install12
-rw-r--r--staging/qt3/qt.profile4
-rw-r--r--staging/qt3/qt3-png15.patch212
-rw-r--r--staging/qt3/utf8-bug-qt3.diff101
-rw-r--r--staging/rrdtool/PKGBUILD35
-rw-r--r--staging/scim-anthy/PKGBUILD27
-rw-r--r--staging/scim-chewing/PKGBUILD28
-rw-r--r--staging/scim-tables/PKGBUILD27
-rw-r--r--staging/sox/PKGBUILD37
-rw-r--r--staging/sox/sox-14.3.2-ffmpeg.patch40
-rw-r--r--staging/totem-plparser/PKGBUILD29
-rw-r--r--staging/transfig/LICENSE23
-rw-r--r--staging/transfig/PKGBUILD37
-rw-r--r--staging/transfig/transfig-3.2.5d-libpng-1.5.patch39
-rw-r--r--staging/tumbler/PKGBUILD44
-rw-r--r--staging/vice/PKGBUILD35
-rw-r--r--staging/vice/vice-2.3-x11video.patch11
-rw-r--r--staging/windowmaker-crm-git/PKGBUILD36
-rw-r--r--staging/windowmaker-crm-git/libpng-1.4.patch12
-rw-r--r--staging/windowmaker-crm-git/wmaker.desktop5
-rw-r--r--staging/windowmaker/PKGBUILD34
-rw-r--r--staging/windowmaker/libpng-1.4.patch12
-rw-r--r--staging/windowmaker/windowmaker-gcc4.patch.tar.bz2bin0 -> 39677 bytes
-rw-r--r--staging/windowmaker/wmaker.desktop5
-rw-r--r--staging/wv/PKGBUILD29
-rw-r--r--staging/wv/fix-soname.patch14
-rw-r--r--staging/wxgtk/PKGBUILD37
-rw-r--r--staging/xaos/PKGBUILD28
-rw-r--r--staging/xaos/xaos-3.5-libpng15.patch131
-rw-r--r--staging/xaos/xaos.install20
-rw-r--r--staging/xfce4-datetime-plugin/PKGBUILD33
-rw-r--r--staging/xfce4-notes-plugin/PKGBUILD34
-rw-r--r--staging/xfce4-notes-plugin/xfce4-notes-plugin.install12
-rw-r--r--staging/xfce4-quicklauncher-plugin/PKGBUILD50
-rw-r--r--staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-desktop-file.patch10
-rw-r--r--staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-missing-english-translation.patch103
-rw-r--r--staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-multiscreen.patch27
-rw-r--r--staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-save-settings.patch12
-rw-r--r--staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-xfce4-settings-manager.patch11
-rw-r--r--staging/xfce4-sensors-plugin/PKGBUILD38
-rw-r--r--staging/xfce4-sensors-plugin/xfce4-sensors-plugin.install11
-rw-r--r--staging/xfig/LICENSE33
-rw-r--r--staging/xfig/PKGBUILD65
-rw-r--r--staging/xfig/xfig-3.2.4-redhat.patch31
-rw-r--r--staging/xfig/xfig-3.2.5-color-resources.patch39
-rw-r--r--staging/xfig/xfig-3.2.5-enable-Xaw3d.patch18
-rw-r--r--staging/xfig/xfig-3.2.5-fhs.patch12
-rw-r--r--staging/xfig/xfig-3.2.5-missing-protos.patch11
-rw-r--r--staging/xfig/xfig-3.2.5-urwfonts.patch79
-rw-r--r--staging/xfig/xfig-3.2.5b-fix-eps-reading.patch46
-rw-r--r--staging/xfig/xfig-3.2.5b-libpng-1.5.patch70
-rw-r--r--staging/xfig/xfig.3.2.5-modularX.patch28
-rw-r--r--staging/xfig/xfig.desktop47
-rw-r--r--staging/xfig/xfig.install11
-rw-r--r--staging/xine-ui/PKGBUILD44
-rw-r--r--staging/xine-ui/fix_lirc.diff13
-rw-r--r--staging/xine-ui/lirc-check-a89347673097.patch64
-rw-r--r--staging/xine-ui/lirc-makefile-a68dd15ff7ae.patch19
-rw-r--r--staging/xine-ui/xine-ui-0.99.6-libpng15.patch13
-rw-r--r--staging/xine-ui/xine-ui-xdg.diff206
-rw-r--r--staging/xine-ui/xine-ui.install13
-rw-r--r--staging/zvbi/PKGBUILD38
-rw-r--r--staging/zvbi/fix-includes.patch36
-rw-r--r--staging/zvbi/zvbi-0.2.33-libpng15.patch21
187 files changed, 10522 insertions, 0 deletions
diff --git a/staging/abiword/PKGBUILD b/staging/abiword/PKGBUILD
new file mode 100644
index 000000000..68ff94733
--- /dev/null
+++ b/staging/abiword/PKGBUILD
@@ -0,0 +1,80 @@
+# $Id: PKGBUILD 146946 2012-01-19 14:59:03Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Maël Lavault <moimael@neuf.fr>
+
+pkgbase=abiword
+pkgname=('abiword' 'abiword-plugins')
+pkgver=2.8.6
+pkgrel=7
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.abisource.com"
+makedepends=('pkgconfig' 'asio' 'boost' 'fribidi' 'goffice' 'libwmf' 'wv' 'link-grammar' 'gtkmathview'
+ 'aiksaurus' 'libxslt' 'enchant' 'libots' 'libwpg' 'librsvg' 'loudmouth' 'libsoup')
+options=('!makeflags' '!libtool')
+source=("http://www.abisource.com/downloads/${pkgbase}/${pkgver}/source/${pkgbase}-${pkgver}.tar.gz"
+ 'compat_libwpg_0_9.patch'
+ 'abiword-2.8.6-no-undefined.patch'
+ 'abiword-2.8.6-libpng15.patch')
+md5sums=('f883b0a7f26229a9c66fd6a1a94381aa'
+ '09446a2ebba8288fc611e88f7cf17298'
+ '42e2614b6e0aad457d91f6ce20b6f225'
+ '40e370e7e88c5437140ef18037abfbd3')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/compat_libwpg_0_9.patch"
+ # fix a gcc 4.6.x build issue, patch from Fedora
+ patch -Np1 -i "${srcdir}/abiword-2.8.6-no-undefined.patch"
+ patch -Np0 -i "${srcdir}/abiword-2.8.6-libpng15.patch"
+
+ libtoolize --force
+ autoreconf
+
+ ./configure --prefix=/usr \
+ --enable-clipart \
+ --enable-templates \
+ --enable-collab-backend-xmpp \
+ --enable-collab-backend-tcp \
+ --enable-collab-backend-service \
+ --disable-collab-backend-sugar \
+ --enable-plugins --without-gnomevfs \
+ --with-gio \
+ --with-goffice \
+ --disable-static \
+ --with-psiconv-config=/nothere
+ make
+}
+
+package_abiword() {
+ pkgdesc="A fully-featured word processor"
+ depends=('fribidi' 'wv' 'goffice' 'librsvg' 'enchant' 'desktop-file-utils')
+ install=$pkgname.install
+ optdepends=('abiword-plugins')
+ conflicts=("abiword-plugins<${pkgver}-${pkgrel}")
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ sed -i plugins/Makefile \
+ -e 's/ collab / /' \
+ -e 's/ wpg / /' \
+ -e 's/ wmf / /' \
+ -e 's/ grammar / /' \
+ -e 's/ mathview / /' \
+ -e 's/ aiksaurus / /' \
+ -e 's/ latex / /' \
+ -e 's/ ots / /' \
+ -e 's/ wordperfect / /'
+ make DESTDIR="${pkgdir}" install
+}
+
+package_abiword-plugins() {
+ pkgdesc="Additional plugins for Abiword"
+ depends=("abiword=${pkgver}-${pkgrel}" 'loudmouth' 'libwpg' 'libwmf' 'link-grammar'
+ 'gtkmathview' 'aiksaurus' 'libxslt' 'libsoup' 'libots' 'libgsf')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/plugins"
+ for dir in collab wpg wmf grammar mathview aiksaurus latex ots wordperfect; do
+ make -C ${dir} DESTDIR="${pkgdir}" install
+ done
+}
diff --git a/staging/abiword/abiword-2.8.6-libpng15.patch b/staging/abiword/abiword-2.8.6-libpng15.patch
new file mode 100644
index 000000000..7eded4c83
--- /dev/null
+++ b/staging/abiword/abiword-2.8.6-libpng15.patch
@@ -0,0 +1,100 @@
+$NetBSD: patch-plugins_bmp_xp_ie__impGraphic__BMP.cpp,v 1.1 2011/02/01 10:48:15 wiz Exp $
+
+Fix build with png-1.5.
+
+--- plugins/bmp/xp/ie_impGraphic_BMP.cpp.orig 2009-06-25 04:02:06.000000000 +0000
++++ plugins/bmp/xp/ie_impGraphic_BMP.cpp
+@@ -191,7 +191,10 @@ UT_Error IE_ImpGraphic_BMP::_convertGrap
+
+ /* Clean Up Memory Used */
+
+- FREEP(m_pPNGInfo->palette);
++ png_colorp palette;
++ int num_palette;
++ png_get_PLTE( m_pPNG, m_pPNGInfo, &palette, &num_palette );
++ FREEP(palette);
+ DELETEP(pBB);
+ png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+
+@@ -313,7 +316,7 @@ UT_Error IE_ImpGraphic_BMP::Initialize_P
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if (setjmp(m_pPNG->jmpbuf))
++ if (setjmp(png_jmpbuf(m_pPNG)))
+ {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+@@ -332,7 +335,7 @@ UT_Error IE_ImpGraphic_BMP::Initialize_P
+ UT_Error IE_ImpGraphic_BMP::Convert_BMP_Pallet(UT_ByteBuf* pBB)
+ {
+ /* Reset error handling for libpng */
+- if (setjmp(m_pPNG->jmpbuf))
++ if (setjmp(png_jmpbuf(m_pPNG)))
+ {
+ png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+ return UT_ERROR;
+@@ -372,7 +375,7 @@ UT_Error IE_ImpGraphic_BMP::Initialize_P
+ UT_Error IE_ImpGraphic_BMP::Convert_BMP(UT_ByteBuf* pBB)
+ {
+ /* Reset error handling for libpng */
+- if (setjmp(m_pPNG->jmpbuf))
++ if (setjmp(png_jmpbuf(m_pPNG)))
+ {
+ png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+ return UT_ERROR;
+
+$NetBSD: patch-plugins_garble_xp_abiword-garble-png.cpp,v 1.1 2011/02/01 10:48:15 wiz Exp $
+
+Fix build with png-1.5.
+
+--- plugins/garble/xp/abiword-garble-png.cpp.orig 2009-09-05 15:34:44.000000000 +0000
++++ plugins/garble/xp/abiword-garble-png.cpp
+@@ -79,7 +79,7 @@ bool abiword_document::garble_png( void*
+ png_set_strip_alpha( png_ptr );
+ png_set_interlace_handling( png_ptr );
+ png_set_bgr( png_ptr );
+- rowbytes = info_ptr->rowbytes;
++ rowbytes = png_get_rowbytes( png_ptr, info_ptr );
+ png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
+ }
+
+$NetBSD: patch-af,v 1.12 2011/01/15 15:07:11 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp.orig 2009-07-01 04:02:04.000000000 +0000
++++ src/wp/impexp/gtk/ie_impGraphic_GdkPixbuf.cpp
+@@ -185,7 +185,7 @@ UT_Error IE_ImpGraphic_GdkPixbuf::import
+ /** needed for the stejmp context */
+ UT_Error IE_ImpGraphic_GdkPixbuf::_png_write(GdkPixbuf * pixbuf)
+ {
+- if (setjmp(m_pPNG->jmpbuf))
++ if (setjmp(png_jmpbuf(m_pPNG)))
+ {
+ DELETEP(m_pPngBB);
+ png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+@@ -446,7 +446,7 @@ UT_Error IE_ImpGraphic_GdkPixbuf::Initia
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if (setjmp(m_pPNG->jmpbuf))
++ if (setjmp(png_jmpbuf(m_pPNG)))
+ {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
+$NetBSD: patch-ae,v 1.21 2011/01/15 15:07:11 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/af/util/xp/ut_png.cpp.orig 2008-02-24 03:33:07.000000000 +0000
++++ src/af/util/xp/ut_png.cpp
+@@ -71,7 +71,7 @@ bool UT_PNG_getDimensions(const UT_ByteB
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in the png_create_read_struct() earlier.
+ */
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+ png_destroy_read_struct(&png_ptr, &info_ptr, static_cast<png_infopp>(NULL));
diff --git a/staging/abiword/abiword-2.8.6-no-undefined.patch b/staging/abiword/abiword-2.8.6-no-undefined.patch
new file mode 100644
index 000000000..c07000edb
--- /dev/null
+++ b/staging/abiword/abiword-2.8.6-no-undefined.patch
@@ -0,0 +1,21 @@
+diff -u -r abiword-2.8.6.orig/src/Makefile.am abiword-2.8.6/src/Makefile.am
+--- abiword-2.8.6.orig/src/Makefile.am 2009-09-09 15:11:01.000000000 +0200
++++ abiword-2.8.6/src/Makefile.am 2011-08-02 23:35:51.904761961 +0200
+@@ -107,7 +107,7 @@
+
+ AbiWord_LDFLAGS = \
+ $(DEPS_LIBS) \
+- --no-undefined \
++ -Wl,--no-undefined \
+ -avoid-version \
+ -export-dynamic \
+ -headerpad_max_install_names
+@@ -129,7 +129,7 @@
+
+ abiword_LDFLAGS = \
+ $(platform_ldflags) \
+- --no-undefined \
++ -Wl,--no-undefined \
+ -avoid-version \
+ -export-dynamic
+
diff --git a/staging/abiword/abiword.install b/staging/abiword/abiword.install
new file mode 100644
index 000000000..2eaa60550
--- /dev/null
+++ b/staging/abiword/abiword.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/staging/abiword/compat_libwpg_0_9.patch b/staging/abiword/compat_libwpg_0_9.patch
new file mode 100644
index 000000000..cf36e188e
--- /dev/null
+++ b/staging/abiword/compat_libwpg_0_9.patch
@@ -0,0 +1,371 @@
+diff -Nur abiword-2.8.6.orig//plugin-configure.m4 abiword-2.8.6/plugin-configure.m4
+--- abiword-2.8.6.orig//plugin-configure.m4 2010-06-13 14:17:27.000000000 -0700
++++ abiword-2.8.6/plugin-configure.m4 2010-12-06 13:59:43.083048588 -0800
+@@ -794,7 +794,7 @@
+ AC_SUBST([OPENXML_LIBS])
+
+
+-wpg_pkgs="$gsf_req libwpg-0.1 >= 0.1.0 libwpd-0.8 >= 0.8.0"
++wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0"
+ wpg_deps="no"
+
+ if test "$enable_wpg" != ""; then
+@@ -1497,8 +1497,8 @@
+ AC_SUBST([EML_LIBS])
+
+
+-wordperfect_pkgs="libwpd-0.8 >= 0.8.0 $gsf_req"
+-wordperfect_wps_pkgs='libwps-0.1 >= 0.1.0'
++wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req"
++wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0'
+ wordperfect_deps="no"
+
+ WORDPERFECT_CFLAGS=
+diff -Nur abiword-2.8.6.orig//plugins/wordperfect/plugin.m4 abiword-2.8.6/plugins/wordperfect/plugin.m4
+--- abiword-2.8.6.orig//plugins/wordperfect/plugin.m4 2010-05-30 07:50:46.000000000 -0700
++++ abiword-2.8.6/plugins/wordperfect/plugin.m4 2010-12-06 13:59:53.929715254 -0800
+@@ -1,6 +1,6 @@
+
+-wordperfect_pkgs="libwpd-0.8 >= 0.8.0 $gsf_req"
+-wordperfect_wps_pkgs='libwps-0.1 >= 0.1.0'
++wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req"
++wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0'
+ wordperfect_deps="no"
+
+ WORDPERFECT_CFLAGS=
+diff -Nur abiword-2.8.6.orig//plugins/wordperfect/xp/ie_imp_WordPerfect.cpp abiword-2.8.6/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp
+--- abiword-2.8.6.orig//plugins/wordperfect/xp/ie_imp_WordPerfect.cpp 2010-02-06 13:06:11.000000000 -0800
++++ abiword-2.8.6/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp 2010-12-06 13:59:53.926381921 -0800
+@@ -60,7 +60,7 @@
+
+ // Stream class
+
+-#include <libwpd/WPXStream.h>
++#include <libwpd-stream/libwpd-stream.h>
+
+ #include <gsf/gsf-input.h>
+ #include <gsf/gsf-infile.h>
+@@ -70,12 +70,7 @@
+ #include <libwps/libwps.h>
+ #endif
+
+-class AbiWordperfectInputStream :
+-#ifdef HAVE_LIBWPS
+- public WPSInputStream
+-#else
+- public WPXInputStream
+-#endif
++class AbiWordperfectInputStream : public WPXInputStream
+ {
+ public:
+ AbiWordperfectInputStream(GsfInput *input);
+@@ -86,7 +81,7 @@
+
+ virtual WPXInputStream * getDocumentOLEStream(const char * name);
+
+- virtual const uint8_t *read(size_t numBytes, size_t &numBytesRead);
++ virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
+ virtual int seek(long offset, WPX_SEEK_TYPE seekType);
+ virtual long tell();
+ virtual bool atEOS();
+@@ -98,11 +93,7 @@
+ };
+
+ AbiWordperfectInputStream::AbiWordperfectInputStream(GsfInput *input) :
+-#ifdef HAVE_LIBWPS
+- WPSInputStream(),
+-#else
+- WPXInputStream(true),
+-#endif
++ WPXInputStream(),
+ m_input(input),
+ m_ole(NULL)
+ {
+@@ -117,9 +108,9 @@
+ g_object_unref(G_OBJECT(m_input));
+ }
+
+-const uint8_t * AbiWordperfectInputStream::read(size_t numBytes, size_t &numBytesRead)
++const unsigned char * AbiWordperfectInputStream::read(unsigned long numBytes, unsigned long &numBytesRead)
+ {
+- const uint8_t *buf = gsf_input_read(m_input, numBytes, NULL);
++ const unsigned char *buf = gsf_input_read(m_input, numBytes, NULL);
+
+ if (buf == NULL)
+ numBytesRead = 0;
+@@ -256,19 +247,12 @@
+ {
+ AbiWordperfectInputStream gsfInput(input);
+
+- WPDConfidence confidence = WPDocument::isFileFormatSupported(&gsfInput, true);
++ WPDConfidence confidence = WPDocument::isFileFormatSupported(&gsfInput);
+
+ switch (confidence)
+ {
+ case WPD_CONFIDENCE_NONE:
+- // libwpd > 0.7.1 reports POOR if the text file is plain text (that _could_ be a WP4x document)
+- // however, we'll let the text importer handle such cases
+- case WPD_CONFIDENCE_POOR:
+ return UT_CONFIDENCE_ZILCH;
+- case WPD_CONFIDENCE_LIKELY:
+- return UT_CONFIDENCE_SOSO;
+- case WPD_CONFIDENCE_GOOD:
+- return UT_CONFIDENCE_GOOD;
+ case WPD_CONFIDENCE_EXCELLENT:
+ return UT_CONFIDENCE_PERFECT;
+ default:
+@@ -328,7 +312,7 @@
+ UT_Error IE_Imp_WordPerfect::_loadFile(GsfInput * input)
+ {
+ AbiWordperfectInputStream gsfInput(input);
+- WPDResult error = WPDocument::parse(&gsfInput, static_cast<WPXHLListenerImpl *>(this));
++ WPDResult error = WPDocument::parse(&gsfInput, static_cast<WPXDocumentInterface *>(this), NULL);
+
+ if (error != WPD_OK)
+ {
+@@ -381,9 +365,9 @@
+ float marginLeft = 1.0f, marginRight = 1.0f;
+
+ if (propList["fo:margin-left"])
+- marginLeft = propList["fo:margin-left"]->getFloat();
++ marginLeft = propList["fo:margin-left"]->getDouble();
+ if (propList["fo:margin-right"])
+- marginRight = propList["fo:margin-right"]->getFloat();
++ marginRight = propList["fo:margin-right"]->getDouble();
+
+ if (marginLeft != m_leftPageMargin || marginRight != m_rightPageMargin /* || */
+ /* marginTop != m_marginBottom || marginBottom != m_marginBottom */ )
+@@ -456,15 +440,15 @@
+ float marginTop = 0.0f, marginBottom = 0.0f;
+ float marginLeft = 0.0f, marginRight = 0.0f, textIndent = 0.0f;
+ if (propList["fo:margin-top"])
+- marginTop = propList["fo:margin-top"]->getFloat();
++ marginTop = propList["fo:margin-top"]->getDouble();
+ if (propList["fo:margin-bottom"])
+- marginBottom = propList["fo:margin-bottom"]->getFloat();
++ marginBottom = propList["fo:margin-bottom"]->getDouble();
+ if (propList["fo:margin-left"])
+- marginLeft = propList["fo:margin-left"]->getFloat();
++ marginLeft = propList["fo:margin-left"]->getDouble();
+ if (propList["fo:margin-right"])
+- marginRight = propList["fo:margin-right"]->getFloat();
++ marginRight = propList["fo:margin-right"]->getDouble();
+ if (propList["fo:text-indent"])
+- textIndent = propList["fo:text-indent"]->getFloat();
++ textIndent = propList["fo:text-indent"]->getDouble();
+
+ m_topMargin = marginTop;
+ m_bottomMargin = marginBottom;
+@@ -487,7 +471,7 @@
+
+ float lineSpacing = 1.0f;
+ if (propList["fo:line-height"])
+- lineSpacing = propList["fo:line-height"]->getFloat();
++ lineSpacing = propList["fo:line-height"]->getDouble();
+
+ UT_String tmpBuffer;
+ UT_String_sprintf(tmpBuffer, "; margin-top:%.4fin; margin-bottom:%.4fin; margin-left:%.4fin; margin-right:%.4fin; text-indent:%.4fin; line-height:%.4f",
+@@ -504,7 +488,7 @@
+ propBuffer += tmpBuffer;
+ if (i()["style:position"])
+ {
+- UT_String_sprintf(tmpBuffer, "%.4fin", i()["style:position"]->getFloat());
++ UT_String_sprintf(tmpBuffer, "%.4fin", i()["style:position"]->getDouble());
+ propBuffer += tmpBuffer;
+ }
+
+@@ -640,9 +624,9 @@
+
+ // TODO: support spaceAfter
+ if (propList["fo:margin-left"])
+- marginLeft = propList["fo:margin-left"]->getFloat();
++ marginLeft = propList["fo:margin-left"]->getDouble();
+ if (propList["fo:margin-right"])
+- marginRight = propList["fo:margin-right"]->getFloat();
++ marginRight = propList["fo:margin-right"]->getDouble();
+
+ if (marginLeft != m_leftSectionMargin || marginRight != m_rightSectionMargin || m_sectionColumnsCount != columnsCount)
+ m_bSectionChanged = true;
+@@ -709,9 +693,9 @@
+ if (propList["style:num-format"])
+ listType = propList["style:num-format"]->getStr().cstr()[0];
+ if (propList["text:space-before"])
+- listLeftOffset = propList["text:space-before"]->getFloat();
++ listLeftOffset = propList["text:space-before"]->getDouble();
+ if (propList["text:min-label-width"])
+- listMinLabelWidth = propList["text:min-label-width"]->getFloat();
++ listMinLabelWidth = propList["text:min-label-width"]->getDouble();
+
+ if (!m_pCurrentListDefinition ||
+ m_pCurrentListDefinition->getOutlineHash() != listID ||
+@@ -749,9 +733,9 @@
+ if (propList["libwpd:level"])
+ level = propList["libwpd:level"]->getInt();
+ if (propList["text:space-before"])
+- listLeftOffset = propList["text:space-before"]->getFloat();
++ listLeftOffset = propList["text:space-before"]->getDouble();
+ if (propList["text:min-label-width"])
+- listMinLabelWidth = propList["text:min-label-width"]->getFloat();
++ listMinLabelWidth = propList["text:min-label-width"]->getDouble();
+
+ if (!m_pCurrentListDefinition || m_pCurrentListDefinition->getOutlineHash() != listID)
+ {
+@@ -871,10 +855,10 @@
+
+ UT_String_sprintf(tempBuffer, "margin-left:%.4fin; ", m_pCurrentListDefinition->getListLeftOffset(m_iCurrentListLevel)
+ + m_pCurrentListDefinition->getListMinLabelWidth(m_iCurrentListLevel)
+- - (propList["fo:text-indent"] ? propList["fo:text-indent"]->getFloat() : 0.0f));
++ - (propList["fo:text-indent"] ? propList["fo:text-indent"]->getDouble() : 0.0f));
+ propBuffer += tempBuffer;
+ UT_String_sprintf(tempBuffer, "text-indent:%.4fin", - m_pCurrentListDefinition->getListMinLabelWidth(m_iCurrentListLevel)
+- + (propList["fo:text-indent"] ? propList["fo:text-indent"]->getFloat() : 0.0f));
++ + (propList["fo:text-indent"] ? propList["fo:text-indent"]->getDouble() : 0.0f));
+ propBuffer += tempBuffer;
+
+ listAttribs[attribsCount++] = PT_PROPS_ATTRIBUTE_NAME;
+@@ -1263,7 +1247,7 @@
+ virtual UT_Error _loadFile(GsfInput * input)
+ {
+ AbiWordperfectInputStream gsfInput(input);
+- WPSResult error = WPSDocument::parse(&gsfInput, static_cast<WPXHLListenerImpl *>(this));
++ WPSResult error = WPSDocument::parse(&gsfInput, static_cast<WPXDocumentInterface *>(this));
+
+ if (error != WPS_OK)
+ {
+@@ -1302,18 +1286,12 @@
+ {
+ AbiWordperfectInputStream gsfInput(input);
+
+- WPSConfidence confidence = WPSDocument::isFileFormatSupported(&gsfInput, true);
++ WPSConfidence confidence = WPSDocument::isFileFormatSupported(&gsfInput);
+
+ switch (confidence)
+ {
+ case WPS_CONFIDENCE_NONE:
+ return UT_CONFIDENCE_ZILCH;
+- case WPS_CONFIDENCE_POOR:
+- return UT_CONFIDENCE_POOR;
+- case WPS_CONFIDENCE_LIKELY:
+- return UT_CONFIDENCE_SOSO;
+- case WPS_CONFIDENCE_GOOD:
+- return UT_CONFIDENCE_GOOD;
+ case WPS_CONFIDENCE_EXCELLENT:
+ return UT_CONFIDENCE_PERFECT;
+ default:
+diff -Nur abiword-2.8.6.orig//plugins/wordperfect/xp/ie_imp_WordPerfect.h abiword-2.8.6/plugins/wordperfect/xp/ie_imp_WordPerfect.h
+--- abiword-2.8.6.orig//plugins/wordperfect/xp/ie_imp_WordPerfect.h 2009-06-19 01:55:49.000000000 -0700
++++ abiword-2.8.6/plugins/wordperfect/xp/ie_imp_WordPerfect.h 2010-12-06 13:59:53.929715254 -0800
+@@ -30,13 +30,7 @@
+ #define IE_IMP_WP_H
+
+ #include <stdio.h>
+-#ifdef _WIN32
+-#define POINT WPX_POINT
+-#endif
+ #include <libwpd/libwpd.h>
+-#ifdef _WIN32
+-#undef POINT
+-#endif
+ #include "ie_imp.h"
+ #include "ut_string.h"
+ #include "ut_string_class.h"
+@@ -98,7 +92,7 @@
+ IE_Imp ** ppie);
+ };
+
+-class IE_Imp_WordPerfect : public IE_Imp, public WPXHLListenerImpl
++class IE_Imp_WordPerfect : public IE_Imp, public WPXDocumentInterface
+ {
+ public:
+ IE_Imp_WordPerfect(PD_Document * pDocument);
+@@ -154,6 +148,21 @@
+ virtual void insertCoveredTableCell(const WPXPropertyList & /*propList*/) {}
+ virtual void closeTable();
+
++ virtual void definePageStyle(const WPXPropertyList&) {}
++ virtual void defineParagraphStyle(const WPXPropertyList&, const WPXPropertyListVector&) {}
++ virtual void defineCharacterStyle(const WPXPropertyList&) {}
++ virtual void defineSectionStyle(const WPXPropertyList&, const WPXPropertyListVector&) {}
++ virtual void insertSpace() {}
++ virtual void insertField(const WPXString&, const WPXPropertyList&) {}
++ virtual void openComment(const WPXPropertyList&) {}
++ virtual void closeComment() {}
++ virtual void openTextBox(const WPXPropertyList&) {}
++ virtual void closeTextBox() {}
++ virtual void openFrame(const WPXPropertyList&) {}
++ virtual void closeFrame() {}
++ virtual void insertBinaryObject(const WPXPropertyList&, const WPXBinaryData&) {}
++ virtual void insertEquation(const WPXPropertyList&, const WPXString&) {}
++
+
+ protected:
+ virtual UT_Error _loadFile(GsfInput * input);
+diff -Nur abiword-2.8.6.orig//plugins/wpg/plugin.m4 abiword-2.8.6/plugins/wpg/plugin.m4
+--- abiword-2.8.6.orig//plugins/wpg/plugin.m4 2010-05-30 07:50:46.000000000 -0700
++++ abiword-2.8.6/plugins/wpg/plugin.m4 2010-12-06 13:59:53.929715254 -0800
+@@ -1,5 +1,5 @@
+
+-wpg_pkgs="$gsf_req libwpg-0.1 >= 0.1.0 libwpd-0.8 >= 0.8.0"
++wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0"
+ wpg_deps="no"
+
+ if test "$enable_wpg" != ""; then
+diff -Nur abiword-2.8.6.orig//plugins/wpg/xp/ie_impGraphic_WPG.cpp abiword-2.8.6/plugins/wpg/xp/ie_impGraphic_WPG.cpp
+--- abiword-2.8.6.orig//plugins/wpg/xp/ie_impGraphic_WPG.cpp 2008-08-15 14:52:32.000000000 -0700
++++ abiword-2.8.6/plugins/wpg/xp/ie_impGraphic_WPG.cpp 2010-12-06 13:59:53.923048588 -0800
+@@ -31,11 +31,10 @@
+ #include <gsf/gsf-input-memory.h>
+ #include <gsf/gsf-input-stdio.h>
+ #include <gsf/gsf-infile-msole.h>
+-#include <libwpd/WPXStream.h>
++#include <libwpd-stream/libwpd-stream.h>
+ #include "xap_Module.h"
+
+ using libwpg::WPGraphics;
+-using libwpg::WPGString;
+
+ ABI_PLUGIN_DECLARE("WPG")
+
+@@ -48,7 +47,7 @@
+ virtual bool isOLEStream();
+ virtual WPXInputStream * getDocumentOLEStream();
+ virtual WPXInputStream * getDocumentOLEStream(const char * name);
+- virtual const uint8_t *read(size_t numBytes, size_t &numBytesRead);
++ virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
+ virtual int seek(long offset, WPX_SEEK_TYPE seekType);
+ virtual long tell();
+ virtual bool atEOS();
+@@ -60,7 +59,7 @@
+ };
+
+ AbiWordPerfectGraphicsInputStream::AbiWordPerfectGraphicsInputStream(GsfInput *input) :
+- WPXInputStream(true),
++ WPXInputStream(),
+ m_input(input),
+ m_ole(NULL)
+ {
+@@ -75,9 +74,9 @@
+ g_object_unref(G_OBJECT(m_input));
+ }
+
+-const uint8_t * AbiWordPerfectGraphicsInputStream::read(size_t numBytes, size_t &numBytesRead)
++const unsigned char * AbiWordPerfectGraphicsInputStream::read(unsigned long numBytes, unsigned long &numBytesRead)
+ {
+- const uint8_t *buf = gsf_input_read(m_input, numBytes, NULL);
++ const unsigned char *buf = gsf_input_read(m_input, numBytes, NULL);
+
+ if (buf == NULL)
+ numBytesRead = 0;
+@@ -245,10 +244,10 @@
+ UT_Error IE_Imp_WordPerfectGraphics::importGraphic(GsfInput *input, FG_Graphic **ppfg)
+ {
+ AbiWordPerfectGraphicsInputStream gsfInput(input);
+- WPGString svgOutput;
++ WPXString svgOutput;
+ if (WPGraphics::generateSVG(&gsfInput, svgOutput))
+ {
+- GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.length(), false);
++ GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false);
+ UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg);
+ g_object_unref(svgInput);
+ return result;
diff --git a/staging/allegro/PKGBUILD b/staging/allegro/PKGBUILD
new file mode 100644
index 000000000..3533ac18d
--- /dev/null
+++ b/staging/allegro/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 146877 2012-01-19 02:37:38Z eric $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Contributor: arjan <arjan@archlinux.org>
+
+pkgname=allegro
+pkgver=5.0.5
+pkgrel=2
+pkgdesc="Portable library mainly aimed at video game and multimedia programming"
+arch=('i686' 'x86_64')
+url="http://alleg.sourceforge.net/"
+license=('custom')
+depends=('jack' 'libxpm' 'libxxf86vm' 'libxxf86dga' 'libxcursor' 'libpng' 'libgl' 'libjpeg')
+makedepends=('cmake' 'mesa' 'freetype2')
+source=(http://downloads.sourceforge.net/alleg/${pkgname}-${pkgver}.tar.gz)
+md5sums=('4d879afe7062f7dc9b8913cba2e44bdf')
+
+build() {
+ cd "${srcdir}"
+ mkdir build && cd build
+
+ cmake "../${pkgname}-${pkgver}" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWANT_DOCS=OFF
+
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+
+ make DESTDIR="${pkgdir}" install
+
+ install -D -m644 ../${pkgname}-${pkgver}/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/alsaplayer/PKGBUILD b/staging/alsaplayer/PKGBUILD
new file mode 100644
index 000000000..d723ee447
--- /dev/null
+++ b/staging/alsaplayer/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 146875 2012-01-19 02:21:54Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=alsaplayer
+pkgver=0.99.81
+pkgrel=3
+pkgdesc="A heavily multi-threaded PCM player that tries to excercise the ALSA library and driver quite a bit"
+arch=('i686' 'x86_64')
+url="http://www.alsaplayer.org/"
+license=('GPL')
+depends=('gcc-libs' 'desktop-file-utils')
+makedepends=('gtk2' 'libid3tag' 'libvorbis' 'libmad' 'libmikmod' 'jack' 'mesa' 'audiofile' 'doxygen')
+optdepends=('gtk2: for the gtk2 GUI interface' \
+ 'libgl: for the OpenGL visual plugins' \
+ 'jack: for JACK audio server output support' \
+ 'audiofile: for support of various audio formats like AIFF, WAVE, .snd/.au' \
+ 'libid3tag: for flac support' \
+ 'flac: for flac support' \
+ 'libmad: for MPEG support' \
+ 'libsndfile: for sndfile support' \
+ 'libvorbis: for ogg vorbis support' \
+ 'libmikmod: for mod, s3m, it and xm formats supports')
+options=('!libtool')
+install=alsaplayer.install
+source=(http://www.alsaplayer.org/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('25817ebd1e5c36da31a88363315a1bf7a945ddfd')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-audiofile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/alsaplayer/alsaplayer.install b/staging/alsaplayer/alsaplayer.install
new file mode 100644
index 000000000..e111ef946
--- /dev/null
+++ b/staging/alsaplayer/alsaplayer.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/amule/PKGBUILD b/staging/amule/PKGBUILD
new file mode 100644
index 000000000..22280b542
--- /dev/null
+++ b/staging/amule/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 146942 2012-01-19 13:36:15Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Henrik Ronellenfitsch <searinox@web.de>
+# Contributor: Alessio Sergi <sergi.alessio {at} gmail.com>
+# Contributor: Dario 'Dax' Vilardi <dax [at] deelab [dot] org>
+
+pkgname=amule
+pkgver=10708
+pkgrel=2
+pkgdesc="An eMule-like client for ed2k p2p network"
+arch=('i686' 'x86_64')
+url="http://www.amule.org"
+license=('GPL')
+depends=('wxgtk' 'gd' 'geoip' 'libupnp' 'crypto++' 'libsm')
+source=("http://amule.sourceforge.net/tarballs/aMule-SVN-r${pkgver}.tar.bz2")
+md5sums=('3c1c2a03b24c9ec7ba6fd675382f26a3')
+
+build() {
+ cd "${srcdir}/aMule-SVN-r${pkgver}"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-cas \
+ --enable-wxcas \
+ --enable-amule-daemon \
+ --enable-amulecmd \
+ --enable-amule-gui \
+ --enable-alc \
+ --enable-alcc \
+ --enable-webserver \
+ --disable-debug \
+ --enable-optimize \
+ --enable-ccache \
+ --enable-geoip \
+ --enable-upnp
+
+ make
+}
+
+package() {
+ cd "${srcdir}/aMule-SVN-r${pkgver}"
+
+ make DESTDIR=${pkgdir}/ install
+}
diff --git a/staging/autopano-sift-c/PKGBUILD b/staging/autopano-sift-c/PKGBUILD
new file mode 100644
index 000000000..35f76e38a
--- /dev/null
+++ b/staging/autopano-sift-c/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 146969 2012-01-19 19:16:11Z eric $
+# Maintainer: Tobias Kieslich <tobias@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+
+pkgname=autopano-sift-c
+pkgver=2.5.1
+pkgrel=3
+pkgdesc="Identify key feature points within arbitrary images"
+arch=('i686' 'x86_64')
+url="http://hugin.sourceforge.net/"
+license=('GPL2')
+depends=('libxml2' 'libpano13' 'gcc-libs')
+makedepends=('cmake')
+provides=('autopano-sift')
+conflicts=('autopano-sift')
+replaces=('autopano-sift')
+source=(http://downloads.sourceforge.net/sourceforge/hugin/autopano-sift-C-${pkgver}.tar.gz)
+md5sums=('b9bade07e8c4f2ea383c22a082c260e0')
+
+build() {
+ cd "${srcdir}/autopano-sift-C-${pkgver}"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .
+ sed -i 's/-lz/-lz -lm/' CMakeFiles/{autopano,generatekeys}.dir/link.txt
+ make
+}
+
+package() {
+ cd "${srcdir}/autopano-sift-C-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/cairo/PKGBUILD b/staging/cairo/PKGBUILD
new file mode 100644
index 000000000..37aac6a2f
--- /dev/null
+++ b/staging/cairo/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 146832 2012-01-18 20:00:38Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Brice Carpentier <brice@daknet.org>
+
+pkgname=cairo
+pkgver=1.10.2
+pkgrel=3
+pkgdesc="Cairo vector graphics library"
+arch=(i686 x86_64)
+license=('LGPL' 'MPL')
+url="http://cairographics.org/"
+depends=('libpng' 'libxrender' 'fontconfig' 'pixman' 'glib2' 'sh')
+options=('!libtool')
+source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.gz
+ cairo-1.10.0-buggy_gradients.patch)
+sha1sums=('ccce5ae03f99c505db97c286a0c9a90a926d3c6e'
+ '8b843a9934e5112b6188e5bcf4adfc1fdaf9fa04')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -Np1 -i "${srcdir}/cairo-1.10.0-buggy_gradients.patch"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --enable-tee
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make check || /bin/true # 248 Passed, 65 Failed [2 crashed, 8 expected], 28 Skipped
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/cairo/cairo-1.10.0-buggy_gradients.patch b/staging/cairo/cairo-1.10.0-buggy_gradients.patch
new file mode 100644
index 000000000..368e356d3
--- /dev/null
+++ b/staging/cairo/cairo-1.10.0-buggy_gradients.patch
@@ -0,0 +1,13 @@
+--- a/src/cairo-xlib-display.c.ubuntu 2010-08-04 11:57:49.000000000 +0200
++++ b/src/cairo-xlib-display.c 2010-08-04 11:58:28.000000000 +0200
+@@ -353,11 +353,7 @@
+ /* Prior to Render 0.10, there is no protocol support for gradients and
+ * we call function stubs instead, which would silently consume the drawing.
+ */
+-#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
+ display->buggy_gradients = TRUE;
+-#else
+- display->buggy_gradients = FALSE;
+-#endif
+ display->buggy_pad_reflect = FALSE;
+ display->buggy_repeat = FALSE;
diff --git a/staging/celestia/PKGBUILD b/staging/celestia/PKGBUILD
new file mode 100644
index 000000000..495903615
--- /dev/null
+++ b/staging/celestia/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 146981 2012-01-19 21:57:20Z giovanni $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor : Damir Perisa <damir.perisa@bluewin.ch>
+
+pkgname=celestia
+pkgver=1.6.1
+pkgrel=2
+pkgdesc="Real-time space simulation"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.shatters.net/celestia/"
+depends=('gtk2' 'libtheora' 'lua' 'gtkglext' 'glut' 'libxmu' 'mesa' 'libjpeg')
+options=('!makeflags')
+source=("http://downloads.sourceforge.net/sourceforge/celestia/${pkgname}-${pkgver}.tar.gz"
+ 'celestia-1.6.1-gcc46.patch'
+ 'celestia-1.6.1-libpng15.patch'
+ 'celestia-1.6.1-linking.patch')
+sha1sums=('1f0fdf4525a8b9d6c708e1f6383babed670d18e7'
+ '7c08ca391603806d788cb8f3342acedafc924eef'
+ '46ecc4e10b24191384bc848c206652498843adf0'
+ '534c8eee18d13a868c91f0b870ebecc05f3e7ae1')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # build patch
+ patch -Np0 -i "${srcdir}/celestia-1.6.1-gcc46.patch"
+ patch -Np0 -i "${srcdir}/celestia-1.6.1-libpng15.patch"
+ patch -Np1 -i "${srcdir}/celestia-1.6.1-linking.patch"
+
+ # This version of Celestia has a bug in the font rendering and requires -fsigned-char
+ export CFLAGS="$CFLAGS -fsigned-char"
+ export CXXFLAGS="$CXXFLAGS -fsigned-char"
+
+ autoreconf
+ ./configure --prefix=/usr \
+ --with-lua=/usr \
+ --datadir=/usr/share \
+ --with-gtk \
+ --disable-rpath \
+ --with-lua
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+}
+
diff --git a/staging/celestia/celestia-1.5.1-gcc44.patch b/staging/celestia/celestia-1.5.1-gcc44.patch
new file mode 100644
index 000000000..b1ee896f0
--- /dev/null
+++ b/staging/celestia/celestia-1.5.1-gcc44.patch
@@ -0,0 +1,20 @@
+--- src/celengine/overlay.h.orig 2009-07-08 02:27:08.000000000 -0400
++++ src/celengine/overlay.h 2009-07-08 02:27:28.000000000 -0400
+@@ -10,6 +10,7 @@
+ #ifndef _OVERLAY_H_
+ #define _OVERLAY_H_
+
++#include <cstdio>
+ #include <string>
+ #include <iostream>
+ #include <celtxf/texturefont.h>
+--- src/celengine/star.cpp.orig 2009-07-08 02:40:52.000000000 -0400
++++ src/celengine/star.cpp 2009-07-08 02:41:08.000000000 -0400
+@@ -8,6 +8,7 @@
+ // of the License, or (at your option) any later version.
+
+ #include <celmath/mathlib.h>
++#include <cstdio>
+ #include <cstring>
+ #include <cassert>
+ #include "celestia.h"
diff --git a/staging/celestia/celestia-1.6.1-gcc46.patch b/staging/celestia/celestia-1.6.1-gcc46.patch
new file mode 100644
index 000000000..ddf4036f2
--- /dev/null
+++ b/staging/celestia/celestia-1.6.1-gcc46.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/show_bug.cgi?id=366073
+
+Patch written by Nils Larsson <ni1s@nerdshack.com>
+--- src/celengine/frametree.h
++++ src/celengine/frametree.h
+@@ -14,6 +14,7 @@
+ #define _CELENGINE_FRAMETREE_H_
+
+ #include <vector>
++#include <cstddef>
+
+ class Star;
+ class Body;
diff --git a/staging/celestia/celestia-1.6.1-gentoo.patch b/staging/celestia/celestia-1.6.1-gentoo.patch
new file mode 100644
index 000000000..57fffe159
--- /dev/null
+++ b/staging/celestia/celestia-1.6.1-gentoo.patch
@@ -0,0 +1,23 @@
+--- src/celestia/Makefile.am 2011-06-07 19:15:51.502000147 +0200
++++ src/celestia/Makefile.am.new 2011-06-07 19:15:47.208000302 +0200
+@@ -15,6 +15,7 @@
+ if ENABLE_GTK
+ SUBDIRS += gtk
+ celestiaGTKLIBS = $(GTK_LIBS) gtk/libgtkgui.a
++LIBS += $(GTK_LIBS)
+ endif
+
+ COMMONSOURCES = \
+
+Index: src/celengine/frametree.h
+===================================================================
+--- src/celengine/frametree.h (revision 5163)
++++ src/celengine/frametree.h (arbetskopia)
+@@ -14,6 +14,7 @@
+ #define _CELENGINE_FRAMETREE_H_
+
+ #include <vector>
++#include <cstddef>
+
+ class Star;
+ class Body;
diff --git a/staging/celestia/celestia-1.6.1-libpng15.patch b/staging/celestia/celestia-1.6.1-libpng15.patch
new file mode 100644
index 000000000..5dffbab24
--- /dev/null
+++ b/staging/celestia/celestia-1.6.1-libpng15.patch
@@ -0,0 +1,14 @@
+imagecapture.cpp:184:40: error: ‘Z_BEST_COMPRESSION’ was not declared in this scope
+
+--- src/celestia/imagecapture.cpp
++++ src/celestia/imagecapture.cpp
+@@ -31,6 +31,9 @@
+ #include "png.h"
+ #endif
+
++// Z_BEST_COMPRESSION
++#include <zlib.h>
++
+ // Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng
+ #ifndef png_jmpbuf
+ #define png_jmpbuf(png_ptr) png_ptr->jmpbuf
diff --git a/staging/celestia/celestia-1.6.1-linking.patch b/staging/celestia/celestia-1.6.1-linking.patch
new file mode 100644
index 000000000..d610d5243
--- /dev/null
+++ b/staging/celestia/celestia-1.6.1-linking.patch
@@ -0,0 +1,54 @@
+Fix linking issues:
+ * underlinking GLUT (bug #372123, #387609)
+ * as-needed (bug #281258)
+
+--- a/src/celestia/Makefile.am
++++ b/src/celestia/Makefile.am
+@@ -7,14 +7,15 @@
+
+ if ENABLE_KDE
+ SUBDIRS += kde
+-celestiaKDELIBS = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) \
+- $(LIBSOCKET) -lDCOP kde/libkdegui.a
++celestiaKDELIBS = kde/libkdegui.a
+ celestia_LDFLAGS = $(all_libraries) $(KDE_RPATH)
++LIBS += $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KFILE) $(LIBSOCKET) -lDCOP
+ endif
+
+ if ENABLE_GTK
+ SUBDIRS += gtk
+-celestiaGTKLIBS = $(GTK_LIBS) gtk/libgtkgui.a
++celestiaGTKLIBS = gtk/libgtkgui.a
++LIBS += $(GTK_LIBS)
+ endif
+
+ COMMONSOURCES = \
+@@ -62,6 +63,7 @@
+
+ if ENABLE_GLUT
+ GLUTSOURCES = glutmain.cpp
++GLUTLIBS = -lGL
+ endif
+
+ if ENABLE_THEORA
+@@ -80,15 +82,16 @@
+ celestia_LDADD = \
+ $(celestiaKDELIBS) \
+ $(celestiaGTKLIBS) \
+- $(DL_LIBS) \
+- $(LUA_LIBS) \
+- $(THEORA_LIBS) \
+ ../celengine/libcelengine.a \
+ ../celtxf/libceltxf.a \
+ ../cel3ds/libcel3ds.a \
+ ../celmath/libcelmath.a \
+ ../celutil/libcelutil.a \
+- $(SPICE_LIBS)
++ $(LUA_LIBS) \
++ $(THEORA_LIBS) \
++ $(GLUTLIBS) \
++ $(SPICE_LIBS) \
++ $(DL_LIBS)
+
+ noinst_HEADERS = $(wildcard *.h)
+ noinst_DATA = ../../celestia
diff --git a/staging/dvdauthor/PKGBUILD b/staging/dvdauthor/PKGBUILD
new file mode 100644
index 000000000..849754c1e
--- /dev/null
+++ b/staging/dvdauthor/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 146985 2012-01-19 22:25:27Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Travis Willard <travisw@wmpub.ca>
+# Contributor: Jaroslaw Swierczynski <swiergot@juvepoland.com>
+# Contributor: Nicolai Lissner <nlissne@linux01.gwdg.de>
+
+pkgname=dvdauthor
+pkgver=0.7.0
+pkgrel=4
+pkgdesc="DVD authoring tools"
+arch=('i686' 'x86_64')
+url="http://dvdauthor.sourceforge.net/"
+license=('GPL')
+depends=('libdvdread' 'imagemagick' 'libxml2' 'libpng' 'fribidi')
+options=('!makeflags')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'dvdauthor-0.7.0-libpng15.patch')
+md5sums=('33a447fb98ab3293ac40f869eedc17ff'
+ '9ea90bbea6adb0469c8c1b2f7d033f11')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ patch -Np0 -i "${srcdir}/dvdauthor-0.7.0-libpng15.patch"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/dvdauthor/dvdauthor-0.7.0-libpng15.patch b/staging/dvdauthor/dvdauthor-0.7.0-libpng15.patch
new file mode 100644
index 000000000..2bb636380
--- /dev/null
+++ b/staging/dvdauthor/dvdauthor-0.7.0-libpng15.patch
@@ -0,0 +1,19 @@
+--- src/spuunmux.c
++++ src/spuunmux.c
+@@ -39,6 +39,7 @@
+ #include <netinet/in.h>
+
+ #include <png.h>
++#include <zlib.h>
+
+ #include "rgb.h"
+ #include "common.h"
+@@ -610,7 +611,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
+ return -1;
+ } /*if*/
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(fp);
diff --git a/staging/enblend-enfuse/PKGBUILD b/staging/enblend-enfuse/PKGBUILD
new file mode 100644
index 000000000..b8e04522a
--- /dev/null
+++ b/staging/enblend-enfuse/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 146965 2012-01-19 18:31:50Z eric $
+# Maintainer: tobias <tobias@archlinux.org>
+# Contributor: Dominik Ryba <domryba@post.pl>
+
+pkgname=enblend-enfuse
+pkgver=4.0
+pkgrel=5
+pkgdesc="Intelligent blend tool for overlapping picture"
+arch=("i686" "x86_64")
+license=('GPL')
+url="http://enblend.sourceforge.net"
+depends=('openexr' 'glew>=1.5' 'libxmi' 'freeglut' 'lcms' 'libpng')
+makedepends=('boost')
+replaces=('enblend')
+conflicts=('enblend')
+provides=('enblend')
+install=${pkgname}.install
+source=(http://downloads.sourceforge.net/sourceforge/enblend/${pkgname}-${pkgver}.tar.gz{,.asc} \
+ libpng-1.4.patch enblend-4.0-libpng15.patch)
+sha1sums=('34c3a5ce11c6ef0ef520d8a15a3cb6a94a567033'
+ 'aac6364b29b0a9d6c61c3db0982f52ce1579e934'
+ 'eae6cf48ea082865130302d0b4d1ca0b884a563b'
+ '71e961d90be842eafe9d473d8d70b04b29077036')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}-753b534c819d"
+ sed -i 's/info.arith_code = TRUE/info.arith_code = FALSE/' src/vigra_impex/jpeg.cxx
+ patch -p1 -i ../libpng-1.4.patch
+ patch -p0 -i ../enblend-4.0-libpng15.patch
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}-753b534c819d"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 doc/enblend.info "${pkgdir}/usr/share/info/enblend.info"
+ install -D -m644 doc/enfuse.info "${pkgdir}/usr/share/info/enfuse.info"
+}
diff --git a/staging/enblend-enfuse/enblend-4.0-libpng15.patch b/staging/enblend-enfuse/enblend-4.0-libpng15.patch
new file mode 100644
index 000000000..d4465ccad
--- /dev/null
+++ b/staging/enblend-enfuse/enblend-4.0-libpng15.patch
@@ -0,0 +1,220 @@
+--- src/vigra_impex/png.cxx
++++ src/vigra_impex/png.cxx
+@@ -81,7 +81,7 @@
+ static void PngError( png_structp png_ptr, png_const_charp error_msg )
+ {
+ png_error_message = std::string(error_msg);
+- longjmp( png_ptr->jmpbuf, 1 );
++ longjmp( png_jmpbuf( png_ptr ), 1 );
+ }
+
+ // called on non-fatal errors
+@@ -213,7 +213,7 @@
+ vigra_postcondition( png != 0, "could not create the read struct." );
+
+ // create info struct
+- if (setjmp(png->jmpbuf)) {
++ if (setjmp(png_jmpbuf( png ))) {
+ png_destroy_read_struct( &png, &info, NULL );
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_create_info_struct(): ").c_str() );
+ }
+@@ -221,14 +221,14 @@
+ vigra_postcondition( info != 0, "could not create the info struct." );
+
+ // init png i/o
+- if (setjmp(png->jmpbuf)) {
++ if (setjmp(png_jmpbuf( png ))) {
+ png_destroy_read_struct( &png, &info, NULL );
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() );
+ }
+ png_init_io( png, file.get() );
+
+ // specify that the signature was already read
+- if (setjmp(png->jmpbuf)) {
++ if (setjmp(png_jmpbuf( png ))) {
+ png_destroy_read_struct( &png, &info, NULL );
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_set_sig_bytes(): ").c_str() );
+ }
+@@ -244,13 +244,13 @@
+ void PngDecoderImpl::init()
+ {
+ // read all chunks up to the image data
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_read_info(): ").c_str() );
+ png_read_info( png, info );
+
+ // pull over the header fields
+ int interlace_method, compression_method, filter_method;
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_get_IHDR(): ").c_str() );
+ png_get_IHDR( png, info, &width, &height, &bit_depth, &color_type,
+ &interlace_method, &compression_method, &filter_method );
+@@ -264,7 +264,7 @@
+
+ // transform palette to rgb
+ if ( color_type == PNG_COLOR_TYPE_PALETTE) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_palette_to_rgb(): ").c_str() );
+ png_set_palette_to_rgb(png);
+ color_type = PNG_COLOR_TYPE_RGB;
+@@ -273,7 +273,7 @@
+
+ // expand gray values to at least one byte size
+ if ( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false,png_error_message.insert(0, "error in png_set_expand_gray_1_2_4_to_8(): ").c_str());
+ png_set_expand_gray_1_2_4_to_8(png);
+ bit_depth = 8;
+@@ -283,7 +283,7 @@
+ #if 0
+ // strip alpha channel
+ if ( color_type & PNG_COLOR_MASK_ALPHA ) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_set_strip_alpha(): ").c_str() );
+ png_set_strip_alpha(png);
+ color_type ^= PNG_COLOR_MASK_ALPHA;
+@@ -323,12 +323,12 @@
+
+ // read icc profile
+ #if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED)
+- char * dummyName;
++ png_charpp dummyName;
+ int dummyCompType;
+- char * profilePtr;
++ png_bytepp profilePtr;
+ png_uint_32 profileLen;
+- if (info->valid & PNG_INFO_iCCP) {
+- png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ;
++ if (png_get_valid(png, info, PNG_INFO_iCCP)) {
++ png_get_iCCP(png, info, dummyName, &dummyCompType, profilePtr, &profileLen) ;
+ iccProfilePtr = (unsigned char *) profilePtr;
+ iccProfileLength = profileLen;
+ }
+@@ -340,7 +340,7 @@
+ // image gamma
+ double image_gamma = 0.45455;
+ if ( png_get_valid( png, info, PNG_INFO_gAMA ) ) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_get_gAMA(): ").c_str() );
+ png_get_gAMA( png, info, &image_gamma );
+ }
+@@ -349,26 +349,26 @@
+ double screen_gamma = 2.2;
+
+ // set gamma correction
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_set_gamma(): ").c_str() );
+ png_set_gamma( png, screen_gamma, image_gamma );
+ #endif
+
+ // interlace handling, get number of read passes needed
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false,png_error_message.insert(0, "error in png_set_interlace_handling(): ").c_str());
+ n_interlace_passes = png_set_interlace_handling(png);
+
+ // update png library state to reflect any changes that were made
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_read_update_info(): ").c_str() );
+ png_read_update_info( png, info );
+
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false,png_error_message.insert(0, "error in png_get_channels(): ").c_str());
+ n_channels = png_get_channels(png, info);
+
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false,png_error_message.insert(0, "error in png_get_rowbytes(): ").c_str());
+ rowsize = png_get_rowbytes(png, info);
+
+@@ -379,7 +379,7 @@
+ void PngDecoderImpl::nextScanline()
+ {
+ for (int i=0; i < n_interlace_passes; i++) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false,png_error_message.insert(0, "error in png_read_row(): ").c_str());
+ png_read_row(png, row_data.begin(), NULL);
+ }
+@@ -545,7 +545,7 @@
+ vigra_postcondition( png != 0, "could not create the write struct." );
+
+ // create info struct
+- if (setjmp(png->jmpbuf)) {
++ if (setjmp(png_jmpbuf( png ))) {
+ png_destroy_write_struct( &png, &info );
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_info_struct(): ").c_str() );
+ }
+@@ -556,7 +556,7 @@
+ }
+
+ // init png i/o
+- if (setjmp(png->jmpbuf)) {
++ if (setjmp(png_jmpbuf( png ))) {
+ png_destroy_write_struct( &png, &info );
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() );
+ }
+@@ -571,7 +571,7 @@
+ void PngEncoderImpl::finalize()
+ {
+ // write the IHDR
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_set_IHDR(): ").c_str() );
+ png_set_IHDR( png, info, width, height, bit_depth, color_type,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
+@@ -579,7 +579,7 @@
+
+ // set resolution
+ if (x_resolution > 0 && y_resolution > 0) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_set_pHYs(): ").c_str() );
+ png_set_pHYs(png, info, (png_uint_32) (x_resolution / 0.0254 + 0.5),
+ (png_uint_32) (y_resolution / 0.0254 + 0.5),
+@@ -588,7 +588,7 @@
+
+ // set offset
+ if (position.x > 0 && position.y > 0) {
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_set_oFFs(): ").c_str() );
+ png_set_oFFs(png, info, position.x, position.y, PNG_OFFSET_PIXEL);
+ }
+@@ -597,12 +597,12 @@
+ // set icc profile
+ if (iccProfile.size() > 0) {
+ png_set_iCCP(png, info, "icc", 0,
+- (char *)iccProfile.begin(), iccProfile.size());
++ iccProfile.begin(), iccProfile.size());
+ }
+ #endif
+
+ // write the info struct
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_write_info(): ").c_str() );
+ png_write_info( png, info );
+
+@@ -634,10 +634,10 @@
+ }
+
+ // write the whole image
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_write_image(): ").c_str() );
+ png_write_image( png, row_pointers.begin() );
+- if (setjmp(png->jmpbuf))
++ if (setjmp(png_jmpbuf( png )))
+ vigra_postcondition( false, png_error_message.insert(0, "error in png_write_end(): ").c_str() );
+ png_write_end(png, info);
+ }
diff --git a/staging/enblend-enfuse/enblend-enfuse.install b/staging/enblend-enfuse/enblend-enfuse.install
new file mode 100644
index 000000000..24ea28a4e
--- /dev/null
+++ b/staging/enblend-enfuse/enblend-enfuse.install
@@ -0,0 +1,22 @@
+infodir=usr/share/info
+filelist=(enblend.info enfuse.info)
+
+post_install() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/enblend-enfuse/libpng-1.4.patch b/staging/enblend-enfuse/libpng-1.4.patch
new file mode 100644
index 000000000..3bf852b58
--- /dev/null
+++ b/staging/enblend-enfuse/libpng-1.4.patch
@@ -0,0 +1,14 @@
+diff -Naur enblend-enfuse-3.2-orig/src/vigra_impex/png.cxx enblend-enfuse-3.2/src/vigra_impex/png.cxx
+--- enblend-enfuse-3.2-orig/src/vigra_impex/png.cxx 2010-01-19 22:09:36.000000000 -0500
++++ enblend-enfuse-3.2/src/vigra_impex/png.cxx 2010-01-19 22:13:43.000000000 -0500
+@@ -275,8 +275,8 @@
+ // expand gray values to at least one byte size
+ if ( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) {
+ if (setjmp(png->jmpbuf))
+- vigra_postcondition( false,png_error_message.insert(0, "error in png_set_gray_1_2_4_to_8(): ").c_str());
+- png_set_gray_1_2_4_to_8(png);
++ vigra_postcondition( false,png_error_message.insert(0, "error in png_set_expand_gray_1_2_4_to_8(): ").c_str());
++ png_set_expand_gray_1_2_4_to_8(png);
+ bit_depth = 8;
+ }
+
diff --git a/staging/fbida/PKGBUILD b/staging/fbida/PKGBUILD
new file mode 100644
index 000000000..c7fa1f6d6
--- /dev/null
+++ b/staging/fbida/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 146887 2012-01-19 03:44:47Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=fbida
+pkgver=2.08
+pkgrel=2
+pkgdesc="Few applications to display and elementary edit images: fbi, fbgs, ida, exiftran"
+arch=('i686' 'x86_64')
+url="http://www.kraxel.org/blog/linux/fbida/"
+license=('GPL2')
+depends=('giflib' 'libtiff' 'libexif' 'lesstif' 'libpng' 'fontconfig' 'curl')
+makedepends=('libxpm')
+optdepends=('ghostscript: to use fbgs')
+source=(http://www.kraxel.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('9b3693ab26a58194e36b479bffb61ed0')
+sha1sums=('597e0953c68112bf7c363b1ccaa94e72100b116a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's/ungif/gif/' GNUmakefile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" prefix=/usr install
+}
diff --git a/staging/feh/PKGBUILD b/staging/feh/PKGBUILD
new file mode 100644
index 000000000..794de592d
--- /dev/null
+++ b/staging/feh/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 146881 2012-01-19 03:22:03Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=feh
+pkgver=2.2
+pkgrel=2
+pkgdesc='Fast and light imlib2-based image viewer'
+url='http://feh.finalrewind.org/'
+license=('MIT')
+arch=('i686' 'x86_64')
+depends=('giblib' 'curl' 'libxinerama')
+optdepends=('perl: feh-cam, webcam wrapper for feh')
+makedepends=('libxt')
+source=("${url}${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('655db5f558cdb268ff55cb088994d78331bd39aa')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make PREFIX=/usr
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make PREFIX=/usr DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/fltk/PKGBUILD b/staging/fltk/PKGBUILD
new file mode 100644
index 000000000..2a830946f
--- /dev/null
+++ b/staging/fltk/PKGBUILD
@@ -0,0 +1,62 @@
+# $Id: PKGBUILD 146979 2012-01-19 21:29:09Z eric $
+# Maintainer:
+
+pkgbase=fltk
+pkgname=('fltk' 'fltk-docs' 'fltk-games')
+pkgver=1.3.0
+pkgrel=3
+arch=('i686' 'x86_64')
+license=('custom:LGPL')
+url="http://www.fltk.org/"
+makedepends=('mesa' 'doxygen' 'libjpeg' 'libpng' 'libxft' 'libxinerama' \
+ 'alsa-lib' 'desktop-file-utils')
+source=(http://ftp.easysw.com/pub/$pkgbase/$pkgver/$pkgbase-$pkgver-source.tar.gz)
+md5sums=('44d5d7ba06afdd36ea17da6b4b703ca3')
+
+build() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ sed -i -e 's/$(LINKFLTK)/$(LINKSHARED)/' \
+ -e 's/$(LINKFLTKIMG)/$(LINKSHARED)/' test/Makefile
+ ./configure --prefix=/usr --enable-threads --enable-xft --enable-shared
+ make
+ cd documentation
+ make html
+}
+
+package_fltk() {
+ pkgdesc="Graphical user interface toolkit for X"
+ depends=('libjpeg' 'libpng' 'libxft' 'libxinerama' 'hicolor-icon-theme' \
+ 'desktop-file-utils' 'xdg-utils')
+ options=('!docs')
+ install=fltk.install
+
+ cd "$srcdir/$pkgbase-$pkgver"
+ make DESTDIR="$pkgdir" install
+ (cd fluid; make DESTDIR="$pkgdir" install install-linux)
+ chmod 644 "$pkgdir"/usr/lib/*.a
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_fltk-docs() {
+ pkgdesc="Graphical user interface toolkit for X (documentation)"
+
+ cd "$srcdir/$pkgbase-$pkgver/documentation"
+ install -d "$pkgdir"/usr/share/doc/fltk/
+ for _file in html/* ; do
+ install -m644 $_file "$pkgdir"/usr/share/doc/fltk/
+ done
+ cd ../test
+ make DESTDIR="$pkgdir" install
+ install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_fltk-games() {
+ pkgdesc="Example games that accompany FLTK: blocks, checkers and sudoku"
+ depends=('alsa-lib' 'fltk')
+ install=fltk-games.install
+
+ cd "$srcdir/$pkgbase-$pkgver/test"
+ make DESTDIR="$pkgdir" install-linux
+ (cd ../documentation; make DESTDIR="$pkgdir" install-linux)
+ install -D -m644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/fltk/fltk-games.install b/staging/fltk/fltk-games.install
new file mode 100644
index 000000000..f3fe2b08b
--- /dev/null
+++ b/staging/fltk/fltk-games.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/fltk/fltk.install b/staging/fltk/fltk.install
new file mode 100644
index 000000000..f89ec8213
--- /dev/null
+++ b/staging/fltk/fltk.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/fontforge/PKGBUILD b/staging/fontforge/PKGBUILD
new file mode 100644
index 000000000..f5dc25f1a
--- /dev/null
+++ b/staging/fontforge/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 146903 2012-01-19 04:55:00Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Eric Belanger <eric@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=fontforge
+pkgver=20120119
+pkgrel=1
+pkgdesc='Outline and bitmap font editor'
+arch=('i686' 'x86_64')
+url='http://fontforge.sourceforge.net/'
+license=('BSD')
+depends=('libxkbui' 'libxi' 'libxml2' 'pango' 'giflib' 'libtiff' 'python2' 'libspiro')
+options=('!libtool' '!makeflags')
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz")
+sha1sums=('2c363af075e77bf35d21ee1939e3d6ab39a9f80c')
+
+# git clone git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge; cd fontforge; git archive --prefix=${pkgname}-${pkgver}/ master | xz > ../${pkgname}-${pkgver}.tar.xz
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's/python /python2 /g' Makefile.dynamic.in
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --enable-type3 \
+ --enable-devicetables \
+ --enable-double \
+ --with-regular-link \
+ --with-python=python2 \
+ --enable-pyextension \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/fvwm/PKGBUILD b/staging/fvwm/PKGBUILD
new file mode 100644
index 000000000..89af20969
--- /dev/null
+++ b/staging/fvwm/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 146983 2012-01-19 22:19:37Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=fvwm
+pkgver=2.6.3
+pkgrel=2
+pkgdesc="A multiple large virtual desktop window manager originally derived from twm"
+arch=('i686' 'x86_64')
+url="http://www.fvwm.org"
+license=('GPL' 'custom')
+depends=('imlib' 'fribidi' 'perl' 'libstroke' 'libxpm' 'librsvg' 'libxinerama' 'libxcursor')
+makedepends=('libxslt')
+provides=('fvwm-devel')
+conflicts=('fvwm-devel')
+replaces=('fvwm-devel')
+options=('!emptydirs' '!makeflags')
+source=(ftp://ftp.fvwm.org/pub/fvwm/version-${pkgver%%.*}/${pkgname}-${pkgver}.tar.bz2 fvwm.desktop)
+sha1sums=('7a04dae0e4a17f4d908589e704b48246b7c05e39'
+ '6fd8fd767f32f88cc8b4743a2ba49bcfcdb32bcb')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-stroke-library
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 sample.fvwmrc/{decor_examples,DecorMwm,DecorWin95,new-features,system.*} "${pkgdir}/usr/share/doc/fvwm"
+ install -D -m644 ../fvwm.desktop "${pkgdir}/usr/share/xsessions/fvwm.desktop"
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/staging/fvwm/fvwm.desktop b/staging/fvwm/fvwm.desktop
new file mode 100644
index 000000000..e297a6109
--- /dev/null
+++ b/staging/fvwm/fvwm.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=FVWM
+Comment=The fvwm window manager
+Type=XSession
+Exec=/usr/bin/fvwm
+TryExec=/usr/bin/fvwm
diff --git a/staging/gd/PKGBUILD b/staging/gd/PKGBUILD
new file mode 100644
index 000000000..d2c40835a
--- /dev/null
+++ b/staging/gd/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 146845 2012-01-18 20:23:55Z ibiru $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+
+pkgname=gd
+pkgver=2.0.36RC1
+pkgrel=5
+pkgdesc="Library for the dynamic creation of images by programmers"
+arch=('i686' 'x86_64')
+url="http://www.libgd.org/"
+license=('custom')
+depends=('libpng' 'fontconfig' 'libjpeg')
+optdepends=('perl: bdftogd script')
+options=('!libtool')
+source=("ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'libpng14.patch')
+md5sums=('e876979ca3130623a4e7866d9579171a'
+ '7921556f4960e8d66cf4fb67ea7101b5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i ${srcdir}/libpng14.patch
+ ./configure --prefix=/usr --without-xpm
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/gd/libpng14.patch b/staging/gd/libpng14.patch
new file mode 100644
index 000000000..19a3fda91
--- /dev/null
+++ b/staging/gd/libpng14.patch
@@ -0,0 +1,12 @@
+diff -Nur gd-2.0.36RC1.orig/gd_png.c gd-2.0.36RC1/gd_png.c
+--- gd-2.0.36RC1.orig/gd_png.c 2007-11-27 10:30:34.000000000 +0200
++++ gd-2.0.36RC1/gd_png.c 2010-01-17 17:14:11.000000000 +0200
+@@ -151,7 +151,7 @@
+ return NULL;
+ }
+
+- if (!png_check_sig (sig, 8)) { /* bad signature */
++ if (png_sig_cmp (sig, 0, 8)) { /* bad signature */
+ return NULL; /* bad signature */
+ }
+
diff --git a/staging/gdk-pixbuf2/PKGBUILD b/staging/gdk-pixbuf2/PKGBUILD
new file mode 100644
index 000000000..bf38ef13e
--- /dev/null
+++ b/staging/gdk-pixbuf2/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 146826 2012-01-18 19:45:40Z ibiru $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+pkgname=gdk-pixbuf2
+pkgver=2.24.1
+pkgrel=2
+pkgdesc="An image loading library"
+arch=('i686' 'x86_64')
+url="http://www.gtk.org/"
+license=('GPL2')
+depends=('glib2' 'libpng' 'libtiff' 'libjpeg' 'libx11')
+makedepends=('gtk-doc' 'gobject-introspection')
+options=('!libtool')
+install=gdk-pixbuf2.install
+source=(http://download.gnome.org/sources/gdk-pixbuf/2.24/gdk-pixbuf-$pkgver.tar.xz)
+sha256sums=('da7a3f00db360913716368e19e336402755cafa93769f3cfa28a969303e4bee1')
+
+build() {
+ cd "$srcdir/gdk-pixbuf-$pkgver"
+
+ ./configure --prefix=/usr \
+ --without-libjasper \
+ --with-x11 \
+ --with-included-loaders=png
+ make
+}
+
+package() {
+ cd "$srcdir/gdk-pixbuf-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/gdk-pixbuf2/gdk-pixbuf2.install b/staging/gdk-pixbuf2/gdk-pixbuf2.install
new file mode 100644
index 000000000..1b35942cb
--- /dev/null
+++ b/staging/gdk-pixbuf2/gdk-pixbuf2.install
@@ -0,0 +1,11 @@
+post_install() {
+ usr/bin/gdk-pixbuf-query-loaders --update-cache
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ rm -f usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/loaders.cache
+}
diff --git a/staging/gegl/PKGBUILD b/staging/gegl/PKGBUILD
new file mode 100644
index 000000000..9fecb8b2e
--- /dev/null
+++ b/staging/gegl/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 146879 2012-01-19 03:20:59Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=gegl
+pkgver=0.1.8
+pkgrel=2
+pkgdesc="Graph based image processing framework"
+arch=('i686' 'x86_64')
+url="http://www.gegl.org/"
+license=('GPL3' 'LGPL3')
+depends=('babl' 'gtk2')
+makedepends=('ruby' 'lua' 'openexr' 'ffmpeg' 'librsvg' 'jasper' 'exiv2')
+optdepends=('openexr: for using the openexr plugin' \
+ 'ffmpeg: for using the ffmpeg plugin' \
+ 'librsvg: for using the svg plugin' \
+ 'jasper: for using the jasper plugin')
+options=('!libtool')
+source=(ftp://ftp.gimp.org/pub/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('3d4d902580f5c5122b01b5188b6b5da03089ecac')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --with-sdl --with-openexr --with-librsvg \
+ --with-libavformat --with-jasper --disable-docs
+ make
+}
+
+#check() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# make check
+#}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/gif2png/PKGBUILD b/staging/gif2png/PKGBUILD
new file mode 100644
index 000000000..2e530eaba
--- /dev/null
+++ b/staging/gif2png/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 146933 2012-01-19 11:45:57Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: eric <eric@archlinux.org>
+# Contributor: Andrew Rose <ody@netrux.com>
+
+pkgname=gif2png
+pkgver=2.5.4
+pkgrel=3
+pkgdesc="A GIF to PNG image format converter"
+arch=('i686' 'x86_64')
+url="http://www.catb.org/~esr/gif2png/"
+license=('ZLIB')
+depends=('libpng')
+optdepends=('python2: for using web2png')
+source=("http://www.catb.org/~esr/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'gif2png-2.5.4-libpng15.patch')
+md5sums=('d63ea3fc6b6119589e8d4d6fead30df9'
+ 'd4d6d31e04e7448315eae56bb12d4df6')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i 's#env python#env python2#' web2png
+ patch -Np0 -i ${srcdir}/gif2png-2.5.4-libpng15.patch
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/staging/gif2png/gif2png-2.5.4-libpng15.patch b/staging/gif2png/gif2png-2.5.4-libpng15.patch
new file mode 100644
index 000000000..9e5c333bb
--- /dev/null
+++ b/staging/gif2png/gif2png-2.5.4-libpng15.patch
@@ -0,0 +1,43 @@
+ftp://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/graphics/gif2png/patches/patch-aa
+
+--- gif2png.c
++++ gif2png.c
+@@ -10,6 +10,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h> /* for isatty() */
++#include <zlib.h>
+
+ #if !defined(TRUE)
+ #define FALSE 0
+@@ -120,8 +121,8 @@ int writefile(struct GIFelement *s,struc
+ int colors_used = 0;
+ byte remap[MAXCMSIZE];
+ int low_prec;
+- png_struct *png_ptr = xalloc(sizeof (png_struct));
+- png_info *info_ptr = xalloc(sizeof (png_info));
++ png_struct *png_ptr;
++ png_info *info_ptr;
+ int p;
+ int gray_bitdepth;
+ png_color pal_rgb[MAXCMSIZE], *pltep;
+@@ -136,6 +137,19 @@ int writefile(struct GIFelement *s,struc
+ png_text software;
+ png_text comment;
+
++ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++ if (png_ptr == NULL) {
++ fprintf(stderr, "gif2png: fatal error, out of memory\n");
++ fprintf(stderr, "gif2png: exiting ungracefully\n");
++ exit(1);
++ }
++ info_ptr = png_create_info_struct(png_ptr);
++ if (info_ptr == NULL) {
++ fprintf(stderr, "gif2png: fatal error, out of memory\n");
++ fprintf(stderr, "gif2png: exiting ungracefully\n");
++ exit(1);
++ }
++
+ /* these volatile declarations prevent gcc warnings ("variable might be
+ * clobbered by `longjmp' or `vfork'") */
+ volatile int gray = TRUE;
diff --git a/staging/glhack/PKGBUILD b/staging/glhack/PKGBUILD
new file mode 100644
index 000000000..6ac706ee1
--- /dev/null
+++ b/staging/glhack/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 146929 2012-01-19 10:08:04Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=glhack
+pkgver=1.2
+pkgrel=6
+pkgdesc="A port of Nethack, a single player dungeon exploration game in 2D"
+arch=('i686' 'x86_64')
+url="http://glhack.sourceforge.net/"
+license=('custom')
+depends=('sdl' 'libpng' 'libgl')
+makedepends=('mesa')
+options=('!makeflags')
+install=glhack.install
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz glhack-libpng15.patch)
+sha1sums=('7dc46e6bd4a3c2ec10ab4d314acfbb30cefc6eae'
+ '4cf1a13e76cc1f1eb3708d42c74b85b7f321092d')
+
+build(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 -i ../glhack-libpng15.patch
+ sed -i 's|/usr/lib/games|/usr/share|' include/config.h
+ sed -i 's|/var/lib/games/glhack|/var/games/glhack|' include/unixconf.h
+ sed -i -e 's|PREFIX = /usr|PREFIX = $(DESTDIR)/usr|' Makefile
+ sed -i -e 's|VARDIR = /var/lib/games/glhack|VARDIR = $(DESTDIR)/var/games/glhack|' Makefile
+ sed -i -e 's|/usr/man/man6|$(DESTDIR)/usr/share/man/man6|' doc/Makefile
+ sed -i -e 's|GAMEDIR = $(PREFIX)/lib/games/$(GAME)|GAMEDIR = $(PREFIX)/share/$(GAME)|' Makefile
+
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -d "${pkgdir}"/usr/share/man/man{5,6}
+ make DESTDIR="$pkgdir" install
+ install -D -m644 dat/license "${pkgdir}/usr/share/licenses/${pkgname}/license"
+
+# Renaming man pages which conflicts with nethack
+ cd "${pkgdir}/usr/share/man/man6"
+ for manpage in dgn_comp dlb lev_comp nethack recover; do
+ mv $manpage.6 $manpage-glhack.6
+ done
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ mv "${pkgdir}/usr/share/glhack/glhack" "${pkgdir}/usr/bin/glhack"
+ mv "${pkgdir}/usr/share/glhack/recover_glhack" "${pkgdir}/usr/bin/recover_glhack"
+
+ chown -R root:root "${pkgdir}/usr/share/glhack"
+
+ rm -r "${pkgdir}"/var/games/glhack
+ install -d "${pkgdir}/var/games/glhack/save"
+ chmod -R 775 "${pkgdir}/var/games"
+ chown -R root:games "${pkgdir}/var/games"
+}
diff --git a/staging/glhack/glhack-libpng15.patch b/staging/glhack/glhack-libpng15.patch
new file mode 100644
index 000000000..d8e644d1c
--- /dev/null
+++ b/staging/glhack/glhack-libpng15.patch
@@ -0,0 +1,11 @@
+--- win/gl/gl_image.c.old 2012-01-19 04:01:26.000000000 -0500
++++ win/gl/gl_image.c 2012-01-19 04:03:04.000000000 -0500
+@@ -486,7 +486,7 @@
+ /* set error handling since we are using the setjmp/longjmp method
+ * (this is the normal method of doing things with libpng).
+ */
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ sdlgl_warning("Problem within LibPNG (unknown)\n");
+ goto failed;
diff --git a/staging/glhack/glhack.install b/staging/glhack/glhack.install
new file mode 100644
index 000000000..78e1655bc
--- /dev/null
+++ b/staging/glhack/glhack.install
@@ -0,0 +1,24 @@
+post_install() {
+ touch var/games/glhack/{record,perm,logfile}
+ chown root:games var/games/glhack/{record,perm,logfile}
+ chmod 664 var/games/glhack/{record,perm,logfile}
+}
+
+pre_upgrade() {
+ install -d -m775 var/games/glhack
+ chown root:games var/games/glhack
+ [ -e usr/share/glhack/record ] && cp usr/share/glhack/record var/games/glhack
+ [ -e usr/share/glhack/perm ] && cp usr/share/glhack/perm var/games/glhack
+ [ -e usr/share/glhack/logfile ] && cp usr/share/glhack/logfile var/games/glhack
+ if [ -d usr/share/glhack/save ]; then
+ chmod g-s usr/share/glhack/save
+ mv usr/share/glhack/save var/games/glhack
+ else
+ install -d -m775 var/games/glhack/save
+ fi
+ chown root:games var/games/glhack/save
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/staging/gmime/PKGBUILD b/staging/gmime/PKGBUILD
new file mode 100644
index 000000000..013a38c82
--- /dev/null
+++ b/staging/gmime/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 146576 2012-01-13 20:06:15Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=gmime
+pkgver=2.6.4
+pkgrel=1
+pkgdesc="Core mime parsing library"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://spruce.sourceforge.net/gmime/"
+depends=('glib2' 'gpgme' 'zlib')
+makedepends=('gtk-sharp-2')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
+sha256sums=('2e85076c223fe8bf1392a7c1affa4454cb3bb6dec83016ad6e3230c65533f163')
+
+build() {
+ # get rid of that .wapi errors in fakeroot
+ export MONO_SHARED_DIR="$srcdir/weird"
+ mkdir -p "$MONO_SHARED_DIR"
+
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/graphicsmagick/PKGBUILD b/staging/graphicsmagick/PKGBUILD
new file mode 100644
index 000000000..7ca0a92e3
--- /dev/null
+++ b/staging/graphicsmagick/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 146915 2012-01-19 05:34:57Z bisson $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Anton Leontiev <bunder@t-25.ru>
+
+pkgname=graphicsmagick
+pkgver=1.3.13
+pkgrel=2
+pkgdesc='Image processing system'
+url='http://www.graphicsmagick.org/'
+arch=('i686' 'x86_64')
+license=('MIT')
+makedepends=('perl')
+depends=('bzip2' 'freetype2' 'ghostscript' 'jasper' 'lcms2' 'xz'
+ 'libtiff' 'libwmf' 'libsm' 'libxml2' 'libltdl')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/GraphicsMagick-${pkgver}.tar.xz")
+sha1sums=('b85b21785bb072fd795f7fc6ac902cffae4e96e6')
+
+build() {
+ cd "${srcdir}/GraphicsMagick-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --with-perl \
+ --enable-shared \
+ --disable-static \
+ --with-gs-font-dir=/usr/share/fonts/Type1 \
+
+ make
+}
+
+package() {
+ cd "${srcdir}/GraphicsMagick-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ # Install MIT license
+ install -Dm644 "Copyright.txt" "${pkgdir}/usr/share/licenses/${pkgname}/Copyright.txt"
+
+ # Install perl bindings
+ # The patching was introduced in order to build perl module without installing package itself and
+ # not to introduce unnecessary path into LD_RUN_PATH
+ cd PerlMagick
+ sed -i -e "s:'LDDLFLAGS' => \"\(.*\)\":'LDDLFLAGS' => \"-L${pkgdir}/usr/lib \1\":" Makefile.PL
+ perl Makefile.PL INSTALLDIRS=vendor PREFIX=/usr DESTDIR="${pkgdir}"
+ sed -i -e "s/LDLOADLIBS =/LDLOADLIBS = -lGraphicsMagick/" Makefile
+ make
+ make install
+
+ # Remove perllocal.pod and .packlist
+ rm -rf "${pkgdir}/usr/lib/perl5/core_perl"
+ rm "${pkgdir}/usr/lib/perl5/vendor_perl/auto/Graphics/Magick/.packlist"
+}
diff --git a/staging/graphviz/LICENSE b/staging/graphviz/LICENSE
new file mode 100644
index 000000000..16cc69a52
--- /dev/null
+++ b/staging/graphviz/LICENSE
@@ -0,0 +1,87 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
diff --git a/staging/graphviz/PKGBUILD b/staging/graphviz/PKGBUILD
new file mode 100644
index 000000000..41270f5fb
--- /dev/null
+++ b/staging/graphviz/PKGBUILD
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 146913 2012-01-19 05:23:33Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: kevin <kevin@archlinux.org>
+# Contributor: John Proctor <jproctor@prium.net>
+
+pkgname=graphviz
+pkgver=2.28.0
+pkgrel=7
+pkgdesc='Graph visualization software'
+url='http://www.graphviz.org/'
+license=('custom:EPL')
+arch=('i686' 'x86_64')
+depends=('libltdl' 'gd' 'librsvg' 'libxaw' 'ghostscript' 'pango' 'gts')
+makedepends=('swig' 'mono' 'guile' 'lua' 'ocaml' 'perl' 'php' 'python2' 'r' 'ruby' 'tk' 'qt')
+optdepends=('mono: sharp bindings'
+ 'guile: guile bindings'
+ 'lua: lua bindings'
+ 'ocaml: ocaml bindings'
+ 'perl: perl bindings'
+ 'php: php bindings'
+ 'python2: python bindings'
+ 'r: r bindings'
+ 'ruby: ruby bindings'
+ 'tcl: tcl bindings'
+ 'qt: gvedit')
+source=("${url}/pub/${pkgname}/stable/SOURCES/${pkgname}-${pkgver}.tar.gz"
+ 'LICENSE')
+sha1sums=('4725d88a13e071ee22e632de551d4a55ca08ee7d'
+ 'e78277e502c29abb74b9587a5dc951ec392554ea')
+
+options=('!libtool')
+install=install
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i "/RUBY_INCLUDES=\"/s|\"$| `eval echo -I/usr/include/ruby-1.9.1/{$CARCH-linux,ruby/backward,}`\"|" configure
+ sed -i '/LIBPOSTFIX="64"/d' configure
+ export PYTHON=python2
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # cf. http://www.graphviz.org/License.php
+ install -Dm644 ../LICENSE "${pkgdir}"/usr/share/licenses/graphviz/LICENSE
+}
diff --git a/staging/graphviz/install b/staging/graphviz/install
new file mode 100644
index 000000000..65fba522b
--- /dev/null
+++ b/staging/graphviz/install
@@ -0,0 +1,12 @@
+post_install() {
+ rm -f usr/lib/graphviz/config{,6}
+ usr/bin/dot -c
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ rm -f usr/lib/graphviz/config{,6}
+}
diff --git a/staging/grilo-plugins/PKGBUILD b/staging/grilo-plugins/PKGBUILD
new file mode 100644
index 000000000..53fb29f9b
--- /dev/null
+++ b/staging/grilo-plugins/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 146585 2012-01-13 21:27:23Z heftig $
+# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
+
+pkgname=grilo-plugins
+pkgver=0.1.18
+pkgrel=2
+pkgdesc="Plugins for Grilo"
+url="http://www.gnome.org"
+arch=('i686' 'x86_64')
+license=('LGPL')
+depends=('grilo')
+makedepends=('gupnp-av' 'libgdata' 'libquvi' 'sqlite3' 'gmime' 'libgcrypt'
+ 'rest' 'libtracker-sparql')
+optdepends=('gupnp-av: uPnP plugin'
+ 'libgdata: Youtube plugin'
+ 'libquvi: Youtube plugin'
+ 'sqlite3: Podcasts plugin'
+ 'gmime: Podcasts plugin'
+ 'sqlite3: Bookmarks plugin'
+ 'sqlite3: Metadata store plugin'
+ 'libgcrypt: Vimeo plugin'
+ 'rest: Blip.tv plugin'
+ 'libtracker-sparql: Tracker plugin')
+options=('!libtool' '!emptydirs')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('7e382f402119f4f270380627a2f49b30a6c43a47ecd645bf5ffe4e0cd99a1c79')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --disable-static \
+ --enable-shoutcast
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/gtkglext/PKGBUILD b/staging/gtkglext/PKGBUILD
new file mode 100644
index 000000000..60357e286
--- /dev/null
+++ b/staging/gtkglext/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 146971 2012-01-19 19:43:46Z giovanni $
+# Maintainer:
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=gtkglext
+pkgver=1.2.0
+pkgrel=7
+pkgdesc="opengl extensions for gtk2"
+arch=('i686' 'x86_64')
+url="http://gtkglext.sourceforge.net/"
+license=('LGPL')
+depends=('gtk2' 'mesa' 'libxmu')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/sourceforge/gtkglext/${pkgname}-${pkgver}.tar.bz2"
+ 'gtk2.20.patch')
+md5sums=('ed7ba24ce06a8630c07f2d0ee5f04ab4'
+ 'e5a87ec3f2d0e616c6f32f90c3f7237f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/gtk2.20.patch"
+ sed '/AC_PATH_XTRA/d' -i configure.in
+
+ autoreconf --force --install
+ ./configure --prefix=/usr \
+ --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/gtkglext/gtk2.20.patch b/staging/gtkglext/gtk2.20.patch
new file mode 100644
index 000000000..54b34c11e
--- /dev/null
+++ b/staging/gtkglext/gtk2.20.patch
@@ -0,0 +1,77 @@
+diff -Nur gtkglext-1.2.0.orig/gtk/gtkglwidget.c gtkglext-1.2.0/gtk/gtkglwidget.c
+--- gtkglext-1.2.0.orig/gtk/gtkglwidget.c 2004-02-20 11:38:36.000000000 +0200
++++ gtkglext-1.2.0/gtk/gtkglwidget.c 2010-04-20 19:29:42.941917275 +0300
+@@ -127,7 +127,7 @@
+ * Synchronize OpenGL and window resizing request streams.
+ */
+
+- if (GTK_WIDGET_REALIZED (widget) && private->is_realized)
++ if (gtk_widget_get_realized (widget) && private->is_realized)
+ {
+ gldrawable = gdk_window_get_gl_drawable (widget->window);
+ gdk_gl_drawable_wait_gdk (gldrawable);
+@@ -154,7 +154,7 @@
+ * Remove OpenGL-capability from widget->window.
+ */
+
+- if (GTK_WIDGET_REALIZED (widget))
++ if (gtk_widget_get_realized (widget))
+ gdk_window_unset_gl_capability (widget->window);
+
+ private->is_realized = FALSE;
+@@ -174,7 +174,7 @@
+ */
+
+ toplevel = gtk_widget_get_toplevel (widget);
+- if (GTK_WIDGET_TOPLEVEL (toplevel) && !GTK_WIDGET_REALIZED (toplevel))
++ if (gtk_widget_is_toplevel (toplevel) && !gtk_widget_get_realized (toplevel))
+ {
+ GTK_GL_NOTE (MISC,
+ g_message (" - Install colormap to the top-level window."));
+@@ -194,7 +194,7 @@
+ * Set a background of "None" on window to avoid AIX X server crash.
+ */
+
+- if (GTK_WIDGET_REALIZED (widget))
++ if (gtk_widget_get_realized (widget))
+ {
+ GTK_GL_NOTE (MISC,
+ g_message (" - window->bg_pixmap = %p",
+@@ -250,8 +250,8 @@
+ GTK_GL_NOTE_FUNC ();
+
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
+- g_return_val_if_fail (!GTK_WIDGET_NO_WINDOW (widget), FALSE);
+- g_return_val_if_fail (!GTK_WIDGET_REALIZED (widget), FALSE);
++ g_return_val_if_fail (gtk_widget_get_has_window (widget), FALSE);
++ g_return_val_if_fail (!gtk_widget_get_realized (widget), FALSE);
+ g_return_val_if_fail (GDK_IS_GL_CONFIG (glconfig), FALSE);
+
+ /*
+@@ -432,7 +432,7 @@
+ GTK_GL_NOTE_FUNC ();
+
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
+- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
++ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
+
+ gldrawable = gdk_window_get_gl_drawable (widget->window);
+ if (gldrawable == NULL)
+@@ -474,7 +474,7 @@
+ GLWidgetPrivate *private;
+
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
+- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
++ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
+
+ private = g_object_get_qdata (G_OBJECT (widget), quark_gl_private);
+ if (private == NULL)
+@@ -501,7 +501,7 @@
+ gtk_widget_get_gl_window (GtkWidget *widget)
+ {
+ g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
+- g_return_val_if_fail (GTK_WIDGET_REALIZED (widget), NULL);
++ g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
+
+ return gdk_window_get_gl_window (widget->window);
+ }
diff --git a/staging/hugin/PKGBUILD b/staging/hugin/PKGBUILD
new file mode 100644
index 000000000..f481c13d3
--- /dev/null
+++ b/staging/hugin/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 146975 2012-01-19 20:40:48Z eric $
+# Maintainer: Tobias Kieslich <tobias@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Dominik Ryba <domryba@post.pl>
+
+pkgname=hugin
+pkgver=2011.4.0
+pkgrel=1
+pkgdesc="A frontend to the panorama-tools"
+arch=('i686' 'x86_64')
+url="http://hugin.sourceforge.net/"
+license=('GPL')
+depends=('wxgtk' 'boost-libs' 'enblend-enfuse' 'exiv2' 'autopano-sift-c'
+ 'lapack' 'desktop-file-utils' 'make' 'perl-image-exiftool')
+makedepends=('zip' 'cmake' 'boost' 'tclap')
+install=hugin.install
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+sha1sums=('21ec7331d5e196aca2a8771d3c9101dd181ad93b')
+
+build() {
+ cd "${srcdir}"
+ mkdir build && cd build
+ cmake "${srcdir}/${pkgname}-${pkgver}" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_EXE_LINKER_FLAGS="-lpthread" \
+ -DENABLE_LAPACK=yes
+ make
+}
+
+package(){
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/hugin/hugin.install b/staging/hugin/hugin.install
new file mode 100644
index 000000000..362749233
--- /dev/null
+++ b/staging/hugin/hugin.install
@@ -0,0 +1,15 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/gnome
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/gnome
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
diff --git a/staging/imagemagick/PKGBUILD b/staging/imagemagick/PKGBUILD
new file mode 100644
index 000000000..91331d359
--- /dev/null
+++ b/staging/imagemagick/PKGBUILD
@@ -0,0 +1,84 @@
+# $Id: PKGBUILD 146973 2012-01-19 20:16:27Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgbase=imagemagick
+pkgname=('imagemagick' 'imagemagick-doc')
+pkgver=6.7.4.7
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://www.imagemagick.org/"
+license=('custom')
+depends=('perl' 'libltdl' 'lcms2' 'libxt' 'fontconfig' 'libxext' 'libjpeg-turbo')
+makedepends=('ghostscript' 'openexr' 'libwmf' 'librsvg' 'libxml2' 'jasper' 'libpng')
+source=(ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-${pkgver%.*}-${pkgver##*.}.tar.xz \
+ perlmagick.rpath.patch)
+sha1sums=('87cde464a569d8b34ef8edae817fbe4f51f8c2d0'
+ '23405f80904b1de94ebd7bd6fe2a332471b8c283')
+
+build() {
+ cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
+
+ sed '/AC_PATH_XTRA/d' -i configure.ac
+ autoreconf
+ patch -p0 -i ../perlmagick.rpath.patch
+
+ LIBS="$LIBS -L/usr/lib/perl5/core_perl/CORE -lperl" \
+ ./configure --prefix=/usr --sysconfdir=/etc --with-modules --disable-static \
+ --enable-openmp --with-wmf --with-openexr --with-xml --with-lcms2 --with-jp2 \
+ --with-gslib --with-gs-font-dir=/usr/share/fonts/Type1 \
+ --with-perl --with-perl-options="INSTALLDIRS=vendor" \
+ --without-gvc --without-djvu --without-autotrace --without-webp \
+ --without-jbig --without-fpx --without-dps --without-fftw --without-lqr
+ make
+}
+
+check() {
+ cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
+ make check
+}
+
+package_imagemagick() {
+ pkgdesc="An image viewing/manipulation program"
+ optdepends=('ghostscript: for Ghostscript support'
+ 'openexr: for OpenEXR support'
+ 'libwmf: for WMF support'
+ 'librsvg: for SVG support'
+ 'libxml2: for XML support'
+ 'jasper: for JPEG-2000 support'
+ 'libpng: for PNG support')
+ backup=('etc/ImageMagick/coder.xml'
+ 'etc/ImageMagick/colors.xml'
+ 'etc/ImageMagick/delegates.xml'
+ 'etc/ImageMagick/log.xml'
+ 'etc/ImageMagick/magic.xml'
+ 'etc/ImageMagick/mime.xml'
+ 'etc/ImageMagick/policy.xml'
+ 'etc/ImageMagick/sRGB.icc'
+ 'etc/ImageMagick/thresholds.xml'
+ 'etc/ImageMagick/type.xml'
+ 'etc/ImageMagick/type-dejavu.xml'
+ 'etc/ImageMagick/type-ghostscript.xml'
+ 'etc/ImageMagick/type-windows.xml')
+ options=('!makeflags' '!docs' 'libtool')
+
+ cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
+ make DESTDIR="${pkgdir}" install
+ chmod 755 "${pkgdir}/usr/lib/perl5/vendor_perl/auto/Image/Magick/Magick.so"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/imagemagick/LICENSE"
+ install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/imagemagick/NOTICE"
+
+#Cleaning
+ find "${pkgdir}" -name '*.bs' -delete
+ rm -f "${pkgdir}"/usr/lib/*.la
+}
+
+package_imagemagick-doc() {
+ pkgdesc="The ImageMagick documentation (utilities manuals and libraries API)"
+ depends=()
+ options=('!makeflags')
+
+ cd "${srcdir}"/ImageMagick-${pkgver%.*}-${pkgver##*.}
+ make DESTDIR="${pkgdir}" install-data-html
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/imagemagick-doc/LICENSE"
+ install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/imagemagick-doc/NOTICE"
+}
diff --git a/staging/imagemagick/perlmagick.rpath.patch b/staging/imagemagick/perlmagick.rpath.patch
new file mode 100644
index 000000000..958c0f2ee
--- /dev/null
+++ b/staging/imagemagick/perlmagick.rpath.patch
@@ -0,0 +1,10 @@
+--- Makefile.in.orig 2009-05-26 16:22:11.000000000 -0300
++++ Makefile.in 2009-05-26 16:23:27.000000000 -0300
+@@ -10067,6 +10067,7 @@
+
+ @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@$(PERLMAKEFILE): perl-sources $(PERLMAKEMAKER)
+ @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && @PERL@ Makefile.PL $(PERL_MAKE_OPTIONS)
++@WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && @SED@ -i 's|LD_RUN_PATH|DIE_LD_RUN_PATH_DIE|g' Makefile
+
+ @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@install-exec-perl: $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(PERLMAKEFILE)
+ @WITH_PERL_DYNAMIC_TRUE@@WITH_PERL_TRUE@ cd $(PERLMAGICK) && $(MAKE) CC='@CC@' install
diff --git a/staging/imlib/CAN-2004-1026.patch b/staging/imlib/CAN-2004-1026.patch
new file mode 100644
index 000000000..c820270d4
--- /dev/null
+++ b/staging/imlib/CAN-2004-1026.patch
@@ -0,0 +1,510 @@
+diff -urN imlib-1.9.13.orig/Imlib/load.c imlib-1.9.13/Imlib/load.c
+--- imlib-1.9.13.orig/Imlib/load.c Wed Mar 13 19:06:29 2002
++++ imlib-1.9.13/Imlib/load.c Thu Sep 16 17:21:01 2004
+@@ -4,6 +4,8 @@
+ #include "Imlib_private.h"
+ #include <setjmp.h>
+
++#define G_MAXINT ((int) 0x7fffffff)
++
+ /* Split the ID - damages input */
+
+ static char *
+@@ -41,13 +43,17 @@
+
+ /*
+ * Make sure we don't wrap on our memory allocations
++ * we check G_MAXINT/4 because rend.c malloc's w * h * bpp
++ * + 3 is safety margin
+ */
+
+ void * _imlib_malloc_image(unsigned int w, unsigned int h)
+ {
+- if( w > 32767 || h > 32767)
+- return NULL;
+- return malloc(w * h * 3);
++ if (w <= 0 || w > 32767 ||
++ h <= 0 || h > 32767 ||
++ h >= (G_MAXINT/4 - 1) / w)
++ return NULL;
++ return malloc(w * h * 3 + 3);
+ }
+
+ #ifdef HAVE_LIBJPEG
+@@ -360,7 +366,9 @@
+ npix = ww * hh;
+ *w = (int)ww;
+ *h = (int)hh;
+- if(ww > 32767 || hh > 32767)
++ if (ww <= 0 || ww > 32767 ||
++ hh <= 0 || hh > 32767 ||
++ hh >= (G_MAXINT/sizeof(uint32)) / ww)
+ {
+ TIFFClose(tif);
+ return NULL;
+@@ -463,7 +471,7 @@
+ }
+ *w = gif->Image.Width;
+ *h = gif->Image.Height;
+- if (*h > 32767 || *w > 32767)
++ if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+ {
+ return NULL;
+ }
+@@ -965,7 +973,12 @@
+ comment = 0;
+ quote = 0;
+ context = 0;
++ memset(lookup, 0, sizeof(lookup));
++
+ line = malloc(lsz);
++ if (!line)
++ return NULL;
++
+ while (!done)
+ {
+ pc = c;
+@@ -994,25 +1007,25 @@
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM files wth colors > 32766 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM files with characters per pixel > 5 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (*w > 32767)
++ if (*w <= 0 || *w > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
+ free(line);
+ return NULL;
+ }
+- if (*h > 32767)
++ if (*h <= 0 || *h > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
+ free(line);
+@@ -1045,11 +1058,13 @@
+ {
+ int slen;
+ int hascolor, iscolor;
++ int space;
+
+ iscolor = 0;
+ hascolor = 0;
+ tok[0] = 0;
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ s[0] = 0;
+ len = strlen(line);
+ strncpy(cmap[j].str, line, cpp);
+@@ -1072,10 +1087,10 @@
+ {
+ if (k >= len)
+ {
+- if (col[0])
+- strcat(col, " ");
+- if (strlen(col) + strlen(s) < sizeof(col))
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ if (col[0])
+ {
+@@ -1105,14 +1120,17 @@
+ }
+ }
+ }
+- strcpy(tok, s);
++ if (slen < sizeof(tok));
++ strcpy(tok, s);
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ }
+ else
+ {
+- if (col[0])
+- strcat(col, " ");
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -=1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ }
+ }
+@@ -1341,12 +1359,12 @@
+ sscanf(s, "%i %i", w, h);
+ a = *w;
+ b = *h;
+- if (a > 32767)
++ if (a <= 0 || a > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
+ return NULL;
+ }
+- if (b > 32767)
++ if (b <= 0 || b > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
+ return NULL;
+diff -urN imlib-1.9.13.orig/Imlib/utils.c imlib-1.9.13/Imlib/utils.c
+--- imlib-1.9.13.orig/Imlib/utils.c Mon Mar 4 17:45:28 2002
++++ imlib-1.9.13/Imlib/utils.c Thu Sep 16 17:21:15 2004
+@@ -1496,36 +1496,56 @@
+ context = 0;
+ ptr = NULL;
+ end = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ while (!done)
+ {
+ line = data[count++];
++ if (!line)
++ break;
++ line = strdup(line);
++ if (!line)
++ break;
++ len = strlen(line);
++ for (i = 0; i < len; ++i)
++ {
++ c = line[i];
++ if (c < 32)
++ line[i] = 32;
++ else if (c > 127)
++ line[i] = 127;
++ }
++
+ if (context == 0)
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM data wth colors > 32766 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "IMLIB ERROR: XPM data with characters per pixel > 5 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (w > 32767)
++ if (w <= 0 || w > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (h > 32767)
++ if (h <= 0 || h > 32767)
+ {
+ fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+ cmap = malloc(sizeof(struct _cmap) * ncolors);
+@@ -1533,6 +1553,7 @@
+ if (!cmap)
+ {
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->rgb_width = w;
+@@ -1542,6 +1563,7 @@
+ {
+ free(cmap);
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->alpha_data = NULL;
+@@ -1817,6 +1839,7 @@
+ }
+ if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
+ done = 1;
++ free(line);
+ }
+ if (!transp)
+ {
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-gif.c imlib-1.9.13/gdk_imlib/io-gif.c
+--- imlib-1.9.13.orig/gdk_imlib/io-gif.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-gif.c Thu Sep 16 16:11:31 2004
+@@ -55,7 +55,7 @@
+ }
+ *w = gif->Image.Width;
+ *h = gif->Image.Height;
+- if(*h > 32767 || *w > 32767)
++ if(*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
+ {
+ return NULL;
+ }
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-ppm.c imlib-1.9.13/gdk_imlib/io-ppm.c
+--- imlib-1.9.13.orig/gdk_imlib/io-ppm.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-ppm.c Thu Sep 16 16:13:13 2004
+@@ -53,12 +53,12 @@
+ sscanf(s, "%i %i", w, h);
+ a = *w;
+ b = *h;
+- if (a > 32767)
++ if (a <= 0 || a > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
+ return NULL;
+ }
+- if (b > 32767)
++ if (b <= 0 || b > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
+ return NULL;
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-tiff.c imlib-1.9.13/gdk_imlib/io-tiff.c
+--- imlib-1.9.13.orig/gdk_imlib/io-tiff.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-tiff.c Thu Sep 16 16:13:57 2004
+@@ -36,7 +36,9 @@
+ npix = ww * hh;
+ *w = (int)ww;
+ *h = (int)hh;
+- if(ww > 32767 || hh > 32767)
++ if (ww <= 0 || ww > 32767 ||
++ hh <= 0 || hh > 32767 ||
++ hh >= (G_MAXINT/sizeof(uint32)) / ww)
+ {
+ TIFFClose(tif);
+ return NULL;
+diff -urN imlib-1.9.13.orig/gdk_imlib/io-xpm.c imlib-1.9.13/gdk_imlib/io-xpm.c
+--- imlib-1.9.13.orig/gdk_imlib/io-xpm.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/io-xpm.c Thu Sep 16 17:08:24 2004
+@@ -40,8 +40,12 @@
+ context = 0;
+ i = j = 0;
+ cmap = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ line = malloc(lsz);
++ if (!line)
++ return NULL;
++
+ while (!done)
+ {
+ pc = c;
+@@ -70,25 +74,25 @@
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM files wth colors > 32766 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM files with characters per pixel > 5 not supported\n");
+ free(line);
+ return NULL;
+ }
+- if (*w > 32767)
++ if (*w <= 0 || *w > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
+ free(line);
+ return NULL;
+ }
+- if (*h > 32767)
++ if (*h <= 0 || *h > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
+ free(line);
+@@ -120,11 +124,13 @@
+ {
+ int slen;
+ int hascolor, iscolor;
++ int space;
+
+ hascolor = 0;
+ iscolor = 0;
+ tok[0] = 0;
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ s[0] = 0;
+ len = strlen(line);
+ strncpy(cmap[j].str, line, cpp);
+@@ -147,10 +153,10 @@
+ {
+ if (k >= len)
+ {
+- if (col[0])
+- strcat(col, " ");
+- if (strlen(col) + strlen(s) < sizeof(col))
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strncat(col, " ", space), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ if (col[0])
+ {
+@@ -180,14 +186,17 @@
+ }
+ }
+ }
+- strcpy(tok, s);
++ if (slen < sizeof(tok))
++ strcpy(tok, s);
+ col[0] = 0;
++ space = sizeof(col) - 1;
+ }
+ else
+ {
+- if (col[0])
+- strcat(col, " ");
+- strcat(col, s);
++ if (col[0] && space > 0)
++ strcat(col, " "), space -= 1;
++ if (slen <= space)
++ strcat(col, s), space -= slen;
+ }
+ }
+ }
+diff -urN imlib-1.9.13.orig/gdk_imlib/misc.c imlib-1.9.13/gdk_imlib/misc.c
+--- imlib-1.9.13.orig/gdk_imlib/misc.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/misc.c Thu Sep 16 16:35:32 2004
+@@ -1355,11 +1355,16 @@
+
+ /*
+ * Make sure we don't wrap on our memory allocations
++ * we check G_MAX_INT/4 because rend.c malloc's w * h * bpp
++ * + 3 is safety margin
+ */
+
+ void *_gdk_malloc_image(unsigned int w, unsigned int h)
+ {
+- if( w > 32767 || h > 32767)
++ if (w <= 0 || w > 32767 ||
++ h <= 0 || h > 32767 ||
++ h >= (G_MAXINT/4 - 1) / w)
+ return NULL;
+- return malloc(w * h * 3);
++ return malloc(w * h * 3 + 3);
+ }
++
+diff -urN imlib-1.9.13.orig/gdk_imlib/utils.c imlib-1.9.13/gdk_imlib/utils.c
+--- imlib-1.9.13.orig/gdk_imlib/utils.c Mon Mar 4 17:26:51 2002
++++ imlib-1.9.13/gdk_imlib/utils.c Thu Sep 16 17:28:35 2004
+@@ -1236,36 +1236,56 @@
+ context = 0;
+ ptr = NULL;
+ end = NULL;
++ memset(lookup, 0, sizeof(lookup));
+
+ while (!done)
+ {
+ line = data[count++];
++ if (!line)
++ break;
++ line = strdup(line);
++ if (!line)
++ break;
++ len = strlen(line);
++ for (i = 0; i < len; ++i)
++ {
++ c = line[i];
++ if (c < 32)
++ line[i] = 32;
++ else if (c > 127)
++ line[i] = 127;
++ }
++
+ if (context == 0)
+ {
+ /* Header */
+ sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
+- if (ncolors > 32766)
++ if (ncolors <= 0 || ncolors > 32766)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM data wth colors > 32766 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (cpp > 5)
++ if (cpp <= 0 || cpp > 5)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: XPM data with characters per pixel > 5 not supported\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (w > 32767)
++ if (w <= 0 || w > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+- if (h > 32767)
++ if (h <= 0 || h > 32767)
+ {
+ fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for data\n");
+ free(im);
++ free(line);
+ return NULL;
+ }
+ cmap = malloc(sizeof(struct _cmap) * ncolors);
+@@ -1273,6 +1293,7 @@
+ if (!cmap)
+ {
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->rgb_width = w;
+@@ -1282,6 +1303,7 @@
+ {
+ free(cmap);
+ free(im);
++ free(line);
+ return NULL;
+ }
+ im->alpha_data = NULL;
+@@ -1355,7 +1377,7 @@
+ strcpy(col + colptr, " ");
+ colptr++;
+ }
+- if (colptr + ls <= sizeof(col))
++ if (colptr + ls < sizeof(col))
+ {
+ strcpy(col + colptr, s);
+ colptr += ls;
+@@ -1558,6 +1580,7 @@
+ }
+ if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
+ done = 1;
++ free(line);
+ }
+ if (!transp)
+ {
diff --git a/staging/imlib/PKGBUILD b/staging/imlib/PKGBUILD
new file mode 100644
index 000000000..a24025502
--- /dev/null
+++ b/staging/imlib/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 146849 2012-01-18 20:31:10Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=imlib
+pkgver=1.9.15
+pkgrel=11
+pkgdesc="General image handling library for X11 and Gtk"
+arch=('i686' 'x86_64')
+url="http://freshmeat.net/projects/imlib/"
+license=('GPL')
+depends=('gtk' 'giflib' 'libpng' 'libtiff')
+makedepends=('libxt')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/imlib/1.9/${pkgname}-${pkgver}.tar.bz2
+ debian-bug448360.patch CAN-2004-1026.patch aclocal-fixes.patch imlib-1.9.15-libpng15.patch)
+sha1sums=('c9a732a354fbb3c7e1a426e5d19fc92d73f8f720'
+ 'fe2fd9ce4d7bc62271e724153de39012de8ec5ee'
+ 'ec1b47281c1a7fb21abe841f948ecc56ed13f310'
+ 'af54cb1ee0c8c6122b277284ebdd1022e31df3b5'
+ '33c3aaa43eb624f2a6ab0406285a8515903333e3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/debian-bug448360.patch"
+ patch -p1 -i "${srcdir}/CAN-2004-1026.patch"
+ patch -p0 -i "${srcdir}/aclocal-fixes.patch"
+ patch -p0 -i "${srcdir}/imlib-1.9.15-libpng15.patch"
+ sed '/AC_PATH_XTRA/d' -i configure.in
+ libtoolize --force
+ cp /usr/bin/libtool .
+ autoreconf --force --install
+ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --enable-shm --disable-static
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/imlib/aclocal-fixes.patch b/staging/imlib/aclocal-fixes.patch
new file mode 100644
index 000000000..04ef737e7
--- /dev/null
+++ b/staging/imlib/aclocal-fixes.patch
@@ -0,0 +1,20 @@
+--- imlib.m4.orig 2006-03-05 12:41:14.000000000 +0000
++++ imlib.m4 2006-03-05 12:44:15.000000000 +0000
+@@ -6,7 +6,7 @@
+ dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_IMLIB,
++AC_DEFUN([AM_PATH_IMLIB],
+ [dnl
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
+@@ -164,7 +164,7 @@
+ ])
+
+ # Check for gdk-imlib
+-AC_DEFUN(AM_PATH_GDK_IMLIB,
++AC_DEFUN([AM_PATH_GDK_IMLIB],
+ [dnl
+ dnl Get the cflags and libraries from the imlib-config script
+ dnl
diff --git a/staging/imlib/debian-bug448360.patch b/staging/imlib/debian-bug448360.patch
new file mode 100644
index 000000000..f1c0ef111
--- /dev/null
+++ b/staging/imlib/debian-bug448360.patch
@@ -0,0 +1,92 @@
+diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
+--- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
++++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
+@@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
+ visual = gdk_rgb_get_visual();
+ id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
+ id->x.depth = visual->depth; /* the depth of the screen in bpp */
++
++ id->x.shm = 0;
++ id->x.shmp = 0;
++ id->max_shm = 0;
+ #ifdef HAVE_SHM
+ if (XShmQueryExtension(id->x.disp))
+ {
+@@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
+ id->x.last_xim = NULL;
+ id->x.last_sxim = NULL;
+ id->max_shm = 0x7fffffff;
+- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++ if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
++ (pm == True))
+ id->x.shmp = 1;
+ }
+ }
+ }
+- else
+ #endif
+- {
+- id->x.shm = 0;
+- id->x.shmp = 0;
+- }
++
+ id->cache.on_image = 0;
+ id->cache.size_image = 0;
+ id->cache.num_image = 0;
+@@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
+ }
+ if (p->flags & PARAMS_SHAREDPIXMAPS)
+ {
+- if (id->x.shm)
+- id->x.shmp = p->sharedpixmaps;
++ if (!p->sharedpixmaps)
++ id->x.shmp = 0;
+ }
+ if (p->flags & PARAMS_PALETTEOVERRIDE)
+ override = p->paletteoverride;
+diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
+--- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
++++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
+@@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
+ id->x.root = DefaultRootWindow(disp); /* the root window id */
+ id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
+ id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
++
++ id->x.shm = 0;
++ id->x.shmp = 0;
++ id->max_shm = 0;
+ #ifdef HAVE_SHM
+ if (XShmQueryExtension(id->x.disp))
+ {
+@@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
+ id->x.last_xim = NULL;
+ id->x.last_sxim = NULL;
+ id->max_shm = 0x7fffffff;
+- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
++ if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
++ (pm == True)))
+ id->x.shmp = 1;
+ }
+ }
+ }
+- else
+ #endif
+- {
+- id->x.shm = 0;
+- id->x.shmp = 0;
+- }
++
+ id->cache.on_image = 0;
+ id->cache.size_image = 0;
+ id->cache.num_image = 0;
+@@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
+ }
+ if (p->flags & PARAMS_SHAREDPIXMAPS)
+ {
+- if (id->x.shm)
+- id->x.shmp = p->sharedpixmaps;
++ if (!p->sharedpixmaps)
++ id->x.shmp = 0;
+ }
+ if (p->flags & PARAMS_PALETTEOVERRIDE)
+ override = p->paletteoverride;
diff --git a/staging/imlib/imlib-1.9.15-libpng15.patch b/staging/imlib/imlib-1.9.15-libpng15.patch
new file mode 100644
index 000000000..7837cd488
--- /dev/null
+++ b/staging/imlib/imlib-1.9.15-libpng15.patch
@@ -0,0 +1,142 @@
+--- gdk_imlib/io-png.c
++++ gdk_imlib/io-png.c
+@@ -40,13 +40,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -275,13 +275,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -301,6 +301,9 @@
+ /* Setup Translators */
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ png_set_expand(png_ptr);
++ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
++ png_set_expand(png_ptr);
++
+ png_set_strip_16(png_ptr);
+ png_set_packing(png_ptr);
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
+@@ -440,13 +443,13 @@
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -635,7 +638,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+--- Imlib/load.c
++++ Imlib/load.c
+@@ -197,12 +197,12 @@
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+@@ -260,7 +260,8 @@
+ png_read_image(png_ptr, lines);
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ ptr = data;
+- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ if (color_type == PNG_COLOR_TYPE_GRAY
++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+ for (y = 0; y < *h; y++)
+ {
+@@ -285,6 +286,7 @@
+ }
+ }
+ }
++#if 0
+ else if (color_type == PNG_COLOR_TYPE_GRAY)
+ {
+ for (y = 0; y < *h; y++)
+@@ -300,6 +302,7 @@
+ }
+ }
+ }
++#endif
+ else
+ {
+ for (y = 0; y < *h; y++)
+--- Imlib/save.c
++++ Imlib/save.c
+@@ -342,7 +342,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ fclose(f);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+--- Imlib/utils.c
++++ Imlib/utils.c
+@@ -1981,14 +1981,13 @@
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+-
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
+ }
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
diff --git a/staging/kdelibs3/PKGBUILD b/staging/kdelibs3/PKGBUILD
new file mode 100644
index 000000000..e59d262b1
--- /dev/null
+++ b/staging/kdelibs3/PKGBUILD
@@ -0,0 +1,94 @@
+# $Id: PKGBUILD 146921 2012-01-19 08:17:01Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=kdelibs3
+pkgver=3.5.10
+pkgrel=12
+pkgdesc='KDE3 Core Libraries'
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL')
+depends=('libxslt' 'pcre' 'libart-lgpl' 'alsa-lib' 'libcups' 'jasper'
+ 'libidn' 'openexr' 'aspell' 'qt3' 'ca-certificates')
+makedepends=('cups' 'hspell')
+optdepends=('hspell: for Hebrew spell-checking support')
+options=('libtool')
+install=kdelibs3.install
+source=("ftp://ftp.kde.org/pub/kde/stable/${pkgver}/src/kdelibs-${pkgver}.tar.bz2"
+ 'ftp://ftp.archlinux.org/other/kde/kde-3.5-1074156.patch.gz'
+ 'acinclude.patch'
+ 'kde3.profile'
+ 'kde4-compatibility.patch'
+ 'kconf_updaterc'
+ 'openssl.patch'
+ 'kdelibs3-missing-include.patch')
+sha1sums=('c930a25f4419134def55b8466c3a6f737227fb82'
+ 'c8ca21e4848a627760746d0a8a64bf4f90684c3e'
+ '50c9de71b102507fb78b192ecc22a5fc3e031bc3'
+ 'fbd6e773edf3e8bb8e1272629984025e041da2ca'
+ '5fbbf7a5e2032878815fa055bfb5020f478d2b25'
+ '35e56fe4c5f71685e64b13f448dcacc620166e06'
+ '50e92950498463defb9149ffcf8cbc2e8cd1063b'
+ 'e5f5b8c060a2db9cedb82bf18caadfa869921779')
+
+build() {
+ cd "$srcdir"/kdelibs-${pkgver}
+
+ . /etc/profile.d/qt3.sh
+ . "$srcdir"/kde3.profile
+
+ patch -p0 -i "$srcdir"/kde-3.5-1074156.patch
+ patch -p1 -i "$srcdir"/acinclude.patch
+ patch -p1 -i "$srcdir"/kde4-compatibility.patch
+ patch -p1 -i "${srcdir}"/openssl.patch
+ patch -p0 -i "$srcdir"/kdelibs3-missing-include.patch
+
+ sed -iautomake -e 's|automake\*1.10\*|automake\*1.1[0-5]\*|' admin/cvs.sh
+ make -f admin/Makefile.common cvs
+
+ ./configure --prefix=/opt/kde \
+ --with-distribution='Arch Linux' \
+ --with-alsa \
+ --disable-debug \
+ --disable-dnssd \
+ --disable-dnotify \
+ --enable-inotify \
+ --enable-sendfile \
+ --without-lua \
+ --with-hspell \
+ --enable-gcc-hidden-visibility \
+ --enable-final \
+ --enable-new-ldflags LDFLAGS="${LDFLAGS} -L/opt/qt/lib" \
+ --without-arts \
+ --disable-libfam
+ make
+}
+
+package() {
+ cd "$srcdir"/kdelibs-${pkgver}
+
+ make DESTDIR="$pkgdir" install
+
+ # disable broken kconf_update by default
+ install -D -m644 "$srcdir"/kconf_updaterc \
+ "$pkgdir"/opt/kde/share/config/kconf_updaterc
+
+ # install KDE3 profile
+ install -D -m755 "$srcdir"/kde3.profile "$pkgdir"/etc/profile.d/kde3.sh
+ # make KDE3 styles available to Qt3
+ install -d -m755 "$pkgdir"/opt/qt/plugins
+ ln -sf /opt/kde/lib/kde3/plugins/styles "$pkgdir"/opt/qt/plugins/styles
+
+ # cert bundle seems to be hardcoded
+ # link it to the one from ca-certificates
+ rm -f "$pkgdir"/opt/kde/share/apps/kssl/ca-bundle.crt
+ ln -sf /etc/ssl/certs/ca-certificates.crt "$pkgdir"/opt/kde/share/apps/kssl/ca-bundle.crt
+
+ # we don't have khelpcenter anyway
+ rm -rf "$pkgdir"/opt/kde/share/doc
+
+ install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
+ echo '/opt/kde/lib' > "${pkgdir}"/etc/ld.so.conf.d/kdelibs3.conf
+}
diff --git a/staging/kdelibs3/acinclude.patch b/staging/kdelibs3/acinclude.patch
new file mode 100644
index 000000000..0610d6df5
--- /dev/null
+++ b/staging/kdelibs3/acinclude.patch
@@ -0,0 +1,66 @@
+2009-12-10 Stepan Kasal <skasal@redhat.com>
+
+The change of implementation of AC_REQUIRE in 2.64 caused a regression
+in the arts project.
+This can be fixed by shuffling some macro calls.
+
+I suppose that most of this patch will not be needed with a future
+release of Autoconf.
+But the last chunk of this patch is a real bug in this source and
+should go upstream.
+
+--- arts-1.5.10/admin/acinclude.m4.in 2008-08-20 18:07:05.000000000 +0200
++++ arts-1.5.10/admin/acinclude.m4.in 2009-12-09 17:30:57.000000000 +0100
+@@ -3081,8 +3081,18 @@
+ fi
+ ])
+
++AC_DEFUN([AC_CHECK_COMPILERS_CC],
++[
++ dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
++ CFLAGS=" $CFLAGS"
++ AC_PROG_CC
++ CXXFLAGS=" $CXXFLAGS"
++ AC_PROG_CXX
++])
++
+ AC_DEFUN([AC_CHECK_COMPILERS],
+ [
++ AC_REQUIRE([AC_CHECK_COMPILERS_CC])
+ AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
+ [
+@@ -3141,11 +3151,6 @@
+ [kde_use_profiling="no"]
+ )
+
+- dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
+- CFLAGS=" $CFLAGS"
+-
+- AC_PROG_CC
+-
+ AC_PROG_CPP
+
+ if test "$GCC" = "yes"; then
+@@ -3174,10 +3179,6 @@
+ LDFLAGS=""
+ fi
+
+- CXXFLAGS=" $CXXFLAGS"
+-
+- AC_PROG_CXX
+-
+ KDE_CHECK_FOR_BAD_COMPILER
+
+ if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
+@@ -3503,8 +3504,8 @@
+ AC_REQUIRE([AC_LIBTOOL_DLOPEN])
+ AC_REQUIRE([KDE_CHECK_LIB64])
+
+-AC_OBJEXT
+-AC_EXEEXT
++AC_REQUIRE([AC_OBJEXT])
++AC_REQUIRE([AC_EXEEXT])
+
+ AM_PROG_LIBTOOL
+ AC_LIBTOOL_CXX
diff --git a/staging/kdelibs3/kconf_updaterc b/staging/kdelibs3/kconf_updaterc
new file mode 100644
index 000000000..24c2623fb
--- /dev/null
+++ b/staging/kdelibs3/kconf_updaterc
@@ -0,0 +1,2 @@
+updateInfoAdded=false
+autoUpdateDisabled=true
diff --git a/staging/kdelibs3/kde3.profile b/staging/kdelibs3/kde3.profile
new file mode 100755
index 000000000..ef09631ff
--- /dev/null
+++ b/staging/kdelibs3/kde3.profile
@@ -0,0 +1,6 @@
+export PATH=$PATH:/opt/kde/bin
+if [ ! -z $XDG_DATA_DIRS ]; then
+ export XDG_DATA_DIRS=$XDG_DATA_DIRS:/opt/kde/share
+else
+ export XDG_DATA_DIRS=/opt/kde/share
+fi
diff --git a/staging/kdelibs3/kde4-compatibility.patch b/staging/kdelibs3/kde4-compatibility.patch
new file mode 100644
index 000000000..129c314ae
--- /dev/null
+++ b/staging/kdelibs3/kde4-compatibility.patch
@@ -0,0 +1,1012 @@
+diff -Nura kdelibs-3.5.10/kdecore/kcrash.cpp kdelibs-3.5.10.new/kdecore/kcrash.cpp
+--- kdelibs-3.5.10/kdecore/kcrash.cpp 2007-01-15 12:34:17.000000000 +0100
++++ kdelibs-3.5.10.new/kdecore/kcrash.cpp 2009-08-06 06:18:06.000000000 +0200
+@@ -158,7 +158,7 @@
+ int i = 0;
+
+ // argument 0 has to be drkonqi
+- argv[i++] = "drkonqi";
++ argv[i++] = "/usr/lib/kde4/libexec/drkonqi";
+
+ #if defined Q_WS_X11
+ // start up on the correct display
+@@ -325,7 +325,7 @@
+ _exit(253);
+ if(!geteuid() && setuid(getuid()) < 0)
+ _exit(253);
+- execvp("drkonqi", const_cast< char** >( argv ));
++ execvp("/usr/lib/kde4/libexec/drkonqi", const_cast< char** >( argv ));
+ _exit(errno);
+ }
+ else
+diff -Nura kdelibs-3.5.10/kded/Makefile.am kdelibs-3.5.10.new/kded/Makefile.am
+--- kdelibs-3.5.10/kded/Makefile.am 2005-10-10 17:06:29.000000000 +0200
++++ kdelibs-3.5.10.new/kded/Makefile.am 2009-08-06 06:21:37.000000000 +0200
+@@ -58,7 +58,7 @@
+ servicetype_DATA = kdedmodule.desktop
+ servicetypedir = $(kde_servicetypesdir)
+
+-xdg_menu_DATA = applications.menu
++xdg_menu_DATA = kde-applications.menu
+
+ update_DATA = kded.upd
+ updatedir = $(kde_datadir)/kconf_update
+diff -Nura kdelibs-3.5.10/kded/Makefile.in kdelibs-3.5.10.new/kded/Makefile.in
+--- kdelibs-3.5.10/kded/Makefile.in 2008-08-20 18:05:57.000000000 +0200
++++ kdelibs-3.5.10.new/kded/Makefile.in 2009-08-06 06:22:19.000000000 +0200
+@@ -535,7 +535,7 @@
+
+ servicetype_DATA = kdedmodule.desktop
+ servicetypedir = $(kde_servicetypesdir)
+-xdg_menu_DATA = applications.menu
++xdg_menu_DATA = kde-applications.menu
+ update_DATA = kded.upd
+ updatedir = $(kde_datadir)/kconf_update
+ #>- all: all-am
+@@ -1173,7 +1173,7 @@
+ -rm -f kded.moc vfolder_menu.moc kdedmodule.moc kbuildsycoca.moc
+
+ #>+ 2
+-KDE_DIST=DESIGN kded.upd Makefile.in HOWTO vfolder_menu.h applications.menu kded.h kdedmodule.desktop README.kded kctimefactory.h Makefile.am
++KDE_DIST=DESIGN kded.upd Makefile.in HOWTO vfolder_menu.h kde-applications.menu kded.h kdedmodule.desktop README.kded kctimefactory.h Makefile.am
+
+ #>+ 2
+ docs-am:
+diff -Nura kdelibs-3.5.10/kded/applications.menu kdelibs-3.5.10.new/kded/applications.menu
+--- kdelibs-3.5.10/kded/applications.menu 2005-09-10 10:27:40.000000000 +0200
++++ kdelibs-3.5.10.new/kded/applications.menu 1970-01-01 01:00:00.000000000 +0100
+@@ -1,469 +0,0 @@
+- <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
+- "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
+-
+-<Menu>
+- <Name>Applications</Name>
+- <Directory>kde-main.directory</Directory>
+- <!-- Search the default locations -->
+- <KDELegacyDirs/>
+- <DefaultAppDirs/>
+- <DefaultDirectoryDirs/>
+- <DefaultLayout>
+- <Merge type="menus"/>
+- <Merge type="files"/>
+- <Separator/>
+- <Menuname>More</Menuname>
+- </DefaultLayout>
+- <Layout>
+- <Merge type="menus"/>
+- <Menuname>Applications</Menuname>
+- <Merge type="files"/>
+- </Layout>
+-
+- <Menu>
+- <Name>Applications</Name>
+- <Directory>kde-unknown.directory</Directory>
+- <OnlyUnallocated/>
+- <Include>
+- <Not>
+- <!-- Don't list non-KDE core applications -->
+- <And>
+- <Category>Core</Category>
+- <Not><Category>KDE</Category></Not>
+- </And>
+- <!-- Don't list SUSE's YaST in here -->
+- <Category>X-SuSE-YaST</Category>
+- </Not>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Development</Name>
+- <Directory>kde-development.directory</Directory>
+- <Menu>
+- <Name>X-KDE-KDevelopIDE</Name>
+- <Directory>kde-development-kdevelop.directory</Directory>
+- <Include>
+- <And>
+- <Category>Development</Category>
+- <Category>X-KDE-KDevelopIDE</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Translation</Name>
+- <Directory>kde-development-translation.directory</Directory>
+- <Include>
+- <And>
+- <Category>Development</Category>
+- <Category>Translation</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Web Development</Name>
+- <Directory>kde-development-webdevelopment.directory</Directory>
+- <Include>
+- <And>
+- <Category>Development</Category>
+- <Category>WebDevelopment</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Include>
+- <And>
+- <Category>Development</Category>
+- <Not><Category>X-KDE-KDevelopIDE</Category></Not>
+- <Not><Category>Translation</Category></Not>
+- <Not><Category>WebDevelopment</Category></Not>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Science</Name>
+- <Directory>kde-science.directory</Directory>
+- <Include>
+- <And><!-- Include /any/ Science app which is not an Education app -->
+- <Or>
+- <Category>Astronomy</Category>
+- <Category>Biology</Category>
+- <Category>Chemistry</Category>
+- <Category>Geology</Category>
+- <Category>MedicalSoftware</Category>
+- <Category>Physics</Category>
+- <Category>Math</Category>
+- <Category>Science</Category>
+- </Or>
+- <Not><Category>Education</Category></Not>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Edutainment</Name>
+- <Directory>kde-edutainment.directory</Directory>
+- <Menu>
+- <Name>Languages</Name>
+- <Directory>kde-edu-languages.directory</Directory>
+- <Include>
+- <And>
+- <Category>Education</Category>
+- <Or>
+- <Category>Languages</Category>
+- <Category>X-KDE-Edu-Language</Category>
+- </Or>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Mathematics</Name>
+- <Directory>kde-edu-mathematics.directory</Directory>
+- <Include>
+- <And>
+- <Category>Education</Category>
+- <Category>Math</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Miscellaneous</Name>
+- <Directory>kde-edu-miscellaneous.directory</Directory>
+- <Include>
+- <And>
+- <Category>Education</Category>
+- <Not>
+- <Category>Languages</Category>
+- <Category>X-KDE-Edu-Language</Category>
+- <Category>Math</Category>
+- <Category>Science</Category>
+- <Category>Teaching</Category>
+- <Category>X-KDE-Edu-Teaching</Category>
+- </Not>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Science</Name>
+- <Directory>kde-edu-science.directory</Directory>
+- <Include>
+- <And>
+- <Category>Education</Category>
+- <Category>Science</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Tools</Name>
+- <Directory>kde-edu-tools.directory</Directory>
+- <Include>
+- <And>
+- <Category>Education</Category>
+- <Or>
+- <Category>Teaching</Category>
+- <Category>X-KDE-Edu-Teaching</Category>
+- </Or>
+- </And>
+- </Include>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Games</Name>
+- <Directory>kde-games.directory</Directory>
+- <Menu>
+- <Name>Arcade</Name>
+- <Directory>kde-games-arcade.directory</Directory>
+- <Include>
+- <And>
+- <Category>Game</Category>
+- <Category>ArcadeGame</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Board</Name>
+- <Directory>kde-games-board.directory</Directory>
+- <Include>
+- <And>
+- <Category>Game</Category>
+- <Category>BoardGame</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Card</Name>
+- <Directory>kde-games-card.directory</Directory>
+- <Include>
+- <And>
+- <Category>Game</Category>
+- <Category>CardGame</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Kidsgames</Name>
+- <Directory>kde-games-kids.directory</Directory>
+- <Include>
+- <And>
+- <Category>Game</Category>
+- <Or>
+- <Category>X-KDE-KidsGame</Category>
+- <Category>KidsGame</Category>
+- </Or>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>TacticStrategy</Name>
+- <Directory>kde-games-strategy.directory</Directory>
+- <Include>
+- <And>
+- <Category>Game</Category>
+- <Category>StrategyGame</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Include>
+- <And>
+- <Category>Game</Category>
+- <Not>
+- <Category>ArcadeGame</Category>
+- <Category>BoardGame</Category>
+- <Category>CardGame</Category>
+- <Category>X-KDE-KidsGame</Category>
+- <Category>KidsGame</Category>
+- <Category>StrategyGame</Category>
+- </Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>Toys</Name>
+- <Directory>kde-toys.directory</Directory>
+- <Include>
+- <Category>Amusement</Category>
+- </Include>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Graphics</Name>
+- <Directory>kde-graphics.directory</Directory>
+- <Include>
+- <And>
+- <Category>Graphics</Category>
+- <Not><Category>X-KDE-More</Category></Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>More</Name>
+- <Directory>kde-more.directory</Directory>
+- <Include>
+- <And>
+- <Category>Graphics</Category>
+- <Category>X-KDE-More</Category>
+- </And>
+- </Include>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Internet</Name>
+- <Directory>kde-internet.directory</Directory>
+- <Include>
+- <And>
+- <Category>Network</Category>
+- <Not><Category>X-KDE-More</Category></Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>Terminal</Name>
+- <Directory>kde-internet-terminal.directory</Directory>
+- </Menu>
+- <Menu>
+- <Name>More</Name>
+- <Directory>kde-more.directory</Directory>
+- <Include>
+- <And>
+- <Category>Network</Category>
+- <Category>X-KDE-More</Category>
+- </And>
+- </Include>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Multimedia</Name>
+- <Directory>kde-multimedia.directory</Directory>
+- <Include>
+- <And>
+- <Category>AudioVideo</Category>
+- <Not><Category>X-KDE-More</Category></Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>More</Name>
+- <Directory>kde-more.directory</Directory>
+- <Include>
+- <And>
+- <Category>AudioVideo</Category>
+- <Category>X-KDE-More</Category>
+- </And>
+- </Include>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Office</Name>
+- <Directory>kde-office.directory</Directory>
+- <Layout>
+- <Merge type="menus"/>
+- <Filename>kde-koshell.desktop</Filename>
+- <Filename>kde-Kontact.desktop</Filename>
+- <Separator/>
+- <Filename>kde-kword.desktop</Filename>
+- <Filename>kde-kspread.desktop</Filename>
+- <Filename>kde-kpresenter.desktop</Filename>
+- <Merge type="files"/>
+- <Separator/>
+- <Menuname>More</Menuname>
+- </Layout>
+- <Include>
+- <And>
+- <Category>Office</Category>
+- <Not><Category>X-KDE-More</Category></Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>More</Name>
+- <Directory>kde-more.directory</Directory>
+- <Include>
+- <And>
+- <Category>Office</Category>
+- <Category>X-KDE-More</Category>
+- </And>
+- </Include>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Settingsmenu</Name>
+- <Directory>kde-settingsmenu.directory</Directory>
+- <Include>
+- <Category>Settings</Category>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>System</Name>
+- <Directory>kde-system.directory</Directory>
+- <Include>
+- <And>
+- <Category>System</Category>
+- <Not><Category>X-KDE-More</Category></Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>More</Name>
+- <Directory>kde-more.directory</Directory>
+- <Include>
+- <And>
+- <Category>System</Category>
+- <Category>X-KDE-More</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>ScreenSavers</Name>
+- <Directory>kde-system-screensavers.directory</Directory>
+- </Menu>
+- <Menu>
+- <Name>Terminal</Name>
+- <Directory>kde-system-terminal.directory</Directory>
+- </Menu>
+- </Menu>
+- <Menu>
+- <Name>Utilities</Name>
+- <Directory>kde-utilities.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Not><Category>Accessibility</Category></Not>
+- <Not><Category>X-KDE-Utilities-Desktop</Category></Not>
+- <Not><Category>X-KDE-Utilities-File</Category></Not>
+- <Not><Category>X-KDE-Utilities-Peripherals</Category></Not>
+- <Not><Category>X-KDE-Utilities-PIM</Category></Not>
+- <Not><Category>X-KDE-More</Category></Not>
+- </And>
+- </Include>
+- <Menu>
+- <Name>Accessibility</Name>
+- <Directory>kde-utilities-accessibility.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Category>Accessibility</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Desktop</Name>
+- <Directory>kde-utilities-desktop.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Category>X-KDE-Utilities-Desktop</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Editors</Name>
+- <Directory>kde-editors.directory</Directory>
+- <Include>
+- <Category>TextEditor</Category>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>File</Name>
+- <Directory>kde-utilities-file.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Category>X-KDE-Utilities-File</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>Peripherals</Name>
+- <Directory>kde-utilities-peripherals.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Category>X-KDE-Utilities-Peripherals</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>PIM</Name>
+- <Directory>kde-utilities-pim.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Category>X-KDE-Utilities-PIM</Category>
+- </And>
+- </Include>
+- </Menu>
+- <Menu>
+- <Name>XUtilities</Name>
+- <Directory>kde-utilities-xutils.directory</Directory>
+- </Menu>
+- <Menu>
+- <Name>More</Name>
+- <Directory>kde-more.directory</Directory>
+- <Include>
+- <And>
+- <Category>Utility</Category>
+- <Category>X-KDE-More</Category>
+- </And>
+- </Include>
+- </Menu>
+- </Menu>
+- <Include>
+- <And>
+- <Category>KDE</Category>
+- <Category>Core</Category>
+- </And>
+- </Include>
+- <DefaultMergeDirs/>
+- <MergeFile>applications-kmenuedit.menu</MergeFile>
+-</Menu>
+diff -Nura kdelibs-3.5.10/kded/kbuildsycoca.cpp kdelibs-3.5.10.new/kded/kbuildsycoca.cpp
+--- kdelibs-3.5.10/kded/kbuildsycoca.cpp 2007-05-14 09:52:43.000000000 +0200
++++ kdelibs-3.5.10.new/kded/kbuildsycoca.cpp 2009-08-06 06:23:48.000000000 +0200
+@@ -379,7 +379,7 @@
+ connect(g_vfolder, SIGNAL(newService(const QString &, KService **)),
+ this, SLOT(slotCreateEntry(const QString &, KService **)));
+
+- VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true);
++ VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("kde-applications.menu", true);
+
+ KServiceGroup *entry = g_bsgf->addNew("/", kdeMenu->directoryFile, 0, false);
+ entry->setLayoutInfo(kdeMenu->layoutList);
+diff -Nura kdelibs-3.5.10/kded/kde-applications.menu kdelibs-3.5.10.new/kded/kde-applications.menu
+--- kdelibs-3.5.10/kded/kde-applications.menu 1970-01-01 01:00:00.000000000 +0100
++++ kdelibs-3.5.10.new/kded/kde-applications.menu 2005-09-10 10:27:40.000000000 +0200
+@@ -0,0 +1,469 @@
++ <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
++ "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
++
++<Menu>
++ <Name>Applications</Name>
++ <Directory>kde-main.directory</Directory>
++ <!-- Search the default locations -->
++ <KDELegacyDirs/>
++ <DefaultAppDirs/>
++ <DefaultDirectoryDirs/>
++ <DefaultLayout>
++ <Merge type="menus"/>
++ <Merge type="files"/>
++ <Separator/>
++ <Menuname>More</Menuname>
++ </DefaultLayout>
++ <Layout>
++ <Merge type="menus"/>
++ <Menuname>Applications</Menuname>
++ <Merge type="files"/>
++ </Layout>
++
++ <Menu>
++ <Name>Applications</Name>
++ <Directory>kde-unknown.directory</Directory>
++ <OnlyUnallocated/>
++ <Include>
++ <Not>
++ <!-- Don't list non-KDE core applications -->
++ <And>
++ <Category>Core</Category>
++ <Not><Category>KDE</Category></Not>
++ </And>
++ <!-- Don't list SUSE's YaST in here -->
++ <Category>X-SuSE-YaST</Category>
++ </Not>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Development</Name>
++ <Directory>kde-development.directory</Directory>
++ <Menu>
++ <Name>X-KDE-KDevelopIDE</Name>
++ <Directory>kde-development-kdevelop.directory</Directory>
++ <Include>
++ <And>
++ <Category>Development</Category>
++ <Category>X-KDE-KDevelopIDE</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Translation</Name>
++ <Directory>kde-development-translation.directory</Directory>
++ <Include>
++ <And>
++ <Category>Development</Category>
++ <Category>Translation</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Web Development</Name>
++ <Directory>kde-development-webdevelopment.directory</Directory>
++ <Include>
++ <And>
++ <Category>Development</Category>
++ <Category>WebDevelopment</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Include>
++ <And>
++ <Category>Development</Category>
++ <Not><Category>X-KDE-KDevelopIDE</Category></Not>
++ <Not><Category>Translation</Category></Not>
++ <Not><Category>WebDevelopment</Category></Not>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Science</Name>
++ <Directory>kde-science.directory</Directory>
++ <Include>
++ <And><!-- Include /any/ Science app which is not an Education app -->
++ <Or>
++ <Category>Astronomy</Category>
++ <Category>Biology</Category>
++ <Category>Chemistry</Category>
++ <Category>Geology</Category>
++ <Category>MedicalSoftware</Category>
++ <Category>Physics</Category>
++ <Category>Math</Category>
++ <Category>Science</Category>
++ </Or>
++ <Not><Category>Education</Category></Not>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Edutainment</Name>
++ <Directory>kde-edutainment.directory</Directory>
++ <Menu>
++ <Name>Languages</Name>
++ <Directory>kde-edu-languages.directory</Directory>
++ <Include>
++ <And>
++ <Category>Education</Category>
++ <Or>
++ <Category>Languages</Category>
++ <Category>X-KDE-Edu-Language</Category>
++ </Or>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Mathematics</Name>
++ <Directory>kde-edu-mathematics.directory</Directory>
++ <Include>
++ <And>
++ <Category>Education</Category>
++ <Category>Math</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Miscellaneous</Name>
++ <Directory>kde-edu-miscellaneous.directory</Directory>
++ <Include>
++ <And>
++ <Category>Education</Category>
++ <Not>
++ <Category>Languages</Category>
++ <Category>X-KDE-Edu-Language</Category>
++ <Category>Math</Category>
++ <Category>Science</Category>
++ <Category>Teaching</Category>
++ <Category>X-KDE-Edu-Teaching</Category>
++ </Not>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Science</Name>
++ <Directory>kde-edu-science.directory</Directory>
++ <Include>
++ <And>
++ <Category>Education</Category>
++ <Category>Science</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Tools</Name>
++ <Directory>kde-edu-tools.directory</Directory>
++ <Include>
++ <And>
++ <Category>Education</Category>
++ <Or>
++ <Category>Teaching</Category>
++ <Category>X-KDE-Edu-Teaching</Category>
++ </Or>
++ </And>
++ </Include>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Games</Name>
++ <Directory>kde-games.directory</Directory>
++ <Menu>
++ <Name>Arcade</Name>
++ <Directory>kde-games-arcade.directory</Directory>
++ <Include>
++ <And>
++ <Category>Game</Category>
++ <Category>ArcadeGame</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Board</Name>
++ <Directory>kde-games-board.directory</Directory>
++ <Include>
++ <And>
++ <Category>Game</Category>
++ <Category>BoardGame</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Card</Name>
++ <Directory>kde-games-card.directory</Directory>
++ <Include>
++ <And>
++ <Category>Game</Category>
++ <Category>CardGame</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Kidsgames</Name>
++ <Directory>kde-games-kids.directory</Directory>
++ <Include>
++ <And>
++ <Category>Game</Category>
++ <Or>
++ <Category>X-KDE-KidsGame</Category>
++ <Category>KidsGame</Category>
++ </Or>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>TacticStrategy</Name>
++ <Directory>kde-games-strategy.directory</Directory>
++ <Include>
++ <And>
++ <Category>Game</Category>
++ <Category>StrategyGame</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Include>
++ <And>
++ <Category>Game</Category>
++ <Not>
++ <Category>ArcadeGame</Category>
++ <Category>BoardGame</Category>
++ <Category>CardGame</Category>
++ <Category>X-KDE-KidsGame</Category>
++ <Category>KidsGame</Category>
++ <Category>StrategyGame</Category>
++ </Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>Toys</Name>
++ <Directory>kde-toys.directory</Directory>
++ <Include>
++ <Category>Amusement</Category>
++ </Include>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Graphics</Name>
++ <Directory>kde-graphics.directory</Directory>
++ <Include>
++ <And>
++ <Category>Graphics</Category>
++ <Not><Category>X-KDE-More</Category></Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>More</Name>
++ <Directory>kde-more.directory</Directory>
++ <Include>
++ <And>
++ <Category>Graphics</Category>
++ <Category>X-KDE-More</Category>
++ </And>
++ </Include>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Internet</Name>
++ <Directory>kde-internet.directory</Directory>
++ <Include>
++ <And>
++ <Category>Network</Category>
++ <Not><Category>X-KDE-More</Category></Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>Terminal</Name>
++ <Directory>kde-internet-terminal.directory</Directory>
++ </Menu>
++ <Menu>
++ <Name>More</Name>
++ <Directory>kde-more.directory</Directory>
++ <Include>
++ <And>
++ <Category>Network</Category>
++ <Category>X-KDE-More</Category>
++ </And>
++ </Include>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Multimedia</Name>
++ <Directory>kde-multimedia.directory</Directory>
++ <Include>
++ <And>
++ <Category>AudioVideo</Category>
++ <Not><Category>X-KDE-More</Category></Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>More</Name>
++ <Directory>kde-more.directory</Directory>
++ <Include>
++ <And>
++ <Category>AudioVideo</Category>
++ <Category>X-KDE-More</Category>
++ </And>
++ </Include>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Office</Name>
++ <Directory>kde-office.directory</Directory>
++ <Layout>
++ <Merge type="menus"/>
++ <Filename>kde-koshell.desktop</Filename>
++ <Filename>kde-Kontact.desktop</Filename>
++ <Separator/>
++ <Filename>kde-kword.desktop</Filename>
++ <Filename>kde-kspread.desktop</Filename>
++ <Filename>kde-kpresenter.desktop</Filename>
++ <Merge type="files"/>
++ <Separator/>
++ <Menuname>More</Menuname>
++ </Layout>
++ <Include>
++ <And>
++ <Category>Office</Category>
++ <Not><Category>X-KDE-More</Category></Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>More</Name>
++ <Directory>kde-more.directory</Directory>
++ <Include>
++ <And>
++ <Category>Office</Category>
++ <Category>X-KDE-More</Category>
++ </And>
++ </Include>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Settingsmenu</Name>
++ <Directory>kde-settingsmenu.directory</Directory>
++ <Include>
++ <Category>Settings</Category>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>System</Name>
++ <Directory>kde-system.directory</Directory>
++ <Include>
++ <And>
++ <Category>System</Category>
++ <Not><Category>X-KDE-More</Category></Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>More</Name>
++ <Directory>kde-more.directory</Directory>
++ <Include>
++ <And>
++ <Category>System</Category>
++ <Category>X-KDE-More</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>ScreenSavers</Name>
++ <Directory>kde-system-screensavers.directory</Directory>
++ </Menu>
++ <Menu>
++ <Name>Terminal</Name>
++ <Directory>kde-system-terminal.directory</Directory>
++ </Menu>
++ </Menu>
++ <Menu>
++ <Name>Utilities</Name>
++ <Directory>kde-utilities.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Not><Category>Accessibility</Category></Not>
++ <Not><Category>X-KDE-Utilities-Desktop</Category></Not>
++ <Not><Category>X-KDE-Utilities-File</Category></Not>
++ <Not><Category>X-KDE-Utilities-Peripherals</Category></Not>
++ <Not><Category>X-KDE-Utilities-PIM</Category></Not>
++ <Not><Category>X-KDE-More</Category></Not>
++ </And>
++ </Include>
++ <Menu>
++ <Name>Accessibility</Name>
++ <Directory>kde-utilities-accessibility.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Category>Accessibility</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Desktop</Name>
++ <Directory>kde-utilities-desktop.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Category>X-KDE-Utilities-Desktop</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Editors</Name>
++ <Directory>kde-editors.directory</Directory>
++ <Include>
++ <Category>TextEditor</Category>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>File</Name>
++ <Directory>kde-utilities-file.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Category>X-KDE-Utilities-File</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>Peripherals</Name>
++ <Directory>kde-utilities-peripherals.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Category>X-KDE-Utilities-Peripherals</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>PIM</Name>
++ <Directory>kde-utilities-pim.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Category>X-KDE-Utilities-PIM</Category>
++ </And>
++ </Include>
++ </Menu>
++ <Menu>
++ <Name>XUtilities</Name>
++ <Directory>kde-utilities-xutils.directory</Directory>
++ </Menu>
++ <Menu>
++ <Name>More</Name>
++ <Directory>kde-more.directory</Directory>
++ <Include>
++ <And>
++ <Category>Utility</Category>
++ <Category>X-KDE-More</Category>
++ </And>
++ </Include>
++ </Menu>
++ </Menu>
++ <Include>
++ <And>
++ <Category>KDE</Category>
++ <Category>Core</Category>
++ </And>
++ </Include>
++ <DefaultMergeDirs/>
++ <MergeFile>applications-kmenuedit.menu</MergeFile>
++</Menu>
diff --git a/staging/kdelibs3/kdelibs3-missing-include.patch b/staging/kdelibs3/kdelibs3-missing-include.patch
new file mode 100644
index 000000000..5b84ef746
--- /dev/null
+++ b/staging/kdelibs3/kdelibs3-missing-include.patch
@@ -0,0 +1,10 @@
+--- kdeprint/cups/cupsdconf2/cups-util.c.old 2012-01-19 01:30:26.000000000 -0500
++++ kdeprint/cups/cupsdconf2/cups-util.c 2012-01-19 01:31:33.000000000 -0500
+@@ -2,6 +2,7 @@
+ #include <cups/http.h>
+ #include <cups/cups.h>
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
diff --git a/staging/kdelibs3/kdelibs3.install b/staging/kdelibs3/kdelibs3.install
new file mode 100644
index 000000000..7291ac0a2
--- /dev/null
+++ b/staging/kdelibs3/kdelibs3.install
@@ -0,0 +1,12 @@
+post_install() {
+ post_remove
+}
+
+post_upgrade() {
+ post_remove
+}
+
+post_remove() {
+ # this can be removed in future versions
+ sed -ie '/\/opt\/kde\/lib/d' etc/ld.so.conf
+}
diff --git a/staging/kdelibs3/openssl.patch b/staging/kdelibs3/openssl.patch
new file mode 100644
index 000000000..a948b884a
--- /dev/null
+++ b/staging/kdelibs3/openssl.patch
@@ -0,0 +1,180 @@
+diff -up kdelibs-3.5.10/kio/kssl/kopenssl.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/kopenssl.cc
+--- kdelibs-3.5.10/kio/kssl/kopenssl.cc.ossl-1.x 2009-09-04 23:10:53.000000000 +0200
++++ kdelibs-3.5.10/kio/kssl/kopenssl.cc 2009-09-04 23:10:53.000000000 +0200
+@@ -96,9 +96,14 @@ static int (*K_BIO_write) (BIO *b, cons
+ static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *,
+ const EVP_CIPHER *,unsigned char *,int ,
+ pem_password_cb *, void *) = 0L;
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++static int (*K_ASN1_item_i2d_fp)(ASN1_ITEM *,FILE *,unsigned char *) = 0L;
++static ASN1_ITEM *K_NETSCAPE_X509_it = 0L;
++#else
+ static ASN1_METHOD* (*K_X509_asn1_meth) (void) = 0L;
+ static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = 0L;
+ static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = 0L;
++#endif
+ static int (*K_X509_print_fp) (FILE *, X509*) = 0L;
+ static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = 0L;
+ static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = 0L;
+@@ -430,9 +435,14 @@ KConfig *cfg;
+ K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl");
+ K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write");
+ K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_item_i2d_fp");
++ K_NETSCAPE_X509_it = (ASN1_ITEM *) _cryptoLib->symbol("NETSCAPE_X509_it");
++#else
+ K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth");
+ K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp");
+ K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER");
++#endif
+ K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
+ K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
+ K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
+@@ -594,7 +604,7 @@ KConfig *cfg;
+ K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session");
+ K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION");
+ K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION");
+- K_SSL_get_ciphers = (STACK *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
++ K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
+ #endif
+
+
+@@ -982,7 +992,13 @@ int KOpenSSLProxy::PEM_write_bio_X509(BI
+ else return -1;
+ }
+
+-
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
++ if (K_ASN1_item_i2d_fp && K_NETSCAPE_X509_it)
++ return (K_ASN1_item_i2d_fp)(K_NETSCAPE_X509_it, out, x);
++ else return -1;
++}
++#else
+ ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) {
+ if (K_X509_asn1_meth) return (K_X509_asn1_meth)();
+ else return 0L;
+@@ -994,7 +1010,7 @@ int KOpenSSLProxy::ASN1_i2d_fp(FILE *out
+ return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
+ else return -1;
+ }
+-
++#endif
+
+ int KOpenSSLProxy::X509_print(FILE *fp, X509 *x) {
+ if (K_X509_print_fp) return (K_X509_print_fp)(fp, x);
+diff -up kdelibs-3.5.10/kio/kssl/kopenssl.h.ossl-1.x kdelibs-3.5.10/kio/kssl/kopenssl.h
+--- kdelibs-3.5.10/kio/kssl/kopenssl.h.ossl-1.x 2006-07-22 10:16:39.000000000 +0200
++++ kdelibs-3.5.10/kio/kssl/kopenssl.h 2009-09-04 23:10:53.000000000 +0200
+@@ -48,6 +48,9 @@ class KOpenSSLProxyPrivate;
+ #include <openssl/stack.h>
+ #include <openssl/bn.h>
+ #undef crypt
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++#define STACK _STACK
++#endif
+ #endif
+
+ #include <kstaticdeleter.h>
+@@ -446,12 +449,12 @@ public:
+ */
+ int PEM_write_bio_X509(BIO *bp, X509 *x);
+
+-
++#if OPENSSL_VERSION_NUMBER < 0x10000000L
+ /*
+ * X509_asn1_meth - used for netscape output
+ */
+ ASN1_METHOD *X509_asn1_meth();
+-
++#endif
+
+ /*
+ * ASN1_i2d_fp - used for netscape output
+@@ -531,6 +534,9 @@ public:
+ */
+ void sk_free(STACK *s);
+
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ void sk_free(void *s) { return sk_free(reinterpret_cast<STACK*>(s)); }
++#endif
+
+ /*
+ * Number of elements in the stack
+@@ -543,6 +549,9 @@ public:
+ */
+ char *sk_value(STACK *s, int n);
+
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ char *sk_value(void *s, int n) { return sk_value(reinterpret_cast<STACK*>(s), n); }
++#endif
+
+ /*
+ * Create a new stack
+@@ -555,6 +564,9 @@ public:
+ */
+ int sk_push(STACK *s, char *d);
+
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ int sk_push(void *s, void *d) { return sk_push(reinterpret_cast<STACK*>(s), reinterpret_cast<char*>(d)); }
++#endif
+
+ /*
+ * Duplicate the stack
+diff -up kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc
+--- kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc.ossl-1.x 2005-10-10 17:05:44.000000000 +0200
++++ kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc 2009-09-04 23:10:53.000000000 +0200
+@@ -87,7 +87,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate
+
+
+ STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &certs) {
+- STACK_OF(X509) *x509 = sk_new(NULL);
++ STACK_OF(X509) *x509 = reinterpret_cast<STACK_OF(X509)*>(sk_new(NULL));
+ KSSLCertificate *cert = certs.first();
+ while(cert) {
+ sk_X509_push(x509, cert->getCert());
+diff -up kdelibs-3.5.10/kio/kssl/ksslcertificate.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/ksslcertificate.cc
+--- kdelibs-3.5.10/kio/kssl/ksslcertificate.cc.ossl-1.x 2006-01-19 18:06:12.000000000 +0100
++++ kdelibs-3.5.10/kio/kssl/ksslcertificate.cc 2009-09-04 23:10:53.000000000 +0200
+@@ -1003,17 +1003,31 @@ return qba;
+ QByteArray KSSLCertificate::toNetscape() {
+ QByteArray qba;
+ #ifdef KSSL_HAVE_SSL
+-ASN1_HEADER ah;
+-ASN1_OCTET_STRING os;
+-KTempFile ktf;
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ NETSCAPE_X509 nx;
++ ASN1_OCTET_STRING hdr;
++#else
++ ASN1_HEADER ah;
++ ASN1_OCTET_STRING os;
++#endif
++ KTempFile ktf;
+
+- os.data = (unsigned char *)NETSCAPE_CERT_HDR;
+- os.length = strlen(NETSCAPE_CERT_HDR);
+- ah.header = &os;
+- ah.data = (char *)getCert();
+- ah.meth = d->kossl->X509_asn1_meth();
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ hdr.data = (unsigned char *)NETSCAPE_CERT_HDR;
++ hdr.length = strlen(NETSCAPE_CERT_HDR);
++ nx.header = &hdr;
++ nx.cert = getCert();
++
++ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&nx);
++#else
++ os.data = (unsigned char *)NETSCAPE_CERT_HDR;
++ os.length = strlen(NETSCAPE_CERT_HDR);
++ ah.header = &os;
++ ah.data = (char *)getCert();
++ ah.meth = d->kossl->X509_asn1_meth();
+
+- d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
++ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
++#endif
+
+ ktf.close();
+
diff --git a/staging/lbreakout2/PKGBUILD b/staging/lbreakout2/PKGBUILD
new file mode 100644
index 000000000..814fc5520
--- /dev/null
+++ b/staging/lbreakout2/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 146936 2012-01-19 12:08:17Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=lbreakout2
+pkgver=2.6.3
+pkgrel=3
+pkgdesc="A breakout game with nice effects, graphics, and sounds"
+arch=('i686' 'x86_64')
+url="http://lgames.sourceforge.net"
+license=('GPL')
+depends=('sdl_mixer' 'libpng')
+backup=('var/games/lbreakout2/lbreakout2.hscr')
+source=("http://downloads.sourceforge.net/lgames/${pkgname}-${pkgver/_/-}.tar.gz"
+ 'lbreakout2.desktop'
+ 'lbreakout2.png')
+md5sums=('43900187bc935475cd6489569cd2230a'
+ '14cd34a72a8f4e3b8f385f9023625241'
+ '94e2fa393eb2a7d4494641dec580573b')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver/_/-}
+
+ ./configure --prefix=/usr \
+ --localstatedir=/var/games/lbreakout2
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver/_/-}
+
+ make DESTDIR=${pkgdir}/ doc_dir=/usr/share/doc install
+
+ chmod -R 755 ${pkgdir}/usr
+ chown root:games ${pkgdir}/var/games
+ chmod 775 ${pkgdir}/var/games
+ chown root:games ${pkgdir}/var/games/lbreakout2
+ chmod 755 ${pkgdir}/var/games/lbreakout2
+ chown root:games ${pkgdir}/var/games/lbreakout2/lbreakout2.hscr
+ chmod 775 ${pkgdir}/var/games/lbreakout2/lbreakout2.hscr
+
+ install -Dm644 ${srcdir}/lbreakout2.png ${pkgdir}/usr/share/pixmaps/lbreakout2.png
+ install -Dm644 ${srcdir}/lbreakout2.desktop ${pkgdir}/usr/share/applications/lbreakout2.desktop
+}
diff --git a/staging/lbreakout2/lbreakout2.desktop b/staging/lbreakout2/lbreakout2.desktop
new file mode 100644
index 000000000..c8ef945da
--- /dev/null
+++ b/staging/lbreakout2/lbreakout2.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=Linux Breakout 2
+Comment=Breakout and Arkanoid style arcade game
+Icon=/usr/share/pixmaps/lbreakout2.png
+TryExec=lbreakout2
+Exec=lbreakout2
+Terminal=false
+Categories=Application;Game;
diff --git a/staging/lbreakout2/lbreakout2.png b/staging/lbreakout2/lbreakout2.png
new file mode 100644
index 000000000..f9541e184
--- /dev/null
+++ b/staging/lbreakout2/lbreakout2.png
Binary files differ
diff --git a/staging/lcms/PKGBUILD b/staging/lcms/PKGBUILD
new file mode 100644
index 000000000..bb67c9e75
--- /dev/null
+++ b/staging/lcms/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 146955 2012-01-19 17:30:11Z eric $
+# Maintainer: Tobias Kieslich <neri@archlinux.org>
+# Contributor: Ben <contrasutra@myrealbox.com>
+
+pkgname=lcms
+pkgver=1.19
+pkgrel=2
+pkgdesc="Lightweight color management development library/engine"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('libtiff')
+url="http://www.littlecms.com"
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('8af94611baf20d9646c7c2c285859818')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm 644 COPYING \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/lcms2/PKGBUILD b/staging/lcms2/PKGBUILD
new file mode 100644
index 000000000..e3d08a500
--- /dev/null
+++ b/staging/lcms2/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 146836 2012-01-18 20:10:04Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+
+pkgname=lcms2
+pkgver=2.3
+pkgrel=2
+pkgdesc="Small-footprint color management engine, version 2"
+arch=('i686' 'x86_64')
+license=('MIT')
+depends=('libtiff')
+url="http://www.littlecms.com"
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/lcms/${pkgname}-${pkgver}.tar.gz)
+sha1sums=('67d5fabda2f5777ca8387766539b9c871d993133')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/libgdiplus/PKGBUILD b/staging/libgdiplus/PKGBUILD
new file mode 100644
index 000000000..26c513066
--- /dev/null
+++ b/staging/libgdiplus/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 146859 2012-01-18 21:23:30Z daniel $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+
+pkgname=libgdiplus
+pkgver=2.10
+pkgrel=2
+pkgdesc="An Open Source Implementation of the GDI+ API"
+arch=(i686 x86_64)
+license=('MPL' 'LGPL')
+url="http://www.mono-project.com"
+depends=('libtiff>=3.9.2-2' 'cairo>=1.8.10' 'giflib' 'glib2>=2.24.0' 'libexif')
+makedepends=('pkgconfig')
+options=('!libtool')
+source=(http://download.mono-project.com/sources/${pkgname}/${pkgname}-${pkgver}.tar.bz2 libpng15.patch)
+md5sums=('451966e8f637e3a1f02d1d30f900255d'
+ 'a2d143676bbaceeb88b4c34069e93986')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 <../libpng15.patch
+ ./configure --prefix=/usr --with-cairo=system || return 1
+
+ make || return 1
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install || return 1
+}
diff --git a/staging/libgdiplus/gdiplus-png14.patch b/staging/libgdiplus/gdiplus-png14.patch
new file mode 100644
index 000000000..d13260812
--- /dev/null
+++ b/staging/libgdiplus/gdiplus-png14.patch
@@ -0,0 +1,20 @@
+--- src/pngcodec.c.orig 2010-01-16 23:47:17.000000000 +0100
++++ src/pngcodec.c 2010-01-16 23:49:49.000000000 +0100
+@@ -352,7 +352,7 @@
+ info_ptr->palette[i].blue,
+ info_ptr->palette[i].green,
+ info_ptr->palette[i].red,
+- info_ptr->trans[i]); /* alpha */
++ info_ptr->trans_alpha[i]); /* alpha */
+ }
+ }
+
+@@ -418,7 +418,7 @@
+ }
+
+ if ((color_type == PNG_COLOR_TYPE_GRAY) && (bit_depth < 8)) {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ }
+
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
diff --git a/staging/libgdiplus/libpng15.patch b/staging/libgdiplus/libpng15.patch
new file mode 100644
index 000000000..31a1c0162
--- /dev/null
+++ b/staging/libgdiplus/libpng15.patch
@@ -0,0 +1,164 @@
+$NetBSD: patch-aa,v 1.8 2011/01/21 10:21:51 wiz Exp $
+
+Fix build with png-1.5.
+
+--- src/pngcodec.c.orig 2010-11-03 16:52:54.000000000 +0000
++++ src/pngcodec.c
+@@ -116,10 +116,15 @@ gdip_load_png_properties (png_structp pn
+ bitmap_data->dpi_horz = png_get_x_pixels_per_inch(png_ptr, info_ptr);
+ bitmap_data->dpi_vert = png_get_y_pixels_per_inch(png_ptr, info_ptr);
+ #elif defined(PNG_pHYs_SUPPORTED)
+- if ((info_ptr->valid & PNG_INFO_pHYs) && (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)) {
+- bitmap_data->image_flags |= ImageFlagsHasRealDPI;
+- bitmap_data->dpi_horz = info_ptr->x_pixels_per_unit * 0.0254;
+- bitmap_data->dpi_vert = info_ptr->y_pixels_per_unit * 0.0254;
++ if (png_get_valid (png_ptr, info_ptr, PNG_INFO_pHYs)) {
++ png_uint_32 res_x, res_y;
++ int unit_type;
++ png_get_pHYs (png_ptr, info_ptr, &res_x, &res_y, &unit_type);
++ if (unit_type == PNG_RESOLUTION_METER) {
++ bitmap_data->image_flags |= ImageFlagsHasRealDPI;
++ bitmap_data->dpi_horz = res_x * 0.0254;
++ bitmap_data->dpi_vert = res_y * 0.0254;
++ }
+ }
+ #endif
+ /* default to screen resolution (if nothing was provided or available) */
+@@ -130,7 +135,7 @@ gdip_load_png_properties (png_structp pn
+ #if defined(PNG_iCCP_SUPPORTED)
+ {
+ png_charp name;
+- png_charp profile;
++ png_bytep profile;
+ png_uint_32 proflen;
+ int compression_type;
+
+@@ -292,6 +297,11 @@ gdip_load_png_image_from_file_or_stream
+ ImageFlags colourspace_flag;
+ int i;
+ int j;
++ png_colorp png_palette;
++ int png_num_palette;
++ png_bytep trans_alpha;
++ int num_trans;
++ png_color_16p trans_color;
+
+ width = png_get_image_width (png_ptr, info_ptr);
+ height = png_get_image_height (png_ptr, info_ptr);
+@@ -309,6 +319,8 @@ gdip_load_png_image_from_file_or_stream
+ }
+
+ /* Copy palette. */
++ png_get_PLTE (png_ptr, info_ptr, &png_palette, &png_num_palette);
++
+ num_colours = 1 << bit_depth;
+
+ if (png_get_color_type (png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) {
+@@ -321,8 +333,8 @@ gdip_load_png_image_from_file_or_stream
+ colourspace_flag = ImageFlagsColorSpaceRGB;
+
+ palette_entries = num_colours;
+- if (palette_entries > info_ptr->num_palette) {
+- palette_entries = info_ptr->num_palette;
++ if (palette_entries > png_num_palette) {
++ palette_entries = png_num_palette;
+ }
+
+ palette = GdipAlloc (sizeof(ColorPalette) + (num_colours - 1) * sizeof(ARGB));
+@@ -331,29 +343,30 @@ gdip_load_png_image_from_file_or_stream
+
+ for (i=0; i < palette_entries; i++) {
+ set_pixel_bgra (&palette->Entries[i], 0,
+- info_ptr->palette[i].blue,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].red,
++ png_palette[i].blue,
++ png_palette[i].green,
++ png_palette[i].red,
+ 0xFF); /* alpha */
+ }
+ }
+
++ png_get_tRNS (png_ptr, info_ptr, &trans_alpha, &num_trans, &trans_color);
+ /* Make sure transparency is respected. */
+- if (info_ptr->num_trans > 0) {
++ if (num_trans > 0) {
+ palette->Flags |= PaletteFlagsHasAlpha;
+ colourspace_flag |= ImageFlagsHasAlpha;
+
+- if (info_ptr->num_trans > info_ptr->num_palette) {
+- info_ptr->num_trans = info_ptr->num_palette;
++ if (num_trans > png_num_palette) {
++ num_trans = png_num_palette;
+ }
+
+- for (i=0; i < info_ptr->num_trans; i++) {
++ for (i=0; i < num_trans; i++) {
+ set_pixel_bgra(&palette->Entries[i], 0,
+- info_ptr->palette[i].blue,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].red,
++ png_palette[i].blue,
++ png_palette[i].green,
++ png_palette[i].red,
+ #if PNG_LIBPNG_VER > 10399
+- info_ptr->trans_alpha [i]); /* alpha */
++ trans_alpha [i]); /* alpha */
+ #else
+ info_ptr->trans[i]); /* alpha */
+ #endif
+@@ -398,6 +411,8 @@ gdip_load_png_image_from_file_or_stream
+ BYTE bit_depth;
+ int stride;
+ int interlace;
++ png_colorp png_palette;
++ int png_num_palette;
+ png_bytep *row_pointers;
+ BYTE *rawptr;
+ int i, j;
+@@ -490,32 +505,33 @@ gdip_load_png_image_from_file_or_stream
+ png_byte palette = 0;
+ png_byte pix = *rowp++;
+
++ png_get_PLTE (png_ptr, info_ptr, &png_palette, &png_num_palette);
+ palette = (pix >> 6) & 0x03;
+ set_pixel_bgra (rawptr, 0,
+- info_ptr->palette[palette].blue,
+- info_ptr->palette[palette].green,
+- info_ptr->palette[palette].red,
++ png_palette[palette].blue,
++ png_palette[palette].green,
++ png_palette[palette].red,
+ 0xFF); /* alpha */
+
+ palette = (pix >> 4) & 0x03;
+ set_pixel_bgra (rawptr, 4,
+- info_ptr->palette[palette].blue,
+- info_ptr->palette[palette].green,
+- info_ptr->palette[palette].red,
++ png_palette[palette].blue,
++ png_palette[palette].green,
++ png_palette[palette].red,
+ 0xFF); /* alpha */
+
+ palette = (pix >> 2) & 0x03;
+ set_pixel_bgra (rawptr, 8,
+- info_ptr->palette[palette].blue,
+- info_ptr->palette[palette].green,
+- info_ptr->palette[palette].red,
++ png_palette[palette].blue,
++ png_palette[palette].green,
++ png_palette[palette].red,
+ 0xFF); /* alpha */
+
+ palette = pix & 0x03;
+ set_pixel_bgra (rawptr, 12,
+- info_ptr->palette[palette].blue,
+- info_ptr->palette[palette].green,
+- info_ptr->palette[palette].red,
++ png_palette[palette].blue,
++ png_palette[palette].green,
++ png_palette[palette].red,
+ 0xFF); /* alpha */
+ rawptr += 16;
+ }
diff --git a/staging/libpano13/PKGBUILD b/staging/libpano13/PKGBUILD
new file mode 100644
index 000000000..c4d1054e6
--- /dev/null
+++ b/staging/libpano13/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 146959 2012-01-19 17:50:13Z eric $
+# Maintainer: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=libpano13
+pkgver=2.9.18
+pkgrel=2
+pkgdesc="Basic library to calculate panoramical pictures - core functions of the panotools"
+arch=('i686' 'x86_64')
+url="http://panotools.sourceforge.net/"
+license=('GPL2')
+depends=('libpng' 'libtiff')
+makedepends=('openjdk6')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/sourceforge/panotools/${pkgname}-${pkgver}.tar.gz)
+md5sums=('9c3a4fce8b6f1d79e395896ce5d8776e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --mandir=/usr/share/man --with-java=${JAVA_HOME}
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/libpng/PKGBUILD b/staging/libpng/PKGBUILD
new file mode 100644
index 000000000..433f422dd
--- /dev/null
+++ b/staging/libpng/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 146824 2012-01-18 19:24:58Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Contributor: Travis Willard <travis@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=libpng
+pkgver=1.5.7
+_apngver=1.5.7
+pkgrel=1
+pkgdesc="A collection of routines used to create PNG format graphics files"
+arch=('i686' 'x86_64')
+url="http://www.libpng.org/pub/png/libpng.html"
+license=('custom')
+depends=('zlib' 'sh')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.xz"
+ "http://downloads.sourceforge.net/sourceforge/libpng-apng/libpng-$_apngver-apng.patch.gz")
+md5sums=('c3ae9ce4e81ec0aafdd4ac961586ee0d'
+ '6c6a674048cec94db1bc35decf0d142c')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Add animated PNG (apng) support
+ # see http://sourceforge.net/projects/libpng-apng/
+ patch -p1 -i "$srcdir/libpng-$_apngver-apng.patch"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ cd contrib/pngminus
+ make PNGLIB="-L$pkgdir/usr/lib -lpng" -f makefile.std png2pnm pnm2png
+ install -m755 png2pnm pnm2png "$pkgdir/usr/bin/"
+ install -D -m644 ../../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/staging/librsvg/PKGBUILD b/staging/librsvg/PKGBUILD
new file mode 100644
index 000000000..90ffdcd13
--- /dev/null
+++ b/staging/librsvg/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 146839 2012-01-18 20:16:37Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=librsvg
+pkgver=2.34.2
+pkgrel=2
+pkgdesc="A SVG viewing library"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gdk-pixbuf2' 'pango' 'libcroco')
+makedepends=('intltool' 'gtk2')
+optdepends=('gtk2: for rsvg-view support')
+options=('!libtool' '!emptydirs')
+url="http://librsvg.sourceforge.net/"
+install=librsvg.install
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/2.34/$pkgname-$pkgver.tar.xz)
+sha256sums=('5de701325b84c0a15ab6892f49ffd6471722044bfe0b350725bf420642ee4464')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' rsvg.in
+ ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname \
+ --with-croco --disable-static \
+ --with-svgz
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/librsvg/librsvg.install b/staging/librsvg/librsvg.install
new file mode 100644
index 000000000..4d48b071f
--- /dev/null
+++ b/staging/librsvg/librsvg.install
@@ -0,0 +1,11 @@
+post_install() {
+ usr/bin/gdk-pixbuf-query-loaders --update-cache
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/libtiff/PKGBUILD b/staging/libtiff/PKGBUILD
new file mode 100644
index 000000000..16d6dded5
--- /dev/null
+++ b/staging/libtiff/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 146823 2012-01-18 19:24:43Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=libtiff
+pkgver=4.0.0
+pkgrel=1
+pkgdesc="Library for manipulation of TIFF images"
+arch=('i686' 'x86_64')
+url="http://www.remotesensing.org/libtiff/"
+license=('custom')
+depends=('libjpeg' 'zlib' 'xz')
+makedepends=('freeglut')
+optdepends=('freeglut: for using tiffgt')
+options=('!libtool')
+source=(ftp://ftp.remotesensing.org/pub/libtiff/tiff-${pkgver}.tar.gz)
+sha1sums=('85d85520fea40fc9291995a60e3d40cf980b5522')
+
+build() {
+ cd "${srcdir}/tiff-${pkgver}"
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "${srcdir}/tiff-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/tiff-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/libunique3/PKGBUILD b/staging/libunique3/PKGBUILD
new file mode 100644
index 000000000..f641e0925
--- /dev/null
+++ b/staging/libunique3/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 146851 2012-01-18 20:41:52Z ibiru $
+# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
+pkgname=libunique3
+pkgver=3.0.2
+pkgrel=2
+pkgdesc="Library for writing single instance applications for GTK3"
+arch=('i686' 'x86_64')
+license=('LGPL')
+depends=('gtk3')
+makedepends=('gtk-doc' 'gobject-introspection')
+options=('!libtool')
+url="http://live.gnome.org/LibUnique"
+source=(http://ftp.gnome.org/pub/gnome/sources/libunique/${pkgver%.*}/libunique-$pkgver.tar.xz)
+sha256sums=('a8f02ce073e2b920cca8ac45d418e7cb64438ad0814780c5912c6d63f8a4e038')
+
+build() {
+ cd "$srcdir/libunique-$pkgver"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --disable-dbus
+ make
+}
+
+package() {
+ cd "$srcdir/libunique-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/libwmf/PKGBUILD b/staging/libwmf/PKGBUILD
new file mode 100644
index 000000000..0222a1832
--- /dev/null
+++ b/staging/libwmf/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 146861 2012-01-18 21:36:12Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=libwmf
+pkgver=0.2.8.4
+pkgrel=9
+pkgdesc="A library for reading vector images in Microsoft's native Windows Metafile Format (WMF)"
+arch=('i686' 'x86_64')
+url="http://wvware.sourceforge.net/libwmf.html"
+license=('LGPL')
+depends=('libpng' 'libx11' 'libjpeg' 'gsfonts')
+makedepends=('gtk2' 'libxt')
+optdepends=('gdk-pixbuf2: for pixbuf loader')
+options=('!libtool' '!docs' '!emptydirs')
+install=libwmf.install
+source=(http://downloads.sourceforge.net/sourceforge/wvware/${pkgname}-${pkgver}.tar.gz
+ libwmf-0.2.8.4-libpng-1.5.patch libwmf-0.2.8.4-useafterfree.patch)
+sha1sums=('822ab3bd0f5e8f39ad732f2774a8e9f18fc91e89'
+ '42aa4c2a82e4e14044c875a7f439baea732a355a'
+ 'ea6d28880840e86c96f9079bfd591da54dcffa5c')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/libwmf-0.2.8.4-libpng-1.5.patch"
+ patch -p1 -i "${srcdir}/libwmf-0.2.8.4-useafterfree.patch"
+ ./configure --prefix=/usr \
+ --with-gsfontdir=/usr/share/fonts/Type1 \
+ --with-fontdir=/usr/share/fonts/Type1 \
+ --with-gsfontmap=/usr/share/ghostscript/8.15/lib/Fontmap.GS
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ #Remove fonts, these are in gsfonts
+ rm -rf "${pkgdir}/usr/share/fonts"
+ #Remove static GTK loader, can't use it anyways
+ rm -f "${pkgdir}"/usr/lib/gtk-2.0/*/loaders/io-wmf.a
+}
diff --git a/staging/libwmf/libwmf-0.2.8.4-libpng-1.5.patch b/staging/libwmf/libwmf-0.2.8.4-libpng-1.5.patch
new file mode 100644
index 000000000..3528c74eb
--- /dev/null
+++ b/staging/libwmf/libwmf-0.2.8.4-libpng-1.5.patch
@@ -0,0 +1,12 @@
+diff -urN libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h libwmf-0.2.8.4/src/ipa/ipa/bmp.h
+--- libwmf-0.2.8.4.old/src/ipa/ipa/bmp.h 2011-05-23 19:14:23.000000000 +0200
++++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2011-05-23 19:15:11.000000000 +0200
+@@ -66,7 +66,7 @@
+ return;
+ }
+
+- if (setjmp (png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ { WMF_DEBUG (API,"Failed to write bitmap as PNG! (setjmp failed)");
+ png_destroy_write_struct (&png_ptr,&info_ptr);
+ wmf_free (API,buffer);
diff --git a/staging/libwmf/libwmf-0.2.8.4-useafterfree.patch b/staging/libwmf/libwmf-0.2.8.4-useafterfree.patch
new file mode 100644
index 000000000..328c5411f
--- /dev/null
+++ b/staging/libwmf/libwmf-0.2.8.4-useafterfree.patch
@@ -0,0 +1,10 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_clip.c.CVE-2009-1364-im-clip-list 2009-04-24 04:06:44.000000000 -0400
++++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c 2009-04-24 04:08:30.000000000 -0400
+@@ -70,6 +70,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe
+ { more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
+ if (more == 0) return;
+ im->clip->max += 8;
++ im->clip->list = more;
+ }
+ im->clip->list[im->clip->count] = (*rect);
+ im->clip->count++;
diff --git a/staging/libwmf/libwmf.install b/staging/libwmf/libwmf.install
new file mode 100644
index 000000000..9c99a901b
--- /dev/null
+++ b/staging/libwmf/libwmf.install
@@ -0,0 +1,13 @@
+post_install() {
+ if [ -x usr/bin/gdk-pixbuf-query-loaders ]; then
+ gdk-pixbuf-query-loaders > etc/gtk-2.0/gdk-pixbuf.loaders
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/staging/libxfcegui4/PKGBUILD b/staging/libxfcegui4/PKGBUILD
new file mode 100644
index 000000000..d00dda2c5
--- /dev/null
+++ b/staging/libxfcegui4/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 146865 2012-01-18 23:54:43Z foutrelis $
+# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
+# Contributor: Tobias Kieslich <tobias funnychar archlinux.org>
+
+pkgname=libxfcegui4
+pkgver=4.8.1
+pkgrel=4
+pkgdesc="Various Gtk widgets for Xfce"
+arch=('i686' 'x86_64')
+url="http://www.xfce.org/"
+license=('GPL2')
+depends=('startup-notification' "xfconf>=4.8.0" "libglade" 'libsm'
+ 'hicolor-icon-theme')
+makedepends=('intltool')
+options=('!libtool')
+install=$pkgname.install
+source=(http://archive.xfce.org/src/xfce/$pkgname/4.8/$pkgname-$pkgver.tar.bz2)
+sha256sums=('309a81823cdfdb7301bc6a5199e14f0df29b58dae89a9302c7839b9b94812443')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-debug
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/libxfcegui4/libxfcegui4.install b/staging/libxfcegui4/libxfcegui4.install
new file mode 100644
index 000000000..abf924aa2
--- /dev/null
+++ b/staging/libxfcegui4/libxfcegui4.install
@@ -0,0 +1,14 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
+
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/links/PKGBUILD b/staging/links/PKGBUILD
new file mode 100644
index 000000000..185990ac7
--- /dev/null
+++ b/staging/links/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 146834 2012-01-18 20:01:18Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=links
+pkgver=2.5
+pkgrel=1
+pkgdesc="A text WWW browser, similar to Lynx"
+arch=('i686' 'x86_64')
+url="http://links.twibright.com/"
+license=('GPL')
+depends=('bzip2' 'xz' 'zlib' 'openssl' 'gpm')
+makedepends=('libtiff' 'libpng' 'libxt')
+optdepends=('libx11: for using xlinks' 'libtiff: for using xlinks' 'libpng: for using xlinks')
+provides=('links-g')
+conflicts=('links-g')
+replaces=('links-g')
+source=(http://links.twibright.com/download/${pkgname}-${pkgver}.tar.bz2 links.desktop)
+sha1sums=('fe4bc37be8aebd9196c35ffef724435cea94349c'
+ 'f600e27c2a71184444f7dd07a10230aa44463a02')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ (cd intl; ./gen-intl; ./synclang)
+ ./configure --prefix=/usr --mandir=/usr/share/man --enable-javascript \
+ --enable-graphics --with-x --with-fb
+ make
+ mv links xlinks
+
+ ./configure --prefix=/usr --mandir=/usr/share/man --enable-javascript \
+ --disable-graphics --without-x --without-fb
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 xlinks "${pkgdir}/usr/bin/xlinks"
+ ln -s links.1.gz "${pkgdir}/usr/share/man/man1/xlinks.1.gz"
+
+ install -D -m644 "${srcdir}/links.desktop" "${pkgdir}/usr/share/applications/links.desktop"
+ install -d "${pkgdir}/usr/share/pixmaps"
+ install -m644 links_16x16_1.xpm links_16x16_2.xpm links_32x32.xpm "${pkgdir}/usr/share/pixmaps/"
+
+ install -d "${pkgdir}/usr/share/doc/links/calibration"
+ install -m644 doc/links_cal/* "${pkgdir}/usr/share/doc/links/calibration/"
+}
diff --git a/staging/links/links.desktop b/staging/links/links.desktop
new file mode 100644
index 000000000..9d6338a5b
--- /dev/null
+++ b/staging/links/links.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Links
+Exec=xlinks -g
+Icon=links_32x32.xpm
+Type=Application
+Terminal=false
+Categories=Network;WebBrowser;
diff --git a/staging/mail-notification/PKGBUILD b/staging/mail-notification/PKGBUILD
new file mode 100644
index 000000000..2867010e9
--- /dev/null
+++ b/staging/mail-notification/PKGBUILD
@@ -0,0 +1,85 @@
+# $Id: PKGBUILD 146578 2012-01-13 20:32:35Z ibiru $
+# Maintainer: Roman Kyrylych <roman@archlinux.org>
+
+pkgname=mail-notification
+pkgver=5.4
+pkgrel=10
+pkgdesc="Tray icon application that informs you if you have new mail"
+arch=('i686' 'x86_64')
+url="http://www.nongnu.org/mailnotify/"
+license=('GPL3' 'FDL')
+depends=('gmime' 'libnotify' 'gnome-keyring' 'hicolor-icon-theme' 'notification-daemon' 'libgnome')
+makedepends=('gob2' 'intltool' 'evolution' 'gnome-doc-utils' 'gtk2')
+options=('!libtool' '!emptydirs')
+install=mail-notification.install
+source=(http://savannah.nongnu.org/download/mailnotify-orig/${pkgname}-${pkgver}.tar.bz2
+ dont-update-cache.patch
+ remove-ubuntu-special-case.patch
+ mail-notification-5.4-evolution.patch
+ mail-notification-5.4-sasl_encode64.patch
+ mail-notification-5.4-evolution-gtkhtml.patch
+ mail-notification-5.4-camel_headers.patch
+ mail-notification-5.4-icons.patch
+ mail-notification-5.4-weak.patch
+ mail-notification-5.4-popup-attach.patch
+ mail-notification-5.4-kde-trayicon.patch
+ mail-notification-5.4-evolution-3-0-support.patch
+ mail-notification-5.4-gtk3-support.patch
+ mail-notification-5.4-add-fallback-icon.patch
+ mail-notification-5.4-gmime.patch
+ mail-notification-5.4-libx11.patch)
+md5sums=('c8dc33a61251acb5474e56eab6b18f43'
+ '6007bc30e789dab0a8282038e0335eb9'
+ '9cadd61bbd9c324b2916ec980231e0f2'
+ 'aa6f80820899f904c25988772f70ade9'
+ '125513ed059f62469377eb0ab794dbed'
+ 'c595a3962ab13a65be24a941e28faa9c'
+ 'f79939f593b2e8659e302df72c2b54b1'
+ '244b7ef2aec7656e8df390be87c10e2b'
+ '31bde95dfd39449959d8b3316f91429c'
+ 'cdead6a88d1779f69a5f40dc75d5cb84'
+ 'c7991b831834724eddc1c6802c3e06a6'
+ 'b370b1085ebb2814bd5d345a6d2b45ea'
+ '1ba948759110787dd57097cff157b75a'
+ '09df61b4dc29c676ac81ff9054e840ac'
+ '0944695e9b9b30f39028f85c83c6a7e2'
+ 'c3f643ef16aab3b4fe9ff5b333bff41a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np0 -i "${srcdir}/dont-update-cache.patch"
+ patch -Np0 -i "${srcdir}/remove-ubuntu-special-case.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-evolution.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-sasl_encode64.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-evolution-gtkhtml.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-camel_headers.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-icons.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-weak.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-popup-attach.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-kde-trayicon.patch"
+ patch -Np0 -i "${srcdir}/mail-notification-5.4-evolution-3-0-support.patch"
+ patch -Np0 -i "${srcdir}/mail-notification-5.4-gtk3-support.patch"
+ patch -Np0 -i "${srcdir}/mail-notification-5.4-add-fallback-icon.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-gmime.patch"
+ patch -Np1 -i "${srcdir}/mail-notification-5.4-libx11.patch"
+
+ gtk-builder-convert ui/mailbox-properties-dialog.glade ui/mailbox-properties-dialog.ui
+ gtk-builder-convert ui/properties-dialog.glade ui/properties-dialog.ui
+
+ ./jb configure prefix=/usr sysconfdir=/etc \
+ localstatedir=/var destdir="${pkgdir}" \
+ gconf-schemas-dir=/etc/gconf/schemas install-gconf-schemas=no \
+ cflags="${CFLAGS}" cppflags="${CXXFLAGS}" ldflags="${LDFLAGS}" \
+ library-mode=0755
+ ./jb build
+ GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 ./jb install
+
+ rm -f "${pkgdir}/usr/share/mail-notification/"*.glade
+ install -m644 ui/mailbox-properties-dialog.ui "${pkgdir}/usr/share/mail-notification/"
+ install -m644 ui/properties-dialog.ui "${pkgdir}/usr/share/mail-notification/"
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema ${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas --domain mail-notification ${pkgdir}/etc/gconf/schemas/*.schemas
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/staging/mail-notification/dont-update-cache.patch b/staging/mail-notification/dont-update-cache.patch
new file mode 100644
index 000000000..81216835e
--- /dev/null
+++ b/staging/mail-notification/dont-update-cache.patch
@@ -0,0 +1,22 @@
+--- jbsrc/jb.c.~1~ 2008-03-20 16:53:02.000000000 +0100
++++ jbsrc/jb.c 2008-03-26 20:51:45.641363619 +0100
+@@ -327,7 +327,6 @@
+ jb_package_add_resources (void)
+ {
+ JBGroup *group;
+- JBRule *rule;
+ JBObject *object;
+
+ if (jb_variable_get_bool("compile-warnings"))
+@@ -362,11 +361,6 @@
+ if (jb_variable_get_bool("hotmail"))
+ jb_group_add_data_file(group, "hotmail.png", "$pkgdatadir");
+
+- rule = jb_rule_new();
+- jb_rule_set_install_message(rule, "updating the GTK+ icon cache");
+- jb_rule_add_install_command(rule, "-gtk-update-icon-cache -f -t $datadir/icons/hicolor");
+- jb_group_add_resource(group, JB_GROUP_RESOURCE(rule));
+-
+ jb_group_add(group);
+
+ /*** data ******************************************************************/
diff --git a/staging/mail-notification/mail-notification-5.4-add-fallback-icon.patch b/staging/mail-notification/mail-notification-5.4-add-fallback-icon.patch
new file mode 100644
index 000000000..41c28e870
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-add-fallback-icon.patch
@@ -0,0 +1,16 @@
+--- src/mn-stock.c.orig 2011-02-17 17:42:39.886767087 +0100
++++ src/mn-stock.c 2011-02-17 17:49:37.415541177 +0100
+@@ -86,6 +86,13 @@
+ gtk_icon_source_set_icon_name(icon_source, icons[i].icon_name);
+ gtk_icon_set_add_source(icon_set, icon_source);
+ gtk_icon_source_free(icon_source);
++
++ /* Add a fallback icon */
++ icon_source = gtk_icon_source_new();
++ gtk_icon_source_set_icon_name(icon_source, "mail-notification");
++ gtk_icon_source_set_state_wildcarded(icon_source, TRUE);
++ gtk_icon_set_add_source(icon_set, icon_source);
++ gtk_icon_source_free(icon_source);
+ }
+ else if (icons[i].source_stock_id)
+ {
diff --git a/staging/mail-notification/mail-notification-5.4-camel_headers.patch b/staging/mail-notification/mail-notification-5.4-camel_headers.patch
new file mode 100644
index 000000000..861e3d215
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-camel_headers.patch
@@ -0,0 +1,36 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-evolution-message.c mail-notification-5.4-OK/build/src/mn-evolution-message.c
+--- mail-notification-5.4/build/src/mn-evolution-message.c 2008-05-22 19:47:51.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-evolution-message.c 2010-05-04 18:13:31.000000000 +0400
+@@ -25,7 +25,7 @@
+ #line 24 "src/mn-evolution-message.gob"
+
+ #include <glib/gi18n.h>
+-#include <camel/camel-folder-summary.h>
++#include <camel/camel.h>
+ #include "mn-evolution-mailbox.h"
+ #include "mn-message-private.h"
+ #include "mn-evolution-client.h"
+diff -Nrbu mail-notification-5.4/build/src/mn-evolution-server.c mail-notification-5.4-OK/build/src/mn-evolution-server.c
+--- mail-notification-5.4/build/src/mn-evolution-server.c 2010-05-04 18:12:56.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-evolution-server.c 2010-05-04 18:13:39.000000000 +0400
+@@ -28,7 +28,7 @@
+ #include <libintl.h>
+ #include <gobject/gvaluecollector.h>
+ #include <libedataserver/eds-version.h>
+-#include <camel/camel-folder.h>
++#include <camel/camel.h>
+ #if EDS_CHECK_VERSION(2,29,0)
+ #include <shell/e-shell.h>
+ #include <mail/e-mail-browser.h>
+diff -Nrbu mail-notification-5.4/src/mn-evolution-plugin.c mail-notification-5.4-OK/src/mn-evolution-plugin.c
+--- mail-notification-5.4/src/mn-evolution-plugin.c 2010-05-04 18:12:56.000000000 +0400
++++ mail-notification-5.4-OK/src/mn-evolution-plugin.c 2010-05-04 18:13:20.000000000 +0400
+@@ -24,7 +24,7 @@
+ #include <dbus/dbus.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <dbus/dbus-glib-bindings.h>
+-#include <camel/camel-folder.h>
++#include <camel/camel.h>
+ #include <mail/em-event.h>
+ #include <mail/mail-tools.h>
+ #include "mn-evolution.h"
diff --git a/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch b/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch
new file mode 100644
index 000000000..51938b5fa
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-evolution-3-0-support.patch
@@ -0,0 +1,122 @@
+--- jbsrc/lib/src/extras/jb-evolution-plugin.c.evolution30 2011-02-02 00:09:33.945696868 +0100
++++ jbsrc/lib/src/extras/jb-evolution-plugin.c 2011-02-02 00:28:09.096275028 +0100
+@@ -41,7 +41,7 @@
+ if (! minversion)
+ minversion = "2.12";
+
+- packages = g_strdup_printf("evolution-plugin >= %s libgtkhtml-3.15 gtkhtml-editor-3.14", minversion);
++ packages = g_strdup_printf("evolution-plugin-3.0 >= %s libgtkhtml-4.0 gtkhtml-editor-4.0", minversion);
+ result = jb_check_packages("Evolution", "evolution-plugin", packages);
+ g_free(packages);
+
+@@ -53,7 +53,7 @@
+ char *plugindir;
+
+ jb_message_checking("for the Evolution plugin directory");
+- plugindir = jb_get_package_variable("evolution-plugin", "plugindir");
++ plugindir = jb_get_package_variable("evolution-plugin-3.0", "plugindir");
+ jb_message_result_string(plugindir ? plugindir : "not found");
+
+ if (! plugindir)
+--- src/mn-evolution-plugin.c.orig 2011-02-09 00:07:37.422002566 +0100
++++ src/mn-evolution-plugin.c 2011-02-09 00:12:43.652678682 +0100
+@@ -25,6 +25,7 @@
+ #include <dbus/dbus-glib-lowlevel.h>
+ #include <dbus/dbus-glib-bindings.h>
+ #include <camel/camel.h>
++#include <libedataserver/eds-version.h>
+ #include <mail/em-event.h>
+ #include <mail/mail-tools.h>
+ #include "mn-evolution.h"
+@@ -240,7 +241,11 @@
+ EMEventTargetFolder *folder)
+ {
+ if (evo_server)
++#if EDS_CHECK_VERSION(3,1,0)
++ mn_evolution_server_folder_changed(evo_server, e_mail_folder_uri_build(folder->store, folder->folder_name));
++#else
+ mn_evolution_server_folder_changed(evo_server, folder->uri);
++#endif
+ }
+
+ void
+@@ -249,10 +250,16 @@
+ {
+ if (evo_server)
+ {
+- char *url;
++#if EDS_CHECK_VERSION(2,91,0)
++ const char *url = camel_folder_get_uri(message->folder);
++#else
++ char *url = mail_tools_folder_to_url(message->folder);
++#endif
+
+- url = mail_tools_folder_to_url(message->folder);
+ mn_evolution_server_message_reading(evo_server, url);
++
++#if !EDS_CHECK_VERSION(2,91,0)
+ g_free(url);
++#endif
+ }
+ }
+--- build/src/mn-evolution-server.c.orig 2011-02-09 00:17:38.850944227 +0100
++++ build/src/mn-evolution-server.c 2011-02-09 22:21:54.155346478 +0100
+@@ -496,11 +496,15 @@
+
+ if (! folder)
+ {
+- folder = mail_tool_uri_to_folder(uri, 0,
+ #if EDS_CHECK_VERSION(2,91,0)
+- NULL,
++ static EMailSession * session = NULL;
++ if (!session)
++ session = e_mail_session_new();
++
++ folder = e_mail_session_uri_to_folder_sync(session, uri, 0, NULL, NULL);
++#else
++ folder = mail_tool_uri_to_folder(uri, 0, NULL);
+ #endif
+- NULL);
+ if (folder)
+ self_cache_folder(uri, folder);
+ else
+@@ -677,7 +681,12 @@
+ folder = self_lookup_folder(folder_uri, err);
+ if (folder)
+ {
++#if EDS_CHECK_VERSION(3,1,0)
++ *ret = g_strdup(camel_folder_get_display_name(folder));
++#else
+ *ret = g_strdup(camel_folder_get_name(folder));
++#endif
++
+ #if EDS_CHECK_VERSION(2,31,0)
+ g_object_unref(folder);
+ #else
+@@ -725,8 +734,12 @@
+ shell = e_shell_get_default ();
+ shell_backend = e_shell_get_backend_by_name (shell, "mail");
+
+- browser = e_mail_browser_new (shell_backend);
++ browser = e_mail_browser_new (E_MAIL_BACKEND(shell_backend));
++#if EDS_CHECK_VERSION(3,1,0)
++ e_mail_reader_set_folder (E_MAIL_READER (browser), folder);
++#else
+ e_mail_reader_set_folder (E_MAIL_READER (browser), folder, folder_uri);
++#endif
+ e_mail_reader_set_message (E_MAIL_READER (browser), message_uid);
+ gtk_widget_show (browser);
+ #else
+--- build/src/mn-evolution-folder-tree-server.c.orig 2011-06-17 22:01:49.226886994 +0200
++++ build/src/mn-evolution-folder-tree-server.c 2011-06-18 00:34:23.046889847 +0200
+@@ -444,7 +444,9 @@
+ {
+ #line 61 "src/mn-evolution-folder-tree-server.gob"
+
+-#if EDS_CHECK_VERSION(2,91,0)
++#if EDS_CHECK_VERSION(3,1,0)
++ selfp->tree = em_folder_tree_new(NULL, NULL);
++#elif EDS_CHECK_VERSION(2,91,0)
+ selfp->session = e_mail_session_new();
+ selfp->tree = em_folder_tree_new(selfp->session);
+ #elif EDS_CHECK_VERSION(2,29,0)
diff --git a/staging/mail-notification/mail-notification-5.4-evolution-gtkhtml.patch b/staging/mail-notification/mail-notification-5.4-evolution-gtkhtml.patch
new file mode 100644
index 000000000..283ef36d6
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-evolution-gtkhtml.patch
@@ -0,0 +1,12 @@
+diff -Nrbu mail-notification-5.4/jbsrc/lib/src/extras/jb-evolution-plugin.c mail-notification-5.4-OK/jbsrc/lib/src/extras/jb-evolution-plugin.c
+--- mail-notification-5.4/jbsrc/lib/src/extras/jb-evolution-plugin.c 2008-04-27 18:47:43.000000000 +0400
++++ mail-notification-5.4-OK/jbsrc/lib/src/extras/jb-evolution-plugin.c 2009-08-21 19:48:22.000000000 +0400
+@@ -41,7 +41,7 @@
+ if (! minversion)
+ minversion = "2.12";
+
+- packages = g_strdup_printf("evolution-plugin >= %s", minversion);
++ packages = g_strdup_printf("evolution-plugin >= %s libgtkhtml-3.15 gtkhtml-editor-3.14", minversion);
+ result = jb_check_packages("Evolution", "evolution-plugin", packages);
+ g_free(packages);
+
diff --git a/staging/mail-notification/mail-notification-5.4-evolution.patch b/staging/mail-notification/mail-notification-5.4-evolution.patch
new file mode 100644
index 000000000..87514c22d
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-evolution.patch
@@ -0,0 +1,244 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-evolution-folder-tree-server.c mail-notification-5.4-OK/build/src/mn-evolution-folder-tree-server.c
+--- mail-notification-5.4/build/src/mn-evolution-folder-tree-server.c 2008-05-22 19:47:48.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-evolution-folder-tree-server.c 2010-10-12 16:50:15.000000000 +0400
+@@ -25,7 +25,10 @@
+ #line 24 "src/mn-evolution-folder-tree-server.gob"
+
+ #include <dbus/dbus.h>
++#include <libedataserver/eds-version.h>
++#if !EDS_CHECK_VERSION(2,29,0)
+ #include <mail/mail-component.h>
++#endif
+ #include <mail/em-folder-tree.h>
+ #include "mn-evolution-plugin.h"
+ #include "mn-evolution.h"
+@@ -441,10 +444,17 @@
+ {
+ #line 61 "src/mn-evolution-folder-tree-server.gob"
+
++#if EDS_CHECK_VERSION(2,91,0)
++ selfp->session = e_mail_session_new();
++ selfp->tree = em_folder_tree_new(selfp->session);
++#elif EDS_CHECK_VERSION(2,29,0)
++ selfp->tree = em_folder_tree_new();
++#else
+ EMFolderTreeModel *model;
+
+ model = mail_component_peek_tree_model(mail_component_peek());
+ selfp->tree = em_folder_tree_new_with_model(model);
++#endif
+
+ selfp->plug = gtk_plug_new((GdkNativeWindow) selfp->id);
+ gtk_container_add(GTK_CONTAINER(selfp->plug), selfp->tree);
+@@ -469,6 +479,10 @@
+ {
+ #line 80 "src/mn-evolution-folder-tree-server.gob"
+
++#if EDS_CHECK_VERSION(2,91,0)
++ g_object_unref(selfp->session);
++ selfp->session = NULL;
++#endif
+ g_signal_handlers_disconnect_by_func(selfp->plug, self_plug_destroy_h, self);
+ }}
+ #line 475 "mn-evolution-folder-tree-server.c"
+diff -Nrbu mail-notification-5.4/build/src/mn-evolution-server.c mail-notification-5.4-OK/build/src/mn-evolution-server.c
+--- mail-notification-5.4/build/src/mn-evolution-server.c 2008-05-22 19:47:48.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-evolution-server.c 2010-10-12 16:50:40.000000000 +0400
+@@ -27,12 +27,22 @@
+ #include <stdio.h>
+ #include <libintl.h>
+ #include <gobject/gvaluecollector.h>
++#include <libedataserver/eds-version.h>
+ #include <camel/camel-folder.h>
++#if EDS_CHECK_VERSION(2,29,0)
++#include <shell/e-shell.h>
++#include <mail/e-mail-browser.h>
++#else
+ #include <mail/em-folder-view.h>
+ #include <mail/em-format.h>
+ #include <mail/em-message-browser.h>
++#endif
+ #include <mail/em-utils.h>
++#if EDS_CHECK_VERSION(2,91,0)
++#include <mail/e-mail-session.h>
++#else
+ #include <mail/mail-session.h>
++#endif
+ #include <mail/mail-tools.h>
+ #include "mn-evolution.h"
+ #include "mn-evolution-folder-tree-server.h"
+@@ -391,10 +397,18 @@
+ info = g_new0(FolderInfo, 1);
+ info->uri = g_strdup(uri);
+ info->folder = folder;
++#if EDS_CHECK_VERSION(2,31,0)
++ g_object_ref(folder);
++#else
+ camel_object_ref(folder);
++#endif
+
+ /* uncache the folder when it is deleted */
++#if EDS_CHECK_VERSION(2,31,0)
++ g_signal_connect(folder, "deleted", G_CALLBACK(self_folder_deleted_cb), info);
++#else
+ camel_object_hook_event(folder, "deleted", self_folder_deleted_cb, info);
++#endif
+
+ g_hash_table_replace(folders, info->uri, info);
+ }}
+@@ -413,8 +427,13 @@
+ {
+ #line 105 "src/mn-evolution-server.gob"
+
++#if EDS_CHECK_VERSION(2,31,0)
++ g_signal_handlers_disconnect_by_func(info->folder, self_folder_deleted_cb, info);
++ g_object_unref(info->folder);
++#else
+ camel_object_unhook_event(info->folder, "deleted", self_folder_deleted_cb, info);
+ camel_object_unref(info->folder);
++#endif
+ g_free(info->uri);
+ g_free(info);
+ }}
+@@ -461,7 +480,11 @@
+ if (info)
+ {
+ folder = info->folder;
++#if EDS_CHECK_VERSION(2,31,0)
++ g_object_ref(folder);
++#else
+ camel_object_ref(folder);
++#endif
+ }
+ }
+ else
+@@ -469,7 +492,11 @@
+
+ if (! folder)
+ {
+- folder = mail_tool_uri_to_folder(uri, 0, NULL);
++ folder = mail_tool_uri_to_folder(uri, 0,
++#if EDS_CHECK_VERSION(2,91,0)
++ NULL,
++#endif
++ NULL);
+ if (folder)
+ self_cache_folder(uri, folder);
+ else
+@@ -595,14 +622,23 @@
+
+ for (i = 0; i < summary->len; i++)
+ {
++#if EDS_CHECK_VERSION(2,23,5)
++ char *uid = summary->pdata[i];
++ CamelMessageInfo *info = camel_folder_get_message_info(folder, uid);
++#else
+ CamelMessageInfo *info = summary->pdata[i];
++#endif
+
+ if ((camel_message_info_flags(info) & CAMEL_MESSAGE_SEEN) == 0)
+ g_ptr_array_add(*ret, self_camel_message_info_to_dbus_struct(info));
+ }
+
+ camel_folder_free_summary(folder, summary);
++#if EDS_CHECK_VERSION(2,31,0)
++ g_object_unref(folder);
++#else
+ camel_object_unref(folder);
++#endif
+ }
+
+ GDK_THREADS_LEAVE();
+@@ -638,7 +674,11 @@
+ if (folder)
+ {
+ *ret = g_strdup(camel_folder_get_name(folder));
++#if EDS_CHECK_VERSION(2,31,0)
++ g_object_unref(folder);
++#else
+ camel_object_unref(folder);
++#endif
+ }
+
+ GDK_THREADS_LEAVE();
+@@ -673,6 +713,19 @@
+ folder = self_lookup_folder(folder_uri, err);
+ if (folder)
+ {
++#if EDS_CHECK_VERSION(2,29,0)
++ EShell *shell;
++ EShellBackend *shell_backend;
++ GtkWidget *browser;
++
++ shell = e_shell_get_default ();
++ shell_backend = e_shell_get_backend_by_name (shell, "mail");
++
++ browser = e_mail_browser_new (shell_backend);
++ e_mail_reader_set_folder (E_MAIL_READER (browser), folder, folder_uri);
++ e_mail_reader_set_message (E_MAIL_READER (browser), message_uid);
++ gtk_widget_show (browser);
++#else
+ GtkWidget *browser;
+
+ /* modelled after Evolution's handleuri_got_folder() */
+@@ -683,8 +736,13 @@
+ em_folder_view_set_folder((EMFolderView *) browser, folder, folder_uri);
+ em_folder_view_set_message((EMFolderView *) browser, message_uid, FALSE);
+ gtk_widget_show(((EMMessageBrowser *) browser)->window);
++#endif
+
++#if EDS_CHECK_VERSION(2,31,0)
++ g_object_unref(folder);
++#else
+ camel_object_unref(folder);
++#endif
+ }
+
+ GDK_THREADS_LEAVE();
+@@ -721,7 +779,11 @@
+ if (folder)
+ {
+ status = camel_folder_set_message_flags(folder, message_uid, flags, flags);
++#if EDS_CHECK_VERSION(2,31,0)
++ g_object_unref(folder);
++#else
+ camel_object_unref(folder);
++#endif
+
+ if (! status)
+ g_set_error(err,
+diff -Nrbu mail-notification-5.4/src/mn-evolution-plugin.c mail-notification-5.4-OK/src/mn-evolution-plugin.c
+--- mail-notification-5.4/src/mn-evolution-plugin.c 2008-05-22 19:45:35.000000000 +0400
++++ mail-notification-5.4-OK/src/mn-evolution-plugin.c 2010-10-12 16:50:15.000000000 +0400
+@@ -204,7 +204,7 @@
+ }
+
+ int
+-e_plugin_lib_enable (EPluginLib *ep, int enable)
++e_plugin_lib_enable (EPlugin *ep, int enable)
+ {
+ static gboolean enabled = FALSE;
+ GError *err = NULL;
+--- mail-notification-5.4/build/src/mn-evolution-folder-tree-server-private.h.orig 2010-11-13 13:55:01.571934066 +0100
++++ mail-notification-5.4/build/src/mn-evolution-folder-tree-server-private.h 2010-11-13 13:56:07.019487418 +0100
+@@ -4,6 +4,10 @@
+ #define __MN_EVOLUTION_FOLDER_TREE_SERVER_PRIVATE_H__
+
+ #include "mn-evolution-folder-tree-server.h"
++#include <libedataserver/eds-version.h>
++#if EDS_CHECK_VERSION(2,91,0)
++#include <mail/e-mail-session.h>
++#endif
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -23,6 +23,9 @@
+ #line 41 "src/mn-evolution-folder-tree-server.gob"
+ GtkWidget * tree;
+ #line 26 "mn-evolution-folder-tree-server-private.h"
++#if EDS_CHECK_VERSION(2,91,0)
++ EMailSession * session;
++#endif
+ };
+
+ #ifdef __cplusplus
diff --git a/staging/mail-notification/mail-notification-5.4-gmime.patch b/staging/mail-notification/mail-notification-5.4-gmime.patch
new file mode 100644
index 000000000..5f516a46b
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-gmime.patch
@@ -0,0 +1,63 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-base-mbox-mailbox-backend.c mail-notification-5.4-OK/build/src/mn-base-mbox-mailbox-backend.c
+--- mail-notification-5.4/build/src/mn-base-mbox-mailbox-backend.c 2008-12-23 14:48:49.000000000 +0300
++++ mail-notification-5.4-OK/build/src/mn-base-mbox-mailbox-backend.c 2008-12-23 14:48:28.000000000 +0300
+@@ -265,7 +265,7 @@
+ mime_message = g_mime_parser_construct_message(parser);
+ if (mime_message)
+ {
+- if (g_mime_message_get_header(mime_message, "X-Mozilla-Status"))
++ if (g_mime_object_get_header(mime_message, "X-Mozilla-Status"))
+ {
+ #if WITH_MOZILLA
+ type = MN_TYPE_MOZILLA_MAILBOX_BACKEND;
+diff -Nrbu mail-notification-5.4/build/src/mn-mozilla-mailbox-backend.c mail-notification-5.4-OK/build/src/mn-mozilla-mailbox-backend.c
+--- mail-notification-5.4/build/src/mn-mozilla-mailbox-backend.c 2008-12-23 14:48:49.000000000 +0300
++++ mail-notification-5.4-OK/build/src/mn-mozilla-mailbox-backend.c 2008-12-23 14:46:47.000000000 +0300
+@@ -167,7 +167,7 @@
+
+ const char *header;
+
+- header = g_mime_message_get_header(mime_message, header_name);
++ header = g_mime_object_get_header(mime_message, header_name);
+ if (header && mn_str_ishex(header))
+ return strtol(header, NULL, 16);
+ else
+diff -Nrbu mail-notification-5.4/jbsrc/jb.c mail-notification-5.4-OK/jbsrc/jb.c
+--- mail-notification-5.4/jbsrc/jb.c 2008-05-22 19:47:04.000000000 +0400
++++ mail-notification-5.4-OK/jbsrc/jb.c 2008-12-23 14:43:09.000000000 +0300
+@@ -166,7 +166,7 @@
+ jb_require_packages("GNOME", "gnome", "glib-2.0 >= 2.14 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.12 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 libxml-2.0 libnotify >= 0.4.1");
+ jb_require_packages("D-Bus", "dbus", "dbus-glib-1");
+
+- jb_check_packages_for_options("GMime", "gmime", "gmime-2.0 >= 2.2.7",
++ jb_check_packages_for_options("GMime", "gmime", "gmime-2.6",
+ "hotmail",
+ "imap",
+ "maildir",
+diff -Nrbu mail-notification-5.4/src/mn-message-mime.c mail-notification-5.4-OK/src/mn-message-mime.c
+--- mail-notification-5.4/src/mn-message-mime.c 2008-05-22 19:45:35.000000000 +0400
++++ mail-notification-5.4-OK/src/mn-message-mime.c 2008-12-23 14:46:35.000000000 +0300
+@@ -33,12 +33,12 @@
+ g_return_val_if_fail(GMIME_IS_MESSAGE(mime_message), FALSE);
+
+ /* SpamAssassin */
+- spam = g_mime_message_get_header(mime_message, "X-Spam-Status");
++ spam = g_mime_object_get_header(mime_message, "X-Spam-Status");
+ if (spam && mn_ascii_str_case_has_prefix(spam, "yes"))
+ return TRUE;
+
+ /* bogofilter */
+- spam = g_mime_message_get_header(mime_message, "X-Bogosity");
++ spam = g_mime_object_get_header(mime_message, "X-Bogosity");
+ if (spam && mn_ascii_str_case_has_prefix(spam, "yes"))
+ return TRUE;
+
+@@ -89,7 +89,7 @@
+ {
+ const char *status;
+
+- status = g_mime_message_get_header(mime_message, "Status");
++ status = g_mime_object_get_header(mime_message, "Status");
+ if (status && strchr(status, 'R'))
+ return NULL; /* the message was read */
+ else if (status && strchr(status, 'O'))
diff --git a/staging/mail-notification/mail-notification-5.4-gtk3-support.patch b/staging/mail-notification/mail-notification-5.4-gtk3-support.patch
new file mode 100644
index 000000000..6a29f8622
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-gtk3-support.patch
@@ -0,0 +1,1416 @@
+--- build/src/mn-dialog.c.orig 2011-02-02 23:08:09.816659245 +0100
++++ build/src/mn-dialog.c 2011-02-02 23:09:16.988113774 +0100
+@@ -106,8 +106,7 @@
+ #line 27 "src/mn-dialog.gob"
+
+ gtk_container_set_border_width(GTK_CONTAINER(self), 5);
+- gtk_dialog_set_has_separator(GTK_DIALOG(self), FALSE);
+- gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(self)->vbox), 2);
++ gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(self))), 2);
+
+ #line 113 "mn-dialog.c"
+ }
+--- jbsrc/jb.c.orig 2011-02-02 23:40:33.567924712 +0100
++++ jbsrc/jb.c 2011-02-02 23:39:39.680803618 +0100
+@@ -163,7 +163,7 @@
+ {
+ jb_check_glibc();
+
+- jb_require_packages("GNOME", "gnome", "glib-2.0 >= 2.14 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-2.0 >= 2.12 libgnomeui-2.0 >= 2.14.0 gnome-vfs-2.0 libglade-2.0 libxml-2.0 libnotify >= 0.4.1");
++ jb_require_packages("GNOME", "gnome", "glib-2.0 >= 2.14 gthread-2.0 gconf-2.0 >= 2.4.0 gtk+-3.0 libgnome-2.0 >= 2.14.0 gnome-vfs-2.0 libxml-2.0 libnotify >= 0.4.1");
+ jb_require_packages("D-Bus", "dbus", "dbus-glib-1");
+
+ jb_check_packages_for_options("GMime", "gmime", "gmime-2.6",
+--- build/src/mn-file-chooser-button.c.orig 2011-02-02 23:38:01.503049512 +0100
++++ build/src/mn-file-chooser-button.c 2011-02-02 23:38:16.988222034 +0100
+@@ -358,7 +358,7 @@
+ g_signal_connect(selfp->dialog, "response", G_CALLBACK(self_response_h), self);
+ }
+
+- if (! GTK_WIDGET_VISIBLE(selfp->dialog))
++ if (! gtk_widget_get_visible(selfp->dialog))
+ {
+ GtkWindow *parent;
+
+--- build/src/mn-sound-player.c.orig 2011-02-02 23:55:02.436500397 +0100
++++ build/src/mn-sound-player.c 2011-02-02 23:55:09.125141055 +0100
+@@ -27,7 +27,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <glib/gi18n.h>
+-#include <gnome.h>
++#include <libgnome/libgnome.h>
+ #include "mn-conf.h"
+ #include "mn-locked-callback.h"
+ #include "mn-util.h"
+--- build/src/mn-file-chooser-button.c.orig 2011-02-02 23:55:21.857457045 +0100
++++ build/src/mn-file-chooser-button.c 2011-02-02 23:55:30.422996901 +0100
+@@ -25,7 +25,7 @@
+ #line 39 "src/mn-file-chooser-button.gob"
+
+ #include <glib/gi18n.h>
+-#include <gnome.h>
++#include <libgnome/libgnome.h>
+ #include "mn-util.h"
+
+ #line 32 "mn-file-chooser-button.c"
+--- build/src/mn-message.c.orig 2011-02-02 23:55:41.160420099 +0100
++++ build/src/mn-message.c 2011-02-02 23:55:47.755065850 +0100
+@@ -26,7 +26,7 @@
+
+ #include <errno.h>
+ #include <glib/gi18n.h>
+-#include <gnome.h>
++#include <libgnome/libgnome.h>
+ #include <libgnomevfs/gnome-vfs.h>
+ #include "mn-conf.h"
+ #include "mn-util.h"
+--- build/src/mn-file-chooser-button.c.orig 2011-02-03 00:15:16.178407712 +0100
++++ build/src/mn-file-chooser-button.c 2011-02-03 00:18:17.865681563 +0100
+@@ -463,6 +463,7 @@
+
+ GDK_THREADS_ENTER();
+
++#if 0
+ if (results)
+ {
+ GnomeVFSGetFileInfoResult *result = results->data;
+@@ -494,6 +495,7 @@
+ }
+ }
+ }
++#endif
+
+ selfp->async_handle = NULL;
+ g_object_unref(self);
+--- build/src/mn-evolution-folder-tree-server.c.orig 2011-02-07 20:17:09.574274620 +0100
++++ build/src/mn-evolution-folder-tree-server.c 2011-02-07 20:23:25.196053994 +0100
+@@ -25,6 +25,7 @@
+ #line 24 "src/mn-evolution-folder-tree-server.gob"
+
+ #include <dbus/dbus.h>
++#include <gtk/gtkx.h>
+ #include <libedataserver/eds-version.h>
+ #if !EDS_CHECK_VERSION(2,29,0)
+ #include <mail/mail-component.h>
+@@ -71,7 +72,7 @@
+ static void mn_evolution_folder_tree_server_finalize (MNEvolutionFolderTreeServer * self);
+ #line 70 "mn-evolution-folder-tree-server.c"
+ #line 84 "src/mn-evolution-folder-tree-server.gob"
+-static void mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data);
++static void mn_evolution_folder_tree_server_plug_destroy_h (GtkWidget * object, gpointer user_data);
+ #line 73 "mn-evolution-folder-tree-server.c"
+ #line 104 "src/mn-evolution-folder-tree-server.gob"
+ static void mn_evolution_folder_tree_server_selected_h (EMFolderTree * tree, const char * full_name, const char * uri, guint32 flags, gpointer user_data);
+@@ -456,7 +457,7 @@
+ selfp->tree = em_folder_tree_new_with_model(model);
+ #endif
+
+- selfp->plug = gtk_plug_new((GdkNativeWindow) selfp->id);
++ selfp->plug = gtk_plug_new((Window) selfp->id);
+ gtk_container_add(GTK_CONTAINER(selfp->plug), selfp->tree);
+ gtk_widget_show_all(selfp->plug);
+
+@@ -490,7 +491,7 @@
+
+ #line 84 "src/mn-evolution-folder-tree-server.gob"
+ static void
+-mn_evolution_folder_tree_server_plug_destroy_h (GtkObject * object, gpointer user_data)
++mn_evolution_folder_tree_server_plug_destroy_h (GtkWidget * object, gpointer user_data)
+ {
+ #line 482 "mn-evolution-folder-tree-server.c"
+ #define __GOB_FUNCTION__ "MN:Evolution:Folder:Tree:Server::plug_destroy_h"
+--- src/eggtrayicon.h.orig 2011-02-07 20:25:26.352057350 +0100
++++ src/eggtrayicon.h 2011-02-07 20:27:54.495032920 +0100
+@@ -23,10 +23,9 @@
+ #ifndef __EGG_TRAY_ICON_H__
+ #define __EGG_TRAY_ICON_H__
+
+-#include <gtk/gtkplug.h>
+-#ifdef GDK_WINDOWING_X11
++#include <gtk/gtk.h>
++#include <gtk/gtkx.h>
+ #include <gdk/gdkx.h>
+-#endif
+
+ G_BEGIN_DECLS
+
+--- build/src/mn-mail-icon.c.orig 2011-02-07 20:24:58.971663075 +0100
++++ build/src/mn-mail-icon.c 2011-02-07 20:30:33.714401306 +0100
+@@ -833,11 +833,13 @@
+ #line 239 "src/mn-mail-icon.gob"
+
+ GtkWidget *widget = user_data;
++ GtkAllocation allocation;
+
+- gdk_window_get_origin(widget->window, x, y);
++ gdk_window_get_origin(gtk_widget_get_window(widget), x, y);
++ gtk_widget_get_allocation(widget, &allocation);
+
+- *x += widget->allocation.x;
+- *y += widget->allocation.y;
++ *x += allocation.x;
++ *y += allocation.y;
+
+ if (*y > gdk_screen_get_height(gtk_widget_get_screen(widget)) / 2)
+ {
+@@ -847,7 +849,7 @@
+ *y -= req.height;
+ }
+ else
+- *y += widget->allocation.height;
++ *y += allocation.height;
+
+ *push_in = TRUE;
+ }}
+--- build/src/mn-mail-icon-widget.c.orig 2011-02-07 20:31:19.475816763 +0100
++++ build/src/mn-mail-icon-widget.c 2011-02-07 21:53:48.858814715 +0100
+@@ -64,9 +64,13 @@
+ #line 65 "mn-mail-icon-widget.c"
+ #line 110 "src/mn-mail-icon-widget.gob"
+ static void ___7_mn_mail_icon_widget_size_request (GtkWidget * widget, GtkRequisition * requisition);
++static void
++mn_mail_icon_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width);
++static void
++mn_mail_icon_widget_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height);
+ #line 68 "mn-mail-icon-widget.c"
+ #line 132 "src/mn-mail-icon-widget.gob"
+-static gboolean ___8_mn_mail_icon_widget_expose_event (GtkWidget * widget, GdkEventExpose * event);
++static gboolean ___8_mn_mail_icon_widget_draw (GtkWidget * widget, cairo_t *cr);
+ #line 71 "mn-mail-icon-widget.c"
+ #line 244 "src/mn-mail-icon-widget.gob"
+ static GdkPixbuf * mn_mail_icon_widget_render_icon (MNMailIconWidget * self);
+@@ -187,9 +191,10 @@
+ parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
+
+ #line 110 "src/mn-mail-icon-widget.gob"
+- gtk_widget_class->size_request = ___7_mn_mail_icon_widget_size_request;
++ gtk_widget_class->get_preferred_width = mn_mail_icon_widget_get_preferred_width;
++ gtk_widget_class->get_preferred_height = mn_mail_icon_widget_get_preferred_height;
+ #line 132 "src/mn-mail-icon-widget.gob"
+- gtk_widget_class->expose_event = ___8_mn_mail_icon_widget_expose_event;
++ gtk_widget_class->draw = ___8_mn_mail_icon_widget_draw;
+ #line 194 "mn-mail-icon-widget.c"
+ g_object_class->dispose = ___dispose;
+ g_object_class->finalize = ___finalize;
+@@ -234,7 +239,7 @@
+ {
+ #line 93 "src/mn-mail-icon-widget.gob"
+
+- GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
++ gtk_widget_set_has_window(GTK_WIDGET(self), FALSE);
+
+ gtk_widget_set_name(GTK_WIDGET(self), "mn-mail-icon");
+
+@@ -457,9 +462,28 @@
+ #undef __GOB_FUNCTION__
+ #undef PARENT_HANDLER
+
++static void
++mn_mail_icon_widget_get_preferred_width(GtkWidget *widget, gint *minimal_width, gint *natural_width)
++{
++ GtkRequisition requisition;
++
++ ___7_mn_mail_icon_widget_size_request (widget, &requisition);
++ *minimal_width = *natural_width = requisition.width;
++}
++
++static void
++mn_mail_icon_widget_get_preferred_height(GtkWidget *widget, gint *minimal_height, gint *natural_height)
++{
++ GtkRequisition requisition;
++
++ ___7_mn_mail_icon_widget_size_request (widget, &requisition);
++
++ *minimal_height = *natural_height = requisition.height;
++}
++
+ #line 132 "src/mn-mail-icon-widget.gob"
+ static gboolean
+-___8_mn_mail_icon_widget_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
++___8_mn_mail_icon_widget_draw (GtkWidget * widget G_GNUC_UNUSED, cairo_t *cr)
+ #line 464 "mn-mail-icon-widget.c"
+ #define PARENT_HANDLER(___widget,___event) \
+ ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
+@@ -472,7 +496,7 @@
+
+ Self *self = SELF(widget);
+
+- if (! GTK_WIDGET_DRAWABLE(widget) || ! selfp->stock_id)
++ if (! gtk_widget_is_drawable(widget) || ! selfp->stock_id)
+ return FALSE;
+
+ if (selfp->is_on)
+@@ -480,23 +504,34 @@
+ int x;
+ int y;
+ GdkRectangle image_area;
++ GtkAllocation allocation;
++ GtkRequisition requisition;
+
+ /* note: widget->requisition is the pixbuf size, see size_request() */
+
+- x = floor(widget->allocation.x + ((widget->allocation.width - widget->requisition.width) * ICON_XALIGN));
+- y = floor(widget->allocation.y + ((widget->allocation.height - widget->requisition.height) * ICON_YALIGN));
++ gtk_widget_get_allocation(widget, &allocation);
++ gtk_widget_get_requisition(widget, &requisition);
++
++ x = floor(allocation.x + ((allocation.width - requisition.width) * ICON_XALIGN));
++ y = floor(allocation.y + ((allocation.height - requisition.height) * ICON_YALIGN));
+
+ image_area.x = x;
+ image_area.y = y;
+- image_area.width = widget->requisition.width;
+- image_area.height = widget->requisition.height;
++ image_area.width = requisition.width;
++ image_area.height = requisition.height;
+
++#if 0
+ if (gdk_rectangle_intersect(&event->area, &image_area, &image_area))
++#endif
+ {
+ GdkPixbuf *pixbuf;
+
+ pixbuf = self_render_icon(self);
++ gdk_cairo_set_source_pixbuf(cr, pixbuf, image_area.x, image_area.y);
++ cairo_move_to(cr, image_area.x - x, image_area.y - y);
++ cairo_paint(cr);
+
++#if 0
+ gdk_draw_pixbuf(widget->window,
+ NULL,
+ pixbuf,
+@@ -509,6 +544,7 @@
+ GDK_RGB_DITHER_NORMAL,
+ 0,
+ 0);
++#endif
+
+ g_object_unref(pixbuf);
+ }
+@@ -523,13 +559,16 @@
+ int box_y;
+ int box_width;
+ int box_height;
++ GtkAllocation allocation;
++
++ gtk_widget_get_allocation(widget, &allocation);
+
+ if (! selfp->count_layout)
+ {
+ const char *size;
+ char *markup;
+
+- if (widget->allocation.height < 32)
++ if (allocation.height < 32)
+ size = "small";
+ else
+ size = "medium";
+@@ -546,17 +585,16 @@
+ box_width = count_rect.width + COUNT_BOX_XPAD * 2;
+ box_height = count_rect.height + COUNT_BOX_YPAD * 2;
+
+- box_x = widget->allocation.x + widget->allocation.width - box_width - COUNT_BOX_XMARGIN;
+- box_y = widget->allocation.y + widget->allocation.height - box_height - COUNT_BOX_YMARGIN;
++ box_x = allocation.x + allocation.width - box_width - COUNT_BOX_XMARGIN;
++ box_y = allocation.y + allocation.height - box_height - COUNT_BOX_YMARGIN;
+
+ count_x = box_x - count_rect.x + COUNT_BOX_XPAD;
+ count_y = box_y - count_rect.y + COUNT_BOX_YPAD;
+
+- gtk_paint_box(widget->style,
+- widget->window,
+- GTK_WIDGET_STATE(widget),
++ gtk_paint_box(gtk_widget_get_style(widget),
++ cr,
++ gtk_widget_get_state_flags(widget),
+ GTK_SHADOW_OUT,
+- &event->area,
+ widget,
+ NULL,
+ box_x,
+@@ -564,11 +602,10 @@
+ box_width,
+ box_height);
+
+- gtk_paint_layout(widget->style,
+- widget->window,
+- GTK_WIDGET_STATE(widget),
++ gtk_paint_layout(gtk_widget_get_style(widget),
++ cr,
++ gtk_widget_get_state_flags(widget),
+ FALSE,
+- &event->area,
+ widget,
+ NULL,
+ count_x,
+--- build/src/mn-mailbox-properties-dialog.c.orig 2011-02-07 21:57:31.257251776 +0100
++++ build/src/mn-mailbox-properties-dialog.c 2011-02-07 21:56:56.989854854 +0100
+@@ -456,7 +456,7 @@
+ MNMailboxProperties *properties;
+
+ mn_container_create_interface(GTK_CONTAINER(self),
+- PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.glade",
++ PKGDATADIR G_DIR_SEPARATOR_S "mailbox-properties-dialog.ui",
+ "notebook",
+ "mn_mailbox_properties_dialog_",
+ "notebook", &self->notebook,
+@@ -1290,7 +1290,7 @@
+ {
+ #line 686 "src/mn-mailbox-properties-dialog.gob"
+
+- if (GTK_WIDGET_IS_SENSITIVE(GTK_WINDOW(self)->default_widget))
++ if (gtk_widget_is_sensitive(gtk_window_get_default_widget(GTK_WINDOW(self))))
+ gtk_window_activate_default(GTK_WINDOW(self));
+ else
+ {
+@@ -1313,9 +1313,9 @@
+ if (elem->data == entry)
+ break;
+
+- if (GTK_WIDGET_MAPPED(elem->data)
+- && GTK_WIDGET_VISIBLE(elem->data)
+- && GTK_WIDGET_SENSITIVE(elem->data))
++ if (gtk_widget_get_mapped(elem->data)
++ && gtk_widget_get_visible(elem->data)
++ && gtk_widget_get_sensitive(elem->data))
+ next = elem->data;
+ }
+ while (! next);
+--- build/src/mn-mailbox-view.c.orig 2011-02-07 22:18:49.962462920 +0100
++++ build/src/mn-mailbox-view.c 2011-02-07 23:01:39.990363248 +0100
+@@ -412,23 +412,23 @@
+ binding_set = gtk_binding_set_by_class(class);
+
+ /* Delete removes a row */
+- gtk_binding_entry_add_signal(binding_set, GDK_Delete, 0, "activate-remove", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_KP_Delete, 0, "activate-remove", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Delete, 0, "activate-remove", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Delete, 0, "activate-remove", 0);
+
+ /* HIG 2.0 cut/copy/paste shortcuts */
+- gtk_binding_entry_add_signal(binding_set, GDK_x, GDK_CONTROL_MASK, "activate-cut", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_c, GDK_CONTROL_MASK, "activate-copy", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_v, GDK_CONTROL_MASK, "activate-paste", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_x, GDK_CONTROL_MASK, "activate-cut", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_c, GDK_CONTROL_MASK, "activate-copy", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_v, GDK_CONTROL_MASK, "activate-paste", 0);
+
+ /* cut/copy/paste shortcuts taken from gtkentry.c */
+- gtk_binding_entry_add_signal(binding_set, GDK_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Delete, GDK_SHIFT_MASK, "activate-cut", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Insert, GDK_CONTROL_MASK, "activate-copy", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Insert, GDK_SHIFT_MASK, "activate-paste", 0);
+
+ /* HIG 2.0 properties */
+- gtk_binding_entry_add_signal(binding_set, GDK_Return, GDK_MOD1_MASK, "activate-properties", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
+- gtk_binding_entry_add_signal(binding_set, GDK_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_Return, GDK_MOD1_MASK, "activate-properties", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_ISO_Enter, GDK_MOD1_MASK, "activate-properties", 0);
++ gtk_binding_entry_add_signal(binding_set, GDK_KEY_KP_Enter, GDK_MOD1_MASK, "activate-properties", 0);
+
+ #line 434 "mn-mailbox-view.c"
+ }
+@@ -934,14 +934,13 @@
+ #line 183 "src/mn-mailbox-view.gob"
+
+ GtkSelectionData *data;
+-
+ data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_MAILBOXES].atom);
+ if (data)
+ {
+ GSList *configurations;
+ GSList *l;
+
+- memcpy(&configurations, data->data, data->length);
++ memcpy(&configurations, gtk_selection_data_get_data(data), gtk_selection_data_get_length(data));
+
+ MN_LIST_FOREACH(l, configurations)
+ {
+@@ -962,14 +961,14 @@
+ data = gtk_clipboard_wait_for_contents(global_clipboard, clipboard_info[TARGET_GNOME_COPIED_FILES].atom);
+ if (data)
+ {
+- if (data->format == 8 && data->length > 0)
++ if (gtk_selection_data_get_format(data) == 8 && gtk_selection_data_get_length(data) > 0)
+ {
+ char *gnome_copied_files;
+ gboolean status;
+ MNGnomeCopiedFilesType type;
+ GSList *uri_list;
+
+- gnome_copied_files = g_strndup(data->data, data->length);
++ gnome_copied_files = g_strndup(gtk_selection_data_get_data(data), gtk_selection_data_get_length(data));
+ status = mn_parse_gnome_copied_files(gnome_copied_files, &type, &uri_list);
+ g_free(gnome_copied_files);
+
+--- build/src/mn-shell.c.orig 2011-02-07 23:02:17.852293679 +0100
++++ build/src/mn-shell.c 2011-02-07 23:04:39.223548403 +0100
+@@ -158,7 +158,7 @@
+ static void mn_shell_icon_activate_about_h (MNMailIcon * icon, gpointer user_data);
+ #line 160 "mn-shell.c"
+ #line 499 "src/mn-shell.gob"
+-static void mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data);
++static void mn_shell_icon_destroy_h (GtkWidget * object, gpointer user_data);
+ #line 163 "mn-shell.c"
+ #line 508 "src/mn-shell.gob"
+ static void mn_shell_update_sensitivity (MNShell * self);
+@@ -1006,7 +1006,7 @@
+
+ #line 499 "src/mn-shell.gob"
+ static void
+-mn_shell_icon_destroy_h (GtkObject * object, gpointer user_data)
++mn_shell_icon_destroy_h (GtkWidget * object, gpointer user_data)
+ {
+ #line 1004 "mn-shell.c"
+ #define __GOB_FUNCTION__ "MN:Shell::icon_destroy_h"
+--- build/src/mn-text-table.c.orig 2011-02-07 23:05:08.799927792 +0100
++++ build/src/mn-text-table.c 2011-02-07 23:18:06.480056895 +0100
+@@ -69,9 +69,11 @@
+ #line 70 "mn-text-table.c"
+ #line 104 "src/mn-text-table.gob"
+ static void ___4_mn_text_table_size_request (GtkWidget * widget, GtkRequisition * requisition);
++static void mn_text_table_get_preferred_width (GtkWidget * widget, gint * minimal_width, gint * natural_width);
++static void mn_text_table_get_preferred_height (GtkWidget * widget, gint * minimal_height, gint * natural_height);
+ #line 73 "mn-text-table.c"
+ #line 115 "src/mn-text-table.gob"
+-static gboolean ___5_mn_text_table_expose_event (GtkWidget * widget, GdkEventExpose * event);
++static gboolean ___5_mn_text_table_draw (GtkWidget * widget, cairo_t *cr);
+ #line 76 "mn-text-table.c"
+ #line 165 "src/mn-text-table.gob"
+ static void mn_text_table_set_dirty (MNTextTable * self);
+@@ -188,9 +190,10 @@
+ parent_class = g_type_class_ref (GTK_TYPE_WIDGET);
+
+ #line 104 "src/mn-text-table.gob"
+- gtk_widget_class->size_request = ___4_mn_text_table_size_request;
++ gtk_widget_class->get_preferred_width = mn_text_table_get_preferred_width;
++ gtk_widget_class->get_preferred_height = mn_text_table_get_preferred_height;
+ #line 115 "src/mn-text-table.gob"
+- gtk_widget_class->expose_event = ___5_mn_text_table_expose_event;
++ gtk_widget_class->draw = ___5_mn_text_table_draw;
+ #line 257 "src/mn-text-table.gob"
+ c->clear = ___real_mn_text_table_clear;
+ #line 197 "mn-text-table.c"
+@@ -216,7 +219,7 @@
+ {
+ #line 80 "src/mn-text-table.gob"
+
+- GTK_WIDGET_SET_FLAGS(self, GTK_NO_WINDOW);
++ gtk_widget_set_has_window(GTK_WIDGET(self), FALSE);
+
+ g_object_connect(self,
+ "swapped-signal::style-set", self_context_changed, self,
+@@ -290,9 +293,29 @@
+ #undef __GOB_FUNCTION__
+ #undef PARENT_HANDLER
+
++static void
++mn_text_table_get_preferred_width (GtkWidget * widget, gint * minimal_width, gint * natural_width)
++{
++ GtkRequisition requisition;
++
++ ___4_mn_text_table_size_request (widget, &requisition);
++
++ *minimal_width = *natural_width = requisition.width;
++}
++
++static void
++mn_text_table_get_preferred_height (GtkWidget * widget, gint * minimal_height, gint * natural_height)
++{
++ GtkRequisition requisition;
++
++ ___4_mn_text_table_size_request (widget, &requisition);
++
++ *minimal_height = *natural_height = requisition.height;
++}
++
+ #line 115 "src/mn-text-table.gob"
+ static gboolean
+-___5_mn_text_table_expose_event (GtkWidget * widget G_GNUC_UNUSED, GdkEventExpose * event)
++___5_mn_text_table_draw (GtkWidget * widget G_GNUC_UNUSED, cairo_t *cr)
+ #line 297 "mn-text-table.c"
+ #define PARENT_HANDLER(___widget,___event) \
+ ((GTK_WIDGET_CLASS(parent_class)->expose_event)? \
+@@ -304,10 +327,14 @@
+ #line 117 "src/mn-text-table.gob"
+
+ Self *self = SELF(widget);
++ GtkAllocation allocation;
+ int i;
+- int y = widget->allocation.y;
++ int y;
++
++ gtk_widget_get_allocation(widget, &allocation);
++ y = 0;
+
+- if (! GTK_WIDGET_DRAWABLE(widget))
++ if (! gtk_widget_is_drawable(widget))
+ return FALSE;
+
+ self_relayout(self);
+@@ -316,7 +343,7 @@
+ {
+ Row *row = g_ptr_array_index(selfp->rows, i);
+ int j;
+- int x = widget->allocation.x;
++ int x = 0;
+ int column = 0;
+
+ MN_ARRAY_FOREACH(j, row->cells)
+@@ -324,11 +351,10 @@
+ MNTextTableCell *cell = g_ptr_array_index(row->cells, j);
+
+ if (cell->layout)
+- gtk_paint_layout(widget->style,
+- widget->window,
+- GTK_WIDGET_STATE(widget),
++ gtk_paint_layout(gtk_widget_get_style(widget),
++ cr,
++ gtk_widget_get_state_flags(widget),
+ FALSE,
+- &event->area,
+ widget,
+ NULL,
+ x,
+--- build/src/mn-tooltips.c.orig 2011-02-07 23:19:05.903761972 +0100
++++ build/src/mn-tooltips.c 2011-02-07 23:41:19.368621912 +0100
+@@ -104,7 +104,7 @@
+ static void mn_tooltips_set_tip_widget_real (MNTooltips * self, GtkWidget * widget, GtkWidget * tip_widget, int border_width);
+ #line 106 "mn-tooltips.c"
+ #line 287 "src/mn-tooltips.gob"
+-static gboolean mn_tooltips_paint_window (MNTooltips * self);
++static gboolean mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr);
+ #line 109 "mn-tooltips.c"
+ #line 308 "src/mn-tooltips.gob"
+ static void mn_tooltips_draw_tips (MNTooltips * self);
+@@ -422,7 +422,13 @@
+
+ if (! selfp->window)
+ {
++ GtkStyleContext *ctx;
++
+ selfp->window = gtk_window_new(GTK_WINDOW_POPUP);
++
++ ctx = gtk_widget_get_style_context(GTK_WIDGET(selfp->window));
++ gtk_style_context_add_class(ctx, "tooltip");
++
+ self_update_screen(self, TRUE);
+ gtk_widget_set_app_paintable(selfp->window, TRUE);
+ gtk_window_set_resizable(GTK_WINDOW(selfp->window), FALSE);
+@@ -430,7 +430,7 @@
+ gtk_container_set_border_width(GTK_CONTAINER(selfp->window), selfp->border_width);
+
+ g_signal_connect_swapped(selfp->window,
+- "expose-event",
++ "draw",
+ G_CALLBACK(self_paint_window),
+ self);
+
+@@ -490,7 +490,7 @@
+
+ if (selfp->active_data
+ && selfp->active_data->widget == widget
+- && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
++ && gtk_widget_is_drawable(selfp->active_data->widget))
+ {
+ if (data->tip_widget)
+ g_object_unref(data->tip_widget);
+@@ -594,7 +594,7 @@
+
+ #line 287 "src/mn-tooltips.gob"
+ static gboolean
+-mn_tooltips_paint_window (MNTooltips * self)
++mn_tooltips_paint_window (MNTooltips * self, cairo_t *cr)
+ {
+ #line 600 "mn-tooltips.c"
+ #define __GOB_FUNCTION__ "MN:Tooltips::paint_window"
+@@ -608,18 +608,13 @@
+
+ GtkRequisition req;
+
+- gtk_widget_size_request(selfp->window, &req);
+- gtk_paint_flat_box(selfp->window->style,
+- selfp->window->window,
+- GTK_STATE_NORMAL,
+- GTK_SHADOW_OUT,
+- NULL,
+- selfp->window,
+- "tooltip",
+- 0,
+- 0,
+- req.width,
+- req.height);
++ gtk_widget_size_request(GTK_WIDGET(selfp->window), &req);
++ gtk_render_background(gtk_widget_get_style_context(GTK_WIDGET(selfp->window)),
++ cr,
++ 0,
++ 0,
++ req.width,
++ req.height);
+
+ return FALSE;
+ }}
+@@ -651,10 +650,11 @@
+ gint monitor_num, px, py;
+ GdkRectangle monitor;
+ int screen_width;
++ GtkAllocation allocation;
+
+ if (! selfp->window)
+ self_force_window(self);
+- else if (GTK_WIDGET_VISIBLE(selfp->window))
++ else if (gtk_widget_get_visible(selfp->window))
+ g_get_current_time(&selfp->last_popdown);
+
+ gtk_widget_ensure_style(selfp->window);
+@@ -670,7 +670,7 @@
+
+ data = selfp->active_data;
+
+- child = GTK_BIN(selfp->window)->child;
++ child = gtk_bin_get_child(GTK_BIN(selfp->window));
+ if (child)
+ gtk_container_remove(GTK_CONTAINER(selfp->window), child);
+
+@@ -684,14 +684,16 @@
+ w = requisition.width;
+ h = requisition.height;
+
+- gdk_window_get_origin(widget->window, &x, &y);
+- if (GTK_WIDGET_NO_WINDOW(widget))
++ gtk_widget_get_allocation(selfp->window, &allocation);
++
++ gdk_window_get_origin(gtk_widget_get_window(widget), &x, &y);
++ if (! gtk_widget_get_has_window(widget))
+ {
+- x += widget->allocation.x;
+- y += widget->allocation.y;
++ x += allocation.x;
++ y += allocation.y;
+ }
+
+- x += widget->allocation.width / 2;
++ x += allocation.width / 2;
+
+ if (! keyboard_mode)
+ gdk_window_get_pointer(gdk_screen_get_root_window(screen), &x, NULL, NULL);
+@@ -712,11 +714,11 @@
+ else if (x < monitor.x)
+ x = monitor.x;
+
+- if ((y + h + widget->allocation.height + 4) > monitor.y + monitor.height
++ if ((y + h + allocation.height + 4) > monitor.y + monitor.height
+ && (y - 4) > monitor.y)
+ y = y - h - 4;
+ else
+- y = y + widget->allocation.height + 4;
++ y = y + allocation.height + 4;
+
+ /*
+ * The following block is not part of GTK+ and has been added to
+@@ -760,7 +762,7 @@
+
+ Self *self = SELF(data);
+
+- if (selfp->active_data && GTK_WIDGET_DRAWABLE(selfp->active_data->widget))
++ if (selfp->active_data && gtk_widget_is_drawable(selfp->active_data->widget))
+ self_draw_tips(self);
+
+ selfp->timeout_id = 0;
+@@ -785,7 +787,7 @@
+
+ if (selfp->window)
+ {
+- if (GTK_WIDGET_VISIBLE(selfp->window))
++ if (gtk_widget_get_visible(selfp->window))
+ g_get_current_time(&selfp->last_popdown);
+ gtk_widget_hide(selfp->window);
+ }
+@@ -802,7 +804,7 @@
+ {
+ TooltipsData *data = l->data;
+
+- if (data->widget == widget && GTK_WIDGET_DRAWABLE(widget))
++ if (data->widget == widget && gtk_widget_is_drawable(widget))
+ {
+ selfp->active_data = data;
+ break;
+@@ -937,7 +939,7 @@
+
+ if (GTK_IS_WINDOW(toplevel))
+ {
+- GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
++ GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ g_object_set_data(G_OBJECT(toplevel), TOOLTIPS_KEYBOARD_MODE, GINT_TO_POINTER(TRUE));
+
+@@ -966,7 +968,7 @@
+
+ if (GTK_IS_WINDOW(toplevel))
+ {
+- GtkWidget *focus = GTK_WINDOW(toplevel)->focus_widget;
++ GtkWidget *focus = gtk_window_get_focus(GTK_WINDOW(toplevel));
+
+ if (focus)
+ self_hide_tip(focus);
+@@ -1057,24 +1059,24 @@
+ break;
+
+ case GDK_ENTER_NOTIFY:
+- if (! (GTK_IS_MENU_ITEM(widget) && GTK_MENU_ITEM(widget)->submenu))
++ if (! (GTK_IS_MENU_ITEM(widget) && gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget))))
+ self_start_delay(self, widget);
+ break;
+
+ case GDK_LEAVE_NOTIFY:
+ self_set_active_widget(self, NULL);
+- selfp->use_sticky_delay = selfp->window && GTK_WIDGET_VISIBLE(selfp->window);
++ selfp->use_sticky_delay = selfp->window && gtk_widget_get_visible(selfp->window);
+ break;
+
+ case GDK_MOTION_NOTIFY:
+ /* Handle menu items specially ... pend popup for each motion
+ * on other widgets, we ignore motion.
+ */
+- if (GTK_IS_MENU_ITEM(widget) && ! GTK_MENU_ITEM(widget)->submenu)
++ if (GTK_IS_MENU_ITEM(widget) && ! gtk_menu_item_get_submenu(GTK_MENU_ITEM(widget)))
+ {
+ /* Completely evil hack to make sure we get the LEAVE_NOTIFY
+ */
+- GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
++ //GTK_PRIVATE_SET_FLAG(widget, GTK_LEAVE_PENDING);
+ self_set_active_widget(self, NULL);
+ self_start_delay(self, widget);
+ break;
+--- src/nautilus-cell-renderer-pixbuf-emblem.c.orig 2011-02-08 00:16:43.847831409 +0100
++++ src/nautilus-cell-renderer-pixbuf-emblem.c 2011-02-08 00:32:59.128682767 +0100
+@@ -39,17 +39,16 @@
+ GtkWidget *widget);
+ static void nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+- GdkRectangle *rectangle,
++ const GdkRectangle *rectangle,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+ gint *height);
+ static void nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
+- GdkWindow *window,
++ cairo_t *cr,
+ GtkWidget *widget,
+- GdkRectangle *background_area,
+- GdkRectangle *cell_area,
+- GdkRectangle *expose_area,
++ const GdkRectangle *background_area,
++ const GdkRectangle *cell_area,
+ GtkCellRendererState flags);
+
+ enum {
+@@ -356,7 +355,7 @@
+ static void
+ nautilus_cell_renderer_pixbuf_emblem_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+- GdkRectangle *cell_area,
++ const GdkRectangle *cell_area,
+ gint *x_offset,
+ gint *y_offset,
+ gint *width,
+@@ -368,6 +367,10 @@
+ gint pixbuf_height = 0;
+ gint calc_width;
+ gint calc_height;
++ int xpad;
++ int ypad;
++ gfloat xalign;
++ gfloat yalign;
+
+ if (!cellpixbuf->pixbuf && cellinfo->stock_id)
+ nautilus_cell_renderer_pixbuf_emblem_create_stock_pixbuf (cellpixbuf, widget);
+@@ -385,8 +388,11 @@
+ pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed));
+ }
+
+- calc_width = (gint) cell->xpad * 2 + pixbuf_width;
+- calc_height = (gint) cell->ypad * 2 + pixbuf_height;
++ gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
++ gtk_cell_renderer_get_alignment(cell, &xalign, &yalign);
++
++ calc_width = (gint) xpad * 2 + pixbuf_width;
++ calc_height = (gint) ypad * 2 + pixbuf_height;
+
+ if (x_offset) *x_offset = 0;
+ if (y_offset) *y_offset = 0;
+@@ -394,14 +400,14 @@
+ if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) {
+ if (x_offset) {
+ *x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
+- 1.0 - cell->xalign : cell->xalign) *
+- (cell_area->width - calc_width - 2 * cell->xpad));
+- *x_offset = MAX (*x_offset, 0) + cell->xpad;
++ 1.0 - xalign : xalign) *
++ (cell_area->width - calc_width - 2 * xpad));
++ *x_offset = MAX (*x_offset, 0) + xpad;
+ }
+ if (y_offset) {
+- *y_offset = (cell->yalign *
+- (cell_area->height - calc_height - 2 * cell->ypad));
+- *y_offset = MAX (*y_offset, 0) + cell->ypad;
++ *y_offset = (yalign *
++ (cell_area->height - calc_height - 2 * ypad));
++ *y_offset = MAX (*y_offset, 0) + ypad;
+ }
+ }
+
+@@ -414,11 +420,10 @@
+
+ static void
+ nautilus_cell_renderer_pixbuf_emblem_render (GtkCellRenderer *cell,
+- GdkWindow *window,
++ cairo_t *cr,
+ GtkWidget *widget,
+- GdkRectangle *background_area,
+- GdkRectangle *cell_area,
+- GdkRectangle *expose_area,
++ const GdkRectangle *background_area,
++ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
+
+ {
+@@ -429,13 +434,19 @@
+ GdkRectangle pix_emblem_rect;
+ GdkRectangle draw_rect;
+ gboolean stock_pixbuf = FALSE;
++ gboolean is_expander = FALSE;
++ gboolean is_expanded = FALSE;
++ int xpad;
++ int ypad;
++
++ g_object_get(cell, "is-expander", &is_expander, "is-expanded", &is_expanded, NULL);
+
+ pixbuf = cellpixbuf->pixbuf;
+- if (cell->is_expander) {
+- if (cell->is_expanded &&
++ if (is_expander) {
++ if (is_expanded &&
+ cellpixbuf->pixbuf_expander_open != NULL) {
+ pixbuf = cellpixbuf->pixbuf_expander_open;
+- } else if (!cell->is_expanded &&
++ } else if (!is_expanded &&
+ cellpixbuf->pixbuf_expander_closed != NULL) {
+ pixbuf = cellpixbuf->pixbuf_expander_closed;
+ }
+@@ -456,15 +467,20 @@
+ if (stock_pixbuf)
+ pixbuf = cellpixbuf->pixbuf;
+
++ gtk_cell_renderer_get_padding(cell, &xpad, &ypad);
++
+ pix_rect.x += cell_area->x;
+ pix_rect.y += cell_area->y;
+- pix_rect.width -= cell->xpad * 2;
+- pix_rect.height -= cell->ypad * 2;
++ pix_rect.width -= xpad * 2;
++ pix_rect.height -= ypad * 2;
+
++ if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect)) {
++#if 0
+ if (gdk_rectangle_intersect (cell_area, &pix_rect, &draw_rect) &&
+ gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
++
+ gdk_draw_pixbuf (window,
+- widget->style->black_gc,
++ gtk_widget_get_style(widget)->black_gc,
+ pixbuf,
+ /* pixbuf 0, 0 is at pix_rect.x, pix_rect.y */
+ draw_rect.x - pix_rect.x,
+@@ -475,6 +491,11 @@
+ draw_rect.height,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
++#endif
++
++ cairo_move_to (cr, draw_rect.x - pix_rect.x, draw_rect.y - pix_rect.y);
++ gdk_cairo_set_source_pixbuf (cr, pixbuf, draw_rect.x, draw_rect.y);
++ cairo_paint (cr);
+ }
+
+ if (cellpixbuf->pixbuf_emblem) {
+@@ -482,8 +503,11 @@
+ pix_emblem_rect.height = gdk_pixbuf_get_height (cellpixbuf->pixbuf_emblem);
+ pix_emblem_rect.x = pix_rect.x;
+ pix_emblem_rect.y = pix_rect.y + pix_rect.height - pix_emblem_rect.height;
++ if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect)) {
++#if 0
+ if (gdk_rectangle_intersect (cell_area, &pix_emblem_rect, &draw_rect) &&
+ gdk_rectangle_intersect (expose_area, &draw_rect, &draw_rect)) {
++
+ gdk_draw_pixbuf (window,
+ widget->style->black_gc,
+ cellpixbuf->pixbuf_emblem,
+@@ -496,6 +520,11 @@
+ draw_rect.height,
+ GDK_RGB_DITHER_NORMAL,
+ 0, 0);
++#endif
++
++ cairo_move_to (cr, draw_rect.x - pix_emblem_rect.x, draw_rect.y - pix_emblem_rect.y);
++ gdk_cairo_set_source_pixbuf (cr, cellpixbuf->pixbuf_emblem, draw_rect.x, draw_rect.y);
++ cairo_paint (cr);
+ }
+ }
+ }
+--- src/nautilus-cell-renderer-pixbuf-emblem.h.orig 2011-02-07 22:18:12.336471764 +0100
++++ src/nautilus-cell-renderer-pixbuf-emblem.h 2011-02-08 00:20:30.461758697 +0100
+@@ -25,18 +25,18 @@
+ #ifndef NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
+ #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_H
+
+-#include <gtk/gtkcellrenderer.h>
++#include <gtk/gtk.h>
+
+ #define NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM \
+ (nautilus_cell_renderer_pixbuf_emblem_get_type ())
+ #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
+- (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
++ (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblem))
+ #define NAUTILUS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
+- (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
++ (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM, NautilusCellRendererPixbufEmblemClass))
+ #define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM(obj) \
+- (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
++ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
+ #define NAUTILUS_IS_CELL_RENDERER_PIXBUF_EMBLEM_CLASS(klass) \
+- (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
++ (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_CELL_RENDERER_PIXBUF_EMBLEM))
+
+ typedef struct _NautilusCellRendererPixbufEmblem NautilusCellRendererPixbufEmblem;
+ typedef struct _NautilusCellRendererPixbufEmblemClass NautilusCellRendererPixbufEmblemClass;
+--- build/src/mn-authenticated-mailbox.c.orig 2011-02-08 00:34:16.332610802 +0100
++++ build/src/mn-authenticated-mailbox.c 2011-02-08 00:36:23.706936717 +0100
+@@ -25,7 +25,7 @@
+ #line 29 "src/mn-authenticated-mailbox.gob"
+
+ #include <glib/gi18n.h>
+-#include <gnome.h>
++#include <libgnome/libgnome.h>
+ #include "mn-mailbox-private.h"
+ #include "mn-shell.h"
+ #include "mn-util.h"
+@@ -859,6 +859,7 @@
+
+ /* keep the title in sync with gnome-authentication-manager */
+
++#if 0
+ /* translators: header capitalization */
+ selfp->auth_dialog = gnome_password_dialog_new(_("Authentication Required"),
+ message,
+@@ -891,6 +892,9 @@
+ gtk_widget_destroy(selfp->auth_dialog);
+
+ return ok;
++#else
++ return FALSE;
++#endif
+ }}
+ #line 896 "mn-authenticated-mailbox.c"
+ #undef __GOB_FUNCTION__
+--- build/src/mn-about-dialog.c.orig 2011-02-08 22:20:54.469841262 +0100
++++ build/src/mn-about-dialog.c 2011-02-08 22:21:13.309839037 +0100
+@@ -111,9 +111,11 @@
+ {
+ #line 32 "src/mn-about-dialog.gob"
+
++#if 0
+ gtk_about_dialog_set_email_hook(self_activate_link_cb, "mailto:", NULL);
+ gtk_about_dialog_set_url_hook(self_activate_link_cb, NULL, NULL);
+-
++#endif
++
+ #line 118 "mn-about-dialog.c"
+ }
+ }
+--- build/src/mn-autodetect-mailbox-properties.c.orig 2011-02-08 22:21:58.639427345 +0100
++++ build/src/mn-autodetect-mailbox-properties.c 2011-02-08 22:22:43.564035901 +0100
+@@ -355,10 +355,9 @@
+
+ toplevel = gtk_widget_get_toplevel(GTK_WIDGET(button));
+ /* translators: header capitalization */
+- selfp->chooser = gtk_file_chooser_dialog_new_with_backend(_("Select a File or Folder"),
++ selfp->chooser = gtk_file_chooser_dialog_new(_("Select a File or Folder"),
+ GTK_WINDOW(toplevel),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+- "gnome-vfs",
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN, 1,
+ NULL);
+--- build/src/mn-pi-mailbox-properties.c.orig 2011-02-08 22:30:08.051375715 +0100
++++ build/src/mn-pi-mailbox-properties.c 2011-02-08 22:30:21.398665261 +0100
+@@ -415,7 +415,7 @@
+ int i;
+
+ for (i = 0; i < MN_PI_MAILBOX_N_CONNECTION_TYPES; i++)
+- gtk_widget_set_sensitive(self->port_spin[i], GTK_WIDGET_SENSITIVE(self->conn_radio[i]) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->conn_radio[i])));
++ gtk_widget_set_sensitive(self->port_spin[i], gtk_widget_get_sensitive(self->conn_radio[i]) && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(self->conn_radio[i])));
+
+ g_object_notify(G_OBJECT(self), "complete");
+ }}
+--- src/eggtrayicon.c.orig 2011-02-07 23:42:30.405791829 +0100
++++ src/eggtrayicon.c 2011-02-08 23:06:16.092968325 +0100
+@@ -25,7 +25,7 @@
+
+ #include "eggtrayicon.h"
+
+-#include <gdkconfig.h>
++#include <gdk/gdk.h>
+ #if defined (GDK_WINDOWING_X11)
+ #include <gdk/gdkx.h>
+ #include <X11/Xatom.h>
+@@ -258,7 +258,7 @@
+ {
+ GdkWindow *gdkwin;
+
+- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
++ gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (widget),
+ icon->manager_window);
+
+ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+@@ -290,7 +290,7 @@
+ ev.window = window;
+ ev.message_type = icon->system_tray_opcode_atom;
+ ev.format = 32;
+- ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
++ ev.data.l[0] = gdk_x11_get_server_time (gtk_widget_get_window(GTK_WIDGET (icon)));
+ ev.data.l[1] = message;
+ ev.data.l[2] = data1;
+ ev.data.l[3] = data2;
+@@ -342,12 +342,12 @@
+ {
+ GdkWindow *gdkwin;
+
+- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
++ gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+
+ gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+
+- if (dock_if_realized && GTK_WIDGET_REALIZED (icon))
++ if (dock_if_realized && gtk_widget_get_realized (GTK_WIDGET(icon)))
+ egg_tray_icon_send_dock_request (icon);
+
+ egg_tray_icon_get_orientation_property (icon);
+@@ -355,10 +355,16 @@
+ }
+
+ static gboolean
+-transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
++transparent_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
+ {
+- gdk_window_clear_area (widget->window, event->area.x, event->area.y,
++#if 0
++ gdk_window_clear_area (gtk_widget_get_window(widget), event->area.x, event->area.y,
+ event->area.width, event->area.height);
++#endif
++ cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
++ //gdk_cairo_region (cr, event->region);
++ cairo_fill (cr);
++
+ return FALSE;
+ }
+
+@@ -366,20 +372,20 @@
+ make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
+ gpointer user_data)
+ {
+- gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
++ //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
+ }
+
+ static void
+ make_transparent (GtkWidget *widget, gpointer user_data)
+ {
+- if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
++ if (! gtk_widget_get_has_window (widget) || gtk_widget_get_app_paintable (widget))
+ return;
+
+ gtk_widget_set_app_paintable (widget, TRUE);
+ gtk_widget_set_double_buffered (widget, FALSE);
+- gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+- g_signal_connect (widget, "expose_event",
+- G_CALLBACK (transparent_expose_event), NULL);
++ //gdk_window_set_back_pixmap (gtk_widget_get_window(widget), NULL, TRUE);
++ g_signal_connect (widget, "draw",
++ G_CALLBACK (transparent_draw), NULL);
+ g_signal_connect_after (widget, "style_set",
+ G_CALLBACK (make_transparent_again), NULL);
+ }
+@@ -391,7 +397,7 @@
+
+ g_return_if_fail (icon->manager_window != None);
+
+- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
++ gdkwin = gdk_x11_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
+ icon->manager_window);
+
+ gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
+--- build/src/mn-properties-dialog.c.orig 2011-02-08 23:37:12.605200174 +0100
++++ build/src/mn-properties-dialog.c 2011-02-08 23:37:18.601881191 +0100
+@@ -183,7 +183,7 @@
+ GtkTreeSelection *selection;
+
+ mn_container_create_interface(GTK_CONTAINER(self),
+- PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.glade",
++ PKGDATADIR G_DIR_SEPARATOR_S "properties-dialog.ui",
+ "main_vbox",
+ "mn_properties_dialog_",
+ "notebook", &selfp->notebook,
+--- src/mn-util.c.orig 2011-02-08 00:01:25.167207512 +0100
++++ src/mn-util.c 2011-02-09 00:01:35.718285446 +0100
+@@ -26,8 +26,7 @@
+ #include <gmodule.h>
+ #include <glib/gi18n.h>
+ #include <gobject/gvaluecollector.h>
+-#include <gnome.h>
+-#include <glade/glade.h>
++#include <libgnome/libgnome.h>
+ #include "mn-util.h"
+ #include "mn-mailboxes.h"
+ #include "mn-shell.h"
+@@ -303,49 +302,55 @@
+ return pixbuf;
+ }
+
+-static GladeXML *
++static GtkBuilder *
+ mn_glade_xml_new (const char *filename, const char *root, const char *domain)
+ {
+- GladeXML *xml;
++ GtkBuilder *builder;
++ GError *err = NULL;
+
+ g_return_val_if_fail(filename != NULL, NULL);
+
+- xml = glade_xml_new(filename, root, domain);
+- if (! xml)
+- mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\".", filename);
++ builder = gtk_builder_new();
++ gtk_builder_set_translation_domain(builder, domain);
++ if (! gtk_builder_add_from_file(builder, filename, &err)) {
++ mn_show_fatal_error_dialog(NULL, "Unable to load interface \"%s\": %s.", filename, err->message);
++ g_error_free(err);
++ g_object_unref(builder);
++ return NULL;
++ }
+
+- return xml;
++ return builder;
+ }
+
+ static GtkWidget *
+-mn_glade_xml_get_widget (GladeXML *xml, const char *widget_name)
++mn_glade_xml_get_widget (GtkBuilder *builder, const char *widget_name)
+ {
+ GtkWidget *widget;
+
+- g_return_val_if_fail(GLADE_IS_XML(xml), NULL);
++ g_return_val_if_fail(GTK_IS_BUILDER(builder), NULL);
+ g_return_val_if_fail(widget_name != NULL, NULL);
+
+- widget = glade_xml_get_widget(xml, widget_name);
++ widget = GTK_WIDGET(gtk_builder_get_object(builder, widget_name));
+ if (! widget)
+- mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface \"%s\".", widget_name, xml->filename);
++ mn_show_fatal_error_dialog(NULL, "Widget \"%s\" not found in interface.", widget_name);
+
+ return widget;
+ }
+
+ static void
+-create_interface_connect_cb (const char *handler_name,
++create_interface_connect_cb (GtkBuilder *builder,
+ GObject *object,
+ const char *signal_name,
+- const char *signal_data,
++ const char *handler_name,
+ GObject *connect_object,
+- gboolean after,
++ GConnectFlags flags,
+ gpointer user_data)
+ {
+ static GModule *module = NULL;
+ ContainerCreateInterfaceConnectInfo *info = user_data;
+ char *cb_name;
+ GCallback cb;
+- GConnectFlags flags;
++ GConnectFlags cflags;
+
+ if (! module)
+ {
+@@ -359,11 +364,9 @@
+ mn_show_fatal_error_dialog(NULL, "Signal handler \"%s\" not found.", cb_name);
+ g_free(cb_name);
+
+- flags = G_CONNECT_SWAPPED;
+- if (after)
+- flags |= G_CONNECT_AFTER;
++ cflags = G_CONNECT_SWAPPED;
+
+- g_signal_connect_data(object, signal_name, cb, info->container, NULL, flags);
++ g_signal_connect_data(object, signal_name, cb, info->container, NULL, cflags);
+ }
+
+ void
+@@ -373,7 +376,7 @@
+ const char *callback_prefix,
+ ...)
+ {
+- GladeXML *xml;
++ GtkBuilder *xml;
+ GtkWidget *child;
+ ContainerCreateInterfaceConnectInfo info;
+ va_list args;
+@@ -387,14 +390,16 @@
+ xml = mn_glade_xml_new(filename, child_name, NULL);
+ child = mn_glade_xml_get_widget(xml, child_name);
+
+- if (GTK_IS_DIALOG(container))
+- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(container)->vbox), child, TRUE, TRUE, 0);
+- else
++ if (GTK_IS_DIALOG(container)) {
++ gtk_widget_unparent(child);
++ gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(container))), child, TRUE, TRUE, 0);
++ } else {
+ gtk_container_add(container, child);
++ }
+
+ info.container = container;
+ info.callback_prefix = callback_prefix;
+- glade_xml_signal_autoconnect_full(xml, create_interface_connect_cb, &info);
++ gtk_builder_connect_signals_full(xml, create_interface_connect_cb, &info);
+
+ va_start(args, callback_prefix);
+
+@@ -422,7 +427,7 @@
+
+ toplevel = gtk_widget_get_toplevel(widget);
+
+- return GTK_WIDGET_TOPLEVEL(toplevel) ? GTK_WINDOW(toplevel) : NULL;
++ return gtk_widget_get_toplevel(toplevel) ? GTK_WINDOW(toplevel) : NULL;
+ }
+
+ static void
+@@ -493,9 +498,11 @@
+ gpointer user_data)
+ {
+ GtkAdjustment *adjustment;
++ GtkAllocation allocation;
+
++ gtk_widget_get_allocation(widget, &allocation);
+ adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(widget));
+- gtk_adjustment_set_value(adjustment, (double) y / (widget->allocation.height - 2) * (adjustment->upper - adjustment->page_size));
++ gtk_adjustment_set_value(adjustment, (double) y / (allocation.height - 2) * (gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment)));
+
+ return TRUE; /* we're forcibly in a drop zone */
+ }
+@@ -562,7 +569,7 @@
+ MNMailbox *mailbox;
+
+ /* text/x-moz-url is encoded in UCS-2 but in format 8: broken */
+- if (selection_data->format != 8 || selection_data->length <= 0 || (selection_data->length % 2) != 0)
++ if (gtk_selection_data_get_format(selection_data) != 8 || gtk_selection_data_get_length(selection_data) <= 0 || (gtk_selection_data_get_length(selection_data) % 2) != 0)
+ {
+ mn_show_error_dialog(mn_widget_get_parent_window(widget),
+ _("A drag and drop error has occurred"),
+@@ -570,8 +577,8 @@
+ return;
+ }
+
+- char_data = (const guint16 *) selection_data->data;
+- char_len = selection_data->length / 2;
++ char_data = (const guint16 *) gtk_selection_data_get_data(selection_data);
++ char_len = gtk_selection_data_get_length(selection_data) / 2;
+
+ url = g_string_new(NULL);
+ for (i = 0; i < char_len && char_data[i] != '\n'; i++)
+@@ -1322,7 +1329,7 @@
+ }
+
+ static void
+-dialog_run_nonmodal_destroy_h (GtkObject *object, gpointer user_data)
++dialog_run_nonmodal_destroy_h (GtkWidget *object, gpointer user_data)
+ {
+ RunNonmodalInfo *info = user_data;
+
+@@ -1375,7 +1382,7 @@
+
+ g_object_ref(dialog);
+
+- if (! GTK_WIDGET_VISIBLE(dialog))
++ if (! gtk_widget_get_visible(dialog))
+ gtk_widget_show(GTK_WIDGET(dialog));
+
+ g_object_connect(dialog,
+--- src/mn-main.c.gtk3 2008-05-22 17:45:35.000000000 +0200
++++ src/mn-main.c 2011-02-08 23:32:33.800030659 +0100
+@@ -21,7 +21,7 @@
+ #include <stdlib.h>
+ #include <signal.h>
+ #include <glib/gi18n.h>
+-#include <gnome.h>
++#include <libgnome/libgnome.h>
+ #include <libgnomevfs/gnome-vfs.h>
+ #include <libnotify/notify.h>
+ #include <dbus/dbus-glib-lowlevel.h>
+@@ -452,7 +452,7 @@
+
+ gnome_program_init(PACKAGE,
+ VERSION,
+- LIBGNOMEUI_MODULE,
++ LIBGNOME_MODULE,
+ argc,
+ argv,
+ GNOME_PARAM_HUMAN_READABLE_NAME, _("Mail Notification"),
+@@ -460,6 +460,8 @@
+ GNOME_PARAM_GOPTION_CONTEXT, option_context,
+ NULL);
+
++ gtk_init(&argc, &argv);
++
+ if (arg_version)
+ {
+ print_version();
+@@ -497,7 +499,9 @@
+ if (! gnome_vfs_init())
+ mn_show_fatal_error_dialog(NULL, _("Unable to initialize the GnomeVFS library."));
+
++#if 0
+ gnome_authentication_manager_init();
++#endif
+
+ /* must be called before init_gmime() */
+ mn_conf_init();
+--- src/mn-conf.c.gtk3 2008-05-22 17:45:35.000000000 +0200
++++ src/mn-conf.c 2011-02-07 20:07:01.630580132 +0100
+@@ -23,7 +23,7 @@
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <glib/gi18n.h>
+-#include <gnome.h>
++#include <libgnome/libgnome.h>
+ #include "mn-util.h"
+ #include "mn-conf.h"
+ #include "mn-shell.h"
+--- data/mail-notification.desktop.in.orig 2011-07-08 13:46:52.327548264 +0200
++++ data/mail-notification.desktop.in 2011-07-08 13:47:00.732704467 +0200
+@@ -5,7 +5,7 @@
+ _Comment=Get notified when new mail arrives
+ Type=Application
+ Categories=GNOME;GTK;Network;Email;
+-Exec=mail-notification --sm-disable
++Exec=mail-notification
+ Terminal=false
+ StartupNotify=true
+ X-GNOME-DocPath=mail-notification/mail-notification.xml
diff --git a/staging/mail-notification/mail-notification-5.4-icons.patch b/staging/mail-notification/mail-notification-5.4-icons.patch
new file mode 100644
index 000000000..48d54742a
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-icons.patch
@@ -0,0 +1,39 @@
+diff -Nrbu mail-notification-5.4/src/mn-stock.c mail-notification-5.4-OK/src/mn-stock.c
+--- mail-notification-5.4/src/mn-stock.c 2008-05-22 19:45:35.000000000 +0400
++++ mail-notification-5.4-OK/src/mn-stock.c 2010-05-24 19:36:03.000000000 +0400
+@@ -32,11 +32,11 @@
+ const char *icon_name;
+ const char *source_stock_id;
+ } icons[] = {
+- { MN_STOCK_MAIL, NULL, "stock_mail" },
+- { MN_STOCK_NO_MAIL, NULL, "stock_inbox" },
+- { MN_STOCK_LOCAL, NULL, "stock_folder" },
+- { MN_STOCK_REMOTE, NULL, "stock_internet" },
+- { MN_STOCK_UNKNOWN, NULL, "stock_unknown" },
++ { MN_STOCK_MAIL, NULL, "mail-message-new" },
++ { MN_STOCK_NO_MAIL, NULL, "mail-notification" },
++ { MN_STOCK_LOCAL, NULL, "folder" },
++ { MN_STOCK_REMOTE, NULL, "applications-internet" },
++ { MN_STOCK_UNKNOWN, NULL, "dialog-question" },
+ { MN_STOCK_ERROR, NULL, NULL, GTK_STOCK_DIALOG_ERROR },
+ #if WITH_GMAIL
+ { MN_STOCK_GMAIL, PKGDATADIR G_DIR_SEPARATOR_S "gmail.png" },
+@@ -48,14 +48,14 @@
+ { MN_STOCK_HOTMAIL, PKGDATADIR G_DIR_SEPARATOR_S "hotmail.png" },
+ #endif
+ #if WITH_MBOX || WITH_MOZILLA || WITH_MH || WITH_MAILDIR || WITH_SYLPHEED
+- { MN_STOCK_SYSTEM_MAILBOX, NULL, "system" },
++ { MN_STOCK_SYSTEM_MAILBOX, NULL, "applications-system" },
+ #endif
+ #if WITH_EVOLUTION
+ { MN_STOCK_EVOLUTION_MAILBOX, NULL, "evolution" },
+ #endif
+- { MN_STOCK_MAIL_READER, NULL, "stock_mail-handling" },
+- { MN_STOCK_OPEN_MESSAGE, NULL, "stock_mail-open" },
+- { MN_STOCK_CONSIDER_NEW_MAIL_AS_READ, NULL, "stock_mark" }
++ { MN_STOCK_MAIL_READER, NULL, "mail-unread" },
++ { MN_STOCK_OPEN_MESSAGE, NULL, "mail-read" },
++ { MN_STOCK_CONSIDER_NEW_MAIL_AS_READ, NULL, "mail-mark-read" }
+ };
+ GtkIconFactory *factory;
+ GtkIconTheme *icon_theme;
diff --git a/staging/mail-notification/mail-notification-5.4-kde-trayicon.patch b/staging/mail-notification/mail-notification-5.4-kde-trayicon.patch
new file mode 100644
index 000000000..a3bdc8372
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-kde-trayicon.patch
@@ -0,0 +1,72 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-shell.c mail-notification-5.4-OK/build/src/mn-shell.c
+--- mail-notification-5.4/build/src/mn-shell.c 2010-10-11 17:45:23.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-shell.c 2010-10-11 17:45:48.000000000 +0400
+@@ -313,6 +313,29 @@
+ #undef __GOB_FUNCTION__
+
+ static void
++mn_shell_init_icon_base (MNShell * self)
++{
++ g_return_if_fail (self != NULL);
++ g_return_if_fail (MN_IS_SHELL (self));
++
++ self->icon = MN_MAIL_ICON(mn_mail_icon_new());
++ mn_add_weak_pointer(&self->icon);
++
++ g_object_connect(self->icon,
++ "signal::activate", self_icon_activate_h, self,
++ "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
++ "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
++ "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
++ "swapped-signal::activate-update", self_update, self,
++ "signal::activate-properties", self_icon_activate_properties_h, self,
++ "signal::activate-help", self_icon_activate_help_h, self,
++ "signal::activate-about", self_icon_activate_about_h, self,
++ "swapped-signal::activate-remove", self_quit, self,
++ "signal::destroy", self_icon_destroy_h, self,
++ NULL);
++}
++
++static void
+ mn_shell_init (MNShell * o G_GNUC_UNUSED)
+ {
+ #define __GOB_FUNCTION__ "MN:Shell::init"
+@@ -793,22 +816,7 @@
+ {
+ #line 360 "src/mn-shell.gob"
+
+- self->icon = MN_MAIL_ICON(mn_mail_icon_new());
+- mn_add_weak_pointer(&self->icon);
+-
+- g_object_connect(self->icon,
+- "signal::activate", self_icon_activate_h, self,
+- "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
+- "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
+- "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
+- "swapped-signal::activate-update", self_update, self,
+- "signal::activate-properties", self_icon_activate_properties_h, self,
+- "signal::activate-help", self_icon_activate_help_h, self,
+- "signal::activate-about", self_icon_activate_about_h, self,
+- "swapped-signal::activate-remove", self_quit, self,
+- "signal::destroy", self_icon_destroy_h, self,
+- NULL);
+-
++ mn_shell_init_icon_base(self);
+ self_update_sensitivity(self);
+ self_update_tooltip(self);
+ self_update_icon(self);
+@@ -1094,7 +1102,13 @@
+ }
+ else
+ {
+- gtk_widget_hide(GTK_WIDGET(self->icon));
++ /* Re-create the icon as a regular gtk_widget_hide causes the
++ * icon to remain visible on non-GNOME environments. We can't
++ * use the callback self_icon_destroy_h here as it can cause an
++ * endless recursion */
++ g_signal_handlers_disconnect_by_func(self->icon, self_icon_destroy_h, self);
++ gtk_widget_destroy(GTK_WIDGET(self->icon));
++ mn_shell_init_icon_base(self);
+ mn_mail_icon_set_blinking(self->icon, FALSE);
+ }
+ }}
diff --git a/staging/mail-notification/mail-notification-5.4-libx11.patch b/staging/mail-notification/mail-notification-5.4-libx11.patch
new file mode 100644
index 000000000..bb3574fda
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-libx11.patch
@@ -0,0 +1,13 @@
+Link with libX11 explicitly.
+
+--- mail-notification-5.4.dfsg.1.orig/jbsrc/jb.c
++++ mail-notification-5.4.dfsg.1/jbsrc/jb.c
+@@ -445,6 +445,8 @@
+
+ jb_compile_options_add_libs(object->compile_options, "-lm");
+
++ jb_compile_options_add_libs(object->compile_options, "-lX11");
++
+ jb_compile_options_add_package(object->compile_options, "gettext");
+ jb_compile_options_add_package(object->compile_options, "gnome");
+ jb_compile_options_add_package(object->compile_options, "dbus");
diff --git a/staging/mail-notification/mail-notification-5.4-popup-attach.patch b/staging/mail-notification/mail-notification-5.4-popup-attach.patch
new file mode 100644
index 000000000..b8d5f6a09
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-popup-attach.patch
@@ -0,0 +1,45 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-popup.c mail-notification-5.4-OK/build/src/mn-popup.c
+--- mail-notification-5.4/build/src/mn-popup.c 2008-05-22 19:47:49.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-popup.c 2010-10-11 17:42:32.000000000 +0400
+@@ -177,6 +177,29 @@
+ #undef __GOB_FUNCTION__
+
+ static void
++mn_popup_wait_for_icon_to_become_ready (void)
++{
++ int x, y;
++ int count = 0;
++
++ /* When the tray icon is created, it can still take some time before
++ * it has arrived at the correct position. This is especially the case
++ * on KDE environments. To work around this, add a little delay of at
++ * most 2 seconds before showing a popup which is attached to the notification */
++ do {
++ gdk_window_get_origin (gtk_widget_get_window (mn_shell->icon), &x, &y);
++
++ if (x != 0 || y != 0) {
++ break;
++ }
++
++ g_usleep(G_USEC_PER_SEC / 10);
++ count++;
++ } while (count < 20);
++}
++
++
++static void
+ mn_popup_init (MNPopup * o G_GNUC_UNUSED)
+ {
+ #define __GOB_FUNCTION__ "MN:Popup::init"
+@@ -299,8 +322,10 @@
+ "icon-name", "stock_mail",
+ NULL);
+
+- if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
++ if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED) {
++ mn_popup_wait_for_icon_to_become_ready();
+ g_object_set(self, "attach-widget", mn_shell->icon, NULL);
++ }
+
+ g_string_free(body, TRUE);
+
diff --git a/staging/mail-notification/mail-notification-5.4-sasl_encode64.patch b/staging/mail-notification/mail-notification-5.4-sasl_encode64.patch
new file mode 100644
index 000000000..80a7304d1
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-sasl_encode64.patch
@@ -0,0 +1,24 @@
+diff -up mail-notification-5.4/build/src/mn-pop3-mailbox.c mail-notification-5.4-OK/build/src/mn-pop3-mailbox.c
+--- mail-notification-5.4/build/src/mn-pop3-mailbox.c 2009-05-19 10:29:58.448201837 +0200
++++ mail-notification-5.4-OK/build/src/mn-pop3-mailbox.c 2009-05-19 10:23:29.356204287 +0200
+@@ -619,7 +619,7 @@ mn_pop3_mailbox_enter_auth_cb (MNClientS
+
+ if (initial_clientoutlen > 0)
+ {
+- char buf64[initial_clientoutlen * 2]; /* Base64 is 33% larger than the data it encodes */
++ char buf64[initial_clientoutlen * 2 + 1]; /* Base64 is 33% larger than the data it encodes */
+ unsigned int outlen;
+ int result;
+ char *str;
+diff -up mail-notification-5.4/src/mn-client-session.c mail-notification-5.4-OK/src/mn-client-session.c
+--- mail-notification-5.4/src/mn-client-session.c 2008-05-22 17:45:35.000000000 +0200
++++ mail-notification-5.4-OK/src/mn-client-session.c 2009-05-19 10:29:09.112211055 +0200
+@@ -1030,7 +1030,7 @@ mn_client_session_write (MNClientSession
+ static int
+ write_base64 (MNClientSession *session, const char *buf, unsigned int len)
+ {
+- char buf64[len * 2]; /* Base64 is 33% larger than the data it encodes */
++ char buf64[len * 2 + 1]; /* Base64 is 33% larger than the data it encodes */
+ unsigned int outlen;
+ int result;
+ char *str;
diff --git a/staging/mail-notification/mail-notification-5.4-weak.patch b/staging/mail-notification/mail-notification-5.4-weak.patch
new file mode 100644
index 000000000..2e2a233aa
--- /dev/null
+++ b/staging/mail-notification/mail-notification-5.4-weak.patch
@@ -0,0 +1,11 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-shell.c mail-notification-5.4-OK/build/src/mn-shell.c
+--- mail-notification-5.4/build/src/mn-shell.c 2008-05-22 19:47:49.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-shell.c 2010-05-24 19:39:48.000000000 +0400
+@@ -1008,6 +1008,7 @@
+ Self *self = user_data;
+
+ /* The Notification Area applet has been terminated. Recreate the icon. */
++ mn_remove_weak_pointer(&self->icon);
+ self_init_icon(self);
+ }}
+ #line 1014 "mn-shell.c"
diff --git a/staging/mail-notification/mail-notification.install b/staging/mail-notification/mail-notification.install
new file mode 100644
index 000000000..21cd94399
--- /dev/null
+++ b/staging/mail-notification/mail-notification.install
@@ -0,0 +1,24 @@
+pkgname=mail-notification
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+ kill -s HUP `pidof bonobo-activation-server` > /dev/null 2>&1
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
+
+post_remove() {
+ kill -s HUP `pidof bonobo-activation-server` > /dev/null 2>&1
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
diff --git a/staging/mail-notification/remove-ubuntu-special-case.patch b/staging/mail-notification/remove-ubuntu-special-case.patch
new file mode 100644
index 000000000..4516f32c6
--- /dev/null
+++ b/staging/mail-notification/remove-ubuntu-special-case.patch
@@ -0,0 +1,33 @@
+--- jbsrc/lib/src/core/jb-feature.c.~1~ 2008-04-27 16:47:27.000000000 +0200
++++ jbsrc/lib/src/core/jb-feature.c 2008-07-22 11:40:50.856886210 +0200
+@@ -164,8 +164,6 @@
+ static void
+ gconf_configure (void)
+ {
+- JBVariable *variable;
+-
+ jb_require_program("gconftool-2");
+
+ if (! strcmp(jb_variable_get_string("gconf-config-source"), "autodetect"))
+@@ -178,21 +176,6 @@
+ jb_variable_set_string("gconf-config-source", config_source);
+ g_free(config_source);
+ }
+-
+- /* fix the default schemas dir on Ubuntu */
+- variable = jb_variable_get_variable_or_error("gconf-schemas-dir");
+- if (! variable->user_set)
+- {
+- static const char *ubuntu_dir = "$datadir/gconf/schemas";
+- char *expanded;
+-
+- expanded = jb_variable_expand(ubuntu_dir, NULL);
+-
+- if (g_file_test(expanded, G_FILE_TEST_IS_DIR))
+- jb_variable_set_string("gconf-schemas-dir", ubuntu_dir);
+-
+- g_free(expanded);
+- }
+ }
+
+ static void
diff --git a/staging/neverball/PKGBUILD b/staging/neverball/PKGBUILD
new file mode 100644
index 000000000..2413373e9
--- /dev/null
+++ b/staging/neverball/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 146885 2012-01-19 03:40:43Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=neverball
+pkgver=1.5.4
+pkgrel=4
+pkgdesc="3D game similar to Super Monkey Ball or Marble Madness"
+arch=('i686' 'x86_64')
+url="http://neverball.org/"
+license=('GPL')
+depends=('sdl_ttf' 'libgl' 'libpng' 'libjpeg' 'libvorbis' 'physfs')
+makedepends=('mesa')
+source=(http://neverball.org/${pkgname}-${pkgver}.tar.gz neverball-1.5.4-underlink.patch)
+sha1sums=('619c227e1958bd60738f12dbbde9b30c91dd79a7'
+ 'f71982b7187d569c57b30c4c40fedd6c0e72baca')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's|#define CONFIG_LOCALE "./locale"|#define CONFIG_LOCALE "/usr/share/locale"|' share/base_config.h
+ patch -p0 -i ../neverball-1.5.4-underlink.patch
+
+ if [ "${CARCH}" = "i686" ] ;then
+ make ENABLE_NLS=1 DATADIR=/usr/share/neverball SSE_CFLAGS=""
+ else
+ make ENABLE_NLS=1 DATADIR=/usr/share/neverball
+ fi
+}
+
+package(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -d "${pkgdir}/usr/bin"
+ install -d "${pkgdir}"/usr/share/{neverball,locale,applications,pixmaps,doc/neverball}
+ install -d "${pkgdir}"/usr/share/man/man{1,6}
+
+ install -m755 neverball neverputt mapc "${pkgdir}/usr/bin"
+ cp -r locale/* "${pkgdir}/usr/share/locale/"
+ cp -r data/* "${pkgdir}/usr/share/neverball/"
+ install -m644 doc/* "${pkgdir}/usr/share/doc/neverball/"
+ install -m644 dist/*.desktop "${pkgdir}/usr/share/applications/"
+ install -m644 dist/*.png "${pkgdir}/usr/share/pixmaps/"
+ install -m644 dist/mapc.1 "${pkgdir}/usr/share/man/man1"
+ install -m644 dist/{neverball.6,neverputt.6} "${pkgdir}/usr/share/man/man6"
+
+ ln -s neverball_48.png "${pkgdir}/usr/share/pixmaps/neverball.png"
+ ln -s neverputt_48.png "${pkgdir}/usr/share/pixmaps/neverputt.png"
+ find "${pkgdir}/usr/share/neverball" -type f -exec chmod 0644 {} \;
+}
diff --git a/staging/neverball/neverball-1.5.4-underlink.patch b/staging/neverball/neverball-1.5.4-underlink.patch
new file mode 100644
index 000000000..1a848cad3
--- /dev/null
+++ b/staging/neverball/neverball-1.5.4-underlink.patch
@@ -0,0 +1,22 @@
+--- Makefile.old 2011-06-22 06:30:52.441788160 +0200
++++ Makefile 2011-06-22 06:31:59.754087534 +0200
+@@ -138,7 +138,7 @@
+ endif
+
+ ALL_LIBS := $(SDL_LIBS) $(BASE_LIBS) $(TILT_LIBS) $(INTL_LIBS) -lSDL_ttf \
+- -lvorbisfile $(OGL_LIBS)
++ -lvorbisfile $(OGL_LIBS) -lX11
+
+ #------------------------------------------------------------------------------
+
+--- Makefile.old 2012-01-18 21:28:23.000000000 -0500
++++ Makefile 2012-01-18 21:28:55.000000000 -0500
+@@ -131,7 +131,7 @@
+ OGL_LIBS := -framework OpenGL
+ endif
+
+-BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS)
++BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS) -lm
+
+ ifdef DARWIN
+ BASE_LIBS += -L/opt/local/lib
diff --git a/staging/qrencode/PKGBUILD b/staging/qrencode/PKGBUILD
new file mode 100644
index 000000000..cfa810614
--- /dev/null
+++ b/staging/qrencode/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 146830 2012-01-18 19:53:58Z bluewind $
+# Maintainer: Florian Pritz< flo@xinu.at>
+# Contributor: Dany Martineau <dany.luc.martineau@gmail.com>
+
+pkgname=qrencode
+pkgver=3.2.0
+pkgrel=2
+pkgdesc="C library for encoding data in a QR Code symbol."
+arch=(i686 x86_64)
+depends=('libpng>=1.5.0')
+makedepends=(sdl)
+url="http://megaui.net/fukuchi/works/qrencode/index.en.html"
+license=('GPL')
+options=(!libtool)
+source=(http://megaui.net/fukuchi/works/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('7e90615eb314abcd2eb2eab5c8155b97')
+
+build() {
+ cd "${srcdir}/$pkgname-$pkgver"
+# autoreconf
+ ./autogen.sh
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/$pkgname-$pkgver"
+
+ make prefix="$pkgdir/usr" install
+}
diff --git a/staging/qt/PKGBUILD b/staging/qt/PKGBUILD
new file mode 100644
index 000000000..24ae69a78
--- /dev/null
+++ b/staging/qt/PKGBUILD
@@ -0,0 +1,126 @@
+# $Id: PKGBUILD 146853 2012-01-18 20:54:27Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=qt
+pkgname=('qt' 'qt-private-headers')
+pkgver=4.8.0
+pkgrel=3
+arch=('i686' 'x86_64')
+url='http://qt-project.org/'
+license=('GPL3' 'LGPL')
+makedepends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
+ 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
+ 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'mesa' 'postgresql-libs'
+ 'mysql' 'unixodbc' 'cups' 'gtk2')
+options=('!libtool')
+_pkgfqn="${pkgbase}-everywhere-opensource-src-${pkgver}"
+source=("http://get.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
+ 'assistant.desktop' 'designer.desktop' 'linguist.desktop'
+ 'qtconfig.desktop')
+md5sums=('e8a5fdbeba2927c948d9f477a6abe904'
+ 'fc211414130ab2764132e7370f8e5caa'
+ '85179f5e0437514f8639957e1d8baf62'
+ 'f11852b97583610f3dbb669ebc3e21bc'
+ '6b771c8a81dd90b45e8a79afa0e5bbfd')
+
+build() {
+ cd "${srcdir}"/${_pkgfqn}
+
+ export QT4DIR="${srcdir}"/${_pkgfqn}
+ export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+
+ sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf
+ sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf
+ sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" mkspecs/common/gcc-base.conf
+
+ ./configure -confirm-license -opensource \
+ -prefix /usr \
+ -docdir /usr/share/doc/qt \
+ -plugindir /usr/lib/qt/plugins \
+ -importdir /usr/lib/qt/imports \
+ -datadir /usr/share/qt \
+ -translationdir /usr/share/qt/translations \
+ -sysconfdir /etc \
+ -examplesdir /usr/share/doc/qt/examples \
+ -demosdir /usr/share/doc/qt/demos \
+ -plugin-sql-{psql,mysql,sqlite,odbc} \
+ -system-sqlite \
+ -no-phonon \
+ -no-phonon-backend \
+ -no-webkit \
+ -graphicssystem raster \
+ -openssl-linked \
+ -nomake demos \
+ -nomake examples \
+ -nomake docs \
+ -silent \
+ -no-rpath \
+ -optimized-qmake \
+ -reduce-relocations \
+ -dbus-linked \
+ -no-openvg
+ make
+}
+
+package_qt() {
+ pkgdesc='A cross-platform application and UI framework'
+ depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
+ 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
+ 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils')
+ optdepends=('postgresql-libs: PostgreSQL driver'
+ 'libmysqlclient: MySQL driver'
+ 'unixodbc: ODBC driver'
+ 'libxinerama: Xinerama support'
+ 'libxcursor: Xcursor support'
+ 'libxfixes: Xfixes support')
+ install='qt.install'
+
+ cd "${srcdir}"/${_pkgfqn}
+ make INSTALL_ROOT="${pkgdir}" install
+
+ # install missing icons and desktop files
+ for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
+ size=$(echo $(basename ${icon}) | cut -d- -f2)
+ install -p -D -m644 ${icon} \
+ "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png"
+ done
+ install -p -D -m644 src/gui/dialogs/images/qtlogo-64.png \
+ "${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png"
+ install -p -D -m644 tools/assistant/tools/assistant/images/assistant.png \
+ "${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png"
+ install -p -D -m644 tools/designer/src/designer/images/designer.png \
+ "${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png"
+ install -d "${pkgdir}/usr/share/applications"
+ install -m644 "${srcdir}"/{linguist,designer,assistant,qtconfig}.desktop \
+ "${pkgdir}/usr/share/applications/"
+
+ # install license addition
+ install -D -m644 LGPL_EXCEPTION.txt \
+ ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
+
+ # Fix wrong path in pkgconfig files
+ find "${pkgdir}/usr/lib/pkgconfig" -type f -name '*.pc' \
+ -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
+
+ # Fix wrong path in prl files
+ find "${pkgdir}/usr/lib" -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
+}
+
+package_qt-private-headers(){
+ pkgdesc="Qt private headers for development"
+ depends=("qt=${pkgver}")
+
+ install -d "${pkgdir}"/usr/include/{QtCore,QtDeclarative,QtGui,QtScript}
+ install -d "${pkgdir}"/usr/src/{corelib,declarative,gui,script}
+
+ for i in QtCore QtDeclarative QtGui QtScript; do
+ cp -r "${srcdir}"/${_pkgfqn}/include/${i}/private/ \
+ "${pkgdir}"/usr/include/${i}/
+ done
+
+ for i in corelib declarative gui script; do
+ cp -r "${srcdir}"/${_pkgfqn}/src/${i} "${pkgdir}"/usr/src/
+ done
+}
diff --git a/staging/qt/assistant.desktop b/staging/qt/assistant.desktop
new file mode 100644
index 000000000..a9e98c44b
--- /dev/null
+++ b/staging/qt/assistant.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Qt Assistant
+Comment=Shows Qt documentation and examples
+Exec=/usr/bin/assistant
+Icon=assistant
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;Documentation;
diff --git a/staging/qt/designer.desktop b/staging/qt/designer.desktop
new file mode 100644
index 000000000..9b7b6e9aa
--- /dev/null
+++ b/staging/qt/designer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Qt Designer
+GenericName=Interface Designer
+Comment=Design GUIs for Qt applications
+Exec=/usr/bin/designer
+Icon=designer
+MimeType=application/x-designer;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/staging/qt/linguist.desktop b/staging/qt/linguist.desktop
new file mode 100644
index 000000000..8cbe86599
--- /dev/null
+++ b/staging/qt/linguist.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt Linguist
+Comment=Add translations to Qt applications
+Exec=/usr/bin/linguist
+Icon=linguist
+MimeType=text/vnd.trolltech.linguist;application/x-linguist;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/staging/qt/qt.install b/staging/qt/qt.install
new file mode 100644
index 000000000..5495fb1b5
--- /dev/null
+++ b/staging/qt/qt.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/qt/qtconfig.desktop b/staging/qt/qtconfig.desktop
new file mode 100644
index 000000000..46dcf9e3d
--- /dev/null
+++ b/staging/qt/qtconfig.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt Config
+Comment=Configure Qt behavior, styles, fonts
+Exec=/usr/bin/qtconfig
+Icon=qtlogo
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Settings;
+NoDisplay=true
diff --git a/staging/qt3/PKGBUILD b/staging/qt3/PKGBUILD
new file mode 100644
index 000000000..57b052598
--- /dev/null
+++ b/staging/qt3/PKGBUILD
@@ -0,0 +1,133 @@
+# $Id: PKGBUILD 146911 2012-01-19 05:18:20Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=qt3
+pkgver=3.3.8
+pkgrel=22
+pkgdesc="The QT3 gui toolkit"
+arch=('i686' 'x86_64')
+url="http://www.trolltech.com/products/qt/index.html"
+license=('GPL')
+depends=('libpng' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' 'libxft'
+ 'libxrandr' 'libmng')
+makedepends=('mysql' 'postgresql' 'unixodbc' 'sqlite3')
+optdepends=('libmysqlclient' 'postgresql-libs' 'unixodbc')
+options=('!libtool')
+install=qt.install
+source=(ftp://ftp.trolltech.com/qt/source/qt-x11-free-${pkgver}.tar.bz2
+ qt.profile qt3-png15.patch qt-copy-kde-patches.tar.bz2
+ qt-patches.tar.bz2 utf8-bug-qt3.diff qt-font-default-subst.diff
+ mysql.patch eastern_asian_languagues.diff qt-odbc.patch gcc-4.6.patch)
+sha1sums=('91b192cb8e80679607d24ae35d6e20ed68d149d7'
+ 'd2e257a9011208b2cb81b9cf47915b9a2f9dab83'
+ '3d19510c46016a1a211d97bf8f82b01498b1b33c'
+ '9cb2e5bec782069692ee337cfa171539d9d73753'
+ '116afa0e737bdf27ea27f9b3653aeb56db9ec151'
+ 'ca5ecb29c7f1c826d48703339a3371038e306bb7'
+ 'd928ff55adb52c4bab2fb268df022651551cd70c'
+ 'bb6aad81cce143c23ff7840b1d79f6b2007a0c04'
+ '40c7b8f06a21f809ddeb8b5560e9da63ccac6a17'
+ '1346320614f6f86fbeb10b9fbad721dea29f5b61'
+ 'd9b83b8f6f9c8bd98d290dc1d0e9913a00b62c3f')
+
+# qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
+# other qt-patches come from fedora and gentoo
+
+build() {
+ unset QMAKESPEC
+ export QTDIR="${srcdir}"/qt-x11-free-${pkgver}
+ export PATH=${QTDIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
+ export QMAKESPEC=$QTDIR/mkspecs/linux-g++
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ # apply qt patches from kde.org
+ for i in ../qt-copy-kde-patches/*; do
+ patch -Np0 -i $i
+ done
+ # apply other qt patches and one security fix from debian/gentoo
+ for i in ../qt-patches/*; do
+ patch -Np1 -i $i
+ done
+ # fix utf8 bug
+ patch -p0 -i "${srcdir}"/utf8-bug-qt3.diff
+ # fix asia fonts
+ patch -p0 -i "${srcdir}"/qt-font-default-subst.diff
+ # fix segfaults on exit when using mysql DB driver
+ patch -p0 -i "${srcdir}"/mysql.patch
+ # fix CJK font/chars select error (FS#11245)
+ patch -p1 -i "${srcdir}"/eastern_asian_languagues.diff
+ # fix build problem against new unixODBC
+ patch -p1 -i "${srcdir}"/qt-odbc.patch
+ # fix build with gcc 4.6.0
+ patch -p1 -i "${srcdir}"/gcc-4.6.patch
+
+ patch -p0 -i "${srcdir}"/qt3-png15.patch
+ # start compiling qt
+ sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
+ rm -rf doc/html examples tutorial
+ sed -i "s|sub-tutorial sub-examples||" Makefile
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-32/qmake.conf
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++-64/qmake.conf
+ sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
+ sed -i "s|read acceptance|acceptance=yes|" configure
+
+ # remove unwanted mkspecs
+ rm -rf mkspecs/{*aix*,*bsd*,cygwin*,dgux*,darwin*,hpux*,hurd*,irix*,lynxos*,macx*,qnx*,reliant*,sco*,solaris*,tru64*,unixware*,win32*}
+
+ if [ "$CARCH" = "x86_64" ]; then
+ export ARCH="-64"
+ else unset ARCH
+ fi
+
+ ./configure -prefix /opt/qt \
+ -platform linux-g++$ARCH \
+ -system-zlib \
+ -qt-gif \
+ -release \
+ -shared \
+ -sm \
+ -nis \
+ -thread \
+ -stl \
+ -system-lib{png,jpeg,mng} \
+ -no-g++-exceptions \
+ -plugin-sql-{mysql,psql,sqlite,odbc}
+
+ # fix /opt/qt/lib path
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/src/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/designer/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/editor/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/assistant/lib/Makefile
+ [ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" "${srcdir}"/qt-x11-free-${pkgver}/tools/designer/uilib/Makefile
+
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ make -C qmake
+ cd "${srcdir}"/qt-x11-free-${pkgver}/plugins/src/sqldrivers/mysql
+ "${srcdir}"/qt-x11-free-${pkgver}/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
+ cd "${srcdir}"/qt-x11-free-${pkgver}/plugins/src/sqldrivers/psql
+ "${srcdir}"/qt-x11-free-${pkgver}/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro
+
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ # fix the broken makefiles
+ #sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}"/qt-x11-free-${pkgver}
+ make INSTALL_ROOT="${pkgdir}" install
+ rm -rf "${pkgdir}"/opt/qt/{phrasebooks,templates,translations}
+ sed -i "s|-L${srcdir}/qt-x11-free-${pkgver}/lib ||g" "${pkgdir}"/opt/qt/lib/*.prl
+ install -D -m755 qmake/qmake "${pkgdir}"/opt/qt/bin/qmake
+ install -D -m755 "${srcdir}"/qt.profile "${pkgdir}"/etc/profile.d/qt3.sh
+ ln -sf /opt/qt/bin/qtconfig "${pkgdir}"/opt/qt/bin/qt3config
+ rm -f "${pkgdir}"/opt/qt/mkspecs/linux-g++$ARCH/linux-g++$ARCH
+
+ # install man pages
+ install -d -m755 "${pkgdir}"/opt/qt/man
+ cp -r "${srcdir}"/qt-x11-free-${pkgver}/doc/man/{man1,man3} "${pkgdir}"/opt/qt/man/
+
+ install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
+ echo '/opt/qt/lib' > "${pkgdir}"/etc/ld.so.conf.d/qt3.conf
+}
diff --git a/staging/qt3/eastern_asian_languagues.diff b/staging/qt3/eastern_asian_languagues.diff
new file mode 100644
index 000000000..7c25eef7d
--- /dev/null
+++ b/staging/qt3/eastern_asian_languagues.diff
@@ -0,0 +1,39 @@
+--- qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp 2008-01-15 21:09:13.000000000 +0200
++++ qt-x11-free-3.3.8b/src/kernel/qfontdatabase.cpp 2008-03-10 11:34:22.000000000 +0200
+@@ -966,20 +966,22 @@
+
+ #ifdef Q_WS_X11
+ if (script == QFont::Han) {
+- // modify script according to locale
+- static QFont::Script defaultHan = QFont::UnknownScript;
+- if (defaultHan == QFont::UnknownScript) {
+- QCString locale = setlocale(LC_ALL, NULL);
+- if (locale.contains("ko"))
+- defaultHan = QFont::Han_Korean;
+- else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
+- defaultHan = QFont::Han_TraditionalChinese;
+- else if (locale.contains("zh"))
+- defaultHan = QFont::Han_SimplifiedChinese;
+- else
+- defaultHan = QFont::Han_Japanese;
+- }
+- script = defaultHan;
++ // modify script according to locale
++ static QFont::Script defaultHan;
++ QCString locale = setlocale(LC_ALL, NULL);
++
++ if (locale.contains("ko"))
++ defaultHan = QFont::Han_Korean;
++ else if (locale.contains("zh_TW") || locale.contains("zh_HK"))
++ defaultHan = QFont::Han_TraditionalChinese;
++ else if (locale.contains("zh"))
++ defaultHan = QFont::Han_SimplifiedChinese;
++ else if (locale.contains("ja"))
++ defaultHan = QFont::Han_Japanese;
++ else
++ defaultHan = QFont::Han; // don't change
++
++ script = defaultHan;
+ }
+ #endif
+
diff --git a/staging/qt3/gcc-4.6.patch b/staging/qt3/gcc-4.6.patch
new file mode 100644
index 000000000..bcbffcea6
--- /dev/null
+++ b/staging/qt3/gcc-4.6.patch
@@ -0,0 +1,33 @@
+diff -up qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef qt-x11-free-3.3.8b/src/tools/qmap.h
+--- qt-x11-free-3.3.8b/src/tools/qmap.h.cstddef 2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qmap.h 2011-01-30 21:14:29.275088725 -0600
+@@ -49,6 +49,7 @@
+ #include "qvaluelist.h"
+ #endif // QT_H
+
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <map>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluelist.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluelist.h.cstddef 2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluelist.h 2011-01-30 21:14:01.765846592 -0600
+@@ -47,6 +47,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <iterator>
+ #include <list>
+diff -up qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef qt-x11-free-3.3.8b/src/tools/qvaluevector.h
+--- qt-x11-free-3.3.8b/src/tools/qvaluevector.h.cstddef 2008-01-15 13:09:13.000000000 -0600
++++ qt-x11-free-3.3.8b/src/tools/qvaluevector.h 2011-01-30 21:14:01.765846592 -0600
+@@ -45,6 +45,7 @@
+ #include "qdatastream.h"
+ #endif // QT_H
+
++#include <cstddef>
+ #ifndef QT_NO_STL
+ #include <vector>
+ #endif
diff --git a/staging/qt3/mysql.patch b/staging/qt3/mysql.patch
new file mode 100644
index 000000000..5f61edc67
--- /dev/null
+++ b/staging/qt3/mysql.patch
@@ -0,0 +1,47 @@
+--- src/sql/drivers/mysql/qsql_mysql.cpp
++++ src/sql/drivers/mysql/qsql_mysql.cpp
+@@ -37,7 +37,6 @@
+ #include "qsql_mysql.h"
+ #include <private/qsqlextension_p.h>
+
+-#include <qapplication.h>
+ #include <qdatetime.h>
+ #include <qvaluevector.h>
+ #include <qsqlrecord.h>
+@@ -341,14 +340,6 @@ int QMYSQLResult::numRowsAffected()
+ }
+
+ /////////////////////////////////////////////////////////
+-static void qServerEnd()
+-{
+-#ifndef Q_NO_MYSQL_EMBEDDED
+-# if MYSQL_VERSION_ID >= 40000
+- mysql_server_end();
+-# endif // MYSQL_VERSION_ID
+-#endif // Q_NO_MYSQL_EMBEDDED
+-}
+
+ static void qServerInit()
+ {
+@@ -366,9 +357,7 @@ static void qServerInit()
+ qWarning( "QMYSQLDriver::qServerInit: unable to start server." );
+ # endif
+ }
+- qAddPostRoutine(qServerEnd);
+ init = TRUE;
+-
+ # endif // MYSQL_VERSION_ID
+ #endif // Q_NO_MYSQL_EMBEDDED
+ }
+@@ -411,6 +400,11 @@ QMYSQLDriver::~QMYSQLDriver()
+ QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this );
+ delete ext;
+ }
++#ifndef Q_NO_MYSQL_EMBEDDED
++# if MYSQL_VERSION_ID > 40000
++ mysql_server_end();
++# endif
++#endif
+ }
+
+ bool QMYSQLDriver::hasFeature( DriverFeature f ) const
diff --git a/staging/qt3/qt-copy-kde-patches.tar.bz2 b/staging/qt3/qt-copy-kde-patches.tar.bz2
new file mode 100644
index 000000000..19d899963
--- /dev/null
+++ b/staging/qt3/qt-copy-kde-patches.tar.bz2
Binary files differ
diff --git a/staging/qt3/qt-font-default-subst.diff b/staging/qt3/qt-font-default-subst.diff
new file mode 100644
index 000000000..3e286f74e
--- /dev/null
+++ b/staging/qt3/qt-font-default-subst.diff
@@ -0,0 +1,77 @@
+--- src/kernel/qfontdatabase_x11.cpp
++++ src/kernel/qfontdatabase_x11.cpp
+@@ -1589,15 +1589,6 @@ QFontEngine *loadEngine( QFont::Script s
+ if (script == QFont::Latin)
+ // add Euro character
+ FcCharSetAddChar(cs, 0x20ac);
+- if (script == QFont::Han_SimplifiedChinese)
+- FcCharSetAddChar(cs, 0x3400);
+- if (script == QFont::Han_TraditionalChinese){
+- FcCharSetAddChar(cs, 0x3435);
+- FcCharSetAddChar(cs, 0xE000);
+- FcCharSetAddChar(cs, 0xF6B1);
+- }
+- if (script == QFont::MiscellaneousSymbols)
+- FcCharSetAddChar(cs, 0x2714);
+ FcPatternAddCharSet(pattern, FC_CHARSET, cs);
+ FcCharSetDestroy(cs);
+ }
+@@ -1813,7 +1804,11 @@ static QFontEngine *loadFontConfigFont(c
+ FcPatternPrint(pattern);
+ #endif
+
++ // XftFontMatch calls the right ConfigSubstitute variants, but as we use
++ // FcFontMatch/Sort here we have to do it manually.
+ FcConfigSubstitute(0, pattern, FcMatchPattern);
++ XftDefaultSubstitute(QPaintDevice::x11AppDisplay(), QPaintDevice::x11AppScreen(), pattern);
++
+ // qDebug("1: pattern contains:");
+ // FcPatternPrint(pattern);
+
+@@ -1847,10 +1842,6 @@ static QFontEngine *loadFontConfigFont(c
+ value.u.s = (const FcChar8 *)cs.data();
+ FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue);
+ }
+-#ifdef FONT_MATCH_DEBUG
+- printf("final pattern contains:\n");
+- FcPatternPrint(pattern);
+-#endif
+ }
+
+ if (script != QFont::Unicode) {
+@@ -1860,19 +1851,15 @@ static QFontEngine *loadFontConfigFont(c
+ if (script == QFont::Latin)
+ // add Euro character
+ FcCharSetAddChar(cs, 0x20ac);
+- if (script == QFont::Han_SimplifiedChinese)
+- FcCharSetAddChar(cs, 0x3400);
+- if (script == QFont::Han_TraditionalChinese) {
+- FcCharSetAddChar(cs, 0x3435);
+- FcCharSetAddChar(cs, 0xE000);
+- FcCharSetAddChar(cs, 0xF6B1);
+- }
+- if (script == QFont::MiscellaneousSymbols)
+- FcCharSetAddChar(cs, 0x2714);
+ FcPatternAddCharSet(pattern, FC_CHARSET, cs);
+ FcCharSetDestroy(cs);
+ }
+
++#ifdef FONT_MATCH_DEBUG
++ printf("final pattern contains:\n");
++ FcPatternPrint(pattern);
++#endif
++
+ QFontEngine *fe = 0;
+
+ for( int jj = (FcGetVersion() >= 20392 ? 0 : 1); jj < 2; ++jj ) {
+--- src/kernel/qfontdatabase.cpp
++++ src/kernel/qfontdatabase.cpp
+@@ -554,7 +554,7 @@ static const unsigned short sample_chars
+ // GeometricSymbols,
+ { 0x2500, 0x0 },
+ // MiscellaneousSymbols,
+- { 0x2640, 0x0 },
++ { 0x2640, 0x2714, 0x0 },
+ // EnclosedAndSquare,
+ { 0x2460, 0x0 },
+ // Braille,
diff --git a/staging/qt3/qt-odbc.patch b/staging/qt3/qt-odbc.patch
new file mode 100644
index 000000000..6f21e3cf1
--- /dev/null
+++ b/staging/qt3/qt-odbc.patch
@@ -0,0 +1,19 @@
+diff -up qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp
+--- qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp.orig 2009-02-24 11:32:27.000000000 +0100
++++ qt-x11-free-3.3.8/src/sql/drivers/odbc/qsql_odbc.cpp 2009-02-24 11:33:43.000000000 +0100
+@@ -57,13 +57,13 @@
+ #endif
+
+ // newer platform SDKs use SQLLEN instead of SQLINTEGER
+-#ifdef SQLLEN
++#if defined(SQLLEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLLEN SQLLEN
+ #else
+ # define QSQLLEN SQLINTEGER
+ #endif
+
+-#ifdef SQLULEN
++#if defined(SQLULEN) || defined(Q_OS_WIN64) || defined(Q_OS_UNIX)
+ # define QSQLULEN SQLULEN
+ #else
+ # define QSQLULEN SQLUINTEGER
diff --git a/staging/qt3/qt-patches.tar.bz2 b/staging/qt3/qt-patches.tar.bz2
new file mode 100644
index 000000000..3f4aee171
--- /dev/null
+++ b/staging/qt3/qt-patches.tar.bz2
Binary files differ
diff --git a/staging/qt3/qt.install b/staging/qt3/qt.install
new file mode 100644
index 000000000..6d042daae
--- /dev/null
+++ b/staging/qt3/qt.install
@@ -0,0 +1,12 @@
+post_install() {
+ post_remove
+}
+
+post_upgrade() {
+ post_remove
+}
+
+post_remove() {
+ # this can be removed in future versions
+ sed -e '/\/opt\/qt\/lib/d' -i etc/ld.so.conf
+}
diff --git a/staging/qt3/qt.profile b/staging/qt3/qt.profile
new file mode 100644
index 000000000..ed4d232ae
--- /dev/null
+++ b/staging/qt3/qt.profile
@@ -0,0 +1,4 @@
+export QTDIR=/opt/qt
+export QT_XFT=true
+export PATH=$PATH:$QTDIR/bin
+export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig
diff --git a/staging/qt3/qt3-png15.patch b/staging/qt3/qt3-png15.patch
new file mode 100644
index 000000000..e64fea36a
--- /dev/null
+++ b/staging/qt3/qt3-png15.patch
@@ -0,0 +1,212 @@
+$NetBSD: patch-as,v 1.5 2011/03/25 15:28:26 wiz Exp $
+
+--- src/kernel/qpngio.cpp.orig 2007-02-02 10:01:15.000000000 -0400
++++ src/kernel/qpngio.cpp
+@@ -43,6 +43,7 @@
+ #include "qiodevice.h"
+
+ #include <png.h>
++#include <zlib.h>
+
+
+ #ifdef Q_OS_TEMP
+@@ -123,9 +124,24 @@ void setup_qt( QImage& image, png_struct
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ 0, 0, 0);
+
++ png_colorp info_ptr_palette = NULL;
++ int info_ptr_num_palette = 0;
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) {
++ png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &info_ptr_num_palette);
++ }
++
++ png_bytep info_ptr_trans_alpha = NULL;
++ int info_ptr_num_trans = 0;
++ png_color_16p info_ptr_trans_color = NULL;
++
++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
++ png_get_tRNS(png_ptr, info_ptr, &info_ptr_trans_alpha, &info_ptr_num_trans, &info_ptr_trans_color);
++ }
++
++
+ if ( color_type == PNG_COLOR_TYPE_GRAY ) {
+ // Black & White or 8-bit grayscale
+- if ( bit_depth == 1 && info_ptr->channels == 1 ) {
++ if ( bit_depth == 1 && png_get_channels(png_ptr, info_ptr) == 1 ) {
+ png_set_invert_mono( png_ptr );
+ png_read_update_info( png_ptr, info_ptr );
+ if (!image.create( width, height, 1, 2, QImage::BigEndian ))
+@@ -159,7 +175,7 @@ void setup_qt( QImage& image, png_struct
+ image.setColor( i, qRgba(c,c,c,0xff) );
+ }
+ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+- const int g = info_ptr->trans_values.gray;
++ const int g = info_ptr_trans_color->gray;
+ if (g < ncols) {
+ image.setAlphaBuffer(TRUE);
+ image.setColor(g, image.color(g) & RGB_MASK);
+@@ -168,7 +184,7 @@ void setup_qt( QImage& image, png_struct
+ }
+ } else if ( color_type == PNG_COLOR_TYPE_PALETTE
+ && png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)
+- && info_ptr->num_palette <= 256 )
++ && info_ptr_num_palette <= 256 )
+ {
+ // 1-bit and 8-bit color
+ if ( bit_depth != 1 )
+@@ -176,28 +192,28 @@ void setup_qt( QImage& image, png_struct
+ png_read_update_info( png_ptr, info_ptr );
+ png_get_IHDR(png_ptr, info_ptr,
+ &width, &height, &bit_depth, &color_type, 0, 0, 0);
+- if (!image.create(width, height, bit_depth, info_ptr->num_palette,
++ if (!image.create(width, height, bit_depth, info_ptr_num_palette,
+ QImage::BigEndian))
+ return;
+ int i = 0;
+ if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+ image.setAlphaBuffer( TRUE );
+- while ( i < info_ptr->num_trans ) {
++ while ( i < info_ptr_num_trans ) {
+ image.setColor(i, qRgba(
+- info_ptr->palette[i].red,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].blue,
+- info_ptr->trans[i]
++ info_ptr_palette[i].red,
++ info_ptr_palette[i].green,
++ info_ptr_palette[i].blue,
++ info_ptr_trans_alpha[i]
+ )
+ );
+ i++;
+ }
+ }
+- while ( i < info_ptr->num_palette ) {
++ while ( i < info_ptr_num_palette ) {
+ image.setColor(i, qRgba(
+- info_ptr->palette[i].red,
+- info_ptr->palette[i].green,
+- info_ptr->palette[i].blue,
++ info_ptr_palette[i].red,
++ info_ptr_palette[i].green,
++ info_ptr_palette[i].blue,
+ 0xff
+ )
+ );
+@@ -284,7 +300,7 @@ void read_png_image(QImageIO* iio)
+ return;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ iio->setStatus(-4);
+ return;
+@@ -469,7 +485,7 @@ bool QPNGImageWriter::writeImage(const Q
+ return FALSE;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return FALSE;
+ }
+@@ -491,10 +507,16 @@ bool QPNGImageWriter::writeImage(const Q
+
+ png_set_write_fn(png_ptr, (void*)this, qpiw_write_fn, qpiw_flush_fn);
+
++#warning XXXtnn not too sure about this
++/*
++according to png.h, channels is only used on read, not writes, so we
++should be able to comment this out.
++
+ info_ptr->channels =
+ (image.depth() == 32)
+ ? (image.hasAlphaBuffer() ? 4 : 3)
+ : 1;
++*/
+
+ png_set_IHDR(png_ptr, info_ptr, image.width(), image.height(),
+ image.depth() == 1 ? 1 : 8 /* per channel */,
+@@ -504,11 +526,12 @@ bool QPNGImageWriter::writeImage(const Q
+ : PNG_COLOR_TYPE_RGB
+ : PNG_COLOR_TYPE_PALETTE, 0, 0, 0);
+
++ png_color_8 sig_bit;
++ sig_bit.red = 8;
++ sig_bit.green = 8;
++ sig_bit.blue = 8;
++ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+
+- //png_set_sBIT(png_ptr, info_ptr, 8);
+- info_ptr->sig_bit.red = 8;
+- info_ptr->sig_bit.green = 8;
+- info_ptr->sig_bit.blue = 8;
+
+ if (image.depth() == 1 && image.bitOrder() == QImage::LittleEndian)
+ png_set_packswap(png_ptr);
+@@ -522,11 +545,14 @@ bool QPNGImageWriter::writeImage(const Q
+ png_set_PLTE(png_ptr, info_ptr, palette, num_palette);
+ int* trans = new int[num_palette];
+ int num_trans = 0;
++ png_colorp info_ptr_palette = NULL;
++ int tmp;
++ png_get_PLTE(png_ptr, info_ptr, &info_ptr_palette, &tmp);
+ for (int i=0; i<num_palette; i++) {
+ QRgb rgb=image.color(i);
+- info_ptr->palette[i].red = qRed(rgb);
+- info_ptr->palette[i].green = qGreen(rgb);
+- info_ptr->palette[i].blue = qBlue(rgb);
++ info_ptr_palette[i].red = qRed(rgb);
++ info_ptr_palette[i].green = qGreen(rgb);
++ info_ptr_palette[i].blue = qBlue(rgb);
+ if (image.hasAlphaBuffer()) {
+ trans[i] = rgb >> 24;
+ if (trans[i] < 255) {
+@@ -534,6 +560,7 @@ bool QPNGImageWriter::writeImage(const Q
+ }
+ }
+ }
++ png_set_PLTE(png_ptr, info_ptr, info_ptr_palette, num_palette);
+ if (num_trans) {
+ copy_trans = new png_byte[num_trans];
+ for (int i=0; i<num_trans; i++)
+@@ -544,7 +571,10 @@ bool QPNGImageWriter::writeImage(const Q
+ }
+
+ if ( image.hasAlphaBuffer() ) {
+- info_ptr->sig_bit.alpha = 8;
++ png_color_8p sig_bit;
++ png_get_sBIT(png_ptr, info_ptr, &sig_bit);
++ sig_bit->alpha = 8;
++ png_set_sBIT(png_ptr, info_ptr, sig_bit);
+ }
+
+ // Swap ARGB to RGBA (normal PNG format) before saving on
+@@ -1030,7 +1060,7 @@ int QPNGFormat::decode(QImage& img, QIma
+ return -1;
+ }
+
+- if (setjmp((png_ptr)->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ image = 0;
+ return -1;
+@@ -1057,7 +1087,7 @@ int QPNGFormat::decode(QImage& img, QIma
+
+ if ( !png_ptr ) return 0;
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+ image = 0;
+ state = MovieStart;
+@@ -1117,7 +1147,7 @@ void QPNGFormat::end(png_structp png, pn
+ consumer->frameDone(QPoint(offx,offy),r);
+ consumer->end();
+ state = FrameStart;
+- unused_data = (int)png->buffer_size; // Since libpng doesn't tell us
++ unused_data = png_process_data_pause(png, 0);
+ }
+
+ #ifdef PNG_USER_CHUNKS_SUPPORTED
diff --git a/staging/qt3/utf8-bug-qt3.diff b/staging/qt3/utf8-bug-qt3.diff
new file mode 100644
index 000000000..43e84a99f
--- /dev/null
+++ b/staging/qt3/utf8-bug-qt3.diff
@@ -0,0 +1,101 @@
+--- src/codecs/qutfcodec.cpp
++++ src/codecs/qutfcodec.cpp
+@@ -154,6 +154,7 @@
+
+ class QUtf8Decoder : public QTextDecoder {
+ uint uc;
++ uint min_uc;
+ int need;
+ bool headerDone;
+ public:
+@@ -167,8 +168,9 @@
+ result.setLength( len ); // worst case
+ QChar *qch = (QChar *)result.unicode();
+ uchar ch;
++ int error = -1;
+ for (int i=0; i<len; i++) {
+- ch = *chars++;
++ ch = chars[i];
+ if (need) {
+ if ( (ch&0xc0) == 0x80 ) {
+ uc = (uc << 6) | (ch & 0x3f);
+@@ -182,6 +184,8 @@
+ *qch++ = QChar(high);
+ *qch++ = QChar(low);
+ headerDone = TRUE;
++ } else if ((uc < min_uc) || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
++ *qch++ = QChar::replacement;
+ } else {
+ if (headerDone || QChar(uc) != QChar::byteOrderMark)
+ *qch++ = uc;
+@@ -190,6 +194,7 @@
+ }
+ } else {
+ // error
++ i = error;
+ *qch++ = QChar::replacement;
+ need = 0;
+ }
+@@ -200,12 +205,21 @@
+ } else if ((ch & 0xe0) == 0xc0) {
+ uc = ch & 0x1f;
+ need = 1;
++ error = i;
++ min_uc = 0x80;
+ } else if ((ch & 0xf0) == 0xe0) {
+ uc = ch & 0x0f;
+ need = 2;
++ error = i;
++ min_uc = 0x800;
+ } else if ((ch&0xf8) == 0xf0) {
+ uc = ch & 0x07;
+ need = 3;
++ error = i;
++ min_uc = 0x10000;
++ } else {
++ // error
++ *qch++ = QChar::replacement;
+ }
+ }
+ }
+--- src/tools/qstring.cpp
++++ src/tools/qstring.cpp
+@@ -5805,6 +5805,7 @@
+ result.setLength( len ); // worst case
+ QChar *qch = (QChar *)result.unicode();
+ uint uc = 0;
++ uint min_uc = 0;
+ int need = 0;
+ int error = -1;
+ uchar ch;
+@@ -5822,6 +5823,12 @@
+ unsigned short low = uc%0x400 + 0xdc00;
+ *qch++ = QChar(high);
+ *qch++ = QChar(low);
++ } else if (uc < min_uc || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) {
++ // overlong seqence, UTF16 surrogate or BOM
++ i = error;
++ qch = addOne(qch, result);
++ *qch++ = QChar(0xdbff);
++ *qch++ = QChar(0xde00+((uchar)utf8[i]));
+ } else {
+ *qch++ = uc;
+ }
+@@ -5844,14 +5851,17 @@
+ uc = ch & 0x1f;
+ need = 1;
+ error = i;
++ min_uc = 0x80;
+ } else if ((ch & 0xf0) == 0xe0) {
+ uc = ch & 0x0f;
+ need = 2;
+ error = i;
++ min_uc = 0x800;
+ } else if ((ch&0xf8) == 0xf0) {
+ uc = ch & 0x07;
+ need = 3;
+ error = i;
++ min_uc = 0x10000;
+ } else {
+ // Error
+ qch = addOne(qch, result);
diff --git a/staging/rrdtool/PKGBUILD b/staging/rrdtool/PKGBUILD
new file mode 100644
index 000000000..ec9476a0b
--- /dev/null
+++ b/staging/rrdtool/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 146899 2012-01-19 04:20:31Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=rrdtool
+pkgver=1.4.5
+pkgrel=5
+pkgdesc="Data logging and graphing application"
+arch=('i686' 'x86_64')
+url="http://www.rrdtool.org"
+license=('GPL' 'custom')
+depends=('libxml2' 'pango' 'ttf-dejavu')
+makedepends=('intltool' 'ruby' 'python2' 'tcl' 'lua')
+optdepends=('tcl: to use corresponding binding' \
+ 'python2: to use corresponding binding' \
+ 'ruby: to use corresponding binding' \
+ 'lua: to use corresponding binding')
+options=('!libtool' '!emptydirs' '!makeflags')
+source=(http://oss.oetiker.ch/rrdtool/pub/rrdtool-${pkgver}.tar.gz)
+sha1sums=('56638e8aedd5d5522152e86746e382b75dc48c35')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's|-lrrd|-lrrd -L/usr/lib/perl5/core_perl/CORE/ -lperl |' bindings/perl-shared/Makefile.PL
+ PYTHON=python2 ./configure --prefix=/usr --localstatedir=/var --disable-rpath \
+ --enable-perl --enable-perl-site-install --with-perl-options='INSTALLDIRS=vendor' \
+ --enable-ruby --enable-ruby-site-install --enable-python \
+ --enable-lua --enable-lua-site-install --enable-tcl --disable-libwrap
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/scim-anthy/PKGBUILD b/staging/scim-anthy/PKGBUILD
new file mode 100644
index 000000000..f34466307
--- /dev/null
+++ b/staging/scim-anthy/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 146909 2012-01-19 05:06:58Z bisson $
+# Contributor: damir <damir@archlinux.org>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=scim-anthy
+pkgver=1.2.7
+pkgrel=3
+_filecode=37309
+pkgdesc='Japanese input method module for SCIM'
+arch=('i686' 'x86_64')
+url='http://sourceforge.jp/projects/scim-imengine/'
+license=('GPL')
+depends=('scim' 'anthy')
+options=('!libtool')
+source=("http://osdn.dl.sourceforge.jp/scim-imengine/${_filecode}/${pkgname}-${pkgver}.tar.gz")
+sha1sums=('1429cf202f5cdcfc4733220acbe27dd9edb75db8')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/scim-chewing/PKGBUILD b/staging/scim-chewing/PKGBUILD
new file mode 100644
index 000000000..0d2c298af
--- /dev/null
+++ b/staging/scim-chewing/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 146907 2012-01-19 05:02:07Z bisson $
+# Contributor: damir <damir@archlinux.org>
+# Contributor: whisky <archlinux.cle(at)gmail.com>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=scim-chewing
+pkgver=0.3.4
+pkgrel=2
+pkgdesc='Traditional Chinese input method module for SCIM'
+arch=('i686' 'x86_64')
+url='http://chewing.csie.net/'
+license=('GPL')
+depends=('scim' 'libchewing')
+makedepends=('intltool')
+options=('!libtool')
+source=("http://chewing.csie.net/download/scim/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('f6c8d16f19f17449ee169f1ca787350353e93b05')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/scim-tables/PKGBUILD b/staging/scim-tables/PKGBUILD
new file mode 100644
index 000000000..06f296f43
--- /dev/null
+++ b/staging/scim-tables/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 146905 2012-01-19 04:58:35Z bisson $
+# Contributor: damir <damir@archlinux.org>
+# Contributor: Gan Lu <rhythm.gan@gmail.com>
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+
+pkgname=scim-tables
+pkgver=0.5.10
+pkgrel=2
+pkgdesc='Generic table input method module for SCIM'
+url='http://www.scim-im.org/'
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('scim')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/sourceforge/scim/${pkgname}-${pkgver}.tar.gz")
+sha1sums=('c6e6fbd9999ceba5cb982349fee8391e16a9c2fe')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --enable-static=no
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/sox/PKGBUILD b/staging/sox/PKGBUILD
new file mode 100644
index 000000000..4ac83085c
--- /dev/null
+++ b/staging/sox/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 146873 2012-01-19 01:56:50Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=sox
+pkgver=14.3.2
+pkgrel=5
+pkgdesc="The Swiss Army knife of sound processing tools"
+arch=('i686' 'x86_64')
+url="http://sox.sourceforge.net/"
+license=('GPL' 'LGPL')
+depends=('libltdl' 'file' 'libsndfile' 'libpng' 'lame' 'opencore-amr')
+makedepends=('ffmpeg' 'libao' 'libmad' 'libid3tag' 'wavpack' 'libpulse')
+optdepends=('libao: for ao plugin'
+ 'ffmpeg: for ffmpeg plugin'
+ 'libmad: for mp3 plugin'
+ 'libid3tag: for mp3 plugin'
+ 'wavpack: for wavpack plugin'
+ 'libpulse: for pulse plugin')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ sox-14.3.2-ffmpeg.patch)
+sha1sums=('026636c90d7accba76225a2821aaa2ffa6fe41a3'
+ '86caa6aa86a0bf7a048522114d4efd11acbbda70')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/sox-14.3.2-ffmpeg.patch"
+ sed -i 's|man1/sox.1 soxeffect.7|man1/sox.1.gz soxeffect.7.gz|' Makefile.in
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --with-dyn-default --with-distro="Arch Linux"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/sox/sox-14.3.2-ffmpeg.patch b/staging/sox/sox-14.3.2-ffmpeg.patch
new file mode 100644
index 000000000..5289b9b47
--- /dev/null
+++ b/staging/sox/sox-14.3.2-ffmpeg.patch
@@ -0,0 +1,40 @@
+Index: sox-14.3.2/src/ffmpeg.c
+===================================================================
+--- sox-14.3.2.orig/src/ffmpeg.c
++++ sox-14.3.2/src/ffmpeg.c
+@@ -91,7 +91,7 @@ static int stream_component_open(priv_t
+
+ if (!codec || avcodec_open(enc, codec) < 0)
+ return -1;
+- if (enc->codec_type != CODEC_TYPE_AUDIO) {
++ if (enc->codec_type != AVMEDIA_TYPE_AUDIO) {
+ lsx_fail("ffmpeg CODEC %x is not an audio CODEC", enc->codec_type);
+ return -1;
+ }
+@@ -182,7 +182,7 @@ static int startread(sox_format_t * ft)
+ /* Find audio stream (FIXME: allow different stream to be selected) */
+ for (i = 0; (unsigned)i < ffmpeg->ctxt->nb_streams; i++) {
+ AVCodecContext *enc = ffmpeg->ctxt->streams[i]->codec;
+- if (enc->codec_type == CODEC_TYPE_AUDIO && ffmpeg->audio_index < 0) {
++ if (enc->codec_type == AVMEDIA_TYPE_AUDIO && ffmpeg->audio_index < 0) {
+ ffmpeg->audio_index = i;
+ break;
+ }
+@@ -273,7 +273,7 @@ static AVStream *add_audio_stream(sox_fo
+
+ c = st->codec;
+ c->codec_id = codec_id;
+- c->codec_type = CODEC_TYPE_AUDIO;
++ c->codec_type = AVMEDIA_TYPE_AUDIO;
+
+ /* put sample parameters */
+ c->bit_rate = 256000; /* FIXME: allow specification */
+@@ -423,7 +423,7 @@ static size_t write_samples(sox_format_t
+ av_init_packet(&pkt);
+ pkt.size = avcodec_encode_audio(c, ffmpeg->audio_buf_aligned, AVCODEC_MAX_AUDIO_FRAME_SIZE, ffmpeg->samples);
+ pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, ffmpeg->audio_st->time_base);
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+ pkt.stream_index = ffmpeg->audio_st->index;
+ pkt.data = ffmpeg->audio_buf_aligned;
+
diff --git a/staging/totem-plparser/PKGBUILD b/staging/totem-plparser/PKGBUILD
new file mode 100644
index 000000000..8cb03d620
--- /dev/null
+++ b/staging/totem-plparser/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 146580 2012-01-13 20:34:31Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=totem-plparser
+pkgver=2.32.6
+pkgrel=3
+url="http://www.hadess.net/totem.php3"
+pkgdesc="Totem playlist parser library"
+license=('LGPL')
+arch=(i686 x86_64)
+depends=('gmime' 'libsoup-gnome' 'libarchive')
+makedepends=('intltool' 'gobject-introspection')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/gnome/sources/totem-pl-parser/2.32/totem-pl-parser-$pkgver.tar.xz)
+sha256sums=('8e6ccef547f1ad311474a975032d2482e621550ee3d4d22c725cdc6b496e4874')
+
+build() {
+ cd "$srcdir/totem-pl-parser-$pkgver"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static
+ make
+}
+
+package(){
+ cd "$srcdir/totem-pl-parser-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/staging/transfig/LICENSE b/staging/transfig/LICENSE
new file mode 100644
index 000000000..b944bb992
--- /dev/null
+++ b/staging/transfig/LICENSE
@@ -0,0 +1,23 @@
+/*
+ * TransFig: Facility for Translating Fig code
+ * Copyright (c) 1991 by Micah Beck
+ * Parts Copyright (c) 1985-1988 by Supoj Sutanthavibul
+ *
+ * Any party obtaining a copy of these files is granted, free of charge, a
+ * full and unrestricted irrevocable, world-wide, paid up, royalty-free,
+ * nonexclusive right and license to deal in this software and
+ * documentation files (the "Software"), including without limitation the
+ * rights to use, copy, modify, merge, publish and/or distribute copies of
+ * the Software, and to permit persons who receive copies from any such
+ * party to do so, with the only requirement being that this copyright
+ * notice remain intact.
+ *
+ */
+
+THE LAWRENCE BERKELEY NATIONAL LABORATORY DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL,
+INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
diff --git a/staging/transfig/PKGBUILD b/staging/transfig/PKGBUILD
new file mode 100644
index 000000000..5c03217ca
--- /dev/null
+++ b/staging/transfig/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 146871 2012-01-19 01:34:27Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=transfig
+pkgver=3.2.5d
+pkgrel=1
+pkgdesc="Format conversion utility that can be used with xfig"
+arch=('i686' 'x86_64')
+url="http://www.xfig.org"
+license=('custom')
+depends=('libpng' 'libxpm')
+makedepends=('imake')
+source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.tar.gz LICENSE \
+ transfig-3.2.5d-libpng-1.5.patch)
+sha1sums=('90ff277cc9b3fa0d0313052fcf5e3ffad8652abc'
+ 'b8b712871615308b8b6add92f86d218437d652f2'
+ '9f9f332b0b31e58e59542bc1568df9617b71710a')
+
+build() {
+ cd "${srcdir}/${pkgname}.${pkgver}"
+ sed -i 's/XCOMM USELATEX2E = -DLATEX2E/USELATEX2E = -DLATEX2E/' transfig/Imakefile
+ sed -i 's/XCOMM USEINLINE = -DUSE_INLINE/USEINLINE = -DUSE_INLINE/' fig2dev/Imakefile
+ patch -p1 -i ../transfig-3.2.5d-libpng-1.5.patch
+
+ xmkmf
+ make FIG2DEV_LIBDIR=/usr/share/fig2dev Makefiles
+ make FIG2DEV_LIBDIR=/usr/share/fig2dev XFIGLIBDIR=/usr/share/xfig
+}
+
+package() {
+ cd "${srcdir}/${pkgname}.${pkgver}"
+
+ make DESTDIR="${pkgdir}" XFIGLIBDIR=/usr/share/xfig \
+ FIG2DEV_LIBDIR=/usr/share/fig2dev MANPATH=/usr/share/man \
+ install install.man
+ install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/transfig/transfig-3.2.5d-libpng-1.5.patch b/staging/transfig/transfig-3.2.5d-libpng-1.5.patch
new file mode 100644
index 000000000..e6f15e43e
--- /dev/null
+++ b/staging/transfig/transfig-3.2.5d-libpng-1.5.patch
@@ -0,0 +1,39 @@
+http://bugs.gentoo.org/show_bug.cgi?id=356751
+
+Index: transfig.3.2.5d/fig2dev/dev/readpng.c
+===================================================================
+--- transfig.3.2.5d.orig/fig2dev/dev/readpng.c
++++ transfig.3.2.5d/fig2dev/dev/readpng.c
+@@ -62,7 +62,7 @@ read_png(file,filetype,pic,llx,lly)
+ }
+
+ /* set long jump here */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* if we get here there was a problem reading the file */
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ return 0;
+@@ -78,15 +78,17 @@ read_png(file,filetype,pic,llx,lly)
+ png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
+ &interlace_type, &compression_type, &filter_type);
+
+- if (info_ptr->valid & PNG_INFO_gAMA)
+- png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
+- else
+- png_set_gamma(png_ptr, 2.2, 0.45);
++ png_fixed_point gamma = 0.45;
++ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
++ png_set_gamma(png_ptr, 2.2, gamma);
+
+- if (info_ptr->valid & PNG_INFO_bKGD)
++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
+ /* set the background to the one supplied */
+- png_set_background(png_ptr, &info_ptr->background,
++ png_color_16p background;
++ png_get_bKGD(png_ptr,info_ptr,&background);
++ png_set_background(png_ptr, background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
++ }
+ else {
+ /* blend the canvas background using the alpha channel */
+ if (bgspec) {
diff --git a/staging/tumbler/PKGBUILD b/staging/tumbler/PKGBUILD
new file mode 100644
index 000000000..01b53bbc8
--- /dev/null
+++ b/staging/tumbler/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 146989 2012-01-19 22:34:27Z foutrelis $
+# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jan Jezek <honzin.jezek@gmail.com>
+
+pkgname=tumbler
+pkgver=0.1.23
+pkgrel=4
+pkgdesc="D-Bus service for applications to request thumbnails"
+arch=('i686' 'x86_64')
+url="http://git.xfce.org/xfce/tumbler/"
+license=('GPL2' 'LGPL')
+groups=('xfce4')
+depends=('dbus-glib' 'gdk-pixbuf2')
+makedepends=('intltool' 'ffmpegthumbnailer' 'gstreamer0.10' 'poppler-glib'
+ 'libgsf' 'libopenraw' 'freetype2')
+optdepends=('ffmpegthumbnailer: for video thumbnails'
+ 'gstreamer0.10: for video thumbnails'
+ 'poppler-glib: for PDF thumbnails'
+ 'libgsf: for ODF thumbnails'
+ 'libopenraw: for RAW thumbnails'
+ 'freetype2: for font thumbnails')
+options=('!libtool')
+source=(http://archive.xfce.org/src/apps/$pkgname/0.1/$pkgname-$pkgver.tar.bz2)
+sha256sums=('b3066d17b7e1fee5135eb876a7c2c50a1221bd0d447c3dd7c36efe6d7f3874cb')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib/xfce4 \
+ --disable-static \
+ --disable-debug
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/vice/PKGBUILD b/staging/vice/PKGBUILD
new file mode 100644
index 000000000..92a531c26
--- /dev/null
+++ b/staging/vice/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 146938 2012-01-19 12:54:40Z giovanni $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=vice
+pkgver=2.3
+pkgrel=5
+pkgdesc="A Versatile Commodore Emulator"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.viceteam.org/"
+depends=('alsa-lib' 'gcc-libs' 'giflib' 'lame' 'libxrandr'
+ 'libxv' 'libjpeg' 'libpng' 'libxaw' 'libxxf86vm')
+makedepends=('xorg-font-utils')
+options=('!makeflags')
+source=("http://downloads.sourceforge.net/project/vice-emu/releases/${pkgname}-${pkgver}.tar.gz"
+ 'vice-2.3-x11video.patch')
+md5sums=('b48d137874daad50c087a0686cbdde34'
+ '088292ce9efe785edfb2b0c7c670785e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i ${srcdir}/vice-2.3-x11video.patch
+ ./configure --prefix=/usr \
+ --with-alsa \
+ --enable-fullscreen
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/vice/vice-2.3-x11video.patch b/staging/vice/vice-2.3-x11video.patch
new file mode 100644
index 000000000..d698638c6
--- /dev/null
+++ b/staging/vice/vice-2.3-x11video.patch
@@ -0,0 +1,11 @@
+--- a/src/arch/unix/x11/xaw/x11video.c 2011-01-18 23:59:00.000000000 +0100
++++ b/src/arch/unix/x11/xaw/x11video.c 2011-02-27 18:40:52.000000000 +0100
+@@ -60,6 +60,8 @@
+ #include <X11/Xutil.h>
+ #include <X11/Intrinsic.h>
+ #include <X11/cursorfont.h>
++#include <X11/Xmd.h>
++#include <X11/extensions/shmproto.h>
+
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/staging/windowmaker-crm-git/PKGBUILD b/staging/windowmaker-crm-git/PKGBUILD
new file mode 100644
index 000000000..c8ab1a721
--- /dev/null
+++ b/staging/windowmaker-crm-git/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 146857 2012-01-18 21:05:19Z daniel $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+
+pkgname=windowmaker-crm-git
+pkgver=20120109
+pkgrel=2
+pkgdesc="An X11 window manager with a NEXTSTEP look and feel - git version from Carlos R. Mafra"
+arch=(i686 x86_64)
+url="http://www.windowmaker.org"
+license=('GPL' 'custom')
+depends=('libxinerama' 'libxrandr' 'libpng' 'libxpm' 'libxft' 'libtiff>=3.9.1' 'giflib' 'libxmu')
+options=('!libtool')
+provides=('windowmaker')
+conflicts=('windowmaker')
+source=(ftp://ftp.archlinux.org/other/windowmaker/windowmaker-$pkgver.tar.gz wmaker.desktop)
+md5sums=('abe70f9cc7606c73a9bbe498cacf925a'
+ '2fba97bebfd691836b92b8f0db79ff13')
+
+build() {
+ cd $srcdir/windowmaker-$pkgver
+ [ -z "$LINGUAS" ] && export LINGUAS="`ls po/*.po | sed 's:po/\(.*\)\.po$:\1:'`"
+ ./autogen.sh
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-xinerama \
+ --with-nlsdir=/usr/share/locale --with-gnustepdir=/usr/lib/GNUstep \
+ --enable-usermenu --enable-modelock --enable-xrandr
+ make
+}
+
+package() {
+ cd $srcdir/windowmaker-$pkgver
+
+ make DESTDIR=$pkgdir install
+ install -D -m644 COPYING.WTFPL $pkgdir/usr/share/licenses/$pkgname/COPYING.WTFPL
+ install -D -m644 $srcdir/wmaker.desktop $pkgdir/usr/share/xsessions/wmaker.desktop
+
+}
diff --git a/staging/windowmaker-crm-git/libpng-1.4.patch b/staging/windowmaker-crm-git/libpng-1.4.patch
new file mode 100644
index 000000000..5dbe5fd25
--- /dev/null
+++ b/staging/windowmaker-crm-git/libpng-1.4.patch
@@ -0,0 +1,12 @@
+diff -Naur windowmaker-20091221-orig/wrlib/load.c windowmaker-20091221/wrlib/load.c
+--- windowmaker-20091221-orig/wrlib/load.c 2010-01-21 17:01:10.000000000 -0500
++++ windowmaker-20091221/wrlib/load.c 2010-01-21 17:02:38.000000000 -0500
+@@ -327,7 +327,7 @@
+
+ #ifdef USE_PNG
+ /* check for PNG */
+- if (png_check_sig(buffer, 8))
++ if (!png_sig_cmp(buffer, 0, 8))
+ return IM_PNG;
+ #endif
+
diff --git a/staging/windowmaker-crm-git/wmaker.desktop b/staging/windowmaker-crm-git/wmaker.desktop
new file mode 100644
index 000000000..f819c7577
--- /dev/null
+++ b/staging/windowmaker-crm-git/wmaker.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=windowmaker
+Exec=/usr/bin/wmaker
+Type=Application
diff --git a/staging/windowmaker/PKGBUILD b/staging/windowmaker/PKGBUILD
new file mode 100644
index 000000000..7d885b745
--- /dev/null
+++ b/staging/windowmaker/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 146855 2012-01-18 21:00:09Z daniel $
+# Maintainer: Daniel Isenmann <daniel@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+pkgname=windowmaker
+pkgver=0.95.0
+pkgrel=2
+pkgdesc="An X11 window manager with a NEXTSTEP look and feel"
+arch=(i686 x86_64)
+url="http://www.windowmaker.org/"
+license=('GPL' 'custom')
+depends=('libxinerama' 'libxrandr' 'libxmu' 'libpng' 'libxpm' 'libxft' 'libtiff' 'giflib')
+options=('!libtool')
+source=(ftp://ftp.archlinux.org/other/windowmaker/windowmaker-$pkgver.tar.gz wmaker.desktop)
+md5sums=('2d89834b4019e0a08641709ea7235db2'
+ '2fba97bebfd691836b92b8f0db79ff13')
+
+build() {
+ cd $srcdir/windowmaker-$pkgver
+ [ -z "$LINGUAS" ] && export LINGUAS="`ls po/*.po | sed 's:po/\(.*\)\.po$:\1:'`"
+ ./autogen.sh
+ ./configure --prefix=/usr --sysconfdir=/etc --enable-xinerama \
+ --with-nlsdir=/usr/share/locale --with-gnustepdir=/usr/lib/GNUstep \
+ --enable-usermenu --enable-modelock --enable-xrandr
+ make
+}
+
+package() {
+ cd $srcdir/windowmaker-$pkgver
+
+ make DESTDIR=$pkgdir install
+ install -D -m644 COPYING.WTFPL $pkgdir/usr/share/licenses/$pkgname/COPYING.WTFPL
+ install -D -m644 $srcdir/wmaker.desktop $pkgdir/usr/share/xsessions/wmaker.desktop
+}
+
diff --git a/staging/windowmaker/libpng-1.4.patch b/staging/windowmaker/libpng-1.4.patch
new file mode 100644
index 000000000..419e8faca
--- /dev/null
+++ b/staging/windowmaker/libpng-1.4.patch
@@ -0,0 +1,12 @@
+diff -Naur WindowMaker-0.92.0-orig/wrlib/load.c WindowMaker-0.92.0/wrlib/load.c
+--- WindowMaker-0.92.0-orig/wrlib/load.c 2010-01-21 16:10:39.000000000 -0500
++++ WindowMaker-0.92.0/wrlib/load.c 2010-01-21 16:13:15.000000000 -0500
+@@ -348,7 +348,7 @@
+
+ #ifdef USE_PNG
+ /* check for PNG */
+- if (png_check_sig(buffer, 8))
++ if (!png_sig_cmp(buffer, 0, 8))
+ return IM_PNG;
+ #endif
+
diff --git a/staging/windowmaker/windowmaker-gcc4.patch.tar.bz2 b/staging/windowmaker/windowmaker-gcc4.patch.tar.bz2
new file mode 100644
index 000000000..fae12a98d
--- /dev/null
+++ b/staging/windowmaker/windowmaker-gcc4.patch.tar.bz2
Binary files differ
diff --git a/staging/windowmaker/wmaker.desktop b/staging/windowmaker/wmaker.desktop
new file mode 100644
index 000000000..f819c7577
--- /dev/null
+++ b/staging/windowmaker/wmaker.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=windowmaker
+Exec=/usr/bin/wmaker
+Type=Application
diff --git a/staging/wv/PKGBUILD b/staging/wv/PKGBUILD
new file mode 100644
index 000000000..03e85ef24
--- /dev/null
+++ b/staging/wv/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 146944 2012-01-19 13:58:47Z giovanni $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+pkgname=wv
+pkgver=1.2.9
+pkgrel=1
+pkgdesc="MSWord library can load and parse Word 2000, 97, 95 and 6 file formats"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/wvware"
+license=('GPL')
+depends=('libgsf' 'libpng' 'sh')
+makedepends=('pkg-config')
+options=('!libtool')
+source=("http://www.abisource.com/downloads/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+md5sums=('dbccf2e9f747e50c913b7e3d126b73f7')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/wv/fix-soname.patch b/staging/wv/fix-soname.patch
new file mode 100644
index 000000000..81dff86e6
--- /dev/null
+++ b/staging/wv/fix-soname.patch
@@ -0,0 +1,14 @@
+diff -ru wv-1.2.7.orig//configure wv-1.2.7//configure
+--- wv-1.2.7.orig//configure 2009-09-21 12:22:46.000000000 +0200
++++ wv-1.2.7//configure 2010-06-08 12:00:27.948857203 +0200
+@@ -2082,8 +2082,8 @@
+ WV_MAJOR_VERSION=1
+ WV_MINOR_VERSION=2
+ WV_MICRO_VERSION=7
+-WV_INTERFACE_AGE=3
+-WV_BINARY_AGE=3
++WV_INTERFACE_AGE=4
++WV_BINARY_AGE=4
+ WV_VERSION=$WV_MAJOR_VERSION.$WV_MINOR_VERSION.$WV_MICRO_VERSION
+
+
diff --git a/staging/wxgtk/PKGBUILD b/staging/wxgtk/PKGBUILD
new file mode 100644
index 000000000..cc950e017
--- /dev/null
+++ b/staging/wxgtk/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 146863 2012-01-18 23:43:49Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=wxgtk
+pkgver=2.8.12.1
+pkgrel=3
+pkgdesc="GTK+ implementation of wxWidgets API for GUI"
+arch=('i686' 'x86_64')
+url="http://wxwidgets.org"
+license=('custom:wxWindows')
+depends=('gtk2' 'gstreamer0.10-base' 'libgl' 'libxxf86vm' 'libsm')
+makedepends=('gstreamer0.10-base-plugins' 'gconf' 'mesa')
+#source=(http://downloads.sourceforge.net/wxwindows/wxGTK-${pkgver}.tar.bz2)
+source=(http://downloads.sourceforge.net/wxpython/wxPython-src-${pkgver}.tar.bz2)
+sha1sums=('05688dc03d61631750f5904273122bb40a2115f5')
+
+build() {
+ cd "${srcdir}/wxPython-src-${pkgver}"
+# cd "${srcdir}/wxGTK-${pkgver}"
+ ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode \
+ --enable-graphics_ctx --disable-optimize --enable-mediactrl --with-regex=builtin \
+ --with-libpng=sys --with-libxpm=sys --with-libjpeg=sys --with-libtiff=sys \
+ --disable-precomp-headers
+ make
+ make -C locale allmo
+ cd contrib/src
+ make
+}
+
+package() {
+ cd "${srcdir}/wxPython-src-${pkgver}"
+# cd "${srcdir}/wxGTK-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ cd contrib/src
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 ../../docs/licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/xaos/PKGBUILD b/staging/xaos/PKGBUILD
new file mode 100644
index 000000000..1240d0b00
--- /dev/null
+++ b/staging/xaos/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 146867 2012-01-19 00:03:29Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=xaos
+pkgver=3.5
+pkgrel=5
+pkgdesc="A fast portable real-time interactive fractal zoomer"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/xaos/"
+license=('GPL')
+depends=('gsl' 'libpng' 'aalib')
+options=('!makeflags')
+install=xaos.install
+source=(http://downloads.sourceforge.net/sourceforge/xaos/${pkgname}-${pkgver}.tar.gz xaos-3.5-libpng15.patch)
+sha1sums=('6d16a58187fba7276e6bd0547cc2fd6bb073b801'
+ '6c51cb2ee1c5f28973680ffc3a040c2cea65fd33')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p0 -i ../xaos-3.5-libpng15.patch
+ ./configure --prefix=/usr --with-gsl --with-aa-driver
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/xaos/xaos-3.5-libpng15.patch b/staging/xaos/xaos-3.5-libpng15.patch
new file mode 100644
index 000000000..beece8339
--- /dev/null
+++ b/staging/xaos/xaos-3.5-libpng15.patch
@@ -0,0 +1,131 @@
+http://code.google.com/p/gnuxaos/issues/detail?id=55
+
+--- src/util/png.c
++++ src/util/png.c
+@@ -3,6 +3,7 @@
+ #include <aconfig.h>
+ #ifdef USE_PNG
+ #include <png.h>
++#include <zlib.h>
+ #endif
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -31,6 +32,9 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_color palette[256];
++ png_color_8 sig_bit;
++ int color_type;
++ int bit_depth;
+ volatile unsigned short a = 255;
+ volatile unsigned char *b = (volatile unsigned char *) &a;
+ #ifdef _undefined_
+@@ -59,7 +63,7 @@
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return "No memory to create png info structure";
+ }
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(file);
+ return strerror(errno);
+@@ -78,57 +82,70 @@
+ png_set_compression_window_bits(png_ptr, 15);
+ png_set_compression_method(png_ptr, 8);
+
+- info_ptr->width = image->width;
+- info_ptr->height = image->height;
+- /*info_ptr->gamma=1.0; */
+- info_ptr->gamma = 0.5;
+- info_ptr->valid |= PNG_INFO_gAMA | PNG_INFO_pHYs;
+- info_ptr->x_pixels_per_unit = (png_uint_32) (100 / image->pixelwidth);
+- info_ptr->y_pixels_per_unit = (png_uint_32) (100 / image->pixelheight);
++ switch (image->palette->type)
++ {
++ case C256:
++ color_type = PNG_COLOR_TYPE_PALETTE;
++ bit_depth = image->bytesperpixel * 8;
++ break;
++ case SMALLITER:
++ case LARGEITER:
++ case GRAYSCALE:
++ color_type = PNG_COLOR_TYPE_GRAY;
++ bit_depth = image->bytesperpixel * 8;
++ break;
++ case TRUECOLOR:
++ case TRUECOLOR24:
++ case TRUECOLOR16:
++ color_type = PNG_COLOR_TYPE_RGB;
++ bit_depth = 8;
++ break;
++ }
+
++ png_set_IHDR (png_ptr, info_ptr, image->width, image->height, bit_depth,
++ color_type, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE,
++ PNG_FILTER_TYPE_BASE);
+
+ switch (image->palette->type) {
+ case C256:
+ {
+ int i;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+- info_ptr->bit_depth = image->bytesperpixel * 8;
+- info_ptr->palette = palette;
+- info_ptr->valid |= PNG_INFO_PLTE;
++ png_color png_palette[257];
++ int png_num_palette;
+ for (i = 0; i < image->palette->end; i++)
+- info_ptr->palette[i].red = image->palette->rgb[i][0],
+- info_ptr->palette[i].green = image->palette->rgb[i][1],
+- info_ptr->palette[i].blue = image->palette->rgb[i][2],
+- info_ptr->num_palette = image->palette->end;
++ png_palette[i].red = image->palette->rgb[i][0],
++ png_palette[i].green = image->palette->rgb[i][1],
++ png_palette[i].blue = image->palette->rgb[i][2],
++ png_num_palette = image->palette->end;
++ png_set_PLTE(png_ptr, info_ptr, png_palette, png_num_palette);
+ }
+ break;
+- case SMALLITER:
+- case LARGEITER:
+- case GRAYSCALE:
+- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+- info_ptr->bit_depth = image->bytesperpixel * 8;
+- break;
+ case TRUECOLOR:
+ case TRUECOLOR24:
+ case TRUECOLOR16:
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- info_ptr->bit_depth = 8;
+- info_ptr->sig_bit.red = 8 - image->palette->info.truec.rprec;
+- info_ptr->sig_bit.green = 8 - image->palette->info.truec.gprec;
+- info_ptr->sig_bit.blue = 8 - image->palette->info.truec.bprec;
++ sig_bit.red = 8 - image->palette->info.truec.rprec;
++ sig_bit.green = 8 - image->palette->info.truec.gprec;
++ sig_bit.blue = 8 - image->palette->info.truec.bprec;
++ png_set_sBIT(png_ptr, info_ptr, &sig_bit);
+ break;
+ }
+- info_ptr->interlace_type = 0;
++
++ png_write_info (png_ptr, info_ptr);
++
+ #ifdef _undefined_
+ png_set_text(png_ptr, info_ptr, comments,
+ sizeof(comments) / sizeof(png_text));
+ #endif
+
+- png_write_info(png_ptr, info_ptr);
++ png_set_gAMA(png_ptr, info_ptr, 0.5 /* 1.0 */);
++ png_set_pHYs(png_ptr, info_ptr, (png_uint_32) (100 / image->pixelwidth),
++ (png_uint_32) (100 / image->pixelheight),
++ PNG_RESOLUTION_UNKNOWN);
++
+ /*png_set_filler(png_ptr,0,PNG_FILLER_AFTER); */
+ png_set_packing(png_ptr);
+ if (image->palette->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16))
+- png_set_shift(png_ptr, &(info_ptr->sig_bit));
++ png_set_shift (png_ptr, &sig_bit);
+ if (*b == 255)
+ png_set_swap(png_ptr);
+ png_set_bgr(png_ptr);
diff --git a/staging/xaos/xaos.install b/staging/xaos/xaos.install
new file mode 100644
index 000000000..afee50a72
--- /dev/null
+++ b/staging/xaos/xaos.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(xaos.info.gz)
+
+post_install() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/staging/xfce4-datetime-plugin/PKGBUILD b/staging/xfce4-datetime-plugin/PKGBUILD
new file mode 100644
index 000000000..c4227bd32
--- /dev/null
+++ b/staging/xfce4-datetime-plugin/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 146891 2012-01-19 03:56:41Z foutrelis $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Aurelien Foret <orelien@chez.com>
+
+pkgname=xfce4-datetime-plugin
+pkgver=0.6.1
+pkgrel=2
+pkgdesc="A date and time display plugin for the Xfce panel"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://xfce-goodies.berlios.de/"
+groups=('xfce4-goodies')
+depends=('xfce4-panel>=4.7.4' 'libxfcegui4')
+makedepends=('intltool')
+options=('!libtool')
+source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/0.6/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('e82f51ff0e75a63e5cbd139e43e094f9')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-static
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/staging/xfce4-notes-plugin/PKGBUILD b/staging/xfce4-notes-plugin/PKGBUILD
new file mode 100644
index 000000000..ff9642b45
--- /dev/null
+++ b/staging/xfce4-notes-plugin/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 146893 2012-01-19 03:57:20Z foutrelis $
+# Maintainer: Andreas Radke <andyrtr at archlinux.org>
+# Contributor: Ben Mazer <contrasutra@myrealbox.com>
+
+pkgname=xfce4-notes-plugin
+pkgver=1.7.7
+pkgrel=3
+pkgdesc="A notes plugin for the Xfce4 panel"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://xfce-goodies.berlios.de/"
+groups=('xfce4-goodies')
+depends=('xfce4-panel>=4.7.0' 'libxfcegui4' 'libunique' 'hicolor-icon-theme')
+makedepends=('intltool')
+options=('!libtool')
+install=${pkgname}.install
+source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/1.7/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('42b924b23f2fec6a1099e9b7a87db4a3')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-debug
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/staging/xfce4-notes-plugin/xfce4-notes-plugin.install b/staging/xfce4-notes-plugin/xfce4-notes-plugin.install
new file mode 100644
index 000000000..fee9e5d11
--- /dev/null
+++ b/staging/xfce4-notes-plugin/xfce4-notes-plugin.install
@@ -0,0 +1,12 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
diff --git a/staging/xfce4-quicklauncher-plugin/PKGBUILD b/staging/xfce4-quicklauncher-plugin/PKGBUILD
new file mode 100644
index 000000000..73de5a343
--- /dev/null
+++ b/staging/xfce4-quicklauncher-plugin/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 146895 2012-01-19 03:58:10Z foutrelis $
+# Maintainer:
+# Contributor: Tobias Kieslich <tobias (at) archlinux.org>
+
+pkgname=xfce4-quicklauncher-plugin
+pkgver=1.9.4
+pkgrel=6
+pkgdesc="plugin that creates 4 little application launcher in the Xfce4 panel"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://xfce-goodies.berlios.de/"
+groups=('xfce4-goodies')
+depends=('xfce4-panel>=4.7.4' 'libxfcegui4')
+makedepends=('intltool')
+options=('!libtool')
+source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/1.9/${pkgname}-${pkgver}.tar.bz2
+ xfce4-quicklauncher-plugin-1.9.4-desktop-file.patch
+ xfce4-quicklauncher-plugin-1.9.4-fix-missing-english-translation.patch
+ xfce4-quicklauncher-plugin-1.9.4-fix-multiscreen.patch
+ xfce4-quicklauncher-plugin-1.9.4-save-settings.patch
+ xfce4-quicklauncher-plugin-1.9.4-xfce4-settings-manager.patch)
+md5sums=('299e17f196ecfa5fb018cf65abb19b56'
+ 'a7826c9f8199a2f1e914fd39b7f9e2bf'
+ '4ea4d06ab7284e78ddc4d60304f02cdf'
+ '5e8126c05def1211fb4a2a65f2812a1b'
+ '474237b205035214df1c723407251ade'
+ '9e7f789129b08c787978c7a72a55fae7')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ # Fedora patches
+ patch -Np0 -i ${srcdir}/xfce4-quicklauncher-plugin-1.9.4-desktop-file.patch
+ patch -Np0 -i ${srcdir}/xfce4-quicklauncher-plugin-1.9.4-fix-multiscreen.patch
+ patch -Np1 -i ${srcdir}/xfce4-quicklauncher-plugin-1.9.4-save-settings.patch
+ patch -Np1 -i ${srcdir}/xfce4-quicklauncher-plugin-1.9.4-fix-missing-english-translation.patch
+ patch -Np0 -i ${srcdir}/xfce4-quicklauncher-plugin-1.9.4-xfce4-settings-manager.patch
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-debug
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-desktop-file.patch b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-desktop-file.patch
new file mode 100644
index 000000000..907c1f23e
--- /dev/null
+++ b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-desktop-file.patch
@@ -0,0 +1,10 @@
+--- panel-plugin/quicklauncher.desktop.in.in.orig 2009-07-04 00:46:34.000000000 +0200
++++ panel-plugin/quicklauncher.desktop.in.in 2009-07-04 00:46:51.000000000 +0200
+@@ -4,4 +4,6 @@
+ _Name=Quicklauncher
+ _Comment=Program with several launchers
+ Icon=gnome-fs-executable
+-X-XFCE-Module=@INTERNAL_PLUGIN_PATH@/libquicklauncher.so
++X-XFCE-Module=quicklauncher
++X-XFCE-Module-Path=@INTERNAL_PLUGIN_PATH@
++X-XFCE-Unique=false
diff --git a/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-missing-english-translation.patch b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-missing-english-translation.patch
new file mode 100644
index 000000000..96f256770
--- /dev/null
+++ b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-missing-english-translation.patch
@@ -0,0 +1,103 @@
+diff -Nur -x '*.orig' -x '*~' xfce4-quicklauncher-plugin-1.9.4/configure xfce4-quicklauncher-plugin-1.9.4.new/configure
+--- xfce4-quicklauncher-plugin-1.9.4/configure 2007-06-27 21:07:14.000000000 +0200
++++ xfce4-quicklauncher-plugin-1.9.4.new/configure 2008-03-04 22:11:23.000000000 +0100
+@@ -21181,7 +21181,7 @@
+
+
+
+- ALL_LINGUAS="cs el eu fr gl hu ja pl ru vi"
++ ALL_LINGUAS="cs el en eu fr gl hu ja pl ru vi"
+
+
+ for ac_header in locale.h
+diff -Nur -x '*.orig' -x '*~' xfce4-quicklauncher-plugin-1.9.4/po/en.po xfce4-quicklauncher-plugin-1.9.4.new/po/en.po
+--- xfce4-quicklauncher-plugin-1.9.4/po/en.po 1970-01-01 01:00:00.000000000 +0100
++++ xfce4-quicklauncher-plugin-1.9.4.new/po/en.po 2008-03-04 22:10:58.000000000 +0100
+@@ -0,0 +1,87 @@
++# English translation of xfce4-quicklauncher-plugin.
++# Copyright (C) 2007 THE xfce4-quicklauncher-plugin'S COPYRIGHT HOLDER
++# This file is distributed under the same license as the xfce4-quicklauncher-plugin package.
++# Jeff Bailes <thepizzaking@gmail.com>, 2007.
++# , fuzzy
++#
++#
++msgid ""
++msgstr ""
++"Project-Id-Version: xfce4-quicklauncher-plugin\n"
++"Report-Msgid-Bugs-To: \n"
++"POT-Creation-Date: 2007-05-17 21:37+0200\n"
++"PO-Revision-Date: 2007-03-31 10:17+1000\n"
++"Last-Translator: Jeff Bailes <thepizzaking@gmail.com>\n"
++"Language-Team: English\n"
++"MIME-Version: 1.0\n"
++"Content-Type: text/plain; charset=UTF-8\n"
++"Content-Transfer-Encoding: 8bit"
++
++#: ../panel-plugin/callbacks.c:79
++msgid "Configure Quicklauncher"
++msgstr "Configure Quicklauncher"
++
++#: ../panel-plugin/callbacks.c:93
++msgid "Lines: "
++msgstr "Lines: "
++
++#: ../panel-plugin/callbacks.c:123
++msgid "Espace entre les lanceurs :"
++msgstr "Space between launchers"
++
++#: ../panel-plugin/callbacks.c:131
++msgid "afficher les tooltips"
++msgstr "Show tooltips"
++
++#: ../panel-plugin/callbacks.c:135
++msgid "afficher les labels"
++msgstr "Show labels"
++
++#: ../panel-plugin/callbacks.c:216
++msgid "icone"
++msgstr "icon"
++
++#: ../panel-plugin/callbacks.c:222
++msgid "commande"
++msgstr "command"
++
++#: ../panel-plugin/callbacks.c:228
++msgid "nom"
++msgstr "name"
++
++#: ../panel-plugin/callbacks.c:327
++msgid "Open icon"
++msgstr "Open icon"
++
++#: ../panel-plugin/main.c:163 ../panel-plugin/quicklauncher.desktop.in.in.h:2
++msgid "Quicklauncher"
++msgstr "Quicklauncher"
++
++#: ../panel-plugin/main.c:166
++msgid "Allows you to add launchers easily and display them on many lines."
++msgstr "Allows you to add launchers easily and display them on many lines."
++
++#: ../panel-plugin/main.c:168
++msgid "Other plugins available here"
++msgstr "Other plugins available here"
++
++#: ../panel-plugin/main.c:320
++msgid "Lock"
++msgstr "Lock"
++
++#: ../panel-plugin/main.c:323
++msgid "Parameters"
++msgstr "Parameters"
++
++#: ../panel-plugin/main.c:326
++msgid "Applications"
++msgstr "Applications"
++
++#: ../panel-plugin/main.c:329
++msgid "Help"
++msgstr "Help"
++
++#: ../panel-plugin/quicklauncher.desktop.in.in.h:1
++msgid "Program with several launchers"
++msgstr "Program with several launchers"
++
diff --git a/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-multiscreen.patch b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-multiscreen.patch
new file mode 100644
index 000000000..9845ce122
--- /dev/null
+++ b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-fix-multiscreen.patch
@@ -0,0 +1,27 @@
+--- panel-plugin/main.c.org 2008-05-13 09:29:29.000000000 -0600
++++ panel-plugin/main.c 2008-05-13 09:29:33.000000000 -0600
+@@ -148,6 +148,7 @@
+ t_qck_launcher_opt_dlg* dlg;
+ xfce_panel_plugin_block_menu(plugin);
+ dlg = create_qck_launcher_dlg();
++ gtk_window_set_screen (GTK_WINDOW (dlg->dialog), gtk_widget_get_screen (plugin));
+ qck_launcher_opt_dlg_set_quicklauncher(quicklauncher);
+ gtk_dialog_run(GTK_DIALOG(dlg->dialog));
+ xfce_panel_plugin_unblock_menu(plugin);
+@@ -160,6 +161,7 @@
+ GtkWidget *about;
+ const gchar* authors[2] = {"Bountykiller <masse_nicolas@yahoo.fr>", NULL};
+ about = gtk_about_dialog_new();
++ gtk_window_set_screen (GTK_WINDOW (about), gtk_widget_get_screen (plugin));
+ gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), _("Quicklauncher"));
+ gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), NULL);
+ gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), (const gchar**) authors);
+@@ -461,7 +463,7 @@
+ if(launcher->quicklauncher->_last_zoomed_launcher == launcher)
+ {
+ g_return_val_if_fail(launcher->clicked_img, FALSE);
+- xfce_exec(launcher->command, FALSE, FALSE, NULL);
++ xfce_exec_on_screen(gtk_widget_get_screen (box), launcher->command, FALSE, FALSE, NULL);
+ gtk_image_set_from_pixbuf (GTK_IMAGE(launcher->image), launcher->def_img);
+ }
+ else
diff --git a/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-save-settings.patch b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-save-settings.patch
new file mode 100644
index 000000000..85dd21729
--- /dev/null
+++ b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-save-settings.patch
@@ -0,0 +1,12 @@
+Index: xfce4-quicklauncher-plugin-1.9.4/panel-plugin/main.c
+===================================================================
+--- xfce4-quicklauncher-plugin-1.9.4/panel-plugin/main.c (révision 3779)
++++ xfce4-quicklauncher-plugin-1.9.4/panel-plugin/main.c (révision 3780)
+@@ -151,6 +151,7 @@
+ gtk_window_set_screen (GTK_WINDOW (dlg->dialog), gtk_widget_get_screen (plugin));
+ qck_launcher_opt_dlg_set_quicklauncher(quicklauncher);
+ gtk_dialog_run(GTK_DIALOG(dlg->dialog));
++ quicklauncher_save(plugin, quicklauncher);
+ xfce_panel_plugin_unblock_menu(plugin);
+ }
+
diff --git a/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-xfce4-settings-manager.patch b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-xfce4-settings-manager.patch
new file mode 100644
index 000000000..8314d7a3c
--- /dev/null
+++ b/staging/xfce4-quicklauncher-plugin/xfce4-quicklauncher-plugin-1.9.4-xfce4-settings-manager.patch
@@ -0,0 +1,11 @@
+--- panel-plugin/main.c.orig 2009-09-09 21:15:01.000000000 +0200
++++ panel-plugin/main.c 2009-09-09 21:23:12.000000000 +0200
+@@ -320,7 +320,7 @@
+ launcher = launcher_new(_("Lock"), "xflock4", XFCE_ICON_CATEGORY_SYSTEM,
+ NULL, quicklauncher);
+ quicklauncher_add_element(quicklauncher, launcher);
+- launcher = launcher_new(_("Parameters"),"xfce-setting-show", XFCE_ICON_CATEGORY_SETTINGS,
++ launcher = launcher_new(_("Parameters"),"xfce4-settings-manager", XFCE_ICON_CATEGORY_SETTINGS,
+ NULL, quicklauncher);
+ quicklauncher_add_element(quicklauncher, launcher);
+ launcher = launcher_new(_("Applications"), "xfce4-appfinder", XFCE_ICON_CATEGORY_UTILITY,
diff --git a/staging/xfce4-sensors-plugin/PKGBUILD b/staging/xfce4-sensors-plugin/PKGBUILD
new file mode 100644
index 000000000..de4048cec
--- /dev/null
+++ b/staging/xfce4-sensors-plugin/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 146897 2012-01-19 03:58:55Z foutrelis $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Merk Matthias <macem@chello.at>
+
+pkgname=xfce4-sensors-plugin
+pkgver=1.2.3
+pkgrel=3
+pkgdesc="A lm_sensors plugin for the Xfce panel"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://goodies.xfce.org/projects/panel-plugins/xfce4-sensors-plugin"
+groups=('xfce4-goodies')
+depends=('xfce4-panel' 'lm_sensors' 'libnotify>=0.7.1' 'hicolor-icon-theme') #'libxfcegui4'
+makedepends=('pkgconfig' 'intltool' 'hddtemp>=0.3.beta15.45-2' 'gnu-netcat' 'xfce4-dev-tools')
+optdepends=('gnu-netcat: for hddtemp access')
+options=(!libtool !makeflags)
+install=${pkgname}.install
+source=(http://archive.xfce.org/src/panel-plugins/${pkgname}/1.2/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('2edf376d140449ca42c4e4f591e626f8')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --datadir=/usr/share \
+ --datarootdir=/usr/share \
+ --disable-static \
+ --with-pathhddtemp=/usr/sbin/hddtemp \
+ --disable-debug
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/staging/xfce4-sensors-plugin/xfce4-sensors-plugin.install b/staging/xfce4-sensors-plugin/xfce4-sensors-plugin.install
new file mode 100644
index 000000000..17ca8f78a
--- /dev/null
+++ b/staging/xfce4-sensors-plugin/xfce4-sensors-plugin.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/staging/xfig/LICENSE b/staging/xfig/LICENSE
new file mode 100644
index 000000000..5b38ccff8
--- /dev/null
+++ b/staging/xfig/LICENSE
@@ -0,0 +1,33 @@
+Excerpt of the README from xfig/transfig - legal notice:
+---------------------------------------------------------------------------
+
+THE LAWRENCE BERKELEY NATIONAL LABORATORY DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL,
+INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+***************************************************************************
+NEW COPYRIGHT/PERMISSION NOTICE:
+
+The xfig copyright and permission notice has changed (again) slightly in
+version 3.2.5. It now states that:
+
+ FIG : Facility for Interactive Generation of figures
+ Copyright (c) 1985-1988 by Supoj Sutanthavibul
+ Parts Copyright (c) 1989-2002 by Brian V. Smith
+ Parts Copyright (c) 1991 by Paul King
+
+ Any party obtaining a copy of these files is granted, free of charge, a
+ full and unrestricted irrevocable, world-wide, paid up, royalty-free,
+ nonexclusive right and license to deal in this software and documentation
+ files (the "Software"), including without limitation the rights to use,
+ copy, modify, merge, publish distribute, sublicense and/or sell copies of
+ the Software, and to permit persons who receive copies from any such
+ party to do so, with the only requirement being that the above copyright
+ and this permission notice remain intact.
+
+The license for 3.2.4 didn't allow selling xfig unless it was simply included in a
+collection of programs (e.g. a CD) that one was selling.
diff --git a/staging/xfig/PKGBUILD b/staging/xfig/PKGBUILD
new file mode 100644
index 000000000..4314a549a
--- /dev/null
+++ b/staging/xfig/PKGBUILD
@@ -0,0 +1,65 @@
+# $Id: PKGBUILD 146901 2012-01-19 04:44:44Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=xfig
+pkgver=3.2.5b
+pkgrel=6
+pkgdesc="An interactive drawing tool"
+arch=('i686' 'x86_64')
+url="http://www.xfig.org/userman/"
+license=('custom')
+depends=('libpng' 'libjpeg' 'xaw3d' 'libxi' 'desktop-file-utils' 'gsfonts')
+makedepends=('imake')
+optdepends=('transfig: to use the frontend to convert fig files')
+options=('!makeflags' '!emptydirs')
+install=xfig.install
+source=(http://downloads.sourceforge.net/mcj/${pkgname}.${pkgver}.full.tar.gz \
+ xfig-3.2.4-redhat.patch xfig-3.2.5-color-resources.patch \
+ xfig-3.2.5-enable-Xaw3d.patch xfig-3.2.5-urwfonts.patch \
+ xfig-3.2.5-fhs.patch xfig-3.2.5-missing-protos.patch \
+ xfig.3.2.5-modularX.patch xfig-3.2.5b-fix-eps-reading.patch \
+ xfig-3.2.5b-libpng-1.5.patch LICENSE xfig.desktop)
+sha1sums=('0730d7e6bc217c0de02682efb0078821512bb542'
+ '926ad99c7221baa4aa9e9737722958860b2700fc'
+ 'b7c03fb70066ff476a4039a8c0f8930c15edef68'
+ '33bff26b42ce164e79de11808b5b34b363f0d59f'
+ 'e595ccdbe293ea0fdecbf59a2192ae57ced2c8eb'
+ '39bec6bac9746b643b05fd1286826113ede07ff6'
+ 'bd76cd50be6a5789cfd6f182309cfd7056be04f3'
+ 'a1285f4e61ad2eec040460ab03e8022098e7f78e'
+ '12a64ddaf65a73e23ef74f31483515a0e262768c'
+ '83032eb61c8dc96d5fc509a1ce632528457d4598'
+ '31edf4cfab708820ea3f114d095dfef5aa88e5aa'
+ '9011b8fa6143e37525b28cc9800a3bf2d6b008d2')
+
+build() {
+ cd "${srcdir}/${pkgname}.${pkgver}"
+ patch -p1 < ../xfig-3.2.4-redhat.patch
+ patch -p1 < ../xfig-3.2.5-fhs.patch
+ patch -p1 < ../xfig.3.2.5-modularX.patch
+ patch -p1 < ../xfig-3.2.5-enable-Xaw3d.patch
+ patch -p1 < ../xfig-3.2.5-color-resources.patch
+ patch -p1 < ../xfig-3.2.5-urwfonts.patch
+ patch -p1 < ../xfig-3.2.5-missing-protos.patch
+ patch -p1 < ../xfig-3.2.5b-fix-eps-reading.patch
+ patch -p1 < ../xfig-3.2.5b-libpng-1.5.patch
+ chmod 755 Libraries
+
+ xmkmf
+ make DOCDIR=/usr/share/doc
+}
+
+package() {
+ cd "${srcdir}/${pkgname}.${pkgver}"
+ make DESTDIR="${pkgdir}" DOCDIR=/usr/share/doc install.all
+ rm "${pkgdir}/usr/lib/X11/app-defaults"
+
+ find "${pkgdir}/usr/share/xfig/Libraries" -type f -exec chmod 0644 {} \;
+ find "${pkgdir}/usr/share/xfig/Libraries" -type d -exec chmod 0755 {} \;
+ find "${pkgdir}/usr/share/doc/xfig" -type f -exec chmod 0644 {} \;
+ find "${pkgdir}/usr/share/doc/xfig" -type d -exec chmod 0755 {} \;
+
+ install -D -m644 ../xfig.desktop "${pkgdir}/usr/share/applications/xfig.desktop"
+ install -D -m644 xfig.png "${pkgdir}/usr/share/pixmaps/xfig.png"
+ install -D -m644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/xfig/xfig-3.2.4-redhat.patch b/staging/xfig/xfig-3.2.4-redhat.patch
new file mode 100644
index 000000000..da6f150b3
--- /dev/null
+++ b/staging/xfig/xfig-3.2.4-redhat.patch
@@ -0,0 +1,31 @@
+--- xfig.3.2.4/Fig.ad.redhat 2002-12-19 01:05:41.000000000 +0100
++++ xfig.3.2.4/Fig.ad 2003-05-06 11:45:15.000000000 +0200
+@@ -11,7 +11,7 @@
+ Fig*AllowShellResize: false
+
+ ! Image editor - can edit imported image
+-Fig.image_editor: xv
++Fig.image_editor: xdg-open
+
+ ! name of ghostscript (not ghostview)
+ Fig.ghostscript: gs
+@@ -20,16 +20,16 @@
+ ! This is for viewing the xfig html reference.
+ ! For netscape, this command will open the help pages in a running netscape,
+ ! or start a new netscape if one isn't already running
+-Fig.browser: firefox -remote 'openFile(%f)' || firefox %f
++Fig.browser: xdg-open %f
+
+ ! pdfviewer - put your favorite pdf viewer here.
+ ! This is for viewing the xfig how-to guide and man pages
+-Fig.pdfviewer: xpdf %f
++Fig.pdfviewer: xdg-open %f
+
+ ! Spell check program - put your favorite spelling check program here.
+ ! It must write the misspelled words to standard output.
+
+-Fig.spellcheckcommand: spell %f
++Fig.spellcheckcommand: aspell %f
+
+ ! delay before spinner automatically counts when pressed (milliseconds)
+ Fig.spinner_delay: 1000
diff --git a/staging/xfig/xfig-3.2.5-color-resources.patch b/staging/xfig/xfig-3.2.5-color-resources.patch
new file mode 100644
index 000000000..6cf1af906
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5-color-resources.patch
@@ -0,0 +1,39 @@
+diff -up xfig.3.2.5/Fig-color.bisque.ad~ xfig.3.2.5/Fig-color.bisque.ad
+--- xfig.3.2.5/Fig-color.bisque.ad~ 2007-11-16 13:47:45.000000000 +0100
++++ xfig.3.2.5/Fig-color.bisque.ad 2007-11-16 13:47:52.000000000 +0100
+@@ -93,7 +93,7 @@ Fig*sideruler.background: gray95
+ Fig*topruler.background: gray95
+ Fig*sideruler.background: gray95
+ Fig*List*background: gray95
+-Fig*Scrollbar.background: gray95
++! Fig*Scrollbar.background: gray95
+
+ Fig*cancel.background: navajowhite1
+ Fig*dismiss.background: navajowhite1
+@@ -104,8 +104,8 @@ Fig*menu_divider.foreground: red
+ Fig*menu_divider.foreground: red
+
+ !##### Shadows
+-Fig*shadowWidth: 2
+-Fig*Label.shadowWidth: 1
++! Fig*shadowWidth: 2
++! Fig*Label.shadowWidth: 1
+ Fig*horizontal.shadowWidth: 2
+ Fig*Scrollbar.shadowWidth: 2
+ ! no shadows for update indicators
+@@ -136,3 +136,15 @@ Fig*color_box*topShadowPixel: gray80
+
+ Fig*toggle*bottomShadowPixel: gray80
+ Fig*toggle*topShadowPixel: gray50
++
++! repare damage done to scrollbar shadows non color resources file
++
++Fig*horizontal.topShadowPixel: gray95
++Fig*horizontal.bottomShadowPixel: gray50
++Fig*horizontal.topShadow: gray95
++Fig*horizontal.bottomShadow: gray50
++
++Fig*Scrollbar.topShadow: gray95
++Fig*Scrollbar.bottomShadow: gray50
++Fig*Scrollbar.topShadowPixel: gray95
++Fig*Scrollbar.bottomShadowPixel: gray50
diff --git a/staging/xfig/xfig-3.2.5-enable-Xaw3d.patch b/staging/xfig/xfig-3.2.5-enable-Xaw3d.patch
new file mode 100644
index 000000000..f4d113808
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5-enable-Xaw3d.patch
@@ -0,0 +1,18 @@
+diff -up xfig.3.2.5/Imakefile.no-Xaw3d xfig.3.2.5/Imakefile
+--- xfig.3.2.5/Imakefile.no-Xaw3d 2007-11-16 10:38:18.000000000 +0100
++++ xfig.3.2.5/Imakefile 2007-11-16 10:38:49.000000000 +0100
+@@ -50,8 +50,8 @@ XAPPLOADDIR = /usr/share/X11/app-default
+ XCOMM Uncomment the following if you have David Hawkey's Xaw3D version 1.5E which has
+ XCOMM some new features, including "Tips", which replace xfig's "help balloons"
+ XCOMM NOTE: This is the default for many X systems now.
+
+-XCOMM #define XAW3D1_5E
++#define XAW3D1_5E
+
+ #ifdef XAW3D1_5E
+ DUSEXAW3D = -DXAW3D -DXAW3D1_5E
+- XAWLIB = -lXaw3d15e
++ XAWLIB = -lXaw3d
+ #else
+ XAW_SRC = w_menuentry.c SmeCascade.c SmeBSB.c SimpleMenu.c
+ XAW_OBJ = w_menuentry.o SmeCascade.o SmeBSB.o SimpleMenu.o
diff --git a/staging/xfig/xfig-3.2.5-fhs.patch b/staging/xfig/xfig-3.2.5-fhs.patch
new file mode 100644
index 000000000..a17d908a7
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5-fhs.patch
@@ -0,0 +1,12 @@
+--- xfig.3.2.5/Imakefile.fhs 2006-10-11 01:19:22.000000000 +0200
++++ xfig.3.2.5/Imakefile 2007-04-16 14:04:45.000000000 +0200
+@@ -169,8 +169,7 @@
+ XFIGLIBDIR = $(LIBDIR)/xfig
+
+ XCOMM XFIGDOCDIR tells where the html and pdf documentation should go
+-XCOMM XFIGDOCDIR = $(DOCDIR)/xfig
+-XFIGDOCDIR = /usr/local/xfig/doc
++XFIGDOCDIR = $(DOCDIR)/xfig
+
+ XCOMM MANDIR tells where the standard man pages should go (no need to change it
+ XCOMM if you want the man pages installed in the standard place on your system
diff --git a/staging/xfig/xfig-3.2.5-missing-protos.patch b/staging/xfig/xfig-3.2.5-missing-protos.patch
new file mode 100644
index 000000000..181c52a69
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5-missing-protos.patch
@@ -0,0 +1,11 @@
+diff -up xfig.3.2.5/u_draw.c~ xfig.3.2.5/u_draw.c
+--- xfig.3.2.5/u_draw.c~ 2008-04-03 15:58:23.000000000 +0200
++++ xfig.3.2.5/u_draw.c 2008-04-03 15:58:23.000000000 +0200
+@@ -43,6 +43,7 @@
+ #include "w_zoom.h"
+ #include "u_redraw.h"
+ #include "w_cursor.h"
++#include <X11/ImUtil.h>
+
+ static Boolean add_point(int x, int y);
+ static void init_point_array(void);
diff --git a/staging/xfig/xfig-3.2.5-urwfonts.patch b/staging/xfig/xfig-3.2.5-urwfonts.patch
new file mode 100644
index 000000000..7bc766bd9
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5-urwfonts.patch
@@ -0,0 +1,79 @@
+--- xfig.3.2.4/u_fonts.c 2002-09-09 13:36:58.000000000 -0400
++++ new-xfig-3.2.4/u_fonts.c 2006-10-11 00:29:07.000000000 -0400
+@@ -22,41 +22,41 @@
+ /* X11 font names */
+
+ struct _xfstruct x_fontinfo[NUM_FONTS] = {
+- {"-*-times-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-times-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-times-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-times-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-book-r-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-book-o-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-demi-r-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-demi-o-normal--", (struct xfont*) NULL},
+- {"-*-bookman-light-r-normal--", (struct xfont*) NULL},
+- {"-*-bookman-light-i-normal--", (struct xfont*) NULL},
+- {"-*-bookman-demi-r-normal--", (struct xfont*) NULL},
+- {"-*-bookman-demi-i-normal--", (struct xfont*) NULL},
+- {"-*-courier-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-courier-medium-o-normal--", (struct xfont*) NULL},
+- {"-*-courier-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-courier-bold-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-r-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-o-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-r-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-o-narrow--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-palatino-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-palatino-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-palatino-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-palatino-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-symbol-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-itc zapf chancery-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-itc zapf dingbats-*-*-*--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-medium-o-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-semibold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-semibold-o-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-medium-o-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-bold-o-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-medium-r-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-medium-i-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-bold-r-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l condensed-bold-i-condensed--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-standard symbols l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw chancery l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-dingbats-medium-r-normal--", (struct xfont*) NULL},
+ };
+
+ /* Use the following font names for any font that doesn't exist in the table above.
diff --git a/staging/xfig/xfig-3.2.5b-fix-eps-reading.patch b/staging/xfig/xfig-3.2.5b-fix-eps-reading.patch
new file mode 100644
index 000000000..7601d20ea
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5b-fix-eps-reading.patch
@@ -0,0 +1,46 @@
+diff -ur xfig.3.2.5b/f_readeps.c xfig.3.2.5b.new/f_readeps.c
+--- xfig.3.2.5b/f_readeps.c 2009-03-30 17:52:18.000000000 +0200
++++ xfig.3.2.5b.new/f_readeps.c 2010-11-25 16:53:54.328247928 +0100
+@@ -252,12 +252,13 @@
+ {
+ char buf[300];
+ FILE *tmpfp, *pixfile, *gsfile;
+- char *psnam, *driver;
++ char *driver;
+ int status, wid, ht, nbitmap, fd;
+ char tmpfile[PATH_MAX],
+ pixnam[PATH_MAX],
+ errnam[PATH_MAX],
+- gscom[2 * PATH_MAX];
++ gscom[2 * PATH_MAX],
++ psnam[PATH_MAX];
+
+ wid = urx - llx;
+ ht = ury - lly;
+@@ -307,19 +308,14 @@
+ /* for color, use pcx */
+ driver = "pcx256";
+ }
+- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */
+- if (tmpfile[0] == '/') {
+- psnam = strrchr(tmpfile, '/');
+- *psnam = 0;
+- sprintf(gscom, "cd \"%s/\";", tmpfile);
+- *psnam++ = '/'; /* Restore name for unlink() below */
+- } else {
+- psnam = tmpfile;
+- gscom[0] = '\0';
++ /* Canonicalize the eps file filename, needed to "defeat" -dSAFER */
++ if (!realpath(tmpfile, psnam)) {
++ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
++ return False;
+ }
+- sprintf(&gscom[strlen(gscom)],
+- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1",
+- appres.ghostscript, driver, wid, ht, pixnam, errnam);
++ sprintf(gscom,
++ "%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1",
++ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
+ if (appres.DEBUG)
+ fprintf(stderr,"calling: %s\n",gscom);
+ if ((gsfile = popen(gscom, "w")) == 0) {
diff --git a/staging/xfig/xfig-3.2.5b-libpng-1.5.patch b/staging/xfig/xfig-3.2.5b-libpng-1.5.patch
new file mode 100644
index 000000000..7d9c3f15e
--- /dev/null
+++ b/staging/xfig/xfig-3.2.5b-libpng-1.5.patch
@@ -0,0 +1,70 @@
+Index: xfig.3.2.5b/f_readpng.c
+===================================================================
+--- xfig.3.2.5b.orig/f_readpng.c
++++ xfig.3.2.5b/f_readpng.c
+@@ -73,7 +73,7 @@ read_png(FILE *file, int filetype, F_pic
+ }
+
+ /* set long jump recovery here */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* if we get here there was a problem reading the file */
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ close_picfile(file,filetype);
+@@ -90,15 +90,17 @@ read_png(FILE *file, int filetype, F_pic
+ png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
+ &interlace_type, &compression_type, &filter_type);
+
+- if (info_ptr->valid & PNG_INFO_gAMA)
+- png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
+- else
+- png_set_gamma(png_ptr, 2.2, 0.45);
++ png_fixed_point gamma = 0.45;
++ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
++ png_set_gamma(png_ptr, 2.2, gamma);
+
+- if (info_ptr->valid & PNG_INFO_bKGD)
++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
+ /* set the background to the one supplied */
+- png_set_background(png_ptr, &info_ptr->background,
++ png_color_16p background;
++ png_get_bKGD(png_ptr,info_ptr,&background);
++ png_set_background(png_ptr, background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
++ }
+ else {
+ /* blend the canvas background using the alpha channel */
+ background.red = x_bg_color.red >> 8;
+@@ -136,7 +138,11 @@ read_png(FILE *file, int filetype, F_pic
+
+ if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) {
+ png_get_hIST(png_ptr, info_ptr, &histogram);
++#if PNG_LIBPNG_VER_MAJOR <= 1 && PNG_LIBPNG_VER_MINOR < 5
+ png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0);
++#else
++ png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0);
++#endif
+ }
+ }
+ if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+Index: xfig.3.2.5b/f_wrpng.c
+===================================================================
+--- xfig.3.2.5b.orig/f_wrpng.c
++++ xfig.3.2.5b/f_wrpng.c
+@@ -20,6 +20,7 @@
+ #include "w_msgpanel.h"
+ #include "w_setup.h"
+ #include <png.h>
++#include <zlib.h>
+
+ /*
+ * Write PNG file from rgb data
+@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat
+ }
+
+ /* set long jump recovery here */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* if we get here there was a problem reading the file */
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return False;
diff --git a/staging/xfig/xfig.3.2.5-modularX.patch b/staging/xfig/xfig.3.2.5-modularX.patch
new file mode 100644
index 000000000..3b5ac5937
--- /dev/null
+++ b/staging/xfig/xfig.3.2.5-modularX.patch
@@ -0,0 +1,28 @@
+--- xfig.3.2.5/Imakefile.modularX 2007-04-16 14:27:49.000000000 +0200
++++ xfig.3.2.5/Imakefile 2007-04-16 14:29:18.000000000 +0200
+@@ -45,7 +45,7 @@
+ XCOMM different tree than the "correct" tree that your X system expects. The usual
+ XCOMM purpose of DESTDIR is to test an install process by installing in a benign area.
+
+-XCOMM XAPPLOADDIR = /home/user/xfig
++XAPPLOADDIR = /usr/share/X11/app-defaults
+
+ XCOMM Uncomment the following definition for XAW3D if you want to use
+ XCOMM the 3d Athena Widget Set (highly recommended!)
+@@ -166,12 +166,12 @@
+ XCOMM XFIGLIBDIR = $(LIBDIR)
+
+ XCOMM use this if you want the multi-key data base file in the standard X11 tree
+-XFIGLIBDIR = $(LIBDIR)/xfig
++XFIGLIBDIR = /usr/share/xfig
+
+ XCOMM XFIGDOCDIR tells where the html and pdf documentation should go
+ XFIGDOCDIR = $(DOCDIR)/xfig
+
+ XCOMM MANDIR tells where the standard man pages should go (no need to change it
+ XCOMM if you want the man pages installed in the standard place on your system
+-MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
++MANDIR = /usr/share/man/man1
+ XCOMM MANDIR = /usr/local/xfig/man
+
+ XCOMM If your system doesn't have strstr undefine the following definition
diff --git a/staging/xfig/xfig.desktop b/staging/xfig/xfig.desktop
new file mode 100644
index 000000000..c634a28e9
--- /dev/null
+++ b/staging/xfig/xfig.desktop
@@ -0,0 +1,47 @@
+[Desktop Entry]
+Encoding=UTF-8
+Categories=Application;Graphics;
+MimeType=image/fig;image/x-xfig;
+Exec=xfig
+Icon=xfig
+Type=Application
+Name=Xfig
+Name[eo]=XDesegno
+Name[et]=Ffig
+Name[ja]=xfig
+Name[no]=X-figur
+Comment=Xfig drawing application
+Comment[bg]=Xfig ïðîãðàìà çà ðèñóâàíå
+Comment[ca]=Aplicació de dibuix Xfig
+Comment[cs]=Aplikace pro kreslení vektorových obrázků
+Comment[da]=Xfig tegneprogram
+Comment[de]=Xfig-Zeichenprogramm
+Comment[el]=Xfig
+Comment[eo]=Desegnilo "Xfig"
+Comment[es]=Aplicación de diseño vectorial (objetos)
+Comment[et]=XFig joonistusprogramm
+Comment[fi]=Xfig vektoripiirto-ohjelma
+Comment[fr]=Programme de dessin objet Xfig
+Comment[gl]=Aplicación de debuxo (obxectos)
+Comment[he]=Xfig רויצה םושיי
+Comment[hr]=Program za crtanje
+Comment[hu]=Rajzolóprogram
+Comment[is]=Hlutbundið teikniforrit
+Comment[it]=Applicazione di disegno Xfig
+Comment[lt]=Xfig braižymo programa
+Comment[mk]=Едноставна апликација за векторско цртање
+Comment[nl]=Xfig-tekenprogramma
+Comment[no]=Xfig-tegneprogram
+Comment[no_NY]=Teikneprogrammet Xfig
+Comment[pl]=Aplikacja do kreślenia
+Comment[pt]=Aplicação de desenho
+Comment[ro]=Program de desenare vectorială
+Comment[ru]=Приложения для рисования векторной графики
+Comment[sk]=Xfig aplikácia pre kreslenie vektorových obrázkov
+Comment[sl]=Program za risanje Xfig
+Comment[sr]=Xfig prgram za vektorsko crtanje
+Comment[sv]=Xfig ritprogram
+Comment[ta]=Xfig Ũþø ÀÂýÀ¡Î
+Comment[tr]=Xfig çizim uygulaması
+Comment[uk]=Xfig
+Comment[zh_CN.GB2312]=Xfig 绘图应用程序
diff --git a/staging/xfig/xfig.install b/staging/xfig/xfig.install
new file mode 100644
index 000000000..f01585f79
--- /dev/null
+++ b/staging/xfig/xfig.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+ }
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/staging/xine-ui/PKGBUILD b/staging/xine-ui/PKGBUILD
new file mode 100644
index 000000000..ac3016952
--- /dev/null
+++ b/staging/xine-ui/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 146917 2012-01-19 05:44:29Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=xine-ui
+pkgver=0.99.6
+pkgrel=5
+pkgdesc="A free video player for Unix"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.xine-project.org"
+depends=('xine-lib' 'curl' 'libpng' 'libxft' 'libxxf86vm'
+ 'xdg-utils' 'shared-mime-info' 'hicolor-icon-theme'
+ 'desktop-file-utils' 'lirc-utils')
+makedepends=('libxt')
+options=('!strip')
+install=xine-ui.install
+source=(http://downloads.sourceforge.net/xine/${pkgname}-${pkgver}.tar.xz
+ lirc-check-a89347673097.patch lirc-makefile-a68dd15ff7ae.patch
+ fix_lirc.diff xine-ui-xdg.diff xine-ui-0.99.6-libpng15.patch)
+sha1sums=('abbdb331898c14025ee6b132f63ab7d3c1b5b31e'
+ 'b2df43ede3a9d1a34b80139704a4cbbc7295c584'
+ '8bbd39f61de7b6991385457a4944b8ea104da88b'
+ '2361df9ddad59c426b0f863414c6d527b463a38a'
+ '9c70c6543dae6815710b239b4638ffe3843bac86'
+ 'bc7ec3153e61553dee8c0b6e04d1ca7cfe4a6f14')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 < "${srcdir}/lirc-check-a89347673097.patch"
+ patch -p1 < "${srcdir}/lirc-makefile-a68dd15ff7ae.patch"
+ patch -p1 < "${srcdir}/fix_lirc.diff"
+ patch -p1 < "${srcdir}/xine-ui-xdg.diff"
+ patch -p1 < "${srcdir}/xine-ui-0.99.6-libpng15.patch"
+ sed -i '/\#include <curl\/types.h>/d' src/xitk/download.c
+ autoconf
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --with-x --enable-lirc --without-aalib --enable-debug
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" desktopdir=/usr/share/applications install
+}
diff --git a/staging/xine-ui/fix_lirc.diff b/staging/xine-ui/fix_lirc.diff
new file mode 100644
index 000000000..93890cb5c
--- /dev/null
+++ b/staging/xine-ui/fix_lirc.diff
@@ -0,0 +1,13 @@
+diff --git a/m4/_xine.m4 b/m4/_xine.m4
+--- a/m4/_xine.m4
++++ b/m4/_xine.m4
+@@ -46,7 +46,8 @@ AC_DEFUN([AC_CHECK_LIRC],
+ fi
+ for llirc in $lirc_libprefix /lib /usr/lib /usr/local/lib; do
+ AC_CHECK_FILE(["$llirc/liblirc_client.so"],
+- [LIRC_LIBS="$llirc/liblirc_client.so"]
++ [LIRC_LIBS="$llirc/liblirc_client.so"
++ found_lirc=yes]
+ AC_DEFINE([HAVE_LIRC],,[Define this if you have LIRC (liblirc_client) installed]),
+ AC_CHECK_FILE(["$llirc/liblirc_client.a"],
+ [LIRC_LIBS="$llirc/liblirc_client.a"
diff --git a/staging/xine-ui/lirc-check-a89347673097.patch b/staging/xine-ui/lirc-check-a89347673097.patch
new file mode 100644
index 000000000..c1c8d2614
--- /dev/null
+++ b/staging/xine-ui/lirc-check-a89347673097.patch
@@ -0,0 +1,64 @@
+
+# HG changeset patch
+# User Darren Salt <linux@youmustbejoking.demon.co.uk>
+# Date 1268754560 0
+# Node ID a89347673097053d89675e991ab403cda04d94cd
+# Parent ed3079d668ed5291d1daf7096d6b42c90ee06e11
+Resync LIRC check with gxine; no longer fails if liblircclient0.pc is missing.
+
+--- a/m4/_xine.m4 Sun Mar 14 18:04:46 2010 +0000
++++ b/m4/_xine.m4 Tue Mar 16 15:49:20 2010 +0000
+@@ -25,14 +25,14 @@
+ dnl
+ AC_DEFUN([AC_CHECK_LIRC],
+ [AC_ARG_ENABLE(lirc,
+- [ --disable-lirc Turn off LIRC support.],
+- [], enable_lirc=yes)
++ [AS_HELP_STRING([--disable-lirc], [turn off LIRC support])],
++ [given=Y], [given=N; enable_lirc=yes])
+
+ found_lirc=no
+ if test x"$enable_lirc" = xyes; then
+ have_lirc=yes
+- PKG_CHECK_MODULES(LIRC, liblircclient0, [found_lirc=yes], [])
+- if test "$LIRC_CFLAGS" != ''; then
++ PKG_CHECK_MODULES(LIRC, liblircclient0, [found_lirc=yes], [:])
++ if test "$found_lirc" = yes; then
+ LIRC_INCLUDE="$LIRC_CFLAGS"
+ else
+ AC_REQUIRE_CPP
+@@ -42,15 +42,20 @@
+
+ if test x"$LIRC_PREFIX" != "x"; then
+ lirc_libprefix="$LIRC_PREFIX/lib"
+- LIRC_INCLUDE="-I$LIRC_PREFIX/include"
++ LIRC_INCLUDE="-I$LIRC_PREFIX/include"
+ fi
+ for llirc in $lirc_libprefix /lib /usr/lib /usr/local/lib; do
+- AC_CHECK_FILE(["$llirc/liblirc_client.a"],
+- [LIRC_LIBS="$llirc/liblirc_client.a"
+- found_lirc=yes],,)
++ AC_CHECK_FILE(["$llirc/liblirc_client.so"],
++ [LIRC_LIBS="$llirc/liblirc_client.so"]
++ AC_DEFINE([HAVE_LIRC],,[Define this if you have LIRC (liblirc_client) installed]),
++ AC_CHECK_FILE(["$llirc/liblirc_client.a"],
++ [LIRC_LIBS="$llirc/liblirc_client.a"
++ found_lirc=yes],,)
++ )
+ done
+ else
+- AC_MSG_RESULT([*** LIRC client support not available, LIRC support will be disabled ***]);
++ test $given = Y && AC_MSG_ERROR([LIRC client support requested but not available])
++ AC_MSG_RESULT([*** LIRC client support not available, LIRC support will be disabled ***])
+ fi
+ fi
+ fi
+@@ -59,7 +64,6 @@
+ fi
+ AC_SUBST(LIRC_LIBS)
+ AC_SUBST(LIRC_INCLUDE)
+- AM_CONDITIONAL([HAVE_LIRC], [test "x$have_lirc" = "xyes"])
+ ])
+
+ dnl AC_C_ATTRIBUTE_ALIGNED
+
diff --git a/staging/xine-ui/lirc-makefile-a68dd15ff7ae.patch b/staging/xine-ui/lirc-makefile-a68dd15ff7ae.patch
new file mode 100644
index 000000000..daad4f03a
--- /dev/null
+++ b/staging/xine-ui/lirc-makefile-a68dd15ff7ae.patch
@@ -0,0 +1,19 @@
+
+# HG changeset patch
+# User Darren Salt <linux@youmustbejoking.demon.co.uk>
+# Date 1268758696 0
+# Node ID a68dd15ff7ae4be65c2ace25ef66966d7c272514
+# Parent 882c464d4a650d09da37ade366face74452c1897
+Restore definition of HAVE_LIRC for use in makefiles.
+
+--- a/m4/_xine.m4 Mon Mar 15 12:03:01 2010 -0700
++++ b/m4/_xine.m4 Tue Mar 16 16:58:16 2010 +0000
+@@ -62,6 +62,7 @@
+ if test "$found_lirc" = yes; then
+ AC_DEFINE([HAVE_LIRC],,[Define this if you have LIRC (liblirc_client) installed])
+ fi
++ AM_CONDITIONAL([HAVE_LIRC], [test "$found_lirc" = yes])
+ AC_SUBST(LIRC_LIBS)
+ AC_SUBST(LIRC_INCLUDE)
+ ])
+
diff --git a/staging/xine-ui/xine-ui-0.99.6-libpng15.patch b/staging/xine-ui/xine-ui-0.99.6-libpng15.patch
new file mode 100644
index 000000000..6a5fb5522
--- /dev/null
+++ b/staging/xine-ui/xine-ui-0.99.6-libpng15.patch
@@ -0,0 +1,13 @@
+Index: xine-ui-0.99.6/src/xitk/Imlib-light/load.c
+===================================================================
+--- xine-ui-0.99.6.orig/src/xitk/Imlib-light/load.c
++++ xine-ui-0.99.6/src/xitk/Imlib-light/load.c
+@@ -61,7 +61,7 @@ unsigned char *_LoadPNG(ImlibData * id,
+ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return NULL;
+ }
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ return NULL;
diff --git a/staging/xine-ui/xine-ui-xdg.diff b/staging/xine-ui/xine-ui-xdg.diff
new file mode 100644
index 000000000..959d674b2
--- /dev/null
+++ b/staging/xine-ui/xine-ui-xdg.diff
@@ -0,0 +1,206 @@
+--- xine-ui-0.99.6.orig/src/xitk/common.h
++++ xine-ui-0.99.6/src/xitk/common.h
+@@ -331,6 +331,5 @@ typedef struct {
+ int use_root_window;
+
+ int ssaver_enabled;
+- int ssaver_timeout;
+
+ int skip_by_chapter;
+--- xine-ui-0.99.6.orig/src/xitk/main.c
++++ xine-ui-0.99.6/src/xitk/main.c
+@@ -1383,6 +1383,8 @@ int main(int argc, char *argv[]) {
+ if (sigprocmask (SIG_BLOCK, &vo_mask, NULL))
+ fprintf (stderr, "sigprocmask() failed.\n");
+
++ signal(SIGCHLD, SIG_IGN);
++
+ gGui = (gGui_t *) calloc(1, sizeof(gGui_t));
+
+ gGui->stream = NULL;
+--- xine-ui-0.99.6.orig/src/xitk/panel.c
++++ xine-ui-0.99.6/src/xitk/panel.c
+@@ -356,7 +356,6 @@ void panel_update_runtime_display(void)
+ * Update slider thread.
+ */
+ static void *slider_loop(void *dummy) {
+- int screensaver_timer = 0;
+ int status, speed;
+ int pos, secs;
+ int i = 0;
+@@ -441,20 +440,7 @@ static void *slider_loop(void *dummy) {
+ else
+ video_window_set_mrl((char *)gGui->mmk.mrl);
+
+- if(!xitk_is_window_iconified(gGui->video_display, gGui->video_window)) {
+-
+- if(gGui->ssaver_timeout) {
+-
+- if(!(i % 2))
+- screensaver_timer++;
+-
+- if(screensaver_timer >= gGui->ssaver_timeout) {
+- screensaver_timer = 0;
+- video_window_reset_ssaver();
+-
+- }
+- }
+- }
++ video_window_suspend_ssaver(!xitk_is_window_iconified(gGui->video_display, gGui->video_window));
+
+ if(gGui->logo_mode == 0) {
+
+@@ -494,6 +480,8 @@ static void *slider_loop(void *dummy) {
+ stream_infos_update_infos();
+
+ }
++ } else {
++ video_window_suspend_ssaver(0);
+ }
+ }
+
+--- xine-ui-0.99.6.orig/src/xitk/videowin.c
++++ xine-ui-0.99.6/src/xitk/videowin.c
+@@ -1087,6 +1087,9 @@ static void video_window_adapt_size (voi
+
+ /* The old window should be destroyed now */
+ if(old_video_window != None) {
++ /* Screensaver control is tied to our window id */
++ video_window_suspend_ssaver(0);
++
+ XDestroyWindow(gGui->video_display, old_video_window);
+
+ if(gGui->cursor_grabbed)
+@@ -2261,69 +2264,34 @@ static void video_window_handle_event (X
+
+ }
+
+-void video_window_reset_ssaver(void) {
++void video_window_suspend_ssaver(int do_suspend) {
++ static int was_suspended;
+
+- if(gGui->ssaver_enabled && (xitk_get_last_keypressed_time() >= (long int) gGui->ssaver_timeout)) {
++ do_suspend = do_suspend && gGui->ssaver_enabled;
+
+-#ifdef HAVE_XTESTEXTENSION
+- if(gVw.have_xtest == True) {
+-
+- gVw.fake_key_cur++;
+-
+- if(gVw.fake_key_cur >= 2)
+- gVw.fake_key_cur = 0;
+-
+- XLockDisplay(gGui->video_display);
+- XTestFakeKeyEvent(gGui->video_display, gVw.fake_keys[gVw.fake_key_cur], True, CurrentTime);
+- XTestFakeKeyEvent(gGui->video_display, gVw.fake_keys[gVw.fake_key_cur], False, CurrentTime);
+- XSync(gGui->video_display, False);
+- XUnlockDisplay(gGui->video_display);
++ if(was_suspended != do_suspend) {
++ if(fork() == 0) {
++ char window_id[30];
++ char *args[] = { "xdg-screensaver", NULL, window_id, NULL };
++ int fd;
++
++ for(fd = 3; fd < 256; fd++)
++ close(fd);
++
++ args[1] = do_suspend ? "suspend" : "resume";
++ sprintf(window_id, "%lu", (unsigned long)gGui->video_window);
++ execvp(args[0], args);
++ _exit(0);
+ }
+- else
+-#endif
+- {
+- /* Reset the gnome screensaver. Look up the command in PATH only once to save time, */
+- /* assuming its location and permission will not change during run time of xine-ui. */
+- {
+- static char *const gssaver_args[] = { "gnome-screensaver-command", "--poke", NULL };
+- static char *gssaver_path = NULL;
+-
+- if(!gssaver_path) {
+- char *path = getenv("PATH");
+-
+- if(!path)
+- path = "/usr/local/bin:/usr/bin";
+- do {
+- char *p, *pbuf;
+- int plen;
+-
+- for(p = path; *path && *path != ':'; path++)
+- ;
+- if(p == path)
+- plen = 1, p = ".";
+- else
+- plen = path - p;
+- asprintf(&pbuf, "%.*s/%s", plen, p, gssaver_args[0]);
+- if ( access(pbuf, X_OK) ) {
+- free(pbuf);
+- gssaver_path = "";
+- } else
+- gssaver_path = pbuf;
+- } while(!gssaver_path[0] && *path++);
+- }
+- if(gssaver_path[0] && (fork() == 0)) {
+- execv(gssaver_path, gssaver_args);
+- exit(0);
+- }
+- }
+
+- XLockDisplay(gGui->video_display);
+- XResetScreenSaver(gGui->video_display);
+- XUnlockDisplay(gGui->video_display);
+- }
++ was_suspended = do_suspend;
+ }
+ }
+
++void video_window_reset_ssaver(void) {
++ video_window_suspend_ssaver(1);
++}
++
+ void video_window_get_frame_size(int *w, int *h) {
+ if(w)
+ *w = gVw.frame_width;
+--- xine-ui-0.99.6.orig/src/xitk/videowin.h
++++ xine-ui-0.99.6/src/xitk/videowin.h
+@@ -81,6 +81,7 @@ void video_window_get_mag (float *xmag,
+ void video_window_update_logo(void);
+ void video_window_change_skins(int);
+
++void video_window_suspend_ssaver(int do_suspend);
+ void video_window_reset_ssaver(void);
+
+ void video_window_get_frame_size(int *w, int *h);
+--- xine-ui-0.99.6.orig/src/xitk/event.c
++++ xine-ui-0.99.6/src/xitk/event.c
+@@ -135,9 +135,6 @@ static void skip_by_chapter_cb(void *dat
+ gGui->skip_by_chapter = cfg->num_value;
+ panel_update_nextprev_tips();
+ }
+-static void ssaver_timeout_cb(void *data, xine_cfg_entry_t *cfg) {
+- gGui->ssaver_timeout = cfg->num_value;
+-}
+
+ static void visual_anim_cb(void *data, xine_cfg_entry_t *cfg) {
+
+@@ -1614,14 +1611,6 @@ void gui_init (int nfiles, char *filenam
+ snapshot_loc_cb,
+ CONFIG_NO_DATA);
+
+- gGui->ssaver_timeout =
+- xine_config_register_num (__xineui_global_xine_instance, "gui.screensaver_timeout", 10,
+- _("Screensaver reset interval (s)"),
+- _("Time, in seconds, between two faked events to keep a screensaver quiet, 0 to disable."),
+- CONFIG_LEVEL_ADV,
+- ssaver_timeout_cb,
+- CONFIG_NO_DATA);
+-
+ gGui->skip_by_chapter =
+ xine_config_register_bool (__xineui_global_xine_instance, "gui.skip_by_chapter", 1,
+ _("Chapter hopping"),
+
+
+
+
+
diff --git a/staging/xine-ui/xine-ui.install b/staging/xine-ui/xine-ui.install
new file mode 100644
index 000000000..3b3aff7d9
--- /dev/null
+++ b/staging/xine-ui/xine-ui.install
@@ -0,0 +1,13 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/zvbi/PKGBUILD b/staging/zvbi/PKGBUILD
new file mode 100644
index 000000000..442df8b76
--- /dev/null
+++ b/staging/zvbi/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 146940 2012-01-19 13:11:45Z giovanni $
+# Maintainer:
+# Contributor: Alexander Baldeck <alexander@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+
+pkgname=zvbi
+pkgver=0.2.33
+pkgrel=4
+pkgdesc="VBI capture and decoding library"
+url="http://zapping.sourceforge.net/cgi-bin/view/ZVBI/WebHome"
+arch=('i686' 'x86_64')
+depends=('libpng' 'libx11')
+license=('GPL')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/sourceforge/zapping/${pkgname}-${pkgver}.tar.bz2"
+ 'fix-includes.patch'
+ 'zvbi-0.2.33-libpng15.patch')
+md5sums=('1741a6045c3eedfb611d645f2da69ac8'
+ '38766bc59e1571133d0399f0102da653'
+ '4434de7addc438be8c5a33274146bd11')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/fix-includes.patch"
+ patch -Np0 -i "${srcdir}/zvbi-0.2.33-libpng15.patch"
+
+ ./configure --prefix=/usr \
+ --disable-static \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/zvbi/fix-includes.patch b/staging/zvbi/fix-includes.patch
new file mode 100644
index 000000000..28252649e
--- /dev/null
+++ b/staging/zvbi/fix-includes.patch
@@ -0,0 +1,36 @@
+Add proper #includes so that we do not get undef errors to S_ISCHR
+during linking.
+
+Signed-off-by: Alex Chiang <achiang@canonical.com>
+---
+--- zvbi-0.2.33.orig/src/io-dvb.c
++++ zvbi-0.2.33/src/io-dvb.c
+@@ -29,6 +29,8 @@
+ #include <errno.h>
+ #include <sys/select.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+
+ #ifndef HAVE_S64_U64
+ /* Linux 2.6.x asm/types.h defines __s64 and __u64 only
+--- zvbi-0.2.33.orig/src/io-v4l.c
++++ zvbi-0.2.33/src/io-v4l.c
+@@ -42,6 +42,7 @@ static const char rcsid [] =
+ #include <assert.h>
+ #include <sys/time.h> /* timeval */
+ #include <sys/types.h> /* fd_set, uid_t */
++#include <sys/stat.h> /* S_ISCHR */
+ #include <sys/ioctl.h> /* for (_)videodev.h */
+ #include <pthread.h>
+
+--- zvbi-0.2.33.orig/contrib/ntsc-cc.c
++++ zvbi-0.2.33/contrib/ntsc-cc.c
+@@ -34,6 +34,7 @@
+ #include <locale.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/time.h>
+ #ifdef HAVE_GETOPT_LONG
+ # include <getopt.h>
diff --git a/staging/zvbi/zvbi-0.2.33-libpng15.patch b/staging/zvbi/zvbi-0.2.33-libpng15.patch
new file mode 100644
index 000000000..262677376
--- /dev/null
+++ b/staging/zvbi/zvbi-0.2.33-libpng15.patch
@@ -0,0 +1,21 @@
+Index: src/exp-gfx.c
+===================================================================
+RCS file: /cvsroot/zapping/vbi/src/exp-gfx.c,v
+retrieving revision 1.16
+diff -u -B -r1.16 exp-gfx.c
+--- src/exp-gfx.c 24 Feb 2008 14:17:47 -0000 1.16
++++ src/exp-gfx.c 15 Feb 2011 20:03:58 -0000
+@@ -1672,11 +1672,11 @@
+ char title[80];
+ unsigned int i;
+
+- if (setjmp (png_ptr->jmpbuf))
++ if (setjmp (png_jmpbuf(png_ptr)))
+ return FALSE;
+
+ png_set_write_fn (png_ptr,
+- (voidp) gfx,
++ (png_voidp) gfx,
+ write_data,
+ flush_data);
+