summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-01-22 23:15:13 +0000
committerroot <root@rshg054.dnsready.net>2012-01-22 23:15:13 +0000
commit164067832916c8e59219e1b0f30d7d04618a536e (patch)
tree5ec718dc77dfccfcdb1409707658bef3fb421ac4
parenta1922d0ec660fdc1892f2783515f781c090df0a9 (diff)
Sun Jan 22 23:15:13 UTC 2012
-rw-r--r--community-staging/blender/PKGBUILD102
-rw-r--r--community-staging/blender/blender.install13
-rw-r--r--community-staging/gambas2/PKGBUILD950
-rw-r--r--community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch35
-rw-r--r--community-staging/gambas2/fix-gbi-gba-path.patch24
-rw-r--r--community-staging/gambas2/gambas2-runtime.install12
-rw-r--r--community-staging/gambas2/gambas2-script.install15
-rw-r--r--community-staging/gambas2/gambas2.install12
-rw-r--r--community-staging/gambas2/poppler-0.18.patch40
-rw-r--r--community-staging/gambas3/PKGBUILD1104
-rw-r--r--community-staging/gambas3/gambas3-runtime.install10
-rw-r--r--community-staging/gambas3/gambas3-script.install15
-rw-r--r--community-staging/gimp-plugin-wavelet-decompose/PKGBUILD26
-rw-r--r--community-staging/gimp-plugin-wavelet-decompose/po_install.diff21
-rw-r--r--community-staging/gnubiff-gtk/PKGBUILD31
-rw-r--r--community-staging/gnubiff-gtk/build.patch23
-rw-r--r--community-staging/gpsim/PKGBUILD23
-rw-r--r--community-staging/grace/PKGBUILD33
-rw-r--r--community-staging/gtk-chtheme/PKGBUILD29
-rw-r--r--community-staging/gtk-engine-murrine/PKGBUILD33
-rw-r--r--community-staging/irrlicht/PKGBUILD94
-rw-r--r--community-staging/irrlicht/irrlicht-1.7.2-libpng15.patch40
-rw-r--r--community-staging/megaglest/PKGBUILD37
-rw-r--r--community-staging/megaglest/megaglest.sh26
-rw-r--r--community-staging/naev/PKGBUILD30
-rw-r--r--community-staging/openimageio/PKGBUILD50
-rw-r--r--community-staging/openimageio/openimageio-0.10.2-libpng15.patch11
-rw-r--r--community-staging/perl-gnome2-wnck/PKGBUILD28
-rw-r--r--community-staging/perl-gtk2-sexy/PKGBUILD30
-rw-r--r--community-staging/perl-gtk2-trayicon/PKGBUILD29
-rw-r--r--community-staging/perl-gtk2-webkit/PKGBUILD28
-rw-r--r--community-staging/png2ico/PKGBUILD26
-rw-r--r--community-staging/pyqt3/PKGBUILD29
-rw-r--r--community-staging/python-galago-gtk/PKGBUILD22
-rw-r--r--community-staging/qcad/PKGBUILD53
-rw-r--r--community-staging/qcad/QCad.desktop9
-rw-r--r--community-staging/qcad/qcad-intptr.patch24
-rw-r--r--community-staging/qcad/qcad.patch52
-rw-r--r--community-staging/qcad/qcad.xpm132
-rw-r--r--community-staging/remmina-plugins/PKGBUILD29
-rw-r--r--community-staging/remmina-plugins/remmina-plugins.install11
-rw-r--r--community-staging/scorched3d/PKGBUILD64
-rw-r--r--community-staging/scorched3d/libpng14.patch38
-rw-r--r--community-staging/scorched3d/scorched3d-42.1-fixups.patch58
-rw-r--r--community-staging/scorched3d/scorched3d-42.1-gcc43.patch24
-rw-r--r--community-staging/scorched3d/scorched3d-libpng1.5.patch74
-rw-r--r--community-staging/scorched3d/scorched3d.desktop17
-rw-r--r--community-staging/scorched3d/scorched3d.install11
-rw-r--r--community-staging/scorched3d/scorched3d.png.uu105
-rw-r--r--community-staging/scummvm-tools/PKGBUILD34
-rw-r--r--community-staging/silly/PKGBUILD26
-rw-r--r--community-staging/silly/silly-libpng1.5.patch14
-rw-r--r--community-staging/speed-dreams/PKGBUILD61
-rw-r--r--community-staging/speed-dreams/speed-dreams.desktop9
-rw-r--r--community-staging/synfig/PKGBUILD37
-rw-r--r--community-staging/synfig/build-fix.patch31
-rw-r--r--community-staging/synfig/ffmpeg-0.8.patch60
-rw-r--r--community-staging/torcs/PKGBUILD36
-rw-r--r--community-staging/torcs/torcs-gcc.patch74
-rw-r--r--community-staging/torcs/torcs.desktop9
-rw-r--r--community-staging/torcs/torcs.sh2
-rw-r--r--community-staging/tvtime/PKGBUILD34
-rw-r--r--community-staging/tvtime/tvtime-1.0.2+linux-headers-2.6.18.patch16
-rw-r--r--community-staging/tvtime/tvtime-1.0.2-gcc41.patch57
-rw-r--r--community-staging/tvtime/tvtime-1.0.2-locale_t.patchbin0 -> 887 bytes
-rw-r--r--community-staging/virtviewer/PKGBUILD23
-rw-r--r--community-staging/w3cam/PKGBUILD32
-rw-r--r--community-staging/widelands/PKGBUILD55
-rw-r--r--community-staging/widelands/widelands-0.16-libpng15.patch61
-rw-r--r--community-staging/widelands/widelands-build15-gcc-4.5-patch51
-rw-r--r--community-staging/widelands/widelands.desktop8
-rw-r--r--community-staging/widelands/widelands.pngbin0 -> 19494 bytes
-rw-r--r--community-staging/widelands/widelands.sh3
-rw-r--r--community/bird/PKGBUILD6
-rw-r--r--community/calibre/PKGBUILD6
-rw-r--r--community/dos2unix/PKGBUILD27
-rw-r--r--community/freemat/PKGBUILD51
-rw-r--r--community/freemat/build-fix.patch11
-rw-r--r--community/freemat/freemat.install4
-rw-r--r--community/haveged/PKGBUILD31
-rw-r--r--community/haveged/haveged44
-rw-r--r--community/i7z/PKGBUILD32
-rw-r--r--community/libbsd/LICENSE28
-rw-r--r--community/libbsd/PKGBUILD30
-rw-r--r--community/libircclient/PKGBUILD45
-rw-r--r--community/nodejs/PKGBUILD10
-rw-r--r--community/opensc/PKGBUILD42
-rw-r--r--community/par2cmdline/PKGBUILD34
-rw-r--r--community/pidgin-gfire/PKGBUILD27
-rw-r--r--community/pidgin-gfire/gfire-libnotify.patch21
-rw-r--r--community/python-memcached/PKGBUILD12
-rw-r--r--community/python-mpi4py/PKGBUILD8
-rw-r--r--community/roxterm/PKGBUILD8
-rw-r--r--community/snort/PKGBUILD8
-rw-r--r--core/kmod/PKGBUILD56
-rw-r--r--core/kmod/depmod-search.conf5
-rw-r--r--core/sqlite3/PKGBUILD11
-rw-r--r--core/udev/0001-udevd-kill-hanging-event-processes-after-30-seconds.patch162
-rw-r--r--core/udev/PKGBUILD100
-rw-r--r--core/udev/udev.install31
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD45
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD92
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD70
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD63
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD210
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch20
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-bz4781.patch42
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-dont-build-timezone.patch13
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.12.2-ignore-origin-of-privileged-program.patch26
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-libdl-crash.patch132
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reexport-rpc-interface.patch26
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reinstall-nis-rpc-headers.patch28
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-revert-4768ae77.patch37
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-lddebug-scopes.patch27
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-math64crash.patch184
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-revert-c5a0802a.patch229
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-__i686.patch13
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc.install20
-rwxr-xr-xcross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen42
-rw-r--r--cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale.gen.txt23
-rwxr-xr-xcross/cross-mips64el-unknown-linux-gnu-glibc-headers/nscd40
-rw-r--r--cross/cross-mipsel-unknown-linux-gnu-binutils/PKGBUILD51
-rw-r--r--cross/cross-mipsel-unknown-linux-gnu-gcc/PKGBUILD54
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD289
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-bz4781.patch42
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-dont-build-timezone.patch13
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch26
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-libdl-crash.patch132
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reexport-rpc-interface.patch26
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reinstall-nis-rpc-headers.patch28
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-revert-4768ae77.patch37
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-lddebug-scopes.patch27
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-math64crash.patch184
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-revert-c5a0802a.patch229
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch13
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/glibc.install20
-rwxr-xr-xcross/mips64el-unknown-linux-gnu-glibc/locale-gen42
-rw-r--r--cross/mips64el-unknown-linux-gnu-glibc/locale.gen.txt23
-rwxr-xr-xcross/mips64el-unknown-linux-gnu-glibc/nscd40
-rw-r--r--cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD36
-rw-r--r--extra/audacious/PKGBUILD8
-rw-r--r--extra/clutter-gtk2/PKGBUILD11
-rw-r--r--extra/clutter-gtk2/libm.patch39
-rw-r--r--extra/gnome-shell/PKGBUILD14
-rw-r--r--extra/gnutls/PKGBUILD8
-rw-r--r--extra/iptraf-ng/PKGBUILD20
-rw-r--r--extra/pixman/PKGBUILD6
-rw-r--r--extra/rxvt-unicode/ChangeLog3
-rw-r--r--extra/rxvt-unicode/PKGBUILD8
-rw-r--r--extra/scribus/PKGBUILD12
-rw-r--r--extra/sdl_image/PKGBUILD6
-rw-r--r--libre/kdenetwork-libre/PKGBUILD126
-rw-r--r--libre/kdenetwork-libre/kdenetwork.install11
-rw-r--r--libre/kdeutils-libre/PKGBUILD33
-rw-r--r--libre/kdeutils-libre/rePKGBUILD21
-rw-r--r--libre/linux-libre/Kbuild19
-rw-r--r--libre/linux-libre/Kbuild.platforms6
-rw-r--r--libre/linux-libre/PKGBUILD113
-rw-r--r--libre/linux-libre/config.i68620
-rw-r--r--libre/linux-libre/config.x86_6418
-rw-r--r--libre/linux-libre/i915-gpu-finish.patch55
-rw-r--r--libre/linux-libre/linux-libre.install7
-rw-r--r--libre/mozilla-devscripts/PKGBUILD31
-rw-r--r--libre/texlive-bin-libre/PKGBUILD64
-rw-r--r--libre/texlive-bin-libre/texmf.cnf74
-rw-r--r--libre/texlive-core-libre/PKGBUILD11
-rw-r--r--libre/texlive-fontsextra-libre/PKGBUILD6
-rw-r--r--libre/texlive-fontsextra-libre/texlive-fontsextra.maps10
-rw-r--r--libre/texlive-latexextra-libre/PKGBUILD4
-rw-r--r--libre/xmlstarlet/PKGBUILD29
-rw-r--r--libre/your-freedom/PKGBUILD13
-rw-r--r--mozilla-testing/icecat-i18n/PKGBUILD3
-rw-r--r--mozilla-testing/icecat/PKGBUILD79
-rw-r--r--mozilla-testing/icecat/mozconfig9
-rw-r--r--mozilla-testing/icecat/mozconfig.pgo4
-rw-r--r--mozilla-testing/iceweasel-i18n/Makefile2
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD17
-rw-r--r--mozilla-testing/iceweasel-i18n/PKGBUILD.in2
-rw-r--r--mozilla-testing/iceweasel-libre/PKGBUILD30
-rw-r--r--multilib-staging/wine/PKGBUILD147
-rw-r--r--multilib-staging/wine/wine.install12
-rw-r--r--multilib/lib32-gmp/538dfce27f41.patch38
-rw-r--r--multilib/lib32-gmp/PKGBUILD50
-rw-r--r--multilib/lib32-gnutls/PKGBUILD42
-rw-r--r--multilib/lib32-libidn/PKGBUILD26
-rw-r--r--multilib/lib32-libxcb/PKGBUILD13
-rw-r--r--multilib/lib32-nettle/PKGBUILD47
-rw-r--r--multilib/lib32-openssl/PKGBUILD6
-rw-r--r--multilib/lib32-p11-kit/PKGBUILD36
-rw-r--r--multilib/lib32-sqlite3/PKGBUILD6
-rw-r--r--social/diaspora-git/PKGBUILD156
-rw-r--r--social/diaspora-git/diaspora.bashrc6
-rw-r--r--social/diaspora-git/diaspora.bin13
-rw-r--r--social/diaspora-git/diaspora.rc4
-rw-r--r--staging/djvulibre/PKGBUILD41
-rw-r--r--staging/djvulibre/djvulibre.install13
-rw-r--r--staging/djvulibre/git-fixes.patch1607
-rw-r--r--staging/emacs/PKGBUILD48
-rw-r--r--staging/emacs/emacs-subversion17.patch83
-rw-r--r--staging/emacs/emacs.install32
-rw-r--r--staging/gimp-dbp/PKGBUILD25
-rw-r--r--staging/gimp-devel/PKGBUILD54
-rw-r--r--staging/gimp-devel/gimp-devel.install12
-rw-r--r--staging/gimp-devel/linux.gpl19
-rw-r--r--staging/gimp-ufraw/PKGBUILD34
-rw-r--r--staging/gimp-ufraw/gimp-ufraw.install11
-rw-r--r--staging/gimp/PKGBUILD53
-rw-r--r--staging/gimp/gimp-poppler-0.18.patch476
-rw-r--r--staging/gimp/gimp.install12
-rw-r--r--staging/gimp/libpng_compile.patch984
-rw-r--r--staging/gimp/linux.gpl19
-rw-r--r--staging/gimp/uri-backend-libcurl.patch77
-rw-r--r--staging/gthumb/PKGBUILD34
-rw-r--r--staging/gthumb/gthumb.install24
-rw-r--r--staging/java7-openjdk/PKGBUILD346
-rw-r--r--staging/java7-openjdk/fix_corba_cmds_path.diff33
-rw-r--r--staging/java7-openjdk/fontconfig-paths.diff134
-rw-r--r--staging/java7-openjdk/glibc2_15.diff232
-rw-r--r--staging/java7-openjdk/jdk7-openjdk.profile6
-rw-r--r--staging/java7-openjdk/jdk7-openjdk.profile.csh1
-rw-r--r--staging/java7-openjdk/jre7-openjdk-headless.install15
-rw-r--r--staging/java7-openjdk/jre7-openjdk.install18
-rw-r--r--staging/java7-openjdk/jre7-openjdk.profile5
-rw-r--r--staging/java7-openjdk/jre7-openjdk.profile.csh5
-rw-r--r--staging/java7-openjdk/openjdk7_fix_jdk_cmds_path.diff24
-rw-r--r--staging/java7-openjdk/openjdk7_nonreparenting-wm.diff58
-rw-r--r--staging/libreoffice/PKGBUILD68
-rw-r--r--staging/libreoffice/PKGBUILD.next_stable35
-rw-r--r--staging/libwebkit/PKGBUILD52
-rw-r--r--staging/libwebkit/libwebkit.install11
-rw-r--r--staging/netpbm/PKGBUILD72
-rw-r--r--staging/netpbm/netpbm-CAN-2005-2471.patch16
-rw-r--r--staging/netpbm/netpbm-security-code.patch1668
-rw-r--r--staging/netpbm/netpbm-security-scripts.patch393
-rw-r--r--staging/nx-common/NXproto.h.64bit.diff66
-rw-r--r--staging/nx-common/PKGBUILD59
-rw-r--r--staging/nx-common/nx-3.5.0-libpng15.patch30
-rw-r--r--staging/nx-common/nxcompsh-gcc43.patch19
-rw-r--r--staging/nxserver/NXproto.h.64bit.diff66
-rw-r--r--staging/nxserver/PKGBUILD95
-rw-r--r--staging/nxserver/nx-3.5.0-libpng15.patch30
-rw-r--r--staging/nxserver/nxcompsh-gcc43.patch19
-rw-r--r--staging/opencv/PKGBUILD119
-rw-r--r--staging/openjdk6/PKGBUILD183
-rw-r--r--staging/openjdk6/fix_corba_cmds_path.diff33
-rw-r--r--staging/openjdk6/fix_jdk_cmds_path.diff33
-rw-r--r--staging/openjdk6/fontconfig-paths.diff134
-rw-r--r--staging/openjdk6/glibc2_15.diff236
-rw-r--r--staging/openjdk6/nonreparenting-wm.diff60
-rw-r--r--staging/openjdk6/openjdk6.install24
-rw-r--r--staging/openjdk6/openjdk6.profile6
-rw-r--r--staging/openjdk6/openjdk6.profile.csh6
-rw-r--r--staging/perl-tk/PKGBUILD41
-rw-r--r--staging/poppler/PKGBUILD83
-rw-r--r--staging/poppler/git-fixes.patch110
-rw-r--r--staging/qiv/PKGBUILD25
-rw-r--r--staging/streamtuner/PKGBUILD49
-rw-r--r--staging/streamtuner/shoutcast-redesign-patch.diff12
-rw-r--r--staging/streamtuner/streamtuner-0.99.99-shoutcast.diff41
-rw-r--r--staging/transcode/PKGBUILD57
-rw-r--r--staging/transcode/subtitleripper-0.3.4-linkingorder.patch28
-rw-r--r--staging/transcode/subtitleripper-0.3.4-respect-ldflags.patch28
-rw-r--r--staging/tuxpuck/PKGBUILD41
-rw-r--r--staging/tuxpuck/tuxpuck-0.8.2-ldflags.patch11
-rw-r--r--staging/tuxpuck/tuxpuck-0.8.2-libpng15.patch63
-rw-r--r--staging/vigra/PKGBUILD69
-rw-r--r--staging/vigra/vigra-1.7.1.gcc460.patch33
-rw-r--r--testing/freeglut/PKGBUILD31
-rw-r--r--testing/iproute2/PKGBUILD14
-rw-r--r--testing/iproute2/fix-ip-l.patch27
-rw-r--r--testing/mdadm/PKGBUILD53
-rw-r--r--testing/mdadm/disable-werror.patch11
-rw-r--r--testing/mdadm/linux-3.0.patch45
-rwxr-xr-xtesting/mdadm/mdadm37
-rw-r--r--testing/mdadm/mdadm.conf67
-rw-r--r--testing/mdadm/mdadm.install10
-rwxr-xr-xtesting/mdadm/mdadm_hook44
-rw-r--r--testing/mdadm/mdadm_install45
-rw-r--r--testing/mdadm/mdadm_udev_install23
-rw-r--r--testing/perl-alien-sdl/PKGBUILD31
-rw-r--r--testing/udev/PKGBUILD16
-rw-r--r--x86_64/blender/PKGBUILD102
-rw-r--r--x86_64/blender/blender.install13
-rw-r--r--~fauno/mips64el-unknown-linux-gnu-binutils/PKGBUILD62
-rw-r--r--~fauno/mips64el-unknown-linux-gnu-gcc-base/PKGBUILD58
-rw-r--r--~fauno/notmuch/PKGBUILD20
-rw-r--r--~fauno/vala-notmuch/PKGBUILD31
-rw-r--r--~fauno/vala-notmuch/SRCBUILD39
-rw-r--r--~fauno/vala-notmuch/vala-notmuch.install6
-rw-r--r--~lukeshu/cntlm/PKGBUILD24
-rw-r--r--~lukeshu/emacs24/PKGBUILD5
-rw-r--r--~lukeshu/git-svn-abandon-git/PKGBUILD4
292 files changed, 18588 insertions, 552 deletions
diff --git a/community-staging/blender/PKGBUILD b/community-staging/blender/PKGBUILD
new file mode 100644
index 000000000..0f23b4ae5
--- /dev/null
+++ b/community-staging/blender/PKGBUILD
@@ -0,0 +1,102 @@
+# $Id: PKGBUILD 145008 2011-12-14 03:12:03Z eric $
+# Contributor: John Sowiak <john@archlinux.org>
+# Contributor: tobias <tobias@archlinux.org>
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+
+# Apparently, the blender guys refuse to release source tarballs for
+# intermediate releases that deal mainly with binaries but incorporate tiny
+# minor changes from svn. Since I'm sick and tired of the urges of users that
+# look for release numbers only, we make a messy PKGBUILD that can checkout svn
+# release if necessary.
+
+#_svn=true
+_svn=false
+
+pkgname=blender
+pkgver=2.61
+pkgrel=4
+epoch=3
+pkgdesc="A fully integrated 3D graphics creation suite"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.blender.org"
+depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' \
+ 'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew' \
+ 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'openimageio')
+makedepends=('cmake' 'boost' 'cuda-toolkit')
+optdepends=('cuda-toolkit: cycles renderer cuda support')
+options=(!strip)
+install=blender.install
+if [ $_svn = false ]; then
+ source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
+ md5sums=('11a4721ff92286f678bb2e05e5f29c97')
+else
+ source=(ftp://ftp.archlinux.org/other/${pkgname}/$pkgname-$pkgver.tar.xz)
+ md5sums=('7579d1139d0d6025df8afcfca64a65c4')
+fi
+
+# source PKGBUILD && mksource
+mksource() {
+ [[ -x /usr/bin/svn ]] || (echo "svn not found. Install subversion." && return 1)
+ _svnver=38016
+ _svntrunk="https://svn.blender.org/svnroot/bf-blender/trunk/blender"
+ _svnmod="$pkgname-$pkgver"
+ mkdir ${pkgname}-$pkgver
+ pushd ${pkgname}-$pkgver
+ svn co $_svntrunk --config-dir ./ -r $_svnver $_svnmod
+ find . -depth -type d -name .svn -exec rm -rf {} \;
+ tar -cJf ../${pkgname}-$pkgver.tar.xz ${pkgname}-$pkgver/*
+ popd
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ mkdir build
+ cd build
+
+ [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD:BOOL=OFF"
+
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DWITH_INSTALL_PORTABLE:BOOL=OFF \
+ -DWITH_PYTHON_INSTALL:BOOL=OFF \
+ -DWITH_OPENCOLLADA:BOOL=ON \
+ -DOPENIMAGEIO_ROOT_DIR:STRING=/usr \
+ -DWITH_GAMEENGINE:BOOL=ON \
+ -DWITH_PLAYER:BOOL=ON \
+ -DWITH_BUILTIN_GLEW:BOOL=OFF \
+ -DWITH_CODEC_FFMPEG:BOOL=ON \
+ -DWITH_CODEC_SNDFILE:BOOL=ON \
+ -DWITH_CYCLES:BOOL=ON \
+ -DWITH_CYCLES_CUDA_BINARIES:BOOL=ON \
+ -DCUDA_TOOLKIT_ROOT_DIR:STRING=/opt/cuda-toolkit/ \
+ -DWITH_FFTW3:BOOL=ON \
+ -DWITH_MOD_OCEANSIM:BOOL=ON \
+ -DPYTHON_VERSION:STRING=3.2 \
+ -DPYTHON_LIBPATH:STRING=/usr/lib \
+ -DPYTHON_LIBRARY:STRING=python3.2mu \
+ -DPYTHON_INCLUDE_DIRS:STRING=/usr/include/python3.2mu \
+ $ENABLESSE2
+
+ make $MAKEFLAGS
+
+ cp -rf "$srcdir"/${pkgname}-$pkgver/release/plugins/* \
+ "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/
+ cd "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi
+ chmod 755 bmake
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver/build"
+ make DESTDIR="${pkgdir}" install
+ python -m compileall "${pkgdir}/usr/share/blender"
+
+# install plugins
+ install -d -m755 "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/{sequence,texture}
+ cp "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/sequence/*.so \
+ "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/sequence/
+ cp "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/texture/*.so \
+ "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/texture/
+}
diff --git a/community-staging/blender/blender.install b/community-staging/blender/blender.install
new file mode 100644
index 000000000..724bfce00
--- /dev/null
+++ b/community-staging/blender/blender.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime &> /dev/null
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community-staging/gambas2/PKGBUILD b/community-staging/gambas2/PKGBUILD
new file mode 100644
index 000000000..32892b79a
--- /dev/null
+++ b/community-staging/gambas2/PKGBUILD
@@ -0,0 +1,950 @@
+# $Id: PKGBUILD 62476 2012-01-20 08:43:11Z lcarlier $
+# Maintainer : Laurent Carlier <lordheavym@gmail.com>
+# Contributor: Biru Ionut <ionut@archlinux.ro>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+# Contributor: Toni Foerster <stonerl@skeps.de>
+
+pkgbase="gambas2"
+pkgname=('gambas2-meta' 'gambas2-runtime' 'gambas2-devel' 'gambas2-ide' 'gambas2-examples' 'gambas2-help'
+ 'gambas2-script' 'gambas2-gb-chart' 'gambas2-gb-compress' 'gambas2-gb-corba' 'gambas2-gb-crypt'
+ 'gambas2-gb-db' 'gambas2-gb-db-firebird' 'gambas2-gb-db-form' 'gambas2-gb-db-mysql'
+ 'gambas2-gb-db-odbc' 'gambas2-gb-db-postgresql' 'gambas2-gb-db-sqlite2' 'gambas2-gb-db-sqlite3'
+ 'gambas2-gb-desktop' 'gambas2-gb-form' 'gambas2-gb-form-dialog' 'gambas2-gb-form-mdi'
+ 'gambas2-gb-gtk' 'gambas2-gb-gtk-ext' 'gambas2-gb-gtk-svg' 'gambas2-gb-gui'
+ 'gambas2-gb-image' 'gambas2-gb-info' 'gambas2-gb-net' 'gambas2-gb-net-curl'
+ 'gambas2-gb-net-smtp' 'gambas2-gb-opengl' 'gambas2-gb-option' 'gambas2-gb-pcre'
+ 'gambas2-gb-pdf' 'gambas2-gb-qt' 'gambas2-gb-qt-ext' 'gambas2-gb-qt-opengl'
+ 'gambas2-gb-qt-kde' 'gambas2-gb-qt-kde-html' 'gambas2-gb-report' 'gambas2-gb-sdl'
+ 'gambas2-gb-sdl-sound' 'gambas2-gb-settings' 'gambas2-gb-v4l' 'gambas2-gb-vb'
+ 'gambas2-gb-web' 'gambas2-gb-xml' 'gambas2-gb-xml-rpc' 'gambas2-gb-xml-xslt')
+pkgver=2.23.1
+pkgrel=7
+pkgdesc="A free development environment based on a Basic interpreter."
+arch=('i686' 'x86_64')
+url="http://gambas.sourceforge.net"
+depends=('libffi' 'bzip2' 'libfbclient' 'zlib' 'kdelibs3' 'libgl' 'gtk2' 'librsvg' 'xdg-utils'
+ 'postgresql-libs>=8.4.1' 'libmysqlclient' 'unixodbc' 'sqlite2' 'sqlite3'
+ 'curl' 'poppler-glib' 'sdl_mixer' 'sdl_image' 'libxtst' 'pcre' 'omniorb' 'libxft'
+ 'libxcursor' 'libsm')
+makedepends=('intltool' 'mysql' 'postgresql')
+license=('GPL2')
+options=('!emptydirs' '!makeflags')
+groups=('gambas2')
+replaces=('gambas2')
+conflicts=('gambas2')
+source=(http://downloads.sourceforge.net/gambas/$pkgbase-$pkgver.tar.bz2
+ 'fix-gbi-gba-path.patch' 'db.firebird.gcc-4.6.0-fix.patch'
+ 'poppler-0.18.patch'
+ 'gambas2-script.install' 'gambas2-runtime.install')
+md5sums=('ff8d2c1f310222c150b114e7ce247dfd'
+ '9dda03a1bbfb7e7ba8b6a4ae91b6752b'
+ 'ac9703b390502ed3242c8d34485c9236'
+ 'a551b4b216bbdb3489f3c264bf73ee66'
+ '870ff5b4b33cd75aa9c290539e6fdd5d'
+ 'ab5667175c4945282d2f40a35d0e9e5b')
+_gbfiles="${srcdir}/$pkgbase-$pkgver/main/gbc"
+
+_buildgbcomp() {
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp/src/$1
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbc2 -ag -r ${pkgdir}/usr
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gba2
+ install $1.gambas ${pkgdir}/usr/lib/gambas2/
+ install .component ${pkgdir}/usr/lib/gambas2/$1.component
+ chmod a-x ${pkgdir}/usr/lib/gambas2/$1.component
+ install .info ${pkgdir}/usr/share/gambas2/info/$1.info
+ chmod a-x ${pkgdir}/usr/share/gambas2/info/$1.info
+ install .list ${pkgdir}/usr/share/gambas2/info/$1.list
+ chmod a-x ${pkgdir}/usr/share/gambas2/info/$1.list
+ if test -d control; then
+ install -d ${pkgdir}/usr/share/gambas2/control/$1
+ install control/*.png ${pkgdir}/usr/share/gambas2/control/$1
+ chmod a-x ${pkgdir}/usr/share/gambas2/control/$1/*.png
+ fi
+}
+
+build() {
+ cd "${srcdir}/$pkgbase-$pkgver"
+
+ ## workaround to allow package splitting
+ msg "Applying patches ..."
+ patch -Np1 -i "${srcdir}/fix-gbi-gba-path.patch"
+ # merged upstream
+ patch -Np3 -i "${srcdir}/db.firebird.gcc-4.6.0-fix.patch"
+ patch -Np2 -i "${srcdir}/poppler-0.18.patch"
+ ./reconf-all
+ ##
+
+ . /etc/profile.d/kde3.sh
+ . /etc/profile.d/qt3.sh
+
+ ./configure -C --disable-qte --prefix=/usr
+ make bindir=${pkgdir}/usr/bin
+}
+
+package_gambas2-meta() {
+ depends=('gambas2-runtime' 'gambas2-devel' 'gambas2-ide' 'gambas2-examples' 'gambas2-help'
+ 'gambas2-script' 'gambas2-gb-chart' 'gambas2-gb-compress' 'gambas2-gb-corba' 'gambas2-gb-crypt'
+ 'gambas2-gb-db' 'gambas2-gb-db-firebird' 'gambas2-gb-db-form' 'gambas2-gb-db-mysql'
+ 'gambas2-gb-db-odbc' 'gambas2-gb-db-postgresql' 'gambas2-gb-db-sqlite2' 'gambas2-gb-db-sqlite3'
+ 'gambas2-gb-desktop' 'gambas2-gb-form' 'gambas2-gb-form-dialog' 'gambas2-gb-form-mdi'
+ 'gambas2-gb-gtk' 'gambas2-gb-gtk-ext' 'gambas2-gb-gtk-svg' 'gambas2-gb-gui'
+ 'gambas2-gb-image' 'gambas2-gb-info' 'gambas2-gb-net' 'gambas2-gb-net-curl'
+ 'gambas2-gb-net-smtp' 'gambas2-gb-opengl' 'gambas2-gb-option' 'gambas2-gb-pcre'
+ 'gambas2-gb-pdf' 'gambas2-gb-qt' 'gambas2-gb-qt-ext' 'gambas2-gb-qt-opengl'
+ 'gambas2-gb-qt-kde' 'gambas2-gb-qt-kde-html' 'gambas2-gb-report' 'gambas2-gb-sdl'
+ 'gambas2-gb-sdl-sound' 'gambas2-gb-settings' 'gambas2-gb-v4l' 'gambas2-gb-vb'
+ 'gambas2-gb-web' 'gambas2-gb-xml' 'gambas2-gb-xml-rpc' 'gambas2-gb-xml-xslt')
+ pkgdesc="Gambas2 meta package"
+}
+
+package_gambas2-runtime() {
+ depends=('libffi' 'xdg-utils')
+ pkgdesc="Gambas2 runtime environment"
+ install=gambas2-runtime.install
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/debug
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/eval
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/main/lib/gb.component \
+ ${pkgdir}/usr/lib/gambas2
+ ln -s gbx2 ${pkgdir}/usr/bin/gbr2
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ rm -f ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+
+ ## needed for postinst with xdg-utils
+ install -d -m755 ${pkgdir}/usr/share/gambas2/mime
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/main/mime/* \
+ ${pkgdir}/usr/share/gambas2/mime/
+ install -d -m755 ${pkgdir}/usr/share/gambas2/icons
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/main/mime/application-x-gambas.png \
+ ${pkgdir}/usr/share/gambas2/icons/application-x-gambas.png
+}
+
+package_gambas2-devel() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 development environment"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbc
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-ide() {
+ depends=('gambas2-gb-qt-ext' 'gambas2-gb-form-dialog' 'gambas2-gb-form-mdi' 'gambas2-gb-settings'
+ 'gambas2-gb-db' 'gambas2-gb-desktop' 'gambas2-devel')
+ pkgdesc="Gambas2 Integrated Development Environment"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/eval
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/debug
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/db
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ _buildgbcomp gb.form
+ _buildgbcomp gb.form.dialog
+ _buildgbcomp gb.form.mdi
+ _buildgbcomp gb.settings
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/app/src/gambas2
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbc2 -ag -r ${pkgdir}/usr
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gba2
+ cd ${srcdir}/${pkgbase}-${pkgver}/app/src/gambas2-database-manager
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbc2 -ag -r ${pkgdir}/usr
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gba2
+ cd ${srcdir}/${pkgbase}-${pkgver}/app/src/
+
+ ## cleanup the workaround
+ rm -r ${pkgdir}/usr/share ${pkgdir}/usr/lib
+ rm ${pkgdir}/usr/bin/gbx2
+ ##
+
+ install -m755 gambas2/gambas2.gambas ${pkgdir}/usr/bin
+ install -m755 gambas2-database-manager/gambas2-database-manager.gambas ${pkgdir}/usr/bin
+ ln -s gambas2.gambas ${pkgdir}/usr/bin/gambas2
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/app/desktop/gambas2.desktop \
+ ${pkgdir}/usr/share/applications/gambas2.desktop
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/app/desktop/gambas2.png \
+ ${pkgdir}/usr/share/pixmaps/gambas2.png
+}
+
+package_gambas2-examples() {
+ depends=('gambas2-gb-compress' 'gambas2-gb-corba' 'gambas2-gb-crypt'
+ 'gambas2-gb-db-firebird' 'gambas2-gb-db-form' 'gambas2-gb-db-mysql'
+ 'gambas2-gb-db-odbc' 'gambas2-gb-db-postgresql' 'gambas2-gb-db-sqlite2' 'gambas2-gb-db-sqlite3'
+ 'gambas2-gb-desktop' 'gambas2-gb-form-dialog' 'gambas2-gb-form-mdi'
+ 'gambas2-gb-gtk-ext' 'gambas2-gb-gtk-svg' 'gambas2-gb-gui'
+ 'gambas2-gb-image' 'gambas2-gb-info' 'gambas2-gb-net' 'gambas2-gb-net-curl'
+ 'gambas2-gb-net-smtp' 'gambas2-gb-opengl' 'gambas2-gb-option' 'gambas2-gb-pcre'
+ 'gambas2-gb-pdf' 'gambas2-gb-qt-ext' 'gambas2-gb-qt-opengl'
+ 'gambas2-gb-qt-kde-html' 'gambas2-gb-report' 'gambas2-gb-sdl'
+ 'gambas2-gb-sdl-sound' 'gambas2-gb-settings' 'gambas2-gb-v4l' 'gambas2-gb-vb'
+ 'gambas2-gb-web' 'gambas2-gb-xml-rpc' 'gambas2-gb-xml-xslt')
+ pkgdesc="Gambas2 examples"
+# arch=('any')
+
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ make XDG_UTILS='' DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ rm -r ${pkgdir}/usr/bin ${pkgdir}/usr/lib
+ rm -r ${pkgdir}/usr/share/gambas2/{help,info}
+}
+
+package_gambas2-help() {
+ depends=()
+ pkgdesc="Gambas2 help files"
+# arch=('any')
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/help
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ #fix help
+ chown root:root -R ${pkgdir}/usr/share/gambas2/help/help
+}
+
+package_gambas2-script() {
+ depends=('gambas2-devel')
+ pkgdesc="Gambas2 scripter and server programs support"
+ install=gambas2-script.install
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/eval
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/app/src/gbs2
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbc2 -ag -r ${pkgdir}/usr
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gba2
+ install -m755 gbs2.gambas ${pkgdir}/usr/bin
+
+ ln -s gbs2.gambas ${pkgdir}/usr/bin/gbs2
+ ln -s gbs2.gambas ${pkgdir}/usr/bin/gbw2
+
+ ## cleanup the workaround
+ rm -r ${pkgdir}/usr/share ${pkgdir}/usr/lib
+ rm ${pkgdir}/usr/bin/gbx2
+ ##
+
+ ## needed for postinst with xdg-utils
+ cd ${srcdir}/${pkgbase}-${pkgver}/app/mime
+ install -d -m755 ${pkgdir}/usr/share/gambas2/mime
+ install -D -m644 *.xml ${pkgdir}/usr/share/gambas2/mime/
+ install -D -m644 *.png ${pkgdir}/usr/share/gambas2/mime/
+ ##
+}
+
+package_gambas2-gb-chart() {
+ depends=('gambas2-gb-form')
+ pkgdesc="Gambas2 chart component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ _buildgbcomp gb.form
+ _buildgbcomp gb.chart
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.qt*,gb.gui*,gb.form*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la},gb.gui*,gb.form*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-compress() {
+ depends=('gambas2-runtime' 'bzip2' 'zlib')
+ pkgdesc="Gambas2 compression support component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/compress
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.compress.bzlib2
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.compress.zlib
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-corba() {
+ depends=('gambas2-runtime' 'omniorb')
+ pkgdesc="Gambas2 corba component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.corba
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-crypt() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 MD5/DES crypting component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.crypt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/db
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db-firebird() {
+ depends=('gambas2-gb-db' 'libfbclient')
+ pkgdesc="Gambas2 Firebird database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.firebird
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db-form() {
+ depends=('gambas2-gb-db' 'gambas2-gb-form')
+ pkgdesc="Gambas2 database form component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/db
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ _buildgbcomp gb.db.form
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.qt*,gb.gui*,gb.db.{info,list}}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la},gb.gui*,gb.db.{so*,la,component}}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-db-mysql() {
+ depends=('gambas2-gb-db' 'libmysqlclient')
+ pkgdesc="Gambas2 MySQL database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.mysql
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db-odbc() {
+ depends=('gambas2-gb-db' 'unixodbc')
+ pkgdesc="Gambas2 ODBC database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.odbc
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db-postgresql() {
+ depends=('gambas2-gb-db' 'postgresql-libs>=8.4.1')
+ pkgdesc="Gambas2 PostgreSQL database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.postgresql
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db-sqlite2() {
+ depends=('gambas2-gb-db' 'sqlite2')
+ pkgdesc="Gambas2 Sqlite2 database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.sqlite2
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-db-sqlite3() {
+ depends=('gambas2-gb-db' 'sqlite3')
+ pkgdesc="Gambas2 Sqlite3 database access component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.sqlite3
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-desktop() {
+ depends=('gambas2-runtime' 'libsm' 'libxtst')
+ pkgdesc="Gambas2 desktop component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.desktop
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.qt*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.{so*,la},gb.qt*,gb.draw*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-form() {
+ depends=('gambas2-gb-gui')
+ pkgdesc="Gambas2 form component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ _buildgbcomp gb.form
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.qt*,gb.gui*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la},gb.gui*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-form-dialog() {
+ depends=('gambas2-gb-form')
+ pkgdesc="Gambas2 form dialog component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ _buildgbcomp gb.form
+ _buildgbcomp gb.form.dialog
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.form.{info,list},gb.qt*,gb.gui*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la},gb.form.{component,gambas},gb.gui*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-form-mdi() {
+ depends=('gambas2-gb-form')
+ pkgdesc="Gambas2 form MDI component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ _buildgbcomp gb.form
+ _buildgbcomp gb.form.mdi
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.form.{info,list},gb.qt*,gb.gui*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la},gb.form.{component,gambas},gb.gui*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-gtk() {
+ depends=('gambas2-runtime' 'gtk2')
+ pkgdesc="Gambas2 graphical GTK+ toolkit component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.gtk.ext*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.gtk.ext*,gb.{so*,la}}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-gtk-ext() {
+ depends=('gambas2-gb-gtk')
+ pkgdesc="Gambas2 graphical GTK+ toolkit extension component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk/src/ext
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-gtk-svg() {
+ depends=('gambas2-gb-gtk' 'librsvg')
+ pkgdesc="Gambas2 graphical GTK+ toolkit svg component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk.svg
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-gui() {
+ depends=('gambas2-gb-qt' 'gambas2-gb-gtk')
+ pkgdesc="Gambas2 automatic gui toolkit chooser"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.qt*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la}}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-image() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 image processing component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.image
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-info() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 info component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ _buildgbcomp gb.info
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-net() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 networking component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-net-curl() {
+ depends=('gambas2-runtime' 'curl')
+ pkgdesc="Gambas2 advanced networking component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.curl
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-net-smtp() {
+ depends=('gambas2-runtime' 'glib2')
+ pkgdesc="Gambas2 SMTP component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.smtp
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-opengl() {
+ depends=('gambas2-runtime' 'libgl' 'mesa')
+ pkgdesc="Gambas2 OpenGL component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.opengl
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-option() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 command-line options component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/option
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-pcre() {
+ depends=('gambas2-runtime' 'pcre')
+ pkgdesc="Gambas2 PCRE component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.pcre
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-pdf() {
+ depends=('gambas2-runtime' 'poppler-glib')
+ pkgdesc="Gambas2 PDF component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.pdf
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-qt() {
+ depends=('gambas2-runtime' 'qt3')
+ pkgdesc="Gambas2 graphical QT toolkit component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.qt.ext*,gb.qt.opengl*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt.ext*,gb.qt.opengl*,gb.{so*,la}}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-qt-ext() {
+ depends=('gambas2-gb-qt')
+ pkgdesc="Gambas2 graphical QT toolkit extension component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt/src/ext
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-qt-opengl() {
+ depends=('gambas2-gb-qt' 'libgl')
+ pkgdesc="Gambas2 graphical QT toolkit OpenGL component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt/src/opengl
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-qt-kde() {
+ depends=('gambas2-gb-qt' 'kdelibs3')
+ pkgdesc="Gambas2 KDE component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt.kde
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ rm ${pkgdir}/usr/share/gambas2/info/gb.qt.kde.html*
+ rm ${pkgdir}/usr/lib/gambas2/gb.qt.kde.html*
+}
+
+package_gambas2-gb-qt-kde-html() {
+ depends=('gambas2-gb-qt-kde')
+ pkgdesc="Gambas2 KHTML component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt.kde/src/html
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-report() {
+ depends=('gambas2-runtime' 'gambas2-gb-form')
+ pkgdesc="Gambas2 report component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/draw
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/db
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ _buildgbcomp gb.form
+ _buildgbcomp gb.report
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.{info,list},gb.form.{info,list},gb.qt*,gb.gui*,gb.db*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.draw*,gb.qt*,gb.{so*,la},gb.form.{component,gambas},gb.gui*,gb.db*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-sdl() {
+ depends=('gambas2-runtime' 'sdl_image' 'libxft' 'libxcursor' 'libgl')
+ pkgdesc="Gambas2 SDL component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.sdl
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-sdl-sound() {
+ depends=('gambas2-runtime' 'sdl_mixer')
+ pkgdesc="Gambas2 SDL sound component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.sdl.sound
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-settings() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 settings management component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ _buildgbcomp gb.settings
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-v4l() {
+ depends=('gambas2-runtime' 'libjpeg' 'libpng')
+ pkgdesc="Gambas2 V4L component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.v4l
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-vb() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 VB transitional component"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/vb
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+}
+
+package_gambas2-gb-web() {
+ depends=('gambas2-runtime')
+ pkgdesc="Gambas2 CGI component"
+# arch=('any')
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ _buildgbcomp gb.web
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-xml() {
+ depends=('gambas2-runtime' 'libxml2')
+ pkgdesc="Gambas2 xml component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.curl
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/{gb.xml.{xslt*,rpc*},gb.{info,list},gb.net*}
+ rm ${pkgdir}/usr/lib/gambas2/{gb.xml.{xslt*,rpc*},gb.{so*,la},gb.net*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-xml-rpc() {
+ depends=('gambas2-gb-xml' 'gambas2-gb-net' 'gambas2-gb-net-curl')
+ pkgdesc="Gambas2 xml-rpc component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.curl
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{{info,list},xml.{info,list},xml.xslt.{info,list},net.*}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{{so*,la},xml.{so*,la,component},xml.xslt.*,net.*}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
+
+package_gambas2-gb-xml-xslt() {
+ depends=('gambas2-gb-xml' 'libxslt')
+ pkgdesc="Gambas2 xml-xslt component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbx
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+ mkdir -p ${pkgdir}/usr/share/gambas2/info
+ ${srcdir}/${pkgbase}-${pkgver}/main/gbc/gbi2 -r ${pkgdir}/usr gb
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml/src/xslt
+ make DESTDIR="${pkgdir}" GBFILES="${_gbfiles}" install
+
+ ## cleanup the workaround
+ rm ${pkgdir}/usr/share/gambas2/info/gb.{info,list}
+ rm ${pkgdir}/usr/lib/gambas2/gb.{so*,la}
+ rm -rf ${pkgdir}/usr/bin
+ ##
+}
diff --git a/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch b/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch
new file mode 100644
index 000000000..0b6e68df3
--- /dev/null
+++ b/community-staging/gambas2/db.firebird.gcc-4.6.0-fix.patch
@@ -0,0 +1,35 @@
+--- gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:01:54 3864
++++ gambas/branches/2.0/gb.db.firebird/src/main.cpp 2011/05/27 15:26:41 3865
+@@ -1216,7 +1216,8 @@
+ GB.StoreVariant(&fantom, &buffer[i]);
+ }
+ else{
+- GB.StoreVariant(&res->GetData(pos,i), &buffer[i]);
++ GB_VARIANT val = res->GetData(pos,i);
++ GB.StoreVariant(&val , &buffer[i]);
+ }
+ }
+ }
+@@ -1874,6 +1875,8 @@
+ static char query[SQLMAXLEN];
+ int type;
+ std::string str1,str2;
++ GB_VARIANT varval;
++ char* charval;
+ snprintf(query,SQLMAXLEN-1,"select b.RDB$field_name,a.RDB$field_type,b.rdb$null_flag,b.rdb$default_source,a.RDB$field_length from RDB$fields a,RDB$relation_fields b where a.RDB$field_name=b.RDB$field_source and b.RDB$relation_name=upper('%s') and b.rdb$field_name=upper('%s')",table,field);
+ if (do_query(db, query, &res, "Unable to get the field from the table")){
+ delete res;
+@@ -1900,9 +1903,11 @@
+ str1=res->GetData(0,3).value.value._string;
+ if(str1!="")
+ str2=str1.assign(str1,8,str1.length()-8);
+- GB.FreeString(&res->GetData(0,3).value.value._string);
++ charval = res->GetData(0,3).value.value._string;
++ GB.FreeString(&charval);
+ res->SetData(0,3,str2);
+- GB.StoreVariant(&res->GetData(0,3), &info->def);
++ varval = res->GetData(0,3);
++ GB.StoreVariant(&varval, &info->def);
+ }
+ delete res;
+ return FALSE;
diff --git a/community-staging/gambas2/fix-gbi-gba-path.patch b/community-staging/gambas2/fix-gbi-gba-path.patch
new file mode 100644
index 000000000..9be8e921e
--- /dev/null
+++ b/community-staging/gambas2/fix-gbi-gba-path.patch
@@ -0,0 +1,24 @@
+--- component.am 2010-03-15 20:54:43.000000000 +0100
++++ ../component.am 2010-04-30 15:00:47.218700833 +0200
+@@ -6,17 +6,17 @@
+ @if test -d $(COMPONENT); then \
+ echo "Compiling the $(COMPONENT) project..."; \
+ ( \
+- $(DESTDIR)$(bindir)/gbi$(GAMBAS_VERSION) -r $(DESTDIR)$(prefix) $(COMPONENT); \
++ $(GBFILES)/gbi$(GAMBAS_VERSION) -r $(DESTDIR)$(prefix) $(COMPONENT); \
+ cd $(COMPONENT); \
+- $(DESTDIR)$(bindir)/gbc$(GAMBAS_VERSION) -ag -r $(DESTDIR)$(prefix); \
+- $(DESTDIR)$(bindir)/gba$(GAMBAS_VERSION); \
++ $(GBFILES)/gbc$(GAMBAS_VERSION) -ag -r $(DESTDIR)$(prefix); \
++ $(GBFILES)/gba$(GAMBAS_VERSION); \
+ rm -rf .gambas; \
+ $(INSTALL) $(COMPONENT).gambas $(DESTDIR)$(gblibdir); \
+ ) \
+ fi
+ @echo
+ @echo "Creating the information files for $(COMPONENT) component..."
+- @$(DESTDIR)$(bindir)/gbi$(GAMBAS_VERSION) -r $(DESTDIR)$(prefix) $(COMPONENT)
++ @$(GBFILES)/gbi$(GAMBAS_VERSION) -r $(DESTDIR)$(prefix) $(COMPONENT)
+ @echo
+
+ uninstall-hook:
diff --git a/community-staging/gambas2/gambas2-runtime.install b/community-staging/gambas2/gambas2-runtime.install
new file mode 100644
index 000000000..4729f7ef6
--- /dev/null
+++ b/community-staging/gambas2/gambas2-runtime.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas2/mime/application-x-gambas.png application-x-gambas
+ xdg-mime install /usr/share/gambas2/mime/application-x-gambas.xml
+}
+
+pre_remove() {
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambas
+ xdg-mime uninstall /usr/share/gambas2/mime/application-x-gambas.xml
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/gambas2/gambas2-script.install b/community-staging/gambas2/gambas2-script.install
new file mode 100644
index 000000000..86558e434
--- /dev/null
+++ b/community-staging/gambas2/gambas2-script.install
@@ -0,0 +1,15 @@
+post_install() {
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas2/mime/application-x-gambasscript.png application-x-gambasscript
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas2/mime/application-x-gambasserverpage.png application-x-gambasserverpage
+ xdg-mime install /usr/share/gambas2/mime/application-x-gambasscript.xml
+ xdg-mime install /usr/share/gambas2/mime/application-x-gambasserverpage.xml
+}
+
+pre_remove() {
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambasscript
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambasserverpage
+ xdg-mime uninstall /usr/share/gambas2/mime/application-x-gambasscript.xml
+ xdg-mime uninstall /usr/share/gambas2/mime/application-x-gambasserverpage.xml
+}
diff --git a/community-staging/gambas2/gambas2.install b/community-staging/gambas2/gambas2.install
new file mode 100644
index 000000000..4729f7ef6
--- /dev/null
+++ b/community-staging/gambas2/gambas2.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas2/mime/application-x-gambas.png application-x-gambas
+ xdg-mime install /usr/share/gambas2/mime/application-x-gambas.xml
+}
+
+pre_remove() {
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambas
+ xdg-mime uninstall /usr/share/gambas2/mime/application-x-gambas.xml
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/gambas2/poppler-0.18.patch b/community-staging/gambas2/poppler-0.18.patch
new file mode 100644
index 000000000..fbcc430bf
--- /dev/null
+++ b/community-staging/gambas2/poppler-0.18.patch
@@ -0,0 +1,40 @@
+--- gambas/trunk/gb.pdf/configure.ac 2010/07/14 01:50:18 3038
++++ gambas/trunk/gb.pdf/configure.ac 2011/08/09 10:43:30 3997
+@@ -22,6 +22,8 @@
+ AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_8, $((1-$?)), Poppler version >= 0.8)
+ pkg-config --atleast-version=0.11.3 poppler
+ AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_11_3, $((1-$?)), Poppler version >= 0.11.3)
++ pkg-config --atleast-version=0.17.0 poppler
++ AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_17, $((1-$?)), Poppler version >= 0.17)
+ fi
+
+ AC_OUTPUT( \
+
+--- gambas/trunk/gb.pdf/src/CPdfDocument.cpp 2011/06/03 00:51:09 3870
++++ gambas/trunk/gb.pdf/src/CPdfDocument.cpp 2011/08/09 10:43:30 3997
+@@ -44,6 +44,7 @@
+ #include <Outline.h>
+ #include <Link.h>
+ #include <Gfx.h>
++#include <glib/poppler-features.h>
+
+ /*****************************************************************************
+
+@@ -956,12 +957,17 @@
+ Bookmarks of a PDF page
+
+ ******************************************************************************/
++
+ void aux_fill_links(void *_object)
+ {
++ #if POPPLER_VERSION_0_17
++ THIS->links = new Links (THIS->page->getAnnots (THIS->doc->getCatalog()));
++ #else
+ Object obj;
+
+ THIS->links = new Links (THIS->page->getAnnots (&obj),THIS->doc->getCatalog()->getBaseURI ());
+ obj.free();
++ #endif
+ }
+
+ BEGIN_PROPERTY (PDFPAGELINKS_count)
diff --git a/community-staging/gambas3/PKGBUILD b/community-staging/gambas3/PKGBUILD
new file mode 100644
index 000000000..a3ea723e3
--- /dev/null
+++ b/community-staging/gambas3/PKGBUILD
@@ -0,0 +1,1104 @@
+# $Id: PKGBUILD 62492 2012-01-20 09:07:36Z lcarlier $
+# Maintainer: Laurent Carlier <lordheavym@gmail.com>
+
+pkgbase=gambas3
+pkgname=('gambas3-runtime' 'gambas3-devel' 'gambas3-ide' 'gambas3-script' 'gambas3-examples' 'gambas3-gb-cairo' 'gambas3-gb-chart'
+ 'gambas3-gb-dbus' 'gambas3-gb-compress' 'gambas3-gb-crypt' 'gambas3-gb-db' 'gambas3-gb-db-form' 'gambas3-gb-db-mysql'
+ 'gambas3-gb-db-odbc' 'gambas3-gb-db-postgresql' 'gambas3-gb-db-sqlite2' 'gambas3-gb-db-sqlite3'
+ 'gambas3-gb-desktop' 'gambas3-gb-eval-highlight' 'gambas3-gb-form'
+ 'gambas3-gb-form-dialog' 'gambas3-gb-form-mdi' 'gambas3-gb-form-stock' 'gambas3-gb-gtk' 'gambas3-gb-gui' 'gambas3-gb-image'
+ 'gambas3-gb-image-effect' 'gambas3-gb-image-imlib' 'gambas3-gb-image-io' 'gambas3-gb-net' 'gambas3-gb-net-curl'
+ 'gambas3-gb-net-smtp' 'gambas3-gb-opengl' 'gambas3-gb-opengl-glu' 'gambas3-gb-opengl-glsl' 'gambas3-gb-option' 'gambas3-gb-pcre'
+ 'gambas3-gb-pdf' 'gambas3-gb-qt4' 'gambas3-gb-qt4-ext' 'gambas3-gb-qt4-opengl' 'gambas3-gb-qt4-webkit'
+ 'gambas3-gb-report' 'gambas3-gb-sdl' 'gambas3-gb-sdl-sound' 'gambas3-gb-settings' 'gambas3-gb-signal'
+ 'gambas3-gb-v4l' 'gambas3-gb-vb' 'gambas3-gb-xml' 'gambas3-gb-xml-rpc' 'gambas3-gb-xml-xslt' 'gambas3-gb-web')
+pkgver=3.0.0
+pkgrel=3
+pkgdesc="A free development environment based on a Basic interpreter."
+arch=('i686' 'x86_64')
+url="http://gambas.sourceforge.net/"
+license=('GPL')
+groups=('gambas3')
+makedepends=('intltool' 'mysql' 'postgresql' 'libffi' 'bzip2' 'glib2' 'v4l-utils'
+ 'zlib' 'mesa' 'libgl' 'glew' 'xdg-utils' 'gtk2' 'imlib2' 'gdk-pixbuf2'
+ 'postgresql-libs' 'libmysqlclient' 'unixodbc' 'sqlite2' 'sqlite3' 'librsvg'
+ 'curl' 'poppler-glib' 'sdl_mixer' 'sdl_ttf' 'libxtst' 'pcre' 'qtwebkit'
+ 'libxcursor' 'libsm' 'dbus-core' 'libxml2' 'libxslt' 'libgnome-keyring')
+options=('!emptydirs' '!makeflags')
+source=("http://downloads.sourceforge.net/gambas/${pkgbase}-${pkgver}.tar.bz2"
+ 'gambas3-script.install' 'gambas3-runtime.install')
+md5sums=('f2c51e18b67ae6b21065ea0aed9b588e'
+ 'b284be39d147ec799f1116a6abc068b4'
+ 'b5cc403990f31b8ea1c5cf37366d3d29')
+
+build() {
+ cd ${srcdir}/${pkgbase}-${pkgver}
+
+ ./reconf-all
+ ./configure --prefix=/usr -C
+
+ make bindir=${pkgdir}/usr/bin
+}
+
+package_gambas3-runtime() {
+ depends=('libffi' 'xdg-utils')
+ pkgdesc="Runtime environment"
+ install=gambas3-runtime.install
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbc
+ make DESTDIR="${pkgdir}" install
+
+ cd ../gbx
+ make DESTDIR="${pkgdir}" install
+ cd ../lib/debug
+ make DESTDIR="${pkgdir}" install
+ cd ../eval
+ make DESTDIR="${pkgdir}" install
+ cd ../draw
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 ../gb.component \
+ ${pkgdir}/usr/lib/gambas3
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ ln -s gbx3 ${pkgdir}/usr/bin/gbr3
+ gbc/gbi3 -r ${pkgdir}/usr gb
+ rm -f ${pkgdir}/usr/lib/gambas3/gb.{so*,la}
+
+ ## needed for postinst with xdg-utils
+ install -d -m755 ${pkgdir}/usr/share/gambas3/mime
+ install -D -m644 mime/* \
+ ${pkgdir}/usr/share/gambas3/mime/
+ install -d -m755 ${pkgdir}/usr/share/gambas3/icons
+ install -D -m644 mime/application-x-gambas3.png \
+ ${pkgdir}/usr/share/gambas3/icons/application-x-gambas3.png
+
+ cd gbc
+ make DESTDIR="${pkgdir}" uninstall
+}
+
+package_gambas3-devel() {
+ depends=('gambas3-runtime')
+ pkgdesc="Development environment"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/gbc
+ make DESTDIR="${pkgdir}" install
+}
+
+package_gambas3-ide() {
+ depends=('gambas3-devel' 'gambas3-gb-db-form' 'gambas3-gb-desktop' 'gambas3-gb-eval-highlight'
+ 'gambas3-gb-form-dialog' 'gambas3-gb-settings' 'gambas3-gb-form-mdi' 'gambas3-gb-image-effect'
+ 'gambas3-gb-qt4-ext' 'gambas3-gb-qt4-webkit')
+ pkgdesc="Integrated Development Environment"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+#!! with the ide !!
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/app/desktop/gambas3.desktop \
+ ${pkgdir}/usr/share/applications/gambas3.desktop
+ install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/app/desktop/gambas3.png \
+ ${pkgdir}/usr/share/pixmaps/gambas3.png
+
+ rm -r ${pkgdir}/usr/bin/gb*
+ rm -r ${pkgdir}/usr/lib
+ rm -r ${pkgdir}/usr/share/gambas3
+}
+
+package_gambas3-script() {
+ depends=('gambas3-devel')
+ pkgdesc="Scripter and server programs support"
+ install=gambas3-script.install
+
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## needed for postinst with xdg-utils
+ cd ${srcdir}/${pkgbase}-${pkgver}/app/mime
+ install -d -m755 ${pkgdir}/usr/share/gambas3/mime
+ install -D -m644 *.xml ${pkgdir}/usr/share/gambas3/mime/
+ install -D -m644 *.png ${pkgdir}/usr/share/gambas3/mime/
+ ##
+
+ rm -r ${pkgdir}/usr/bin/{gambas*,gb{[a-r]*,x*}}
+ rm -r ${pkgdir}/usr/lib
+ rm -r ${pkgdir}/usr/share/gambas3/[c-i]*
+}
+
+package_gambas3-examples() {
+ depends=('gambas3-gb-cairo' 'gambas3-gb-chart' 'gambas3-gb-dbus' 'gambas3-gb-compress' 'gambas3-gb-crypt' 'gambas3-gb-db'
+ 'gambas3-gb-db-form' 'gambas3-gb-db-mysql' 'gambas3-gb-db-odbc' 'gambas3-gb-db-postgresql' 'gambas3-gb-db-sqlite2'
+ 'gambas3-gb-db-sqlite3' 'gambas3-gb-desktop' 'gambas3-gb-eval-highlight' 'gambas3-gb-form' 'gambas3-gb-form-dialog'
+ 'gambas3-gb-form-mdi' 'gambas3-gb-gtk' 'gambas3-gb-gui' 'gambas3-gb-image' 'gambas3-gb-image-effect' 'gambas3-gb-image-imlib'
+ 'gambas3-gb-image-io' 'gambas3-gb-net' 'gambas3-gb-net-curl' 'gambas3-gb-net-smtp' 'gambas3-gb-opengl' 'gambas3-gb-opengl-glsl'
+ 'gambas3-gb-option' 'gambas3-gb-pcre' 'gambas3-gb-pdf' 'gambas3-gb-qt4' 'gambas3-gb-qt4-ext' 'gambas3-gb-qt4-opengl'
+ 'gambas3-gb-qt4-webkit' 'gambas3-gb-report' 'gambas3-gb-sdl' 'gambas3-gb-sdl-sound' 'gambas3-gb-settings' 'gambas3-gb-signal'
+ 'gambas3-gb-v4l' 'gambas3-gb-vb' 'gambas3-gb-xml' 'gambas3-gb-xml-rpc' 'gambas3-gb-xml-xslt' 'gambas3-gb-web')
+ pkgdesc="Applications examples"
+
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ rm -r ${pkgdir}/usr/{bin,lib}
+ rm -r ${pkgdir}/usr/share/gambas3/{info,control,gb.sdl}
+}
+
+package_gambas3-gb-cairo() {
+ depends=('gambas3-runtime' 'cairo')
+ pkgdesc="Cairo component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.cairo
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-chart() {
+ depends=('gambas3-gb-form')
+ pkgdesc="Chart component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/share/gambas3/control
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.[d-w]*
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.[d-w]*
+ ##
+}
+
+package_gambas3-gb-compress() {
+ depends=('gambas3-runtime' 'bzip2' 'zlib')
+ pkgdesc="Compression support component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.compress.bzlib2
+ make DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.compress.zlib
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.component,gb.[d-v]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.[d-v]*
+ ##
+}
+
+package_gambas3-gb-crypt() {
+ depends=('gambas3-runtime')
+ pkgdesc="MD5/DES crypting component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.crypt
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-db() {
+ depends=('gambas3-runtime')
+ pkgdesc="Database access component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ ## Workaround for splitting
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.comp*,gb.d{e,r}*,gb.[e-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/{gb.comp*,gb.de*,gb.[e-z]*}
+ ##
+}
+
+package_gambas3-gb-db-form() {
+ depends=('gambas3-gb-db' 'gambas3-gb-form')
+ pkgdesc="Database form component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/share/gambas3/control
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{chart*,[e-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{chart*,[e-z]*}
+ ##
+}
+
+package_gambas3-gb-db-mysql() {
+ depends=('gambas3-gb-db' 'libmysqlclient')
+ pkgdesc="MySQL database access component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.mysql
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-db-odbc() {
+ depends=('gambas3-gb-db' 'unixodbc')
+ pkgdesc="ODBC database access component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.odbc
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-db-postgresql() {
+ depends=('gambas3-gb-db' 'postgresql-libs')
+ pkgdesc="PostgreSQL database access component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.postgresql
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-db-sqlite2() {
+ depends=('gambas3-gb-db' 'sqlite2')
+ pkgdesc="Sqlite2 database access component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.sqlite2
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-db-sqlite3() {
+ depends=('gambas3-gb-db' 'sqlite3')
+ pkgdesc="Sqlite3 database access component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.db.sqlite3
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-desktop() {
+ depends=('gambas3-gb-image' 'libsm' 'libxtst' 'libgnome-keyring')
+ pkgdesc="Desktop component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.desktop
+ make DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-dbus() {
+ depends=('gambas3-runtime' 'dbus-core')
+ pkgdesc="DBUS component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.dbus
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-eval-highlight() {
+ depends=('gambas3-runtime')
+ pkgdesc="Expression evaluator highlight component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{[c-d]*,[f-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{[c-d]*,[f-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/control
+ ##
+}
+
+package_gambas3-gb-form() {
+ depends=('gambas3-gb-gui')
+ pkgdesc="Form component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/share/gambas3/control/{gb.db*,gb.form.*,gb.report}
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{[c-e]*,[m-w]*,form.{d*,m*,s*}}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{[c-e]*,[m-w]*,form.{d*,m*,s*}}
+ ##
+}
+
+package_gambas3-gb-form-dialog() {
+ depends=('gambas3-gb-form')
+ pkgdesc="Form dialog component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/share/gambas3/control
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{[c-e]*,[m-w]*,form.{c*,g*,m*,s*}}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{[c-e]*,[m-w]*,form.{i*,l*,m*,s*}}
+ ##
+}
+
+package_gambas3-gb-form-mdi() {
+ depends=('gambas3-gb-form')
+ pkgdesc="Form MDI component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/share/gambas3/control/{gb.db*,gb.form,gb.report}
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{[c-e]*,[m-w]*,form.{c*,d*,g*,s*}}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{[c-e]*,[m-w]*,form.{i*,l*,d*,s*}}
+ ##
+}
+
+package_gambas3-gb-form-stock() {
+ depends=('gambas3-runtime')
+ pkgdesc="Default stock icons component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ # rm -r ${pkgdir}/usr/lib/gambas3/gb.{eval*,[m-w]*}
+ # rm -r ${pkgdir}/usr/share/gambas3/info/gb.{eval*,[m-w]*}
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.[m-w]*
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.[m-w]*
+ ##
+}
+
+package_gambas3-gb-gtk() {
+ depends=('gambas3-gb-image' 'gtk2' 'librsvg')
+ pkgdesc="GTK+ toolkit component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.gtk
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-gui() {
+ depends=('gambas3-gb-qt4' 'gambas3-gb-gtk')
+ pkgdesc="Automatic gui toolkit chooser"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/main/lib/gui
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.[c-e]*,gb.[i-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/{gb.[c-e]*,gb.[i-z]*}
+ ##
+}
+
+package_gambas3-gb-image() {
+ depends=('gambas3-runtime')
+ pkgdesc="Image component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ ## cleanup the workaround
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.[c-g]*,gb.image.e*,gb.[j-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/{gb.[c-g]*,gb.info,gb.image.e*,gb.[j-z]*}
+ ##
+}
+
+package_gambas3-gb-image-effect() {
+ depends=('gambas3-gb-image')
+ pkgdesc="Image effect component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ ## cleanup the workaround
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.[c-g]*,gb.image.{c*,l*,s*},gb.[j-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/{gb.[c-g]*,gb.info,gb.image.{i*,l*},gb.[j-z]*}
+ ##
+}
+
+package_gambas3-gb-image-imlib() {
+ depends=('gambas3-gb-image' 'imlib2')
+ pkgdesc="Imlib component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.image.imlib
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-image-io() {
+ depends=('gambas3-gb-image' 'gdk-pixbuf2')
+ pkgdesc="Input/Output component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.image.io
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-net() {
+ depends=('gambas3-runtime')
+ pkgdesc="Network component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-net-curl() {
+ depends=('gambas3-gb-net' 'curl')
+ pkgdesc="Curl component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.curl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-net-smtp() {
+ depends=('gambas3-runtime' 'glib2')
+ pkgdesc="SMTP component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.smtp
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-opengl() {
+ depends=('gambas3-runtime' 'libgl' 'glew')
+ pkgdesc="OpenGL component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.opengl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.opengl/src/glsl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.opengl/src/glu
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-opengl-glu() {
+ depends=('gambas3-gb-opengl')
+ pkgdesc="GL Utility component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.opengl/src/glu
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-opengl-glsl() {
+ depends=('gambas3-gb-opengl')
+ pkgdesc="GLSL component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.opengl/src/glsl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-option() {
+ depends=('gambas3-runtime')
+ pkgdesc="Getopt component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ ## cleanup the workaround
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.[a-n]*,gb.[p-z]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/{gb.[a-n]*,gb.[p-z]*}
+ ##
+}
+
+package_gambas3-gb-pcre() {
+ depends=('gambas3-runtime' 'pcre')
+ pkgdesc="PCRE component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.pcre
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-pdf() {
+ depends=('gambas3-runtime' 'poppler')
+ pkgdesc="PDF component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.pdf
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-qt4() {
+ depends=('gambas3-gb-image' 'qt')
+ pkgdesc="Qt4 toolkit component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4/src/ext
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4/src/opengl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4/src/webkit
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-qt4-ext() {
+ depends=('gambas3-gb-qt4')
+ pkgdesc="Qt4 toolkit extended component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4/src/ext
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-qt4-opengl() {
+ depends=('gambas3-gb-qt4' 'libgl')
+ pkgdesc="Qt4 toolkit OpenGL component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4/src/opengl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-qt4-webkit() {
+ depends=('gambas3-gb-qt4' 'qtwebkit')
+ pkgdesc="Qt4 toolkit webkit component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4/src/webkit
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-report() {
+ depends=('gambas3-gb-form' 'gambas3-gb-image-io')
+ pkgdesc="Report component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.qt4
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/share/gambas3/control/gb.[d-f]*
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{[c-m]*,[s-w]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{[c-m]*,[s-w]*}
+ ##
+}
+
+package_gambas3-gb-sdl() {
+ depends=('gambas3-gb-image-io' 'sdl_ttf' 'libxcursor' 'glew' 'libgl')
+ pkgdesc="SDL component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.sdl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-sdl-sound() {
+ depends=('gambas3-runtime' 'sdl_mixer')
+ pkgdesc="SDL sound component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.sdl.sound
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-settings() {
+ depends=('gambas3-runtime')
+ pkgdesc="Setting component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.{[c-r]*,[t-w]*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.{[c-r]*,[t-w]*}
+ ##
+}
+
+package_gambas3-gb-signal() {
+ depends=('gambas3-runtime')
+ pkgdesc="Signal component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ ## cleanup the workaround
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/{gb.[c-r]*,gb.[t-z]*,gb.so*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/{gb.[c-r]*,gb.[t-z]*}
+ ##
+}
+
+package_gambas3-gb-v4l() {
+ depends=('gambas3-runtime' 'v4l-utils' 'libjpeg' 'libpng')
+ pkgdesc="Video4linux component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.v4l
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-vb() {
+ depends=('gambas3-runtime')
+ pkgdesc="VB transitional component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ ## Workaround for splitting
+ rm -r ${pkgdir}/usr/bin
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.[a-u]*
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.[a-u]*
+ ##
+}
+
+package_gambas3-gb-xml() {
+ depends=('gambas3-runtime' 'libxml2')
+ pkgdesc="XML component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml/src/xslt
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml/src/rpc
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-xml-rpc() {
+ depends=('gambas3-gb-xml' 'gambas3-gb-net' 'gambas3-gb-net-curl')
+ pkgdesc="XML-RPC component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.curl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.net.curl
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.xml.{[c-l]*,xslt*,so*}
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.xml.{[i-l]*,x*}
+ ##
+}
+
+package_gambas3-gb-xml-xslt() {
+ depends=('gambas3-gb-xml' 'libxslt')
+ pkgdesc="XML-XSLT component"
+
+ ## workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/gb.xml/src/xslt
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+
+ ## cleanup the workaround
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ ##
+}
+
+package_gambas3-gb-web() {
+ depends=('gambas3-runtime')
+ pkgdesc="CGI component"
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" install
+ ##
+
+ cd ${srcdir}/${pkgbase}-${pkgver}/comp
+ make DESTDIR="${pkgdir}" install
+
+ ## Workaround for splitting
+ cd ${srcdir}/${pkgbase}-${pkgver}/main
+ make XDG_UTILS='' DESTDIR="${pkgdir}" uninstall
+ rm -r ${pkgdir}/usr/lib/gambas3/gb.[c-v]*
+ rm -r ${pkgdir}/usr/share/gambas3/info/gb.[c-v]*
+ ##
+}
diff --git a/community-staging/gambas3/gambas3-runtime.install b/community-staging/gambas3/gambas3-runtime.install
new file mode 100644
index 000000000..6c8201a6a
--- /dev/null
+++ b/community-staging/gambas3/gambas3-runtime.install
@@ -0,0 +1,10 @@
+post_install() {
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas3/mime/application-x-gambas.png application-x-gambas3
+ xdg-mime install /usr/share/gambas3/mime/application-x-gambas3.xml
+}
+
+pre_remove() {
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambas3
+ xdg-mime uninstall /usr/share/gambas3/mime/application-x-gambas3.xml
+}
diff --git a/community-staging/gambas3/gambas3-script.install b/community-staging/gambas3/gambas3-script.install
new file mode 100644
index 000000000..77c1aa52f
--- /dev/null
+++ b/community-staging/gambas3/gambas3-script.install
@@ -0,0 +1,15 @@
+post_install() {
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas3/mime/application-x-gambasscript.png application-x-gambasscript
+ xdg-icon-resource install --context mimetypes --size 64 \
+ /usr/share/gambas3/mime/application-x-gambasserverpage.png application-x-gambasserverpage
+ xdg-mime install /usr/share/gambas3/mime/application-x-gambasscript.xml
+ xdg-mime install /usr/share/gambas3/mime/application-x-gambasserverpage.xml
+}
+
+pre_remove() {
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambasscript
+ xdg-icon-resource uninstall --context mimetypes --size 64 application-x-gambasserverpage
+ xdg-mime uninstall /usr/share/gambas3/mime/application-x-gambasscript.xml
+ xdg-mime uninstall /usr/share/gambas3/mime/application-x-gambasserverpage.xml
+}
diff --git a/community-staging/gimp-plugin-wavelet-decompose/PKGBUILD b/community-staging/gimp-plugin-wavelet-decompose/PKGBUILD
new file mode 100644
index 000000000..b91271e0b
--- /dev/null
+++ b/community-staging/gimp-plugin-wavelet-decompose/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 62511 2012-01-20 09:51:23Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Denis Kvist <denvist@ya.ru>
+
+pkgname=gimp-plugin-wavelet-decompose
+pkgver=0.1.2
+pkgrel=2
+pkgdesc="Wavelet decompose plugin for Gimp"
+arch=('i686' 'x86_64')
+url="http://registry.gimp.org/node/11742"
+license=('GPL')
+depends=('gimp')
+source=(http://registry.gimp.org/files/wavelet-decompose-$pkgver.tar.gz \
+ po_install.diff)
+md5sums=('e0cb8670a1c5506d08f57f2300caac24'
+ '4de9e41a535f200c2502f0dd8458c43e')
+
+build() {
+ cd "$srcdir/wavelet-decompose-$pkgver"
+ patch -Np1 < ../po_install.diff
+ make
+ install -Dvm755 src/wavelet-decompose \
+ "$pkgdir"/usr/lib/gimp/2.0/plug-ins/wavelet-decompose
+ cd po
+ make LOCALEDIR="$pkgdir"/usr/share/locale install
+}
diff --git a/community-staging/gimp-plugin-wavelet-decompose/po_install.diff b/community-staging/gimp-plugin-wavelet-decompose/po_install.diff
new file mode 100644
index 000000000..4b6d1a9fe
--- /dev/null
+++ b/community-staging/gimp-plugin-wavelet-decompose/po_install.diff
@@ -0,0 +1,21 @@
+diff -c -r wavelet-denoise-0.3/po/Makefile wavelet-denoise-0.3-new/po/Makefile
+*** wavelet-denoise-0.3/po/Makefile 2008-12-14 12:19:22.000000000 +0100
+--- wavelet-denoise-0.3-new/po/Makefile 2008-12-20 14:57:51.000000000 +0100
+***************
+*** 24,30 ****
+
+ install: $(LANGUAGES)
+ for L in $(LANGUAGES); \
+! do install -v -m 0644 $$L.mo "$(LOCALEDIR)/$$L/LC_MESSAGES/gimp20-$(PLUGIN)-plug-in.mo"; \
+ done
+
+ uninstall: $(LANGUAGES)
+--- 24,31 ----
+
+ install: $(LANGUAGES)
+ for L in $(LANGUAGES); \
+! do mkdir -p "$(LOCALEDIR)/$$L/LC_MESSAGES"; \
+! install -v -m 0644 $$L.mo "$(LOCALEDIR)/$$L/LC_MESSAGES/gimp20-$(PLUGIN)-plug-in.mo"; \
+ done
+
+ uninstall: $(LANGUAGES)
diff --git a/community-staging/gnubiff-gtk/PKGBUILD b/community-staging/gnubiff-gtk/PKGBUILD
new file mode 100644
index 000000000..f57633872
--- /dev/null
+++ b/community-staging/gnubiff-gtk/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 62514 2012-01-20 09:52:01Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Tom K <tomk@runbox.com>
+# Contributor: Todd Musall <tmusall@gmail.com>
+
+pkgname=gnubiff-gtk
+pkgver=2.2.13
+pkgrel=4
+pkgdesc="Mail notification program that checks for mail and displays headers when new mail has arrived. GTK version."
+arch=('i686' 'x86_64')
+url="http://gnubiff.sourceforge.net/"
+license=("GPL")
+depends=('libglade' 'openssl' 'popt')
+makedepends=('intltool')
+conflicts=(gnubiff)
+source=(http://downloads.sourceforge.net/sourceforge/gnubiff/gnubiff-$pkgver.tar.gz
+ build.patch)
+md5sums=('65423957eb027b94c9e661611c0e4271'
+ '96fde605eb69e300f6014546d4339beb')
+
+build() {
+ cd $srcdir/gnubiff-$pkgver
+ patch -p1 <../build.patch
+ export LDFLAGS=-lX11
+ ./configure --prefix=/usr --disable-gnome --disable-fam --with-password --with-password-string="65423957eb027b94c9e661611c0e4271"
+ make
+ make DESTDIR=$pkgdir install
+ rm -rf $pkgdir/usr/lib
+ rm -rf $pkgdir/usr/share/gnome-2.0
+ rm -rf ${pkgdir}/usr/share/info/dir
+}
diff --git a/community-staging/gnubiff-gtk/build.patch b/community-staging/gnubiff-gtk/build.patch
new file mode 100644
index 000000000..523b0557e
--- /dev/null
+++ b/community-staging/gnubiff-gtk/build.patch
@@ -0,0 +1,23 @@
+diff -wbBur gnubiff-2.2.10/src/support.h gnubiff-2.2.10.my/src/support.h
+--- gnubiff-2.2.10/src/support.h 2008-03-22 05:08:51.000000000 +0300
++++ gnubiff-2.2.10.my/src/support.h 2008-04-22 14:21:58.000000000 +0400
+@@ -35,6 +35,9 @@
+ #endif
+ #include "nls.h"
+
++#include <stdlib.h>
++#define EXIT_SUCCESS 0
++#define EXIT_FAILURE 1
+
+ #include <glib.h>
+ #include <sstream>
+@@ -131,6 +134,9 @@
+ if ((pos == end) && (last < num))
+ result << sep << num;
+
++ if ((pos == end) && (last != num))
++ result << sep << num;
++
+ // Save new number
+ inf_bound = last = num;
+ }
diff --git a/community-staging/gpsim/PKGBUILD b/community-staging/gpsim/PKGBUILD
new file mode 100644
index 000000000..99ea07ca7
--- /dev/null
+++ b/community-staging/gpsim/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 62452 2012-01-20 07:07:19Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: mickael9 <mickael9 at gmail dot com>
+
+pkgname=gpsim
+pkgver=0.26.1
+pkgrel=2
+pkgdesc="A full-featured software simulator for Microchip PIC microcontrollers"
+arch=(i686 x86_64)
+url="http://gpsim.sourceforge.net/"
+license=(GPL)
+depends=('gtk2+extra' 'popt')
+makedepends=('gtk2+extra')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz)
+md5sums=('c994c23d2d75056dbefcf5d1d63596d7')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-staging/grace/PKGBUILD b/community-staging/grace/PKGBUILD
new file mode 100644
index 000000000..2d793fa6d
--- /dev/null
+++ b/community-staging/grace/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 62455 2012-01-20 07:08:00Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: damir <damir@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+
+pkgname=grace
+pkgver=5.1.22
+pkgrel=6
+pkgdesc="2D plotting tool"
+arch=(i686 x86_64)
+url="http://plasma-gate.weizmann.ac.il/Grace/"
+depends=('libjpeg' 'libpng' 'lesstif' 't1lib' 'netcdf')
+makedepends=('netcdf' 'fftw')
+license=('GPL')
+source=(ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/$pkgname-$pkgver.tar.gz)
+md5sums=('672356466f18fe59ed21a8fb44f9851d')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i '1,1i#include <zlib.h>' src/rstdrv.c
+ sed -i 's|png_ptr->jmpbuf|png_jmpbuf(png_ptr)|g' src/rstdrv.c
+ ./configure --prefix=/usr --exec-prefix=/usr \
+ --enable-grace-home=/usr/share/grace \
+ --includedir=/usr/include --libdir=/usr/lib \
+ -with-helpviewer="firefox %s"
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ cd $pkgdir/usr/share/grace && mv bin lib include ../../
+}
diff --git a/community-staging/gtk-chtheme/PKGBUILD b/community-staging/gtk-chtheme/PKGBUILD
new file mode 100644
index 000000000..4b959b86f
--- /dev/null
+++ b/community-staging/gtk-chtheme/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 62546 2012-01-20 20:23:30Z giovanni $
+# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=gtk-chtheme
+pkgver=0.3.1
+pkgrel=7
+pkgdesc="This little program lets you change your Gtk+ 2.0 theme. A better alternative to switch2"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://plasmasturm.org/programs/gtk-chtheme/"
+depends=('gtk2')
+source=("http://plasmasturm.org/programs/gtk-chtheme/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('f688053bf26dd6c4f1cd0bf2ee33de2a')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # Fix xdg compliancy
+ sed -i 's|-DGTK.*||' Makefile
+ sed -i 's|theme_list(g_.*|&\n\tread_theme_list(g_strconcat(g_get_user_data_dir(), "/themes", NULL));|' main.c
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ install -Dm755 gtk-chtheme ${pkgdir}/usr/bin/gtk-chtheme
+}
diff --git a/community-staging/gtk-engine-murrine/PKGBUILD b/community-staging/gtk-engine-murrine/PKGBUILD
new file mode 100644
index 000000000..cbcd69f86
--- /dev/null
+++ b/community-staging/gtk-engine-murrine/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 62478 2012-01-20 09:02:37Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
+# Contributor: detto <detto-brumm@freenet.de>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=gtk-engine-murrine
+pkgver=0.98.1.1
+pkgrel=3
+pkgdesc="GTK2 engine to make your desktop look like a 'murrina', an italian word meaning the art glass works done by Venicians glass blowers."
+arch=('i686' 'x86_64')
+url="http://cimitan.com/murrine/project/murrine"
+license=('LGPL3')
+depends=('gtk2')
+makedepends=('intltool')
+options=('!libtool')
+source=(http://ftp.gnome.org/pub/GNOME/sources/murrine/0.98/murrine-${pkgver}.tar.bz2)
+sha256sums=('e6a2af72674403d06c03e067d915004e8d9cdeec206f3350c7f3ee595b139912')
+
+build() {
+ cd murrine-${pkgver}
+ ./configure \
+ --prefix=/usr \
+ --enable-animation \
+ --enable-animationrtl
+ make
+}
+
+package() {
+ cd murrine-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-staging/irrlicht/PKGBUILD b/community-staging/irrlicht/PKGBUILD
new file mode 100644
index 000000000..e09464faa
--- /dev/null
+++ b/community-staging/irrlicht/PKGBUILD
@@ -0,0 +1,94 @@
+# $Id: PKGBUILD 62449 2012-01-20 06:59:03Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Hilton Medeiros <medeiros.hilton AT gmail DOT com>
+# Contributor: Ali H. Caliskan <ali.h.caliskan AT gmail DOT com>
+# Contributor: Paolo Fagni <paolo.fagni AT mail DOT com>
+# Contributor: Lukas Kropatschek <lukas.krop AT gmail DOT com>
+
+pkgname=irrlicht
+pkgver=1.7.2
+pkgrel=4
+pkgdesc="An open source high performance realtime 3D graphics engine."
+arch=('i686' 'x86_64')
+url="http://irrlicht.sourceforge.net/"
+license=('ZLIB')
+depends=('libgl' 'libjpeg' 'bzip2' 'libpng')
+makedepends=('mesa' 'unzip')
+source=("http://downloads.sourceforge.net/irrlicht/$pkgname-$pkgver.zip"
+ "irrlicht-1.7.2-libpng15.patch")
+md5sums=('eb627d4c432bf73f12bc6d9ddc700b07'
+ 'a7f8d4aa1bc2880bbeaf3449e09f69a5')
+noextract=($pkgname-$pkgver.zip)
+
+build() {
+ unzip $pkgname-$pkgver.zip
+
+ cd $srcdir/$pkgname-$pkgver
+
+ patch -Np0 < $srcdir/irrlicht-1.7.2-libpng15.patch
+
+ sed -i -e '/^#.*NON_SYSTEM_ZLIB/d' \
+ -e '/^#.*NON_SYSTEM_JPEG/d' \
+ -e '/^#.*NON_SYSTEM_LIB_PNG/d' \
+ -e '/^#.*NON_SYSTEM_BZLIB/d' \
+ include/IrrCompileConfig.h
+
+ cd source/Irrlicht
+ sed -i -e '/^CXXFLAGS/s:-g.*::' \
+ -e '/^CXXFLAGS/s:-Wall::' \
+ -e '/^CFLAGS/s/:= -O3 -fexpensive-optimizations/+=/' \
+ -e '/^CXXINCS/s:-Izlib -Ijpeglib -Ilibpng::' \
+ -e '/^ZLIBOBJ/d' \
+ -e '/^JPEGLIBOBJ/d' \
+ -e '/^BZIP2OBJ/d' \
+ -e '/^LIBPNGOBJ/d' \
+ -e '/.o=.d/d' \
+ -e '/^staticlib sharedlib: LDFLAGS/s:+=.*:+= -lGL -lXxf86vm -lpng -ljpeg -lbz2 -lz:' \
+ -e "/^INSTALL_DIR/s:=.*:=$pkgdir/usr/lib:" \
+ -e 's/0-SVN/1/' \
+ -e 's/.$(VERSION_MINOR) -o/ -o/' \
+ Makefile
+
+ sed -i "s/png_set_gray_1_2_4_to_8/png_set_expand_gray_1_2_4_to_8/" \
+ CImageLoaderPNG.cpp
+
+ make sharedlib
+
+ make
+
+ install -d $pkgdir/usr/lib \
+ $pkgdir/usr/share/licenses/$pkgname \
+ $pkgdir/usr/share/$pkgname/examples/bin \
+ $pkgdir/usr/share/doc/$pkgname
+
+ make install
+
+ cd $srcdir/$pkgname-$pkgver/
+ install -m644 readme.txt $pkgdir/usr/share/licenses/$pkgname
+
+ # Install static library and fix headers permissions
+ install -m644 lib/Linux/libIrrlicht.a $pkgdir/usr/lib
+ chmod 644 $pkgdir/usr/include/$pkgname/*
+
+ # Install media files for examples
+ cp -r media $pkgdir/usr/share/$pkgname
+
+ # Install documentation
+ cp -r doc/* $pkgdir/usr/share/doc/$pkgname
+ rm -f $pkgdir/usr/share/doc/$pkgname/*.txt
+
+ cd $pkgdir/usr/lib
+ ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
+
+ # Just a helper for examples compilation
+ ln -s libIrrlicht.so.$pkgver $srcdir/$pkgname-$pkgver/lib/Linux/libIrrlicht.so
+
+ # Edit, build and install the examples
+ cd $srcdir/$pkgname-$pkgver/examples
+ sed -i '/define USE_IRRKLANG/s:.*://&:' ./Demo/CDemo.h
+ sed -i '/^CXXFLAGS/d' $(grep -Rl "^CXXFLAGS =" *)
+
+ make
+
+ install -m755 ../bin/Linux/* /$pkgdir/usr/share/$pkgname/examples/bin/
+}
diff --git a/community-staging/irrlicht/irrlicht-1.7.2-libpng15.patch b/community-staging/irrlicht/irrlicht-1.7.2-libpng15.patch
new file mode 100644
index 000000000..a1426bf29
--- /dev/null
+++ b/community-staging/irrlicht/irrlicht-1.7.2-libpng15.patch
@@ -0,0 +1,40 @@
+--- source/Irrlicht/CImageLoaderPNG.cpp
++++ source/Irrlicht/CImageLoaderPNG.cpp
+@@ -28,7 +28,7 @@
+ static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
+ {
+ os::Printer::log("PNG FATAL ERROR", msg, ELL_ERROR);
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+ // PNG function for file reading
+@@ -37,7 +37,7 @@
+ png_size_t check;
+
+ // changed by zola {
+- io::IReadFile* file=(io::IReadFile*)png_ptr->io_ptr;
++ io::IReadFile* file=(io::IReadFile*)png_get_io_ptr(png_ptr);
+ check=(png_size_t) file->read((void*)data,(u32)length);
+ // }
+
+--- source/Irrlicht/CImageWriterPNG.cpp
++++ source/Irrlicht/CImageWriterPNG.cpp
+@@ -35,7 +35,7 @@
+ static void png_cpexcept_error(png_structp png_ptr, png_const_charp msg)
+ {
+ os::Printer::log("PNG FATAL ERROR", msg, ELL_ERROR);
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+ // PNG function for file writing
+@@ -43,7 +43,7 @@
+ {
+ png_size_t check;
+
+- io::IWriteFile* file=(io::IWriteFile*)png_ptr->io_ptr;
++ io::IWriteFile* file=(io::IWriteFile*)png_get_io_ptr(png_ptr);
+ check=(png_size_t) file->write((const void*)data,(u32)length);
+
+ if (check != length)
diff --git a/community-staging/megaglest/PKGBUILD b/community-staging/megaglest/PKGBUILD
new file mode 100644
index 000000000..fda998a3c
--- /dev/null
+++ b/community-staging/megaglest/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 62444 2012-01-20 06:40:44Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>
+
+pkgname=megaglest
+pkgver=3.6.0.2
+pkgrel=2
+pkgdesc="Fork of Glest, a 3D real-time strategy game in a fantastic world."
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/megaglest/"
+license=('GPL3')
+depends=('curl' 'megaglest-data' 'xerces-c' 'sdl' 'libvorbis' 'openal' 'libgl' 'lua' 'icu' 'ftgl' 'glew'
+ 'libircclient' 'miniupnpc' 'wxgtk')
+makedepends=('ftjam' 'cmake' 'mesa')
+source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-source-${pkgver}.tar.xz")
+md5sums=('9d840a04b41aef2cba503de7bf433b8d')
+
+build() {
+ cd "${srcdir}"/"${pkgname}"-"${pkgver}"/
+
+ [[ -d build ]] && rm -r build
+ mkdir build && cd build
+ cmake .. \
+ -DWANT_SVN_STAMP=OFF \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
+ make
+}
+
+package() {
+ cd "${srcdir}"/"${pkgname}"-"${pkgver}"/
+
+ cd build
+ make DESTDIR="$pkgdir" install
+}
+
+# vim: sw=2:ts=2 et:
diff --git a/community-staging/megaglest/megaglest.sh b/community-staging/megaglest/megaglest.sh
new file mode 100644
index 000000000..571a01be7
--- /dev/null
+++ b/community-staging/megaglest/megaglest.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+ # Wrapper script for Megaglest.
+
+ MAINDIR=/usr/share/megaglest
+ BASEDIR="$HOME/.config"
+ DIR="$BASEDIR/megaglest"
+ if [ ! -d "$DIR" ]; then
+ mkdir -p $DIR
+ fi
+ cd $DIR
+ [ -f glest.ini ] || cp /usr/share/megaglest/glest.ini .
+ [ -h megaglest ] || ln -s /usr/share/megaglest/megaglest .
+ [ -f servers.ini ] || cp $MAINDIR/servers.ini .
+ [ -f glestkeys.ini ] || cp $MAINDIR/glestkeys.ini .
+ for i in data scenarios techs tilesets tutorials; do
+ [ -h $i ] || ln -s $MAINDIR/$i .
+ done
+ [ -d maps ] || mkdir maps
+ [ -d screens ] || mkdir screens
+ cd maps
+ for i in $MAINDIR/maps/*; do
+ [ -h `basename $i` ] || ln -s $i .
+ done
+ cd ..
+
+ exec ./megaglest \ No newline at end of file
diff --git a/community-staging/naev/PKGBUILD b/community-staging/naev/PKGBUILD
new file mode 100644
index 000000000..477dfb137
--- /dev/null
+++ b/community-staging/naev/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 62441 2012-01-20 06:29:53Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Johan Rehnberg <cleanrock@gmail.com>
+
+pkgname=naev
+pkgver=0.5.0
+pkgrel=2
+pkgdesc='2D action/rpg space game'
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/naev/"
+license=('GPL3')
+depends=('openal' 'libvorbis' 'sdl_image' 'sdl_mixer' 'libgl' 'libxml2' 'freetype2' 'libpng' 'naev-data')
+makedepends=('freeglut')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('f7d754a17ace87aac540d0d6d48313d6')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ sed -i "41 i #include <zlib.h>" src/opengl.c
+
+ ./configure --prefix=/usr --disable-debug --disable-shave --with-ndata-path=/usr/share/naev/ndata-${pkgver}
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/community-staging/openimageio/PKGBUILD b/community-staging/openimageio/PKGBUILD
new file mode 100644
index 000000000..dd91ef261
--- /dev/null
+++ b/community-staging/openimageio/PKGBUILD
@@ -0,0 +1,50 @@
+# Contributor: SpepS <dreamspepser at yahoo dot it>
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+
+_pkg=OpenImageIO
+pkgname=openimageio
+pkgver=0.10.4
+pkgrel=5
+pkgdesc="A library for reading and writing images, including classes, utilities, and applications."
+arch=(i686 x86_64)
+url="http://www.openimageio.org/"
+license=('custom')
+depends=('openexr' 'boost-libs' 'jasper' 'glew')
+makedepends=('cmake' 'qt' 'python2' 'boost')
+optdepends=('qt: iv image viewer' 'python2: bindings support')
+options=(!buildflags)
+source=("https://github.com/$_pkg/oiio/tarball/Release-${pkgver/_/-}"
+ "openimageio-0.10.2-libpng15.patch")
+md5sums=('08a1bc2b82862ad5547bba569f4f633f'
+ 'd12829808610a54b6bc3350dc5419db3')
+
+build() {
+ cd "$srcdir"/$_pkg*
+
+ # remove insecure rpath
+ sed -i "/RPATH/d" src/CMakeLists.txt
+
+ patch -d src/ -Np0 < $srcdir/openimageio-0.10.2-libpng15.patch
+
+ # strange bug on i686, see https://github.com/OpenImageIO/oiio/issues/204
+ [[ $CARCH == "i686" ]] && make debug || make
+}
+
+package() {
+ cd "$srcdir"/$_pkg*/dist/*
+
+ # prepare dirs
+ install -d "$pkgdir"/usr/{share/doc/$_pkg,lib/python2.7/site-packages}
+
+ # bin
+ cp -r bin include lib "$pkgdir/usr"
+
+ # docs
+ cp -r doc/* "$pkgdir/usr/share/doc/$_pkg"
+
+ # python module
+ cp -r python/* "$pkgdir/usr/lib/python2.7/site-packages"
+
+ # license
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/community-staging/openimageio/openimageio-0.10.2-libpng15.patch b/community-staging/openimageio/openimageio-0.10.2-libpng15.patch
new file mode 100644
index 000000000..97375d5fb
--- /dev/null
+++ b/community-staging/openimageio/openimageio-0.10.2-libpng15.patch
@@ -0,0 +1,11 @@
+--- ico.imageio/icooutput.cpp
++++ ico.imageio/icooutput.cpp
+@@ -32,6 +32,8 @@
+ #include <cstdlib>
+ #include <cmath>
+
++#include <zlib.h> /* Z_BEST_COMPRESSION */
++
+ #include "ico.h"
+ #include "../png.imageio/png_pvt.h"
+
diff --git a/community-staging/perl-gnome2-wnck/PKGBUILD b/community-staging/perl-gnome2-wnck/PKGBUILD
new file mode 100644
index 000000000..3fc8e5ce6
--- /dev/null
+++ b/community-staging/perl-gnome2-wnck/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 62480 2012-01-20 09:03:15Z spupykin $
+# Maintainer Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
+
+pkgname=perl-gnome2-wnck
+pkgver=0.16
+pkgrel=5
+pkgdesc="Perl interface to the Window Navigator Construction Kit"
+arch=('i686' 'x86_64')
+license=("GPL" "Artistic")
+url="http://search.cpan.org/dist/Gnome2-Wnck"
+depends=('perl' 'perl-extutils-depends' 'perl-extutils-pkgconfig' 'gnome-perl' 'libwnck')
+options=('!emptydirs')
+source=("http://search.cpan.org/CPAN/authors/id/T/TS/TSCH/Gnome2-Wnck-${pkgver}.tar.gz")
+md5sums=('439f4569ffd7af96ef1d3feaab23760e')
+
+build() {
+ cd Gnome2-Wnck-${pkgver}
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd Gnome2-Wnck-${pkgver}
+ make install DESTDIR=${pkgdir}
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/perl-gtk2-sexy/PKGBUILD b/community-staging/perl-gtk2-sexy/PKGBUILD
new file mode 100644
index 000000000..de257199e
--- /dev/null
+++ b/community-staging/perl-gtk2-sexy/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 62482 2012-01-20 09:03:53Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Charles Mauch <cmauch@gmail.com>
+# Creator: Florian Ragwitz <http://search.cpan.org/~/>
+
+pkgname=perl-gtk2-sexy
+pkgver=0.05
+pkgrel=6
+pkgdesc="Perl/CPAN Module Gtk2::Sexy"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/Gtk2-Sexy"
+license=('GPL' 'PerlArtistic')
+depends=('gtk2' 'libsexy')
+makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends' 'gtk2-perl')
+options=(docs !emptydirs)
+source=("http://www.cpan.org/authors/id/F/FL/FLORA/Gtk2-Sexy-${pkgver}.tar.gz")
+md5sums=('3e291808250d7b956ba8443013a1b461')
+
+build() {
+ cd Gtk2-Sexy-${pkgver}
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd Gtk2-Sexy-${pkgver}
+ make install DESTDIR=${pkgdir}
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/perl-gtk2-trayicon/PKGBUILD b/community-staging/perl-gtk2-trayicon/PKGBUILD
new file mode 100644
index 000000000..b292dc294
--- /dev/null
+++ b/community-staging/perl-gtk2-trayicon/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 62484 2012-01-20 09:04:30Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Tom K <tomk@runbox.com>
+
+pkgname=perl-gtk2-trayicon
+pkgver=0.06
+pkgrel=8
+pkgdesc="Perl interface to the EggTrayIcon library"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/Gtk2-TrayIcon/"
+depends=('gtk2-perl')
+makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
+license=("GPL")
+options=('!emptydirs')
+source=("http://downloads.sourceforge.net/sourceforge/gtk2-perl/Gtk2-TrayIcon-${pkgver}.tar.gz")
+md5sums=('522c328f14681a25d76eeaf317e05049')
+
+build() {
+ cd Gtk2-TrayIcon-${pkgver}
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd Gtk2-TrayIcon-${pkgver}
+ make install DESTDIR=${pkgdir}
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/perl-gtk2-webkit/PKGBUILD b/community-staging/perl-gtk2-webkit/PKGBUILD
new file mode 100644
index 000000000..0b7126ad3
--- /dev/null
+++ b/community-staging/perl-gtk2-webkit/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 62556 2012-01-21 09:12:45Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Corrado Primier <bardo@aur.archlinux.org>
+
+pkgname=perl-gtk2-webkit
+pkgver=0.09
+pkgrel=2
+pkgdesc="Gtk2::WebKit"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/Gtk2-WebKit"
+license=('GPL' 'PerlArtistic')
+depends=('perl' 'gtk2-perl' 'libwebkit' 'perl-extutils-depends' 'perl-extutils-pkgconfig')
+options=('!emptydirs')
+source=(http://www.cpan.org/authors/id/F/FL/FLORA/Gtk2-WebKit-${pkgver}.tar.gz)
+md5sums=('e696fc2b15d6189370e19bce9a9e56f3')
+
+build() {
+ cd Gtk2-WebKit-${pkgver}
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd Gtk2-WebKit-${pkgver}
+ make install DESTDIR=${pkgdir}
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/png2ico/PKGBUILD b/community-staging/png2ico/PKGBUILD
new file mode 100644
index 000000000..135b1fee6
--- /dev/null
+++ b/community-staging/png2ico/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 62486 2012-01-20 09:05:08Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=png2ico
+pkgver=20021208
+pkgrel=5
+arch=('i686' 'x86_64')
+pkgdesc="Converts PNG files to Windows icon resource files"
+url="http://www.winterdrache.de/freeware/png2ico/"
+license=("GPL2")
+depends=('libpng' 'gcc')
+source=(http://www.winterdrache.de/freeware/png2ico/data/$pkgname-src-2002-12-08.tar.gz)
+md5sums=('9b663df81c826cd564638cba2e6bc75b')
+
+build() {
+ cd ${srcdir}/${pkgname}
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}
+ install -D -m755 png2ico ${pkgdir}/usr/bin/png2ico
+ install -D -m644 doc/png2ico.1 ${pkgdir}/usr/share/man/man1/png2ico.1
+}
diff --git a/community-staging/pyqt3/PKGBUILD b/community-staging/pyqt3/PKGBUILD
new file mode 100644
index 000000000..53ea4b36c
--- /dev/null
+++ b/community-staging/pyqt3/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 62488 2012-01-20 09:05:44Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: riai <riai@bigfoot.com> Ben <ben@benmazer.net>
+
+pkgname=pyqt3
+pkgver=3.18.1
+pkgrel=10
+pkgdesc="A set of Python bindings for the Qt3 toolkit"
+arch=('i686' 'x86_64')
+url="http://www.riverbankcomputing.com/software/pyqt/intro"
+depends=('python2-sip' 'qscintilla-qt3')
+license=('GPL')
+source=("http://www.riverbankcomputing.com/static/Downloads/PyQt3/PyQt-x11-gpl-${pkgver}.tar.gz")
+md5sums=('f1d120495d1aaf393819e988c0a7bb7e')
+
+build() {
+ cd ${srcdir}/PyQt-x11-gpl-${pkgver}
+ . /etc/profile.d/qt3.sh
+ echo yes | python2 configure.py -b /usr/bin \
+ -d /usr/lib/python2.7/site-packages \
+ -v /usr/share/sip
+ make
+}
+
+package() {
+ cd ${srcdir}/PyQt-x11-gpl-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-staging/python-galago-gtk/PKGBUILD b/community-staging/python-galago-gtk/PKGBUILD
new file mode 100644
index 000000000..63427fcf1
--- /dev/null
+++ b/community-staging/python-galago-gtk/PKGBUILD
@@ -0,0 +1,22 @@
+# $Id: PKGBUILD 62490 2012-01-20 09:06:25Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: William Rea <sillywilly@gmail.com>
+
+pkgname=python-galago-gtk
+pkgver=0.5.0
+pkgrel=6
+pkgdesc="A library of simple functions that are optimized for various CPUs"
+arch=('i686' 'x86_64')
+url="http://galago-project.org"
+options=('!libtool')
+license=('LGPL')
+depends=('libgalago-gtk' 'pygtk' 'python-galago')
+source=(http://galago-project.org/files/releases/source/galago-gtk-python/galago-gtk-python-$pkgver.tar.bz2)
+md5sums=('3eb752eaa87d986bf272cf1266528c43')
+
+build() {
+ cd $srcdir/galago-gtk-python-$pkgver
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=$pkgdir install
+}
diff --git a/community-staging/qcad/PKGBUILD b/community-staging/qcad/PKGBUILD
new file mode 100644
index 000000000..a357e619f
--- /dev/null
+++ b/community-staging/qcad/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 62494 2012-01-20 09:33:08Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: Giovanni Scafora <linuxmania@gmail.com>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=qcad
+pkgver=2.0.5.0
+pkgrel=9
+pkgdesc="A 2D CAD package based upon Qt"
+arch=('i686' 'x86_64')
+url="http://www.ribbonsoft.com/qcad.html"
+license=('GPL2')
+depends=('qt3')
+options=(libtool)
+source=(http://www.ribbonsoft.com/archives/$pkgname/$pkgname-$pkgver-1-community.src.tar.gz
+ qcad.xpm
+ QCad.desktop
+ qcad-intptr.patch
+ qcad.patch)
+ # http://ghost1227.com/files/misc/qm.tar.gz)
+md5sums=('96b6a56027782aec953c9c4e64c5998c'
+ 'da32fec0d2fb85d96126bf28bb0ab9ff'
+ 'b4d1eb6724b4b41f191f1ab6fd859c39'
+ '92f900fe1fd3a8f841232b587b49c7da'
+ '7e6779b1e3b10da1eb4daf36d93f8479')
+
+build() {
+ export PATH="/opt/qt/bin:$PATH"
+ export QTDIR=/opt/qt
+
+ cd ${srcdir}/${pkgname}-2.0.5.0-1-community.src
+
+ #Arch64 fix - gentoo patch
+ [ "$CARCH" = "x86_64" ] && patch -p1 < ../qcad-intptr.patch
+ patch -p1 < ../qcad.patch
+ sed -i "s:"-pedantic"::g" mkspecs/defs.pro
+
+ cd scripts
+ ./build_qcad.sh notrans
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-2.0.5.0-1-community.src/qcad
+
+ install -D -m755 qcad ${pkgdir}/usr/bin/qcad
+ install -d ${pkgdir}/usr/share/{qcad,pixmaps,applications}
+ install -m644 ../../qcad.xpm ${pkgdir}/usr/share/pixmaps/qcad.xpm
+ install -m644 ../../QCad.desktop \
+ ${pkgdir}/usr/share/applications/QCad.desktop
+ cp -r fonts patterns data library machines ${pkgdir}/usr/share/qcad
+ #cp -r ${srcdir}/qm ${pkgdir}/usr/share/qcad/
+}
diff --git a/community-staging/qcad/QCad.desktop b/community-staging/qcad/QCad.desktop
new file mode 100644
index 000000000..a55f5940f
--- /dev/null
+++ b/community-staging/qcad/QCad.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=/usr/bin/qcad
+Icon=/usr/share/pixmaps/qcad.xpm
+Name=QCad
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Application;Office;
diff --git a/community-staging/qcad/qcad-intptr.patch b/community-staging/qcad/qcad-intptr.patch
new file mode 100644
index 000000000..6d8b6acca
--- /dev/null
+++ b/community-staging/qcad/qcad-intptr.patch
@@ -0,0 +1,24 @@
+diff -Naur qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_entity.cpp qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_entity.cpp
+--- qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_entity.cpp 2004-09-14 15:13:02.000000000 -0500
++++ qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_entity.cpp 2006-06-23 14:21:40.000000000 -0500
+@@ -849,7 +849,7 @@
+ os << " layer: NULL ";
+ } else {
+ os << " layer: " << e.layer->getName().latin1() << " ";
+- os << " layer address: " << (int)(e.layer) << " ";
++ os << " layer address: " << (intptr_t)(e.layer) << " ";
+ }
+
+ os << e.pen << "\n";
+diff -Naur qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_layer.cpp qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_layer.cpp
+--- qcad-2.0.4.0-1.src.orig/qcadlib/src/engine/rs_layer.cpp 2004-09-14 15:13:02.000000000 -0500
++++ qcad-2.0.4.0-1.src.patched/qcadlib/src/engine/rs_layer.cpp 2006-06-23 14:21:23.000000000 -0500
+@@ -57,7 +57,7 @@
+ os << " name: " << l.getName().latin1()
+ << " pen: " << l.getPen()
+ << " frozen: " << (int)l.isFrozen()
+- << " address: " << (int)(&l)
++ << " address: " << (intptr_t)(&l)
+ << std::endl;
+ return os;
+ }
diff --git a/community-staging/qcad/qcad.patch b/community-staging/qcad/qcad.patch
new file mode 100644
index 000000000..f051f29af
--- /dev/null
+++ b/community-staging/qcad/qcad.patch
@@ -0,0 +1,52 @@
+diff -aur qcad-2.0.5.0-1-community.src.orig/dxflib/src/dl_writer.h qcad-2.0.5.0-1-community.src.new/dxflib/src/dl_writer.h
+--- qcad-2.0.5.0-1-community.src.orig/dxflib/src/dl_writer.h 2008-12-11 22:28:20.000000000 +0100
++++ qcad-2.0.5.0-1-community.src.new/dxflib/src/dl_writer.h 2008-12-11 22:29:51.000000000 +0100
+@@ -37,6 +37,7 @@
+ #endif
+
+ #include <iostream>
++#include <cstring>
+
+ #include "dl_attributes.h"
+ #include "dl_codes.h"
+diff -aur qcad-2.0.5.0-1-community.src.orig/qcadactions/src/rs_actionzoompan.cpp qcad-2.0.5.0-1-community.src.new/qcadactions/src/rs_actionzoompan.cpp
+--- qcad-2.0.5.0-1-community.src.orig/qcadactions/src/rs_actionzoompan.cpp 2008-12-11 22:28:20.000000000 +0100
++++ qcad-2.0.5.0-1-community.src.new/qcadactions/src/rs_actionzoompan.cpp 2008-12-11 22:29:51.000000000 +0100
+@@ -23,7 +23,7 @@
+ ** not clear to you.
+ **
+ **********************************************************************/
+-
++#include <cstdlib>
+ #include "rs_actionzoompan.h"
+ #include "rs_snapper.h"
+ #include "rs_point.h"
+Nur in qcad-2.0.5.0-1-community.src.new/qcadlib/src/engine: rs_entity.cpp.orig.rej.
+Nur in qcad-2.0.5.0-1-community.src.new/qcadlib/src/engine: rs_entity.cpp.rej.
+Nur in qcad-2.0.5.0-1-community.src.new/qcadlib/src/engine: rs_layer.cpp.orig.rej.
+Nur in qcad-2.0.5.0-1-community.src.new/qcadlib/src/engine: rs_layer.cpp.rej.
+diff -aur qcad-2.0.5.0-1-community.src.orig/qcadlib/src/information/rs_information.cpp qcad-2.0.5.0-1-community.src.new/qcadlib/src/information/rs_information.cpp
+--- qcad-2.0.5.0-1-community.src.orig/qcadlib/src/information/rs_information.cpp 2008-12-11 22:28:20.000000000 +0100
++++ qcad-2.0.5.0-1-community.src.new/qcadlib/src/information/rs_information.cpp 2008-12-11 22:30:18.000000000 +0100
+@@ -25,7 +25,7 @@
+ **********************************************************************/
+
+ #include "rs_information.h"
+-
++#include <cstdlib>
+ #include "rs_constructionline.h"
+
+
+diff -aur qcad-2.0.5.0-1-community.src.orig/scripts/build_qcad.sh qcad-2.0.5.0-1-community.src.new/scripts/build_qcad.sh
+--- qcad-2.0.5.0-1-community.src.orig/scripts/build_qcad.sh 2008-12-11 22:28:20.000000000 +0100
++++ qcad-2.0.5.0-1-community.src.new/scripts/build_qcad.sh 2008-12-11 22:31:37.000000000 +0100
+@@ -16,9 +16,6 @@
+ echo " distcc use distcc for distributed compilation. DISTCC_HOSTS must be set."
+ echo
+
+-echo "QTDIR is: $QTDIR"
+-echo "QMAKESPEC is: $QMAKESPEC"
+-
+ # detect system:
+ if [ "x$OS" == "xWindows_NT" ]
+ then
diff --git a/community-staging/qcad/qcad.xpm b/community-staging/qcad/qcad.xpm
new file mode 100644
index 000000000..e747fa984
--- /dev/null
+++ b/community-staging/qcad/qcad.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static const char * qcad_xpm[] = {
+"32 32 97 2",
+" c None",
+". c #3F3F3F",
+"+ c #010180",
+"@ c #FFFFFF",
+"# c #E0E0EF",
+"$ c #41419F",
+"% c #4545A1",
+"& c #4949A3",
+"* c #4D4DA5",
+"= c #5151A7",
+"- c #5555A9",
+"; c #5959AB",
+"> c #4444A2",
+", c #3C3C9D",
+"' c #40409F",
+") c #4444A1",
+"! c #4848A3",
+"~ c #4C4CA5",
+"{ c #5050A7",
+"] c #5454A9",
+"^ c #5858AB",
+"/ c #5D5DAD",
+"( c #6161AF",
+"_ c #6565B1",
+": c #5C5CAD",
+"< c #6060AF",
+"[ c #6464B1",
+"} c #6868B3",
+"| c #6C6CB5",
+"1 c #7070B7",
+"2 c #7474B9",
+"3 c #7878BB",
+"4 c #3F3F9E",
+"5 c #4343A0",
+"6 c #4747A3",
+"7 c #4B4BA5",
+"8 c #000000",
+"9 c #7C7CBD",
+"0 c #8080BF",
+"a c #4747A2",
+"b c #4B4BA4",
+"c c #4F4FA6",
+"d c #7B7BBD",
+"e c #7F7FBF",
+"f c #8383C1",
+"g c #5353A8",
+"h c #8787C3",
+"i c #5757AA",
+"j c #8B8BC5",
+"k c #4E4EA6",
+"l c #5252A8",
+"m c #5656AA",
+"n c #5A5AAC",
+"o c #8787C2",
+"p c #8F8FC7",
+"q c #5E5EAE",
+"r c #8B8BC4",
+"s c #8F8FC6",
+"t c #9393C8",
+"u c #6262B0",
+"v c #8E8EC6",
+"w c #9292C8",
+"x c #9696CA",
+"y c #6666B2",
+"z c #9A9ACC",
+"A c #6A6AB4",
+"B c #9E9ECE",
+"C c #6565B2",
+"D c #6969B4",
+"E c #6D6DB6",
+"F c #7171B8",
+"G c #7575BA",
+"H c #9D9DCE",
+"I c #A1A1D0",
+"J c #7171B7",
+"K c #7575B9",
+"L c #7979BC",
+"M c #7D7DBE",
+"N c #8181C0",
+"O c #8585C2",
+"P c #8989C4",
+"Q c #8D8DC6",
+"R c #9191C8",
+"S c #9595CA",
+"T c #9999CC",
+"U c #A5A5D2",
+"V c #7979BB",
+"W c #7D7DBD",
+"X c #8181BF",
+"Y c #8585C1",
+"Z c #8989C3",
+"` c #A9A9D4",
+" . c #8D8DC5",
+".. c #9191C7",
+"+. c #9595C9",
+"@. c #9999CB",
+"#. c #ADADD6",
+" ",
+" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+" . . . . . . . . ",
+" . . . + + + + + + + . . . ",
+" . @ . @ + + # # # # # # # + + @ . @ . @ . ",
+" . . . . . . . + # # $ % & * = - ; > > + . . . . . . . . . ",
+" . . + # , ' ) ! ~ { ] ^ / ( _ > + . . ",
+" . . + # , ' ) ! ~ { ] ^ : < [ } | > + . . ",
+" . @ + # , ' ) ! ~ { ] ^ : < [ } | 1 2 > + @ . @ . ",
+" . . . . + # ' ) ! . . . . . . . . . 1 2 3 > + . . . . . . ",
+" . + # 4 5 6 7 . @ @ @ @ @ @ @ . 8 3 9 0 > + . . ",
+" . + # 5 a b c . @ @ @ @ @ @ @ . 8 d e f > + . . ",
+" . + # a b c g . @ @ @ @ @ @ @ . 8 e f h > + . @ . ",
+" . . . + # b c g i . @ @ @ @ @ @ @ . 8 f h j > + . . . . . ",
+" . + # k l m n . @ @ @ @ @ @ @ . 8 o j p > + . . ",
+" . + # l m n q . @ @ @ @ @ @ @ . 8 r s t > + . . ",
+" . + # m n q u . @ @ @ @ @ @ @ . 8 v w x > + . @ . ",
+" . . . + # n q u y . @ @ @ @ @ @ @ . 8 w x z > + . . . . . ",
+" . + # q u y A . @ @ @ @ @ @ @ . 8 x z B > + . . ",
+" . + > C D E . . . . . . . . . 8 z B > + . . ",
+" . @ + > D E F G 8 8 8 8 8 8 8 8 8 H I > + @ . @ . ",
+" . . . . . + > J K L M N O P Q R S T H I U + . . . . . . . ",
+" . . + > V W X Y Z Q R S T H I U ` > + . . ",
+" . . + > > Y Z ...+.@.H > U ` #.#.> + . . ",
+" . @ . @ + + > > > > > > > + > #.#.#.> + . @ . ",
+" . . . . . . . . . . + + + + + + + . + > #.#.> + . . . . . ",
+" . . . . . + > > + . . ",
+" . . . . . + + . . ",
+" . @ . @ . @ . @ . @ . @ . @ . ",
+" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+" ",
+" "};
diff --git a/community-staging/remmina-plugins/PKGBUILD b/community-staging/remmina-plugins/PKGBUILD
new file mode 100644
index 000000000..54e6082f3
--- /dev/null
+++ b/community-staging/remmina-plugins/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 62496 2012-01-20 09:33:49Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Stijn Segers <francesco dot borromini at gmail dot com>
+
+pkgname=remmina-plugins
+pkgver=0.9.2
+pkgrel=3
+pkgdesc="Remina plugins"
+#"Remmina supports multiple network protocols in an integrated and consistant user interface.
+# Currently RDP, VNC, XDMCP and SSH are supported."
+arch=(i686 x86_64)
+url="http://sourceforge.net/projects/remmina/"
+license=('GPL')
+conflicts=(remmina-plugins-svn)
+depends=("remmina>=0.9.0" freerdp libxkbfile telepathy-glib)
+makedepends=(intltool pkgconfig gettext perl avahi)
+install=remmina-plugins.install
+options=('!libtool')
+source=(http://downloads.sourceforge.net/project/remmina/0.9/$pkgname-$pkgver.tar.gz)
+md5sums=('6f6b7cb18f7604f3f17eeda5173ede6a')
+
+build() {
+ cd $srcdir/${pkgname}-${pkgver}
+ ./configure --prefix=/usr --enable-ssh --enable-rdp \
+ --enable-vnc --enable-xdmcp --enable-nx \
+ --enable-telepathy
+ make
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-staging/remmina-plugins/remmina-plugins.install b/community-staging/remmina-plugins/remmina-plugins.install
new file mode 100644
index 000000000..1a05f573e
--- /dev/null
+++ b/community-staging/remmina-plugins/remmina-plugins.install
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/community-staging/scorched3d/PKGBUILD b/community-staging/scorched3d/PKGBUILD
new file mode 100644
index 000000000..8a481c910
--- /dev/null
+++ b/community-staging/scorched3d/PKGBUILD
@@ -0,0 +1,64 @@
+# Contributor: Seppo Porspakka <sporspak@paju.oulu.fi>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=scorched3d
+pkgver=43.2a
+pkgrel=2
+pkgdesc="A 3d artillery combat game"
+arch=('i686' 'x86_64')
+url="http://www.scorched3d.co.uk/"
+license=('GPL')
+depends=('sdl_net' 'wxgtk' 'freealut>=1.0.0-3' 'libvorbis' 'mesa' 'fftw' 'libjpeg>=8' 'xdg-utils')
+makedepends=('sharutils')
+install=scorched3d.install
+source=("http://downloads.sourceforge.net/${pkgname}/Scorched3D-${pkgver}-src.tar.gz"
+ 'scorched3d.desktop'
+ 'scorched3d.png.uu'
+ 'scorched3d-42.1-gcc43.patch'
+ 'scorched3d-42.1-fixups.patch'
+ 'scorched3d-libpng1.5.patch'
+ 'libpng14.patch')
+md5sums=('876de173218fd83a2b0a30255ba694fa'
+ 'b951f2150004e10fdff3e6226f1a3939'
+ '178a281333006c6a5a92919865c1d7af'
+ '053769f77a38c252eef1d967b18e93e6'
+ 'dfde556559d95bca07c4a390c60790b4'
+ 'ec6958191751b5a2c44aa15abfc75269'
+ 'c8c03855fd3693122fd39427fa3638c1')
+
+build() {
+ cd scorched
+
+# patch -Np1 -i ${srcdir}/scorched3d-42.1-gcc43.patch
+ patch -Np1 -i ${srcdir}/scorched3d-42.1-fixups.patch
+ patch -Np1 -i ${srcdir}/scorched3d-libpng1.5.patch
+# patch -Np0 -i ${srcdir}/libpng14.patch
+
+ WANT_WXGTK=gtk2
+ sh autogen.sh \
+ --prefix=/usr \
+ --datadir=/usr/share/scorched3d \
+ --disable-openaltest \
+ --with-wx-config=wx-config
+
+ #sed -i 's/-lz/-lz -lalut/g' src/scorched/Makefile || return 1
+ #sed -i 's|/usr/local/lib/libwx_gtk-2.4.a||' src/scorched/Makefile || return 1
+
+ make
+}
+
+package() {
+ cd scorched
+
+ make DESTDIR=${pkgdir} install
+
+ # freedesktop stuff - png and desktop file ganked from debian
+ cd ${srcdir}
+
+ uudecode --output-file=scorched3d.png scorched3d.png.uu
+
+ install -D -m644 scorched3d.png \
+ ${pkgdir}/usr/share/icons/hicolor/48x48/apps/${pkgname}.png
+ install -D -m644 scorched3d.desktop \
+ ${pkgdir}/usr/share/applications/${pkgname}.desktop
+}
diff --git a/community-staging/scorched3d/libpng14.patch b/community-staging/scorched3d/libpng14.patch
new file mode 100644
index 000000000..7a5a9434c
--- /dev/null
+++ b/community-staging/scorched3d/libpng14.patch
@@ -0,0 +1,38 @@
+--- src/common/image/ImagePng.cpp 2009-02-23 04:14:20.000000000 +0100
++++ src/common/image/ImagePng.cpp_patched 2010-01-24 22:01:04.000000000 +0100
+@@ -189,7 +189,7 @@
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL)
+ {
+- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return false;
+ }
+
+@@ -200,7 +200,7 @@
+ 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, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ /* If we get here, we had a problem reading the file */
+ return false;
+ }
+@@ -258,7 +258,7 @@
+ }
+ else
+ {
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ Logger::log(S3D::formatStringBuffer(
+ "Invalid PNG format.\n"
+@@ -272,7 +272,7 @@
+ // END NEW CODE
+
+ /* clean up after the read, and free any memory allocated - REQUIRED */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ /* that's it */
+ return true;
diff --git a/community-staging/scorched3d/scorched3d-42.1-fixups.patch b/community-staging/scorched3d/scorched3d-42.1-fixups.patch
new file mode 100644
index 000000000..36a027cb6
--- /dev/null
+++ b/community-staging/scorched3d/scorched3d-42.1-fixups.patch
@@ -0,0 +1,58 @@
+diff -ru scorched.orig/configure-al.m4 scorched/configure-al.m4
+--- scorched.orig/configure-al.m4 2008-03-03 16:17:18.000000000 -0500
++++ scorched/configure-al.m4 2009-02-15 20:43:35.000000000 -0500
+@@ -7,25 +7,9 @@
+ [ --disable-openaltest Do not try to compile and run a test OpenAL program],
+ , enable_openaltest=yes)
+ AC_MSG_CHECKING(for OpenAL support)
+-AC_PATH_PROG(OPENAL_CONFIG, openal-config, no)
+-if test x$OPENAL_CONFIG = xno; then
+- echo "*** The openal-config script installed by OpenAL could not be found"
+- echo "*** Make sure openal-config is in your path, or set the OPENAL_CONFIG"
+- echo "*** environment variable to the full path to openal-config."
+-
+- AC_MSG_ERROR([*** Can't find the openal library. Try: http://www.openal.org/])
+-else
+-
+- if test x"$use_static_openal" = x"yes"; then
+- AL_LIBS="/usr/local/lib/libopenal.a"
+- else
+- AL_LIBS="`$OPENAL_CONFIG --libs`"
+- fi
+-
+- AL_CFLAGS="`$OPENAL_CONFIG --cflags`"
+-
+- AC_MSG_RESULT(yes)
+-fi
++AL_LIBS="-lopenal"
++AL_CFLAGS="-I/usr/include/AL"
++AC_MSG_RESULT(yes)
+
+ AC_MSG_CHECKING(for Freealut support)
+ AC_PATH_PROG(FREEALUT_CONFIG, freealut-config, no)
+diff -ru scorched.orig/configure.ac scorched/configure.ac
+--- scorched.orig/configure.ac 2008-03-03 16:17:18.000000000 -0500
++++ scorched/configure.ac 2009-02-15 20:40:30.000000000 -0500
+@@ -13,22 +13,6 @@
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+
+-LDFLAGS="-L/usr/X11R6/lib -L/usr/X11R6"
+-CPPFLAGS="-I/usr/X11R6/include -I/usr/X11R6"
+-
+-if test `uname` == Darwin; then
+-LDFLAGS="$LDFLAGS -lmx"
+-CPPFLAGS="$CPPFLAGS -DFFTW_USE_DOUBLE -D__DARWIN__ -D__MACOSX__"
+-else
+-LDFLAGS="$LDFLAGS -L/usr/local/lib"
+-CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+-fi
+-
+-AC_CHECK_LIB(fridge, beer, echo "Hmm?!",[
+- echo "Warning: No beer found in fridge!";
+- echo "We highly suggest that you rectify this situation immediately."
+-])
+-
+ AC_ARG_ENABLE(serveronly,
+ [ --enable-serveronly Enable server only compilation],
+ , enable_serveronly=no,
diff --git a/community-staging/scorched3d/scorched3d-42.1-gcc43.patch b/community-staging/scorched3d/scorched3d-42.1-gcc43.patch
new file mode 100644
index 000000000..b235f07c5
--- /dev/null
+++ b/community-staging/scorched3d/scorched3d-42.1-gcc43.patch
@@ -0,0 +1,24 @@
+diff -ur scorched.old/src/common/common/main.h scorched/src/common/common/main.h
+--- scorched.old/src/common/common/main.h 2009-02-18 20:06:22.000000000 +0200
++++ scorched/src/common/common/main.h 2009-02-18 20:07:18.000000000 +0200
+@@ -40,7 +40,7 @@
+ void _no_storage()
+ {
+ printf("Failed to allocate memory!!");
+- std::exit(1);
++ exit(1);
+ }
+
+ void run_main(int argc, char *argv[], OptionsParameters &params)
+diff -ur scorched.old/src/common/porting/windows.h scorched/src/common/porting/windows.h
+--- scorched.old/src/common/porting/windows.h 2009-02-18 20:06:22.000000000 +0200
++++ scorched/src/common/porting/windows.h 2009-02-18 20:06:46.000000000 +0200
+@@ -20,7 +20,7 @@
+ typedef unsigned short WORD;
+ typedef unsigned char BYTE;
+
+-typedef int HWND;
++// typedef int HWND;
+ typedef void * HINSTANCE;
+ typedef int WPARAM;
+ typedef int LPARAM;
diff --git a/community-staging/scorched3d/scorched3d-libpng1.5.patch b/community-staging/scorched3d/scorched3d-libpng1.5.patch
new file mode 100644
index 000000000..4e8f003b8
--- /dev/null
+++ b/community-staging/scorched3d/scorched3d-libpng1.5.patch
@@ -0,0 +1,74 @@
+--- ./src/common/image/ImagePngFactory.cpp.old 2011-09-12 12:34:30.114461019 +0200
++++ ./src/common/image/ImagePngFactory.cpp 2011-09-12 12:39:28.566425593 +0200
+@@ -104,7 +104,7 @@
+
+ static void user_png_error(png_structp png_ptr, png_const_charp msg)
+ {
+- longjmp(png_ptr->jmpbuf,1);
++ longjmp(png_jmpbuf(png_ptr),1);
+ }
+
+ static void user_png_warning(png_structp png_ptr, png_const_charp msg)
+--- ./src/client/client/LoadPNG.cpp.old 2011-09-12 12:45:49.167380419 +0200
++++ ./src/client/client/LoadPNG.cpp 2011-09-12 14:11:14.961772024 +0200
+@@ -28,6 +28,8 @@
+ int row, i;
+ volatile int ckey = -1;
+ png_color_16 *transv;
++ png_colorp png_palette;
++ int num_palette;
+
+ if ( !src ) {
+ /* The error message has been set in SDL_RWFromFile */
+@@ -58,7 +60,7 @@
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in png_create_read_struct() earlier.
+ */
+- if ( setjmp(png_ptr->jmpbuf) ) {
++ if ( setjmp(png_jmpbuf(png_ptr)) ) {
+ error = "Error reading the PNG file.";
+ goto done;
+ }
+@@ -127,9 +129,9 @@
+ Rmask = 0x000000FF;
+ Gmask = 0x0000FF00;
+ Bmask = 0x00FF0000;
+- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
++ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
+ } else {
+- int s = (info_ptr->channels == 4) ? 0 : 8;
++ int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
+ Rmask = 0xFF000000 >> s;
+ Gmask = 0x00FF0000 >> s;
+ Bmask = 0x0000FF00 >> s;
+@@ -137,7 +139,7 @@
+ }
+ }
+ surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
+- bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask);
++ bit_depth*png_get_channels(png_ptr, info_ptr), Rmask,Gmask,Bmask,Amask);
+ if ( surface == NULL ) {
+ error = "Out of memory";
+ goto done;
+@@ -185,12 +187,15 @@
+ palette->colors[i].g = i;
+ palette->colors[i].b = i;
+ }
+- } else if (info_ptr->num_palette > 0 ) {
+- palette->ncolors = info_ptr->num_palette;
+- for( i=0; i<info_ptr->num_palette; ++i ) {
+- palette->colors[i].b = info_ptr->palette[i].blue;
+- palette->colors[i].g = info_ptr->palette[i].green;
+- palette->colors[i].r = info_ptr->palette[i].red;
++ } else {
++ png_get_PLTE(png_ptr, info_ptr, &png_palette, &num_palette);
++ if (num_palette > 0 ) {
++ palette->ncolors = num_palette;
++ for( i=0; i<num_palette; ++i ) {
++ palette->colors[i].b = png_palette[i].blue;
++ palette->colors[i].g = png_palette[i].green;
++ palette->colors[i].r = png_palette[i].red;
++ }
+ }
+ }
+ }
diff --git a/community-staging/scorched3d/scorched3d.desktop b/community-staging/scorched3d/scorched3d.desktop
new file mode 100644
index 000000000..b18d86581
--- /dev/null
+++ b/community-staging/scorched3d/scorched3d.desktop
@@ -0,0 +1,17 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Exec=/usr/bin/scorched3d
+Icon=scorched3d.png
+Terminal=false
+Name=Scorched 3D
+Name[lt_LT]=Scorched 3D
+Comment=3D artillery game similar to Scorched Earth
+Comment[de_DE]=3D Reimplementation des Klassikers Scorched Earth
+Comment[fr_FR]=un jeu d'artillerie en 3 proche de Scorched Earth
+Comment[lt_LT]=Nuotaikingas 3D taktinis-artilerinis žaidimas, panašus į Scorched Earth
+Comment[pl_PL]=Artyleryjska gra 3D podobna do Scorched Earth
+Comment[ro_RO]=Un joc 3D cu artilerie similar cu Scorched Earth
+Categories=Game;ArcadeGame;
+StartupNotify=true
diff --git a/community-staging/scorched3d/scorched3d.install b/community-staging/scorched3d/scorched3d.install
new file mode 100644
index 000000000..c5571196e
--- /dev/null
+++ b/community-staging/scorched3d/scorched3d.install
@@ -0,0 +1,11 @@
+post_install() {
+ which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
+}
+
+post_upgrade() {
+ which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
+}
+
+post_remove() {
+ which xdg-icon-resource 1>/dev/null 2>/dev/null && xdg-icon-resource forceupdate || true
+}
diff --git a/community-staging/scorched3d/scorched3d.png.uu b/community-staging/scorched3d/scorched3d.png.uu
new file mode 100644
index 000000000..4fb7e50db
--- /dev/null
+++ b/community-staging/scorched3d/scorched3d.png.uu
@@ -0,0 +1,105 @@
+begin 600 scorched3d.png
+MB5!.1PT*&@H````-24A$4@```#`````P"`8```!7`OF'````!F)+1T0`_P#_
+M`/^@O:>3````"7!(67,```L2```+$@'2W7[\````!W1)344'TP@#%`([XJF@
+M!```$5Q)1$%4>-IEFNER9$>.I3_`W>\2$0PFF5*VI.HJ]58]2\\\W#S/O,*\
+M35LO9FU5U:62E,H4DUM$W+B+.S`__`:3.4.S(!D+G0XX<`"<X_)__O?_<EQ0
+M4R0(D@1M%$3`'35##,1!J:^[.#D;RY)9<@9`4*(H3=.0VH;4)&+3(!IPE-F4
+M;)E<9G(I+'EAR3.S%<P<UO4C2D!0P''<"U@!G\$S:@"*J**J1$0``:T_G/H0
+M'-:W$%Z^1`1$J#\$%<'7CSK@[OBZ(=SK<]8W5U/QZA"0S\NO[SOU\[;^_OE+
+M$;3N;=T#"!%M>%E1``7#7O:LNKY\>5L4$46BH0[!A&(%6RVW[)A:?6`0%2YK
+M7'SLCI9"S`JF%#.*.RZ0<<H7&[_\922@J`*BB`10):I62U0_>]P13.J.RNI>
+M\6JT**@(JG7!((&\+"S%,*_^*Z6P+`N(5+\%K2'AH":H"V%UD;O@)K@[1C7"
+M^"(H$`25@$A`D.K`]1'U$D$JH`(")EJ/4JH7Q1T10500$8(J(20\@,7"HHHL
+MF:64NA$WBF6D*$D4UNW6DW2T1@2H4$Q1##=>@L;7]X-`6/TOJA#J&<H:4((0
+M]8L8D^IAA>*">3U[4\>I[H\2""$14T,0Q=V)*:'SC,PSMAHAHC6DS!&QEVA0
+M<50+N.%:(PRM)VSV*G"L[D/EQ=;Z_!*/4LV-U>2:C+IZ^7)\944<=P=WS)6"
+MDET)*(1(%%!=CQ1A67)%%2`$)28(T590DW630K:P[BJO8`"F@E\,74,UB"`H
+M&@4)6G,7J>'FA8A51`EK=M>-U.R-"*;4V#;'33&4[$*T&L<2`DD5<4$<8A!L
+M=65J'8V@T8G!<0/+PE*$>0DLLR+FB!;4'!.P=3,:(8BNP5?#0M?C,*=^\T*\
+MQ!0&8H*8HC'4.%^-<;P:DF6%6'U!'05B4+2)A`@Q&*(9C87-KE`,<E'ZKCK<
+M#4S@>!2>'H7C(>$.^`(X&@5-]0A4:CU`P"ZG9]6A9H8!<<V=NHB!NN!>$R2(
+M$+7B+\Z*$(*+$E5I4Z!-2A.@:2$V`0V1)<.\*,L26):`E8CDZD$-H(W2=L[U
+MC='VQN%9.1TCF*&QADN%O!6:J;7,N(3R)=F%6%[5*<$1JT>-"BI*#"M<ND(`
+MUYK,0964E*81^@9V^T*W=7*.'`=E6HSC,^1%P0(3B@9!D]/T@=@4NDVFVP%)
+M*2HL4\5J"6L=7C=?S"E2/7XICK:&5OPB]0U$5YA#<6+%6JEP^)(CHDB,A*BT
+MC;#?9YJM8QIX>@Z<#LXX&%(*458(6=N0;$X^*8R*)*7=&+M]H=_!XWU@FI1<
+M!#"L&%B%<A-J&*.X644Z@YA\K7JE(H6JD41H@M)$I0G5@(H4*PY+P`BDY/1]
+M(23C/,!Q"`P'9YX-*]587YL"P0`A6,5`%\6+D*>.%`N;WI$;Y7A23L,*!%JP
+M4M"2U[XH5_A]`14G-E*K8#$C3\Z2'9%(U(@$1UP@:(6PM38Z%5YC*K3=0B[.
+MTX/R\""8%\!>"IJ9X6XKEE=@4%5<:IW)4T..1I.<JRO#$9:L+%EP@Z!>6P>L
+MPO":!W5]B*W68C2;\O[^Q"]/$[NK*Z[W6V[V6][>7K'?);8Q$3#<*RHU<:9I
+M,N[&W9UP.!CC7"MP[2"]'OUZW*I"4"&J$&)$".`!`XX'9YJ,K]_---%IDF(%
+MT$+0@FFI38)'4'`K&`7#B#5?!(F1?=<P+@:>F8:!3WGA<!I(*9%BI$F!)B7Z
+M+G)S#;$7/"GG'%B\QJE?DLXR!J@&0)A+1LQ0@5`J]H-2J+`8)J-I9V)RND8H
+MDZ(.B&.J2-0:B*:89\K:[;XT<R$J7]\HNVW+,&:F;$QYXNE\9ER,;$+3-/1]
+MS_6^PV/"FT@S1QX&R/.E1=;:2VE$-!";%@V1:3Q32J:8,2\%]Z6BC%2T"=$(
+MSX7]WNA:F#0B5F<)%<5"((IBQ2C4&B%`),::H!K8]BU7JB_]M@.+%<[CPG#.
+M#%-A*E#*PFB9/[V?>7A<.#XE^G[+?K^A2Y&NV=!WB7[;TVXVI)0HR\PTCIR'
+M,X?G`]-T)N<9UT((D%R8BX,**0EHPB0"L9Z`2VWL&JM-GH!BQ*YI$8$8(Q)J
+M@K$F]6*&B-'UB7Z[XYONBBRU"]W?9H[#3&H6NL98EL+3X<Q_?+RCY$R*@=W5
+MCNUN0]]W-*&V&FZ.F3-.QFD8&<Y';FYZWGV]HW@M5AZ@2*`00`*N^C*;!(6H
+MBJMB"'';M?4$0FVNBCMYSLQ+8<R9C-%N-ER]N>7FJ^\(38L$H]^>&2?C]@8>
+M[T=^?O\K?_CC#_SSO_X'#P_/F#G]IF.WW;#;;=AO.KJVI>LZ=KLM<\X<CD?N
+M/]WS=_(5[][=@$1$"Q(<-.$2L,M4L#:A(=0V0Z2B86S;ME8_58IY+1X8(DK3
+M=%R_N66SOZ'=7)$-IF%"-=,T`^)*TH:^ZYCGS*]W#WRZ>^+A\8EY69B73(R)
+MON^XOM[1Q$@,@;9-A)1`A.D\<7.S9YH:;F[?L-TY_::PW22PPCS/Y)()XH10
+M>R\3(XH3)!!I4^TWO-8#1`A-H&EZ9@+/H_/+TZ^<AI\XG4=4A>TF\NUWT'4=
+ML"7/&VZNKOAOO_];MEW'X],3A].)^\<#3\\GSN/,D@OC.%.6"K.I;>C[CDW7
+M`PFC(<:.%`,BA7DVAK,Q34Z,@IHCJ>9+$"?%.IM$"^O@D2&;D;,S%6?RP'')
+M_/CA$S_]_)$/'SYQGB:ZKN7F9LOW'UO>OMVQV>[QY0U-ZOB;WW[';[[]FF$<
+M:W@\///^PR<^WCTPG$>.AX'#X<0PG"C+@K>)_7[+]9LW['8W;+:WI#;@S#P?
+M'_CT,#%/$U>;!%V=RV-R0@()0A`EEIPKG!D,T\3=_9%_^_,=[^^>^7C_Q(>/
+M=QP.)Y:<Z=J6INOH?TG\_![>WD:VFX['QQU]=\6;-UNNMCW;7<]NN^'W?_<[
+M_LO??\^2"Z?AS/W]$[]^NN?CW0/G822&P&^__VO^Z;__(__T/_XGUV^_I6V=
+MP^%7'I_>\_[GCYS/`U]]=<N;ZXZ=)'I;$#=B,E0A+N?I90X=AH%?'Q[Y]S_^
+MP(>[9TZG,\=A8)XSYHZ&B$\S9H5E<8H)U_LSQ^/`I\<G?OJEI>NJ4=MMSWZW
+MH>M:FB;1Q$A*@6_^ZBN^_NH6`5*,7%WMN;W>$.5$TA^Y^S#PGW_ZP,/])Z9I
+M).?,\^&XSI4]NNG0:&A9R,M$'`]CG2_%.9T&'IX.O/]PQ]/S@`!=DP@Q4@Q"
+M#&BHY78<A6%PNKX0NY'#_<C#IPJ#(0@I**E)M&W#MN^X?;/G]LV>FYL]-]=7
+M;'<;NK:MU;:<.#[_F9AF_O*G1_[M7QXX'L]`(47E/$W(40DA$%,/ZDQS85YF
+MXO/3<VU&W7@^C8SGJ<96C!6V5`GF9*O]#-0FS0W&T3B=X/9MY&H'TRB<S[(2
+M4,*2"Z6,G,\3]T\'XH^_$&.@:Q)-T]+W+5^_W?&/_[#'PXY?'S?<?RJH))QQ
+MG4F$B)*7S.%P1*/R^&3,XYEE?B(^'0XU!XHQC#-YFHCJJ$#.1EXR2UF+&J_H
+M%73-'2%%IVV$OWJG/#XIX]E9%BB7YFBE$30(JL()Z+K`DB,I/?*'/[=\^-0Q
+MCALVW1NNMGMN;ZY9ELPT+XQSQLV9Y\S=W0,/#\\<#@?>W2;BTVFH\V1VQCE#
+MSEQU$2N%\Y0Y#3/C-'.><QWY@A""$C0PC<HX"%C@W3ME?ZVXURE[,*&XKD8(
+M(01"K".EN-$T1MLNY#+PPX_.\03G4\/O_OHW_/[O$^_>WM!WPC@OR'DB+POS
+M-//IXSU_^<M[#H<#5]TWQ-D,'$JNA.*V;_FOO_V*XL8P+?SQIWO^\Y<'GHY#
+M'3M+S2>7.GHJPFF(W#TH^^O`M]\$=E>![29@IDRSDK.2&EM[+MANG1AK-1U'
+MY7!0#@<P,W[X\0/'X\`_?/\=W__N.[YY=TLV>'X^\O/[C_ST\Z_<W3\B7LCC
+M3-1X804*%".XT,?*S*4F\NU7UPQSYCQGAO-<*_7:WQM0W+$Y,Q?A/"TL<Z!K
+M`TU2N@YP!8^D%'$32A&F43@599Z$G(5I$J:YLGXY9^9YP;)QGA:^GQ?^]F]^
+MP]PFBM7^:9XS;81ESL38=+4"ATQ>,B67VG"Y(P%NWNSX=BG,Q;B[/S%-"VY.
+M4&$Q8RX%S"C%&$[.<#2:F.EZX?K:2#'4ZJJ)4I1Y%MR5\ZA,XTJ=K+FANB;_
+MLO##./-\''@^#ESO-PSCS-/SB6G)B$`*0LZ%V&S:RJ0MB@D4@&R44LA6F>#;
+MZRTI!6ZN=QQ/(^-8Q\AA'!G.4^5ZO!+!>5DP<X;!&0;08*@:*C/%:F*+*#$$
+M8HBDF.C:1*.ALH%4DM<\\_C\Q/D/`Z?SB7DN/#T-Y#FSZ1*[7A"\AI!8_:/@
+MCKD`I?:`7CG*E!+;+4A0=IN6>2[D8LS+PC3/S'.IW>N<.9U&2JD$^9*-I13*
+M4GOXRE`Z3J$$)ZLQ+IEIF9F;R*9OB1>F3VMOEJ>9GW[^6!$Q&UT3V/21W2Y"
+M$*(2,'5$`R$X'E^Q7^Z4XH@Z(00V?4O7-!1SW&SUE#&."^<Q<SK//+>)G(UB
+MQI07AO/,.&52N-#ISIP+[E8I^>Q,,TQS1,3INY96$U$J+6_NG,\CI3@A*&VC
+M;#?*9I-`A;B"T$42X44L62EWC8JZ(U[YF(Q3IUTJ>Q8"_2[0]<Y^W_'UVQTY
+M&U/.#,/$\7CF-,RX5*1;E@SC1"DK*@4A%Z<8/)TFIL78M(5MW]$VL0HL"DF$
+MO@F\O>G8;!*ZTMIQ\4J'9RN4]6%8A<D+'Q650*!(C>E@QDH\X.*KW%1;B)`@
+MF1-SI$V13=^PS+ERI-E8EH5AG%B6\D*YG*?,>39$E9@:NKYCLVE0$8H9082^
+MB[RYZMCU+3&N6AU2#<"=[%:%":P.VJN'-2A10%01C^B*.!5\:JBLN@SF==!&
+MI`I^*;+9M)7/S%"*D4MF7!:6N9"7VL^<QIEA*D!DN^VXWK7LNE!/<BJH*M=7
+M#;?7'6U*5.G!7Y&[%_5!0A4X*E6-F%<!8I6!"I=-&-E6AMB,[%`L5RIEG7O=
+M#,OE)1Z5VL-'E&Z3UC7!<F$I1BZ5J&I2H&N4)@AF3C80=YHHI*B5`O)5Z`-B
+M2DT=XD4H6A!3I!AJ!<>1U0!<JEY0?%W8<;>7WW.)%,_5J%)'TZPU67&'^#F_
+M*O$LE6>W"X-WD5J=L(9E")!6-2JL%&NEBFJ3!T+LNPYW(^=:&'(NF&3<9>7;
+M/U/OH+A66348+SQE-J.40+:`6<:+48JS6*@<Y\J_OBQS>;*"1JC'ACI5HBJE
+MDF(X0==18'T`*R>T)O%^+633HLS+PJ(+12^48)W4[.6?VPM-:PJR2DEZT6*+
+M5_980(*!*69RV?]GA*L#R.?7W/%2_^>*"%32I"JD]H5:#*]-BGV;,#/$"V(%
+M<2&[D!%RJ8N;5;$NNU&\4H>.UUCTSYLP').:U'43CE"5%7^M=2,O^@54`UT"
+ME`H"KK7*5CG%7B1L6?6!U^Z(30R8"::*ARH!N=22CJ_)N,;Y;)EL3G%J;%?M
+MLDY5Z^+FSJNMO4C5_D74^"L1>\6/VK54[<'7JP9NM2NX2/W.NL%7!JRD5Q7C
+MRN<XN\1/A<I"MK*BSF>-BE>W%'3UV/^SM?__KL(7*2#82W)X#9MU"E,#\:I\
+M:CW;SU</UIQQA^A>U@0J-6FH@&$B>!!LI?N*5W2HWO*UT-466%]YV\)%<UL_
+MJZOZN?96_OI.A=L7]R1>3E16+<U7]5JK(7[)!G<PIY@3W3)NAE@AK)ML%`C5
+M=J$FEB`448HXQ5=5'WFY3E"/=I6"ULVY7&*\>KIVK:MH9Q7WY8M(NNC5*P^Z
+M$KK$]?4+CEDMNFI&).=U54/<JI>3U.9.A$:5%)0EE/4^Q.OCKWY7>Y7,:^R:
+MKW<GW&N..36??*TCE_!YC3#VZCZ&U@L*0:HX&%;9%;<J<'AM>?XO+.\[U&WH
+.P#``````245.1*Y"8((`
+`
+end
diff --git a/community-staging/scummvm-tools/PKGBUILD b/community-staging/scummvm-tools/PKGBUILD
new file mode 100644
index 000000000..460708a4d
--- /dev/null
+++ b/community-staging/scummvm-tools/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 62446 2012-01-20 06:47:00Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Jérémie Dimino <jeremie@dimino.org>
+# Contributor: Sebastian Hase <sebastian_hase@gmx.de>
+# Contributor: Joe Davison <joe@thosedamnpeanuts.com>
+pkgname=scummvm-tools
+pkgver=1.4.0
+pkgrel=2
+pkgdesc="A set of tools that enable you to convert, compress and decode game datafiles for ScummVM"
+url="http://www.scummvm.org/"
+license=('GPL')
+depends=('libpng' 'wxgtk' 'flac' 'libvorbis')
+arch=('i686' 'x86_64')
+source=(http://downloads.sourceforge.net/sourceforge/scummvm/${pkgname}-${pkgver}.tar.gz)
+md5sums=('43cbf9f5c4939876cf4149dd59e68044')
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ install -d ${pkgdir}/usr/bin
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ install -Dm 644 README ${pkgdir}/usr/share/doc/scummvm-tools/README
+ install -Dm 644 convert_dxa.sh ${pkgdir}/usr/share/doc/scummvm-tools/samples/convert_dxa.sh
+}
+#vim: sw=2 ts=2 et:
diff --git a/community-staging/silly/PKGBUILD b/community-staging/silly/PKGBUILD
new file mode 100644
index 000000000..6c096d54c
--- /dev/null
+++ b/community-staging/silly/PKGBUILD
@@ -0,0 +1,26 @@
+# $Id: PKGBUILD 62458 2012-01-20 07:15:00Z svenstaro $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
+
+pkgname=silly
+pkgver=0.1.0
+pkgrel=5
+pkgdesc="Simple Image Loading LibrarY, a part of the CEGUI project"
+arch=('i686' 'x86_64')
+url="http://www.cegui.org.uk/wiki/index.php/SILLY"
+license=('MIT')
+depends=('libjpeg' 'libpng' 'gcc-libs')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/crayzedsgui/SILLY-${pkgver}.tar.gz
+ silly-libpng1.5.patch)
+md5sums=('c3721547fced7792a36ffc9ce6ec23fd'
+ '530551c2942aea6fa20f10d06f1e604f')
+
+build() {
+ cd "${srcdir}/SILLY-${pkgver}"
+ patch -Np1 < $srcdir/silly-libpng1.5.patch
+ ./configure --prefix=/usr
+ make
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/community-staging/silly/silly-libpng1.5.patch b/community-staging/silly/silly-libpng1.5.patch
new file mode 100644
index 000000000..0b2d27252
--- /dev/null
+++ b/community-staging/silly/silly-libpng1.5.patch
@@ -0,0 +1,14 @@
+ILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp~ SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp
+--- SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp~ 2006-06-19 00:42:12.000000000 +0200
++++ SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp 2011-12-06 14:38:31.738251526 +0100
+@@ -64,10 +64,7 @@ void PNG_error_function(png_structp png_
+ png_const_charp error)
+ {
+ // printf("PNG Error: %s\n", error);
+- // copied from libpng's pngerror.cpp
+- jmp_buf buf;
+- memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
+- longjmp(buf, 1);
++ png_longjmp(png_ptr, 1);
+ }
+
diff --git a/community-staging/speed-dreams/PKGBUILD b/community-staging/speed-dreams/PKGBUILD
new file mode 100644
index 000000000..3fdf875d9
--- /dev/null
+++ b/community-staging/speed-dreams/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id: PKGBUILD 62456 2012-01-20 07:08:15Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Adrián Chaves Fernández, aka Gallaecio <adriyetichaves@gmail.com>
+# Contributor: Shahar Weiss <sweiss4@gmx.net> (build() code from his TORCS' PKGBUILD)
+pkgname=speed-dreams
+pkgver=2.0.0b1
+_pkgver=2.0.0-b1-r3937
+pkgrel=2
+pkgdesc="A racing simulator with rich graphics and physics"
+arch=('i686' 'x86_64')
+url="http://speed-dreams.sourceforge.net/"
+license=('GPL2')
+depends=('sdl' 'freealut' 'freeglut' 'libpng' 'libxi' 'libxmu' 'libxrandr' 'plib>=1.8.3' 'libjpeg' 'zlib' 'enet' 'speed-dreams-data')
+makedepends=('cmake' 'p7zip')
+noextract=(${pkgname}-${_pkgver}-src.tar.7z)
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${_pkgver}-src.tar.7z"
+ "${pkgname}.desktop")
+md5sums=('5299fe23aec3641827039ae3c69de460'
+ '6b45e9c40984ebb79a1dfaddbfabde92')
+
+build() {
+ 7z x ${pkgname}-${_pkgver}-src.tar.7z
+ tar xf ${pkgname}-${_pkgver}-src.tar
+
+ cd "${pkgname}-${_pkgver}-src"
+
+ cmake . \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSD_BINDIR=/usr/bin \
+ -DSD_DATADIR=/usr/share/speed-dreams-2 \
+ -DSD_LIBDIR=/usr/lib/speed-dreams-2 \
+ -DOPTION_OFFICIAL_ONLY:BOOL=ON
+
+ make
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${_pkgver}-src"
+
+ make DESTDIR="${pkgdir}/" install
+
+ rm -r "${pkgdir}/usr/share"
+
+ install -Dm644 "data/data/icons/icon.png" "${pkgdir}/usr/share/pixmaps/speed-dreams.png"
+ install -Dm644 "data/data/icons/icon.svg" "${pkgdir}/usr/share/pixmaps/speed-dreams.svg"
+ install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/speed-dreams.desktop"
+
+ mkdir -p "${pkgdir}/usr/share/doc/${pkgname}"
+ cp -r doc/* "${pkgdir}/usr/share/doc/${pkgname}/"
+ rm -r "${pkgdir}/usr/share/doc/${pkgname}/man"
+
+ mkdir -p "${pkgdir}/usr/share/man/man6/${pkgname}"
+ cp doc/man/* "${pkgdir}/usr/share/man/man6/${pkgname}"
+
+ # Symlink for backwards compatibility
+ cd "${pkgdir}/usr/bin"
+ ln -s speed-dreams-2 speed-dreams
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community-staging/speed-dreams/speed-dreams.desktop b/community-staging/speed-dreams/speed-dreams.desktop
new file mode 100644
index 000000000..f04b71791
--- /dev/null
+++ b/community-staging/speed-dreams/speed-dreams.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Speed Dreams
+Comment=The Open Racing Car Simulator Fork
+Exec=speed-dreams-2
+Icon=speed-dreams.svg
+Terminal=false
+Type=Application
+Encoding=UTF-8
+Categories=Application;Game;
diff --git a/community-staging/synfig/PKGBUILD b/community-staging/synfig/PKGBUILD
new file mode 100644
index 000000000..2c33e315f
--- /dev/null
+++ b/community-staging/synfig/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 62498 2012-01-20 09:34:35Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Franco Iacomella <yaco@gnu.org>
+
+pkgname=synfig
+pkgver=0.63.03
+pkgrel=2
+pkgdesc="Professional vector animation program (CLI renderer only)"
+arch=(i686 x86_64)
+url="http://synfig.org"
+license=('GPL2')
+depends=('libxml++' 'libsigc++2.0' 'etl' 'imagemagick' 'ffmpeg' 'fontconfig' 'libpng'
+ 'libtiff' 'libdv' 'libmng')
+optdepends=('openexr' 'libsigc++')
+conflicts=('synfig-core')
+replaces=('synfig-core')
+options=(!libtool)
+source=(http://downloads.sourceforge.net/project/synfig/synfig/$pkgver/synfig-$pkgver.tar.gz
+ build-fix.patch
+ ffmpeg-0.8.patch)
+md5sums=('9bd77cd2fc2381adfbd50a7b9c1c6e7c'
+ 'b5568b06fae1a7ee465b5380b1139b83'
+ 'ebf41046097cfd778dee9a9854561dae')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ [ -f configure ] || { libtoolize --ltdl --copy --force && autoreconf --install --force; }
+ [ -f Makefile ] || ./configure --prefix=/usr --sysconfdir=/etc --with-libavcodec --with-libdv
+ patch -p1 -i $srcdir/build-fix.patch
+ patch -Np1 -i $srcdir/ffmpeg-0.8.patch
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+}
diff --git a/community-staging/synfig/build-fix.patch b/community-staging/synfig/build-fix.patch
new file mode 100644
index 000000000..be45fdc68
--- /dev/null
+++ b/community-staging/synfig/build-fix.patch
@@ -0,0 +1,31 @@
+diff -wbBur synfig-core/src/modules/mod_libavcodec/trgt_av.cpp synfig-core.my/src/modules/mod_libavcodec/trgt_av.cpp
+--- synfig-core/src/modules/mod_libavcodec/trgt_av.cpp 2011-06-05 13:04:07.000000000 +0400
++++ synfig-core.my/src/modules/mod_libavcodec/trgt_av.cpp 2011-06-14 14:32:49.000000000 +0400
+@@ -31,6 +31,10 @@
+ # include <config.h>
+ #endif
+
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
++#include <libswscale/swscale.h>
++
+ #include "trgt_av.h"
+
+ extern "C"
+@@ -116,14 +120,14 @@
+ picture = avcodec_alloc_frame();
+ if (!picture)
+ return NULL;
+- size = avpicture_get_size(pix_fmt, width, height);
++ size = avpicture_get_size((enum ::PixelFormat)pix_fmt, width, height);
+ picture_buf = (uint8_t *)malloc(size);
+ if (!picture_buf) {
+ av_free(picture);
+ return NULL;
+ }
+ avpicture_fill((AVPicture *)picture, picture_buf,
+- pix_fmt, width, height);
++ (enum ::PixelFormat)pix_fmt, width, height);
+ return picture;
+ }
+
diff --git a/community-staging/synfig/ffmpeg-0.8.patch b/community-staging/synfig/ffmpeg-0.8.patch
new file mode 100644
index 000000000..4ba40fff2
--- /dev/null
+++ b/community-staging/synfig/ffmpeg-0.8.patch
@@ -0,0 +1,60 @@
+diff -aur synfig-0.63.02/src/modules/mod_libavcodec/trgt_av.cpp synfig-0.63.02.new/src/modules/mod_libavcodec/trgt_av.cpp
+--- synfig-0.63.02/src/modules/mod_libavcodec/trgt_av.cpp 2011-09-29 10:51:41.000000000 +0200
++++ synfig-0.63.02.new/src/modules/mod_libavcodec/trgt_av.cpp 2011-10-31 16:39:03.000000000 +0100
+@@ -441,7 +441,7 @@
+ if( context->coded_frame )
+ pkt.pts = context->coded_frame->pts;
+ if( context->coded_frame && context->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+
+ //kluge for raw picture format (they said they'd fix)
+ if (formatc->oformat->flags & AVFMT_RAWPICTURE)
+@@ -463,7 +463,7 @@
+ if( context->coded_frame )
+ pkt.pts = context->coded_frame->pts;
+ if( context->coded_frame && context->coded_frame->key_frame)
+- pkt.flags |= PKT_FLAG_KEY;
++ pkt.flags |= AV_PKT_FLAG_KEY;
+
+ ret = av_write_frame(formatc, &pkt);
+
+@@ -567,17 +567,17 @@
+ if (typestring)
+ {
+ //formatptr guess_format(type, filename, MIME type)
+- format = guess_format(typestring,NULL,NULL);
++ format = av_guess_format(typestring,NULL,NULL);
+ }
+ else
+ {
+- format = guess_format(NULL, filename, NULL);
++ format = av_guess_format(NULL, filename, NULL);
+ }
+
+ if(!format)
+ {
+ synfig::warning("Unable to Guess the output, defaulting to mpeg");
+- format = guess_format("mpeg", NULL, NULL);
++ format = av_guess_format("mpeg", NULL, NULL);
+ }
+
+ if(!format)
+@@ -753,7 +753,7 @@
+
+ context = st->codec;
+ context->codec_id = (CodecID)codec_id;
+- context->codec_type = CODEC_TYPE_VIDEO;
++ context->codec_type = AVMEDIA_TYPE_VIDEO;
+
+ //PARAMETERS MUST BE PASSED IN SOMEHOW (ANOTHER FUNCTION PARAMETER???)
+
+@@ -800,7 +800,7 @@
+
+ context = stream->codec;
+ context->codec_id = (CodecID)codec_id;
+- context->codec_type = CODEC_TYPE_AUDIO;
++ context->codec_type = AVMEDIA_TYPE_AUDIO;
+
+ /* put sample parameters */
+ context->bit_rate = 64000;
diff --git a/community-staging/torcs/PKGBUILD b/community-staging/torcs/PKGBUILD
new file mode 100644
index 000000000..e24b071bc
--- /dev/null
+++ b/community-staging/torcs/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 62516 2012-01-20 09:52:55Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Shahar Weiss <sweiss4@gmx.net>
+
+pkgname=torcs
+pkgver=1.3.2_test2
+pkgrel=2
+pkgdesc="A 3D racing cars simulator using OpenGL"
+url="http://torcs.sourceforge.net"
+license=("GPL")
+arch=('i686' 'x86_64')
+depends=('freeglut' 'libpng' 'freealut' 'libxi' 'libxmu' 'libxrandr' 'torcs-data'
+ 'libvorbis')
+makedepends=('plib')
+options=('!makeflags')
+source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-${pkgver/_/-}.tar.bz2
+ torcs.desktop
+ torcs-gcc.patch)
+md5sums=('7851c1149587451bd64a6a55d785af40'
+ '328e419e9f985c3e7b69924fe299330d'
+ '5ae7e903df37300d3b8744328c756bff')
+
+build() {
+ cd $srcdir/$pkgname-${pkgver/_/-}
+ unset LDFLAGS
+ ./configure --prefix=/usr --x-includes=/usr/include --x-libraries=/usr/lib
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-${pkgver/_/-}
+ make DESTDIR=${pkgdir} install
+ install -D -m644 Ticon.png ${pkgdir}/usr/share/pixmaps/torcs.png
+ install -D -m644 ../torcs.desktop ${pkgdir}/usr/share/applications/torcs.desktop
+ find ${pkgdir} -type d -exec chmod 755 {} \;
+}
diff --git a/community-staging/torcs/torcs-gcc.patch b/community-staging/torcs/torcs-gcc.patch
new file mode 100644
index 000000000..fcc5604e7
--- /dev/null
+++ b/community-staging/torcs/torcs-gcc.patch
@@ -0,0 +1,74 @@
+diff -aur src.old/drivers/olethros/Trajectory.cpp src/drivers/olethros/Trajectory.cpp
+--- src.old/drivers/olethros/Trajectory.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/drivers/olethros/Trajectory.cpp 2008-04-06 22:28:52.000000000 +0200
+@@ -10,8 +10,10 @@
+ ***************************************************************************/
+ #include <cstdio>
+ #include <cstdlib>
++#include <cstring>
+ #include <cmath>
+ #include <cassert>
++#include <ctime>
+ #include <list>
+ #include <vector>
+ #include "Trajectory.h"
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp src/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/BBoxTree.cpp 2008-04-06 22:22:57.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "Transform.h"
+
+ #include <algorithm>
+-#include <new.h>
++#include <new>
+
+ class BBoxCompAxis {
+ public:
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp src/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Complex.cpp 2008-04-06 22:23:11.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "Transform.h"
+ #include "BBoxTree.h"
+
+-#include <new.h>
++#include <new>
+
+ BBoxInternal *free_node;
+
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp src/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Endpoint.cpp 2008-04-06 22:22:29.000000000 +0200
+@@ -32,7 +32,7 @@
+ #include "Object.h"
+ #include "Encounter.h"
+
+-#include <new.h>
++#include <new>
+
+ void addPair(ObjectPtr object1, ObjectPtr object2);
+ void removePair(ObjectPtr object1, ObjectPtr object2);
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Object.cpp src/modules/simu/simuv2/SOLID-2.0/src/Object.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Object.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Object.cpp 2008-04-06 22:22:40.000000000 +0200
+@@ -33,7 +33,7 @@
+ #include "Convex.h"
+ #include "Complex.h"
+
+-#include <new.h>
++#include <new>
+
+ Object::Object(DtObjectRef obj, ShapePtr shape) :
+ ref(obj),
+diff -aur src.old/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp src/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp
+--- src.old/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp 2008-04-06 22:21:31.000000000 +0200
++++ src/modules/simu/simuv2/SOLID-2.0/src/Polyhedron.cpp 2008-04-06 22:22:12.000000000 +0200
+@@ -37,7 +37,7 @@
+ }
+
+ #include <vector>
+-#include <new.h>
++#include <new>
+
+ typedef vector<unsigned int> IndexBuf;
+
diff --git a/community-staging/torcs/torcs.desktop b/community-staging/torcs/torcs.desktop
new file mode 100644
index 000000000..03d1ba010
--- /dev/null
+++ b/community-staging/torcs/torcs.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=TORCS
+Comment=The Open Racing Car Simulator
+Exec=torcs
+Icon=torcs.png
+Terminal=false
+Type=Application
+Encoding=UTF-8
+Categories=Application;Game;
diff --git a/community-staging/torcs/torcs.sh b/community-staging/torcs/torcs.sh
new file mode 100644
index 000000000..0f1b4fe8d
--- /dev/null
+++ b/community-staging/torcs/torcs.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+export PATH=$PATH:/opt/torcs/bin
diff --git a/community-staging/tvtime/PKGBUILD b/community-staging/tvtime/PKGBUILD
new file mode 100644
index 000000000..b182e7efd
--- /dev/null
+++ b/community-staging/tvtime/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 62500 2012-01-20 09:35:30Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer:thefatprecious <marty@loomar.com>
+
+pkgname=tvtime
+pkgver=1.0.2
+pkgrel=3
+pkgdesc="A high quality television application for use with video capture cards"
+arch=('i686' 'x86_64')
+url='http://tvtime.sourceforge.net/'
+license=('GPL' 'LGPL')
+depends=('gcc-libs' 'libpng' 'libxml2' 'freetype2' 'libxtst' 'libxinerama' 'libxv'
+ 'libsm' 'libxxf86vm')
+makedepends=('libxt' 'v4l-utils')
+source=(http://downloads.sourceforge.net/sourceforge/tvtime/$pkgname-$pkgver.tar.gz
+ tvtime-1.0.2+linux-headers-2.6.18.patch
+ tvtime-1.0.2-gcc41.patch
+ tvtime-1.0.2-locale_t.patch)
+md5sums=('4b3d03afe61be239b08b5e522cd8afed'
+ 'e956821745686b5b3a784f7471996ade'
+ 'c782789825dfa664e1f6fcc96ac7246c'
+ '1069dc5b47bba8456cbf48e34cb5c0b6')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -p1 < ../tvtime-1.0.2+linux-headers-2.6.18.patch
+ patch -p1 < ../tvtime-1.0.2-gcc41.patch
+ patch -p1 < ../tvtime-1.0.2-locale_t.patch
+ sed -i '1,1i#include <zlib.h>' src/pngoutput.c
+ [ -f Makefile ] || ./configure --prefix=/usr --mandir=/usr/share/man --localstatedir=/var --sysconfdir=/etc
+ make
+ make DESTDIR=$pkgdir install
+ install -D -m644 docs/html/default.tvtime.xml $pkgdir/usr/share/tvtime/default.tvtime.xml
+}
diff --git a/community-staging/tvtime/tvtime-1.0.2+linux-headers-2.6.18.patch b/community-staging/tvtime/tvtime-1.0.2+linux-headers-2.6.18.patch
new file mode 100644
index 000000000..d0772783d
--- /dev/null
+++ b/community-staging/tvtime/tvtime-1.0.2+linux-headers-2.6.18.patch
@@ -0,0 +1,16 @@
+Index: tvtime-1.0.2/src/videoinput.c
+===================================================================
+--- tvtime-1.0.2.orig/src/videoinput.c
++++ tvtime-1.0.2/src/videoinput.c
+@@ -35,8 +35,9 @@
+ #ifdef HAVE_CONFIG_H
+ # include "config.h"
+ #endif
+-#include "videodev.h"
+-#include "videodev2.h"
++#include <libv4l1-videodev.h>
++#include <linux/videodev2.h>
++#define BASE_VIDIOCPRIVATE 192 /* 192-255 are private */
+ #include "videoinput.h"
+ #include "mixer.h"
+
diff --git a/community-staging/tvtime/tvtime-1.0.2-gcc41.patch b/community-staging/tvtime/tvtime-1.0.2-gcc41.patch
new file mode 100644
index 000000000..58e9bb204
--- /dev/null
+++ b/community-staging/tvtime/tvtime-1.0.2-gcc41.patch
@@ -0,0 +1,57 @@
+diff -Naur tvtime-1.0.1/plugins/greedyh.asm tvtime-1.0.1-gcc41/plugins/greedyh.asm
+--- tvtime-1.0.1/plugins/greedyh.asm 2005-08-14 18:16:43.000000000 +0200
++++ tvtime-1.0.1-gcc41/plugins/greedyh.asm 2005-11-28 17:53:09.210774544 +0100
+@@ -18,7 +18,7 @@
+
+ #include "x86-64_macros.inc"
+
+-void DScalerFilterGreedyH::FUNCT_NAME(TDeinterlaceInfo* pInfo)
++void FUNCT_NAME(TDeinterlaceInfo* pInfo)
+ {
+ int64_t i;
+ bool InfoIsOdd = (pInfo->PictureHistory[0]->Flags & PICTURE_INTERLACED_ODD) ? 1 : 0;
+diff -Naur tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc
+--- tvtime-1.0.1/plugins/tomsmocomp/TomsMoCompAll2.inc 2004-10-20 17:31:05.000000000 +0200
++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp/TomsMoCompAll2.inc 2005-11-28 17:53:33.251119856 +0100
+@@ -5,9 +5,9 @@
+ #endif
+
+ #ifdef USE_STRANGE_BOB
+-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n##_SB)
++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n##_SB)
+ #else
+-#define SEARCH_EFFORT_FUNC(n) DScalerFilterTomsMoComp::SEFUNC(n)
++#define SEARCH_EFFORT_FUNC(n) SEFUNC(n)
+ #endif
+
+ int SEARCH_EFFORT_FUNC(0) // we don't try at all ;-)
+diff -Naur tvtime-1.0.1/plugins/tomsmocomp.cpp tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp
+--- tvtime-1.0.1/plugins/tomsmocomp.cpp 2004-10-20 19:38:04.000000000 +0200
++++ tvtime-1.0.1-gcc41/plugins/tomsmocomp.cpp 2005-11-28 17:52:53.862107896 +0100
+@@ -31,7 +31,7 @@
+
+ #define IS_MMX
+ #define SSE_TYPE MMX
+-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_MMX
++#define FUNCT_NAME filterDScaler_MMX
+ #include "tomsmocomp/TomsMoCompAll.inc"
+ #undef IS_MMX
+ #undef SSE_TYPE
+@@ -39,7 +39,7 @@
+
+ #define IS_3DNOW
+ #define SSE_TYPE 3DNOW
+-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_3DNOW
++#define FUNCT_NAME filterDScaler_3DNOW
+ #include "tomsmocomp/TomsMoCompAll.inc"
+ #undef IS_3DNOW
+ #undef SSE_TYPE
+@@ -47,7 +47,7 @@
+
+ #define IS_SSE
+ #define SSE_TYPE SSE
+-#define FUNCT_NAME DScalerFilterTomsMoComp::filterDScaler_SSE
++#define FUNCT_NAME filterDScaler_SSE
+ #include "tomsmocomp/TomsMoCompAll.inc"
+ #undef IS_SSE
+ #undef SSE_TYPE
diff --git a/community-staging/tvtime/tvtime-1.0.2-locale_t.patch b/community-staging/tvtime/tvtime-1.0.2-locale_t.patch
new file mode 100644
index 000000000..cbbb05458
--- /dev/null
+++ b/community-staging/tvtime/tvtime-1.0.2-locale_t.patch
Binary files differ
diff --git a/community-staging/virtviewer/PKGBUILD b/community-staging/virtviewer/PKGBUILD
new file mode 100644
index 000000000..139775774
--- /dev/null
+++ b/community-staging/virtviewer/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 62502 2012-01-20 09:36:11Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Jonathan Wiersma <archaur at jonw dot org>
+
+pkgname=virtviewer
+pkgver=0.4.1
+pkgrel=2
+pkgdesc="A lightweight interface for interacting with the graphical display of virtualized guest OS."
+depends=('gtk-vnc' 'libglade>=2.6.0' 'libvirt')
+makedepends=('intltool')
+url="http://virt-manager.et.redhat.com"
+arch=('i686' 'x86_64')
+license=('GPL')
+source=("http://virt-manager.et.redhat.com/download/sources/virt-viewer/virt-viewer-$pkgver.tar.gz")
+md5sums=('1cc86ed3fbbe37a56faa6476b2e6dbcd')
+
+build() {
+ cd $srcdir/virt-viewer-$pkgver
+ export LDFLAGS=-lX11
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=$pkgdir install
+}
diff --git a/community-staging/w3cam/PKGBUILD b/community-staging/w3cam/PKGBUILD
new file mode 100644
index 000000000..7b6a1b0b5
--- /dev/null
+++ b/community-staging/w3cam/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 62504 2012-01-20 09:37:26Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Christian Schmidt <mucknert@gmx.net>
+
+pkgname=w3cam
+pkgver=0.7.2
+pkgrel=10
+pkgdesc="a small and fast CGI program to retrieve images from a video4linux device."
+arch=('i686' 'x86_64')
+url="http://mpx.freeshell.net/"
+license=('GPL')
+depends=('libpng' 'libjpeg')
+makedepends=('v4l-utils')
+source=(http://mpx.freeshell.net/$pkgname-$pkgver.tar.gz)
+md5sums=('eec0b301b32bc8e9f65a4e54248c9868')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i 's|#include <linux/videodev.h>|#include <libv4l1-videodev.h>|' v4l.c vidcat.c w3cam.c w3camd/w3v4l.c
+ ./configure --prefix=/usr --with-device=/dev/video0 --with-ttf-inc=/usr/include/freetype
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ mkdir -p $pkgdir/usr/cgi-bin $pkgdir/usr/bin $pkgdir/usr/man/man1 $pkgdir/usr/share/
+ make prefix=$pkgdir/usr/ install
+ mkdir -p $pkgdir/usr/lib/w3cam/
+ mv $pkgdir/usr/cgi-bin/* $pkgdir/usr/lib/w3cam/
+ mv $pkgdir/usr/man $pkgdir/usr/share/man
+ rm -rf $pkgdir/usr/cgi-bin
+}
diff --git a/community-staging/widelands/PKGBUILD b/community-staging/widelands/PKGBUILD
new file mode 100644
index 000000000..7e84f2d83
--- /dev/null
+++ b/community-staging/widelands/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id: PKGBUILD 62462 2012-01-20 07:32:03Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Arkham <arkham at archlinux dot us>
+# Contributor: Christoph Zeiler <rabyte*gmail>
+
+pkgname=widelands
+pkgver=16
+_realver=build16
+pkgrel=5
+pkgdesc="A realtime strategy game with emphasis on economy and transport"
+arch=('i686' 'x86_64')
+url="http://widelands.org/"
+license=('GPL')
+makedepends=('cmake' 'boost' 'sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'ggz-client-libs' 'lua' 'glew' 'python2')
+source=(http://launchpad.net/$pkgname/build16/$_realver/+download/$pkgname-$_realver-src.tar.bz2
+ widelands-0.16-libpng15.patch
+ $pkgname.desktop
+ $pkgname.png
+ $pkgname.sh)
+md5sums=('3d8c28e145b73c64d8ed1625319d25a2'
+ 'e492620b071cbd1db04280173653a67c'
+ '15820bf099fd6f16251fe70a75c534bb'
+ '3dfda7e9ca76ca00dd98d745d0ceb328'
+ '7cae50aba5ed0cd2cfeea79124637b46')
+
+build() {
+ cd $srcdir/$pkgname-$_realver-src
+
+ patch -Np0 < $srcdir/widelands-0.16-libpng15.patch
+
+ mkdir -p build/compile && cd build/compile
+
+ cmake ../.. -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWL_INSTALL_PREFIX=/usr \
+ -DWL_INSTALL_DATADIR=share/$pkgname \
+ -DWL_INSTALL_BINDIR=bin
+ make
+}
+
+package() {
+ depends=('sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'ggz-client-libs' 'lua' 'glew' 'python2' 'widelands-data>=16')
+
+ cd $srcdir/$pkgname-$_realver-src/build/compile
+
+ make DESTDIR="$pkgdir" install
+
+ rm -r $pkgdir/usr/share/widelands/{campaigns,fonts,global,locale,maps,music,pics,scripting,sound,tribes,txts,worlds}
+
+ # Install bin, icon and desktop file
+ #install -Dm 755 src/$pkgname $pkgdir/usr/share/$pkgname/$pkgname
+ #install -Dm 755 $srcdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
+ install -Dm644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
+ install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+}
diff --git a/community-staging/widelands/widelands-0.16-libpng15.patch b/community-staging/widelands/widelands-0.16-libpng15.patch
new file mode 100644
index 000000000..9f733e7b9
--- /dev/null
+++ b/community-staging/widelands/widelands-0.16-libpng15.patch
@@ -0,0 +1,61 @@
+--- src/graphic/SDL_mng.cc
++++ src/graphic/SDL_mng.cc
+@@ -276,7 +276,7 @@
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in png_create_read_struct() earlier.
+ */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ SDL_SetError("Error reading the PNG file.");
+ goto done;
+ }
+@@ -356,9 +356,9 @@
+ Rmask = 0x000000FF;
+ Gmask = 0x0000FF00;
+ Bmask = 0x00FF0000;
+- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
++ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
+ } else {
+- int const s = (info_ptr->channels == 4) ? 0 : 8;
++ int const s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
+ Rmask = 0xFF000000 >> s;
+ Gmask = 0x00FF0000 >> s;
+ Bmask = 0x0000FF00 >> s;
+@@ -369,7 +369,7 @@
+ SDL_AllocSurface
+ (SDL_SWSURFACE,
+ width, height,
+- bit_depth * info_ptr->channels,
++ bit_depth * png_get_channels(png_ptr, info_ptr),
+ Rmask, Gmask, Bmask, Amask);
+ if (not surface) {
+ SDL_SetError("Out of memory");
+@@ -407,6 +407,9 @@
+ /* read rest of file, get additional chunks in info_ptr - REQUIRED */
+ png_read_end(png_ptr, info_ptr);
+
++ png_colorp png_palette;
++ int png_num_palette;
++
+ /* Load the palette, if any */
+ if ((palette = surface->format->palette)) {
+ if (color_type == PNG_COLOR_TYPE_GRAY) {
+@@ -416,12 +419,12 @@
+ palette->colors[i].g = i;
+ palette->colors[i].b = i;
+ }
+- } else if (info_ptr->num_palette > 0) {
+- palette->ncolors = info_ptr->num_palette;
+- for (uint32_t i = 0; i < info_ptr->num_palette; ++i) {
+- palette->colors[i].b = info_ptr->palette[i].blue;
+- palette->colors[i].g = info_ptr->palette[i].green;
+- palette->colors[i].r = info_ptr->palette[i].red;
++ } else if (png_num_palette > 0) {
++ palette->ncolors = png_num_palette;
++ for (uint32_t i = 0; i < png_num_palette; ++i) {
++ palette->colors[i].b = png_palette[i].blue;
++ palette->colors[i].g = png_palette[i].green;
++ palette->colors[i].r = png_palette[i].red;
+ }
+ }
+ }
diff --git a/community-staging/widelands/widelands-build15-gcc-4.5-patch b/community-staging/widelands/widelands-build15-gcc-4.5-patch
new file mode 100644
index 000000000..6ba313358
--- /dev/null
+++ b/community-staging/widelands/widelands-build15-gcc-4.5-patch
@@ -0,0 +1,51 @@
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc 2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc 2010-07-01 21:15:56.000000000 +0000
+@@ -113,7 +113,7 @@
+ posx, posy, width, height,
+ g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+ &Main_Menu_New_Map::button_clicked, *this, 4,
+- Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ posy += height + spacing + spacing + spacing;
+
+@@ -142,7 +142,7 @@
+ if (m_currentworld == m_worlds.size())
+ m_currentworld = 0;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name
+ ());
+ break;
+ }
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc 2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc 2010-07-01 21:17:39.000000000 +0000
+@@ -272,7 +272,7 @@
+ posx, posy, width, height,
+ g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+ &Main_Menu_New_Random_Map::button_clicked, *this, 8,
+- Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ posy += height + spacing + spacing + spacing;
+
+@@ -343,7 +343,7 @@
+ if (m_currentworld == m_worlds.size())
+ m_currentworld = 0;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ break;
+ case 9:
+ break;
+@@ -476,7 +476,7 @@
+ (strcmp(mapInfo.worldName.c_str(), m_worlds[m_currentworld].c_str()))
+ ++m_currentworld;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ button_clicked(-1); // Update other values in UI as well
+
diff --git a/community-staging/widelands/widelands.desktop b/community-staging/widelands/widelands.desktop
new file mode 100644
index 000000000..9715d816c
--- /dev/null
+++ b/community-staging/widelands/widelands.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Widelands
+GenericName=Widelands
+Comment=Realtime strategy game
+Icon=widelands
+Exec=widelands
+Type=Application
+Categories=Game;StrategyGame;
diff --git a/community-staging/widelands/widelands.png b/community-staging/widelands/widelands.png
new file mode 100644
index 000000000..c329cf667
--- /dev/null
+++ b/community-staging/widelands/widelands.png
Binary files differ
diff --git a/community-staging/widelands/widelands.sh b/community-staging/widelands/widelands.sh
new file mode 100644
index 000000000..0b21a1694
--- /dev/null
+++ b/community-staging/widelands/widelands.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/share/widelands
+./widelands $*
diff --git a/community/bird/PKGBUILD b/community/bird/PKGBUILD
index 618c18f3b..8bab0f4d1 100644
--- a/community/bird/PKGBUILD
+++ b/community/bird/PKGBUILD
@@ -1,9 +1,9 @@
# $Id$
-# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
pkgbase=bird
pkgname=('bird' 'bird6')
-pkgver=1.3.5
+pkgver=1.3.6
pkgrel=1
arch=('i686' 'x86_64')
url='http://bird.network.cz/'
@@ -14,7 +14,7 @@ source=("ftp://bird.network.cz/pub/bird/${pkgname}-${pkgver}.tar.gz"
'bird.conf'
'bird.service'
'bird6.service')
-md5sums=('9efc2b1c05fa6298a8df60f5147ad5c1'
+md5sums=('fa5621a41dcd86b6cb8cbe4fbd74af7e'
'1a4b98756d64f52333a83eff2e95d233'
'25241a4d7ef639506e0080431b2c1690'
'e82a0519dca0b289685fda44787f5911'
diff --git a/community/calibre/PKGBUILD b/community/calibre/PKGBUILD
index 53ce5607c..af9fd6d17 100644
--- a/community/calibre/PKGBUILD
+++ b/community/calibre/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 61987 2012-01-13 12:17:48Z giovanni $
+# $Id: PKGBUILD 62518 2012-01-20 10:19:50Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Petrov Roman <nwhisper@gmail.com>
# Contributor: Andrea Fagiani <andfagiani _at_ gmail dot com>
pkgname=calibre
-pkgver=0.8.35
+pkgver=0.8.36
pkgrel=1
pkgdesc="Ebook management application"
arch=('i686' 'x86_64')
@@ -21,7 +21,7 @@ install=calibre.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz"
'desktop_integration.patch'
'calibre-mount-helper')
-md5sums=('0a1170534492c6ca5b9f849cbfaa7acc'
+md5sums=('cc009c02fa0db088d074fef8b983e78a'
'253ce4fe5d01f8ff76b63cd3825755ea'
'675cd87d41342119827ef706055491e7')
diff --git a/community/dos2unix/PKGBUILD b/community/dos2unix/PKGBUILD
new file mode 100644
index 000000000..5c7dd4848
--- /dev/null
+++ b/community/dos2unix/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Bartłomiej Piotrowski <barthalion@gmail.com>
+# Contributor: Renato Garcia <fgar.renatoATgmailDOTcom>
+# Contributor: Gerson E. Ruotolo <gersonruotolo@globo.com>
+
+pkgname=dos2unix
+pkgver=5.3.1
+pkgrel=3
+pkgdesc='Text file format converter'
+arch=('i686' 'x86_64')
+url='http://waterlan.home.xs4all.nl/dos2unix.html'
+license=('BSD')
+depends=('glibc')
+makedepends=('perl')
+conflicts=('hd2u')
+source=("http://waterlan.home.xs4all.nl/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+md5sums=('438c48ebd6891b80b58de14c022ca69e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -D -m644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/community/freemat/PKGBUILD b/community/freemat/PKGBUILD
index 0dc55bb14..2609674ba 100644
--- a/community/freemat/PKGBUILD
+++ b/community/freemat/PKGBUILD
@@ -1,45 +1,38 @@
-# $Id: PKGBUILD 58815 2011-11-18 15:51:12Z spupykin $
+# $Id: PKGBUILD 62525 2012-01-20 17:49:51Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
pkgname=freemat
-pkgver=4.0
-pkgrel=5
+pkgver=4.1
+pkgrel=1
pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing"
arch=('i686' 'x86_64')
url="http://freemat.sourceforge.net"
license=('GPL')
-depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio')
-makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake')
+depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio' 'libffi')
+makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake' 'python2')
install=freemat.install
source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz
- freemat-gcc-4.3.0.patch
- freemat-gcc-4.5.0.patch
- freemat-qt46.patch
- input-fix.patch)
-md5sums=('adb58b9f2c508d9ae5b6041da2f75baf'
- '3dc3848949183de2664c2cf67663c892'
- 'a3edb7b51057a90a752aff5053f8eed6'
- 'a8d2ffa9319eccaedb28a10f9c7617f4'
- 'a78941563453feaca5c7463eaeea1a70')
+ build-fix.patch)
+md5sums=('929d31e2310feaff5d380fc2f7b4d1a2'
+ '2d11a28aa2a7df89c4618ed1c4be5973')
build() {
- cd $srcdir/FreeMat-$pkgver.1-Source
+ cd $srcdir/FreeMat-$pkgver-Source
- if [ $NOEXTRACT -ne 1 ]; then
- patch -p1 <$srcdir/freemat-gcc-4.5.0.patch
- patch -p1 <$srcdir/input-fix.patch
- patch -p1 <$srcdir/freemat-qt46.patch
- patch -p1 CMakeCache.txt <<EOF
-23c23,25
-< CMAKE_CACHEFILE_DIR:INTERNAL=/home/basu/dev/branches/FreeMat4
----
-> #CMAKE_CACHEFILE_DIR:INTERNAL=/home/basu/dev/branches/FreeMat4
-> USE_LLVM:BOOL=OFF
-> CMAKE_INSTALL_PREFIX:PATH=/usr
-EOF
- cmake `pwd`
- fi
+ rm -f CMakeCache.txt
+ find . -type f -name '*.moc.cpp' -exec rm -f {} \;
+ find . -type f -name 'add.so' -exec rm -f {} \;
+ patch -p1 <$srcdir/build-fix.patch
+ echo >libs/libMatC/CJitFuncClang.hpp
+ echo >libs/libMatC/CJitFuncClang.cpp
+
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DUSE_LLVM=OFF \
+ -DFFI_INCLUDE_DIR=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ .
make
make DESTDIR=$pkgdir install
sed -i "s|/FreeMat-.*/|/FreeMat-$pkgver/|g" $startdir/freemat.install
diff --git a/community/freemat/build-fix.patch b/community/freemat/build-fix.patch
new file mode 100644
index 000000000..c1ea63088
--- /dev/null
+++ b/community/freemat/build-fix.patch
@@ -0,0 +1,11 @@
+diff -wbBur FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp
+--- FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp 2011-11-27 04:27:43.000000000 +0400
++++ FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp 2012-01-20 19:07:48.000000000 +0400
+@@ -20,6 +20,7 @@
+ #include <qimage.h>
+ #include <qpainter.h>
+ #include <QtOpenGL>
++#include <GL/glu.h>
+ #include <math.h>
+ #include "IEEEFP.hpp"
+
diff --git a/community/freemat/freemat.install b/community/freemat/freemat.install
index e319f1a24..051cca866 100644
--- a/community/freemat/freemat.install
+++ b/community/freemat/freemat.install
@@ -1,7 +1,7 @@
post_install() {
- echo "-- Use FreeMat -i /usr/share/FreeMat-4.0/ to adjust docs location"
+ echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location"
}
post_upgrade() {
- echo "-- Use FreeMat -i /usr/share/FreeMat-4.0/ to adjust docs location"
+ echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location"
}
diff --git a/community/haveged/PKGBUILD b/community/haveged/PKGBUILD
new file mode 100644
index 000000000..e3a60bdb9
--- /dev/null
+++ b/community/haveged/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Bartłomiej Piotrowski <barthalion@gmail.com>
+# Contributor: kfgz <kfgz at interia dot pl>
+# Contributor: pootzko <pootzko at gmail dot com>
+
+pkgname=haveged
+pkgver=1.3a
+pkgrel=1
+pkgdesc="A simple entropy daemon."
+arch=('i686' 'x86_64')
+url="http://www.issihosts.com/haveged"
+license=('GPL')
+depends=('bash')
+source=(${url}/${pkgname}-${pkgver}.tar.gz
+ haveged)
+md5sums=('dad8b95c6eafcec7eb42eb8454e60a0d'
+ '264b725be5271288b40f363d7cfc6b68')
+
+build() {
+ cd "${srcdir}"/${pkgname}-${pkgver/a/}
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/${pkgname}-${pkgver/a/}
+ make DESTDIR="${pkgdir}" install
+ rm -rf "${pkgdir}"/etc/init.d
+
+ cd "${srcdir}"
+ install -D -m755 haveged "${pkgdir}"/etc/rc.d/haveged
+}
diff --git a/community/haveged/haveged b/community/haveged/haveged
new file mode 100644
index 000000000..c0e13b40d
--- /dev/null
+++ b/community/haveged/haveged
@@ -0,0 +1,44 @@
+#!/bin/bash
+##
+# chkconfig: 2345 75 25
+# description: havege entropy daemon
+#
+# source function library
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+RETVAL=0
+prog="haveged"
+
+case "$1" in
+start)
+ stat_busy $"Starting $prog"
+ /usr/sbin/$prog -w 1024 -v 1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $prog
+ stat_done
+ fi
+ ;;
+
+stop)
+ stat_busy $"Stopping $prog"
+ kill `cat /var/run/$prog.pid`
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $prog
+ stat_done
+ rm -f /var/lock/$prog
+ fi
+ ;;
+
+restart)
+ $0 stop
+ $0 start
+ ;;
+
+*)
+ echo "usage: $prog [start|stop|restart]"
+esac
diff --git a/community/i7z/PKGBUILD b/community/i7z/PKGBUILD
new file mode 100644
index 000000000..f573fc123
--- /dev/null
+++ b/community/i7z/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Nathan O <ndowens.aur at gmail dot com>
+
+pkgname=i7z
+pkgver=0.27.1
+pkgrel=1
+pkgdesc="A better i7 (and now i3, i5) reporting tool for Linux"
+arch=('i686' 'x86_64')
+license=('GPL2')
+depends=('ncurses')
+makedepends=('qt')
+optdepends=('qt: for i7z-gui')
+url="http://code.google.com/p/i7z/"
+source=("http://i7z.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")
+md5sums=('4408e0e39b195b8fe6383cadc971a862')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make
+
+ cd GUI
+ qmake
+ make clean
+ make
+}
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ install -Dm 755 i7z ${pkgdir}/usr/bin/i7z
+ install -Dm 755 GUI/i7z_GUI ${pkgdir}/usr/bin/i7z-gui
+}
diff --git a/community/libbsd/LICENSE b/community/libbsd/LICENSE
new file mode 100644
index 000000000..7dcbfc2ba
--- /dev/null
+++ b/community/libbsd/LICENSE
@@ -0,0 +1,28 @@
+/*-
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
diff --git a/community/libbsd/PKGBUILD b/community/libbsd/PKGBUILD
new file mode 100644
index 000000000..23bb96d5a
--- /dev/null
+++ b/community/libbsd/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
+
+pkgname=libbsd
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="Provides useful functions commonly found on BSD systems like strlcpy()"
+arch=('i686' 'x86_64')
+url="http://libbsd.freedesktop.org"
+license=('custom')
+depends=('glibc')
+source=(http://libbsd.freedesktop.org/releases/$pkgname-$pkgver.tar.gz
+ LICENSE)
+md5sums=('833e58531b4bd84b119b53d834d8e0d8'
+ '5bd59ff83a7df4873b034478ffae62a6')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make exec_prefix=/usr includedir=/usr/include/libbsd
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make exec_prefix=/usr includedir=/usr/include/libbsd DESTDIR=$pkgdir install
+ install -D -m644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/community/libircclient/PKGBUILD b/community/libircclient/PKGBUILD
index 50e1c02a8..4608c5424 100644
--- a/community/libircclient/PKGBUILD
+++ b/community/libircclient/PKGBUILD
@@ -1,20 +1,18 @@
# Maintainer: Bartłomiej Piotrowski <barthalion@gmail.com>
-# Contributor: SpepS <dreamspepser at yahoo dot it>
+# Maintainer: SpepS <dreamspepser at yahoo dot it>
# Contributor: Marcel Wysocki <maci@satgnu.net>
# Contributor: coolkehon <coolkehon at g m a i l>
pkgname=libircclient
-pkgver=1.3
-pkgrel=5
+pkgver=1.5
+pkgrel=1
pkgdesc="A small but powerful library, which implements client-server IRC protocol."
arch=('i686' 'x86_64')
-url="http://libircclient.sf.net"
+url="http://www.ulduzsoft.com/libircclient/"
depends=('glibc')
-license=("GPL2")
-source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
- "shared.patch")
-md5sums=('b0e80d1d6b0c1cc61660fb9d2350b32d'
- 'f2c350d140bd522990c15162645c72f0')
+license=('GPL')
+source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('fd1f33181c50823f105df6400eb7746d')
build() {
cd "$srcdir/$pkgname-$pkgver"
@@ -22,15 +20,36 @@ build() {
# add fPIC flag for x86_64
[ "$CARCH" = x86_64 ] && export CFLAGS="$CFLAGS -fPIC"
- # shared and path patch
- patch -p1 -i ../shared.patch
+ ## Makefile.in fixes:
+ # invalid `lib` requisite for `install` target
+ # install shared lib instead of static
+ # headers in /usr/include/$pkgname
+ sed -e "/install/s/lib/all/" \
+ -e "/DESTDIR/s/\.a/\.so/g" \
+ -e "s/@\/include/&\/$pkgname/" \
+ -i src/Makefile.in
- ./configure --prefix=/usr
- cd src && make CFLAGS="$CFLAGS"
+ ./configure --prefix=/usr \
+ --enable-shared
+
+ cd src && make CFLAGS="$CFLAGS"
}
package() {
cd "$srcdir/$pkgname-$pkgver/src"
make DESTDIR="$pkgdir/" install
+
+ # doc
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -a ../doc/{html,rfc1459.txt} \
+ "$pkgdir/usr/share/doc/$pkgname"
+
+ # man
+ cp -a ../doc/man "$pkgdir/usr/share"
+
+ # examples (optional)
+ install -d "$pkgdir/usr/share/$pkgname/examples"
+ install -Dm644 ../examples/* \
+ "$pkgdir/usr/share/$pkgname/examples"
}
diff --git a/community/nodejs/PKGBUILD b/community/nodejs/PKGBUILD
index bae6527de..8ec1be501 100644
--- a/community/nodejs/PKGBUILD
+++ b/community/nodejs/PKGBUILD
@@ -6,7 +6,7 @@
# Contributor: TIanyi Cui <tianyicui@gmail.com>
pkgname=nodejs
-pkgver=0.6.7
+pkgver=0.6.8
pkgrel=1
pkgdesc='Evented I/O for V8 javascript'
arch=('i686' 'x86_64')
@@ -17,16 +17,20 @@ checkdepends=('curl') # curl used for check()
optdepends=('openssl: TLS support')
options=('!emptydirs')
source=("http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz")
-md5sums=('e7b238356ea7fb230b956010931ca468')
+md5sums=('9fd7baa2d27b848c3134e6ae35bb87b2')
build() {
cd node-v${pkgver}
msg 'fixing for python2 name'
- find -type f -exec sed -e 's_^#!/usr/bin/env python$_&2_' -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' -e 's_^#!/usr/bin/python$_&2_' -i {} \;
+ find -type f -exec sed -e 's_^#!/usr/bin/env python$_&2_' -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' -e 's_^#!/usr/bin/python$_&2_' -e "s_'python'_'python2'_" -i {} \;
+ find test -type f -exec sed -e "s|python |python2 |" -i {} \;
sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript
sed -i "s|python |python2 |" Makefile
find test -type f -exec sed -e 's/python/&2/' -i {} \;
+ sed -i "s/python/&2/" configure
+
+ export PYTHON=python2
./configure \
--prefix=/usr
diff --git a/community/opensc/PKGBUILD b/community/opensc/PKGBUILD
new file mode 100644
index 000000000..1da03752e
--- /dev/null
+++ b/community/opensc/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 62576 2012-01-21 15:54:56Z seblu $
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
+# Contributor: kevku <kevku@msn.com>
+
+pkgname=opensc
+pkgver=0.12.2
+pkgrel=3
+pkgdesc='Access smart cards that support cryptographic operations'
+arch=('x86_64' 'i686')
+url='http://www.opensc-project.org/opensc/'
+license=('LGPL')
+backup=('etc/opensc.conf')
+makedepends=('docbook-xsl')
+depends=('openssl' 'pcsclite' 'libltdl')
+options=('!libtool' '!emptydirs')
+source=("http://www.opensc-project.org/files/$pkgname/$pkgname-$pkgver.tar.gz")
+md5sums=('5116adea5f2f9f22fb9896965789144b')
+
+build() {
+ cd $pkgname-$pkgver
+ export LIBS=-lltdl
+ _sheetdir=(/usr/share/xml/docbook/xsl-stylesheets-*)
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-man \
+ --enable-doc \
+ --enable-readline \
+ --enable-openssl \
+ --enable-pcsc \
+ --enable-zlib \
+ --with-xsl-stylesheetsdir="$_sheetdir"
+ make
+}
+
+package(){
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+ install -D -m644 etc/opensc.conf "$pkgdir/etc/opensc.conf"
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/par2cmdline/PKGBUILD b/community/par2cmdline/PKGBUILD
new file mode 100644
index 000000000..9b37571a5
--- /dev/null
+++ b/community/par2cmdline/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 62520 2012-01-20 16:52:42Z seblu $
+# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org
+# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
+
+pkgname=par2cmdline
+pkgver=0.5.3
+pkgrel=1
+pkgdesc='A PAR 2.0 compatible file verification and repair tool'
+url='https://github.com/BlackIkeEagle/par2cmdline'
+license=('GPL2')
+arch=('i686' 'x86_64')
+source=("https://github.com/downloads/BlackIkeEagle/$pkgname/$pkgname-$pkgver.tar.xz")
+md5sums=('708db095eac3d83f21ce27b8be123c54')
+
+build() {
+ cd ${pkgname}-${pkgver}
+ aclocal
+ automake --add-missing
+ autoconf
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd ${pkgname}-${pkgver}
+ make check
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/pidgin-gfire/PKGBUILD b/community/pidgin-gfire/PKGBUILD
new file mode 100644
index 000000000..9abfa1f83
--- /dev/null
+++ b/community/pidgin-gfire/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Slash <demodevil5[at]yahoo[dot]com>
+# Contributor: LookTJ <jesus[dot]christ[dot]i[dot]love[at]gmail[dot]com>
+
+pkgname=pidgin-gfire
+pkgver=0.9.4
+pkgrel=3
+pkgdesc="Gfire is an Plugin for the Pidgin IM client which allows you to connect the Xfire network."
+arch=('i686' 'x86_64')
+url="http://gfireproject.org/"
+license=('GPL')
+depends=('glib2' 'libpurple' 'libnotify' 'gtk2')
+makedepends=('pkgconfig' 'intltool' 'libtool')
+source=("http://downloads.sourceforge.net/gfire/pidgin-gfire-$pkgver.tar.bz2" "gfire-libnotify.patch")
+md5sums=('7167828fd77200603a318afdd4d9ebd2'
+ '5d6fc2b98837fbebba6bef2648699d5e')
+options=(!libtool)
+
+build() {
+ cd "$srcdir/pidgin-gfire-$pkgver"
+
+ patch -p0 -i ../gfire-libnotify.patch
+ ./autogen.sh
+ ./configure --prefix=/usr --enable-libnotify
+ make
+ make DESTDIR="$pkgdir" install
+}
diff --git a/community/pidgin-gfire/gfire-libnotify.patch b/community/pidgin-gfire/gfire-libnotify.patch
new file mode 100644
index 000000000..51e744cd9
--- /dev/null
+++ b/community/pidgin-gfire/gfire-libnotify.patch
@@ -0,0 +1,21 @@
+--- src/gf_util.c 2011-03-14 21:19:46.987545000 +0100
++++ src/gf_util.c 2011-04-18 03:36:24.970676551 +0200
+@@ -612,7 +612,7 @@
+ if(!gfire_notify_init() || !p_title)
+ return;
+
+- NotifyNotification *notification = notify_notification_new(p_title, p_msg, NULL, NULL);
++ NotifyNotification *notification = notify_notification_new(p_title, p_msg, NULL);
+ notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL);
+ notify_notification_set_timeout(notification, NOTIFY_EXPIRES_DEFAULT);
+ g_signal_connect(notification, "closed", G_CALLBACK(gfire_notify_closed_cb), NULL);
+@@ -637,7 +637,7 @@
+ return;
+ }
+
+- notification = notify_notification_new(p_title, p_msg, NULL, NULL);
++ notification = notify_notification_new(p_title, p_msg, NULL);
+
+ // Get Buddy Icon
+ PurpleBuddyIcon *icon = purple_buddy_get_icon(p_buddy);
+
diff --git a/community/python-memcached/PKGBUILD b/community/python-memcached/PKGBUILD
index cd1a154f9..f9d01cbfe 100644
--- a/community/python-memcached/PKGBUILD
+++ b/community/python-memcached/PKGBUILD
@@ -2,16 +2,16 @@
# Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
# Contributor: Nathan Jones <nathanj@insightbb.com>
pkgname=python-memcached
-pkgver=1.47
+pkgver=1.48
pkgrel=1
pkgdesc="A Python interface to memcached"
-depends=('python2')
-makedepends=('setuptools')
-source=(ftp://ftp.tummy.com/pub/$pkgname/$pkgname-$pkgver.tar.gz LICENSE)
url="ftp://ftp.tummy.com/pub/python-memcached/"
-license=('Python')
arch=('i686' 'x86_64')
-md5sums=('e4e9d65e5721a1bb01f8d657ddf3f03e'
+license=('Python')
+source=(ftp://ftp.tummy.com/pub/$pkgname/$pkgname-$pkgver.tar.gz LICENSE)
+makedepends=('setuptools')
+depends=('python2')
+md5sums=('58f8c328304df6aca1f8b60170e98932'
'5286ea4c34766a357085694e0984f116')
build() {
diff --git a/community/python-mpi4py/PKGBUILD b/community/python-mpi4py/PKGBUILD
index 670baf0dc..83574c743 100644
--- a/community/python-mpi4py/PKGBUILD
+++ b/community/python-mpi4py/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 60172 2011-12-06 14:17:13Z stephane $
+# $Id: PKGBUILD 62551 2012-01-21 03:26:53Z stephane $
# Maintainer : Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sebastien Binet <binet@cern.ch>
pkgbase=python-mpi4py
pkgname=('python-mpi4py' 'python2-mpi4py')
-pkgver=1.2.2
-pkgrel=5
+pkgver=1.3
+pkgrel=1
arch=('i686' 'x86_64')
url="http://mpi4py.scipy.org"
license=('BSD')
makedepends=('python' 'python2' 'python-distribute' 'python2-distribute' 'openmpi')
source=(http://mpi4py.googlecode.com/files/mpi4py-${pkgver}.tar.gz)
-sha1sums=('e08d09257794a85d010a22ad9bda9d1c89a6258f')
+sha1sums=('282c1b9e35b242c9bd86126ebc5af6c70d8c2833')
build() {
cd "${srcdir}"
diff --git a/community/roxterm/PKGBUILD b/community/roxterm/PKGBUILD
index 7123e83fa..1630b5894 100644
--- a/community/roxterm/PKGBUILD
+++ b/community/roxterm/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 62226 2012-01-18 16:36:56Z ttopper $
+# $Id: PKGBUILD 62568 2012-01-21 14:00:13Z ttopper $
# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de>
# Contributor: Alexander Fehr <pizzapunk gmail com>
pkgname=roxterm
pkgver=2.4.2
-pkgrel=1
+pkgrel=2
pkgdesc="Tabbed, VTE-based terminal emulator"
arch=('i686' 'x86_64')
url="http://roxterm.sourceforge.net/"
@@ -20,13 +20,13 @@ md5sums=('7c3bb1471f814a8bfdfcf169ad18e425')
build() {
cd "${srcdir}/roxterm-${pkgver}"
- python2 mscript.py configure
+ python2 mscript.py configure --prefix="/usr"
python2 mscript.py build
}
package() {
cd "${srcdir}/roxterm-${pkgver}"
- python2 mscript.py install --destdir=${pkgdir} --prefix="usr"
+ python2 mscript.py install --destdir="${pkgdir}"
}
# vim:set ts=2 sw=2 et:
diff --git a/community/snort/PKGBUILD b/community/snort/PKGBUILD
index 394ee7835..9a9a03107 100644
--- a/community/snort/PKGBUILD
+++ b/community/snort/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 60676 2011-12-16 19:35:40Z lfleischer $
+# $Id: PKGBUILD 62466 2012-01-20 07:55:34Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
@@ -6,7 +6,7 @@
# Contributor: Gregor Ibic <gregor.ibic@intelicom.si>
pkgname=snort
-pkgver=2.9.2
+pkgver=2.9.2.1
pkgrel=1
pkgdesc='A lightweight network intrusion detection system.'
arch=('i686' 'x86_64')
@@ -21,10 +21,10 @@ backup=('etc/conf.d/snort'
'etc/snort/classification.config')
options=('!makeflags' '!libtool')
install='snort.install'
-source=('http://www.snort.org/downloads/1347'
+source=('http://www.snort.org/downloads/1419'
'snort'
'snort.conf.d')
-md5sums=('22fa07ba915535b151329056439ae194'
+md5sums=('2f3e2b6ee72adbdfac73cb1c6c14bd61'
'361b8b9e40b9af0164f6b3e3da2e8277'
'b4fb8a68490589cd34df93de7609bfac')
diff --git a/core/kmod/PKGBUILD b/core/kmod/PKGBUILD
new file mode 100644
index 000000000..5147f866f
--- /dev/null
+++ b/core/kmod/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 147035 2012-01-21 00:32:01Z dreisner $
+# Maintainer: Dave Reisner <dreisner@archlinux.org>
+
+pkgname=kmod
+pkgver=4
+pkgrel=1
+pkgdesc="Linux kernel module handling"
+arch=('i686' 'x86_64')
+url="http://git.profusion.mobi/cgit.cgi/kmod.git"
+license=('GPL2')
+depends=('glibc' 'zlib')
+makedepends=('docbook2x')
+options=('!libtool')
+provides=('module-init-tools=3.16')
+conflicts=('module-init-tools')
+replaces=('module-init-tools')
+source=("http://packages.profusion.mobi/$pkgname/$pkgname-$pkgver.tar.xz"
+ "depmod-search.conf")
+md5sums=('e14450a066a48accd0af1995b3c0232d'
+ '4b8cbcbc54b9029c99fd730e257d4436')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ ./configure \
+ --sysconfdir=/etc \
+ --with-rootprefix= \
+ --with-zlib
+
+ make
+}
+
+check() {
+ make -C "$pkgname-$pkgver" check
+}
+
+package() {
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+ # binary directories
+ install -dm755 "$pkgdir"/{,s}bin
+
+ # configuration directories
+ install -dm755 "$pkgdir"/{etc,lib}/{depmod,modprobe}.d
+
+ # add symlinks to kmod
+ ln -s /usr/bin/kmod "$pkgdir/bin/lsmod"
+ for tool in {ins,rm,dep}mod mod{info,probe}; do
+ ln -s ../usr/bin/kmod "$pkgdir/sbin/$tool"
+ done
+
+ # install depmod.d file for search/ dir
+ install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/lib/depmod.d/search.conf"
+}
+
+# vim: ft=sh syn=sh et
diff --git a/core/kmod/depmod-search.conf b/core/kmod/depmod-search.conf
new file mode 100644
index 000000000..3feb67b05
--- /dev/null
+++ b/core/kmod/depmod-search.conf
@@ -0,0 +1,5 @@
+#
+# /etc/depmod.d/depmod.conf
+#
+
+search updates extramodules built-in
diff --git a/core/sqlite3/PKGBUILD b/core/sqlite3/PKGBUILD
index c82d70599..f24676f44 100644
--- a/core/sqlite3/PKGBUILD
+++ b/core/sqlite3/PKGBUILD
@@ -1,13 +1,14 @@
-# $Id: PKGBUILD 142094 2011-11-05 09:05:38Z andyrtr $
+# $Id: PKGBUILD 147078 2012-01-21 15:49:21Z andyrtr $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgbase="sqlite3"
pkgname=('sqlite3' 'sqlite3-tcl' 'sqlite3-doc')
-_amalgamationver=3070900
+_amalgamationver=3071000
_amalgamationver2=${_amalgamationver/00/}
_docver=${_amalgamationver} #3070700
-pkgver=${_amalgamationver2//0/.}
+#pkgver=${_amalgamationver2//0/.}
+pkgver=3.7.10
pkgrel=1
pkgdesc="A C library that implements an SQL database engine"
arch=('i686' 'x86_64')
@@ -20,8 +21,8 @@ source=( # tarball containing the amalgamation for SQLite 3.7.5 together with a
http://www.sqlite.org/sqlite-doc-${_docver}.zip
license.txt)
options=('!libtool' '!emptydirs')
-md5sums=('dce303524736fe89a76b8ed29d566352'
- 'c48c231dd43d3b74f1d00c36424d87f4'
+md5sums=('9ed2ca93577b58cfa0d01f64b9312ab9'
+ 'd4c8070ea2cec54b77002c265e680b0f'
'c1cdbc5544034d9012e421e75a5e4890')
build() {
diff --git a/core/udev/0001-udevd-kill-hanging-event-processes-after-30-seconds.patch b/core/udev/0001-udevd-kill-hanging-event-processes-after-30-seconds.patch
new file mode 100644
index 000000000..3ff89ae43
--- /dev/null
+++ b/core/udev/0001-udevd-kill-hanging-event-processes-after-30-seconds.patch
@@ -0,0 +1,162 @@
+From e64fae5573e566ce4fd9b23c68ac8f3096603314 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay.sievers@vrfy.org>
+Date: Wed, 18 Jan 2012 05:06:18 +0100
+Subject: [PATCH] udevd: kill hanging event processes after 30 seconds
+
+Some broken kernel drivers load firmware synchronously in the module init
+path and block modprobe until the firmware request is fulfilled.
+
+The modprobe-generated firmware request is a direct child device of the
+device which caused modprobe to run. Child device event are blocked until
+the parent device is handled. This dead-locks until the kernel firmware
+loading timeout of 60 seconds is reached.
+
+The hanging modprobe event should now time-out and allow the firmware
+event to run before the 60 second kernel timeout.
+---
+ src/udev-event.c | 2 +-
+ src/udevd.c | 62 +++++++++++++++++++++++++++++++++++++++++++----------
+ 2 files changed, 51 insertions(+), 13 deletions(-)
+
+diff --git a/src/udev-event.c b/src/udev-event.c
+index 9bdc518..f0b9548 100644
+--- a/src/udev-event.c
++++ b/src/udev-event.c
+@@ -49,7 +49,7 @@ struct udev_event *udev_event_new(struct udev_device *dev)
+ udev_list_init(udev, &event->run_list, false);
+ event->fd_signal = -1;
+ event->birth_usec = now_usec();
+- event->timeout_usec = 60 * 1000 * 1000;
++ event->timeout_usec = 30 * 1000 * 1000;
+ dbg(event->udev, "allocated event %p\n", event);
+ return event;
+ }
+diff --git a/src/udevd.c b/src/udevd.c
+index 11ab19a..77a1e79 100644
+--- a/src/udevd.c
++++ b/src/udevd.c
+@@ -133,6 +133,7 @@ struct worker {
+ struct udev_monitor *monitor;
+ enum worker_state state;
+ struct event *event;
++ unsigned long long event_start_usec;
+ };
+
+ /* passed from worker to main process */
+@@ -372,6 +373,7 @@ out:
+ close(fd_inotify);
+ close(worker_watch[WRITE_END]);
+ udev_rules_unref(rules);
++ udev_builtin_exit(udev);
+ udev_monitor_unref(worker_monitor);
+ udev_unref(udev);
+ udev_log_close();
+@@ -389,6 +391,7 @@ out:
+ worker->monitor = worker_monitor;
+ worker->pid = pid;
+ worker->state = WORKER_RUNNING;
++ worker->event_start_usec = now_usec();
+ worker->event = event;
+ event->state = EVENT_RUNNING;
+ udev_list_node_append(&worker->node, &worker_list);
+@@ -419,6 +422,7 @@ static void event_run(struct event *event)
+ worker_ref(worker);
+ worker->event = event;
+ worker->state = WORKER_RUNNING;
++ worker->event_start_usec = now_usec();
+ event->state = EVENT_RUNNING;
+ return;
+ }
+@@ -610,9 +614,11 @@ static void worker_returned(int fd_worker)
+ continue;
+
+ /* worker returned */
+- worker->event->exitcode = msg.exitcode;
+- event_queue_delete(worker->event, true);
+- worker->event = NULL;
++ if (worker->event) {
++ worker->event->exitcode = msg.exitcode;
++ event_queue_delete(worker->event, true);
++ worker->event = NULL;
++ }
+ if (worker->state != WORKER_KILLED)
+ worker->state = WORKER_IDLE;
+ worker_unref(worker);
+@@ -796,7 +802,7 @@ static void handle_signal(struct udev *udev, int signo)
+ }
+
+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
+- if (worker->event != NULL) {
++ if (worker->event) {
+ err(udev, "worker [%u] failed while handling '%s'\n",
+ pid, worker->event->devpath);
+ worker->event->exitcode = -32;
+@@ -1574,25 +1580,57 @@ int main(int argc, char *argv[])
+ break;
+
+ /* timeout at exit for workers to finish */
+- timeout = 60 * 1000;
+- } else if (udev_list_node_is_empty(&event_list) && children > 2) {
+- /* set timeout to kill idle workers */
+- timeout = 3 * 1000;
+- } else {
++ timeout = 30 * 1000;
++ } else if (udev_list_node_is_empty(&event_list) && children <= 2) {
++ /* we are idle */
+ timeout = -1;
++ } else {
++ /* kill idle or hanging workers */
++ timeout = 3 * 1000;
+ }
+ fdcount = epoll_wait(fd_ep, ev, ARRAY_SIZE(ev), timeout);
+ if (fdcount < 0)
+ continue;
+
+ if (fdcount == 0) {
++ struct udev_list_node *loop;
++
++ /* timeout */
+ if (udev_exit) {
+- info(udev, "timeout, giving up waiting for workers to finish\n");
++ err(udev, "timeout, giving up waiting for workers to finish\n");
+ break;
+ }
+
+- /* timeout - kill idle workers */
+- worker_kill(udev, 2);
++ /* kill idle workers */
++ if (udev_list_node_is_empty(&event_list)) {
++ info(udev, "cleanup idle workers\n");
++ worker_kill(udev, 2);
++ }
++
++ /* check for hanging events */
++ udev_list_node_foreach(loop, &worker_list) {
++ struct worker *worker = node_to_worker(loop);
++
++ if (worker->state != WORKER_RUNNING)
++ continue;
++
++ if ((now_usec() - worker->event_start_usec) > 30 * 1000 * 1000) {
++ err(udev, "worker [%u] timeout, kill it\n", worker->pid,
++ worker->event ? worker->event->devpath : "<idle>");
++ kill(worker->pid, SIGKILL);
++ worker->state = WORKER_KILLED;
++ /* drop reference taken for state 'running' */
++ worker_unref(worker);
++ if (worker->event) {
++ err(udev, "seq %llu '%s' killed\n",
++ udev_device_get_seqnum(worker->event->dev), worker->event->devpath);
++ worker->event->exitcode = -64;
++ event_queue_delete(worker->event, true);
++ worker->event = NULL;
++ }
++ }
++ }
++
+ }
+
+ is_worker = is_signal = is_inotify = is_netlink = is_ctrl = false;
+--
+1.7.8.3
+
diff --git a/core/udev/PKGBUILD b/core/udev/PKGBUILD
index 62deffd09..be706f13f 100644
--- a/core/udev/PKGBUILD
+++ b/core/udev/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 142408 2011-11-09 04:55:56Z tomegun $
+# $Id: PKGBUILD 147038 2012-01-21 00:32:06Z dreisner $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
@@ -6,27 +6,31 @@
pkgbase="udev"
pkgname=('udev' 'udev-compat')
-pkgver=175
-pkgrel=1
+pkgver=177
+pkgrel=3
arch=(i686 x86_64)
-url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html"
+url="http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary"
license=('GPL')
groups=('base')
options=(!makeflags !libtool)
-makedepends=('gobject-introspection' 'gperf')
-#source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.bz2
-source=(http://people.freedesktop.org/~kay/udev/$pkgbase-$pkgver.tar.bz2
- 81-arch.rules)
+makedepends=('gobject-introspection' 'gperf' 'libxslt' 'usbutils' 'kmod')
+source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.xz
+ 0001-udevd-kill-hanging-event-processes-after-30-seconds.patch)
build() {
cd $srcdir/$pkgbase-$pkgver
- ./configure --sysconfdir=/etc\
- --with-rootlibdir=/lib\
- --libexecdir=/lib/udev\
- --sbindir=/sbin\
- --with-systemdsystemunitdir=/lib/systemd/system\
- --disable-rule-generator\
+ # deal with broken drivers waiting for firmware to be loaded
+ patch -p1 -i ../0001-udevd-kill-hanging-event-processes-after-30-seconds.patch
+
+ ./configure --prefix=/usr \
+ --with-rootprefix= \
+ --sysconfdir=/etc \
+ --bindir=/sbin \
+ --libdir=/usr/lib \
+ --with-rootlibdir=/lib \
+ --libexecdir=/lib \
+ --with-systemdsystemunitdir=/lib/systemd/system \
--enable-udev_acl
make
@@ -34,28 +38,26 @@ build() {
package_udev() {
pkgdesc="The userspace dev tools (udev)"
- depends=('util-linux' 'libusb-compat' 'glib2' 'module-init-tools' 'pciutils')
+ depends=('util-linux' 'libusb-compat' 'glib2' 'kmod' 'pciutils' 'usbutils' 'pciutils')
install=udev.install
backup=(etc/udev/udev.conf)
- conflicts=('pcmcia-cs' 'hotplug' 'initscripts<2009.07')
- replaces=('devfsd')
-
+
cd $srcdir/$pkgbase-$pkgver
make DESTDIR=${pkgdir} install
- # Install our rule for permissions and symlinks
- install -D -m644 $srcdir/81-arch.rules $pkgdir/lib/udev/rules.d/81-arch.rules
# create framebuffer blacklist
- mkdir -p $pkgdir/lib/modprobe.d/
+ install -d -m755 ${pkgdir}/lib/modprobe.d/
for mod in $(find /lib/modules/*/kernel/drivers/video -name '*fb.ko.gz' -exec basename {} .ko.gz \;); do
echo "blacklist $mod"
done | sort -u > $pkgdir/lib/modprobe.d/framebuffer_blacklist.conf
# /dev/loop0 is created for convenience, to autoload the module if necessary
- # may be obsoleted by https://lkml.org/lkml/2011/7/30/111
- mknod -m 0660 ${pkgdir}/lib/udev/devices/loop0 b 7 0
+ # this is no longer needed when util-linux-2.21 is released as /dev/loop-control
+ # will be used instead. In that case move this to udev-compat
+ install -d -m755 ${pkgdir}/lib/udev/devices/
+ mknod ${pkgdir}/lib/udev/devices/loop0 b 7 0
chgrp disk ${pkgdir}/lib/udev/devices/loop0
-
+
# udevd moved, symlink to make life easy for restarting udevd manually
ln -s /lib/udev/udevd ${pkgdir}/sbin/udevd
@@ -71,31 +73,35 @@ package_udev-compat() {
pkgdesc="The userspace dev tools (udev) - additional rules for older kernels"
depends=('udev')
groups=('')
- cd $srcdir/$pkgbase-$pkgver
- install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d
+ install -d -m755 ${pkgdir}/lib/udev/rules.d
install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules
- # create static devices in /lib/udev/devices/
- mkdir -p ${pkgdir}/lib/udev/devices/{pts,shm}
- mknod -m 0600 ${pkgdir}/lib/udev/devices/console c 5 1
- mknod -m 0666 ${pkgdir}/lib/udev/devices/null c 1 3
- mknod -m 0660 ${pkgdir}/lib/udev/devices/zero c 1 5
- mknod -m 0666 ${pkgdir}/lib/udev/devices/kmsg c 1 11
+ # create static nodes to be compatible with on-demand module
+ # loading in the most recent kernel
+ #
+ # the list of nodes is generated from /lib/modules/`most recent kernel`/modprobe.devname
+ # excluding any devices not included in the LTS kernel and any entries in the
+ # modprobe.devname file of the LTS kernel (if it exists).
- ln -snf /proc/self/fd ${pkgdir}/lib/udev/devices/fd
- ln -snf /proc/self/fd/0 ${pkgdir}/lib/udev/devices/stdin
- ln -snf /proc/self/fd/1 ${pkgdir}/lib/udev/devices/stdout
- ln -snf /proc/self/fd/2 ${pkgdir}/lib/udev/devices/stderr
- ln -snf /proc/kcore ${pkgdir}/lib/udev/devices/core
+ install -d -m755 ${pkgdir}/lib/udev/devices
+ cd ${pkgdir}/lib/udev/devices
- # these static devices are created for convenience, to autoload the modules if necessary
- # /dev/net/tun
- mkdir ${pkgdir}/lib/udev/devices/net
- mknod -m 0666 ${pkgdir}/lib/udev/devices/net/tun c 10 200
- # /dev/fuse
- mknod -m 0666 ${pkgdir}/lib/udev/devices/fuse c 10 229
- # /dev/ppp
- mknod -m 0600 ${pkgdir}/lib/udev/devices/ppp c 108 0
+ install -d -m755 net
+ mknod net/tun c 10 200
+ mknod ppp c 108 0
+# mknod loop-control c 10 237 -- does not exist in old kernels
+ mknod uinput c 10 223
+ install -d -m755 mapper
+ mknod mapper/control c 10 236
+ install -d -m755 snd
+ mknod snd/timer c 116 33
+ mknod snd/seq c 116 1
+ mknod btrfs-control c 10 234
+ mknod autofs c 10 235
+ mknod fuse c 10 229
+ install -d -m755 cpu
+ mknod cpu/microcode c 10 184
+
}
-md5sums=('2fc9c1efcbde98e3d73ffee7a77aea47'
- '3da2bb9891592f9438a07bd641465531')
+md5sums=('b4e00faf8153fd7202a7ef609284b0c3'
+ '3e40dca1c4f8194b4633e3befb4da4d4')
diff --git a/core/udev/udev.install b/core/udev/udev.install
index 2cc8caaa0..c49c5006f 100644
--- a/core/udev/udev.install
+++ b/core/udev/udev.install
@@ -2,7 +2,7 @@
# arg 2: the old package version
post_upgrade() {
- if [ "$(vercmp $2 174)" -lt 0 ]; then
+ if [ "$(vercmp $2 175)" -lt 0 ]; then
echo "ATTENTION UDEV:"
echo "----------"
if [ "$(vercmp $2 168)" -lt 0 ]; then
@@ -33,8 +33,6 @@ post_upgrade() {
echo " --"
fi
if [ "$(vercmp $2 172)" -lt 0 ]; then
- echo "Support for non-devtmpfs self-compiled kernels have been moved to udev-compat."
- echo " --"
echo "Blacklisting of framebuffer devices has moved from /etc/modprobe.d to"
echo "/lib/modprobe.d. Any customizations shoud be done to the file in /etc, as it"
echo "takes precedence."
@@ -46,17 +44,22 @@ post_upgrade() {
echo "by X."
echo " --"
fi
- echo "We now use upstream rules for assigning devices to the 'disk', 'optical',"
- echo "'scanner' and 'video' groups. Beware of any changes."
- echo " --"
- echo "We no longer create symlinks from /dev/<dev> to /dev/<dev>0."
- echo " --"
- echo "For security reasons, we no longer add devices to the 'storage' group. Use"
- echo "udisks and friends, or add custom rules to /etc/udev.d/rules/, if you want"
- echo "this functionality back."
- echo " --"
- echo "We no longer create the static nodes on install needed for an initrd-less and"
- echo "devtmpfs-less boot, this only affects fresh installs."
+ if [ "$(vercmp $2 174)" -lt 0 ]; then
+ echo "We now use upstream rules for assigning devices to the 'disk', 'optical',"
+ echo "'scanner' and 'video' groups. Beware of any changes."
+ echo " --"
+ echo "We no longer create symlinks from /dev/<dev> to /dev/<dev>0."
+ echo " --"
+ echo "For security reasons, we no longer add devices to the 'storage' group. Use"
+ echo "udisks and friends, or add custom rules to /etc/udev.d/rules/, if you want"
+ echo "this functionality back."
+ echo " --"
+ echo "We no longer create the static nodes on install needed for an initrd-less boot"
+ echo "where devtmpfs is not mounted by the kernel, this only affects fresh installs."
+ echo " --"
+ fi
+ echo "devtmpfs support is now a hard requirement. Users of the official Arch kernels"
+ echo "have this enabled."
echo "---------------"
fi
}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD
new file mode 100644
index 000000000..d4d3afe38
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-binutils/PKGBUILD
@@ -0,0 +1,45 @@
+# Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
+
+_pkgname=binutils
+_target="mips64el-unknown-linux-gnu"
+_sysroot="/usr/${_target}"
+
+unset CFLAGS CXXFLAGS LDFLAGS
+
+pkgname=cross-${_target}-binutils
+pkgver=2.22
+pkgrel=11
+pkgdesc="A set of programs to assemble and manipulate binary and object files for the MIPS architecture"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('zlib')
+source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2")
+md5sums=('ee0f10756c84979622b992a4a61ea3f5')
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ CFLAGS=" -pipe "\
+ CXXFLAGS=" -pipe "\
+ ./configure --build=${CHOST} \
+ --host=${CHOST} \
+ --target=${_target} \
+ --prefix=/usr \
+ --disable-nls \
+ --disable-multilib \
+ --disable-werror \
+ --enable-ld=yes \
+ --enable-gold=no \
+ --with-sysroot=${_sysroot}
+
+ make
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ rm -r ${pkgdir}/usr/{lib,share}
+}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD
new file mode 100644
index 000000000..3c61dbfca
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD
@@ -0,0 +1,92 @@
+# Contributor: Nicolás Reynolds <fauno@parabola.nu>
+# Contributor (mipsel): Vojtech Horky <vojta . horky at-symbol seznam . cz>
+# This package is used to bootstrap a cross glibc and full featured cross gcc
+# Change the following variables to match your target
+_pkgname=gcc
+_target="mips64el-unknown-linux-gnu"
+_sysroot="/usr/${_target}"
+_ARCH=mips
+
+unset LDFLAGS CFLAGS CXXFLAGS
+
+pkgname=cross-${_target}-gcc-core-shared
+pkgver=4.6.2
+pkgrel=8
+pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (shared version)"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl')
+makedepends=("cross-${_target}-glibc-headers"
+ "cross-${_target}-gcc-core")
+options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
+source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-${pkgver}.tar.bz2")
+md5sums=('028115c4fbfb6cfd75d6369f4a90d87e')
+
+build() {
+ cd ${srcdir}
+ mkdir gcc-build && cd gcc-build
+ mkdir ${_target}
+
+ Copy headers for libgcc2
+ cp -av /usr/${_target}/usr/include ${_target}/include
+
+ CC_FOR_BUILD=${CHOST}-gcc \
+ CFLAGS=" -pipe " \
+ LDFLAGS= \
+ ${srcdir}/${_pkgname}-${pkgver}/configure \
+ --build=${CHOST} \
+ --host=${CHOST} \
+ --target=${_target} \
+ --prefix=/usr \
+ --with-local-prefix=${_sysroot} \
+ --disable-multilib \
+ --disable-libmudflap \
+ --with-sysroot=${_sysroot} \
+ --enable-shared \
+ --with-arch=loongson2f \
+ --with-abi=n32 \
+ --enable-__cxa_atexit \
+ --with-gmp \
+ --with-mpfr \
+ --with-mpc \
+ --with-ppl \
+ --enable-cloog-backend=isl \
+ --with-libelf \
+ --enable-lto \
+ --with-host-libstdcxx="-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -lpwl" \
+ --enable-target-optspace \
+ --disable-libgomp \
+ --disable-libmudflap \
+ --disable-nls \
+ --enable-languages=c
+
+ msg2 "Configuring gcc and libgcc"
+ make ${MAKEFLAGS} configure-gcc configure-libcpp configure-build-libiberty
+
+ msg2 "Making libcpp and libiberty"
+ make ${MAKEFLAGS} all-libcpp all-build-libiberty
+
+ msg2 "Configuring libdecnumber"
+ make ${MAKEFLAGS} configure-libdecnumber
+
+ msg2 "Making libdecnumber"
+ make ${MAKEFLAGS} -C libdecnumber libdecnumber.a
+
+ msg2 "Making mvars"
+ make ${MAKEFLAGS} -C gcc libgcc.mvars
+
+# Remove -lc since we don't have it yet
+ sed -r -i -e 's@-lc@@g' gcc/libgcc.mvars
+
+ msg2 "Making gcc and libgcc"
+ make ${MAKEFLAGS} all-gcc all-target-libgcc
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-build
+
+ make ${MAKEFLAGS} DESTDIR=${pkgdir} install-gcc install-target-libgcc
+
+ rm -r ${pkgdir}/usr/share
+}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD
new file mode 100644
index 000000000..da49a903f
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD
@@ -0,0 +1,70 @@
+# Contributor: Nicolás Reynolds <fauno@parabola.nu>
+# Contributor (mipsel): Vojtech Horky <vojta . horky at-symbol seznam . cz>
+# This package is used to bootstrap a cross glibc and full featured cross gcc
+# Change the following variables to match your target
+_pkgname=gcc
+_target="mips64el-unknown-linux-gnu"
+_sysroot="/usr/${_target}"
+_ARCH=mips
+
+unset LDFLAGS CFLAGS CXXFLAGS
+
+pkgname=cross-${_target}-gcc-core
+pkgver=4.6.2
+pkgrel=8
+pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (static version)"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl')
+options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
+source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-${pkgver}.tar.bz2")
+md5sums=('028115c4fbfb6cfd75d6369f4a90d87e')
+
+build() {
+ cd ${srcdir}
+ mkdir gcc-build && cd gcc-build
+
+ CC_FOR_BUILD=${CHOST}-gcc \
+ CFLAGS=" -pipe " \
+ LDFLAGS= \
+ ${srcdir}/${_pkgname}-${pkgver}/configure \
+ --build=${CHOST} \
+ --host=${CHOST} \
+ --target=${_target} \
+ --prefix=/usr \
+ --with-local-prefix=${_sysroot} \
+ --disable-multilib \
+ --disable-libmudflap \
+ --with-sysroot=${_sysroot} \
+ --with-newlib \
+ --enable-threads=no \
+ --disable-shared \
+ --with-arch=loongson2f \
+ --with-abi=n32 \
+ --enable-__cxa_atexit \
+ --with-gmp \
+ --with-mpfr \
+ --with-mpc \
+ --with-ppl \
+ --enable-cloog-backend=isl \
+ --enable-lto \
+ --with-host-libstdcxx="-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm -lpwl" \
+ --enable-target-optspace \
+ --disable-libgomp \
+ --disable-libmudflap \
+ --disable-nls \
+ --enable-languages=c \
+ --with-libs \
+ --with-headers
+
+ make ${MAKEFLAGS} all-gcc
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-build
+
+ make ${MAKEFLAGS} DESTDIR=${pkgdir} install-gcc
+
+ rm -r ${pkgdir}/usr/share
+}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD
new file mode 100644
index 000000000..e4b91c652
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-gcc/PKGBUILD
@@ -0,0 +1,63 @@
+# Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
+_pkgname=gcc
+_target="mips64el-unknown-linux-gnu"
+_sysroot="/usr/lib/cross-${_target}"
+export PATH=${_sysroot}/bin:/usr/bin/cross/${_target}:$PATH
+
+pkgname=cross-${_target}-gcc
+pkgver=4.6.2
+pkgrel=1
+pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+#depends=('libmpc' 'sh' "cross-mips64el-linux-gnu-gcc-base" "cross-${_target}-binutils" "cross-${_target}-glibc" 'cloog' 'ppl')
+depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl')
+options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
+source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-core-${pkgver}.tar.bz2")
+md5sums=('780f614ab18c7a9066dec6387d7490b2')
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ # -march=x86-64 and -mtune=generic don't work on mips64el, we
+ # also want to use -mfix-loongson2f-nop.
+ export CFLAGS_FOR_TARGET="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop"
+ export CXXFLAGS_FOR_TARGET="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop"
+
+ ./configure \
+ "--prefix=${_sysroot}" \
+ "--bindir=/usr/bin" "--program-prefix=${_target}-" \
+ "--with-sysroot=${_sysroot}" \
+ "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
+ --enable-shared \
+ --with-gnu-as --with-gnu-ld \
+ --disable-nls --disable-threads \
+ --enable-languages=c \
+ --disable-multilib --disable-libgcj \
+ --enable-cloog-backend=isl
+# --enable-languages=c,c++,lto,fortran,objc,obj-c++ \
+ make all # -gcc "inhibit_libc=true"
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install # -gcc
+
+ msg "Removing duplicit files..."
+ # remove these files as they are already in the system
+ # (with native gcc)
+ rm -Rf ${pkgdir}${_sysroot}/{man,info}
+ # remove conflicting binaries
+ find ${pkgdir}/usr/bin/ -type f -not -name "${_target}-*" -delete
+
+ msg "Creating out-of-path executables..."
+ # symlink executables to single directory with no-arch-prefix name
+ mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
+ cd ${pkgdir}/usr/bin/cross/${_target}/;
+ for bin in ${pkgdir}/usr/bin/${_target}-*; do
+ bbin=`basename "$bin"`;
+ ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
+ done
+}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD
new file mode 100644
index 000000000..a83a1238a
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD
@@ -0,0 +1,210 @@
+# $Id: PKGBUILD 145917 2012-01-04 01:25:10Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: valgrind requires rebuilt with each major glibc version
+
+_pkgname=glibc
+_target="mips64el-unknown-linux-gnu"
+_sysroot="/usr/${_target}"
+_ARCH=mips
+
+unset CFLAGS CXXFLAGS LDFLAGS
+
+pkgname=cross-${_target}-glibc-headers
+pkgver=2.15
+pkgrel=4
+_glibcdate=20111227
+pkgdesc="GNU C Library"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.gnu.org/software/libc"
+license=('GPL' 'LGPL')
+groups=("${_target}-devel")
+depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata')
+makedepends=("cross-${_target}-binutils"
+ "cross-${_target}-gcc-core")
+options=('!strip')
+install=glibc.install
+source=(ftp://ftp.archlinux.org/other/glibc/${_pkgname}-${pkgver}_${_glibcdate}.tar.xz
+ http://repo.parabolagnulinux.org/other/glibc-ports-${pkgver}_${_glibcdate}.tar.xz
+ configure.patch
+ glibc-2.10-dont-build-timezone.patch
+ glibc-2.10-bz4781.patch
+ glibc-__i686.patch
+ glibc-2.12.2-ignore-origin-of-privileged-program.patch
+ glibc-2.14-libdl-crash.patch
+ glibc-2.14-revert-4768ae77.patch
+ glibc-2.14-reexport-rpc-interface.patch
+ glibc-2.14-reinstall-nis-rpc-headers.patch
+ glibc-2.15-lddebug-scopes.patch
+ glibc-2.15-revert-c5a0802a.patch
+ glibc-2.15-math64crash.patch
+ nscd
+ locale.gen.txt
+ locale-gen)
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ 'a006504b83553d0b554cf8badff005b6'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '6970bcfeb3bf88913436d5112d16f588'
+ '7da8c554a3b591c7401d7023b1928afc'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'dc7550e659ddd685bd78a930d15a01f2'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
+
+mksource() {
+ git clone http://sourceware.org/git/glibc.git
+ pushd glibc
+ #git checkout -b glibc-2.15-arch origin/release/2.15/master
+ git checkout -b glibc-${pkgver}-arch origin/master
+ popd
+ tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
+ mksource-ports
+}
+
+mksource-ports() {
+ tsocks git clone git://sourceware.org/git/glibc-ports.git
+ pushd glibc-ports
+ git checkout -b glibc-${pkgver}-arch origin/release/${pkgver}/master
+ popd
+ tar -cvJf glibc-ports-${pkgver}_${_glibcdate}.tar.xz glibc-ports/*
+}
+
+build() {
+ cd ${srcdir}/glibc
+
+ # export PATH=${_sysroot}/bin/:$PATH
+
+ # timezone data is in separate package (tzdata)
+ patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
+
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
+ patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch
+
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
+ # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
+ patch -Np1 -i ${srcdir}/glibc-__i686.patch
+
+ # http://www.exploit-db.com/exploits/15274/
+ # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
+
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...)
+ # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
+ patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
+
+ # Revert commit causing issues with crappy DNS servers...
+ # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER!
+ # Note that both these patches appear not to fix the issue completely:
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch
+
+ # re-export RPC interface until libtirpc is ready as a replacement
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
+
+ # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
+
+ # revert commit c5a0802a - causes various hangs
+ # https://bugzilla.redhat.com/show_bug.cgi?id=769421
+ patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
+ # revert optimized math routines that can cause crashes (FS#27736, FS#27743)
+ # obviously not a real fix...
+ patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch
+
+ patch -Np0 -i ${srcdir}/configure.patch
+
+ ln -s ../glibc-ports ports
+
+ cd ${srcdir}
+ mkdir glibc-build
+ cd glibc-build
+
+ echo "libc_cv_ctors_header=no" >> config.cache
+ echo "libc_cv_forced_unwind=yes" >> config.cache
+ echo "libc_cv_c_cleanup=yes" >> config.cache
+
+ BUILD_CC=${CHOST}-gcc \
+ CFLAGS=" -EL -march=loongson2f -mabi=n32 -O2 -U_FORTIFY_SOURCE " \
+ CC=${_target}-gcc \
+ AR=${_target}-ar \
+ RANLIB=${_target}-ranlib \
+ ${srcdir}/glibc/configure \
+ --prefix=/usr \
+ --build=${CHOST} \
+ --host=${_target} \
+ --without-cvs \
+ --disable-profile \
+ --without-gd \
+ --with-headers=/usr/${_target}/usr/include \
+ --cache-file=${srcdir}/glibc-build/config.cache \
+ --disable-debug \
+ --disable-sanity-checks \
+ --enable-kernel=2.6.27 \
+ --with-__thread \
+ --with-tls \
+ --enable-shared \
+ --with-fp \
+ --enable-add-ons=nptl,ports
+
+}
+
+package() {
+ cd ${srcdir}/glibc-build
+ headers_dir=${pkgdir}${_sysroot}/usr/include
+
+ make ${MAKEFLAGS} install_root=${pkgdir}${_sysroot} all-bootstrap-headers=yes install-headers
+
+ msg "Installing some headers manually"
+ mkdir -p "${headers_dir}/gnu"
+ touch "${headers_dir}/gnu/stubs.h"
+ cp -v "${srcdir}/glibc/include/features.h" "${headers_dir}/features.h"
+ cp -v bits/stdio_lim.h "${headers_dir}/bits/stdio_lim.h"
+
+ mkdir -p ${pkgdir}${_sysroot}/usr/lib
+
+ make csu/subdir_lib
+ cp csu/crt1.o csu/crti.o csu/crtn.o ${pkgdir}${_sysroot}/usr/lib
+
+ ${_target}-gcc -nostdlib \
+ -nostartfiles \
+ -shared \
+ -x c /dev/null \
+ -o ${pkgdir}${_sysroot}/usr/lib/libc.so
+
+# This will help gcc-shared to find headers for libgcc2
+ msg2 "Symlinking headers"
+ rm -r ${pkgdir}${_sysroot}/include
+ ln -s ${_sysroot}/usr/include ${pkgdir}${_sysroot}/include
+
+}
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ '98d028ee63fca2821414ebcac0af0e5b'
+ '39f80ba6bcda6b010a66f9c61e9a0017'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '6970bcfeb3bf88913436d5112d16f588'
+ '7da8c554a3b591c7401d7023b1928afc'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'dc7550e659ddd685bd78a930d15a01f2'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch
new file mode 100644
index 000000000..5393ae5cd
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/configure.patch
@@ -0,0 +1,20 @@
+--- configure 2011-12-18 02:53:21.000000000 -0300
++++ configure 2012-01-14 15:20:13.737901264 -0300
+@@ -7210,13 +6940,14 @@
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5
+ $as_echo "$libc_cv_gcc_builtin_expect" >&6; }
+-if test "$libc_cv_gcc_builtin_expect" = no; then
+- as_fn_error $? "support for __builtin_expect needed" "$LINENO" 5
++if test "$libc_cv_gcc_builtin_expect" = yes; then
++ $as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
++
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5
+ $as_echo_n "checking for __builtin_memset... " >&6; }
+-if ${libc_cv_gcc_builtin_memset+:} false; then :
++if ${libc_cv_gcc_builtin_memset+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ cat > conftest.c <<\EOF
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-bz4781.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-bz4781.patch
new file mode 100644
index 000000000..cf1a97a18
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-bz4781.patch
@@ -0,0 +1,42 @@
+diff -Naur glibc-old/sysdeps/unix/sysv/linux/i386/clone.S glibc/sysdeps/unix/sysv/linux/i386/clone.S
+--- glibc-old/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-09 13:35:30.000000000 +1000
++++ glibc/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-23 13:27:46.000000000 +1000
+@@ -120,9 +120,6 @@
+ ret
+
+ L(thread_start):
+- cfi_startproc;
+- /* Clearing frame pointer is insufficient, use CFI. */
+- cfi_undefined (eip);
+ /* Note: %esi is zero. */
+ movl %esi,%ebp /* terminate the stack frame */
+ #ifdef RESET_PID
+@@ -155,7 +152,6 @@
+ jmp L(haspid)
+ .previous
+ #endif
+- cfi_endproc;
+
+ cfi_startproc
+ PSEUDO_END (BP_SYM (__clone))
+diff -Naur glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S glibc/sysdeps/unix/sysv/linux/x86_64/clone.S
+--- glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-09 13:35:30.000000000 +1000
++++ glibc/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-23 13:27:46.000000000 +1000
+@@ -89,9 +89,6 @@
+ ret
+
+ L(thread_start):
+- cfi_startproc;
+- /* Clearing frame pointer is insufficient, use CFI. */
+- cfi_undefined (rip);
+ /* Clear the frame pointer. The ABI suggests this be done, to mark
+ the outermost frame obviously. */
+ xorl %ebp, %ebp
+@@ -116,7 +113,6 @@
+ /* Call exit with return value from function call. */
+ movq %rax, %rdi
+ call HIDDEN_JUMPTARGET (_exit)
+- cfi_endproc;
+
+ cfi_startproc;
+ PSEUDO_END (BP_SYM (__clone))
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-dont-build-timezone.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-dont-build-timezone.patch
new file mode 100644
index 000000000..d3abeff17
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.10-dont-build-timezone.patch
@@ -0,0 +1,13 @@
+timezone data has been split into the package sys-libs/timezone-data
+
+--- glibc-2.4/Makeconfig
++++ glibc-2.4/Makeconfig
+@@ -931,7 +931,7 @@
+ stdlib stdio-common libio malloc string wcsmbs time dirent \
+ grp pwd posix io termios resource misc socket sysvipc gmon \
+ gnulib iconv iconvdata wctype manual shadow gshadow po argp \
+- crypt nss localedata timezone rt conform debug \
++ crypt nss localedata rt conform debug \
+ $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
+
+ ifndef avoid-generated
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.12.2-ignore-origin-of-privileged-program.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.12.2-ignore-origin-of-privileged-program.patch
new file mode 100644
index 000000000..ce089b49c
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.12.2-ignore-origin-of-privileged-program.patch
@@ -0,0 +1,26 @@
+From d14e6b09d60d52cc12f0396c3106b14e1bd0fe8f Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Thu, 9 Dec 2010 15:00:59 +0100
+Subject: [PATCH 1/1] Ignore origin of privileged program
+
+---
+ ChangeLog | 5 +++++
+ elf/dl-object.c | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/elf/dl-object.c b/elf/dl-object.c
+index 22a1635..7674d49 100644
+--- a/elf/dl-object.c
++++ b/elf/dl-object.c
+@@ -214,6 +214,9 @@ _dl_new_object (char *realname, const char *libname, int type,
+ out:
+ new->l_origin = origin;
+ }
++ else if (INTUSE(__libc_enable_secure) && type == lt_executable)
++ /* The origin of a privileged program cannot be trusted. */
++ new->l_origin = (char *) -1;
+
+ return new;
+ }
+--
+1.7.2
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-libdl-crash.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-libdl-crash.patch
new file mode 100644
index 000000000..6c9d2718e
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-libdl-crash.patch
@@ -0,0 +1,132 @@
+diff --git a/elf/dl-close.c b/elf/dl-close.c
+index 73b2a2f..9bd91e3 100644
+--- a/elf/dl-close.c
++++ b/elf/dl-close.c
+@@ -1,5 +1,5 @@
+ /* Close a shared object opened by `_dl_open'.
+- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
+ if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
+ || dl_close_state != not_pending)
+ {
+- if (map->l_direct_opencount == 0)
+- {
+- if (map->l_type == lt_loaded)
+- dl_close_state = rerun;
+- else if (map->l_type == lt_library)
+- {
+- struct link_map **oldp = map->l_initfini;
+- map->l_initfini = map->l_orig_initfini;
+- _dl_scope_free (oldp);
+- }
+- }
++ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
++ dl_close_state = rerun;
+
+ /* There are still references to this object. Do nothing more. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
+diff --git a/elf/dl-deps.c b/elf/dl-deps.c
+index 9e30594..3890d00 100644
+--- a/elf/dl-deps.c
++++ b/elf/dl-deps.c
+@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
+ nneeded * sizeof needed[0]);
+ atomic_write_barrier ();
+ l->l_initfini = l_initfini;
++ l->l_free_initfini = 1;
+ }
+
+ /* If we have no auxiliary objects just go on to the next map. */
+@@ -681,6 +682,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ l_initfini[nlist] = NULL;
+ atomic_write_barrier ();
+ map->l_initfini = l_initfini;
++ map->l_free_initfini = 1;
+ if (l_reldeps != NULL)
+ {
+ atomic_write_barrier ();
+@@ -689,5 +691,5 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ _dl_scope_free (old_l_reldeps);
+ }
+ if (old_l_initfini != NULL)
+- map->l_orig_initfini = old_l_initfini;
++ _dl_scope_free (old_l_initfini);
+
+diff --git a/elf/dl-libc.c b/elf/dl-libc.c
+index 7be9483..a13fce3 100644
+--- a/elf/dl-libc.c
++++ b/elf/dl-libc.c
+@@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
+
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
+ {
+- /* Remove all additional names added to the objects. */
+ for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
+ {
+ struct libname_list *lnp = l->l_libname->next;
+
+ l->l_libname->next = NULL;
+
++ /* Remove all additional names added to the objects. */
+ while (lnp != NULL)
+ {
+ struct libname_list *old = lnp;
+@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
+ if (! old->dont_free)
+ free (old);
+ }
++
++ /* Free the initfini dependency list. */
++ if (l->l_free_initfini)
++ free (l->l_initfini);
+ }
+
+ if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 4a9109e..617e30e 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2251,6 +2251,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ lnp->dont_free = 1;
+ lnp = lnp->next;
+ }
++ l->l_free_initfini = 0;
+
+ if (l != &GL(dl_rtld_map))
+ _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
+diff --git a/include/link.h b/include/link.h
+index e877104..051b99a 100644
+--- a/include/link.h
++++ b/include/link.h
+@@ -1,6 +1,6 @@
+ /* Data structure for communication from the run-time dynamic linker for
+ loaded ELF shared objects.
+- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -192,6 +192,9 @@ struct link_map
+ during LD_TRACE_PRELINKING=1
+ contains any DT_SYMBOLIC
+ libraries. */
++ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
++ freed, ie. not allocated with
++ the dummy malloc in ld.so. */
+
+ /* Collected information about own RPATH directories. */
+ struct r_search_path_struct l_rpath_dirs;
+@@ -240,9 +243,6 @@ struct link_map
+
+ /* List of object in order of the init and fini calls. */
+ struct link_map **l_initfini;
+- /* The init and fini list generated at startup, saved when the
+- object is also loaded dynamically. */
+- struct link_map **l_orig_initfini;
+
+ /* List of the dependencies introduced through symbol binding. */
+ struct link_map_reldeps
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reexport-rpc-interface.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reexport-rpc-interface.patch
new file mode 100644
index 000000000..e2beea881
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reexport-rpc-interface.patch
@@ -0,0 +1,26 @@
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 67e1ca2..5e7cca5 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -635,7 +635,7 @@ for linking")
+ # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+ # define libc_hidden_def(name) hidden_def (name)
+ # define libc_hidden_weak(name) hidden_weak (name)
+-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
++# define libc_hidden_nolink(name, version) hidden_def (name)
+ # define libc_hidden_ver(local, name) hidden_ver (local, name)
+ # define libc_hidden_data_def(name) hidden_data_def (name)
+ # define libc_hidden_data_weak(name) hidden_data_weak (name)
+diff --git a/sunrpc/Makefile b/sunrpc/Makefile
+index 5134ce9..40c73d1 100644
+--- a/sunrpc/Makefile
++++ b/sunrpc/Makefile
+@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
+ des_crypt.h)
+ headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
+ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
+-headers = rpc/netdb.h
++headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
+ install-others = $(inst_sysconfdir)/rpc
+ generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
+ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reinstall-nis-rpc-headers.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reinstall-nis-rpc-headers.patch
new file mode 100644
index 000000000..eb0fd822d
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-reinstall-nis-rpc-headers.patch
@@ -0,0 +1,28 @@
+From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Tue, 17 May 2011 17:42:30 +0200
+Subject: [PATCH] Reinstall NIS RPC headers
+
+---
+ nis/Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nis/Makefile b/nis/Makefile
+index b5c9609..d2934d9 100644
+--- a/nis/Makefile
++++ b/nis/Makefile
+@@ -23,9 +23,9 @@ subdir := nis
+
+ aux := nis_hash
+
++headers := $(wildcard rpcsvc/*.[hx])
+ distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
+- nisplus-parser.h nis_xdr.h nss \
+- $(wildcard rpcsvc/*.[hx])
++ nisplus-parser.h nis_xdr.h nss
+
+ # These are the databases available for the nis (and perhaps later nisplus)
+ # service. This must be a superset of the services in nss.
+--
+1.7.5.4
+
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-revert-4768ae77.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-revert-4768ae77.patch
new file mode 100644
index 000000000..11f087cb7
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.14-revert-4768ae77.patch
@@ -0,0 +1,37 @@
+diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
+--- glibc-orig//resolv/res_send.c 2011-06-10 18:59:03.041436996 +1000
++++ glibc/resolv/res_send.c 2011-06-10 19:08:09.379309323 +1000
+@@ -549,7 +549,7 @@
+ ns, ansp, ansp2, nansp2, resplen2);
+ if (n < 0)
+ return (-1);
+- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
++ if (n == 0)
+ goto next_ns;
+ } else {
+ /* Use datagrams. */
+@@ -559,7 +559,7 @@
+ ansp2, nansp2, resplen2);
+ if (n < 0)
+ return (-1);
+- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
++ if (n == 0)
+ goto next_ns;
+ if (v_circuit)
+ // XXX Check whether both requests failed or
+@@ -1275,14 +1275,10 @@
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
+
+- if (recvresp1 || (buf2 != NULL && recvresp2)) {
+- *resplen2 = 0;
++ if (recvresp1 || (buf2 != NULL && recvresp2))
+ return resplen;
+- }
+ if (buf2 != NULL)
+ {
+- /* No data from the first reply. */
+- resplen = 0;
+ /* We are waiting for a possible second reply. */
+ if (hp->id == anhp->id)
+ recvresp1 = 1;
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-lddebug-scopes.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-lddebug-scopes.patch
new file mode 100644
index 000000000..808cf8d7c
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-lddebug-scopes.patch
@@ -0,0 +1,27 @@
+From 0c95ab64cb4ec0d22bb222647d9d20c7b4903e38 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Fri, 7 Oct 2011 09:31:27 +0200
+Subject: [PATCH] Horrible workaround for horribly broken software
+
+---
+ elf/rtld.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 978c609..8422b9f 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1393,7 +1393,9 @@ of this helper program; chances are you did not intend to run this program.\n\
+ char *copy = malloc (len);
+ if (copy == NULL)
+ _dl_fatal_printf ("out of memory\n");
+- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
++ l->l_libname->name = memcpy (copy, dsoname, len);
++ if (GLRO(dl_debug_mask))
++ l->l_name = copy;
+ }
+
+ /* Add the vDSO to the object list. */
+--
+1.7.3.4
+
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-math64crash.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-math64crash.patch
new file mode 100644
index 000000000..d315bf266
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-math64crash.patch
@@ -0,0 +1,184 @@
+diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
+index be68903..a032da8 100644
+--- a/sysdeps/x86_64/fpu/multiarch/Makefile
++++ b/sysdeps/x86_64/fpu/multiarch/Makefile
+@@ -1,5 +1,5 @@
+ ifeq ($(subdir),math)
+-libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
++libm-sysdep_routines += s_floorf-c s_ceilf-c \
+ s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
+
+ ifeq ($(have-mfma4),yes)
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
+deleted file mode 100644
+index 6a5ea3f..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
++++ /dev/null
+@@ -1,2 +0,0 @@
+-#define __ceil __ceil_c
+-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.S b/sysdeps/x86_64/fpu/multiarch/s_ceil.S
+deleted file mode 100644
+index d0f8da3..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.S
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__ceil)
+- .type __ceil, @gnu_indirect_function
+- call __get_cpu_features@plt
+- movq %rax, %rdx
+- leaq __ceil_sse41(%rip), %rax
+- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+- jnz 2f
+- leaq __ceil_c(%rip), %rax
+-2: ret
+-END(__ceil)
+-weak_alias (__ceil, ceil)
+-
+-
+-ENTRY(__ceil_sse41)
+- roundsd $2, %xmm0, %xmm0
+- ret
+-END(__ceil_sse41)
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
+deleted file mode 100644
+index 68733b6..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
++++ /dev/null
+@@ -1,3 +0,0 @@
+-#undef __floor
+-#define __floor __floor_c
+-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.S b/sysdeps/x86_64/fpu/multiarch/s_floor.S
+deleted file mode 100644
+index 514ea95..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_floor.S
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__floor)
+- .type __floor, @gnu_indirect_function
+- call __get_cpu_features@plt
+- movq %rax, %rdx
+- leaq __floor_sse41(%rip), %rax
+- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+- jnz 2f
+- leaq __floor_c(%rip), %rax
+-2: ret
+-END(__floor)
+-weak_alias (__floor, floor)
+-
+-
+-ENTRY(__floor_sse41)
+- roundsd $1, %xmm0, %xmm0
+- ret
+-END(__floor_sse41)
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
+deleted file mode 100644
+index 1ba9dbc..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
++++ /dev/null
+@@ -1,31 +0,0 @@
+-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+-# include <init-arch.h>
+-# include <math.h>
+-# undef NAN
+-
+-extern double __cos_sse2 (double);
+-extern double __sin_sse2 (double);
+-extern double __cos_avx (double);
+-extern double __sin_avx (double);
+-# ifdef HAVE_FMA4_SUPPORT
+-extern double __cos_fma4 (double);
+-extern double __sin_fma4 (double);
+-# else
+-# undef HAS_FMA4
+-# define HAS_FMA4 0
+-# define __cos_fma4 ((void *) 0)
+-# define __sin_fma4 ((void *) 0)
+-# endif
+-
+-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
+-weak_alias (__cos, cos)
+-
+-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
+-weak_alias (__sin, sin)
+-
+-# define __cos __cos_sse2
+-# define __sin __sin_sse2
+-#endif
+-
+-
+-#include <sysdeps/ieee754/dbl-64/s_sin.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
+deleted file mode 100644
+index 8f6601e..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
++++ /dev/null
+@@ -1,21 +0,0 @@
+-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+-# include <init-arch.h>
+-# include <math.h>
+-
+-extern double __tan_sse2 (double);
+-extern double __tan_avx (double);
+-# ifdef HAVE_FMA4_SUPPORT
+-extern double __tan_fma4 (double);
+-# else
+-# undef HAS_FMA4
+-# define HAS_FMA4 0
+-# define __tan_fma4 ((void *) 0)
+-# endif
+-
+-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
+-
+-# define tan __tan_sse2
+-#endif
+-
+-
+-#include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-revert-c5a0802a.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-revert-c5a0802a.patch
new file mode 100644
index 000000000..f532b95e8
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-2.15-revert-c5a0802a.patch
@@ -0,0 +1,229 @@
+diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:12.937212834 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:42.104222278 +0000
+@@ -137,7 +137,6 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 18f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl %ebp, %edx
+ xorl %esi, %esi
+@@ -151,9 +150,6 @@ __pthread_cond_wait:
+ sete 16(%esp)
+ je 19f
+
+- cmpl $-EAGAIN, %eax
+- je 91f
+-
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+@@ -398,78 +394,6 @@ __pthread_cond_wait:
+ #endif
+ call __lll_unlock_wake
+ jmp 11b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+-
+- /* Get internal lock. */
+- movl $1, %edx
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %edx, (%ebx)
+-#else
+- cmpxchgl %edx, cond_lock(%ebx)
+-#endif
+- jz 92f
+-
+-#if cond_lock == 0
+- movl %ebx, %edx
+-#else
+- leal cond_lock(%ebx), %edx
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_lock_wait
+-
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- addl $1, cond_futex(%ebx)
+- movl cond_futex(%ebx), %ebp
+-
+- /* Unlock. */
+- LOCK
+-#if cond_lock == 0
+- subl $1, (%ebx)
+-#else
+- subl $1, cond_lock(%ebx)
+-#endif
+- je 93f
+-#if cond_lock == 0
+- movl %ebx, %eax
+-#else
+- leal cond_lock(%ebx), %eax
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_unlock_wake
+-
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorl %ecx, %ecx
+- movl dep_mutex(%ebx), %edi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -642,10 +566,6 @@ __condvar_w_cleanup:
+ .long .LcleanupEND-.Lsub_cond_futex
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
+- .long .LcleanupSTART2-.LSTARTCODE
+- .long .LcleanupEND2-.LcleanupSTART2
+- .long __condvar_w_cleanup-.LSTARTCODE
+- .uleb128 0
+ .long .LcallUR-.LSTARTCODE
+ .long .LENDCODE-.LcallUR
+ .long 0
+Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
+diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:04:12.941212837 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:05:05.155229737 +0000
+@@ -23,7 +23,6 @@
+ #include <lowlevelcond.h>
+ #include <tcb-offsets.h>
+ #include <pthread-pi-defines.h>
+-#include <pthread-errnos.h>
+
+ #include <kernel-features.h>
+
+@@ -137,14 +136,11 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 61f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
+ movl $SYS_futex, %eax
+ syscall
+
+ movl $1, %r8d
+- cmpq $-EAGAIN, %rax
+- je 91f
+ #ifdef __ASSUME_REQUEUE_PI
+ jmp 62f
+ #else
+@@ -331,70 +327,6 @@ __pthread_cond_wait:
+
+ 13: movq %r10, %rax
+ jmp 14b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+- movq 8(%rsp), %rdi
+-
+- /* Get internal lock. */
+- movl $1, %esi
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %esi, (%rdi)
+-#else
+- cmpxchgl %esi, cond_lock(%rdi)
+-#endif
+- jz 92f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- cmpq $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- callq __lll_lock_wait
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- incl cond_futex(%rdi)
+- movl cond_futex(%rdi), %edx
+-
+- /* Release internal lock. */
+- LOCK
+-#if cond_lock == 0
+- decl (%rdi)
+-#else
+- decl cond_lock(%rdi)
+-#endif
+- jz 93f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- cmpq $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- /* The call preserves %rdx. */
+- callq __lll_unlock_wake
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorq %r10, %r10
+- movq dep_mutex(%rdi), %r8
+- leaq cond_futex(%rdi), %rdi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -547,15 +479,11 @@ __condvar_cleanup1:
+ .uleb128 .LcleanupSTART-.LSTARTCODE
+ .uleb128 .LcleanupEND-.LcleanupSTART
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
+- .uleb128 .LcleanupSTART2-.LSTARTCODE
+- .uleb128 .LcleanupEND2-.LcleanupSTART2
+- .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
++ .uleb128 0
+ .uleb128 .LcallUR-.LSTARTCODE
+ .uleb128 .LENDCODE-.LcallUR
+ .uleb128 0
+- .uleb128 0
++ .uleb128 0
+ .Lcstend:
+
+
+Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.orig
+Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.rej
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-__i686.patch b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-__i686.patch
new file mode 100644
index 000000000..28d5dd424
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc-__i686.patch
@@ -0,0 +1,13 @@
+diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile
+--- glibc-old//sysdeps/i386/Makefile 2010-03-18 11:52:30.000000000 +1000
++++ glibc//sysdeps/i386/Makefile 2010-04-16 15:05:50.000000000 +1000
+@@ -1,6 +1,7 @@
+ # The mpn functions need a #define for asm syntax flavor.
+-# Every i386 port in use uses gas syntax (I think).
+-asm-CPPFLAGS += -DGAS_SYNTAX
++# Every i386 port in use uses gas syntax (I think). Don't replace
++# __i686 in __i686.get_pc_thunk.bx.
++asm-CPPFLAGS += -DGAS_SYNTAX -U __i686
+
+ # The i386 `long double' is a distinct type we support.
+ long-double-fcts = yes
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc.install b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc.install
new file mode 100644
index 000000000..7f85ade96
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/glibc.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
+
+post_upgrade() {
+ sbin/ldconfig -r .
+ [ -x sbin/init ] && sbin/init u
+ usr/sbin/locale-gen
+
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen
new file mode 100755
index 000000000..5aff344c4
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+ unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+ if [ -n "$locale" -a -n "$charset" ] ; then
+ true
+ else
+ echo "error: Bad entry '$locale $charset'"
+ false
+ fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+ case $locale in \#*) continue;; "") continue;; esac; \
+ is_entry_ok || continue
+ echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+ echo -n ".$charset"; \
+ echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+ echo -n '...'; \
+ if [ -f $LOCALES/$locale ]; then input=$locale; else \
+ input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+ localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+ echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale.gen.txt b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale.gen.txt
new file mode 100644
index 000000000..ccdd81734
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale.gen.txt
@@ -0,0 +1,23 @@
+# Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+# <locale> <charset>
+#
+# where <locale> is one of the locales given in /usr/share/i18n/locales
+# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
+#
+# Examples:
+# en_US ISO-8859-1
+# en_US.UTF-8 UTF-8
+# de_DE ISO-8859-1
+# de_DE@euro ISO-8859-15
+#
+# The locale-gen command will generate all the locales,
+# placing them in /usr/lib/locale.
+#
+# A list of supported locales is included in this file.
+# Uncomment the ones you need.
+#
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/nscd b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/nscd
new file mode 100755
index 000000000..8b14f2a3f
--- /dev/null
+++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/nscd
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/nscd`
+case "$1" in
+ start)
+ stat_busy "Starting nscd"
+ # create necessary directories if they don't already exist
+ mkdir -p /var/run/nscd /var/db/nscd 2>/dev/null
+ # remove stale files
+ rm -f /var/db/nscd/* /var/run/nscd/* 2>/dev/null
+ [ -z "$PID" ] && /usr/sbin/nscd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon nscd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping nscd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon nscd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/cross/cross-mipsel-unknown-linux-gnu-binutils/PKGBUILD b/cross/cross-mipsel-unknown-linux-gnu-binutils/PKGBUILD
new file mode 100644
index 000000000..24125950f
--- /dev/null
+++ b/cross/cross-mipsel-unknown-linux-gnu-binutils/PKGBUILD
@@ -0,0 +1,51 @@
+# Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
+pkgname=cross-mipsel-linux-gnu-binutils
+_pkgname=binutils
+_target="mipsel-linux-gnu"
+pkgver=2.22
+pkgrel=1
+pkgdesc="A set of programs to assemble and manipulate binary and object files for the MIPS architecture"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('zlib')
+source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2")
+_sysroot="/usr/lib/cross-${_target}"
+md5sums=('ee0f10756c84979622b992a4a61ea3f5')
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ ./configure \
+ "--prefix=${_sysroot}" \
+ "--bindir=/usr/bin" "--program-prefix=${_target}-" \
+ "--with-sysroot=${_sysroot}" \
+ "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
+ "--disable-nls" \
+ --with-gcc --with-gnu-as --with-gnu-ld \
+ --without-included-gettext
+
+ make all
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ msg "Removing duplicit files..."
+ # remove these files as they are already in the system
+ # (with native binutils)
+ rm -Rf ${pkgdir}${_sysroot}/share/{man,info}
+ # remove conflicting binaries
+ find ${pkgdir}/usr/bin/ -type f -not -name 'mipsel-linux-gnu-*' -delete
+
+ msg "Creating out-of-path executables..."
+ # symlink executables to single directory with no-arch-prefix name
+ mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
+ cd ${pkgdir}/usr/bin/cross/${_target}/;
+ for bin in ${pkgdir}/usr/bin/${_target}-*; do
+ bbin=`basename "$bin"`;
+ ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
+ done
+}
diff --git a/cross/cross-mipsel-unknown-linux-gnu-gcc/PKGBUILD b/cross/cross-mipsel-unknown-linux-gnu-gcc/PKGBUILD
new file mode 100644
index 000000000..f2d9b2e8b
--- /dev/null
+++ b/cross/cross-mipsel-unknown-linux-gnu-gcc/PKGBUILD
@@ -0,0 +1,54 @@
+# Contributor: Vojtech Horky <vojta . horky at-symbol seznam . cz>
+pkgname=cross-mipsel-linux-gnu-gcc
+_pkgname=gcc
+_target="mipsel-linux-gnu"
+pkgver=4.6.2
+pkgrel=1
+pkgdesc="The GNU Compiler Collection for the MIPS architecture"
+url="http://www.gnu.org/software/binutils/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl')
+options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip')
+source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-core-${pkgver}.tar.bz2")
+md5sums=('b1957f3209080b2f55bc3756d3a62b7c')
+_sysroot="/usr/lib/cross-${_target}"
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ ./configure \
+ "--prefix=${_sysroot}" \
+ "--bindir=/usr/bin" "--program-prefix=${_target}-" \
+ "--with-sysroot=${_sysroot}" \
+ "--target=${_target}" "--build=$CHOST" "--host=$CHOST" \
+ --with-gnu-as --with-gnu-ld \
+ --disable-nls --disable-threads \
+ --enable-languages=c,c++ \
+ --disable-multilib --disable-libgcj \
+ --without-headers --disable-shared
+
+ make all-gcc "inhibit_libc=true"
+}
+
+package() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install-gcc
+
+ msg "Removing duplicit files..."
+ # remove these files as they are already in the system
+ # (with native gcc)
+ rm -Rf ${pkgdir}${_sysroot}/{man,info}
+ # remove conflicting binaries
+ find ${pkgdir}/usr/bin/ -type f -not -name "${_target}-*" -delete
+
+ msg "Creating out-of-path executables..."
+ # symlink executables to single directory with no-arch-prefix name
+ mkdir -p ${pkgdir}/usr/bin/cross/${_target}/;
+ cd ${pkgdir}/usr/bin/cross/${_target}/;
+ for bin in ${pkgdir}/usr/bin/${_target}-*; do
+ bbin=`basename "$bin"`;
+ ln -s "/usr/bin/${bbin}" `echo "$bbin" | sed "s#^${_target}-##"`;
+ done
+}
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD b/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
new file mode 100644
index 000000000..e5e37beee
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD
@@ -0,0 +1,289 @@
+# $Id: PKGBUILD 145917 2012-01-04 01:25:10Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# NOTE: valgrind requires rebuilt with each major glibc version
+
+_pkgname=glibc
+_target="mips64el-unknown-linux-gnu"
+_sysroot="/usr/${_target}"
+_ARCH=mips
+
+unset CFLAGS CXXFLAGS LDFLAGS
+
+pkgname=${_target}-glibc
+pkgver=2.15
+pkgrel=2
+_glibcdate=20111227
+pkgdesc="GNU C Library"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://www.gnu.org/software/libc"
+license=('GPL' 'LGPL')
+groups=("${_target}-devel")
+depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata')
+makedepends=("cross-${_target}-binutils"
+ "cross-${_target}-gcc-core-shared"
+ "cross-${_target}-glibc-headers")
+backup=(etc/gai.conf
+ etc/locale.gen
+ etc/nscd.conf)
+options=('!strip')
+install=glibc.install
+source=(ftp://ftp.archlinux.org/other/glibc/${_pkgname}-${pkgver}_${_glibcdate}.tar.xz
+ http://repo.parabolagnulinux.org/other/glibc-ports-${pkgver}_${_glibcdate}.tar.xz
+ glibc-2.10-dont-build-timezone.patch
+ glibc-2.10-bz4781.patch
+ glibc-__i686.patch
+ glibc-2.12.2-ignore-origin-of-privileged-program.patch
+ glibc-2.14-libdl-crash.patch
+ glibc-2.14-revert-4768ae77.patch
+ glibc-2.14-reexport-rpc-interface.patch
+ glibc-2.14-reinstall-nis-rpc-headers.patch
+ glibc-2.15-lddebug-scopes.patch
+ glibc-2.15-revert-c5a0802a.patch
+ glibc-2.15-math64crash.patch
+ configure.patch
+ nscd
+ locale.gen.txt
+ locale-gen)
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ 'a006504b83553d0b554cf8badff005b6'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '6970bcfeb3bf88913436d5112d16f588'
+ '7da8c554a3b591c7401d7023b1928afc'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'dc7550e659ddd685bd78a930d15a01f2'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
+
+mksource() {
+ git clone http://sourceware.org/git/glibc.git
+ pushd glibc
+ #git checkout -b glibc-2.15-arch origin/release/2.15/master
+ git checkout -b glibc-${pkgver}-arch origin/master
+ popd
+ tar -cvJf glibc-${pkgver}_${_glibcdate}.tar.xz glibc/*
+ mksource-ports
+}
+
+mksource-ports() {
+ git clone http://sourceware.org/git/glibc-ports.git
+ pushd glibc-ports
+ git checkout -b glibc-${pkgver}-arch origin/release/${pkgver}/master
+ popd
+ tar -cvJf glibc-ports-${pkgver}_${_glibcdate}.tar.xz glibc-ports/*
+}
+
+build() {
+ cd ${srcdir}/glibc
+
+ # timezone data is in separate package (tzdata)
+ patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch
+
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=4781
+ patch -Np1 -i ${srcdir}/glibc-2.10-bz4781.patch
+
+ # http://sources.redhat.com/bugzilla/show_bug.cgi?id=411
+ # http://sourceware.org/ml/libc-alpha/2009-07/msg00072.html
+ patch -Np1 -i ${srcdir}/glibc-__i686.patch
+
+ # http://www.exploit-db.com/exploits/15274/
+ # http://sourceware.org/git/?p=glibc.git;a=patch;h=d14e6b09 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.12.2-ignore-origin-of-privileged-program.patch
+
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=675155e9 (only fedora branch...)
+ # http://sourceware.org/ml/libc-alpha/2011-06/msg00006.html
+ patch -Np1 -i ${srcdir}/glibc-2.14-libdl-crash.patch
+
+ # Revert commit causing issues with crappy DNS servers...
+ # Will be removed when workaround becomes annoying to maintain - USE A BETTER DNS SERVER!
+ # Note that both these patches appear not to fix the issue completely:
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=13013
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=032c0ee3 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-revert-4768ae77.patch
+
+ # re-export RPC interface until libtirpc is ready as a replacement
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-reexport-rpc-interface.patch
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.14-reinstall-nis-rpc-headers.patch
+
+ # propriety nvidia crash - https://bugzilla.redhat.com/show_bug.cgi?id=737223
+ # http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0c95ab64 (only fedora branch...)
+ patch -Np1 -i ${srcdir}/glibc-2.15-lddebug-scopes.patch
+
+ # revert commit c5a0802a - causes various hangs
+ # https://bugzilla.redhat.com/show_bug.cgi?id=769421
+ patch -Np1 -i ${srcdir}/glibc-2.15-revert-c5a0802a.patch
+
+ # revert optimized math routines that can cause crashes (FS#27736, FS#27743)
+ # obviously not a real fix...
+ patch -Np1 -i ${srcdir}/glibc-2.15-math64crash.patch
+
+ patch -Np0 -i ${srcdir}/configure.patch
+
+ install -dm755 ${pkgdir}${_sysroot}/etc
+ touch ${pkgdir}${_sysroot}/etc/ld.so.conf
+
+ ln -s ../glibc-ports ports
+
+ cd ${srcdir}
+ mkdir glibc-build
+ cd glibc-build
+
+ echo "slibdir=/lib" >> configparms
+ echo "libc_cv_ctors_header=no" >> config.cache
+ echo "libc_cv_forced_unwind=yes" >> config.cache
+ echo "libc_cv_c_cleanup=yes" >> config.cache
+
+ # remove hardening options from CFLAGS for building libraries
+ CFLAGS=${CFLAGS/-fstack-protector/}
+ CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2/}
+
+ BUILD_CC=${CHOST}-gcc \
+ CFLAGS=" -EL -march=loongson2f -mabi=n32 -O2 -U_FORTIFY_SOURCE " \
+ CC=${_target}-gcc \
+ AR=${_target}-ar \
+ RANLIB=${_target}-ranlib \
+ ${srcdir}/glibc/configure \
+ --prefix=/usr \
+ --cache-file=${srcdir}/glibc-build/config.cache \
+ --build=${CHOST} \
+ --host=${_target} \
+ --without-cvs \
+ --disable-profile \
+ --without-gd \
+ --with-headers=/usr/${_target}/usr/include \
+ --disable-debug \
+ --disable-sanity-checks \
+ --enable-kernel=2.6.27 \
+ --with-__thread \
+ --with-tls \
+ --enable-shared \
+ --with-fp \
+ --enable-add-ons=nptl,ports,libidn \
+ --enable-bind-now \
+ --enable-multi-arch
+
+ # --libdir=${_sysroot}/usr/lib \
+ # --libexecdir=${_sysroot}/usr/lib \
+
+ # build libraries with hardening disabled
+ echo "build-programs=no" >> configparms
+ make
+
+ # re-enable hardening for programs
+ sed -i "s#=no#=yes#" configparms
+ echo "CC += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+ echo "CXX += -fstack-protector -D_FORTIFY_SOURCE=2" >> configparms
+ make
+
+ # remove harding in preparation to run test-suite
+ sed -i '2,4d' configparms
+}
+
+check() {
+ cd ${srcdir}/glibc-build
+
+ # some errors are expected - manually check log files
+ make -k check || true
+}
+
+package() {
+ cd ${srcdir}/glibc-build
+ make install_root=${pkgdir}${_sysroot} install
+
+ rm -f ${pkgdir}${_sysroot}/etc/ld.so.{cache,conf}
+
+ install -dm755 ${pkgdir}${_sysroot}/etc/rc.d
+ install -dm755 ${pkgdir}${_sysroot}/usr/sbin
+ install -dm755 ${pkgdir}${_sysroot}/usr/lib/locale
+ install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}${_sysroot}/etc/nscd.conf
+ install -m755 ${srcdir}/nscd ${pkgdir}${_sysroot}/etc/rc.d/nscd
+ install -m755 ${srcdir}/locale-gen ${pkgdir}${_sysroot}/usr/sbin
+ install -m644 ${srcdir}/glibc/posix/gai.conf ${pkgdir}${_sysroot}/etc/gai.conf
+
+ sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}${_sysroot}/etc/nscd.conf
+
+ # create /etc/locale.gen
+ install -m644 ${srcdir}/locale.gen.txt ${pkgdir}${_sysroot}/etc/locale.gen
+ sed -e "s|/| |g" \
+ -e 's|\\| |g' \
+ -e "s|SUPPORTED-LOCALES=||" \
+ ${srcdir}/glibc/localedata/SUPPORTED >> ${pkgdir}${_sysroot}/etc/locale.gen
+ sed -i "s|^|#|g" ${pkgdir}${_sysroot}/etc/locale.gen
+
+ if [[ ${CARCH} = "x86_64" ]]; then
+ # fix for the linker
+ sed -i '/RTLDLIST/s%lib64%lib%' ${pkgdir}${_sysroot}/bin/ldd
+ # Comply with multilib binaries, they look for the linker in /lib64
+ mkdir ${pkgdir}${_sysroot}/lib64
+ cd ${pkgdir}${_sysroot}/lib64
+ ln -v -s ../lib/ld* .
+ fi
+
+ # Do not strip the following files for improved debugging support
+ # ("improved" as in not breaking gdb and valgrind...):
+ # ld-${pkgver}.so
+ # libc-${pkgver}.so
+ # libpthread-${pkgver}.so
+ # libthread_db-1.0.so
+
+# cd $pkgdir${_sysroot}
+# ${_target}-strip $STRIP_BINARIES \
+# sbin/{ldconfig,sln} \
+# usr/bin/{gencat,getconf,getent,iconv,locale,localedef} \
+# usr/bin/{makedb,pcprofiledump,pldd,rpcgen,sprof} \
+# usr/lib/getconf/* \
+# usr/sbin/{iconvconfig,nscd}
+# [[ $CARCH = "i686" ]] && strip $STRIP_BINARIES usr/bin/lddlibc4
+
+# ${_target}-strip $STRIP_STATIC usr/lib/*.a
+
+# ${_target}-strip $STRIP_SHARED \
+# lib/{libanl,libBrokenLocale,libcidn,libcrypt}-${pkgver}.so \
+# lib/libnss_{compat,db,dns,files,hesiod,nis,nisplus}-${pkgver}.so \
+# lib/{libdl,libm,libnsl,libresolv,librt,libutil}-${pkgver}.so \
+# lib/{libmemusage,libpcprofile,libSegFault}.so \
+# usr/lib/{pt_chown,{audit,gconv}/*.so}
+}
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ '98d028ee63fca2821414ebcac0af0e5b'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '6970bcfeb3bf88913436d5112d16f588'
+ '7da8c554a3b591c7401d7023b1928afc'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'dc7550e659ddd685bd78a930d15a01f2'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
+md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
+ '98d028ee63fca2821414ebcac0af0e5b'
+ '4dadb9203b69a3210d53514bb46f41c3'
+ '0c5540efc51c0b93996c51b57a8540ae'
+ '40cd342e21f71f5e49e32622b25acc52'
+ 'b042647ea7d6f22ad319e12e796bd13e'
+ '6970bcfeb3bf88913436d5112d16f588'
+ '7da8c554a3b591c7401d7023b1928afc'
+ 'c5de2a946215d647c8af5432ec4b0da0'
+ '55febbb72139ac7b65757df085024b83'
+ '3c219ddfb619b6df903cac4cc42c611d'
+ '7ae3e426251ae33e73dbad71f9c91378'
+ 'dc7550e659ddd685bd78a930d15a01f2'
+ '39f80ba6bcda6b010a66f9c61e9a0017'
+ 'b587ee3a70c9b3713099295609afde49'
+ '07ac979b6ab5eeb778d55f041529d623'
+ '476e9113489f93b348b21e144b6a8fcf')
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-bz4781.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-bz4781.patch
new file mode 100644
index 000000000..cf1a97a18
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-bz4781.patch
@@ -0,0 +1,42 @@
+diff -Naur glibc-old/sysdeps/unix/sysv/linux/i386/clone.S glibc/sysdeps/unix/sysv/linux/i386/clone.S
+--- glibc-old/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-09 13:35:30.000000000 +1000
++++ glibc/sysdeps/unix/sysv/linux/i386/clone.S 2009-05-23 13:27:46.000000000 +1000
+@@ -120,9 +120,6 @@
+ ret
+
+ L(thread_start):
+- cfi_startproc;
+- /* Clearing frame pointer is insufficient, use CFI. */
+- cfi_undefined (eip);
+ /* Note: %esi is zero. */
+ movl %esi,%ebp /* terminate the stack frame */
+ #ifdef RESET_PID
+@@ -155,7 +152,6 @@
+ jmp L(haspid)
+ .previous
+ #endif
+- cfi_endproc;
+
+ cfi_startproc
+ PSEUDO_END (BP_SYM (__clone))
+diff -Naur glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S glibc/sysdeps/unix/sysv/linux/x86_64/clone.S
+--- glibc-old/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-09 13:35:30.000000000 +1000
++++ glibc/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-05-23 13:27:46.000000000 +1000
+@@ -89,9 +89,6 @@
+ ret
+
+ L(thread_start):
+- cfi_startproc;
+- /* Clearing frame pointer is insufficient, use CFI. */
+- cfi_undefined (rip);
+ /* Clear the frame pointer. The ABI suggests this be done, to mark
+ the outermost frame obviously. */
+ xorl %ebp, %ebp
+@@ -116,7 +113,6 @@
+ /* Call exit with return value from function call. */
+ movq %rax, %rdi
+ call HIDDEN_JUMPTARGET (_exit)
+- cfi_endproc;
+
+ cfi_startproc;
+ PSEUDO_END (BP_SYM (__clone))
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-dont-build-timezone.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-dont-build-timezone.patch
new file mode 100644
index 000000000..d3abeff17
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.10-dont-build-timezone.patch
@@ -0,0 +1,13 @@
+timezone data has been split into the package sys-libs/timezone-data
+
+--- glibc-2.4/Makeconfig
++++ glibc-2.4/Makeconfig
+@@ -931,7 +931,7 @@
+ stdlib stdio-common libio malloc string wcsmbs time dirent \
+ grp pwd posix io termios resource misc socket sysvipc gmon \
+ gnulib iconv iconvdata wctype manual shadow gshadow po argp \
+- crypt nss localedata timezone rt conform debug \
++ crypt nss localedata rt conform debug \
+ $(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
+
+ ifndef avoid-generated
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch
new file mode 100644
index 000000000..ce089b49c
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch
@@ -0,0 +1,26 @@
+From d14e6b09d60d52cc12f0396c3106b14e1bd0fe8f Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Thu, 9 Dec 2010 15:00:59 +0100
+Subject: [PATCH 1/1] Ignore origin of privileged program
+
+---
+ ChangeLog | 5 +++++
+ elf/dl-object.c | 3 +++
+ 2 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/elf/dl-object.c b/elf/dl-object.c
+index 22a1635..7674d49 100644
+--- a/elf/dl-object.c
++++ b/elf/dl-object.c
+@@ -214,6 +214,9 @@ _dl_new_object (char *realname, const char *libname, int type,
+ out:
+ new->l_origin = origin;
+ }
++ else if (INTUSE(__libc_enable_secure) && type == lt_executable)
++ /* The origin of a privileged program cannot be trusted. */
++ new->l_origin = (char *) -1;
+
+ return new;
+ }
+--
+1.7.2
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-libdl-crash.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-libdl-crash.patch
new file mode 100644
index 000000000..6c9d2718e
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-libdl-crash.patch
@@ -0,0 +1,132 @@
+diff --git a/elf/dl-close.c b/elf/dl-close.c
+index 73b2a2f..9bd91e3 100644
+--- a/elf/dl-close.c
++++ b/elf/dl-close.c
+@@ -1,5 +1,5 @@
+ /* Close a shared object opened by `_dl_open'.
+- Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1996-2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map)
+ if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
+ || dl_close_state != not_pending)
+ {
+- if (map->l_direct_opencount == 0)
+- {
+- if (map->l_type == lt_loaded)
+- dl_close_state = rerun;
+- else if (map->l_type == lt_library)
+- {
+- struct link_map **oldp = map->l_initfini;
+- map->l_initfini = map->l_orig_initfini;
+- _dl_scope_free (oldp);
+- }
+- }
++ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
++ dl_close_state = rerun;
+
+ /* There are still references to this object. Do nothing more. */
+ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
+diff --git a/elf/dl-deps.c b/elf/dl-deps.c
+index 9e30594..3890d00 100644
+--- a/elf/dl-deps.c
++++ b/elf/dl-deps.c
+@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map,
+ nneeded * sizeof needed[0]);
+ atomic_write_barrier ();
+ l->l_initfini = l_initfini;
++ l->l_free_initfini = 1;
+ }
+
+ /* If we have no auxiliary objects just go on to the next map. */
+@@ -681,6 +682,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ l_initfini[nlist] = NULL;
+ atomic_write_barrier ();
+ map->l_initfini = l_initfini;
++ map->l_free_initfini = 1;
+ if (l_reldeps != NULL)
+ {
+ atomic_write_barrier ();
+@@ -689,5 +691,5 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ _dl_scope_free (old_l_reldeps);
+ }
+ if (old_l_initfini != NULL)
+- map->l_orig_initfini = old_l_initfini;
++ _dl_scope_free (old_l_initfini);
+
+diff --git a/elf/dl-libc.c b/elf/dl-libc.c
+index 7be9483..a13fce3 100644
+--- a/elf/dl-libc.c
++++ b/elf/dl-libc.c
+@@ -265,13 +265,13 @@ libc_freeres_fn (free_mem)
+
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
+ {
+- /* Remove all additional names added to the objects. */
+ for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
+ {
+ struct libname_list *lnp = l->l_libname->next;
+
+ l->l_libname->next = NULL;
+
++ /* Remove all additional names added to the objects. */
+ while (lnp != NULL)
+ {
+ struct libname_list *old = lnp;
+@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem)
+ if (! old->dont_free)
+ free (old);
+ }
++
++ /* Free the initfini dependency list. */
++ if (l->l_free_initfini)
++ free (l->l_initfini);
+ }
+
+ if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 4a9109e..617e30e 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2251,6 +2251,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ lnp->dont_free = 1;
+ lnp = lnp->next;
+ }
++ l->l_free_initfini = 0;
+
+ if (l != &GL(dl_rtld_map))
+ _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
+diff --git a/include/link.h b/include/link.h
+index e877104..051b99a 100644
+--- a/include/link.h
++++ b/include/link.h
+@@ -1,6 +1,6 @@
+ /* Data structure for communication from the run-time dynamic linker for
+ loaded ELF shared objects.
+- Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1995-2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -192,6 +192,9 @@ struct link_map
+ during LD_TRACE_PRELINKING=1
+ contains any DT_SYMBOLIC
+ libraries. */
++ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
++ freed, ie. not allocated with
++ the dummy malloc in ld.so. */
+
+ /* Collected information about own RPATH directories. */
+ struct r_search_path_struct l_rpath_dirs;
+@@ -240,9 +243,6 @@ struct link_map
+
+ /* List of object in order of the init and fini calls. */
+ struct link_map **l_initfini;
+- /* The init and fini list generated at startup, saved when the
+- object is also loaded dynamically. */
+- struct link_map **l_orig_initfini;
+
+ /* List of the dependencies introduced through symbol binding. */
+ struct link_map_reldeps
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reexport-rpc-interface.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reexport-rpc-interface.patch
new file mode 100644
index 000000000..e2beea881
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reexport-rpc-interface.patch
@@ -0,0 +1,26 @@
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 67e1ca2..5e7cca5 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -635,7 +635,7 @@ for linking")
+ # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
+ # define libc_hidden_def(name) hidden_def (name)
+ # define libc_hidden_weak(name) hidden_weak (name)
+-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
++# define libc_hidden_nolink(name, version) hidden_def (name)
+ # define libc_hidden_ver(local, name) hidden_ver (local, name)
+ # define libc_hidden_data_def(name) hidden_data_def (name)
+ # define libc_hidden_data_weak(name) hidden_data_weak (name)
+diff --git a/sunrpc/Makefile b/sunrpc/Makefile
+index 5134ce9..40c73d1 100644
+--- a/sunrpc/Makefile
++++ b/sunrpc/Makefile
+@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
+ des_crypt.h)
+ headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
+ $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
+-headers = rpc/netdb.h
++headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
+ install-others = $(inst_sysconfdir)/rpc
+ generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
+ $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reinstall-nis-rpc-headers.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reinstall-nis-rpc-headers.patch
new file mode 100644
index 000000000..eb0fd822d
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-reinstall-nis-rpc-headers.patch
@@ -0,0 +1,28 @@
+From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Tue, 17 May 2011 17:42:30 +0200
+Subject: [PATCH] Reinstall NIS RPC headers
+
+---
+ nis/Makefile | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nis/Makefile b/nis/Makefile
+index b5c9609..d2934d9 100644
+--- a/nis/Makefile
++++ b/nis/Makefile
+@@ -23,9 +23,9 @@ subdir := nis
+
+ aux := nis_hash
+
++headers := $(wildcard rpcsvc/*.[hx])
+ distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
+- nisplus-parser.h nis_xdr.h nss \
+- $(wildcard rpcsvc/*.[hx])
++ nisplus-parser.h nis_xdr.h nss
+
+ # These are the databases available for the nis (and perhaps later nisplus)
+ # service. This must be a superset of the services in nss.
+--
+1.7.5.4
+
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-revert-4768ae77.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-revert-4768ae77.patch
new file mode 100644
index 000000000..11f087cb7
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.14-revert-4768ae77.patch
@@ -0,0 +1,37 @@
+diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
+--- glibc-orig//resolv/res_send.c 2011-06-10 18:59:03.041436996 +1000
++++ glibc/resolv/res_send.c 2011-06-10 19:08:09.379309323 +1000
+@@ -549,7 +549,7 @@
+ ns, ansp, ansp2, nansp2, resplen2);
+ if (n < 0)
+ return (-1);
+- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
++ if (n == 0)
+ goto next_ns;
+ } else {
+ /* Use datagrams. */
+@@ -559,7 +559,7 @@
+ ansp2, nansp2, resplen2);
+ if (n < 0)
+ return (-1);
+- if (n == 0 && (buf2 == NULL || *resplen2 == 0))
++ if (n == 0)
+ goto next_ns;
+ if (v_circuit)
+ // XXX Check whether both requests failed or
+@@ -1275,14 +1275,10 @@
+ (*thisresplenp > *thisanssizp)
+ ? *thisanssizp : *thisresplenp);
+
+- if (recvresp1 || (buf2 != NULL && recvresp2)) {
+- *resplen2 = 0;
++ if (recvresp1 || (buf2 != NULL && recvresp2))
+ return resplen;
+- }
+ if (buf2 != NULL)
+ {
+- /* No data from the first reply. */
+- resplen = 0;
+ /* We are waiting for a possible second reply. */
+ if (hp->id == anhp->id)
+ recvresp1 = 1;
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-lddebug-scopes.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-lddebug-scopes.patch
new file mode 100644
index 000000000..808cf8d7c
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-lddebug-scopes.patch
@@ -0,0 +1,27 @@
+From 0c95ab64cb4ec0d22bb222647d9d20c7b4903e38 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@redhat.com>
+Date: Fri, 7 Oct 2011 09:31:27 +0200
+Subject: [PATCH] Horrible workaround for horribly broken software
+
+---
+ elf/rtld.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 978c609..8422b9f 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -1393,7 +1393,9 @@ of this helper program; chances are you did not intend to run this program.\n\
+ char *copy = malloc (len);
+ if (copy == NULL)
+ _dl_fatal_printf ("out of memory\n");
+- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len);
++ l->l_libname->name = memcpy (copy, dsoname, len);
++ if (GLRO(dl_debug_mask))
++ l->l_name = copy;
+ }
+
+ /* Add the vDSO to the object list. */
+--
+1.7.3.4
+
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-math64crash.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-math64crash.patch
new file mode 100644
index 000000000..d315bf266
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-math64crash.patch
@@ -0,0 +1,184 @@
+diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
+index be68903..a032da8 100644
+--- a/sysdeps/x86_64/fpu/multiarch/Makefile
++++ b/sysdeps/x86_64/fpu/multiarch/Makefile
+@@ -1,5 +1,5 @@
+ ifeq ($(subdir),math)
+-libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
++libm-sysdep_routines += s_floorf-c s_ceilf-c \
+ s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
+
+ ifeq ($(have-mfma4),yes)
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
+deleted file mode 100644
+index 6a5ea3f..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
++++ /dev/null
+@@ -1,2 +0,0 @@
+-#define __ceil __ceil_c
+-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.S b/sysdeps/x86_64/fpu/multiarch/s_ceil.S
+deleted file mode 100644
+index d0f8da3..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.S
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__ceil)
+- .type __ceil, @gnu_indirect_function
+- call __get_cpu_features@plt
+- movq %rax, %rdx
+- leaq __ceil_sse41(%rip), %rax
+- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+- jnz 2f
+- leaq __ceil_c(%rip), %rax
+-2: ret
+-END(__ceil)
+-weak_alias (__ceil, ceil)
+-
+-
+-ENTRY(__ceil_sse41)
+- roundsd $2, %xmm0, %xmm0
+- ret
+-END(__ceil_sse41)
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
+deleted file mode 100644
+index 68733b6..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
++++ /dev/null
+@@ -1,3 +0,0 @@
+-#undef __floor
+-#define __floor __floor_c
+-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.S b/sysdeps/x86_64/fpu/multiarch/s_floor.S
+deleted file mode 100644
+index 514ea95..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_floor.S
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/* Copyright (C) 2011 Free Software Foundation, Inc.
+- This file is part of the GNU C Library.
+- Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+-
+- The GNU C Library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Lesser General Public
+- License as published by the Free Software Foundation; either
+- version 2.1 of the License, or (at your option) any later version.
+-
+- The GNU C Library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Lesser General Public License for more details.
+-
+- You should have received a copy of the GNU Lesser General Public
+- License along with the GNU C Library; if not, write to the Free
+- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+- 02111-1307 USA. */
+-
+-#include <machine/asm.h>
+-#include <init-arch.h>
+-
+-
+-ENTRY(__floor)
+- .type __floor, @gnu_indirect_function
+- call __get_cpu_features@plt
+- movq %rax, %rdx
+- leaq __floor_sse41(%rip), %rax
+- testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+- jnz 2f
+- leaq __floor_c(%rip), %rax
+-2: ret
+-END(__floor)
+-weak_alias (__floor, floor)
+-
+-
+-ENTRY(__floor_sse41)
+- roundsd $1, %xmm0, %xmm0
+- ret
+-END(__floor_sse41)
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
+deleted file mode 100644
+index 1ba9dbc..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
++++ /dev/null
+@@ -1,31 +0,0 @@
+-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+-# include <init-arch.h>
+-# include <math.h>
+-# undef NAN
+-
+-extern double __cos_sse2 (double);
+-extern double __sin_sse2 (double);
+-extern double __cos_avx (double);
+-extern double __sin_avx (double);
+-# ifdef HAVE_FMA4_SUPPORT
+-extern double __cos_fma4 (double);
+-extern double __sin_fma4 (double);
+-# else
+-# undef HAS_FMA4
+-# define HAS_FMA4 0
+-# define __cos_fma4 ((void *) 0)
+-# define __sin_fma4 ((void *) 0)
+-# endif
+-
+-libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
+-weak_alias (__cos, cos)
+-
+-libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
+-weak_alias (__sin, sin)
+-
+-# define __cos __cos_sse2
+-# define __sin __sin_sse2
+-#endif
+-
+-
+-#include <sysdeps/ieee754/dbl-64/s_sin.c>
+diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
+deleted file mode 100644
+index 8f6601e..0000000
+--- a/sysdeps/x86_64/fpu/multiarch/s_tan.c
++++ /dev/null
+@@ -1,21 +0,0 @@
+-#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+-# include <init-arch.h>
+-# include <math.h>
+-
+-extern double __tan_sse2 (double);
+-extern double __tan_avx (double);
+-# ifdef HAVE_FMA4_SUPPORT
+-extern double __tan_fma4 (double);
+-# else
+-# undef HAS_FMA4
+-# define HAS_FMA4 0
+-# define __tan_fma4 ((void *) 0)
+-# endif
+-
+-libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
+-
+-# define tan __tan_sse2
+-#endif
+-
+-
+-#include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-revert-c5a0802a.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-revert-c5a0802a.patch
new file mode 100644
index 000000000..f532b95e8
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.15-revert-c5a0802a.patch
@@ -0,0 +1,229 @@
+diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:12.937212834 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-22 18:04:42.104222278 +0000
+@@ -137,7 +137,6 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 18f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
+ movl %ebp, %edx
+ xorl %esi, %esi
+@@ -151,9 +150,6 @@ __pthread_cond_wait:
+ sete 16(%esp)
+ je 19f
+
+- cmpl $-EAGAIN, %eax
+- je 91f
+-
+ /* Normal and PI futexes dont mix. Use normal futex functions only
+ if the kernel does not support the PI futex functions. */
+ cmpl $-ENOSYS, %eax
+@@ -398,78 +394,6 @@ __pthread_cond_wait:
+ #endif
+ call __lll_unlock_wake
+ jmp 11b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+-
+- /* Get internal lock. */
+- movl $1, %edx
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %edx, (%ebx)
+-#else
+- cmpxchgl %edx, cond_lock(%ebx)
+-#endif
+- jz 92f
+-
+-#if cond_lock == 0
+- movl %ebx, %edx
+-#else
+- leal cond_lock(%ebx), %edx
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_lock_wait
+-
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- addl $1, cond_futex(%ebx)
+- movl cond_futex(%ebx), %ebp
+-
+- /* Unlock. */
+- LOCK
+-#if cond_lock == 0
+- subl $1, (%ebx)
+-#else
+- subl $1, cond_lock(%ebx)
+-#endif
+- je 93f
+-#if cond_lock == 0
+- movl %ebx, %eax
+-#else
+- leal cond_lock(%ebx), %eax
+-#endif
+-#if (LLL_SHARED-LLL_PRIVATE) > 255
+- xorl %ecx, %ecx
+-#endif
+- cmpl $-1, dep_mutex(%ebx)
+- setne %cl
+- subl $1, %ecx
+- andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+-#if LLL_PRIVATE != 0
+- addl $LLL_PRIVATE, %ecx
+-#endif
+- call __lll_unlock_wake
+-
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorl %ecx, %ecx
+- movl dep_mutex(%ebx), %edi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -642,10 +566,6 @@ __condvar_w_cleanup:
+ .long .LcleanupEND-.Lsub_cond_futex
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
+- .long .LcleanupSTART2-.LSTARTCODE
+- .long .LcleanupEND2-.LcleanupSTART2
+- .long __condvar_w_cleanup-.LSTARTCODE
+- .uleb128 0
+ .long .LcallUR-.LSTARTCODE
+ .long .LENDCODE-.LcallUR
+ .long 0
+Only in b/nptl/sysdeps/unix/sysv/linux/i386/i486: pthread_cond_wait.S.orig
+diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:04:12.941212837 +0000
++++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-22 18:05:05.155229737 +0000
+@@ -23,7 +23,6 @@
+ #include <lowlevelcond.h>
+ #include <tcb-offsets.h>
+ #include <pthread-pi-defines.h>
+-#include <pthread-errnos.h>
+
+ #include <kernel-features.h>
+
+@@ -137,14 +136,11 @@ __pthread_cond_wait:
+ cmpl $PI_BIT, %eax
+ jne 61f
+
+-90:
+ movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
+ movl $SYS_futex, %eax
+ syscall
+
+ movl $1, %r8d
+- cmpq $-EAGAIN, %rax
+- je 91f
+ #ifdef __ASSUME_REQUEUE_PI
+ jmp 62f
+ #else
+@@ -331,70 +327,6 @@ __pthread_cond_wait:
+
+ 13: movq %r10, %rax
+ jmp 14b
+-
+-91:
+-.LcleanupSTART2:
+- /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+- call it again. */
+- movq 8(%rsp), %rdi
+-
+- /* Get internal lock. */
+- movl $1, %esi
+- xorl %eax, %eax
+- LOCK
+-#if cond_lock == 0
+- cmpxchgl %esi, (%rdi)
+-#else
+- cmpxchgl %esi, cond_lock(%rdi)
+-#endif
+- jz 92f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- cmpq $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- callq __lll_lock_wait
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-92:
+- /* Increment the cond_futex value again, so it can be used as a new
+- expected value. */
+- incl cond_futex(%rdi)
+- movl cond_futex(%rdi), %edx
+-
+- /* Release internal lock. */
+- LOCK
+-#if cond_lock == 0
+- decl (%rdi)
+-#else
+- decl cond_lock(%rdi)
+-#endif
+- jz 93f
+-
+-#if cond_lock != 0
+- addq $cond_lock, %rdi
+-#endif
+- cmpq $-1, dep_mutex-cond_lock(%rdi)
+- movl $LLL_PRIVATE, %eax
+- movl $LLL_SHARED, %esi
+- cmovne %eax, %esi
+- /* The call preserves %rdx. */
+- callq __lll_unlock_wake
+-#if cond_lock != 0
+- subq $cond_lock, %rdi
+-#endif
+-93:
+- /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+- xorq %r10, %r10
+- movq dep_mutex(%rdi), %r8
+- leaq cond_futex(%rdi), %rdi
+- jmp 90b
+-.LcleanupEND2:
+-
+ .size __pthread_cond_wait, .-__pthread_cond_wait
+ versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
+ GLIBC_2_3_2)
+@@ -547,15 +479,11 @@ __condvar_cleanup1:
+ .uleb128 .LcleanupSTART-.LSTARTCODE
+ .uleb128 .LcleanupEND-.LcleanupSTART
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
+- .uleb128 .LcleanupSTART2-.LSTARTCODE
+- .uleb128 .LcleanupEND2-.LcleanupSTART2
+- .uleb128 __condvar_cleanup1-.LSTARTCODE
+- .uleb128 0
++ .uleb128 0
+ .uleb128 .LcallUR-.LSTARTCODE
+ .uleb128 .LENDCODE-.LcallUR
+ .uleb128 0
+- .uleb128 0
++ .uleb128 0
+ .Lcstend:
+
+
+Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.orig
+Only in b/nptl/sysdeps/unix/sysv/linux/x86_64: pthread_cond_wait.S.rej
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch
new file mode 100644
index 000000000..28d5dd424
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch
@@ -0,0 +1,13 @@
+diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile
+--- glibc-old//sysdeps/i386/Makefile 2010-03-18 11:52:30.000000000 +1000
++++ glibc//sysdeps/i386/Makefile 2010-04-16 15:05:50.000000000 +1000
+@@ -1,6 +1,7 @@
+ # The mpn functions need a #define for asm syntax flavor.
+-# Every i386 port in use uses gas syntax (I think).
+-asm-CPPFLAGS += -DGAS_SYNTAX
++# Every i386 port in use uses gas syntax (I think). Don't replace
++# __i686 in __i686.get_pc_thunk.bx.
++asm-CPPFLAGS += -DGAS_SYNTAX -U __i686
+
+ # The i386 `long double' is a distinct type we support.
+ long-double-fcts = yes
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc.install b/cross/mips64el-unknown-linux-gnu-glibc/glibc.install
new file mode 100644
index 000000000..7f85ade96
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
+
+post_upgrade() {
+ sbin/ldconfig -r .
+ [ -x sbin/init ] && sbin/init u
+ usr/sbin/locale-gen
+
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ usr/bin/install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/locale-gen b/cross/mips64el-unknown-linux-gnu-glibc/locale-gen
new file mode 100755
index 000000000..5aff344c4
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/locale-gen
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+ unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+ if [ -n "$locale" -a -n "$charset" ] ; then
+ true
+ else
+ echo "error: Bad entry '$locale $charset'"
+ false
+ fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+ case $locale in \#*) continue;; "") continue;; esac; \
+ is_entry_ok || continue
+ echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+ echo -n ".$charset"; \
+ echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+ echo -n '...'; \
+ if [ -f $LOCALES/$locale ]; then input=$locale; else \
+ input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+ localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+ echo ' done'; \
+done < $LOCALEGEN
+echo "Generation complete."
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/locale.gen.txt b/cross/mips64el-unknown-linux-gnu-glibc/locale.gen.txt
new file mode 100644
index 000000000..ccdd81734
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/locale.gen.txt
@@ -0,0 +1,23 @@
+# Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+# <locale> <charset>
+#
+# where <locale> is one of the locales given in /usr/share/i18n/locales
+# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
+#
+# Examples:
+# en_US ISO-8859-1
+# en_US.UTF-8 UTF-8
+# de_DE ISO-8859-1
+# de_DE@euro ISO-8859-15
+#
+# The locale-gen command will generate all the locales,
+# placing them in /usr/lib/locale.
+#
+# A list of supported locales is included in this file.
+# Uncomment the ones you need.
+#
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/nscd b/cross/mips64el-unknown-linux-gnu-glibc/nscd
new file mode 100755
index 000000000..8b14f2a3f
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/nscd
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/nscd`
+case "$1" in
+ start)
+ stat_busy "Starting nscd"
+ # create necessary directories if they don't already exist
+ mkdir -p /var/run/nscd /var/db/nscd 2>/dev/null
+ # remove stale files
+ rm -f /var/db/nscd/* /var/run/nscd/* 2>/dev/null
+ [ -z "$PID" ] && /usr/sbin/nscd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon nscd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping nscd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon nscd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD b/cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD
new file mode 100644
index 000000000..277890098
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-linux-api-headers/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 145918 2012-01-04 01:25:12Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+export ARCH=mips
+_target=mips64el-unknown-linux-gnu
+_sysroot="/usr/${_target}"
+
+pkgname=${_target}-linux-api-headers
+pkgver=3.1.6
+_basekernel=3.1
+pkgrel=2
+pkgdesc="Kernel headers sanitized for use in userspace"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/libc"
+license=('GPL2')
+source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz"
+ "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz")
+md5sums=('d73df15ab1d36fe3c102755d8f42117f'
+ 'cb42276bca126c676c51d02d74bf7fe7')
+
+build() {
+ cd "${srcdir}/linux-${_basekernel}"
+
+ if [ "${_basekernel}" != "${pkgver}" ]; then
+ patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre"
+ fi
+
+ make mrproper
+ make headers_check
+}
+
+package() {
+ cd "${srcdir}/linux-${_basekernel}"
+ make ARCH=${ARCH} INSTALL_HDR_PATH=${pkgdir}${_sysroot}/usr headers_install
+}
diff --git a/extra/audacious/PKGBUILD b/extra/audacious/PKGBUILD
index 28686cfd4..4cd60ea5e 100644
--- a/extra/audacious/PKGBUILD
+++ b/extra/audacious/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 146058 2012-01-04 19:41:50Z bisson $
+# $Id: PKGBUILD 147042 2012-01-21 01:22:07Z bisson $
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
pkgname=audacious
-pkgver=3.1.2
+pkgver=3.2
pkgrel=1
-pkgdesc='Lightweight, GTK-based advanced audio player focused on audio quality'
+pkgdesc='Lightweight, advanced audio player focused on audio quality'
url='http://audacious-media-player.org/'
license=('GPL3')
arch=('i686' 'x86_64')
@@ -14,7 +14,7 @@ depends=('gtk3' 'dbus-glib' 'libguess' 'libsm' 'audacious-plugins'
'hicolor-icon-theme' 'gtk-update-icon-cache' 'desktop-file-utils')
optdepends=('unzip: zipped skins support')
source=("http://distfiles.audacious-media-player.org/${pkgname}-${pkgver}.tar.bz2")
-sha1sums=('ebaaefcfa291a1f97d2dae1b2d7f0cacb545dc7f')
+sha1sums=('3ebc4dcdcf5da960ba400078023e167e02105e84')
provides=('audacious-player')
replaces=('audacious-player')
diff --git a/extra/clutter-gtk2/PKGBUILD b/extra/clutter-gtk2/PKGBUILD
index 3b6d7c4f8..5a3fb66b0 100644
--- a/extra/clutter-gtk2/PKGBUILD
+++ b/extra/clutter-gtk2/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 113313 2011-03-08 12:29:48Z heftig $
+# $Id: PKGBUILD 147074 2012-01-21 15:12:46Z ibiru $
# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=clutter-gtk2
_pkgbasename=clutter-gtk
pkgver=0.10.8
-pkgrel=1
+pkgrel=2
pkgdesc="GTK clutter widget"
arch=('i686' 'x86_64')
url="http://clutter-project.org/"
@@ -13,13 +13,16 @@ license=('LGPL')
depends=('clutter' 'gtk2')
makedepends=('gobject-introspection' 'gtk-doc')
source=(http://www.clutter-project.org/sources/${_pkgbasename}/${pkgver%.*}/${_pkgbasename}-${pkgver}.tar.bz2
- gir.patch)
+ gir.patch
+ libm.patch)
sha256sums=('7867f951568871d9f68cbe8a3644fd53d2138f725b7ba61ffc0053eb64e80814'
- 'a7bb2e41b155a293fef3a58f9d0486788564a5da9373b00cc5209bdbdcb1ec66')
+ 'a7bb2e41b155a293fef3a58f9d0486788564a5da9373b00cc5209bdbdcb1ec66'
+ '7d5532702eb3c18fff2144f8d501f77d3d9c9c23e6904374f05634fea2d7a8ef')
build() {
cd "${srcdir}/${_pkgbasename}-${pkgver}"
patch -Np1 -i "$srcdir/gir.patch"
+ patch -Np1 -i "$srcdir/libm.patch"
autoreconf -i
./configure --prefix=/usr
make
diff --git a/extra/clutter-gtk2/libm.patch b/extra/clutter-gtk2/libm.patch
new file mode 100644
index 000000000..17e47ef40
--- /dev/null
+++ b/extra/clutter-gtk2/libm.patch
@@ -0,0 +1,39 @@
+diff -Nur clutter-gtk-0.10.8.orig/configure.ac clutter-gtk-0.10.8/configure.ac
+--- clutter-gtk-0.10.8.orig/configure.ac 2012-01-21 14:52:17.627228994 +0000
++++ clutter-gtk-0.10.8/configure.ac 2012-01-21 15:04:37.317308303 +0000
+@@ -57,6 +57,9 @@
+ LT_PREREQ([2.2.6])
+ LT_INIT([disable-static])
+
++AC_CHECK_LIBM
++AC_SUBST(LIBM)
++
+ m4_define([clutter_req_version], [1.2.0])
+ m4_define([gtk_req_version], [2.19.5])
+ m4_define([flavour_default], [x11])
+diff -Nur clutter-gtk-0.10.8.orig/examples/Makefile.am clutter-gtk-0.10.8/examples/Makefile.am
+--- clutter-gtk-0.10.8.orig/examples/Makefile.am 2012-01-21 14:52:17.600561077 +0000
++++ clutter-gtk-0.10.8/examples/Makefile.am 2012-01-21 15:00:04.549770032 +0000
+@@ -22,18 +22,18 @@
+
+ gtk_clutter_test_SOURCES = gtk-clutter-test.c
+ gtk_clutter_test_DEPENDENCIES = $(common_deps)
+-gtk_clutter_test_LDADD = $(common_ldadd)
++gtk_clutter_test_LDADD = $(common_ldadd) $(LIBM)
+
+ gtk_clutter_events_SOURCES = gtk-clutter-events.c
+ gtk_clutter_events_DEPENDENCIES = $(common_deps)
+-gtk_clutter_events_LDADD = $(common_ldadd)
++gtk_clutter_events_LDADD = $(common_ldadd) $(LIBM)
+
+ gtk_clutter_multistage_SOURCES = gtk-clutter-multistage.c
+ gtk_clutter_multistage_DEPENDENCIES = $(common_deps)
+-gtk_clutter_multistage_LDADD = $(common_ldadd)
++gtk_clutter_multistage_LDADD = $(common_ldadd) $(LIBM)
+
+ gtk_clutter_viewport_SOURCES = gtk-clutter-viewport.c
+ gtk_clutter_viewport_DEPENDENCIES = $(common_deps)
+-gtk_clutter_viewport_LDADD = $(common_ldadd)
++gtk_clutter_viewport_LDADD = $(common_ldadd) $(LIBM)
+
+ EXTRA_DIST = redhand.png
diff --git a/extra/gnome-shell/PKGBUILD b/extra/gnome-shell/PKGBUILD
index 219ad0edb..dd0ecc6be 100644
--- a/extra/gnome-shell/PKGBUILD
+++ b/extra/gnome-shell/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 146931 2012-01-19 10:12:16Z ibiru $
+# $Id: PKGBUILD 146998 2012-01-20 11:30:17Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Contributor: Flamelab <panosfilip@gmail.com
pkgname=gnome-shell
-pkgver=3.2.2
-pkgrel=2
+pkgver=3.2.2.1
+pkgrel=1
pkgdesc="The next generation GNOME Shell"
arch=('i686' 'x86_64')
url="http://live.gnome.org/GnomeShell"
@@ -15,16 +15,12 @@ optdepends=('network-manager-applet: shell integration for networkmanager')
options=('!libtool' '!emptydirs')
install=gnome-shell.install
groups=(gnome)
-source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
- revert-notificationdaemon-group-based-on-pid-and-titles.patch)
-sha256sums=('68967b9d58ad0551d7d3d28a276526a15faf1fc1d27f4624eb405663910e2eb8'
- '9e0337cd25d29d7215561d6fa30612d69c89fe7c27aa563a0c0b8a5b6f6cf12a')
+source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*.*}/$pkgname-$pkgver.tar.xz)
+sha256sums=('209363084ef2d58777d70d8430e4659b058cf854c4b9766f3019d69ffea34d6f')
build() {
cd "$srcdir/$pkgname-$pkgver"
- patch -Np1 -R -i "$srcdir/revert-notificationdaemon-group-based-on-pid-and-titles.patch"
-
PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \
--libexecdir=/usr/lib/gnome-shell \
--localstatedir=/var --disable-static \
diff --git a/extra/gnutls/PKGBUILD b/extra/gnutls/PKGBUILD
index 550c9a728..b06ef1e30 100644
--- a/extra/gnutls/PKGBUILD
+++ b/extra/gnutls/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 146275 2012-01-07 21:32:08Z andyrtr $
+# $Id: PKGBUILD 147016 2012-01-20 19:27:51Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgname=gnutls
-pkgver=3.0.11
+pkgver=3.0.12
pkgrel=1
pkgdesc="A library which provides a secure layer over a reliable transport layer"
arch=('i686' 'x86_64')
license=('GPL3' 'LGPL')
url="http://www.gnu.org/software/gnutls/"
install=gnutls.install
-options=('!libtool' '!zipman')
+options=('!libtool' '!zipman' '!makeflags')
depends=('gcc-libs' 'libtasn1' 'readline' 'zlib' 'nettle>=2.4' 'p11-kit')
makedepends=('valgrind')
source=(ftp://ftp.gnu.org/gnu/gnutls/${pkgname}-${pkgver}.tar.xz)
-md5sums=('ca3370b39f7910538a0d6c02bec7a142')
+md5sums=('685fe5c00786c04b39e9aac362fa0cac')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/iptraf-ng/PKGBUILD b/extra/iptraf-ng/PKGBUILD
index 0af3de2e1..b6f9dfcb9 100644
--- a/extra/iptraf-ng/PKGBUILD
+++ b/extra/iptraf-ng/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 121278 2011-04-30 08:10:51Z ibiru $
+# $Id: PKGBUILD 147066 2012-01-21 14:18:43Z ibiru $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: sh0 <mee@sh0.org>
pkgname=iptraf-ng
-pkgver=1.0.2
-pkgrel=2
+pkgver=1.1.0
+pkgrel=1
pkgdesc="A console-based network monitoring utility (a fork of original iptraf)"
url="https://fedorahosted.org/iptraf-ng/"
arch=('i686' 'x86_64')
@@ -12,20 +12,20 @@ depends=('ncurses')
license=('GPL2')
replaces=('iptraf')
options=('!libtool')
-source=(https://fedorahosted.org/releases/i/p/iptraf-ng/${pkgname}-${pkgver}.tar.gz)
-md5sums=('b2adbbbee4c269fb97a1951981c9047c')
+source=(https://fedorahosted.org/releases/i/p/$pkgname/$pkgname-$pkgver.tar.gz)
+md5sums=('79a3787027515f688a35173ffbee6432')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ sed s/ncurses5-config/ncursesw5-config/ -i configure.ac
+ autoreconf -fi
./configure --prefix=/usr --sysconfdir=/etc \
- --localstatedir=/var --disable-static
+ --localstatedir=/var
make CFLAGS="$CFLAGS"
}
package() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ cd "$srcdir/$pkgname-$pkgver"
make DESTDIR=$pkgdir install
- install -dm755 "${pkgdir}/var/lib/iptraf"
+ install -dm755 "$pkgdir/var/lib/iptraf"
}
-
-# vim: ts=2: ft=sh
diff --git a/extra/pixman/PKGBUILD b/extra/pixman/PKGBUILD
index 28754057a..d956f7741 100644
--- a/extra/pixman/PKGBUILD
+++ b/extra/pixman/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 142423 2011-11-09 10:25:24Z jgc $
+# $Id: PKGBUILD 147073 2012-01-21 15:12:23Z andyrtr $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=pixman
-pkgver=0.24.0
+pkgver=0.24.2
pkgrel=1
pkgdesc="Pixman library"
arch=(i686 x86_64)
@@ -12,7 +12,7 @@ license=('custom')
depends=('glibc')
options=('!libtool')
source=(http://xorg.freedesktop.org/releases/individual/lib/${pkgname}-${pkgver}.tar.bz2)
-sha1sums=('a3b73c3ea6cada20d705203a394f574aa69e2177')
+sha1sums=('233eed3cd16ee1b2a842140477503d2c68b74418')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/rxvt-unicode/ChangeLog b/extra/rxvt-unicode/ChangeLog
index f343b86cb..ba267d49e 100644
--- a/extra/rxvt-unicode/ChangeLog
+++ b/extra/rxvt-unicode/ChangeLog
@@ -1,3 +1,6 @@
+2012-01-22 Angel Velasquez <angvp@archlinux.org>
+ * Version bump to 9.15
+
2011-12-02 Angel Velasquez <angvp@archlinux.org>
* Version bump to 9.14
diff --git a/extra/rxvt-unicode/PKGBUILD b/extra/rxvt-unicode/PKGBUILD
index 2d2a89d30..3d976c041 100644
--- a/extra/rxvt-unicode/PKGBUILD
+++ b/extra/rxvt-unicode/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 145618 2011-12-24 05:53:53Z angvp $
+# $Id: PKGBUILD 147102 2012-01-22 04:46:15Z angvp $
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org
pkgname=rxvt-unicode
-pkgver=9.14
+pkgver=9.15
pkgrel=1
pkgdesc="An unicode enabled rxvt-clone terminal emulator (urxvt)"
arch=('i686' 'x86_64')
@@ -15,9 +15,9 @@ optdepends=('gtk2-perl: to use the urxvt-tabbed')
changelog=ChangeLog
source=(http://dist.schmorp.de/rxvt-unicode/${pkgname}-${pkgver}.tar.bz2 \
${pkgname}.desktop)
-md5sums=('022235a9a8b012c29e72c49177be6ce4'
+md5sums=('15595aa326167ac5eb68c28d95432faf'
'3de6c13126a45bc3bc9f6bba077a1311')
-sha1sums=('e303b7591225b06bc04e18a875461438c635014e'
+sha1sums=('e6fdf091860ecb458730dc68b0176f67f207a2f7'
'962aebc88982dbeb62a7c4a051ff567e015f61a0')
build() {
diff --git a/extra/scribus/PKGBUILD b/extra/scribus/PKGBUILD
index 4e81935e3..5af43d7ed 100644
--- a/extra/scribus/PKGBUILD
+++ b/extra/scribus/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 102618 2010-12-08 18:20:12Z dgriffiths $
+# $Id: PKGBUILD 146995 2012-01-20 06:04:00Z remy $
# Contributor: Ronald van Haren <ronald.archlinux.org>
# Contributor: tobias <tobias@archlinux.org>
# Contributor: Ben <ben@benmazer.net>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=scribus
-pkgver=1.3.9
+pkgver=1.4.0
pkgrel=1
pkgdesc="A desktop publishing program"
arch=('i686' 'x86_64')
@@ -16,10 +16,10 @@ depends=('libcups>=1.3.11' 'lcms>=1.18' 'qt' 'ghostscript>=8.70' \
'libart-lgpl>=2.3.20' 'python2' 'libxml2>=2.7.3' 'cairo' \
'desktop-file-utils' 'shared-mime-info')
makedepends=('cmake')
-options=(!libtool !makeflags)
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('a54dbf2e10cd88d683d0d34565d29378')
-sha1sums=('86bc4db2d8fbb91fe94f8535327991e9128c5862')
+options=(!libtool)
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz)
+md5sums=('ae19e62399941fb8e868d8e762caf494')
+sha1sums=('0e3afb98a56084c2938a8402df2d89214c42b809')
build() {
cd "${srcdir}"
diff --git a/extra/sdl_image/PKGBUILD b/extra/sdl_image/PKGBUILD
index 74a1b777c..7643e2ba8 100644
--- a/extra/sdl_image/PKGBUILD
+++ b/extra/sdl_image/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 146687 2012-01-16 11:34:55Z heftig $
+# $Id: PKGBUILD 147083 2012-01-21 17:53:25Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=sdl_image
-pkgver=1.2.11
+pkgver=1.2.12
pkgrel=1
pkgdesc="A simple library to load images of various formats as SDL surfaces"
arch=('i686' 'x86_64')
@@ -13,7 +13,7 @@ depends=('sdl>=1.2.13' 'libpng' 'libjpeg>=7' 'libtiff' 'zlib')
options=('!libtool')
url="http://www.libsdl.org/projects/SDL_image/"
source=(http://www.libsdl.org/projects/SDL_image/release/SDL_image-$pkgver.tar.gz)
-md5sums=('1210d7a7e87ab95abebb4f3e79a0fd31')
+md5sums=('a0f9098ebe5400f0bdc9b62e60797ecb')
build() {
cd "$srcdir/SDL_image-$pkgver"
diff --git a/libre/kdenetwork-libre/PKGBUILD b/libre/kdenetwork-libre/PKGBUILD
new file mode 100644
index 000000000..14c6448e5
--- /dev/null
+++ b/libre/kdenetwork-libre/PKGBUILD
@@ -0,0 +1,126 @@
+# $Id: PKGBUILD 144733 2011-12-08 09:21:25Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdenetwork
+pkgname=('kdenetwork-filesharing'
+ 'kdenetwork-kdnssd'
+ 'kdenetwork-kget'
+ 'kdenetwork-kopete-libre'
+ 'kdenetwork-kppp'
+ 'kdenetwork-krdc'
+ 'kdenetwork-krfb')
+pkgver=4.7.4
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdenetwork')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'speex' 'ortp' 'libotr'
+ 'qca-ossl' 'kdebase-workspace' 'kdebase-lib' 'libvncserver' 'libmsn' 'ppp'
+ 'v4l-utils' 'libidn' 'rdesktop' 'qimageblitz' 'libxdamage' 'libgadu'
+ 'telepathy-qt4' 'libktorrent' 'libmms' 'mediastreamer')
+source=("http://repo.parabolagnulinux.org/other/${pkgbase}-libre-${pkgver}.tar.xz")
+sha1sums=('2537c5286a1464008e05974a3fd55ae00740c843')
+
+# Based on http://bzr.trisquel.info/package-helpers/trunk/annotate/head%3A/helpers/natty/make-kdenetwork, revision 34.
+mksource() {
+ [ -f "${pkgbase}-${pkgver}.tar.bz2" ] || wget "http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ tar xf "${pkgbase}-${pkgver}.tar.bz2"
+ cd "${pkgbase}-${pkgver}"
+ sed -i 's/Skype protocol" ON/Skype protocol" OFF/g' kopete/protocols/CMakeLists.txt
+ rm -rf kopete/protocols/skype
+ sed 's/, Skype//' -i ./doc/kopete/index.docbook
+ cd ..
+ tar cJf "${pkgbase}-libre-${pkgver}.tar.xz" "${pkgbase}-${pkgver}"
+}
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMOZPLUGIN_INSTALL_DIR=/usr/lib/mozilla/plugins/ \
+ -DWITH_Xmms=OFF \
+ -DWITH_LibMeanwhile=OFF
+ make
+}
+
+package_kdenetwork-filesharing() {
+ pkgdesc='Konqueror properties dialog plugin to share a directory with the local network'
+ depends=('kdelibs' 'smbclient')
+ install='kdenetwork.install'
+ cd $srcdir/build/filesharing
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kdnssd() {
+ pkgdesc='Monitors the network for DNS-SD services'
+ depends=('kdelibs')
+ cd $srcdir/build/kdnssd
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kget() {
+ pkgdesc='Download Manager'
+ depends=('kdebase-workspace' 'kdebase-lib' 'libktorrent' 'libmms')
+ optdepends=('python2: YouTube plugin')
+ url="http://kde.org/applications/internet/kget/"
+ install='kdenetwork.install'
+ cd $srcdir/build/kget
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kget
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kopete-libre() {
+ pkgdesc='Instant Messenger'
+ depends=('kdebase-runtime' 'kdepimlibs' 'qca-ossl' 'libotr' 'libmsn'
+ 'libidn' 'qimageblitz' 'v4l-utils' 'libgadu' 'mediastreamer')
+ conflicts=('kdenetwork-kopete')
+ provides=("kdenetwork-kopete=${pkgver}")
+ replaces=('kdenetwork-kopete')
+ url="http://kde.org/applications/internet/kopete/"
+ install='kdenetwork.install'
+ cd $srcdir/build/kopete
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kopete
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kppp() {
+ pkgdesc='Internet Dial-Up Tool'
+ depends=('kdebase-runtime' 'ppp')
+ url="http://kde.org/applications/internet/kppp/"
+ install='kdenetwork.install'
+ cd $srcdir/build/kppp
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kppp
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-krdc() {
+ pkgdesc='Remote Desktop Client'
+ depends=('kdebase-runtime' 'libvncserver' 'rdesktop' 'telepathy-qt4')
+ optdepends=('kdebase-keditbookmarks: to edit bookmarks')
+ url="http://kde.org/applications/internet/krdc/"
+ cd $srcdir/build/krdc
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/krdc
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-krfb() {
+ pkgdesc='Desktop Sharing'
+ # note on libxdamage:
+ # not detected by namcap because libgl depends on it
+ # but nvidia providing libgl does not depend on libxdamage
+ depends=('kdebase-runtime' 'libvncserver' 'libxdamage')
+ cd $srcdir/build/krfb
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/krfb
+ make DESTDIR=$pkgdir install
+}
diff --git a/libre/kdenetwork-libre/kdenetwork.install b/libre/kdenetwork-libre/kdenetwork.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/libre/kdenetwork-libre/kdenetwork.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/libre/kdeutils-libre/PKGBUILD b/libre/kdeutils-libre/PKGBUILD
index 4337580e3..16fff37d3 100644
--- a/libre/kdeutils-libre/PKGBUILD
+++ b/libre/kdeutils-libre/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 139746 2011-10-04 21:03:39Z andrea $
+# $Id: PKGBUILD 146715 2012-01-16 19:50:44Z dreisner $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -16,8 +16,8 @@ pkgname=('kdeutils-ark-libre'
'kdeutils-printer-applet'
'kdeutils-superkaramba'
'kdeutils-sweeper')
-pkgver=4.7.2
-pkgrel=1
+pkgver=4.7.4
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
@@ -26,27 +26,37 @@ makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebase-lib' 'kdebase-workspace'
'kdebindings-python' 'system-config-printer-common' 'libarchive' 'qimageblitz'
'qjson')
source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
-sha1sums=('52ce9b6b5f2c20475f46b6f7378ca4c530df37b4')
+sha1sums=('4630f01f36558eb5494fc562086fbd4e488e411e')
build() {
- cd ${srcdir}
+ cd "${srcdir}"/${pkgbase}-${pkgver}
+
+ # Use Python2
+ sed -i 's|/usr/bin/python|/usr/bin/python2|' \
+ kcharselect/kcharselect-generate-datafile.py \
+ superkaramba/examples/richtext/rtext.py
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2|' \
+ printer-applet/{authconn,debug,monitor,printer-applet,statereason}.py
+
+ cd "${srcdir}"
mkdir build
cd build
cmake ../${pkgbase}-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=ON \
- -DCMAKE_INSTALL_PREFIX=/usr
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2
make
}
package_kdeutils-ark-libre() {
pkgdesc='Archiving Tool'
depends=('kdebase-runtime' 'kdebase-lib' 'libarchive')
- optdepends=('p7zip' 'zip')
+ optdepends=('p7zip' 'zip' 'unzip' 'ununrar')
+ provides=("kdeutils-ark=$pkgver")
+ replaces=('kdeutils-ark')
+ conflicts=('kdeutils-ark')
url="http://kde.org/applications/utilities/ark/"
- provides=("kdeutils-ark=$pkgver")
- replaces=('kdeutils-ark')
- conflicts=('kdeutils-ark')
cd $srcdir/build/ark
make DESTDIR=$pkgdir install
cd $srcdir/build/ark/doc
@@ -162,9 +172,6 @@ package_kdeutils-printer-applet() {
make DESTDIR=$pkgdir install
cd $srcdir/build/printer-applet/doc
make DESTDIR=$pkgdir install
-
- # Use the python2 executable
- find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
}
package_kdeutils-superkaramba() {
diff --git a/libre/kdeutils-libre/rePKGBUILD b/libre/kdeutils-libre/rePKGBUILD
index a8d78bede..9dad18cf0 100644
--- a/libre/kdeutils-libre/rePKGBUILD
+++ b/libre/kdeutils-libre/rePKGBUILD
@@ -2,8 +2,9 @@
source PKGBUILD
#CARCH=x86_64
unset build package md5sums source
+pkgname=("kdeutils-ark-libre")
_repo=extra # Put the repo here
-_mirror=ftp://ftp.archlinux.org # Put mirror here
+_mirror=ftp://mirrors.kernel.org/archlinux # Put mirror here
source=(PKGBUILD
"${_mirror}/${_repo}/os/${CARCH}/${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT"
# files for pkg modifications below this line
@@ -18,15 +19,15 @@ build() {
}
package_kdeutils-ark-libre() {
- pkgdesc='Archiving Tool'
- depends=('kdebase-runtime' 'kdebase-lib' 'libarchive')
- optdepends=('p7zip' 'zip')
- url="http://kde.org/applications/utilities/ark/"
- provides=("kdeutils-ark=$pkgver")
- replaces=('kdeutils-ark')
- conflicts=('kdeutils-ark')
- find ${srcdir} -maxdepth 1 -type l -delete
- cp -a ${srcdir}/* ${pkgdir}
+ pkgdesc='Archiving Tool'
+ depends=('kdebase-runtime' 'kdebase-lib' 'libarchive')
+ optdepends=('p7zip' 'zip' 'unzip' 'ununrar')
+ provides=("kdeutils-ark=$pkgver")
+ replaces=('kdeutils-ark')
+ conflicts=('kdeutils-ark')
+ url="http://kde.org/applications/utilities/ark/"
+ find ${srcdir} -maxdepth 1 -type l -delete
+ cp -a ${srcdir}/* ${pkgdir}
}
diff --git a/libre/linux-libre/Kbuild b/libre/linux-libre/Kbuild
new file mode 100644
index 000000000..8a9d7dceb
--- /dev/null
+++ b/libre/linux-libre/Kbuild
@@ -0,0 +1,19 @@
+# Fail on warnings - also for files referenced in subdirs
+# -Werror can be disabled for specific files using:
+# CFLAGS_<file.o> := -Wno-error
+subdir-ccflags-y := -Wno-error
+
+# platform specific definitions
+include arch/mips/Kbuild.platforms
+obj-y := $(platform-y)
+
+# make clean traverses $(obj-) without having included .config, so
+# everything ends up here
+obj- := $(platform-)
+
+# mips object files
+# The object files are linked as core-y files would be linked
+
+obj-y += kernel/
+obj-y += mm/
+obj-y += math-emu/
diff --git a/libre/linux-libre/Kbuild.platforms b/libre/linux-libre/Kbuild.platforms
new file mode 100644
index 000000000..90a226888
--- /dev/null
+++ b/libre/linux-libre/Kbuild.platforms
@@ -0,0 +1,6 @@
+# All platforms listed in alphabetic order
+
+platforms += loongson
+
+# include the platform specific files
+include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms))
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index e7668ca29..3bd2c7fe6 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -8,48 +8,42 @@ pkgbase=linux-libre
pkgname=('linux-libre' 'linux-libre-headers' 'linux-libre-docs') # Build stock -LIBRE kernel
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux-libre}
-<<<<<<< HEAD
-_basekernel=3.1
-pkgver=${_basekernel}.7
-=======
_basekernel=3.2
-pkgver=${_basekernel}
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
+pkgver=${_basekernel}.1
pkgrel=1
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz"
-# "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz"
+ "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz"
+ "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${pkgver}-libre-lemote_0lxo_mipsel.tar.bz2"
# the main kernel config files
'config.i686' 'config.x86_64'
# standard config files for mkinitcpio ramdisk
"${pkgname}.preset"
+ 'Kbuild'
+ 'Kbuild.platforms'
'boot-logo.patch'
'change-default-console-loglevel.patch'
'i915-fix-ghost-tv-output.patch'
- 'usb-add-reset-resume-quirk-for-several-webcams.patch')
-md5sums=('d73df15ab1d36fe3c102755d8f42117f'
- '47e4a10500ad90694b7f42fb447ab810'
- '267ea59695619730032f89ac70bf9391'
- '5a415fc0c864dc3f5c4afa63f1506c52'
- 'a8a3843046926eb7ab81312cd438c5c5'
- '04b21c79df0a952c22d681dd4f4562df'
- '9d3c56a4b999c8bfbd4018089a62f662'
- '263725f20c0b9eb9c353040792d644e5'
- 'a50c9076012cb2dda49952dc6ec3e9c1'
- '52d41fa61e80277ace2b994412a0c856')
+ 'i915-gpu-finish.patch')
build() {
cd "${srcdir}/linux-${_basekernel}"
-# patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre"
+ if [ "${_basekernel}" != "${pkgver}" ]; then
+ patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre"
+ fi
# Add freedo as boot logo
patch -Np1 -i "${srcdir}/boot-logo.patch"
+ # fix FS#27883
+ # drm/i915: Only clear the GPU domains upon a successful finish
+ patch -Np1 -i "${srcdir}/i915-gpu-finish.patch"
+
# Some chips detect a ghost TV output
# mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html
# Arch Linux bug report: FS#19234
@@ -59,16 +53,26 @@ build() {
# needed.
patch -Np1 -i "${srcdir}/i915-fix-ghost-tv-output.patch"
- # Add the USB_QUIRK_RESET_RESUME for several webcams
- # FS#26528
- patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch"
-
# set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param)
# remove this when a Kconfig knob is made available by upstream
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
- cat "${srcdir}/config.${CARCH}" > ./.config # simpler
+ if [ "$CARCH" == "mips64el" ]; then
+ sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre|" Makefile
+ msg2 "Adding loongson-community patches"
+ patch -Np1 -i ${srcdir}/${_basekernel}.*-*-loongson-community.patch
+ patch -Np0 -i "${srcdir}/lxo-config.patch"
+
+# ensure N32, add localversion and remove uevent helper as per
+# https://git.kernel.org/?p=linux/hotplug/udev.git;a=blob_plain;f=README
+ sed -i -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \
+ -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \
+ -e "s|CONFIG_UEVENT_HELPER_PATH=.*|CONFIG_UEVENT_HELPER_PATH=\"\"|g" \
+ -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"-LIBRE\"|g" ./.config
+ else
+ cat "${srcdir}/config.${CARCH}" > ./.config # simpler
+ fi
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
@@ -98,7 +102,11 @@ build() {
yes "" | make config
# build!
- make ${MAKEFLAGS} bzImage modules
+ if [ "$CARCH" == "mips64el" ]; then
+ make ${MAKEFLAGS} vmlinuz modules
+ else
+ make ${MAKEFLAGS} bzImage modules
+ fi
}
package_linux-libre() {
@@ -115,13 +123,19 @@ package_linux-libre() {
cd "${srcdir}/linux-${_basekernel}"
KARCH=x86
+ [ $CARCH = "mips64el" ] && KARCH=mips
# get kernel version
_kernver="$(make kernelrelease)"
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
make INSTALL_MOD_PATH="${pkgdir}" modules_install
- cp arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgname}"
+
+ if [ "$CARCH" == "mips64el" ]; then
+ cp vmlinuz "${pkgdir}/boot/vmlinuz-${pkgname}"
+ else
+ cp "arch/${KARCH}/boot/bzImage" "${pkgdir}/boot/vmlinuz-${pkgname}"
+ fi
# add vmlinux
install -D -m644 vmlinux "${pkgdir}/usr/src/linux-${_kernver}/vmlinux"
@@ -140,6 +154,12 @@ package_linux-libre() {
-e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \
-i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
+# mkinitcpio 0.7 relies on bzImage to find the kernel version
+ if [ "$CARCH" == "mips64el" ]; then
+ sed -e "s|ALL_kver=.*|ALL_kver=\"${_kernver}\"|g" \
+ -i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
+ fi
+
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
@@ -159,6 +179,15 @@ package_linux-libre-headers() {
conflicts=('kernel26-headers' 'kernel26-libre-headers' 'linux-headers')
replaces=('kernel26-headers' 'kernel26-libre-headers' 'linux-headers')
+ KARCH=x86
+ [ $CARCH = "mips64el" ] && KARCH=mips
+
+# In case of repackaging this is empty
+ if [ -z "${_kernver}" ]; then
+ cd ${srcdir}/linux-$pkgver
+ _kernver="$(make kernelrelease)"
+ fi
+
mkdir -p "${pkgdir}/lib/modules/${_kernver}"
cd "${pkgdir}/lib/modules/${_kernver}"
@@ -180,13 +209,19 @@ package_linux-libre-headers() {
done
# copy arch includes for external modules
- mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/x86"
- cp -a arch/x86/include "${pkgdir}/usr/src/linux-${_kernver}/arch/x86/"
+ mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}"
+ cp -a "arch/${KARCH}/include" "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
# copy files necessary for later builds
cp Module.symvers "${pkgdir}/usr/src/linux-${_kernver}"
cp -a scripts "${pkgdir}/usr/src/linux-${_kernver}"
+ if [ "$CARCH" = "mips64el" ]; then
+ cp "arch/${KARCH}/Kbuild" "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
+ cp "arch/${KARCH}/loongson" "${pkgdir}/usr/src/linux-${_kernver}/arch/${KARCH}/"
+ cp "${srcdir}/Kbuild.platforms" "${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/"
+ fi
+
# fix permissions on scripts dir
chmod og-w -R "${pkgdir}/usr/src/linux-${_kernver}/scripts"
mkdir -p "${pkgdir}/usr/src/linux-${_kernver}/.tmp_versions"
@@ -281,7 +316,12 @@ package_linux-libre-headers() {
done
# remove unneeded architectures
- rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
+ rm -rf "${pkgdir}"/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
+ if [ "$CARCH" = "mips64el" ]; then
+ rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
+ else
+ rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/mips
+ fi
}
package_linux-libre-docs() {
@@ -300,14 +340,15 @@ package_linux-libre-docs() {
# remove a file already in linux package
rm -f "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
}
-<<<<<<< HEAD
-=======
md5sums=('27c641c4f6785fc647cdd3e44963a55c'
- 'eb37c323f6993d6cc963c61a1f482956'
- '4e9be096386838d247672963f9af9ea8'
+ '6e0c99536652e7deb71acbadc980b586'
+ 'fb12372c5c7bc4e5328b38953616c7a5'
+ '92f62a90c1df8d74704a510d28146c52'
+ '576ba68b171efd4a3333736c30f334ef'
'a8a3843046926eb7ab81312cd438c5c5'
+ '2967cecc3af9f954ccc822fd63dca6ff'
+ '8267264d9a8966e57fdacd1fa1fc65c4'
'04b21c79df0a952c22d681dd4f4562df'
'9d3c56a4b999c8bfbd4018089a62f662'
'263725f20c0b9eb9c353040792d644e5'
- '52d41fa61e80277ace2b994412a0c856')
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
+ '4cd79aa147825837dc8bc9f6b736c0a0')
diff --git a/libre/linux-libre/config.i686 b/libre/linux-libre/config.i686
index 71783fa50..9aace04bc 100644
--- a/libre/linux-libre/config.i686
+++ b/libre/linux-libre/config.i686
@@ -1,10 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-<<<<<<< HEAD
-# Linux/i386 3.1.6-1 Kernel Configuration
-=======
# Linux/i386 3.2.0 Kernel Configuration
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
@@ -1297,7 +1293,8 @@ CONFIG_EXTRA_FIRMWARE=""
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=m
CONFIG_REGMAP_SPI=y
-CONFIG_CONNECTOR=m
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
CONFIG_MTD=m
CONFIG_MTD_TESTS=m
CONFIG_MTD_REDBOOT_PARTS=m
@@ -2269,13 +2266,11 @@ CONFIG_CARL9170_WPC=y
CONFIG_ATH6KL=m
# CONFIG_ATH6KL_DEBUG is not set
CONFIG_B43=m
-CONFIG_B43_BCMA=y
CONFIG_B43_SSB=y
CONFIG_B43_PCI_AUTOSELECT=y
CONFIG_B43_PCICORE_AUTOSELECT=y
CONFIG_B43_PCMCIA=y
CONFIG_B43_SDIO=y
-CONFIG_B43_BCMA_PIO=y
CONFIG_B43_PIO=y
CONFIG_B43_PHY_N=y
CONFIG_B43_PHY_LP=y
@@ -2294,7 +2289,10 @@ CONFIG_B43LEGACY_PIO=y
CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
# CONFIG_B43LEGACY_DMA_MODE is not set
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_BRCMFMAC is not set
+CONFIG_BRCMUTIL=m
+CONFIG_BRCMSMAC=m
+CONFIG_BRCMFMAC=m
+# CONFIG_BRCMDBG is not set
CONFIG_HOSTAP=m
CONFIG_HOSTAP_FIRMWARE=y
# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
@@ -3318,11 +3316,7 @@ CONFIG_BCMA_POSSIBLE=y
#
# Broadcom specific AMBA
#
-CONFIG_BCMA=m
-CONFIG_BCMA_BLOCKIO=y
-CONFIG_BCMA_HOST_PCI_POSSIBLE=y
-CONFIG_BCMA_HOST_PCI=y
-# CONFIG_BCMA_DEBUG is not set
+# CONFIG_BCMA is not set
#
# Multifunction device drivers
diff --git a/libre/linux-libre/config.x86_64 b/libre/linux-libre/config.x86_64
index df37a6f20..42aafc2bb 100644
--- a/libre/linux-libre/config.x86_64
+++ b/libre/linux-libre/config.x86_64
@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
-# Linux/x86_64 3.1.6-1 Kernel Configuration
+# Linux/x86_64 3.2.0 Kernel Configuration
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
@@ -1252,7 +1252,8 @@ CONFIG_SYS_HYPERVISOR=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=m
CONFIG_REGMAP_SPI=y
-CONFIG_CONNECTOR=m
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
CONFIG_MTD=m
CONFIG_MTD_TESTS=m
CONFIG_MTD_REDBOOT_PARTS=m
@@ -2151,13 +2152,11 @@ CONFIG_CARL9170_WPC=y
CONFIG_ATH6KL=m
# CONFIG_ATH6KL_DEBUG is not set
CONFIG_B43=m
-CONFIG_B43_BCMA=y
CONFIG_B43_SSB=y
CONFIG_B43_PCI_AUTOSELECT=y
CONFIG_B43_PCICORE_AUTOSELECT=y
CONFIG_B43_PCMCIA=y
CONFIG_B43_SDIO=y
-CONFIG_B43_BCMA_PIO=y
CONFIG_B43_PIO=y
CONFIG_B43_PHY_N=y
CONFIG_B43_PHY_LP=y
@@ -2176,7 +2175,10 @@ CONFIG_B43LEGACY_PIO=y
CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
# CONFIG_B43LEGACY_DMA_MODE is not set
# CONFIG_B43LEGACY_PIO_MODE is not set
-# CONFIG_BRCMFMAC is not set
+CONFIG_BRCMUTIL=m
+CONFIG_BRCMSMAC=m
+CONFIG_BRCMFMAC=m
+# CONFIG_BRCMDBG is not set
CONFIG_HOSTAP=m
CONFIG_HOSTAP_FIRMWARE=y
# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
@@ -3163,11 +3165,7 @@ CONFIG_BCMA_POSSIBLE=y
#
# Broadcom specific AMBA
#
-CONFIG_BCMA=m
-CONFIG_BCMA_BLOCKIO=y
-CONFIG_BCMA_HOST_PCI_POSSIBLE=y
-CONFIG_BCMA_HOST_PCI=y
-# CONFIG_BCMA_DEBUG is not set
+# CONFIG_BCMA is not set
#
# Multifunction device drivers
diff --git a/libre/linux-libre/i915-gpu-finish.patch b/libre/linux-libre/i915-gpu-finish.patch
new file mode 100644
index 000000000..5840c9181
--- /dev/null
+++ b/libre/linux-libre/i915-gpu-finish.patch
@@ -0,0 +1,55 @@
+commit 389a55581e30607af0fcde6cdb4e54f189cf46cf
+Author: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue Nov 29 15:12:16 2011 +0000
+
+ drm/i915: Only clear the GPU domains upon a successful finish
+
+ By clearing the GPU read domains before waiting upon the buffer, we run
+ the risk of the wait being interrupted and the domains prematurely
+ cleared. The next time we attempt to wait upon the buffer (after
+ userspace handles the signal), we believe that the buffer is idle and so
+ skip the wait.
+
+ There are a number of bugs across all generations which show signs of an
+ overly haste reuse of active buffers.
+
+ Such as:
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=29046
+ https://bugs.freedesktop.org/show_bug.cgi?id=35863
+ https://bugs.freedesktop.org/show_bug.cgi?id=38952
+ https://bugs.freedesktop.org/show_bug.cgi?id=40282
+ https://bugs.freedesktop.org/show_bug.cgi?id=41098
+ https://bugs.freedesktop.org/show_bug.cgi?id=41102
+ https://bugs.freedesktop.org/show_bug.cgi?id=41284
+ https://bugs.freedesktop.org/show_bug.cgi?id=42141
+
+ A couple of those pre-date i915_gem_object_finish_gpu(), so may be
+ unrelated (such as a wild write from a userspace command buffer), but
+ this does look like a convincing cause for most of those bugs.
+
+ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+ Cc: stable@kernel.org
+ Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+ Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
+
+diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
+index d560175..036bc58 100644
+--- a/drivers/gpu/drm/i915/i915_gem.c
++++ b/drivers/gpu/drm/i915/i915_gem.c
+@@ -3087,10 +3087,13 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj)
+ return ret;
+ }
+
++ ret = i915_gem_object_wait_rendering(obj);
++ if (ret)
++ return ret;
++
+ /* Ensure that we invalidate the GPU's caches and TLBs. */
+ obj->base.read_domains &= ~I915_GEM_GPU_DOMAINS;
+-
+- return i915_gem_object_wait_rendering(obj);
++ return 0;
+ }
+
+ /**
diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install
index bab05ffce..f08840c94 100644
--- a/libre/linux-libre/linux-libre.install
+++ b/libre/linux-libre/linux-libre.install
@@ -2,11 +2,7 @@
# arg 2: the old package version
KERNEL_NAME=
-<<<<<<< HEAD
-KERNEL_VERSION=3.1.6-1-LIBRE
-=======
-KERNEL_VERSION=3.2.0-1-LIBRE
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
+KERNEL_VERSION=3.2.1-1-LIBRE
post_install () {
# updating module dependencies
@@ -49,7 +45,6 @@ post_upgrade() {
if findmnt --fstab -uno SOURCE /boot &>/dev/null && ! mountpoint -q /boot; then
echo "WARNING: /boot appears to be a separate partition but is not mounted."
- echo " You probably just broke your system. Congratulations."
fi
# updating module dependencies
diff --git a/libre/mozilla-devscripts/PKGBUILD b/libre/mozilla-devscripts/PKGBUILD
new file mode 100644
index 000000000..faa4b3a2a
--- /dev/null
+++ b/libre/mozilla-devscripts/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Michał Masłowski <mtjm@mtjm.eu>
+
+pkgname=mozilla-devscripts
+pkgver=0.30
+pkgrel=1.1
+pkgdesc="Development scripts used by Debian Mozilla's addons packages"
+arch=("any")
+url="http://packages.debian.org/source/unstable/mozilla-devscripts"
+license=('GPL' 'custom')
+depends=("python2" "zip" "unzip")
+_debrepo=http://ftp.debian.org/debian/pool/main/
+source=("${_debrepo}/m/${pkgname}/${pkgname}_${pkgver}.dsc"
+ "${_debrepo}/m/${pkgname}/${pkgname}_${pkgver}.tar.gz")
+md5sums=("6e517cef69c115356eb808866fd29268"
+ "4e95fb93d0d93b56543d2a789d457309")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ # Adapt it to Arch's Python naming.
+ find . -type f | xargs -L1 sed -i "s:#!/usr/bin/python:#!/usr/bin/python2:"
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ # The Makefile expects the system to have standard Python name, so
+ # do this directly here.
+ python2 setup.py install --root="$pkgdir/"
+ install -Dm644 debian/copyright "${pkgdir}/usr/share/licenses/${pkgname}/copyright"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre/texlive-bin-libre/PKGBUILD b/libre/texlive-bin-libre/PKGBUILD
index b5fb37c85..0074fb878 100644
--- a/libre/texlive-bin-libre/PKGBUILD
+++ b/libre/texlive-bin-libre/PKGBUILD
@@ -3,12 +3,12 @@
# Contributor: francois <francois.archlinux.org>
pkgname=texlive-bin-libre
-pkgver=2011.1
+pkgver=2011.3
_luatex_ver=0.70.1
-pkgrel=5.2
+pkgrel=1
pkgdesc="TeX Live binaries"
license=('GPL')
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
depends=('t1lib' 'gd' 'poppler>=0.18.2' 'libsigsegv' 'zziplib')
makedepends=('perl' 'clisp' 'ffcall' 'pkg-config')
optdepends=('ed: for texconfig')
@@ -21,9 +21,8 @@ install="texlive.install"
source=('texmf.cnf'
'fix-fontforge-encoding.patch'
'09-texlive-fonts.conf'
- 'archlinux-build.patch'
- 'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-source-20110724.tar.xz'
- 'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-texmf-20110724.tar.xz'
+ 'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-source-20111210.tar.xz'
+ 'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-texmf-20111210.tar.xz'
# "http://foundry.supelec.fr/gf/download/frsrelease/392/1730/luatex-beta-${_luatex_ver}.tar.bz2"
'http://ftp.archlinux.org/other/texlive/luatex-svn4356.tar.xz'
)
@@ -41,19 +40,18 @@ backup=(etc/texmf/web2c/texmf.cnf \
etc/texmf/dvipdfm/config/config \
etc/texmf/xdvi/XDvi)
-md5sums=('ff30d6813babd2e41c414365eea9c147'
+md5sums=('220a4f4cc0d915bf8fcbcb553dcee1ae'
'bfb9716aa00c86c08cd31e5b32edeb98'
'393a4bf67adc7ca5df2b386759d1a637'
- '94ef5571a54262790ab64d6d044dd10c'
- '58e8ab64188eaf15897b7acf472dca9f'
- '9f7ae1aa24afd9e34289ac10a8f9e87b'
+ 'c7bb38c0ab30c2b64cf4cf83a736b35c'
+ '5d8f06a3683ce88a3c33e15f5ba6a858'
'e7f0197559ef865d8c01683dab3b8526')
build() {
cd $srcdir
# Remove bundled packages available in Parabola or not needed.
rm -rf source/{extra/{djgpp,xz},libs/{freetype2,gd,xpdf,libpng,zziplib,zlib,t1lib,poppler},utils/dialog}
- rm -rf luatex-beta-0.70.1/source/libs/{libpng,zziplib,zlib,poppler}
+ rm -rf luatex/source/libs/{libpng,zziplib,zlib,poppler}
# Building LuaTeX
# cd luatex-beta-${_luatex_ver}
cd luatex
@@ -84,8 +82,7 @@ build() {
--with-system-zlib \
--with-system-zziplib \
--with-system-t1lib \
- --disable-static \
- --enable-shared \
+ --disable-shared \
--disable-largefile \
--disable-ipc \
--without-mf-x-toolkit \
@@ -103,11 +100,6 @@ build() {
#############################################################
### configure
cd source
- patch -Np1 -i ${srcdir}/archlinux-build.patch
- for _dir in texk/tetex texk/texlive texk/tex4htk \
- utils/ps2eps utils/chktex utils/psutils utils/xindy; do
- (cd ${_dir} && automake) || true
- done
## prevent compiling Xdvi with libXp
sed -i~ 's|-lXp ||' texk/xdvik/configure
test ! -d Work && mkdir Work
@@ -115,6 +107,7 @@ build() {
echo "--> Initial configuration..."
# we use temporary prefix to avoid messing the existing $pkgdir/usr/share/texmf tree
../configure --prefix=/usr -C \
+ --sysconfdir=/etc \
--datarootdir=/usr/share \
--datadir=/usr/share \
--mandir=/usr/share/man \
@@ -174,16 +167,6 @@ package() {
install -d -m755 $pkgdir/etc/texmf/xdvi
install -d -m755 $pkgdir/etc/fonts/conf.avail
install -m644 $srcdir/09-texlive-fonts.conf $pkgdir/etc/fonts/conf.avail/
- # replace upstream texmf.cnf with ours
- rm -f $pkgdir/usr/share/texmf/web2c/texmf.cnf
- install -m644 $srcdir/texmf.cnf $pkgdir/etc/texmf/web2c/texmf.cnf
- # since the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
- # we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
- ln -s /etc/texmf/web2c/texmf.cnf $pkgdir/usr/share/texmf/web2c/texmf.cnf
- # fix location of TEXMFCACHE for luatools
- sed -i 's#texlive2010#texlive#' $pkgdir/usr/share/texmf/web2c/texmfcnf.lua
- ## remove aleph from fmtutil.cnf
- sed -i -e '/aleph/d' $pkgdir/usr/share/texmf/web2c/fmtutil.cnf
# move man files to /usr/share/man
for i in 1 5; do
install -d -m755 $pkgdir/usr/share/man/man$i
@@ -237,7 +220,18 @@ package() {
echo "-------------------------------------------------------"
cd Work
make DESTDIR=${pkgdir} texmf=$pkgdir/usr/share/texmf install
- rm -rf ${pkgdir}/usr/{texmf,texmf-dist}
+ rm -rf ${pkgdir}/usr/{texmf,share/texmf-dist}
+
+ # replace upstream texmf.cnf with ours
+ rm -f $pkgdir/usr/share/texmf/web2c/texmf.cnf
+ install -m644 $srcdir/texmf.cnf $pkgdir/etc/texmf/web2c/texmf.cnf
+ # since the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
+ # we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
+ ln -sf /etc/texmf/web2c/texmf.cnf $pkgdir/usr/share/texmf/web2c/texmf.cnf
+ # fix location of TEXMFCACHE for luatools
+ sed -i 's#texlive2010#texlive#' $pkgdir/usr/share/texmf/web2c/texmfcnf.lua
+ ## remove aleph from fmtutil.cnf
+ sed -i -e '/aleph/d' $pkgdir/usr/share/texmf/web2c/fmtutil.cnf
## install luatex binary
cd $srcdir/luatex/build/texk/web2c
@@ -255,14 +249,20 @@ package() {
LD_PRELOAD="${pkgdir}/usr/lib/libkpathsea.so.6" PATH="$PATH:${pkgdir}/usr/bin" texlinks -f $pkgdir/usr/share/texmf/web2c/fmtutil.cnf $pkgdir/usr/bin/
#############################################################
# remove dangling symlinks
- _bibtexextra_scripts="bibexport"
+ _bibtexextra_scripts="
+bibexport
+urlbst
+"
_core_scripts="
afm2afm
arlatex
autoinst
bundledoc
cmap2enc
+ctanify
+ctanupload
de-macro
+dosepsbin
dviasm
epstopdf
findhyph
@@ -275,6 +275,8 @@ latexdiff-vc
latexmk
latexrevise
listings-ext.sh
+match_parens
+mf2pt1
mkjobtexmf
mkluatexfontdb
mkt1font
@@ -306,6 +308,7 @@ texcount
texdef
texdiff
texdirflatten
+texliveonfly
texloganalyser
thumbpdf
vpl2ovp
@@ -344,4 +347,3 @@ vpe"
done
###################################################################
}
-
diff --git a/libre/texlive-bin-libre/texmf.cnf b/libre/texlive-bin-libre/texmf.cnf
index 423d93e09..76975ee5c 100644
--- a/libre/texlive-bin-libre/texmf.cnf
+++ b/libre/texlive-bin-libre/texmf.cnf
@@ -200,6 +200,24 @@ TEXINPUTS.xelatex = .;$TEXMF/tex/{xelatex,latex,xetex,generic,}//
TEXINPUTS.xeplain = .;$TEXMF/tex/{xeplain,eplain,plain,xetex,generic,}//
TEXINPUTS.xetex = .;$TEXMF/tex/{xetex,plain,generic,}//
+% Omega / Aleph.
+TEXINPUTS.aleph = .;$TEXMF/tex/{plain,generic,}//
+TEXINPUTS.elambda = .;$TEXMF/tex/{lambda,latex,generic,}//
+TEXINPUTS.eomega = .;$TEXMF/tex/{plain,generic,}//
+TEXINPUTS.lambda = .;$TEXMF/tex/{lambda,latex,generic,}//
+TEXINPUTS.lamed = .;$TEXMF/tex/{lamed,lambda,latex,generic,}//
+TEXINPUTS.omega = .;$TEXMF/tex/{plain,generic,}//
+
+% p(La)TeX.
+TEXINPUTS.ptex = .;$TEXMF/tex/{ptex,ptexgeneric,plain,generic,}//
+TEXINPUTS.platex = .;$TEXMF/tex/{platex,ptexgeneric,latex,generic,}//
+
+% epTeX.
+TEXINPUTS.eptex = .;$TEXMF/tex/{ptex,ptexgeneric,plain,generic,}//
+
+% pBibTeX bibliographies and style files.
+BIBINPUTS.pbibtex = .;$TEXMF/{pbibtex,bibtex}/bib//
+BSTINPUTS.pbibtex = .;$TEXMF/{pbibtex,bibtex}/bst//
% ConTeXt.
TEXINPUTS.context = .;$TEXMF/tex/{context,plain,generic,}//
@@ -285,6 +303,10 @@ BSTINPUTS = .;$TEXMF/bibtex/{bst,csf}//
MLBIBINPUTS = .;$TEXMF/bibtex/bib/{mlbib,}//
MLBSTINPUTS = .;$TEXMF/bibtex/{mlbst,bst}//
+% .ris and .bltxml bibliography formats.
+RISINPUTS = .;$TEXMF/bibtex/ris//
+BLTXMLINPUTS = .;$TEXMF/bibtex/bltxml//
+
% MFT style files.
MFTINPUTS = .;$TEXMF/mft//
@@ -307,7 +329,7 @@ AFMFONTS = .;$TEXMF/fonts/afm//;$OSFONTDIR//
% TrueType outline fonts.
TTFONTS = .;$TEXMF/fonts/{truetype,opentype}//;$OSFONTDIR//
-% Opentype outline fonts.
+% OpenType outline fonts.
OPENTYPEFONTS = .;$TEXMF/fonts/{opentype,truetype}//;$OSFONTDIR//
% Type 42 outline fonts.
@@ -331,9 +353,6 @@ CMAPFONTS = .;$TEXMF/fonts/cmap//
% Subfont definition files.
SFDFONTS = .;$TEXMF/fonts/sfd//
-% OpenType outline fonts.
-OPENTYPEFONTS = .;$TEXMF/fonts/opentype//
-
% OpenType feature files (.fea).
FONTFEATURES=.;$TEXMF/fonts/fea//
@@ -353,11 +372,13 @@ MPSUPPORT = .;$TEXMF/metapost/support
MIMELIBDIR = /etc
MAILCAPLIBDIR = /etc
-% Default settings for fontconfig library, used by Windows versions of
-% xetex/xdvipdfmx. On Unixish systems, fontconfig ignores this.
-FONTCONFIG_FILE=fonts.conf
-FONTCONFIG_PATH=$TEXMFSYSVAR/fonts/conf
-FC_CACHEDIR=$TEXMFSYSVAR/fonts/cache
+% Default settings for the fontconfig library as used by the Windows
+% versions of xetex/xdvipdfmx. On Unixish systems, fontconfig ignores
+% this. ConTeXT MkIV (all platforms) also use these values.
+%
+FONTCONFIG_FILE = fonts.conf
+FONTCONFIG_PATH = $TEXMFSYSVAR/fonts/conf
+FC_CACHEDIR = $TEXMFSYSVAR/fonts/cache
% TeX documentation and source files, for use with texdoc and kpsewhich.
TEXDOCS = $TEXMF/doc//
@@ -392,10 +413,19 @@ TW_INIPATH = $TW_LIBPATH
% would allow command execution.
DVIPDFMXINPUTS = $TEXMF/dvipdfmx
-% Find scripts that are distributed/installed in the texmf tree.
-
% Lua needs to look in TEXINPUTS for lua scripts distributed with packages.
-LUAINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXINPUTS
+%
+% But we can't simply use $TEXINPUTS, since then if TEXINPUTS is set in
+% the environment with a colon, say, TEXINPUTS=/some/dir:, the intended
+% default expansion of TEXINPUTS will not happen and .lua files under
+% the /tex/ will not be found.
+%
+% So, duplicate the TEXINPUTS.*lualatex values as LUAINPUTS.*lualatex.
+% The default LUAINPUTS sufficess for luatex and dviluatex.
+%
+LUAINPUTS.lualatex = .;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+LUAINPUTS.dvilualatex = .;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+LUAINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXMF/tex/{luatex,plain,generic,}//
% Lua needs to look for binary lua libraries distributed with packages.
CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//
@@ -563,7 +593,8 @@ TEX = etex
% interactive `e' option. %d is replaced by the line number and %s by
% the current filename. The default is specified at compile-time, and
% we let that stay in place since different platforms like different values.
-%TEXEDIT = vi +%d "%s"
+%TEXEDIT = vi +%d '%s' % default for Unix
+%TEXEDIT = texworks --position=+%d "%s" % default for Windows
%MFEDIT = ${TEXEDIT}
%MPEDIT = ${TEXEDIT}
@@ -571,6 +602,18 @@ TEX = etex
% given as command line option or environment variable.
BIBTEX_CSFILE = 88591lat.csf
+% This variable is specific to Windows. It must be set to 0 or 1. The
+% default is 0. Setting it to 1 tells the Windows script wrappers to
+% use an already installed Perl interpreter if one is found on the
+% search path, in preference to the Perl shipped with TeX Live. Thus,
+% it may be useful if you both (a) installed a full Perl distribution
+% for general use, and (b) need to run Perl programs from TL that use
+% additional modules we don't provide. The TL Perl does provide all the
+% standard Perl modules.
+%
+%TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 0
+
+
% Part 3: Array and other sizes for TeX (and Metafont).
%
% If you want to change some of these sizes only for a certain TeX
@@ -644,6 +687,11 @@ param_size = 10000 % simultaneous macro parameters, also applies to MP
save_size = 50000 % for saving values outside current group
stack_size = 5000 % simultaneous input sources
+% These are Omega-specific.
+ocp_buf_size = 500000 % character buffers for ocp filters.
+ocp_stack_size = 10000 % stacks for ocp computations.
+ocp_list_size = 1000 % control for multiple ocps.
+
% These work best if they are the same as the I/O buffer size, but it
% doesn't matter much. Must be a multiple of 8.
dvi_buf_size = 16384 % TeX
diff --git a/libre/texlive-core-libre/PKGBUILD b/libre/texlive-core-libre/PKGBUILD
index ccf5c480f..be42680ad 100644
--- a/libre/texlive-core-libre/PKGBUILD
+++ b/libre/texlive-core-libre/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=texlive-core-libre
_pkgname=texlive-core
-pkgver=2011.23170
+pkgver=2011.24722
_revnr=${pkgver#2011.}
pkgrel=1
pkgdesc="TeX Live core distribution"
@@ -29,7 +29,7 @@ source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.xz"
options=(!strip)
install=texlive.install
#backup=(etc/texmf/tex/context/config/cont-usr.tex)
-md5sums=('304e164e22f8dee41bfd6c2f4758e394'
+md5sums=('3cf22c52c9b2719d23ad1479e0ae3b3a'
'490872c9981c40d20721de1e2fccccb8')
mksource() {
@@ -100,6 +100,8 @@ accfonts/vpl2vpl
bundledoc/arlatex
bundledoc/bundledoc
context/perl/mptopdf.pl
+ctanify/ctanify
+ctanupload/ctanupload.pl
de-macro/de-macro
dviasm/dviasm.py
epstopdf/epstopdf.pl
@@ -114,11 +116,13 @@ fontools/showglyphs
fragmaster/fragmaster.pl
installfont/installfont-tl
latex2man/latex2man
-latexdiff/latexdiff.pl
latexdiff/latexdiff-vc.pl
+latexdiff/latexdiff.pl
latexdiff/latexrevise.pl
latexmk/latexmk.pl
luaotfload/mkluatexfontdb.lua
+match_parens/match_parens
+mf2pt1/mf2pt1.pl
mkjobtexmf/mkjobtexmf.pl
oberdiek/pdfatfi.pl
pdfcrop/pdfcrop.pl
@@ -144,6 +148,7 @@ texdiff/texdiff
texdirflatten/texdirflatten
texloganalyser/texloganalyser
thumbpdf/thumbpdf.pl
+texliveonfly/texliveonfly.py
"
install -m755 -d $pkgdir/usr/bin
for _script in ${_linked_scripts}; do
diff --git a/libre/texlive-fontsextra-libre/PKGBUILD b/libre/texlive-fontsextra-libre/PKGBUILD
index 9d296dd35..5565b19b5 100644
--- a/libre/texlive-fontsextra-libre/PKGBUILD
+++ b/libre/texlive-fontsextra-libre/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=texlive-fontsextra-libre
_pkgname=texlive-fontsextra
-pkgver=2011.22691
+pkgver=2011.24706
_revnr=${pkgver#2011.}
pkgrel=1
pkgdesc="TeX Live - all sorts of extra fonts"
@@ -20,8 +20,8 @@ source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.xz"
options=('!emptydirs')
options=(!strip)
install=texlive.install
-md5sums=('33f8fc7b7ff98c616a0a7a0b5844e603'
- '5150fc36c158776c6317ac14bbd677ab')
+md5sums=('d4bd3dbc8c422d049b082d0e8c70d088'
+ '6e84e4a8ee6a25adec39cd6310d9bef2')
mksource() {
[ -f ${_pkgname}-$pkgver-src.zip ] || wget ftp://ftp.archlinux.org/other/texlive/${_pkgname}-$pkgver-src.zip
diff --git a/libre/texlive-fontsextra-libre/texlive-fontsextra.maps b/libre/texlive-fontsextra-libre/texlive-fontsextra.maps
index 6bc0b19c2..4ef977ffa 100644
--- a/libre/texlive-fontsextra-libre/texlive-fontsextra.maps
+++ b/libre/texlive-fontsextra-libre/texlive-fontsextra.maps
@@ -19,8 +19,6 @@ Map MnSymbol.map
Map MorrisIn.map
Map Nouveaud.map
Map OrnementsADF.map
-Map PTSans-type1.map
-Map PTSerif-type1.map
Map Romantik.map
Map Rothdn.map
Map RoyalIn.map
@@ -39,6 +37,7 @@ Map aurical.map
Map belleek.map
Map bera.map
Map boondox.map
+Map calligra.map
Map cantarell.map
Map ccicons.map
Map clm.map
@@ -46,9 +45,11 @@ Map cm-lgc.map
Map cmin.map
Map comfortaa.map
Map cyklop.map
+Map dejavu-type1.map
Map dictsym.map
Map droid.map
Map dstroke.map
+Map dutchcal.map
Map epigrafica.map
Map esvect.map
Map fdsymbol.map
@@ -58,6 +59,7 @@ Map foekfont.map
Map fonetika.map
Map fourier-utopia-expert.map
Map fourier.map
+Map frcursive.map
Map gfsartemisia.map
Map gfsbodoni.map
Map gfscomplutum.map
@@ -77,10 +79,14 @@ Map mdbch.map
Map mdput.map
Map mdugm.map
Map ocrb.map
+Map opensans.map
+Map paratype-type1.map
Map pbsi.map
Map phaistos.map
Map prodint.map
+Map pxtx.map
Map recycle.map
+Map rsfso.map
Map sqrcaps.map
Map starfont.map
Map tfrupee.map
diff --git a/libre/texlive-latexextra-libre/PKGBUILD b/libre/texlive-latexextra-libre/PKGBUILD
index b4c34a637..2093836c9 100644
--- a/libre/texlive-latexextra-libre/PKGBUILD
+++ b/libre/texlive-latexextra-libre/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=texlive-latexextra-libre
_pkgname=texlive-latexextra
-pkgver=2011.22931
+pkgver=2011.24718
_revnr=${pkgver#2011.}
pkgrel=1
pkgdesc="TeX Live - Large collection of add-on packages for LaTeX"
@@ -25,7 +25,7 @@ source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.xz"
options=('!emptydirs')
options=(!strip)
install=texlive.install
-md5sums=('243f308790ad95e40a80526fecfdb7c1'
+md5sums=('adab55bb38506c25f3176af64cf30f27'
'9e4825f47dac663dd62c4bfa67899e84')
mksource() {
diff --git a/libre/xmlstarlet/PKGBUILD b/libre/xmlstarlet/PKGBUILD
new file mode 100644
index 000000000..a06daf063
--- /dev/null
+++ b/libre/xmlstarlet/PKGBUILD
@@ -0,0 +1,29 @@
+# From https://aur.archlinux.org/packages.php?ID=20101.
+# Maintainer: PyroPeter <abi1789@googlemail.com>
+# Contributor: BlackEagle <ike.devolder@scarlet.be>
+# Contributor: chochem <chochem@gmail.com>
+
+pkgname=xmlstarlet
+pkgver=1.3.1
+pkgrel=1
+pkgdesc="A set of tools to transform, query, validate, and edit XML documents"
+arch=('i686' 'x86_64')
+url="http://xmlstar.sourceforge.net/"
+license=('custom:MIT')
+depends=('libxslt>=1.1.9')
+source=("xmlstarlet-$pkgver.tar.gz::http://sourceforge.net/projects/xmlstar/files/xmlstarlet/$pkgver/xmlstarlet-$pkgver.tar.gz/download")
+md5sums=('5173ad3f01ec0ba0d54bd1fbfc057abf')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ local xsltlibs=$(pkg-config --libs libxslt libexslt)
+ local xmllibs=$(pkg-config --libs libxml-2.0)
+
+ LIBXSLT_PREFIX=/usr LIBXML_PREFIX=/usr LIBXSLT_LIBS="${xsltlibs}" LIBXML_LIBS="${xmllibs}" ./configure --prefix=/usr
+
+ make
+ make DESTDIR="${pkgdir}" install
+ mkdir -p $pkgdir/usr/share/licenses/$pkgname
+ cp Copyright $pkgdir/usr/share/licenses/$pkgname/COPYING
+ ln -s /usr/bin/xml ${pkgdir}/usr/bin/xmlstarlet
+}
diff --git a/libre/your-freedom/PKGBUILD b/libre/your-freedom/PKGBUILD
index a7f25c7bb..68fe8b673 100644
--- a/libre/your-freedom/PKGBUILD
+++ b/libre/your-freedom/PKGBUILD
@@ -2,22 +2,18 @@
pkgname=your-freedom
pkgver=$(LC_ALL=C date -u +%Y%m%d)
pkgrel=1
-pkgdesc="This package conflicts with every unfree package known to date."
+pkgdesc="This package conflicts with every unfree package known to date to ensure your system is free."
arch=('any')
url="https://parabolagnulinux.org"
-license=('GPL')
+license=('GPL3')
groups=('base')
install=${pkgname}.install
-source=()
-md5sums=()
-noextract=()
+source=(https://projects.parabolagnulinux.org/blacklist.git/plain/blacklist.txt)
build() {
cd ${srcdir}
- wget http://repo.parabolagnulinux.org/docs/blacklist.txt
- wget http://repo.parabolagnulinux.org/docs/whitelist.txt
install -d ${pkgdir}/usr/share/doc/${pkgname}
- install -m644 {black,white}list.txt ${pkgdir}/usr/share/doc/${pkgname}/
+ install -m644 blacklist.txt ${pkgdir}/usr/share/doc/${pkgname}/
}
package() {
@@ -27,3 +23,4 @@ package() {
sort -u
))
}
+md5sums=('980d8ab2f9886d648a700a7a909488d9')
diff --git a/mozilla-testing/icecat-i18n/PKGBUILD b/mozilla-testing/icecat-i18n/PKGBUILD
index 62f06df8e..d5b95e811 100644
--- a/mozilla-testing/icecat-i18n/PKGBUILD
+++ b/mozilla-testing/icecat-i18n/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: fauno <fauno@kiwwwi.com.ar>
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: Figue <ffigue@gmail.com>
# Based on firefox-i18n package
diff --git a/mozilla-testing/icecat/PKGBUILD b/mozilla-testing/icecat/PKGBUILD
index b2b5eadef..4379ee60c 100644
--- a/mozilla-testing/icecat/PKGBUILD
+++ b/mozilla-testing/icecat/PKGBUILD
@@ -1,3 +1,4 @@
+# Contributor (ConnochaetOS): Henry Jensen <hjensen@connochaetos.org>
# Contributor (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: Figue <ffigue at gmail>
# Contributor (Parabola): fauno <fauno@kiwwwi.com.ar>
@@ -10,12 +11,20 @@
# If you are updating this package, don't forget to update the version number in
# the value for 'browser.dictionaries.download.url' in 'libre.patch'
-pkgname=icecat
+_pgo=false
+
+_pkgname=icecat
pkgver=9.0.1
pkgrel=2
+
+if [ -z "$pkgname" ]; then pkgname=$_pkgname; fi
+if $_pgo; then
+ pkgname+='-pgo'
+fi
+
pkgdesc="The GNUzilla web browser, based on Mozilla Firefox. SafeBrowsing and other Google services disabled!"
arch=('i686' 'x86_64' 'mips64el')
-license=('MPL' 'GPL' 'LGPL')
+license=('GPL2' 'MPL' 'LGPL')
depends=(
'alsa-lib'
'dbus-glib'
@@ -39,85 +48,97 @@ makedepends=(
'diffutils'
'libidl2'
'mesa'
- 'p7zip-libre'
'pkg-config'
'python2'
+ 'unzip'
'wireless_tools'
- 'xorg-server-xvfb'
'yasm'
'zip'
)
+if $_pgo; then
+ makedepends+=('xorg-server-xvfb')
+ options=(!ccache)
+fi
+
url="http://www.gnu.org/software/gnuzilla/"
install=icecat.install
source=(ftp://ftp.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${pkgver}.tar.xz
mozconfig
+ mozconfig.pgo
icecat.desktop
icecat-safe.desktop
libre.patch
firefox-install-dir.patch
vendor.js)
+if [ "$_pkgname" != "$pkgname" ]; then
+ provides+=("$_pkgname")
+ conflicts+=("$_pkgname")
+fi
+
build() {
- cd "$srcdir/$pkgname-$pkgver"
+ mv "$_pkgname-$pkgver" "$srcdir/mozilla-build"
+ cd "$srcdir/mozilla-build"
cp "$srcdir/mozconfig" .mozconfig # Load our build config, disable SafeSearch
patch -Np1 -i "$srcdir/firefox-install-dir.patch" # install to /usr/lib/$pkgname
patch -Np1 -i "$srcdir/libre.patch" # Remove Google+Mozilla stuff
+ if $_pgo; then
+ cat "$srcdir/mozconfig.pgo" >> .mozconfig
+ fi
+
# Fix PRE_RELEASE_SUFFIX
sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' \
browser/base/Makefile.in
- export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$pkgname"
+ export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/$_pkgname"
export PYTHON="/usr/bin/python2"
- LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
- LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
- kill $! || true
+ if $_pgo; then
+ LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
+ LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
+ kill $! || true
+ else
+ LD_PRELOAD="" make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
+ fi
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$srcdir/mozilla-build"
make -j1 -f client.mk DESTDIR="$pkgdir" install
- install -m644 "$srcdir"/vendor.js "$pkgdir/usr/lib/$pkgname/defaults/pref"
+ install -m644 "$srcdir"/vendor.js "$pkgdir/usr/lib/$_pkgname/defaults/pref"
brandingdir="browser/branding/unofficial"
+ icondir="$pkgdir/usr/share/icons/hicolor"
for i in 16x16 32x32 48x48; do
- install -Dm644 "$brandingdir/default${i/x*/}.png" "$pkgdir/usr/share/icons/hicolor/$i/apps/$pkgname.png"
+ install -Dm644 "$brandingdir/default${i/x*/}.png" "$icondir/$i/apps/$_pkgname.png"
done
install -d "$pkgdir/usr/share/applications"
install -m644 "$srcdir/icecat.desktop" "$pkgdir/usr/share/applications"
install -m644 "$srcdir/icecat-safe.desktop" "$pkgdir/usr/share/applications"
- rm -rf "$pkgdir/usr/lib/$pkgname/"{dictionaries,hyphenation,searchplugins,plugins}
- ln -sf /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
- ln -sf /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"
- ln -sf /usr/lib/mozilla/plugins "$pkgdir/usr/lib/$pkgname/plugins"
- ln -sf /usr/lib/mozilla/searchplugins "$pkgdir/usr/lib/$pkgname/searchplugins"
+ rm -rf "$pkgdir/usr/lib/$_pkgname/"{dictionaries,hyphenation,searchplugins,plugins}
+ ln -sf /usr/share/hunspell "$pkgdir/usr/lib/$_pkgname/dictionaries"
+ ln -sf /usr/share/hyphen "$pkgdir/usr/lib/$_pkgname/hyphenation"
+ ln -sf /usr/lib/mozilla/plugins "$pkgdir/usr/lib/$_pkgname/plugins"
+ ln -sf /usr/lib/mozilla/searchplugins "$pkgdir/usr/lib/$_pkgname/searchplugins"
# We don't want the development stuff
- rm -rf "$pkgdir"/usr/{include,lib/$pkgname-devel,share/idl}
+ rm -rf "$pkgdir"/usr/{include,lib/$_pkgname-devel,share/idl}
# Fix a bug with https-everywhere (duplicate rules)
rm -f "$pkgdir/usr/lib/$pkgname/extensions/https-everywhere@eff.org/chrome/content/rules/GoogleMaps.xml~HEAD"
# Workaround for now: https://bugzilla.mozilla.org/show_bug.cgi?id=658850
- ln -sf $pkgname "$pkgdir/usr/lib/$pkgname/$pkgname-bin"
+ ln -sf $_pkgname "$pkgdir/usr/lib/$_pkgname/$_pkgname-bin"
}
md5sums=('a135581da2fd2845f268d7ca91054c06'
- '9c0cd5b45a3c4b04b872b6a900f62286'
- '0e5057d9427c6cd5e2f3b78fe34f50d9'
- '44959606e4a704e68a913e73fc941926'
- 'e81ad01dbc16ba28bf92ba4b7c309ca7'
- 'd93fe402b87cd000a869e1fd6badc6c9'
- '07e65752416e615fe04ce586bc58f86b'
- '1e4bcac59e93d21fffa6a1d1ad235247'
- '0d053487907de4376d67d8f499c5502b')
-md5sums=('a135581da2fd2845f268d7ca91054c06'
- '9c0cd5b45a3c4b04b872b6a900f62286'
+ '6f3a8fd65c416216a1b56b0c2d2d81aa'
+ 'ac29b01c189f20abae2f3eef1618ffc0'
'e81ad01dbc16ba28bf92ba4b7c309ca7'
'd93fe402b87cd000a869e1fd6badc6c9'
'07e65752416e615fe04ce586bc58f86b'
diff --git a/mozilla-testing/icecat/mozconfig b/mozilla-testing/icecat/mozconfig
index c1305ac60..b769079d8 100644
--- a/mozilla-testing/icecat/mozconfig
+++ b/mozilla-testing/icecat/mozconfig
@@ -33,14 +33,9 @@ ac_add_options --disable-installer
# Optimization
ac_add_options --enable-optimize
-# PGO
-ac_add_options --enable-profile-guided-optimization
-mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-pgo
-mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
-mk_add_options PYTHONPATH='$(OBJDIR)/_profile/pgo'
-
export MOZILLA_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/moz-objdir
# IceCat
export MOZ_PHOENIX=1
@@ -55,3 +50,5 @@ ac_add_options --with-user-appdir=.gnuzilla
ac_add_options --disable-safe-browsing
export BUILD_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
+
+# Build-generated
diff --git a/mozilla-testing/icecat/mozconfig.pgo b/mozilla-testing/icecat/mozconfig.pgo
new file mode 100644
index 000000000..b0c249ebf
--- /dev/null
+++ b/mozilla-testing/icecat/mozconfig.pgo
@@ -0,0 +1,4 @@
+# PGO
+ac_add_options --enable-profile-guided-optimization
+mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
+mk_add_options PYTHONPATH='$(OBJDIR)/_profile/pgo'
diff --git a/mozilla-testing/iceweasel-i18n/Makefile b/mozilla-testing/iceweasel-i18n/Makefile
index 64e140af6..d596111f3 100644
--- a/mozilla-testing/iceweasel-i18n/Makefile
+++ b/mozilla-testing/iceweasel-i18n/Makefile
@@ -13,7 +13,7 @@ debrel=1
debrepo=http://ftp.debian.org/debian/pool/main/
pkgver=9.0
-pkgrel=2
+pkgrel=2.1
# Guts: ##############################################################
diff --git a/mozilla-testing/iceweasel-i18n/PKGBUILD b/mozilla-testing/iceweasel-i18n/PKGBUILD
index 8a744f7a5..fd56f38bb 100644
--- a/mozilla-testing/iceweasel-i18n/PKGBUILD
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD
@@ -14,6 +14,7 @@ _debrel=1
_debrepo=http://ftp.debian.org/debian/pool/main/
debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
+# echo $(ls src/iceweasel-l10n-*+debian/upstream/ | sed 's/\.xpi/ /')
_langpacks=(af ak ar ast as be bg bn-BD bn-IN br bs ca cs cy da de dz-BT el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa-IR fa fi fr fur-IT fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja ka kk kn ko ku lg lt lv mai mk ml mn mr nb-NO ne-NP nl nn-NO nso oc or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta-LK ta te th tr uk vi zh-CN zh-TW zu)
pkgbase=iceweasel-i18n
@@ -22,13 +23,14 @@ pkgname=($(for lang in ${_langpacks[@]}
done))
_pkgver=9.0
pkgver=${_debver}.${_debrel}
-pkgrel=2
+pkgrel=2.1
pkgdesc="Language packs for Debian Iceweasel."
arch=('any')
url="http://www.geticeweasel.org/"
license=('MPL')
-depends=("iceweasel=${_pkgver}")
+depends=("iceweasel-libre>=$_pkgver")
+makedepends=("mozilla-devscripts" "xmlstarlet")
source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.gz"
"${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.diff.gz"
"${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.dsc")
@@ -46,16 +48,23 @@ dpkg-source() {
build() {
cd "${srcdir}"
dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
+ patch -Np0 -i ${_debname}_${_debver}-${_debrel}.diff
+ cd ${_debname}-${_debver}
+ # Fix broken files or avoid unnecessary dependencies.
+ sed -i 's/$TARGET/$TARGET ; exit/' debian/build-script.sh
+ # Langpacks initially state to support exactly one browser version,
+ # Debian fixes this.
+ sh debian/build-script.sh override_dh_auto_build 9 21
}
-_path="/usr/lib/iceweasel-${_pkgver}/extensions"
+_path="/usr/lib/iceweasel/extensions"
for lang in ${_langpacks[@]}
do
eval "
package_iceweasel-i18n-$(echo $lang | tr A-Z a-z) () {
- install -Dm644 '$srcdir/'*'/upstream/$lang.xpi' \"\$pkgdir\"'$_path/langpack-$lang@firefox.mozilla.org.xpi'
+ install -Dm644 '$srcdir/'*'/build/$lang.xpi' \"\$pkgdir\"'$_path/langpack-$lang@firefox.mozilla.org.xpi'
}
"
done
diff --git a/mozilla-testing/iceweasel-i18n/PKGBUILD.in b/mozilla-testing/iceweasel-i18n/PKGBUILD.in
index 691c80c0e..05477caef 100644
--- a/mozilla-testing/iceweasel-i18n/PKGBUILD.in
+++ b/mozilla-testing/iceweasel-i18n/PKGBUILD.in
@@ -28,7 +28,7 @@ pkgdesc="Language packs for Debian Iceweasel."
arch=('any')
url="http://www.geticeweasel.org/"
license=('MPL')
-depends=("iceweasel=${_pkgver}")
+depends=("iceweasel=$_pkgver")
source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.gz"
"${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.diff.gz"
"${_debrepo}/`debfile ${_debname}`_${_debver}-${_debrel}.dsc")
diff --git a/mozilla-testing/iceweasel-libre/PKGBUILD b/mozilla-testing/iceweasel-libre/PKGBUILD
index c0febff7c..9ade92f8b 100644
--- a/mozilla-testing/iceweasel-libre/PKGBUILD
+++ b/mozilla-testing/iceweasel-libre/PKGBUILD
@@ -1,5 +1,12 @@
-# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
-# Contributor: Henry Jensen <hjensen@connochaetos.org>
+# Contributor (ConnochaetOS): Henry Jensen <hjensen@connochaetos.org>
+# Contributor (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Contributor: Figue <ffigue at gmail>
+# Contributor (Parabola): fauno <fauno@kiwwwi.com.ar>
+# Contributor (Parabola): vando <facundo@esdebian.org>
+# Contributor (Arch): Jakub Schmidtke <sjakub@gmail.com>
+# Thank you very much to the older contributors:
+# Contributor: evr <evanroman at gmail>
+# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com>
_pgo=false
@@ -13,8 +20,9 @@ debfile() { echo $@|sed -r 's@(.).*@\1/&/&@'; }
_pkgname=iceweasel
pkgname=iceweasel-libre
pkgver=${_debver}.${_debrel}
-pkgrel=2
+pkgrel=2.1
+if [ -z "$pkgname" ]; then pkgname=$_pkgname; fi
if $_pgo; then
pkgname+='-pgo'
fi
@@ -48,10 +56,10 @@ makedepends=(
'librsvg'
'libxslt'
'mesa'
- 'p7zip-libre'
'pkg-config'
'python2'
'quilt'
+ 'unzip'
'wireless_tools'
'yasm'
'zip'
@@ -74,9 +82,8 @@ source=("${_debrepo}/`debfile ${_debname}`_${_debver}.orig.tar.bz2"
region.properties
vendor.js)
-if [ -z "$_pkgname" ]; then _pkgname=$pkgname; fi
if [ "$_pkgname" != "$pkgname" ]; then
- provides+=("$_pkgname")
+ provides+=("$_pkgname=$pkgver")
conflicts+=("$_pkgname")
fi
@@ -98,13 +105,10 @@ build() {
cd "${srcdir}"
dpkg-source -x ${_debname}_${_debver}-${_debrel}.dsc
- # This will make life more sane
- cd "${srcdir}"
- ln -s "${_debname}-${_debver}" "${_pkgname}-${pkgver}"
-
msg2 "Starting normal build..."
- cd "$srcdir/$_pkgname-$pkgver"
-
+ mv "${_debname}-${_debver}" "$srcdir/mozilla-build"
+ cd "$srcdir/mozilla-build"
+
cp "$srcdir/mozconfig" .mozconfig # Load our build config, disable SafeSearch
patch -Np1 -i "$srcdir/iceweasel-install-dir.patch" # install to /usr/lib/$_pkgname
patch -Np1 -i "$srcdir/xulrunner-copy-stub.patch" # small fix
@@ -132,7 +136,7 @@ build() {
}
package() {
- cd "$srcdir/$_pkgname-$pkgver"
+ cd "$srcdir/mozilla-build"
make -j1 -f client.mk DESTDIR="$pkgdir" install
install -m644 "$srcdir"/vendor.js "$pkgdir/usr/lib/$_pkgname/defaults/pref"
diff --git a/multilib-staging/wine/PKGBUILD b/multilib-staging/wine/PKGBUILD
new file mode 100644
index 000000000..ea98cf97f
--- /dev/null
+++ b/multilib-staging/wine/PKGBUILD
@@ -0,0 +1,147 @@
+# $Id: PKGBUILD 62541 2012-01-20 19:26:11Z bluewind $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
+# Contributor: Eduardo Romero <eduardo@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+
+pkgname=wine
+pkgver=1.3.37
+pkgrel=2
+
+_pkgbasever=${pkgver/rc/-rc}
+
+source=(http://ibiblio.org/pub/linux/system/emulators/$pkgname/$pkgname-$_pkgbasever.tar.bz2)
+md5sums=('4bf25be22c130765283d9953d03b65c4')
+
+pkgdesc="A compatibility layer for running Windows programs"
+url="http://www.winehq.com"
+arch=(i686 x86_64)
+license=(LGPL)
+install=wine.install
+
+depends=(
+ fontconfig lib32-fontconfig
+ mesa lib32-mesa
+ libxcursor lib32-libxcursor
+ libxrandr lib32-libxrandr
+ libxdamage lib32-libxdamage
+ libxi lib32-libxi
+ gettext lib32-gettext
+ desktop-file-utils
+)
+
+makedepends=(autoconf ncurses bison perl fontforge flex prelink
+ 'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2'
+ giflib lib32-giflib
+ libpng lib32-libpng
+ gnutls lib32-gnutls
+ libxinerama lib32-libxinerama
+ libxcomposite lib32-libxcomposite
+ libxmu lib32-libxmu
+ libxxf86vm lib32-libxxf86vm
+ libxml2 lib32-libxml2
+ libldap lib32-libldap
+ lcms lib32-lcms
+ mpg123 lib32-mpg123
+ openal lib32-openal
+ v4l-utils lib32-v4l-utils
+ alsa-lib lib32-alsa-lib
+ oss
+)
+
+optdepends=(
+ giflib lib32-giflib
+ libpng lib32-libpng
+ libldap lib32-libldap
+ gnutls lib32-gnutls
+ lcms lib32-lcms
+ libxml2 lib32-libxml2
+ mpg123 lib32-mpg123
+ openal lib32-openal
+ v4l-utils lib32-v4l-utils
+ libpulse lib32-libpulse
+ alsa-plugins lib32-alsa-plugins
+ alsa-lib lib32-alsa-lib
+ oss cups
+)
+
+if [[ $CARCH == i686 ]]; then
+ # Strip lib32 etc. on i686
+ depends=(${depends[@]/*32-*/})
+ makedepends=(${makedepends[@]/*32-*/})
+ makedepends=(${makedepends[@]/*-multilib*/})
+ optdepends=(${optdepends[@]/*32-*/})
+else
+ provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver")
+ conflicts=('bin32-wine' 'wine-wow64')
+ replaces=('bin32-wine')
+fi
+
+build() {
+ cd "$srcdir"
+
+ # Allow ccache to work
+ mv $pkgname-$_pkgbasever $pkgname
+
+ # Get rid of old build dirs
+ rm -rf $pkgname-{32,64}-build
+ mkdir $pkgname-32-build
+
+ # These additional CFLAGS solve FS#27662
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
+ export CXXFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
+
+ if [[ $CARCH == x86_64 ]]; then
+ msg2 "Building Wine-64..."
+
+ mkdir $pkgname-64-build
+ cd "$srcdir/$pkgname-64-build"
+ ../$pkgname/configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib \
+ --with-x \
+ --enable-win64
+
+ make
+
+ _wine32opts=(
+ --libdir=/usr/lib32
+ --with-wine64="$srcdir/$pkgname-64-build"
+ )
+
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+ fi
+
+ msg2 "Building Wine-32..."
+ cd "$srcdir/$pkgname-32-build"
+ ../$pkgname/configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-x \
+ "${_wine32opts[@]}"
+
+ # These additional CFLAGS solve FS#27560
+ make CFLAGS+="-mstackrealign" CXXFLAGS+="-mstackrealign"
+}
+
+package() {
+ msg2 "Packaging Wine-32..."
+ cd "$srcdir/$pkgname-32-build"
+
+ if [[ $CARCH == i686 ]]; then
+ make prefix="$pkgdir/usr" install
+ else
+ make prefix="$pkgdir/usr" \
+ libdir="$pkgdir/usr/lib32" \
+ dlldir="$pkgdir/usr/lib32/wine" install
+
+ msg2 "Packaging Wine-64..."
+ cd "$srcdir/$pkgname-64-build"
+ make prefix="$pkgdir/usr" \
+ libdir="$pkgdir/usr/lib" \
+ dlldir="$pkgdir/usr/lib/wine" install
+ fi
+}
+
+# vim:set ts=8 sts=2 sw=2 et:
diff --git a/multilib-staging/wine/wine.install b/multilib-staging/wine/wine.install
new file mode 100644
index 000000000..0548b7ffd
--- /dev/null
+++ b/multilib-staging/wine/wine.install
@@ -0,0 +1,12 @@
+post_install() {
+ update-desktop-database -q
+ #echo "This wine package is wow64 enabled. This means it can run 32bit/64bit Windows apps on x86_64."
+ #echo "If you are on x86_64, the default WINEARCH will be win64."
+ #echo "This will cause a lot of Windows applications to malfunction even if they usually work in wine."
+ #echo "Please create your ~/.wine with 'WINEARCH=win32 winecfg' if you are unsure and on x86_64."
+ #echo "See the Arch wiki on wine for more information."
+}
+
+post_remove() {
+ update-desktop-database -q
+}
diff --git a/multilib/lib32-gmp/538dfce27f41.patch b/multilib/lib32-gmp/538dfce27f41.patch
new file mode 100644
index 000000000..2e0a1af50
--- /dev/null
+++ b/multilib/lib32-gmp/538dfce27f41.patch
@@ -0,0 +1,38 @@
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1310730221 -7200
+# Node ID 538dfce27f410b910d5e2f011119269e224d16a3
+# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366
+(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right.
+
+diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c
+--- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200
++++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200
+@@ -7,7 +7,7 @@
+ SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST
+ GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE.
+
+-Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
++Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+
+ This file is part of the GNU MP Library.
+
+@@ -28,7 +28,6 @@
+ #include "gmp-impl.h"
+
+
+-
+ mp_size_t
+ mpn_dcpi1_bdiv_q_n_itch (mp_size_t n)
+ {
+@@ -130,7 +129,7 @@
+ qn = nn - qn;
+ while (qn > dn)
+ {
+- mpn_sub_1 (np + dn, np + dn, qn, cy);
++ mpn_sub_1 (np + dn, np + dn, qn - dn, cy);
+ cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp);
+ qp += dn;
+ np += dn;
+
diff --git a/multilib/lib32-gmp/PKGBUILD b/multilib/lib32-gmp/PKGBUILD
new file mode 100644
index 000000000..e6e82e060
--- /dev/null
+++ b/multilib/lib32-gmp/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: josephgbr <rafael.f.f1@gmail.com>
+
+_pkgbasename=gmp
+pkgname=lib32-$_pkgbasename
+pkgver=5.0.2
+pkgrel=6
+pkgdesc="A free library for arbitrary precision arithmetic (32-bit)"
+arch=('x86_64')
+url="http://gmplib.org/"
+depends=('lib32-gcc-libs' $_pkgbasename)
+makedepends=(gcc-multilib)
+license=('LGPL3')
+options=(!libtool)
+source=(ftp://ftp.gnu.org/gnu/gmp/gmp-${pkgver}.tar.bz2
+ 538dfce27f41.patch)
+md5sums=('0bbaedc82fb30315b06b1588b9077cd3'
+ 'a769be9c41618ca9c35d83375e7097d0')
+
+build() {
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+ cd "${srcdir}/${_pkgbasename}-${pkgver}"
+ patch -Np1 -i $srcdir/538dfce27f41.patch
+
+ export ABI=32
+ ./configure \
+ --prefix=/usr --infodir=/usr/share/info \
+ --enable-cxx --libdir=/usr/lib32 \
+ --includedir=/usr/lib32/gmp
+
+ #Put gmp.h in the same folder as gmpxx.h
+ sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile
+
+ make
+}
+
+check() {
+ cd "${srcdir}/${_pkgbasename}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${srcdir}/${_pkgbasename}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ rm -rf "${pkgdir}"/usr/{include,share,bin}
+}
diff --git a/multilib/lib32-gnutls/PKGBUILD b/multilib/lib32-gnutls/PKGBUILD
new file mode 100644
index 000000000..7cc6e57ca
--- /dev/null
+++ b/multilib/lib32-gnutls/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: Christoph Vigano <mail at cvigano dot de>
+# Contributor: Biru Ionut <ionut@archlinux.ro>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+# Contributor: Mikko Seppälä <t-r-a-y@mbnet.fi>
+_pkgbasename=gnutls
+pkgname=lib32-$_pkgbasename
+pkgver=3.0.12
+pkgrel=1
+pkgdesc="A library which provides a secure layer over a reliable transport layer (32-bit)"
+arch=('x86_64')
+license=('GPL3' 'LGPL')
+url="http://www.gnu.org/software/gnutls/"
+options=('!libtool' '!makeflags')
+depends=('lib32-zlib' 'lib32-nettle>=2.4' 'lib32-p11-kit' $_pkgbasename)
+makedepends=('gcc-multilib' 'lib32-libidn')
+source=(ftp://ftp.gnu.org/gnu/gnutls/${_pkgbasename}-${pkgver}.tar.xz)
+md5sums=('685fe5c00786c04b39e9aac362fa0cac')
+
+build() {
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+ cd ${srcdir}/${_pkgbasename}-${pkgver}
+
+ # build fails without --disable-hardware-acceleration because of assembler errors
+ ./configure --prefix=/usr --libdir=/usr/lib32 \
+ --with-zlib \
+ --disable-static \
+ --disable-guile \
+ --disable-valgrind-tests --disable-hardware-acceleration
+ make
+}
+
+package() {
+ cd "${srcdir}/${_pkgbasename}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ find $pkgdir
+
+ rm -rf "${pkgdir}"/usr/{bin,include,share}
+}
diff --git a/multilib/lib32-libidn/PKGBUILD b/multilib/lib32-libidn/PKGBUILD
new file mode 100644
index 000000000..2f08a81f9
--- /dev/null
+++ b/multilib/lib32-libidn/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+_pkgbasename=libidn
+pkgname=lib32-$_pkgbasename
+pkgver=1.22
+pkgrel=2
+pkgdesc="Implementation of the Stringprep, Punycode and IDNA specifications (32 bit)"
+url="http://www.gnu.org/software/libidn/"
+arch=('x86_64')
+license=('GPL3' 'LGPL')
+depends=('lib32-glibc' "$_pkgbasename>=$pkgver")
+makedepends=('gcc-multilib')
+options=('!libtool')
+source=(http://ftp.gnu.org/gnu/${_pkgbasename}/${_pkgbasename}-${pkgver}.tar.gz)
+md5sums=('893a1df0cf3b28b72d248382eaeaca71')
+
+build() {
+ cd ${srcdir}/${_pkgbasename}-${pkgver}
+ ./configure --prefix=/usr --libdir=/usr/lib32 CC='gcc -m32'
+ make
+}
+
+package() {
+ cd ${srcdir}/${_pkgbasename}-${pkgver}
+ make DESTDIR=${pkgdir} install
+ rm -rf ${pkgdir}/usr/{bin,include,share}
+}
diff --git a/multilib/lib32-libxcb/PKGBUILD b/multilib/lib32-libxcb/PKGBUILD
index fb15b6e01..8e68f1911 100644
--- a/multilib/lib32-libxcb/PKGBUILD
+++ b/multilib/lib32-libxcb/PKGBUILD
@@ -1,18 +1,17 @@
-# $Id: PKGBUILD 26635 2010-09-15 22:45:22Z bluewind $
+# $Id: PKGBUILD 62579 2012-01-21 16:17:25Z ibiru $
# Maintainer: Alexander Baldeck <alexander@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
_pkgbasename=libxcb
pkgname=lib32-$_pkgbasename
pkgver=1.7
-pkgrel=2
+pkgrel=3
pkgdesc="X11 client-side library (32-bit)"
arch=(x86_64)
url="http://xcb.freedesktop.org/"
depends=('xcb-proto>=1.6' 'lib32-libxdmcp' 'lib32-libxau'
$_pkgbasename)
-makedepends=('pkgconfig' 'libxslt' 'python' 'gcc-multilib'
+makedepends=('pkgconfig' 'libxslt' 'python2' 'gcc-multilib'
'autoconf')
-conflicts=('libx11<1.1.99.2')
options=('!libtool')
license=('custom')
source=(${url}/dist/${_pkgbasename}-${pkgver}.tar.bz2
@@ -27,11 +26,7 @@ build() {
export CC="gcc -m32"
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
- libtoolize --force --copy
- aclocal
- autoconf
- automake --add-missing
- ./configure --prefix=/usr --enable-xinput --libdir=/usr/lib32
+ PYTHON=/usr/bin/python2 ./autogen.sh --prefix=/usr --enable-xinput --libdir=/usr/lib32
make
}
diff --git a/multilib/lib32-nettle/PKGBUILD b/multilib/lib32-nettle/PKGBUILD
new file mode 100644
index 000000000..ebcc7f858
--- /dev/null
+++ b/multilib/lib32-nettle/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: Christoph Vigano <mail@cvigano.de>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: bender02 at gmx dot com
+
+_pkgbasename=nettle
+pkgname=lib32-$_pkgbasename
+pkgver=2.4
+pkgrel=3
+pkgdesc="A low-level cryptographic library (32-bit)"
+arch=('i686' 'x86_64')
+url="http://www.lysator.liu.se/~nisse/nettle/"
+license=('GPL2')
+depends=('lib32-gmp' $_pkgbasename)
+makedepends=(gcc-multilib)
+source=(ftp://ftp.gnu.org/gnu/nettle/$_pkgbasename-$pkgver.tar.gz)
+md5sums=('450be8c4886d46c09f49f568ad6fa013')
+
+build() {
+ cd "$srcdir/$_pkgbasename-$pkgver"
+
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+
+ ./configure --prefix=/usr --libdir=/usr/lib32 \
+ --enable-shared \
+ --disable-static # <-- seems not working now
+ make
+}
+
+check() {
+ cd "$srcdir/$_pkgbasename-$pkgver"
+ make -k check
+}
+
+package() {
+ cd "$srcdir/$_pkgbasename-$pkgver"
+ make DESTDIR="$pkgdir/" install
+
+ find $pkgdir
+
+ # remove static libs
+ rm -f ${pkgdir}/usr/lib32/{libhogweed,libnettle}.a
+
+ rm -rf "${pkgdir}"/usr/{include,share,bin}
+}
diff --git a/multilib/lib32-openssl/PKGBUILD b/multilib/lib32-openssl/PKGBUILD
index 5b2ea447e..ac6843135 100644
--- a/multilib/lib32-openssl/PKGBUILD
+++ b/multilib/lib32-openssl/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 61855 2012-01-09 09:55:54Z bluewind $
+# $Id: PKGBUILD 62560 2012-01-21 10:57:52Z bluewind $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
_pkgbasename=openssl
pkgname=lib32-$_pkgbasename
-_ver=1.0.0f
+_ver=1.0.0g
# use a pacman compatible version scheme
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
pkgrel=1
@@ -17,7 +17,7 @@ options=('!makeflags')
source=("https://www.openssl.org/source/${_pkgbasename}-${_ver}.tar.gz"
'no-rpath.patch'
'ca-dir.patch')
-md5sums=('e358705fb4a8827b5e9224a73f442025'
+md5sums=('07ecbe4324f140d157478637d6beccf1'
'dc78d3d06baffc16217519242ce92478'
'3bf51be3a1bbd262be46dc619f92aa90')
diff --git a/multilib/lib32-p11-kit/PKGBUILD b/multilib/lib32-p11-kit/PKGBUILD
new file mode 100644
index 000000000..b9963e719
--- /dev/null
+++ b/multilib/lib32-p11-kit/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Florian Pritz <bluewind@xinu.at>
+# Contributor: Christoph Vigano <mail@cvigano.de>
+
+_pkgbasename=p11-kit
+pkgname=lib32-$_pkgbasename
+pkgver=0.9
+pkgrel=3
+pkgdesc="Library to work with PKCS#11 modules (32-bit)"
+arch=(i686 x86_64)
+url="http://p11-glue.freedesktop.org"
+license=('BSD')
+depends=(lib32-glibc $_pkgbasename)
+options=(!libtool)
+source=($url/releases/$_pkgbasename-$pkgver.tar.gz)
+md5sums=('029aa2a3a103e7eb81b4aa731b93539e')
+
+build() {
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+ cd "$srcdir/$_pkgbasename-$pkgver"
+
+ ./configure --prefix=/usr --libdir=/usr/lib32 --sysconfdir=/etc \
+ --with-module-path=/usr/lib32/pkcs11
+ make
+}
+
+package() {
+ cd "$srcdir/$_pkgbasename-$pkgver"
+ make DESTDIR="$pkgdir" install
+ rm -rf "${pkgdir}"/etc
+ rm -rf "${pkgdir}"/usr/{bin,include,share}
+ install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/multilib/lib32-sqlite3/PKGBUILD b/multilib/lib32-sqlite3/PKGBUILD
index ea647b6b6..0b22d64ca 100644
--- a/multilib/lib32-sqlite3/PKGBUILD
+++ b/multilib/lib32-sqlite3/PKGBUILD
@@ -4,8 +4,8 @@
_pkgbasename=sqlite3
pkgname=lib32-sqlite3
-_amalgamationver=3070900
-pkgver=3.7.9
+_amalgamationver=3071000
+pkgver=3.7.10
pkgrel=1
pkgdesc="A C library that implements an SQL database engine (32-bit)"
arch=('x86_64')
@@ -15,7 +15,7 @@ depends=(lib32-glibc $_pkgbasename)
makedepends=('tcl' 'gcc-multilib' 'lib32-readline')
source=(http://www.sqlite.org/sqlite-src-${_amalgamationver}.zip)
options=(!libtool)
-md5sums=('b2646c5a0c0b5bc6b8f0b67fc318bab3')
+md5sums=('16da2e08ce2233556965cdf20d614bd9')
build() {
export CC="gcc -m32"
diff --git a/social/diaspora-git/PKGBUILD b/social/diaspora-git/PKGBUILD
index 77a11d701..3c241473b 100644
--- a/social/diaspora-git/PKGBUILD
+++ b/social/diaspora-git/PKGBUILD
@@ -1,41 +1,37 @@
# Maintainer: fauno <fauno@kiwwwi.com.ar>
# Maintainer: Hilton Medeiros <medeiros.hilton at gmail dot com>
+# Contributor: Jonne Haß <me@mrzyx.de>
# Contributor: Splashy <splash at open-web dot fr>
# After installing, see the Diaspora wiki page for more information:
# https://wiki.archlinux.org/index.php/Diaspora
pkgbase=diaspora-git
-pkgname=('diaspora-mysql-git' 'diaspora-postgresql-git' 'diaspora-sqlite-git')
-<<<<<<< HEAD
-pkgver=20110623
-=======
-pkgver=20111229
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
-pkgrel=1
+pkgname=('diaspora-mysql-git' 'diaspora-postgresql-git')
+pkgver=20120105
+pkgrel=2
pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network"
arch=('i686' 'x86_64')
url="https://diasporafoundation.org/"
license=('AGPL3')
-depends=('ruby' 'redis' 'imagemagick' 'libxslt')
-makedepends=('git' 'ruby-headers')
+depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'net-tools')
+makedepends=('git' 'libmysqlclient' 'postgresql-libs')
provides=('diaspora')
install=diaspora.install
source=('diaspora.bin'
'diaspora.rc'
'diaspora.logrotate'
- 'diaspora.pam')
-md5sums=('440ce2511485855030e74e28843a037d'
- '7bffaaee41b515247ba19a19c77dc5bf'
+ 'diaspora.pam'
+ 'diaspora.bashrc')
+md5sums=('547b0015c83da22bd739dc85fd79f9b9'
+ 'b7a893271d9ba778f74569eff4190c06'
'60f6b3972c73cbc6b1c9ab87c88fb655'
- '96f82c38f3f540b53f3e5144900acf17')
+ '96f82c38f3f540b53f3e5144900acf17'
+ '53867bfd389dd267eefcefb053fecc5b')
-_gitroot="https://github.com/diaspora/diaspora.git"
+_gitroot="git://github.com/diaspora/diaspora.git"
_gitname="diaspora"
-# I use this because I'm behind an asshole proxy
-tsocks=tsocks
-
build() {
cd "$srcdir"
@@ -43,35 +39,47 @@ build() {
if [[ -d $_gitname ]] ; then
pushd $_gitname
- $tsocks git pull origin
+ git pull origin
msg "The local files are updated."
popd
else
- $tsocks git clone $_gitroot
+ git clone $_gitroot
msg "Git clone done."
fi
msg "Start making..."
[[ -d $_gitname-build ]] && rm -fr $_gitname-build
-<<<<<<< HEAD
git clone $_gitname $_gitname-build
-=======
- $tsocks git clone $_gitname $_gitname-build
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
+ cd ${srcdir}/${_gitname}-build
-# Include all gems
- export GEM_HOME="${PWD}/vendor"
- export GEM_PATH="${PWD}/vendor"
- export PATH="${PATH}:${GEM_PATH}/bin"
+ # Symlink configs
+ ln -s /etc/webapps/$_gitname/application.yml config/application.yml
+ ln -s /etc/webapps/$_gitname/database.yml config/database.yml
+ ln -s /etc/webapps/$_gitname/script_server.yml config/script_server.yml
+ ln -s /etc/webapps/$_gitname/oauth_keys.yml config/oauth_keys.yml
- cd ${srcdir}/${_gitname}-build
+ # Set version header
+ sed "s|git_cmd = \`git log -1 --pretty=\"format:%H %ci\"\`|git_cmd = \"$(git log -1 --pretty="format:%H %ci")\"|" \
+ -i config/initializers/version_header.rb
-<<<<<<< HEAD
- gem install bundler
-=======
- $tsocks gem install bundler
->>>>>>> ddf6b4309b9f9816e75828359a2d60a23a0ca68c
+ # Preconfigure config/script_server.yml.example
+ sed 's|rails_env: "development"|rails_env: "production"|' \
+ -i config/script_server.yml.example
+
+ # Preconfigure right ca_file
+ sed "s|ca_file: '/etc/pki/tls/certs/ca-bundle.crt' # CentOS|ca_file: '/etc/ssl/certs/ca-certificates.crt' # Arch|" \
+ -i config/application.yml.example
+
+ # We make this now because we do not install the git history
+ # Comply with AGPLv3
+ tar czf public/source.tar.gz `git ls-tree -r master | awk '{print $4}'`
+
+ # Remove git repo
+ rm -fr .git
+
+ # Create gem cache
+ mkdir -p ${srcdir}/gem-cache
}
# Helper
@@ -83,34 +91,70 @@ _package() {
install -d "${usrdir}"
cp -a ${_gitname}-build "${usrdir}/${_gitname}"
- cd "${usrdir}/${_gitname}"
+ install -Dm755 $_gitname.bin "$pkgdir/usr/bin/$_gitname"
+ install -Dm755 $_gitname.rc "$pkgdir/etc/rc.d/$_gitname"
+ install -Dm644 $_gitname.logrotate "$pkgdir/etc/logrotate.d/$_gitname"
+ install -Dm644 $_gitname.pam "$pkgdir/etc/pam.d/$_gitname"
+ install -Dm644 $_gitname.bashrc "$usrdir/$_gitname/.bashrc"
-# Set the example config
- sed -e 's/rails_env:.*/rails_env: "production"/' \
- -e "s/db:.*/db: \"${DB}\"/" \
- -i config/script_server.yml.example
+# Set the DB in the environment
+ sed -i "s/-DB-/$DB/g" "$usrdir/$_gitname/.bashrc"
+ sed -i "s/-DB-/$_db_rc/g" "$pkgdir/etc/rc.d/$_gitname"
- ${tsocks} bundle install --local --path vendor --without development test
+ install -Dm644 $_gitname-build/config/application.yml.example "$pkgdir/etc/webapps/$_gitname/application.yml"
+ install -Dm644 $_gitname-build/config/database.yml.example "$pkgdir/etc/webapps/$_gitname/database.yml"
+ install -Dm644 $_gitname-build/config/script_server.yml.example "$pkgdir/etc/webapps/$_gitname/script_server.yml"
+ install -Dm644 $_gitname-build/config/oauth_keys.yml.example "$pkgdir/etc/webapps/$_gitname/oauth_keys.yml"
- find -type d -name ".git" -exec rm -fr '{}' \; &>/dev/null || true
+ # Include all gems
+ cd "${usrdir}/${_gitname}"
+ mkdir -p ${usrdir}/${_gitname}/vendor/ruby/1.9.1/
+ ln -s ${srcdir}/gem-cache ${usrdir}/${_gitname}/vendor/cache
+ ln -s ${srcdir}/gem-cache ${usrdir}/${_gitname}/vendor/ruby/1.9.1/cache
+
+ export GEM_HOME="${PWD}/vendor"
+ export GEM_PATH="${PWD}/vendor"
+ export PATH="${GEM_PATH}/bin:${PATH}"
+
+# TODO extract mysql2 version from Gemfile
+ case $DB in
+ mysql)
+ gem install mysql2 -v "0.2.17" -- --with-mysql-config=/usr/bin/mysql_config
+
+ ;;
+ posgres)
+ gem install pg -- --with-pg-config=/usr/bin/pg_config
+
+ # Preconfigure right subsection in database.yml.example
+ sed -e "s/<<: \*mysql/#<<: \*mysql/" \
+ -e "s/#<<: \*postgres/<<: \*postgres/" \
+ -i $_gitname-build/config/database.yml.example
+
+ # Preconfigure right db in script_server.yml
+ sed "s/db: \"mysql\"/db: \"postgres\"/" \
+ -i $_gitname-build/config/script_server.yml.example
+
+ esac
+
+ gem install bundler
+ bundle install --path ${GEM_PATH} --without development test heroku
- install -Dm755 ${_gitname}.bin "${pkgdir}/usr/bin/${_gitname}"
- install -Dm755 ${_gitname}.rc "${pkgdir}/etc/rc.d/${_gitname}"
- install -Dm644 ${_gitname}.logrotate "${pkgdir}/etc/logrotate.d/${_gitname}"
- install -Dm644 ${_gitname}.pam "${pkgdir}/etc/pam.d/${_gitname}"
+ install -d $pkgdir/usr/share/licenses/$_gitname/
+ install -Dm644 ${srcdir}/$_gitname-build/{AUTHORS,COPYRIGHT,GNU-AGPL-3.0} \
+ $pkgdir/usr/share/licenses/$_gitname/
- install -d ${pkgdir}/usr/share/licenses/${_gitname}/
- install -Dm644 ${srcdir}/${_gitname}-build/{AUTHORS,COPYRIGHT,GNU-AGPL-3.0} \
- ${pkgdir}/usr/share/licenses/${_gitname}/
+ msg "Removing gem cache"
+ rm -vr ${usrdir}/${_gitname}/vendor/{,ruby/1.9.1/}cache
}
package_diaspora-mysql-git() {
pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network (MySQL version)"
provides=('diaspora-mysql' 'diaspora')
- depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'mysql')
+ depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'net-tools' 'mysql' 'libmysqlclient')
options=(!strip)
export DB="mysql"
+ export _db_rc="mysqld"
_package
}
@@ -118,21 +162,11 @@ package_diaspora-mysql-git() {
package_diaspora-postgresql-git() {
pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network (PostgreSQL version)"
provides=('diaspora-postgresql' 'diaspora')
- depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'postgresql')
- options=(!strip)
-
- export DB="postgresql"
-
- _package
-}
-
-package_diaspora-sqlite-git() {
- pkgdesc="A privacy aware, personally controlled, do-it-all, open source social network (SQLite3 version)"
- provides=('diaspora-sqlite' 'diaspora')
- depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'sqlite3')
+ depends=('ruby' 'redis' 'imagemagick' 'libxslt' 'net-tools' 'postgresql')
options=(!strip)
- export DB="sqlite"
+ export DB="postgres"
+ export _db_rc="postgresql"
_package
}
diff --git a/social/diaspora-git/diaspora.bashrc b/social/diaspora-git/diaspora.bashrc
new file mode 100644
index 000000000..b694ca0b0
--- /dev/null
+++ b/social/diaspora-git/diaspora.bashrc
@@ -0,0 +1,6 @@
+export GEM_HOME="${HOME}/.gems"
+export GEM_PATH="${HOME}/.gems"
+export PATH="${GEM_PATH}/bin:${PATH}"
+export RAILS_ENV="production"
+export DB="-DB-"
+
diff --git a/social/diaspora-git/diaspora.bin b/social/diaspora-git/diaspora.bin
index 2168c7e7c..dfd0d026f 100644
--- a/social/diaspora-git/diaspora.bin
+++ b/social/diaspora-git/diaspora.bin
@@ -1,6 +1,9 @@
-#!/bin/bash
+#!/bin/sh
-cd /usr/share/webapps/diaspora
-export GEM_HOME=${PWD}/vendor
-
-./script/server &>>/var/log/diaspora.log
+if [ "$(whoami)" == "diaspora" ]; then
+ cd /usr/share/webapps/diaspora
+ source ./.bashrc
+ ./script/server &>>/var/log/diaspora.log
+else
+ echo 'Please run this as the "diaspora" user!'
+fi
diff --git a/social/diaspora-git/diaspora.rc b/social/diaspora-git/diaspora.rc
index bd79237ee..8464f3947 100644
--- a/social/diaspora-git/diaspora.rc
+++ b/social/diaspora-git/diaspora.rc
@@ -10,8 +10,8 @@ PID=`pgrep -u $daemon_name`
case "$1" in
start)
- #Check if mysqld and redis are running, start them if not
- ck_daemon mysqld && /etc/rc.d/mysqld start
+ #Check if db and redis are running, start them if not
+ ck_daemon -DB- && /etc/rc.d/-DB- start
ck_daemon redis && /etc/rc.d/redis start
if [ ! -e /var/log/$daemon_name.log ]; then
diff --git a/staging/djvulibre/PKGBUILD b/staging/djvulibre/PKGBUILD
new file mode 100644
index 000000000..ef6bc1842
--- /dev/null
+++ b/staging/djvulibre/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 147068 2012-01-21 14:25:07Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: mgushee
+
+pkgname=djvulibre
+pkgver=3.5.24
+pkgrel=3
+pkgdesc="Suite to create, manipulate and view DjVu ('déjà vu') documents"
+arch=("i686" "x86_64")
+license=('GPL')
+url="http://djvu.sourceforge.net/"
+depends=('gcc-libs' 'libtiff>=4.0.0' 'bash' 'hicolor-icon-theme')
+makedepends=('pkg-config')
+provides=("libdjvu=${pkgver}")
+replaces=('libdjvu')
+conflicts=('libdjvu')
+optdepends=('djview4: Viewer application')
+options=('!libtool')
+install=djvulibre.install
+source=(http://downloads.sourceforge.net/djvu/${pkgname}-${pkgver}.tar.gz
+ git-fixes.patch)
+md5sums=('af83d27af5083198432a178d22b259c5'
+ 'ff3798e383e9c3fae407455d8a51deec')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/git-fixes.patch"
+ ./configure --prefix=/usr --disable-desktopfiles
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ #Install icons for mime-types.
+ install -m755 -d ${pkgdir}/usr/share/icons/hicolor/{22x22,32x32,48x48,64x64}/mimetypes
+ for sz in 22 32 48 64; do
+ install -m644 desktopfiles/prebuilt-hi${sz}-djvu.png "${pkgdir}/usr/share/icons/hicolor/${sz}x${sz}/mimetypes/image-vnd.djvu.mime.png"
+ done
+}
diff --git a/staging/djvulibre/djvulibre.install b/staging/djvulibre/djvulibre.install
new file mode 100644
index 000000000..3e9bb5c49
--- /dev/null
+++ b/staging/djvulibre/djvulibre.install
@@ -0,0 +1,13 @@
+post_install() {
+ if [ -x usr/bin/gtk-update-icon-cache ]; then
+ gtk-update-icon-cache -q -f usr/share/icons/hicolor
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/djvulibre/git-fixes.patch b/staging/djvulibre/git-fixes.patch
new file mode 100644
index 000000000..3077cf0b4
--- /dev/null
+++ b/staging/djvulibre/git-fixes.patch
@@ -0,0 +1,1607 @@
+From 3341545edba359b292a8ef6db1b7d342caf3dcf1 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Wed, 4 May 2011 21:25:35 -0700
+Subject: [PATCH] Added include <stddef.h> for gcc-4.6
+
+---
+ libdjvu/BSByteStream.cpp | 1 +
+ libdjvu/BSEncodeByteStream.cpp | 1 +
+ libdjvu/ByteStream.cpp | 1 +
+ libdjvu/DjVuFileCache.cpp | 1 +
+ libdjvu/DjVuGlobal.cpp | 2 ++
+ libdjvu/DjVuGlobalMemory.cpp | 2 ++
+ libdjvu/DjVuMessage.cpp | 1 +
+ libdjvu/DjVuMessageLite.cpp | 2 +-
+ libdjvu/DjVuPalette.cpp | 2 ++
+ libdjvu/DjVuPort.h | 1 +
+ libdjvu/DjVuToPS.cpp | 1 +
+ libdjvu/GBitmap.cpp | 2 ++
+ libdjvu/GException.cpp | 1 +
+ libdjvu/GOS.cpp | 1 +
+ libdjvu/GPixmap.cpp | 2 ++
+ libdjvu/GSmartPointer.cpp | 1 +
+ libdjvu/GSmartPointer.h | 2 ++
+ libdjvu/GString.cpp | 1 +
+ libdjvu/GString.h | 1 +
+ libdjvu/GThreads.cpp | 2 ++
+ libdjvu/GURL.cpp | 1 +
+ libdjvu/GUnicode.cpp | 2 ++
+ libdjvu/IFFByteStream.h | 1 +
+ libdjvu/IW44EncodeCodec.cpp | 1 +
+ libdjvu/IW44Image.cpp | 1 +
+ libdjvu/JPEGDecoder.h | 1 +
+ libdjvu/MMX.cpp | 1 +
+ libdjvu/UnicodeByteStream.h | 1 +
+ libdjvu/XMLParser.cpp | 1 +
+ libdjvu/ZPCodec.cpp | 2 ++
+ libdjvu/atomic.cpp | 1 +
+ libdjvu/ddjvuapi.cpp | 1 +
+ libdjvu/ddjvuapi.h | 1 +
+ libdjvu/miniexp.cpp | 1 +
+ libdjvu/miniexp.h | 3 ++-
+ tools/bzz.cpp | 1 +
+ tools/c44.cpp | 1 +
+ tools/cjb2.cpp | 1 +
+ tools/cpaldjvu.cpp | 1 +
+ tools/csepdjvu.cpp | 1 +
+ tools/ddjvu.cpp | 1 +
+ tools/djvm.cpp | 2 +-
+ tools/djvmcvt.cpp | 1 +
+ tools/djvudump.cpp | 1 +
+ tools/djvuextract.cpp | 1 +
+ tools/djvumake.cpp | 1 +
+ tools/djvups.cpp | 1 +
+ tools/djvused.cpp | 1 +
+ tools/djvuserve.cpp | 1 +
+ tools/djvutxt.cpp | 1 +
+ tools/tiff2pdf.h | 1 +
+ xmltools/djvutoxml.cpp | 1 +
+ xmltools/djvuxmlparser.cpp | 1 +
+ 53 files changed, 63 insertions(+), 3 deletions(-)
+
+diff --git a/libdjvu/BSByteStream.cpp b/libdjvu/BSByteStream.cpp
+index b762ccf..d662ab0 100644
+--- a/libdjvu/BSByteStream.cpp
++++ b/libdjvu/BSByteStream.cpp
+@@ -62,6 +62,7 @@
+
+ // - Author: Leon Bottou, 07/1998
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/BSEncodeByteStream.cpp b/libdjvu/BSEncodeByteStream.cpp
+index 5d80e51..68bc3e3 100644
+--- a/libdjvu/BSEncodeByteStream.cpp
++++ b/libdjvu/BSEncodeByteStream.cpp
+@@ -71,6 +71,7 @@
+ #include "GOS.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/ByteStream.cpp b/libdjvu/ByteStream.cpp
+index 158c33c..be01847 100644
+--- a/libdjvu/ByteStream.cpp
++++ b/libdjvu/ByteStream.cpp
+@@ -73,6 +73,7 @@
+ #include "GOS.h"
+ #include "GURL.h"
+ #include "DjVuMessage.h"
++#include <stddef.h>
+ #include <fcntl.h>
+ #if defined(WIN32) || defined(__CYGWIN32__)
+ # include <io.h>
+diff --git a/libdjvu/DjVuFileCache.cpp b/libdjvu/DjVuFileCache.cpp
+index 6b1e85d..7d7a192 100644
+--- a/libdjvu/DjVuFileCache.cpp
++++ b/libdjvu/DjVuFileCache.cpp
+@@ -63,6 +63,7 @@
+ #include "DjVuFileCache.h"
+ #include "debug.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+
+
+diff --git a/libdjvu/DjVuGlobal.cpp b/libdjvu/DjVuGlobal.cpp
+index e6d3cec..df9278e 100644
+--- a/libdjvu/DjVuGlobal.cpp
++++ b/libdjvu/DjVuGlobal.cpp
+@@ -76,6 +76,8 @@
+ #include "GThreads.h"
+ #include "GException.h"
+ #include "GContainer.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/DjVuGlobalMemory.cpp b/libdjvu/DjVuGlobalMemory.cpp
+index 3c6012c..c8ba309 100644
+--- a/libdjvu/DjVuGlobalMemory.cpp
++++ b/libdjvu/DjVuGlobalMemory.cpp
+@@ -67,6 +67,8 @@
+
+ #include "DjVuGlobal.h"
+ #include "GException.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "debug.h"
+diff --git a/libdjvu/DjVuMessage.cpp b/libdjvu/DjVuMessage.cpp
+index 6f5a735..1726025 100644
+--- a/libdjvu/DjVuMessage.cpp
++++ b/libdjvu/DjVuMessage.cpp
+@@ -71,6 +71,7 @@
+ #include "debug.h"
+ #include <ctype.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #ifdef WIN32
+ # include <tchar.h>
+diff --git a/libdjvu/DjVuMessageLite.cpp b/libdjvu/DjVuMessageLite.cpp
+index b8c1010..5daa9d9 100644
+--- a/libdjvu/DjVuMessageLite.cpp
++++ b/libdjvu/DjVuMessageLite.cpp
+@@ -73,8 +73,8 @@
+ #include "debug.h"
+ #include <ctype.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <stdlib.h>
+-// #include <stdio.h>
+ #ifdef WIN32
+ #include <tchar.h>
+ #include <windows.h>
+diff --git a/libdjvu/DjVuPalette.cpp b/libdjvu/DjVuPalette.cpp
+index c489f7b..76b0bf4 100644
+--- a/libdjvu/DjVuPalette.cpp
++++ b/libdjvu/DjVuPalette.cpp
+@@ -64,6 +64,8 @@
+ #include "ByteStream.h"
+ #include "BSByteStream.h"
+ #include "DjVuPalette.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <math.h>
+
+diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h
+index f6a92f6..e2b3125 100644
+--- a/libdjvu/DjVuPort.h
++++ b/libdjvu/DjVuPort.h
+@@ -65,6 +65,7 @@
+
+ #include "GThreads.h"
+ #include "GURL.h"
++#include "stddef.h"
+
+ #ifdef HAVE_NAMESPACES
+ namespace DJVU {
+diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp
+index 5517bf3..6914ff9 100644
+--- a/libdjvu/DjVuToPS.cpp
++++ b/libdjvu/DjVuToPS.cpp
+@@ -72,6 +72,7 @@
+ #include "GPixmap.h"
+ #include "debug.h"
+ #include <stdarg.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <time.h>
+diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp
+index ab5c0de..797edcc 100644
+--- a/libdjvu/GBitmap.cpp
++++ b/libdjvu/GBitmap.cpp
+@@ -66,6 +66,8 @@
+ #include "GString.h"
+ #include "GThreads.h"
+ #include "GException.h"
++#include <stddef.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ // - Author: Leon Bottou, 05/1997
+diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp
+index 2ea179a..89da70f 100644
+--- a/libdjvu/GException.cpp
++++ b/libdjvu/GException.cpp
+@@ -60,6 +60,7 @@
+ # pragma implementation
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp
+index e784932..d2088e2 100644
+--- a/libdjvu/GOS.cpp
++++ b/libdjvu/GOS.cpp
+@@ -65,6 +65,7 @@
+ #include "GOS.h"
+ #include "GURL.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+diff --git a/libdjvu/GPixmap.cpp b/libdjvu/GPixmap.cpp
+index 392df54..4bf6f57 100644
+--- a/libdjvu/GPixmap.cpp
++++ b/libdjvu/GPixmap.cpp
+@@ -75,6 +75,8 @@
+ #include "GThreads.h"
+ #include "Arrays.h"
+ #include "JPEGDecoder.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <math.h>
+ #include <assert.h>
+diff --git a/libdjvu/GSmartPointer.cpp b/libdjvu/GSmartPointer.cpp
+index 6e523e7..58aef5b 100644
+--- a/libdjvu/GSmartPointer.cpp
++++ b/libdjvu/GSmartPointer.cpp
+@@ -67,6 +67,7 @@
+ // Our original implementation consisted of multiple classes.
+ // <http://prdownloads.sourceforge.net/djvu/DjVu2_2b-src.tgz>.
+
++#include <stddef.h>
+ #include <string.h>
+ #if PARANOID_DEBUG
+ # include <assert.h>
+diff --git a/libdjvu/GSmartPointer.h b/libdjvu/GSmartPointer.h
+index 82781bd..8a8bb8a 100644
+--- a/libdjvu/GSmartPointer.h
++++ b/libdjvu/GSmartPointer.h
+@@ -97,6 +97,8 @@
+ #include "DjVuGlobal.h"
+ #include "atomic.h"
+
++#include <stddef.h>
++
+ #ifdef HAVE_NAMESPACES
+ namespace DJVU {
+ # ifdef NOT_DEFINED // Just to fool emacs c++ mode
+diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
+index 03f6226..350b11b 100644
+--- a/libdjvu/GString.cpp
++++ b/libdjvu/GString.cpp
+@@ -73,6 +73,7 @@
+ #include "GThreads.h"
+ #include "debug.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/GString.h b/libdjvu/GString.h
+index b63b753..3aa1f76 100644
+--- a/libdjvu/GString.h
++++ b/libdjvu/GString.h
+@@ -108,6 +108,7 @@
+ #include "DjVuGlobal.h"
+ #include "GContainer.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #ifdef WIN32
+diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp
+index d81f3c3..253fed8 100644
+--- a/libdjvu/GThreads.cpp
++++ b/libdjvu/GThreads.cpp
+@@ -71,6 +71,8 @@
+ #include "GThreads.h"
+ #include "GException.h"
+ #include "DjVuMessageLite.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+
+diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp
+index c37bf52..a80078c 100644
+--- a/libdjvu/GURL.cpp
++++ b/libdjvu/GURL.cpp
+@@ -72,6 +72,7 @@
+ #include "GURL.h"
+ #include "debug.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp
+index 415c081..a8b25b8 100644
+--- a/libdjvu/GUnicode.cpp
++++ b/libdjvu/GUnicode.cpp
+@@ -62,6 +62,8 @@
+
+ #include "GString.h"
+
++#include <stddef.h>
++
+ #if HAS_ICONV
+ #include <iconv.h>
+ #endif
+diff --git a/libdjvu/IFFByteStream.h b/libdjvu/IFFByteStream.h
+index a653f8c..e31b216 100644
+--- a/libdjvu/IFFByteStream.h
++++ b/libdjvu/IFFByteStream.h
+@@ -124,6 +124,7 @@
+
+
+ #include "DjVuGlobal.h"
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp
+index 8d7b12c..49081b7 100644
+--- a/libdjvu/IW44EncodeCodec.cpp
++++ b/libdjvu/IW44EncodeCodec.cpp
+@@ -76,6 +76,7 @@
+ #include "IFFByteStream.h"
+ #include "GRect.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp
+index 9476726..4a19fb5 100644
+--- a/libdjvu/IW44Image.cpp
++++ b/libdjvu/IW44Image.cpp
+@@ -76,6 +76,7 @@
+ #include "IFFByteStream.h"
+ #include "GRect.h"
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
+diff --git a/libdjvu/JPEGDecoder.h b/libdjvu/JPEGDecoder.h
+index bd430a0..fad1d4c 100644
+--- a/libdjvu/JPEGDecoder.h
++++ b/libdjvu/JPEGDecoder.h
+@@ -64,6 +64,7 @@
+
+ #ifdef NEED_JPEG_DECODER
+
++#include <stddef.h>
+ #include <string.h>
+ #include <setjmp.h>
+
+diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp
+index 5ab60bb..528dab6 100644
+--- a/libdjvu/MMX.cpp
++++ b/libdjvu/MMX.cpp
+@@ -62,6 +62,7 @@
+
+ #include "MMX.h"
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+
+diff --git a/libdjvu/UnicodeByteStream.h b/libdjvu/UnicodeByteStream.h
+index 0ae112b..9b49a17 100644
+--- a/libdjvu/UnicodeByteStream.h
++++ b/libdjvu/UnicodeByteStream.h
+@@ -88,6 +88,7 @@
+ #include "GString.h"
+ #include "ByteStream.h"
+
++#include <stddef.h>
+
+ #ifdef HAVE_NAMESPACES
+ namespace DJVU {
+diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp
+index 84386c5..7da923a 100644
+--- a/libdjvu/XMLParser.cpp
++++ b/libdjvu/XMLParser.cpp
+@@ -75,6 +75,7 @@
+ #include "debug.h"
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+
+diff --git a/libdjvu/ZPCodec.cpp b/libdjvu/ZPCodec.cpp
+index f6e971d..ff5b9bf 100644
+--- a/libdjvu/ZPCodec.cpp
++++ b/libdjvu/ZPCodec.cpp
+@@ -66,6 +66,8 @@
+ #include "ZPCodec.h"
+ #include "ByteStream.h"
+ #include "GException.h"
++
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <assert.h>
+ #include <math.h>
+diff --git a/libdjvu/atomic.cpp b/libdjvu/atomic.cpp
+index bdc193e..63fd483 100644
+--- a/libdjvu/atomic.cpp
++++ b/libdjvu/atomic.cpp
+@@ -28,6 +28,7 @@
+ # include "config.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <assert.h>
+ #include "atomic.h"
+diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp
+index b18b84b..f40f5aa 100644
+--- a/libdjvu/ddjvuapi.cpp
++++ b/libdjvu/ddjvuapi.cpp
+@@ -60,6 +60,7 @@
+ # pragma implementation "ddjvuapi.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h
+index d0ed48f..841f223 100644
+--- a/libdjvu/ddjvuapi.h
++++ b/libdjvu/ddjvuapi.h
+@@ -64,6 +64,7 @@ extern "C" {
+ }
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+
+diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp
+index e0fb087..fc51297 100644
+--- a/libdjvu/miniexp.cpp
++++ b/libdjvu/miniexp.cpp
+@@ -23,6 +23,7 @@
+ # pragma implementation "miniexp.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <ctype.h>
+diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h
+index 91e345d..993005b 100644
+--- a/libdjvu/miniexp.h
++++ b/libdjvu/miniexp.h
+@@ -38,7 +38,8 @@ extern "C" {
+ #ifndef MINILISPAPI
+ # define MINILISPAPI /**/
+ #endif
+-
++
++#include <stddef.h>
+
+ /* -------------------------------------------------- */
+ /* LISP EXPRESSIONS */
+diff --git a/tools/bzz.cpp b/tools/bzz.cpp
+index ca092e1..2ebc7b9 100644
+--- a/tools/bzz.cpp
++++ b/tools/bzz.cpp
+@@ -94,6 +94,7 @@
+ #include "GURL.h"
+ #include "DjVuMessage.h"
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+ static const char *program = "(unknown)";
+diff --git a/tools/c44.cpp b/tools/c44.cpp
+index 6f23b53..855504b 100644
+--- a/tools/c44.cpp
++++ b/tools/c44.cpp
+@@ -226,6 +226,7 @@
+ #include <locale.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+ // command line data
+diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp
+index 8cf89b9..11eb662 100644
+--- a/tools/cjb2.cpp
++++ b/tools/cjb2.cpp
+@@ -120,6 +120,7 @@
+ #include "jb2tune.h"
+
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #if HAVE_TIFF
+ #include <tiffio.h>
+diff --git a/tools/cpaldjvu.cpp b/tools/cpaldjvu.cpp
+index 111cbd3..b640a7a 100644
+--- a/tools/cpaldjvu.cpp
++++ b/tools/cpaldjvu.cpp
+@@ -118,6 +118,7 @@
+ #include "jb2tune.h"
+
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <math.h>
+
+diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp
+index cd721f8..d5203d5 100644
+--- a/tools/csepdjvu.cpp
++++ b/tools/csepdjvu.cpp
+@@ -162,6 +162,7 @@
+ #include "jb2tune.h"
+
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+ #undef MIN
+diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
+index 817e045..981a270 100644
+--- a/tools/ddjvu.cpp
++++ b/tools/ddjvu.cpp
+@@ -62,6 +62,7 @@
+ # include "config.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+diff --git a/tools/djvm.cpp b/tools/djvm.cpp
+index 951bd66..6ea88c2 100644
+--- a/tools/djvm.cpp
++++ b/tools/djvm.cpp
+@@ -135,9 +135,9 @@
+ #include "DjVuMessage.h"
+
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+-#include <stdlib.h>
+
+ static const char * progname;
+
+diff --git a/tools/djvmcvt.cpp b/tools/djvmcvt.cpp
+index 9ca1c54..20b468a 100644
+--- a/tools/djvmcvt.cpp
++++ b/tools/djvmcvt.cpp
+@@ -144,6 +144,7 @@
+
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+ static const char * progname;
+diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp
+index 6a0215a..2dddbdf 100644
+--- a/tools/djvudump.cpp
++++ b/tools/djvudump.cpp
+@@ -119,6 +119,7 @@ xxx
+ #include <locale.h>
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+ void
+diff --git a/tools/djvuextract.cpp b/tools/djvuextract.cpp
+index 4a9f381..907b99c 100644
+--- a/tools/djvuextract.cpp
++++ b/tools/djvuextract.cpp
+@@ -105,6 +105,7 @@
+ #include "GOS.h"
+ #include "DjVuMessage.h"
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+
+diff --git a/tools/djvumake.cpp b/tools/djvumake.cpp
+index 7020484..4c5fc0f 100644
+--- a/tools/djvumake.cpp
++++ b/tools/djvumake.cpp
+@@ -153,6 +153,7 @@
+
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <ctype.h>
+
+diff --git a/tools/djvups.cpp b/tools/djvups.cpp
+index 51aa999..632b832 100644
+--- a/tools/djvups.cpp
++++ b/tools/djvups.cpp
+@@ -57,6 +57,7 @@
+ # include "config.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+diff --git a/tools/djvused.cpp b/tools/djvused.cpp
+index de84dcd..687fdca 100644
+--- a/tools/djvused.cpp
++++ b/tools/djvused.cpp
+@@ -61,6 +61,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <errno.h>
+diff --git a/tools/djvuserve.cpp b/tools/djvuserve.cpp
+index 19a17da..818fe78 100644
+--- a/tools/djvuserve.cpp
++++ b/tools/djvuserve.cpp
+@@ -73,6 +73,7 @@
+
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <time.h>
+diff --git a/tools/djvutxt.cpp b/tools/djvutxt.cpp
+index ba2c745..9e9124c 100644
+--- a/tools/djvutxt.cpp
++++ b/tools/djvutxt.cpp
+@@ -61,6 +61,7 @@
+ # include "config.h"
+ #endif
+
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+diff --git a/tools/tiff2pdf.h b/tools/tiff2pdf.h
+index 082f5fb..656dc43 100644
+--- a/tools/tiff2pdf.h
++++ b/tools/tiff2pdf.h
+@@ -22,6 +22,7 @@
+ # endif
+ # if HAVE_TIFF
+ # include <stdio.h>
++# include <stddef.h>
+ # include <stdlib.h>
+ # include <tiff.h>
+ # include <tiffio.h>
+diff --git a/xmltools/djvutoxml.cpp b/xmltools/djvutoxml.cpp
+index 17c769b..b40535e 100644
+--- a/xmltools/djvutoxml.cpp
++++ b/xmltools/djvutoxml.cpp
+@@ -71,6 +71,7 @@
+
+ #include <locale.h>
+ #include <stdio.h>
++#include <stddef.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
+ #include <assert.h>
+diff --git a/xmltools/djvuxmlparser.cpp b/xmltools/djvuxmlparser.cpp
+index bdc5768..6679a9d 100644
+--- a/xmltools/djvuxmlparser.cpp
++++ b/xmltools/djvuxmlparser.cpp
+@@ -70,6 +70,7 @@
+ #include <stdio.h>
+ #include <ctype.h>
+ #include <locale.h>
++#include <stddef.h>
+ #include <stdlib.h>
+
+ static void
+--
+1.7.4.1
+
+From 3cc41e2a72bbd6d34e81a9a214abbebf41cc00c7 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sat, 21 May 2011 09:27:17 -0700
+Subject: [PATCH] Added ddjvu option to skip corrupted pages.
+
+---
+ tools/ddjvu.1 | 7 +++++++
+ tools/ddjvu.cpp | 49 +++++++++++++++++++++++++++++++++----------------
+ 2 files changed, 40 insertions(+), 16 deletions(-)
+
+diff --git a/tools/ddjvu.1 b/tools/ddjvu.1
+index 29285c3..7d3d105 100644
+--- a/tools/ddjvu.1
++++ b/tools/ddjvu.1
+@@ -178,6 +178,13 @@ select specific layers of a DjVu image.
+ These modes can fail if the DjVu image does
+ not contain the selected layer.
+ .RE
++.TP
++.BI "-skip"
++Instead of aborting when encountering a corrupted page,
++this option causes
++.BR ddjvu
++to simply skip the corrupted page and continue with the next.
++This is useful for processing certain damaged files.
+
+ .SH RESOLUTION OPTIONS
+ The following options control the resolution of the output image.
+diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
+index 981a270..b9cb038 100644
+--- a/tools/ddjvu.cpp
++++ b/tools/ddjvu.cpp
+@@ -132,6 +132,7 @@ ddjvu_rect_t info_size;
+ ddjvu_rect_t info_segment;
+ const char *inputfilename = 0;
+ const char *outputfilename = 0;
++int flag_skip_corrupted = 0;
+
+ #if HAVE_TIFF2PDF
+ char *tempfilename = 0;
+@@ -164,7 +165,6 @@ handle(int wait)
+ if (msg->m_error.filename)
+ fprintf(stderr,"ddjvu: '%s:%d'\n",
+ msg->m_error.filename, msg->m_error.lineno);
+- exit(10);
+ default:
+ break;
+ }
+@@ -554,8 +554,16 @@ dopage(int pageno)
+ while (! ddjvu_page_decoding_done(page))
+ handle(TRUE);
+ if (ddjvu_page_decoding_error(page))
+- die(i18n("Cannot decode page %d."), pageno);
+-
++ {
++ handle(FALSE);
++ fprintf(stderr,"ddjvu: ");
++ fprintf(stderr,i18n("Cannot decode page %d."), pageno);
++ fprintf(stderr,"\n");
++ if (flag_skip_corrupted)
++ return;
++ else
++ exit(10);
++ }
+ timingdata[1] = ticks();
+ /* Open files */
+ if (flag_format == 't')
+@@ -753,19 +761,20 @@ usage()
+ i18n("DjVu decompression utility\n\n"
+ "Usage: ddjvu [options] [<djvufile> [<outputfile>]]\n\n"
+ "Options:\n"
+- " -verbose Prints various informational messages.\n"
+- " -format=FMT Selects output format: pbm,pgm,ppm,pnm,rle,tiff.\n"
+- " -scale=N Selects display scale.\n"
+- " -size=WxH Selects size of rendered image.\n"
+- " -subsample=N Selects direct subsampling factor.\n"
+- " -aspect=no Authorizes aspect ratio changes\n"
+- " -segment=WxH+X+Y Selects which segment of the rendered image\n"
+- " -mode=black Renders a meaningful bitonal image.\n"
+- " -mode=mask Only renders the mask layer.\n"
+- " -mode=foreground Only renders the foreground layer.\n"
+- " -mode=background Only renders the background layer.\n"
+- " -page=PAGESPEC Selects page(s) to be decoded.\n"
+- " -quality=QUALITY Specifies jpeg quality for lossy tiff output.\n"
++ " -verbose Print various informational messages.\n"
++ " -format=FMT Select output format: pbm,pgm,ppm,pnm,rle,tiff.\n"
++ " -scale=N Select display scale.\n"
++ " -size=WxH Select size of rendered image.\n"
++ " -subsample=N Select direct subsampling factor.\n"
++ " -aspect=no Authorize aspect ratio changes\n"
++ " -segment=WxH+X+Y Select which segment of the rendered image\n"
++ " -mode=black Render a meaningful bitonal image.\n"
++ " -mode=mask Only render the mask layer.\n"
++ " -mode=foreground Only render the foreground layer.\n"
++ " -mode=background Only render the background layer.\n"
++ " -page=PAGESPEC Select page(s) to be decoded.\n"
++ " -skip Skip corrupted pages instead of aborting.\n"
++ " -quality=QUALITY Specify jpeg quality for lossy tiff output.\n"
+ "\n"
+ "If <outputfile> is a single dash or omitted, the decompressed image\n"
+ "is sent to the standard output. If <djvufile> is a single dash or\n"
+@@ -846,6 +855,12 @@ parse_option(int argc, char **argv, int i)
+ die(i18n(errarg), opt);
+ flag_verbose = 1;
+ }
++ if (!strcmp(opt,"skip"))
++ {
++ if (arg)
++ die(i18n(errarg), opt);
++ flag_skip_corrupted = 1;
++ }
+ else if (!strcmp(opt,"scale"))
+ {
+ if (!arg)
+@@ -1012,6 +1027,8 @@ main(int argc, char **argv)
+ die(i18n("Cannot open djvu document '%s'."), inputfilename);
+ while (! ddjvu_document_decoding_done(doc))
+ handle(TRUE);
++ if (ddjvu_document_decoding_error(doc))
++ die(i18n("Cannot decode document."));
+
+ /* Process all pages */
+ i = ddjvu_document_get_pagenum(doc);
+--
+1.7.4.1
+
+From 6a6e6a047b41a431cfc091bd71fcad554fd79437 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Mon, 30 May 2011 18:52:33 -0700
+Subject: [PATCH] Added option -o outputfile to djvudump.
+
+---
+ tools/djvudump.1 | 2 +-
+ tools/djvudump.cpp | 34 +++++++++++++++++++++++++---------
+ 2 files changed, 26 insertions(+), 10 deletions(-)
+
+diff --git a/tools/djvudump.1 b/tools/djvudump.1
+index c86b7d5..e39a318 100644
+--- a/tools/djvudump.1
++++ b/tools/djvudump.1
+@@ -27,7 +27,7 @@
+ djvudump \- Display internal structure of DjVu files.
+
+ .SH SYNOPSIS
+-.BI "djvudump " "djvufiles" "..."
++.BI "djvudump [-o " "outputfile" "] " "djvufiles" "..."
+
+ .SH DESCRIPTION
+ Program
+diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp
+index 2dddbdf..6daaf2c 100644
+--- a/tools/djvudump.cpp
++++ b/tools/djvudump.cpp
+@@ -122,6 +122,9 @@ xxx
+ #include <stddef.h>
+ #include <stdlib.h>
+
++const char *outputfile = 0;
++FILE *outputf = stdout;
++
+ void
+ display(const GURL &url)
+ {
+@@ -134,7 +137,7 @@ display(const GURL &url)
+ obs->seek(0);
+ obs->readall(buf, size);
+ GNativeString ns = str;
+- fputs((const char*)ns, stdout);
++ fputs((const char*)ns, outputf);
+ }
+
+
+@@ -146,7 +149,7 @@ usage()
+ "DJVUDUMP --- DjVuLibre-" DJVULIBRE_VERSION "\n"
+ #endif
+ "Describes DjVu and IFF85 files\n\n"
+- "Usage: djvudump <iff_filenames>\n" );
++ "Usage: djvudump [-o outputfile] <iff_filenames>\n" );
+ exit(1);
+ }
+
+@@ -156,24 +159,37 @@ main(int argc, char **argv)
+ setlocale(LC_ALL,"");
+ setlocale(LC_NUMERIC,"C");
+ djvu_programname(argv[0]);
+- GArray<GUTF8String> dargv(0,argc-1);
++ // get output file name
++ if (argc>2 && !strcmp(argv[1],"-o"))
++ {
++ outputfile = argv[2];
++ argv += 2;
++ argc -= 2;
++ }
++ // convert iff file name
++ GArray<GUTF8String> dargv(0, argc-1);
+ for(int i=0;i<argc;++i)
+ dargv[i]=GNativeString(argv[i]);
++ if (argc <= 1)
++ usage();
++ if (outputfile && !(outputf = fopen(outputfile,"w")))
++ {
++ DjVuPrintErrorUTF8("djvudump: Cannot open output file.\n");
++ exit(1);
++ }
+ G_TRY
+ {
+- if (argc<=1)
+- usage();
+ for (int i=1; i<argc; i++)
+- {
++ {
+ const GURL::Filename::UTF8 url(dargv[i]);
+ display(url);
+- }
++ }
+ }
+ G_CATCH(ex)
+- {
++ {
+ ex.perror();
+ exit(1);
+- }
++ }
+ G_ENDCATCH;
+ return 0;
+ }
+--
+1.7.4.1
+
+From 6db359d1ad5e7e863fac53301e7ff884cfe44423 Mon Sep 17 00:00:00 2001
+From: Bill C Riemers <briemers@redhat.com>
+Date: Thu, 2 Jun 2011 13:17:27 -0400
+Subject: [PATCH] Correct error copying an error in the annotation class of assigning a tempory
+ GUTF8String directly to a const char *.
+
+---
+ libdjvu/DjVuAnno.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/libdjvu/DjVuAnno.cpp b/libdjvu/DjVuAnno.cpp
+index 6ca5b4e..e2a9108 100644
+--- a/libdjvu/DjVuAnno.cpp
++++ b/libdjvu/DjVuAnno.cpp
+@@ -261,7 +261,8 @@ GLObject::print(ByteStream & str, int compact, int indent, int * cur_pos) const
+ to_print=buffer.format("%d",number);
+ break;
+ case STRING:
+- to_print=make_c_string(string);
++ buffer=make_c_string(string);
++ to_print=(const char *)buffer;
+ break;
+ case SYMBOL:
+ to_print=buffer.format("%s",(const char *)symbol);
+--
+1.7.4.1
+
+From 2b26415c3c46ffb7532ca250990668564be62d39 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Thu, 2 Jun 2011 09:48:49 -0700
+Subject: [PATCH] Corrected polarity of xmp annotation saving
+
+---
+ libdjvu/DjVuAnno.cpp | 19 ++++++++++---------
+ 1 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/libdjvu/DjVuAnno.cpp b/libdjvu/DjVuAnno.cpp
+index e2a9108..8e16dd8 100644
+--- a/libdjvu/DjVuAnno.cpp
++++ b/libdjvu/DjVuAnno.cpp
+@@ -254,25 +254,24 @@ GLObject::print(ByteStream & str, int compact, int indent, int * cur_pos) const
+ if (!cur_pos) { cur_pos = &local_cur_pos; }
+
+ GUTF8String buffer;
+- const char * to_print=0;
+ switch(type)
+ {
+ case NUMBER:
+- to_print=buffer.format("%d",number);
++ buffer.format("%d",number);
+ break;
+ case STRING:
+- buffer=make_c_string(string);
+- to_print=(const char *)buffer;
++ buffer = make_c_string(string);
+ break;
+ case SYMBOL:
+- to_print=buffer.format("%s",(const char *)symbol);
++ buffer.format("%s",(const char *)symbol);
+ break;
+ case LIST:
+- to_print=buffer.format("(%s",(const char *)name);
++ buffer.format("(%s",(const char *)name);
+ break;
+ case INVALID:
+ break;
+ }
++ const char * to_print = (const char*)buffer;
+ if (!compact && *cur_pos+strlen(to_print)>70)
+ {
+ char ch='\n';
+@@ -1375,7 +1374,7 @@ DjVuANT::encode_raw(void) const
+ }
+ //*** XMP Metadata
+ del_all_items(XMP_TAG, parser);
+- if (!xmpmetadata)
++ if (!!xmpmetadata)
+ {
+ GUTF8String mdatabuffer("(");
+ mdatabuffer += XMP_TAG;
+@@ -1385,8 +1384,10 @@ DjVuANT::encode_raw(void) const
+ //*** Mapareas
+ del_all_items(GMapArea::MAPAREA_TAG, parser);
+ for(GPosition pos=map_areas;pos;++pos)
+- parser.parse(map_areas[pos]->print());
+-
++ {
++ GUTF8String mapareabuffer = map_areas[pos]->print();
++ parser.parse(mapareabuffer);
++ }
+ GP<ByteStream> gstr=ByteStream::create();
+ ByteStream &str=*gstr;
+ parser.print(str, 1);
+--
+1.7.4.1
+
+From 65600b5801d11ff8ca8db3a25bf004fc06f4515b Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sat, 4 Jun 2011 15:29:18 -0700
+Subject: [PATCH] Eliminate warnings with gcc-4.6.0
+
+---
+ libdjvu/Arrays.cpp | 2 -
+ libdjvu/DjVuDocEditor.cpp | 37 +++++++++----------
+ libdjvu/GString.cpp | 44 ++++++++--------------
+ libdjvu/JPEGDecoder.cpp | 2 -
+ libdjvu/XMLParser.cpp | 7 +---
+ tools/ddjvu.cpp | 2 +-
+ tools/jb2cmp/patterns.cpp | 87 +-------------------------------------------
+ tools/tiff2pdf.c | 9 ++---
+ 8 files changed, 40 insertions(+), 150 deletions(-)
+
+diff --git a/libdjvu/Arrays.cpp b/libdjvu/Arrays.cpp
+index c4f74ca..6c7f23a 100644
+--- a/libdjvu/Arrays.cpp
++++ b/libdjvu/Arrays.cpp
+@@ -239,9 +239,7 @@ ArrayRep::ins(int n, const void * what, unsigned int howmany)
+ copy(ndata, lobound-minlo, hibound-minlo,
+ data, lobound-minlo, hibound-minlo);
+ destroy(data, lobound-minlo, hibound-minlo);
+- void *tmp=data;
+ data=ndata;
+- tmp=data;
+ maxhi = nmaxhi;
+ }
+
+diff --git a/libdjvu/DjVuDocEditor.cpp b/libdjvu/DjVuDocEditor.cpp
+index 2247e40..f1d8b0d 100644
+--- a/libdjvu/DjVuDocEditor.cpp
++++ b/libdjvu/DjVuDocEditor.cpp
+@@ -555,27 +555,24 @@ DjVuDocEditor::insert_file(const GURL &file_url, bool is_page,
+ can_compress_flag);
+ }
+
+- // Oh. It does exist... Check that it has IFF structure
++ // Oh. It does exist... Check that it has IFF structure
+ {
+- const GP<IFFByteStream> giff(
+- IFFByteStream::create(file_pool->get_stream()));
+- IFFByteStream &iff=*giff;
+- GUTF8String chkid;
+-
+- int length;
+- length=iff.get_chunk(chkid);
+- if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" &&
+- chkid!="FORM:BM44" && chkid!="FORM:PM44")
+- G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t"+file_url.get_string());
+-
+- // Wonderful. It's even a DjVu file. Scan for NDIR chunks.
+- // If NDIR chunk is found, ignore the file
+- while(iff.get_chunk(chkid))
+- {
+- if (chkid=="NDIR")
+- return false;
+- iff.close_chunk();
+- }
++ const GP<IFFByteStream> giff(
++ IFFByteStream::create(file_pool->get_stream()));
++ IFFByteStream &iff=*giff;
++ GUTF8String chkid;
++ if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" &&
++ chkid!="FORM:BM44" && chkid!="FORM:PM44")
++ G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t"
++ + file_url.get_string());
++ // Wonderful. It's even a DjVu file. Scan for NDIR chunks.
++ // If NDIR chunk is found, ignore the file
++ while(iff.get_chunk(chkid))
++ {
++ if (chkid=="NDIR")
++ return false;
++ iff.close_chunk();
++ }
+ }
+ return insert_file(file_pool,file_url,is_page,file_pos,name2id,source);
+ }
+diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp
+index 350b11b..ed92a7f 100644
+--- a/libdjvu/GString.cpp
++++ b/libdjvu/GString.cpp
+@@ -643,26 +643,22 @@ GBaseString::UTF8ToNative(
+ const char *source=(*this);
+ GP<GStringRep> retval;
+ if(source && source[0])
+- {
+-#if DO_CHANGELOCALE
+- GUTF8String lc_ctype(setlocale(LC_CTYPE,0));
+-#endif
+- bool repeat;
+- for(repeat=!currentlocale;;repeat=false)
+ {
+- retval=(*this)->toNative((GStringRep::EscapeMode)escape);
+ #if DO_CHANGELOCALE
+- if (!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,"")))
++ GUTF8String lc_ctype(setlocale(LC_CTYPE,0));
++ bool repeat;
++ for(repeat=!currentlocale;;repeat=false)
++ {
+ #endif
+- break;
+- }
++ retval=(*this)->toNative((GStringRep::EscapeMode)escape);
+ #if DO_CHANGELOCALE
+- if(!repeat)
+- {
++ if (!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,"")))
++ break;
++ }
++ if(!repeat)
+ setlocale(LC_CTYPE,(const char *)lc_ctype);
+- }
+ #endif
+- }
++ }
+ return GNativeString(retval);
+ }
+
+@@ -697,27 +693,19 @@ GBaseString::NativeToUTF8(void) const
+ const char *source=(*this);
+ #if DO_CHANGELOCALE
+ GUTF8String lc_ctype=setlocale(LC_CTYPE,0);
+-#endif
+ bool repeat;
+ for(repeat=true;;repeat=false)
+- {
+- if( (retval=GStringRep::NativeToUTF8(source)) )
+ {
+- if(GStringRep::cmp(retval->toNative(),source))
+- {
+- retval=GStringRep::UTF8::create((unsigned int)0);
+- }
+- }
+-#if DO_CHANGELOCALE
+- if(!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,"")))
+ #endif
+- break;
+- }
++ if( (retval=GStringRep::NativeToUTF8(source)) )
++ if(GStringRep::cmp(retval->toNative(),source))
++ retval=GStringRep::UTF8::create((unsigned int)0);
+ #if DO_CHANGELOCALE
++ if(!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,"")))
++ break;
++ }
+ if(!repeat)
+- {
+ setlocale(LC_CTYPE,(const char *)lc_ctype);
+- }
+ #endif
+ }
+ return GUTF8String(retval);
+diff --git a/libdjvu/JPEGDecoder.cpp b/libdjvu/JPEGDecoder.cpp
+index cb7aa97..f22f77a 100644
+--- a/libdjvu/JPEGDecoder.cpp
++++ b/libdjvu/JPEGDecoder.cpp
+@@ -153,7 +153,6 @@ JPEGDecoder::decode(ByteStream & bs,GPixmap &pix)
+
+ JSAMPARRAY buffer; /* Output row buffer */
+ int row_stride; /* physical row width in output buffer */
+- int full_buf_size;
+ int isGrey,i;
+
+ cinfo.err = jpeg_std_error(&jerr.pub);
+@@ -184,7 +183,6 @@ JPEGDecoder::decode(ByteStream & bs,GPixmap &pix)
+
+ /* JSAMPLEs per row in output buffer */
+ row_stride = cinfo.output_width * cinfo.output_components;
+- full_buf_size = row_stride * cinfo.output_height;
+
+ /* Make a one-row-high sample array that will go away when done with image */
+ buffer = (*cinfo.mem->alloc_sarray)
+diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp
+index 7da923a..026b27d 100644
+--- a/libdjvu/XMLParser.cpp
++++ b/libdjvu/XMLParser.cpp
+@@ -646,17 +646,12 @@ lt_XMLParser::Impl::parse(const lt_XMLTags &tags, GURL *pdjvufile)
+ GPosition datapos=args.contains("data");
+ if(datapos)
+ {
+- bool isDjVuType=false;
+ GPosition typePos(args.contains("type"));
+ if(typePos)
+- {
+- if(args[typePos] != mimetype)
+ {
+- // DjVuPrintErrorUTF8("Ignoring %s Object tag\n",mimetype);
++ if(args[typePos] != mimetype)
+ continue;
+ }
+- isDjVuType=true;
+- }
+ const GURL url = (pdjvufile) ? *pdjvufile
+ : GURL::UTF8(args[datapos],
+ (args[datapos][0] == '/') ? codebase.base() : codebase);
+diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
+index b9cb038..3b4ce16 100644
+--- a/tools/ddjvu.cpp
++++ b/tools/ddjvu.cpp
+@@ -855,7 +855,7 @@ parse_option(int argc, char **argv, int i)
+ die(i18n(errarg), opt);
+ flag_verbose = 1;
+ }
+- if (!strcmp(opt,"skip"))
++ else if (!strcmp(opt,"skip"))
+ {
+ if (arg)
+ die(i18n(errarg), opt);
+diff --git a/tools/jb2cmp/patterns.cpp b/tools/jb2cmp/patterns.cpp
+index e456902..b31cf4e 100644
+--- a/tools/jb2cmp/patterns.cpp
++++ b/tools/jb2cmp/patterns.cpp
+@@ -303,11 +303,8 @@ static int32 distance_by_pixeldiff_functions(Image *i1, Image *i2,
+ int32 (*compare_row)(byte *, byte *, int32),
+ int32 (*compare_with_white)(byte *, int32), int32 ceiling)
+ {
+- byte **p1, **p2;
+ int32 w1, w2, h1, h2;
+ int32 shift_x, shift_y; /* of i1's coordinate system with respect to i2 */
+- /*int32 s = 0, i, i_start, i_cap;
+- int32 right_margin_start, right_margin_width;*/
+
+ /* make i1 to be narrower than i2 */
+ if (i1->width > i2->width)
+@@ -317,8 +314,8 @@ static int32 distance_by_pixeldiff_functions(Image *i1, Image *i2,
+ i2 = img;
+ }
+
+- w1 = i1->width; h1 = i1->height; p1 = i1->pixels;
+- w2 = i2->width; h2 = i2->height; p2 = i2->pixels;
++ w1 = i1->width; h1 = i1->height;
++ w2 = i2->width; h2 = i2->height;
+
+ /* (shift_x, shift_y) */
+ /* is what should be added to i1's coordinates to get i2's coordinates. */
+@@ -339,86 +336,6 @@ static int32 distance_by_pixeldiff_functions(Image *i1, Image *i2,
+
+ return distance_by_pixeldiff_functions_by_shift(
+ i1, i2, compare_row, compare_with_white, ceiling, shift_x, shift_y);
+-
+-/* FIXME */
+-#if 0
+- /* Compute difference in the non-overlapping top margin */
+-
+- if (shift_y < 0)
+- {
+- /* i1 has top rows not covered by i2 */
+- i_cap = -shift_y;
+- for (i = 0; i < i_cap; i++)
+- {
+- assert(i >= 0 && i < h1);
+- s += compare_with_white(p1[i], w1);
+- if (s > ceiling) return maxint;
+- }
+- i_start = i_cap; /* topmost overlapping row in i1's coords */
+- }
+- else
+- {
+- /* i2 has top rows not covered by i1 */
+- for (i = 0; i < shift_y; i++)
+- {
+- assert(i >= 0 && i < h2);
+- s += compare_with_white(p2[i], w2);
+- if (s > ceiling) return maxint;
+- }
+- i_start = 0;
+- }
+-
+- /* Compute difference in the overlapping area */
+-
+- i_cap = h2 - shift_y;
+- if (h1 < i_cap) i_cap = h1;
+-
+- right_margin_start = shift_x + w1;
+- right_margin_width = w2 - right_margin_start;
+-
+- for (i = i_start; i < i_cap; i++) /* i is a coordinate in i1 system */
+- {
+- int32 y = i + shift_y; /* same row coordinate in i2 system */
+- assert(y >= 0 && y < h2);
+- s += compare_with_white(p2[y], shift_x);
+- if (s > ceiling) return maxint;
+- assert(i >= 0 && i < h1);
+- assert(shift_x + w1 <= w2);
+- assert(i < h1);
+- s += compare_row(p2[y] + shift_x, p1[i], w1);
+- if (s > ceiling) return maxint;
+- s += compare_with_white(p2[y] + right_margin_start, right_margin_width);
+- if (s > ceiling) return maxint;
+- }
+-
+-
+- /* Compute difference in the non-overlapping bottom margin */
+-
+- if (i_cap == h1)
+- {
+- /* i2 has bottom rows not covered by i1 */
+- i_start = i_cap + shift_y;
+- for (i = i_start; i < h2; i++)
+- {
+- assert(i >= 0 && i < h2);
+- s += compare_with_white(p2[i], w2);
+- if (s > ceiling) return maxint;
+- }
+- }
+- else
+- {
+- /* i1 has bottom rows not covered by i2 */
+- i_start = i_cap;
+- for (i = i_cap; i < h1; i++)
+- {
+- assert(i >= 0 && i < h1);
+- s += compare_with_white(p1[i], w1);
+- if (s > ceiling) return maxint;
+- }
+- }
+-
+- return s;
+-#endif
+ }
+
+ #endif
+diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
+index 36949f1..2db8703 100644
+--- a/tools/tiff2pdf.c
++++ b/tools/tiff2pdf.c
+@@ -721,7 +721,6 @@ tiff2pdf(TIFF *input, FILE *outputfile, int argc, const char **argv)
+ const char *outfilename = "<null>";
+ T2P *t2p = NULL;
+ TIFF *output = NULL;
+- tsize_t written=0;
+ int c;
+
+ /* T2P */
+@@ -874,7 +873,7 @@ tiff2pdf(TIFF *input, FILE *outputfile, int argc, const char **argv)
+ TIFFSeekFile(output, (toff_t) 0, SEEK_SET);
+
+ /* Write */
+- written = t2p_write_pdf(t2p, input, output);
++ t2p_write_pdf(t2p, input, output);
+ if(t2p->t2p_error != 0){
+ TIFFError(TIFF2PDF_MODULE, "An error occurred creating output PDF file");
+ goto fail;
+@@ -2633,7 +2632,6 @@ static tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output,
+ tsize_t read=0;
+ uint16 i=0;
+ ttile_t tilecount=0;
+- tsize_t tilesize=0;
+ ttile_t septilecount=0;
+ tsize_t septilesize=0;
+ #ifdef JPEG_SUPPORT
+@@ -2819,7 +2817,6 @@ static tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output,
+ if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){
+ septilesize=TIFFTileSize(input);
+ septilecount=TIFFNumberOfTiles(input);
+- tilesize=septilesize*t2p->tiff_samplesperpixel;
+ tilecount=septilecount/t2p->tiff_samplesperpixel;
+ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
+ if(buffer==NULL){
+@@ -3802,7 +3799,6 @@ static tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output){
+ tsize_t written=0;
+ char* info;
+ char buffer[512];
+- int buflen=0;
+
+ if(t2p->pdf_datetime==NULL){
+ t2p_pdf_tifftime(t2p, input);
+@@ -3815,7 +3811,8 @@ static tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output){
+ }
+ written += TIFFWriteFile(output, (tdata_t) "\r/Producer ", 11);
+ _TIFFmemset((tdata_t)buffer, 0x00, 512);
+- buflen=sprintf(buffer, "libtiff / tiff2pdf - %d / %s", TIFFLIB_VERSION, T2P_VERSION);
++ sprintf(buffer, "libtiff / tiff2pdf - %d / %s",
++ TIFFLIB_VERSION, T2P_VERSION);
+ written += t2p_write_pdf_string(buffer, output);
+ written += TIFFWriteFile(output, (tdata_t) "\r", 1);
+ if(t2p->pdf_creator != NULL){
+--
+1.7.4.1
+
+From 5b3d074c2b315e7339ce279c559c3a99f26bef6a Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sat, 4 Jun 2011 17:37:00 -0700
+Subject: [PATCH] Fix MMX code when using gcc-4.6
+
+Fix MMX macros
+Enable MMX on x86_64
+---
+ libdjvu/MMX.cpp | 17 ++++++++++++++++-
+ libdjvu/MMX.h | 11 ++++++-----
+ tools/ddjvu.cpp | 1 -
+ 3 files changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp
+index 528dab6..e70fdd8 100644
+--- a/libdjvu/MMX.cpp
++++ b/libdjvu/MMX.cpp
+@@ -167,8 +167,23 @@ MMXControl::enable_mmx()
+ : "=m" (cpuflags) :
+ : "eax","ecx","edx");
+ #endif
++#if defined(MMX) && defined(__GNUC__) && defined(__x86_64__)
++ // Detection of MMX for GCC
++ __asm__ volatile (// Check that CR0:EM is clear
++ "xorl %%edx,%%edx\n\t"
++ "smsw %%ax\n\t"
++ "andl $4,%%eax\n\t"
++ "jnz 1f\n\t"
++ // Execute CPUID
++ "movl $1,%%eax\n\t"
++ "cpuid\n"
++ // Finish
++ "1:\tmovl %%edx, %0"
++ : "=m" (cpuflags) :
++ : "eax","ebx","ecx","edx");
++#endif
+ #if defined(MMX) && defined(_MSC_VER) && defined(_M_IX86)
+- // Detection of MMX for MSVC
++ // Detection of MMX for MSVC 32 bits
+ __asm { pushfd
+ pop ecx
+ xor edx,edx
+diff --git a/libdjvu/MMX.h b/libdjvu/MMX.h
+index b0af5e5..f8780af 100644
+--- a/libdjvu/MMX.h
++++ b/libdjvu/MMX.h
+@@ -143,17 +143,18 @@ class MMXControl
+
+ #ifndef NO_MMX
+
+-#if defined(__GNUC__) && defined(__i386__)
++#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
++typedef struct{ char c[8]; } MMX_t;
+ #define MMXemms \
+ __asm__ volatile("emms" : : : "memory" )
+ #define MMXrr(op,src,dst) \
+- __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory")
++ __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory" )
+ #define MMXir(op,imm,dst) \
+- __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory")
++ __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory" )
+ #define MMXar(op,addr,dst) \
+- __asm__ volatile( #op " %0,%%" #dst : : "m" (*(addr)) : "memory")
++ __asm__ volatile( #op " %0,%%" #dst : : "m" (*(MMX_t*)(addr)) : "memory" )
+ #define MMXra(op,src,addr) \
+- __asm__ volatile( #op " %%" #src ",%0" : : "m" (*(addr)) : "memory")
++ __asm__ volatile( #op " %%" #src ",%0" : "=m" (*(MMX_t*)(addr)) : : "memory")
+ #define MMX 1
+ #endif
+
+diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp
+index 3b4ce16..216c6cb 100644
+--- a/tools/ddjvu.cpp
++++ b/tools/ddjvu.cpp
+@@ -846,7 +846,6 @@ parse_option(int argc, char **argv, int i)
+ arg = opt;
+ opt = "subsample";
+ }
+-
+ /* Parse options */
+ if (!strcmp(opt,"v") ||
+ !strcmp(opt,"verbose"))
+--
+1.7.4.1
+
+From fbed8e51e5970b12ce36afb0dec8c4e02992c0f8 Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Thu, 9 Jun 2011 14:37:52 -0700
+Subject: [PATCH] Fixed regression in djvm.
+
+---
+ libdjvu/DjVuDocEditor.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/libdjvu/DjVuDocEditor.cpp b/libdjvu/DjVuDocEditor.cpp
+index f1d8b0d..baeb7dd 100644
+--- a/libdjvu/DjVuDocEditor.cpp
++++ b/libdjvu/DjVuDocEditor.cpp
+@@ -561,6 +561,7 @@ DjVuDocEditor::insert_file(const GURL &file_url, bool is_page,
+ IFFByteStream::create(file_pool->get_stream()));
+ IFFByteStream &iff=*giff;
+ GUTF8String chkid;
++ iff.get_chunk(chkid);
+ if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" &&
+ chkid!="FORM:BM44" && chkid!="FORM:PM44")
+ G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t"
+--
+1.7.4.1
+
+From f63327438954b8831a1a9f43afc8b6d16e1d3baf Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Wed, 15 Jun 2011 00:05:50 -0700
+Subject: [PATCH] Encode oblique text as separate lines.
+
+---
+ tools/csepdjvu.cpp | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp
+index d5203d5..08f7a27 100644
+--- a/tools/csepdjvu.cpp
++++ b/tools/csepdjvu.cpp
+@@ -1288,7 +1288,7 @@ Comments::textmark(GP<TxtMark> mark)
+ int shx = (mark->x - lastx) * 100 / fontsize;
+ int shy = (mark->y - lasty) * 100 / fontsize;
+ int inter = dirx * shx + diry * shy;
+- if ( (dirx == lastdirx) && (diry == lastdiry) &&
++ if ( (dirx || diry) && (dirx == lastdirx) && (diry == lastdiry) &&
+ (inter > -150) && (inter < 300) &&
+ abs(diry * shx + dirx * shy) < 80 )
+ mark->inter = inter;
+--
+1.7.4.1
+
+From ea9fd2acab2e298ba721eb79f5026d34e6ef141f Mon Sep 17 00:00:00 2001
+From: Barak A. Pearlmutter <barak+git@cs.nuim.ie>
+Date: Wed, 22 Jun 2011 11:21:41 +0100
+Subject: [PATCH] consistent prototype for ddjvu_anno_get_xmp
+
+---
+ libdjvu/ddjvuapi.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h
+index 841f223..14b63eb 100644
+--- a/libdjvu/ddjvuapi.h
++++ b/libdjvu/ddjvuapi.h
+@@ -1619,7 +1619,7 @@ ddjvu_anno_get_metadata(miniexp_t annotations, miniexp_t key);
+ Returns zero if no such key is present. */
+
+ DDJVUAPI const char *
+-ddjvu_anno_get_xmp(miniexp_t annotations, miniexp_t xmp);
++ddjvu_anno_get_xmp(miniexp_t annotations);
+
+
+ /* -------------------------------------------------- */
+--
+1.7.4.1
+
+From 701d1261493e175955aac97921949f4e4241750d Mon Sep 17 00:00:00 2001
+From: Leon Bottou <leon@bottou.org>
+Date: Sun, 11 Sep 2011 09:59:26 -0700
+Subject: [PATCH] Fixed typo in man page.
+
+---
+ tools/ddjvu.1 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/tools/ddjvu.1 b/tools/ddjvu.1
+index 7d3d105..cbb8307 100644
+--- a/tools/ddjvu.1
++++ b/tools/ddjvu.1
+@@ -66,7 +66,7 @@ and
+ .BR "ppm"
+ respectively produce a Portable Bitmap (PBM),
+ Portable Graymap (PGM),
+-or Portable Pixmap (PGM) file.
++or Portable Pixmap (PPM) file.
+ Format
+ .B "pnm"
+ produces a PBM, PGM, or PPM
+--
+1.7.4.1
+
diff --git a/staging/emacs/PKGBUILD b/staging/emacs/PKGBUILD
new file mode 100644
index 000000000..ec5d8568e
--- /dev/null
+++ b/staging/emacs/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 147096 2012-01-21 21:55:38Z eric $
+# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Renchi Raju <renchi@green.tam.uiuc.edu>
+
+pkgname=emacs
+_majorver=23.3
+_minorver=b
+# We want something like "23.3.a" so pacman version comparison works, but
+# upstream uses "23.3a", which is a bit silly and interpreted as alpha.
+pkgver=$_majorver.$_minorver
+_realver=$_majorver$_minorver
+pkgrel=2
+pkgdesc="The extensible, customizable, self-documenting real-time display editor"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/emacs/emacs.html"
+license=('GPL3')
+depends=('librsvg' 'gpm' 'giflib' 'libxpm' 'gtk2' 'hicolor-icon-theme' 'gconf' 'desktop-file-utils' 'alsa-lib')
+install=emacs.install
+source=(ftp://ftp.gnu.org/gnu/emacs/$pkgname-$_realver.tar.bz2{,.sig} emacs-subversion17.patch)
+md5sums=('917ce0054ef63773078a6e99b55df1ee'
+ '4f987fbb906c0ee73e05904b0f7ce5ec'
+ '12e2e7a66df5cc5ded54e1d30083a1fb')
+
+build() {
+ cd "$srcdir"/$pkgname-$_majorver
+ patch -p1 -i ../emacs-subversion17.patch
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
+ --localstatedir=/var --with-x-toolkit=gtk --with-xft
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$_majorver
+ make DESTDIR="$pkgdir" install
+
+ # remove conflict with ctags package
+ mv "$pkgdir"/usr/bin/{ctags,ctags.emacs}
+ mv "$pkgdir"/usr/share/man/man1/{ctags.1,ctags.emacs.1}
+ # fix all the 777 perms on directories
+ find "$pkgdir"/usr/share/emacs/$_majorver -type d -exec chmod 755 {} \;
+ # fix user/root permissions on usr/share files
+ find "$pkgdir"/usr/share/emacs/$_majorver -exec chown root:root {} \;
+ # fix perms on /var/games
+ chmod 775 "$pkgdir"/var/games
+ chmod 775 "$pkgdir"/var/games/emacs
+ chmod 664 "$pkgdir"/var/games/emacs/*
+ chown -R root:games "$pkgdir"/var/games
+}
diff --git a/staging/emacs/emacs-subversion17.patch b/staging/emacs/emacs-subversion17.patch
new file mode 100644
index 000000000..e7969de81
--- /dev/null
+++ b/staging/emacs/emacs-subversion17.patch
@@ -0,0 +1,83 @@
+From d7afd9288e22c466b63c27e7e11783589b07aeff Mon Sep 17 00:00:00 2001
+From: Karl Pflästerer <k@rl.pflaesterer.de>
+Date: Sat, 12 Feb 2011 01:12:53 +0000
+Subject: Adapt to Subversion change, with no .svn directory in each sub directory.
+
+http://lists.gnu.org/archive/html/emacs-devel/2011-02/msg00357.html
+
+* vc/vc-svn.el (vc-svn-registered): Use vc-svn-root.
+(vc-svn-root): New function. Make vc-svn-responsible-p an alias.
+(vc-svn-repository-hostname): Use "svn info".
+---
+(limited to 'lisp/vc/vc-svn.el')
+
+diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
+index aefef50..20c7689 100644
+--- a/lisp/vc-svn.el
++++ b/lisp/vc-svn.el
+@@ -117,17 +117,13 @@ If you want to force an empty list of arguments, use t."
+ ;;;###autoload (getenv "SVN_ASP_DOT_NET_HACK"))
+ ;;;###autoload "_svn")
+ ;;;###autoload (t ".svn"))))
+-;;;###autoload (when (file-readable-p (expand-file-name
+-;;;###autoload (concat admin-dir "/entries")
+-;;;###autoload (file-name-directory f)))
++;;;###autoload (when (vc-find-root f admin-dir)
+ ;;;###autoload (load "vc-svn")
+ ;;;###autoload (vc-svn-registered f))))
+
+ (defun vc-svn-registered (file)
+ "Check if FILE is SVN registered."
+- (when (file-readable-p (expand-file-name (concat vc-svn-admin-directory
+- "/entries")
+- (file-name-directory file)))
++ (when (vc-svn-root file)
+ (with-temp-buffer
+ (cd (file-name-directory file))
+ (let* (process-file-side-effects
+@@ -275,14 +271,12 @@ Passes either `vc-svn-register-switches' or `vc-register-switches'
+ to the SVN command."
+ (apply 'vc-svn-command nil 0 files "add" (vc-switches 'SVN 'register)))
+
+-(defun vc-svn-responsible-p (file)
+- "Return non-nil if SVN thinks it is responsible for FILE."
+- (file-directory-p (expand-file-name vc-svn-admin-directory
+- (if (file-directory-p file)
+- file
+- (file-name-directory file)))))
++(defun vc-svn-root (file)
++ (vc-find-root file vc-svn-admin-directory))
+
+-(defalias 'vc-svn-could-register 'vc-svn-responsible-p
++(defalias 'vc-svn-responsible-p 'vc-svn-root)
++
++(defalias 'vc-svn-could-register 'vc-svn-root
+ "Return non-nil if FILE could be registered in SVN.
+ This is only possible if SVN is responsible for FILE's directory.")
+
+@@ -594,20 +588,10 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
+
+ (defun vc-svn-repository-hostname (dirname)
+ (with-temp-buffer
+- (let ((coding-system-for-read
+- (or file-name-coding-system
+- default-file-name-coding-system)))
+- (vc-insert-file (expand-file-name (concat vc-svn-admin-directory
+- "/entries")
+- dirname)))
++ (let (process-file-side-effects)
++ (vc-svn-command t t dirname "info" "--xml"))
+ (goto-char (point-min))
+- (when (re-search-forward
+- ;; Old `svn' used name="svn:this_dir", newer use just name="".
+- (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*"
+- "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?"
+- "url=\"\\(?1:[^\"]+\\)\""
+- ;; Yet newer ones don't use XML any more.
+- "\\|^\ndir\n[0-9]+\n\\(?1:.*\\)") nil t)
++ (when (re-search-forward "<url>\\(.*\\)</url>" nil t)
+ ;; This is not a hostname but a URL. This may actually be considered
+ ;; as a feature since it allows vc-svn-stay-local to specify different
+ ;; behavior for different modules on the same server.
+--
+cgit v0.9.0.2
diff --git a/staging/emacs/emacs.install b/staging/emacs/emacs.install
new file mode 100644
index 000000000..d84f1de14
--- /dev/null
+++ b/staging/emacs/emacs.install
@@ -0,0 +1,32 @@
+ICON_PATH=usr/share/icons/hicolor
+INFO_DIR=usr/share/info
+
+INFO_FILES=(ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse
+ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc eshell eudc flymake
+forms gnus idlwave info mairix-el message mh-e newsticker nxml-mode
+org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail
+speedbar tramp url vip viper widget woman)
+
+post_install() {
+ gtk-update-icon-cache -q -t -f ${ICON_PATH}
+ update-desktop-database -q
+
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${INFO_FILES[@]}; do
+ install-info ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ gtk-update-icon-cache -q -t -f ${ICON_PATH}
+ update-desktop-database -q
+
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${INFO_FILES[@]}; do
+ install-info --delete ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
+ done
+}
diff --git a/staging/gimp-dbp/PKGBUILD b/staging/gimp-dbp/PKGBUILD
new file mode 100644
index 000000000..7575150dc
--- /dev/null
+++ b/staging/gimp-dbp/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 147086 2012-01-21 18:00:41Z eric $
+# Maintainer: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=gimp-dbp
+pkgver=1.1.9
+pkgrel=3
+pkgdesc="David's batch processor for the GIMP"
+arch=('i686' 'x86_64')
+url="http://members.ozemail.com.au/~hodsond/dbp.html"
+license=('GPL')
+depends=('gimp')
+source=(http://www.ozemail.com.au/~hodsond/dbpSrc-${pkgver//./-}.tgz)
+md5sums=('1106625707798ab8ea1317ac6bece1c5')
+
+build() {
+ cd "${srcdir}/dbp-${pkgver}"
+ sed -i "s|<string>|<cstring>|" op.h
+ make
+}
+
+package() {
+ cd "${srcdir}/dbp-${pkgver}"
+ install -D -m755 dbp "${pkgdir}/usr/lib/gimp/2.0/plug-ins/dbp"
+}
diff --git a/staging/gimp-devel/PKGBUILD b/staging/gimp-devel/PKGBUILD
new file mode 100644
index 000000000..4f5e74b22
--- /dev/null
+++ b/staging/gimp-devel/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 147053 2012-01-21 05:38:18Z eric $
+# Maintainer: Eric Bélanger <eric@archlinux.org>
+
+pkgname=gimp-devel
+pkgver=2.7.4
+pkgrel=2
+pkgdesc="GNU Image Manipulation Program (Development Version)"
+arch=('i686' 'x86_64')
+url="http://www.gimp.org/"
+license=('GPL3' 'LGPL3')
+depends=('pygtk' 'lcms' 'libxpm' 'libwmf' 'librsvg' 'libmng' 'dbus-glib' \
+ 'jasper' 'libexif' 'gegl' 'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('intltool' 'libwebkit' 'poppler-glib' 'alsa-lib' 'iso-codes' 'curl')
+optdepends=('gutenprint: for sophisticated printing only as gimp has built-in cups print support'
+ 'libwebkit: for the help browser or web-page plug-ins'
+ 'poppler-glib: for pdf support'
+ 'alsa-lib: for MIDI event controller module'
+ 'curl: for URI support')
+options=('!libtool' '!makeflags')
+conflicts=('gimp')
+provides=("gimp=${pkgver}")
+install=gimp-devel.install
+source=(ftp://ftp.gimp.org/pub/gimp/v${pkgver%.*}/gimp-${pkgver}.tar.bz2 linux.gpl)
+md5sums=('bda95a29c3483b8ff458b06b1543f867'
+ 'bb27bc214261d36484093e857f015f38')
+
+build() {
+ cd "${srcdir}/gimp-${pkgver}"
+ PYTHON=/usr/bin/python2 ./configure --prefix=/usr --sysconfdir=/etc \
+ --enable-mp --enable-gimp-console --enable-python --with-libcurl \
+ --with-gif-compression=lzw --without-aa --without-gvfs
+ make
+}
+
+#check() {
+# cd "${srcdir}/gimp-${pkgver}"
+# make check
+#}
+
+package() {
+ cd "${srcdir}/gimp-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ sed -i 's|#![ ]*/usr/bin/env python|#!/usr/bin/env python2|' "${pkgdir}"/usr/lib/gimp/2.0/plug-ins/*.py
+ install -D -m644 "${srcdir}/linux.gpl" "${pkgdir}/usr/share/gimp/2.0/palettes/Linux.gpl"
+
+ ln -sf gimp-console-${pkgver%.*}.1.gz "${pkgdir}/usr/share/man/man1/gimp-console.1.gz"
+ ln -sf gimprc-${pkgver%.*}.5.gz "${pkgdir}/usr/share/man/man5/gimprc.5.gz"
+ ln -sf gimptool-2.0.1.gz "${pkgdir}/usr/share/man/man1/gimptool.1.gz"
+ ln -s gimp-${pkgver%.*}.1.gz "${pkgdir}/usr/share/man/man1/gimp.1.gz"
+
+ ln -s gimp-${pkgver%.*} "${pkgdir}/usr/bin/gimp"
+ ln -s gimp-console-${pkgver%.*} "${pkgdir}/usr/bin/gimp-console"
+ ln -s gimptool-2.0 "${pkgdir}/usr/bin/gimptool"
+}
diff --git a/staging/gimp-devel/gimp-devel.install b/staging/gimp-devel/gimp-devel.install
new file mode 100644
index 000000000..c317fbaca
--- /dev/null
+++ b/staging/gimp-devel/gimp-devel.install
@@ -0,0 +1,12 @@
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/gimp-devel/linux.gpl b/staging/gimp-devel/linux.gpl
new file mode 100644
index 000000000..0a73d8979
--- /dev/null
+++ b/staging/gimp-devel/linux.gpl
@@ -0,0 +1,19 @@
+GIMP Palette
+Name: linux
+#
+ 0 0 0
+ 0 0 170
+ 0 170 0
+ 0 170 170
+170 0 0
+170 0 170
+170 85 0
+170 170 170
+ 85 85 85
+ 85 85 255
+ 85 255 85
+ 85 255 255
+255 85 85
+255 85 255
+255 255 85
+255 255 255
diff --git a/staging/gimp-ufraw/PKGBUILD b/staging/gimp-ufraw/PKGBUILD
new file mode 100644
index 000000000..229159b5e
--- /dev/null
+++ b/staging/gimp-ufraw/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 147080 2012-01-21 17:07:06Z eric $
+# Maintainer: Tobias Kieslich <tobias@archlinux.org>
+
+pkgname=gimp-ufraw
+pkgver=0.18
+pkgrel=4
+pkgdesc="Standalone or gimp plugin converter for raw files"
+url="http://ufraw.sourceforge.net/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gtkimageview' 'exiv2' 'lcms' 'bzip2' 'desktop-file-utils')
+makedepends=('gimp' 'cinepaint')
+optdepends=('gimp: to use the gimp import plugin for raw images'
+ 'cinepaint: to use the cinepaint import plugin for raw images')
+install=gimp-ufraw.install
+source=(http://downloads.sourceforge.net/ufraw/ufraw-${pkgver}.tar.gz)
+sha1sums=('41c9ad7aa7f1cbb63a6b0b330b3599b18a7e8cd2')
+
+build() {
+ cd "${srcdir}/ufraw-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --enable-extras \
+ --enable-mime \
+ --enable-openmp
+ sed -i "s/-ffast-math -fomit-frame-pointer -W -Wall -O3/${CFLAGS}/" Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}/ufraw-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ rm -f "${pkgdir}/usr/bin/dcraw"
+}
diff --git a/staging/gimp-ufraw/gimp-ufraw.install b/staging/gimp-ufraw/gimp-ufraw.install
new file mode 100644
index 000000000..80312d4a6
--- /dev/null
+++ b/staging/gimp-ufraw/gimp-ufraw.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ update-desktop-database -q
+}
+
+post_remove() {
+ update-desktop-database -q
+}
diff --git a/staging/gimp/PKGBUILD b/staging/gimp/PKGBUILD
new file mode 100644
index 000000000..6a95fb2b3
--- /dev/null
+++ b/staging/gimp/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 147055 2012-01-21 08:27:32Z eric $
+# Maintainer: tobias <tobias@archlinux.org>
+
+pkgname=gimp
+pkgver=2.6.11
+pkgrel=8
+pkgdesc="GNU Image Manipulation Program"
+arch=('i686' 'x86_64')
+url="http://www.gimp.org/"
+license=('GPL' 'LGPL')
+depends=('pygtk' 'lcms' 'libxpm' 'libwmf' 'libxmu' 'librsvg' 'libmng' 'dbus-glib' \
+ 'libexif' 'gegl' 'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('intltool' 'libwebkit' 'poppler-glib' 'alsa-lib' 'iso-codes' 'curl')
+optdepends=('gutenprint: for sophisticated printing only as gimp has built-in cups print support'
+ 'libwebkit: for the help browser'
+ 'poppler-glib: for pdf support'
+ 'alsa-lib: for MIDI event controller module'
+ 'curl: for URI support')
+options=('!libtool' '!makeflags')
+conflicts=('gimp-devel')
+install=gimp.install
+source=(ftp://ftp.gimp.org/pub/gimp/v${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2 linux.gpl
+ uri-backend-libcurl.patch gimp-poppler-0.18.patch libpng_compile.patch)
+sha1sums=('2f9d596e727bdbf304fa78257c1731d9faf3934c'
+ '110ce9798173b19a662d086ed7b882b4729f06cf'
+ 'a65b0ee6cd1b4345065b7b98c07f2fed15f844f4'
+ '1479a6d80be7adf74f66a3b88057a5029fe892e8'
+ '5ce329d2e2cb136e93f16117fa79ab6e31866f68')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 < ../uri-backend-libcurl.patch
+ patch -p1 < ../gimp-poppler-0.18.patch
+ patch -p1 < ../libpng_compile.patch
+ PYTHON=/usr/bin/python2 LIBS+="-lgobject-2.0 -lglib-2.0 -lm" \
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --enable-mp --enable-gimp-console --enable-gimp-remote \
+ --enable-python --with-gif-compression=lzw --with-libcurl \
+ --without-aa --without-hal --without-gvfs --without-gnomevfs
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "${pkgdir}"/usr/lib/gimp/2.0/plug-ins/*.py
+ install -D -m644 "${srcdir}/linux.gpl" "${pkgdir}/usr/share/gimp/2.0/palettes/Linux.gpl"
+
+ rm "${pkgdir}/usr/share/man/man1/gimp-console.1"
+ ln -s gimp-console-${pkgver%.*}.1.gz "${pkgdir}/usr/share/man/man1/gimp-console.1.gz"
+ ln -s gimptool-2.0 "${pkgdir}/usr/bin/gimptool"
+ ln -sf gimptool-2.0.1.gz "${pkgdir}/usr/share/man/man1/gimptool.1.gz"
+}
diff --git a/staging/gimp/gimp-poppler-0.18.patch b/staging/gimp/gimp-poppler-0.18.patch
new file mode 100644
index 000000000..0715460bc
--- /dev/null
+++ b/staging/gimp/gimp-poppler-0.18.patch
@@ -0,0 +1,476 @@
+From 69f69eed816b89be9a01a48a1f0643d1fd496118 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Fri, 6 May 2011 11:58:44 +0200
+Subject: [PATCH] patch: poppler-0.17
+
+Squashed commit of the following:
+
+commit 529d940222dfc352d41fbf72de29134421aa4002
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri May 6 11:50:30 2011 +0200
+
+ use code based on pixbufs instead of cairo surfaces
+
+ this is done to avoid adding to libgimp, thanks to Mukund Sivaraman for
+ hints how to do this
+
+commit f8671d8767d4cdab830dc06310e96c63a88ec0fd
+Author: Mukund Sivaraman <muks@banu.com>
+Date: Thu Apr 21 13:57:13 2011 +0530
+
+ file-pdf-load: Update attribution, removing bogus copyright
+ (cherry picked from commit e999122e0b20b6ccd6bde3ce039bb64068fc0019)
+
+commit 89a78f2590d298dac2f42e6d9a3016fc5d672c70
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Apr 21 13:52:18 2011 +0200
+
+ file-pdf-load: Use better API + cleanups
+
+ * fixes issues with poppler 0.17 completely
+ * uses new libgimp API to pass surfaces instead of pixbufs
+ * uses GTK+ 3 API to convert surfaces to pixbufs where available
+ (backported from commit 7bdadd80ba479d6ff904e276d805e16f6b940ee2)
+
+commit 4e92302c4a14a961f112587a0ad86696c88da2f8
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Apr 21 13:38:08 2011 +0200
+
+ file-pdf-load: Don't use deprecated API (bug #646947)
+
+ (cherry picked from commit 9b3e1c91fd2eac69da6947ec9c7fbf10096ba237)
+
+ Conflicts:
+
+ plug-ins/common/file-pdf.c
+---
+ plug-ins/common/file-pdf.c | 323 ++++++++++++++++++++++++++++++++++++++------
+ 1 files changed, 283 insertions(+), 40 deletions(-)
+
+diff --git a/plug-ins/common/file-pdf.c b/plug-ins/common/file-pdf.c
+index a43b459..43c2b7d 100644
+--- a/plug-ins/common/file-pdf.c
++++ b/plug-ins/common/file-pdf.c
+@@ -4,6 +4,9 @@
+ *
+ * Copyright (C) 2005 Nathan Summers
+ *
++ * Some code in render_page_to_surface() borrowed from
++ * poppler.git/glib/poppler-page.cc.
++ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+@@ -80,16 +83,20 @@ static gboolean load_dialog (PopplerDocument *doc,
+ static PopplerDocument * open_document (const gchar *filename,
+ GError **error);
+
+-static GdkPixbuf * get_thumbnail (PopplerDocument *doc,
++static cairo_surface_t * get_thumb_surface (PopplerDocument *doc,
++ gint page,
++ gint preferred_size);
++
++static GdkPixbuf * get_thumb_pixbuf (PopplerDocument *doc,
+ gint page,
+ gint preferred_size);
+
+ static gint32 layer_from_pixbuf (gint32 image,
+- const gchar *layer_name,
+- gint position,
+- GdkPixbuf *buf,
+- gdouble progress_start,
+- gdouble progress_scale);
++ const gchar *layer_name,
++ gint position,
++ GdkPixbuf *pixbuf,
++ gdouble progress_start,
++ gdouble progress_scale);
+
+ /**
+ ** the following was formerly part of
+@@ -433,11 +440,12 @@ run (const gchar *name,
+ }
+ else
+ {
+- gdouble width = 0;
+- gdouble height = 0;
+- gdouble scale;
+- gint32 image = -1;
+- GdkPixbuf *pixbuf = NULL;
++ gdouble width = 0;
++ gdouble height = 0;
++ gdouble scale;
++ gint32 image = -1;
++ gint num_pages = 0;
++ GdkPixbuf *pixbuf = NULL;
+
+ /* Possibly retrieve last settings */
+ gimp_get_data (LOAD_PROC, &loadvals);
+@@ -455,7 +463,10 @@ run (const gchar *name,
+ g_object_unref (page);
+ }
+
+- pixbuf = get_thumbnail (doc, 0, param[1].data.d_int32);
++ num_pages = poppler_document_get_n_pages (doc);
++
++ pixbuf = get_thumb_pixbuf (doc, 0, param[1].data.d_int32);
++
+ g_object_unref (doc);
+ }
+
+@@ -548,6 +559,187 @@ open_document (const gchar *filename,
+ return doc;
+ }
+
++/* FIXME: Remove this someday when we depend fully on GTK+ >= 3 */
++
++#if (!GTK_CHECK_VERSION (3, 0, 0))
++
++static cairo_format_t
++gdk_cairo_format_for_content (cairo_content_t content)
++{
++ switch (content)
++ {
++ case CAIRO_CONTENT_COLOR:
++ return CAIRO_FORMAT_RGB24;
++ case CAIRO_CONTENT_ALPHA:
++ return CAIRO_FORMAT_A8;
++ case CAIRO_CONTENT_COLOR_ALPHA:
++ default:
++ return CAIRO_FORMAT_ARGB32;
++ }
++}
++
++static cairo_surface_t *
++gdk_cairo_surface_coerce_to_image (cairo_surface_t *surface,
++ cairo_content_t content,
++ int src_x,
++ int src_y,
++ int width,
++ int height)
++{
++ cairo_surface_t *copy;
++ cairo_t *cr;
++
++ copy = cairo_image_surface_create (gdk_cairo_format_for_content (content),
++ width,
++ height);
++
++ cr = cairo_create (copy);
++ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
++ cairo_set_source_surface (cr, surface, -src_x, -src_y);
++ cairo_paint (cr);
++ cairo_destroy (cr);
++
++ return copy;
++}
++
++static void
++convert_alpha (guchar *dest_data,
++ int dest_stride,
++ guchar *src_data,
++ int src_stride,
++ int src_x,
++ int src_y,
++ int width,
++ int height)
++{
++ int x, y;
++
++ src_data += src_stride * src_y + src_x * 4;
++
++ for (y = 0; y < height; y++) {
++ guint32 *src = (guint32 *) src_data;
++
++ for (x = 0; x < width; x++) {
++ guint alpha = src[x] >> 24;
++
++ if (alpha == 0)
++ {
++ dest_data[x * 4 + 0] = 0;
++ dest_data[x * 4 + 1] = 0;
++ dest_data[x * 4 + 2] = 0;
++ }
++ else
++ {
++ dest_data[x * 4 + 0] = (((src[x] & 0xff0000) >> 16) * 255 + alpha / 2) / alpha;
++ dest_data[x * 4 + 1] = (((src[x] & 0x00ff00) >> 8) * 255 + alpha / 2) / alpha;
++ dest_data[x * 4 + 2] = (((src[x] & 0x0000ff) >> 0) * 255 + alpha / 2) / alpha;
++ }
++ dest_data[x * 4 + 3] = alpha;
++ }
++
++ src_data += src_stride;
++ dest_data += dest_stride;
++ }
++}
++
++static void
++convert_no_alpha (guchar *dest_data,
++ int dest_stride,
++ guchar *src_data,
++ int src_stride,
++ int src_x,
++ int src_y,
++ int width,
++ int height)
++{
++ int x, y;
++
++ src_data += src_stride * src_y + src_x * 4;
++
++ for (y = 0; y < height; y++) {
++ guint32 *src = (guint32 *) src_data;
++
++ for (x = 0; x < width; x++) {
++ dest_data[x * 3 + 0] = src[x] >> 16;
++ dest_data[x * 3 + 1] = src[x] >> 8;
++ dest_data[x * 3 + 2] = src[x];
++ }
++
++ src_data += src_stride;
++ dest_data += dest_stride;
++ }
++}
++
++/**
++ * gdk_pixbuf_get_from_surface:
++ * @surface: surface to copy from
++ * @src_x: Source X coordinate within @surface
++ * @src_y: Source Y coordinate within @surface
++ * @width: Width in pixels of region to get
++ * @height: Height in pixels of region to get
++ *
++ * Transfers image data from a #cairo_surface_t and converts it to an RGB(A)
++ * representation inside a #GdkPixbuf. This allows you to efficiently read
++ * individual pixels from cairo surfaces. For #GdkWindows, use
++ * gdk_pixbuf_get_from_window() instead.
++ *
++ * This function will create an RGB pixbuf with 8 bits per channel.
++ * The pixbuf will contain an alpha channel if the @surface contains one.
++ *
++ * Return value: (transfer full): A newly-created pixbuf with a reference
++ * count of 1, or %NULL on error
++ */
++static GdkPixbuf *
++gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
++ gint src_x,
++ gint src_y,
++ gint width,
++ gint height)
++{
++ cairo_content_t content;
++ GdkPixbuf *dest;
++
++ /* General sanity checks */
++ g_return_val_if_fail (surface != NULL, NULL);
++ g_return_val_if_fail (width > 0 && height > 0, NULL);
++
++ content = cairo_surface_get_content (surface) | CAIRO_CONTENT_COLOR;
++ dest = gdk_pixbuf_new (GDK_COLORSPACE_RGB,
++ !!(content & CAIRO_CONTENT_ALPHA),
++ 8,
++ width, height);
++
++ surface = gdk_cairo_surface_coerce_to_image (surface, content,
++ src_x, src_y,
++ width, height);
++ cairo_surface_flush (surface);
++ if (cairo_surface_status (surface) || dest == NULL)
++ {
++ cairo_surface_destroy (surface);
++ return NULL;
++ }
++
++ if (gdk_pixbuf_get_has_alpha (dest))
++ convert_alpha (gdk_pixbuf_get_pixels (dest),
++ gdk_pixbuf_get_rowstride (dest),
++ cairo_image_surface_get_data (surface),
++ cairo_image_surface_get_stride (surface),
++ 0, 0,
++ width, height);
++ else
++ convert_no_alpha (gdk_pixbuf_get_pixels (dest),
++ gdk_pixbuf_get_rowstride (dest),
++ cairo_image_surface_get_data (surface),
++ cairo_image_surface_get_stride (surface),
++ 0, 0,
++ width, height);
++
++ cairo_surface_destroy (surface);
++ return dest;
++}
++
++#endif
++
+ static gint32
+ layer_from_pixbuf (gint32 image,
+ const gchar *layer_name,
+@@ -566,6 +758,54 @@ layer_from_pixbuf (gint32 image,
+ return layer;
+ }
+
++static cairo_surface_t *
++render_page_to_surface (PopplerPage *page,
++ int width,
++ int height,
++ double scale)
++{
++ cairo_surface_t *surface;
++ cairo_t *cr;
++
++ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
++ cr = cairo_create (surface);
++
++ cairo_save (cr);
++ cairo_translate (cr, 0.0, 0.0);
++
++ if (scale != 1.0)
++ cairo_scale (cr, scale, scale);
++
++ poppler_page_render (page, cr);
++ cairo_restore (cr);
++
++ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
++ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
++ cairo_paint (cr);
++
++ cairo_destroy (cr);
++
++ return surface;
++}
++
++static GdkPixbuf *
++render_page_to_pixbuf (PopplerPage *page,
++ int width,
++ int height,
++ double scale)
++{
++ GdkPixbuf *pixbuf;
++ cairo_surface_t *surface;
++
++ surface = render_page_to_surface (page, width, height, scale);
++ pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0,
++ cairo_image_surface_get_width (surface),
++ cairo_image_surface_get_height (surface));
++ cairo_surface_destroy (surface);
++
++ return pixbuf;
++}
++
+ static gint32
+ load_image (PopplerDocument *doc,
+ const gchar *filename,
+@@ -597,7 +837,7 @@ load_image (PopplerDocument *doc,
+ gdouble page_width;
+ gdouble page_height;
+
+- GdkPixbuf *buf;
++ GdkPixbuf *pixbuf;
+ gint width;
+ gint height;
+
+@@ -627,15 +867,13 @@ load_image (PopplerDocument *doc,
+ gimp_image_set_resolution (image_ID, resolution, resolution);
+ }
+
+- buf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
+-
+- poppler_page_render_to_pixbuf (page, 0, 0, width, height, scale, 0, buf);
++ pixbuf = render_page_to_pixbuf (page, width, height, scale);
+
+- layer_from_pixbuf (image_ID, page_label, i, buf,
++ layer_from_pixbuf (image_ID, page_label, i, pixbuf,
+ doc_progress, 1.0 / pages->n_pages);
+
+ g_free (page_label);
+- g_object_unref (buf);
++ g_object_unref(pixbuf);
+
+ doc_progress = (double) (i + 1) / pages->n_pages;
+ gimp_progress_update (doc_progress);
+@@ -676,30 +914,22 @@ load_image (PopplerDocument *doc,
+ return image_ID;
+ }
+
+-static GdkPixbuf *
+-get_thumbnail (PopplerDocument *doc,
+- gint page_num,
+- gint preferred_size)
++static cairo_surface_t *
++get_thumb_surface (PopplerDocument *doc,
++ gint page_num,
++ gint preferred_size)
+ {
+ PopplerPage *page;
+- GdkPixbuf *pixbuf;
++ cairo_surface_t *surface;
+
+ page = poppler_document_get_page (doc, page_num);
+
+ if (! page)
+ return NULL;
+
+- /* XXX: Remove conditional when we depend on poppler 0.8.0, but also
+- * add configure check to make sure POPPLER_WITH_GDK is enabled!
+- */
+-#ifdef POPPLER_WITH_GDK
+- pixbuf = poppler_page_get_thumbnail_pixbuf (page);
+-#else
+- pixbuf = poppler_page_get_thumbnail (page);
+-#endif
+-
++ surface = poppler_page_get_thumbnail (page);
+
+- if (! pixbuf)
++ if (! surface)
+ {
+ gdouble width;
+ gdouble height;
+@@ -712,15 +942,28 @@ get_thumbnail (PopplerDocument *doc,
+ width *= scale;
+ height *= scale;
+
+- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
+- width, height);
+-
+- poppler_page_render_to_pixbuf (page,
+- 0, 0, width, height, scale, 0, pixbuf);
++ surface = render_page_to_surface (page, width, height, scale);
+ }
+
+ g_object_unref (page);
+
++ return surface;
++}
++
++static GdkPixbuf *
++get_thumb_pixbuf (PopplerDocument *doc,
++ gint page_num,
++ gint preferred_size)
++{
++ cairo_surface_t *surface;
++ GdkPixbuf *pixbuf;
++
++ surface = get_thumb_surface (doc, page_num, preferred_size);
++ pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0,
++ cairo_image_surface_get_width (surface),
++ cairo_image_surface_get_height (surface));
++ cairo_surface_destroy (surface);
++
+ return pixbuf;
+ }
+
+@@ -769,8 +1012,8 @@ thumbnail_thread (gpointer data)
+ idle_data->page_no = i;
+
+ /* FIXME get preferred size from somewhere? */
+- idle_data->pixbuf = get_thumbnail (thread_data->document, i,
+- THUMBNAIL_SIZE);
++ idle_data->pixbuf = get_thumb_pixbuf (thread_data->document, i,
++ THUMBNAIL_SIZE);
+
+ g_idle_add (idle_set_thumbnail, idle_data);
+
+--
+1.7.5
diff --git a/staging/gimp/gimp.install b/staging/gimp/gimp.install
new file mode 100644
index 000000000..c317fbaca
--- /dev/null
+++ b/staging/gimp/gimp.install
@@ -0,0 +1,12 @@
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/gimp/libpng_compile.patch b/staging/gimp/libpng_compile.patch
new file mode 100644
index 000000000..26d3f9427
--- /dev/null
+++ b/staging/gimp/libpng_compile.patch
@@ -0,0 +1,984 @@
+Description: fix compilation against libpng 1.5
+Origin: upstream, 2.6 branch, diff of 2917a0e..e7469007
+Bug-Debian: http://bugs.debian.org/649972
+
+diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
+index 29dd155..8054504 100644
+--- a/plug-ins/common/file-mng.c
++++ b/plug-ins/common/file-mng.c
+@@ -136,7 +136,6 @@ struct mng_data_t
+ gint32 default_dispose;
+ };
+
+-
+ /* Values of the instance of the above struct when the plug-in is
+ * first invoked. */
+
+@@ -160,6 +159,21 @@ static struct mng_data_t mng_data =
+ };
+
+
++/* These are not saved or restored. */
++
++struct mng_globals_t
++{
++ gboolean has_trns;
++ png_bytep trans;
++ int num_trans;
++ gboolean has_plte;
++ png_colorp palette;
++ int num_palette;
++};
++
++static struct mng_globals_t mngg;
++
++
+ /* The output FILE pointer which is used by libmng;
+ * passed around as user data. */
+ struct mnglib_userdata_t
+@@ -196,7 +210,8 @@ static gboolean respin_cmap (png_structp png_ptr,
+ png_infop png_info_ptr,
+ guchar *remap,
+ gint32 image_id,
+- GimpDrawable *drawable);
++ GimpDrawable *drawable,
++ int *bit_depth);
+
+ static gboolean mng_save_image (const gchar *filename,
+ gint32 image_id,
+@@ -414,6 +429,18 @@ ia_has_transparent_pixels (guchar *pixels,
+ return FALSE;
+ }
+
++static int
++get_bit_depth_for_palette (int num_palette)
++{
++ if (num_palette <= 2)
++ return 1;
++ else if (num_palette <= 4)
++ return 2;
++ else if (num_palette <= 16)
++ return 4;
++ else
++ return 8;
++}
+
+ /* Spins the color map (palette) putting the transparent color at
+ * index 0 if there is space. If there isn't any space, warn the user
+@@ -422,11 +449,12 @@ ia_has_transparent_pixels (guchar *pixels,
+ */
+
+ static gboolean
+-respin_cmap (png_structp png_ptr,
+- png_infop png_info_ptr,
++respin_cmap (png_structp pp,
++ png_infop info,
+ guchar *remap,
+ gint32 image_id,
+- GimpDrawable *drawable)
++ GimpDrawable *drawable,
++ int *bit_depth)
+ {
+ static guchar trans[] = { 0 };
+ guchar *before;
+@@ -464,10 +492,13 @@ respin_cmap (png_structp png_ptr,
+
+ if (transparent != -1)
+ {
+- png_color palette[256] = { {0, 0, 0} };
++ static png_color palette[256] = { {0, 0, 0} };
+ gint i;
+
+- png_set_tRNS (png_ptr, png_info_ptr, (png_bytep) trans, 1, NULL);
++ /* Set tRNS chunk values for writing later. */
++ mngg.has_trns = TRUE;
++ mngg.trans = trans;
++ mngg.num_trans = 1;
+
+ /* Transform all pixels with a value = transparent to
+ * 0 and vice versa to compensate for re-ordering in palette
+@@ -489,7 +520,12 @@ respin_cmap (png_structp png_ptr,
+ palette[i].blue = before[3 * remap[i] + 2];
+ }
+
+- png_set_PLTE (png_ptr, png_info_ptr, (png_colorp) palette, colors);
++ /* Set PLTE chunk values for writing later. */
++ mngg.has_plte = TRUE;
++ mngg.palette = palette;
++ mngg.num_palette = colors;
++
++ *bit_depth = get_bit_depth_for_palette (colors);
+
+ return TRUE;
+ }
+@@ -500,7 +536,10 @@ respin_cmap (png_structp png_ptr,
+ }
+ }
+
+- png_set_PLTE (png_ptr, png_info_ptr, (png_colorp) before, colors);
++ mngg.has_plte = TRUE;
++ mngg.palette = (png_colorp) before;
++ mngg.num_palette = colors;
++ *bit_depth = get_bit_depth_for_palette (colors);
+
+ return FALSE;
+ }
+@@ -777,7 +816,6 @@ mng_save_image (const gchar *filename,
+
+ for (i = (num_layers - 1); i >= 0; i--)
+ {
+- gint num_colors;
+ GimpImageType layer_drawable_type;
+ GimpDrawable *layer_drawable;
+ gint layer_offset_x, layer_offset_y;
+@@ -795,8 +833,8 @@ mng_save_image (const gchar *filename,
+ gchar frame_mode;
+ int frame_delay;
+ gchar *temp_file_name;
+- png_structp png_ptr;
+- png_infop png_info_ptr;
++ png_structp pp;
++ png_infop info;
+ FILE *infile, *outfile;
+ int num_passes;
+ int tile_height;
+@@ -804,6 +842,8 @@ mng_save_image (const gchar *filename,
+ int pass, j, k, begin, end, num;
+ guchar *fixed;
+ guchar layer_remap[256];
++ int color_type;
++ int bit_depth;
+
+ layer_name = gimp_drawable_get_name (layers[i]);
+ layer_chunks_type = parse_chunks_type_from_layer_name (layer_name);
+@@ -948,9 +988,9 @@ mng_save_image (const gchar *filename,
+ goto err3;
+ }
+
+- png_ptr = png_create_write_struct (PNG_LIBPNG_VER_STRING,
++ pp = png_create_write_struct (PNG_LIBPNG_VER_STRING,
+ NULL, NULL, NULL);
+- if (NULL == png_ptr)
++ if (NULL == pp)
+ {
+ g_warning ("Unable to png_create_write_struct() in mng_save_image()");
+ fclose (outfile);
+@@ -958,89 +998,97 @@ mng_save_image (const gchar *filename,
+ goto err3;
+ }
+
+- png_info_ptr = png_create_info_struct (png_ptr);
+- if (NULL == png_info_ptr)
++ info = png_create_info_struct (pp);
++ if (NULL == info)
+ {
+ g_warning
+ ("Unable to png_create_info_struct() in mng_save_image()");
+- png_destroy_write_struct (&png_ptr, NULL);
++ png_destroy_write_struct (&pp, NULL);
+ fclose (outfile);
+ g_unlink (temp_file_name);
+ goto err3;
+ }
+
+- if (setjmp (png_ptr->jmpbuf) != 0)
++ if (setjmp (png_jmpbuf (pp)) != 0)
+ {
+ g_warning ("HRM saving PNG in mng_save_image()");
+- png_destroy_write_struct (&png_ptr, &png_info_ptr);
++ png_destroy_write_struct (&pp, &info);
+ fclose (outfile);
+ g_unlink (temp_file_name);
+ goto err3;
+ }
+
+- png_init_io (png_ptr, outfile);
+- png_set_compression_level (png_ptr, mng_data.compression_level);
++ png_init_io (pp, outfile);
+
+- png_info_ptr->width = layer_cols;
+- png_info_ptr->height = layer_rows;
+- png_info_ptr->interlace_type = (mng_data.interlaced == 0 ? 0 : 1);
+- png_info_ptr->bit_depth = 8;
++ bit_depth = 8;
+
+ switch (layer_drawable_type)
+ {
+ case GIMP_RGB_IMAGE:
+- png_info_ptr->color_type = PNG_COLOR_TYPE_RGB;
++ color_type = PNG_COLOR_TYPE_RGB;
+ break;
+ case GIMP_RGBA_IMAGE:
+- png_info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
++ color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ break;
+ case GIMP_GRAY_IMAGE:
+- png_info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
++ color_type = PNG_COLOR_TYPE_GRAY;
+ break;
+ case GIMP_GRAYA_IMAGE:
+- png_info_ptr->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
++ color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
+ break;
+ case GIMP_INDEXED_IMAGE:
+- png_info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+- png_info_ptr->valid |= PNG_INFO_PLTE;
+- png_info_ptr->palette =
+- (png_colorp) gimp_image_get_colormap (image_id, &num_colors);
+- png_info_ptr->num_palette = num_colors;
++ color_type = PNG_COLOR_TYPE_PALETTE;
++ mngg.has_plte = TRUE;
++ mngg.palette = (png_colorp)
++ gimp_image_get_colormap (image_id, &mngg.num_palette);
++ bit_depth = get_bit_depth_for_palette (mngg.num_palette);
+ break;
+ case GIMP_INDEXEDA_IMAGE:
+- png_info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
++ color_type = PNG_COLOR_TYPE_PALETTE;
+ layer_has_unique_palette =
+- respin_cmap (png_ptr, png_info_ptr, layer_remap,
+- image_id, layer_drawable);
++ respin_cmap (pp, info, layer_remap,
++ image_id, layer_drawable,
++ &bit_depth);
+ break;
+ default:
+ g_warning ("This can't be!\n");
+- png_destroy_write_struct (&png_ptr, &png_info_ptr);
++ png_destroy_write_struct (&pp, &info);
+ fclose (outfile);
+ g_unlink (temp_file_name);
+ goto err3;
+ }
+
+- if ((png_info_ptr->valid & PNG_INFO_PLTE) == PNG_INFO_PLTE)
++ /* Note: png_set_IHDR() must be called before any other
++ png_set_*() functions. */
++ png_set_IHDR (pp, info, layer_cols, layer_rows,
++ bit_depth,
++ color_type,
++ mng_data.interlaced ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE,
++ PNG_COMPRESSION_TYPE_BASE,
++ PNG_FILTER_TYPE_BASE);
++
++ if (mngg.has_trns)
++ {
++ png_set_tRNS (pp, info, mngg.trans, mngg.num_trans, NULL);
++ }
++
++ if (mngg.has_plte)
+ {
+- if (png_info_ptr->num_palette <= 2)
+- png_info_ptr->bit_depth = 1;
+- else if (png_info_ptr->num_palette <= 4)
+- png_info_ptr->bit_depth = 2;
+- else if (png_info_ptr->num_palette <= 16)
+- png_info_ptr->bit_depth = 4;
++ png_set_PLTE (pp, info, mngg.palette, mngg.num_palette);
+ }
+
+- png_write_info (png_ptr, png_info_ptr);
++ png_set_compression_level (pp, mng_data.compression_level);
++
++ png_write_info (pp, info);
+
+ if (mng_data.interlaced != 0)
+- num_passes = png_set_interlace_handling (png_ptr);
++ num_passes = png_set_interlace_handling (pp);
+ else
+ num_passes = 1;
+
+- if ((png_info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) &&
+- (png_info_ptr->bit_depth < 8))
+- png_set_packing (png_ptr);
++ if ((color_type == PNG_COLOR_TYPE_PALETTE) &&
++ (bit_depth < 8))
++ png_set_packing (pp);
+
+ tile_height = gimp_tile_height ();
+ layer_pixel = g_new (guchar, tile_height * layer_cols * layer_bpp);
+@@ -1065,7 +1113,7 @@ mng_save_image (const gchar *filename,
+ gimp_pixel_rgn_get_rect (&layer_pixel_rgn, layer_pixel, 0,
+ begin, layer_cols, num);
+
+- if ((png_info_ptr->valid & PNG_INFO_tRNS) == PNG_INFO_tRNS)
++ if (png_get_valid (pp, info, PNG_INFO_tRNS))
+ {
+ for (j = 0; j < num; j++)
+ {
+@@ -1077,7 +1125,7 @@ mng_save_image (const gchar *filename,
+ }
+ }
+ else
+- if (((png_info_ptr->valid & PNG_INFO_PLTE) == PNG_INFO_PLTE)
++ if (png_get_valid (pp, info, PNG_INFO_PLTE)
+ && (layer_bpp == 2))
+ {
+ for (j = 0; j < num; j++)
+@@ -1089,12 +1137,12 @@ mng_save_image (const gchar *filename,
+ }
+ }
+
+- png_write_rows (png_ptr, layer_pixels, num);
++ png_write_rows (pp, layer_pixels, num);
+ }
+ }
+
+- png_write_end (png_ptr, png_info_ptr);
+- png_destroy_write_struct (&png_ptr, &png_info_ptr);
++ png_write_end (pp, info);
++ png_destroy_write_struct (&pp, &info);
+
+ g_free (layer_pixels);
+ g_free (layer_pixel);
+diff --git a/plug-ins/common/file-png.c b/plug-ins/common/file-png.c
+index d42afff..8fa8983 100644
+--- a/plug-ins/common/file-png.c
++++ b/plug-ins/common/file-png.c
+@@ -106,6 +106,17 @@ typedef struct
+ }
+ PngSaveGui;
+
++/* These are not saved or restored. */
++typedef struct
++{
++ gboolean has_trns;
++ png_bytep trans;
++ int num_trans;
++ gboolean has_plte;
++ png_colorp palette;
++ int num_palette;
++}
++PngGlobals;
+
+ /*
+ * Local functions...
+@@ -127,7 +138,7 @@ static gboolean save_image (const gchar *filename,
+ gint32 orig_image_ID,
+ GError **error);
+
+-static void respin_cmap (png_structp pp,
++static int respin_cmap (png_structp pp,
+ png_infop info,
+ guchar *remap,
+ gint32 image_ID,
+@@ -175,6 +186,7 @@ static const PngSaveVals defaults =
+ };
+
+ static PngSaveVals pngvals;
++static PngGlobals pngg;
+
+
+ /*
+@@ -653,13 +665,25 @@ on_read_error (png_structp png_ptr, png_const_charp error_msg)
+ error_data->drawable->width, num);
+ }
+
+- longjmp (png_ptr->jmpbuf, 1);
++ longjmp (png_jmpbuf (png_ptr), 1);
++}
++
++static int
++get_bit_depth_for_palette (int num_palette)
++{
++ if (num_palette <= 2)
++ return 1;
++ else if (num_palette <= 4)
++ return 2;
++ else if (num_palette <= 16)
++ return 4;
++ else
++ return 8;
+ }
+
+ /*
+ * 'load_image()' - Load a PNG image into a new image window.
+ */
+-
+ static gint32
+ load_image (const gchar *filename,
+ gboolean interactive,
+@@ -695,9 +719,20 @@ load_image (const gchar *filename,
+ gint num_texts;
+
+ pp = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++ if (!pp)
++ {
++ /* this could happen if the compile time and run-time libpng
++ versions do not match. */
++
++ g_set_error (error, 0, 0,
++ _("Error creating PNG read struct while saving '%s'."),
++ gimp_filename_to_utf8 (filename));
++ return -1;
++ }
++
+ info = png_create_info_struct (pp);
+
+- if (setjmp (pp->jmpbuf))
++ if (setjmp (png_jmpbuf (pp)))
+ {
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Error while reading '%s'. File corrupted?"),
+@@ -705,10 +740,6 @@ load_image (const gchar *filename,
+ return image;
+ }
+
+- /* initialise image here, thus avoiding compiler warnings */
+-
+- image = -1;
+-
+ /*
+ * Open the file and initialize the PNG read "engine"...
+ */
+@@ -738,17 +769,19 @@ load_image (const gchar *filename,
+ * Latest attempt, this should be my best yet :)
+ */
+
+- if (info->bit_depth == 16)
++ if (png_get_bit_depth (pp, info) == 16)
+ {
+ png_set_strip_16 (pp);
+ }
+
+- if (info->color_type == PNG_COLOR_TYPE_GRAY && info->bit_depth < 8)
++ if (png_get_color_type (pp, info) == PNG_COLOR_TYPE_GRAY &&
++ png_get_bit_depth (pp, info) < 8)
+ {
+ png_set_expand (pp);
+ }
+
+- if (info->color_type == PNG_COLOR_TYPE_PALETTE && info->bit_depth < 8)
++ if (png_get_color_type (pp, info) == PNG_COLOR_TYPE_PALETTE &&
++ png_get_bit_depth (pp, info) < 8)
+ {
+ png_set_packing (pp);
+ }
+@@ -757,8 +790,8 @@ load_image (const gchar *filename,
+ * Expand G+tRNS to GA, RGB+tRNS to RGBA
+ */
+
+- if (info->color_type != PNG_COLOR_TYPE_PALETTE &&
+- (info->valid & PNG_INFO_tRNS))
++ if (png_get_color_type (pp, info) != PNG_COLOR_TYPE_PALETTE &&
++ png_get_valid (pp, info, PNG_INFO_tRNS))
+ {
+ png_set_expand (pp);
+ }
+@@ -775,7 +808,7 @@ load_image (const gchar *filename,
+ */
+
+ if (png_get_valid (pp, info, PNG_INFO_tRNS) &&
+- info->color_type == PNG_COLOR_TYPE_PALETTE)
++ png_get_color_type (pp, info) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_get_tRNS (pp, info, &alpha_ptr, &num, NULL);
+ /* Copy the existing alpha values from the tRNS chunk */
+@@ -797,7 +830,7 @@ load_image (const gchar *filename,
+
+ png_read_update_info (pp, info);
+
+- switch (info->color_type)
++ switch (png_get_color_type (pp, info))
+ {
+ case PNG_COLOR_TYPE_RGB: /* RGB */
+ bpp = 3;
+@@ -836,7 +869,9 @@ load_image (const gchar *filename,
+ return -1;
+ }
+
+- image = gimp_image_new (info->width, info->height, image_type);
++ image = gimp_image_new (png_get_image_width (pp, info),
++ png_get_image_height (pp, info),
++ image_type);
+ if (image == -1)
+ {
+ g_set_error (error, 0, 0,
+@@ -849,7 +884,9 @@ load_image (const gchar *filename,
+ * Create the "background" layer to hold the image...
+ */
+
+- layer = gimp_layer_new (image, _("Background"), info->width, info->height,
++ layer = gimp_layer_new (image, _("Background"),
++ png_get_image_width (pp, info),
++ png_get_image_height (pp, info),
+ layer_type, 100, GIMP_NORMAL_MODE);
+ gimp_image_add_layer (image, layer, 0);
+
+@@ -883,7 +920,8 @@ load_image (const gchar *filename,
+
+ gimp_layer_set_offsets (layer, offset_x, offset_y);
+
+- if ((abs (offset_x) > info->width) || (abs (offset_y) > info->height))
++ if ((abs (offset_x) > png_get_image_width (pp, info)) ||
++ (abs (offset_y) > png_get_image_height (pp, info)))
+ {
+ if (interactive)
+ g_message (_("The PNG file specifies an offset that caused "
+@@ -938,23 +976,27 @@ load_image (const gchar *filename,
+
+ empty = 0; /* by default assume no full transparent palette entries */
+
+- if (info->color_type & PNG_COLOR_MASK_PALETTE)
++ if (png_get_color_type (pp, info) & PNG_COLOR_MASK_PALETTE)
+ {
++ png_colorp palette;
++ int num_palette;
++
++ png_get_PLTE (pp, info, &palette, &num_palette);
+ if (png_get_valid (pp, info, PNG_INFO_tRNS))
+ {
+ for (empty = 0; empty < 256 && alpha[empty] == 0; ++empty)
+ /* Calculates number of fully transparent "empty" entries */;
+
+ /* keep at least one entry */
+- empty = MIN (empty, info->num_palette - 1);
++ empty = MIN (empty, num_palette - 1);
+
+- gimp_image_set_colormap (image, (guchar *) (info->palette + empty),
+- info->num_palette - empty);
++ gimp_image_set_colormap (image, (guchar *) (palette + empty),
++ num_palette - empty);
+ }
+ else
+ {
+- gimp_image_set_colormap (image, (guchar *) info->palette,
+- info->num_palette);
++ gimp_image_set_colormap (image, (guchar *) palette,
++ num_palette);
+ }
+ }
+
+@@ -972,18 +1014,19 @@ load_image (const gchar *filename,
+ */
+
+ tile_height = gimp_tile_height ();
+- pixel = g_new0 (guchar, tile_height * info->width * bpp);
++ pixel = g_new0 (guchar, tile_height * png_get_image_width (pp, info) * bpp);
+ pixels = g_new (guchar *, tile_height);
+
+ for (i = 0; i < tile_height; i++)
+- pixels[i] = pixel + info->width * info->channels * i;
++ pixels[i] = pixel + png_get_image_width (pp, info) *
++ png_get_channels (pp, info) * i;
+
+ /* Install our own error handler to handle incomplete PNG files better */
+ error_data.drawable = drawable;
+ error_data.pixel = pixel;
+ error_data.tile_height = tile_height;
+- error_data.width = info->width;
+- error_data.height = info->height;
++ error_data.width = png_get_image_width (pp, info);
++ error_data.height = png_get_image_height (pp, info);
+ error_data.bpp = bpp;
+ error_data.pixel_rgn = &pixel_rgn;
+
+@@ -996,10 +1039,11 @@ load_image (const gchar *filename,
+ */
+
+ for (begin = 0, end = tile_height;
+- begin < info->height; begin += tile_height, end += tile_height)
++ begin < png_get_image_height (pp, info);
++ begin += tile_height, end += tile_height)
+ {
+- if (end > info->height)
+- end = info->height;
++ if (end > png_get_image_height (pp, info))
++ end = png_get_image_height (pp, info);
+
+ num = end - begin;
+
+@@ -1016,11 +1060,13 @@ load_image (const gchar *filename,
+ gimp_pixel_rgn_set_rect (&pixel_rgn, pixel, 0, begin,
+ drawable->width, num);
+
+- memset (pixel, 0, tile_height * info->width * bpp);
++ memset (pixel, 0,
++ tile_height * png_get_image_width (pp, info) * bpp);
+
+- gimp_progress_update (((gdouble) pass +
+- (gdouble) end / (gdouble) info->height) /
+- (gdouble) num_passes);
++ gimp_progress_update
++ (((gdouble) pass +
++ (gdouble) end / (gdouble) png_get_image_height (pp, info)) /
++ (gdouble) num_passes);
+ }
+ }
+
+@@ -1189,7 +1235,6 @@ save_image (const gchar *filename,
+ GimpPixelRgn pixel_rgn; /* Pixel region for layer */
+ png_structp pp; /* PNG read pointer */
+ png_infop info; /* PNG info pointer */
+- gint num_colors; /* Number of colors in colormap */
+ gint offx, offy; /* Drawable offsets from origin */
+ guchar **pixels, /* Pixel rows */
+ *fixed, /* Fixed-up pixel data */
+@@ -1200,56 +1245,28 @@ save_image (const gchar *filename,
+ guchar red, green, blue; /* Used for palette background */
+ time_t cutime; /* Time since epoch */
+ struct tm *gmt; /* GMT broken down */
++ int color_type;
++ int bit_depth;
+
+ guchar remap[256]; /* Re-mapping for the palette */
+
+ png_textp text = NULL;
+
+- if (pngvals.comment)
++ pp = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
++ if (!pp)
+ {
+- GimpParasite *parasite;
+- gsize text_length = 0;
+-
+- parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
+- if (parasite)
+- {
+- gchar *comment = g_strndup (gimp_parasite_data (parasite),
+- gimp_parasite_data_size (parasite));
++ /* this could happen if the compile time and run-time libpng
++ versions do not match. */
+
+- gimp_parasite_free (parasite);
+-
+- text = g_new0 (png_text, 1);
+- text->key = "Comment";
+-
+-#ifdef PNG_iTXt_SUPPORTED
+-
+- text->compression = PNG_ITXT_COMPRESSION_NONE;
+- text->text = comment;
+- text->itxt_length = strlen (comment);
+-
+-#else
+-
+- text->compression = PNG_TEXT_COMPRESSION_NONE;
+- text->text = g_convert (comment, -1,
+- "ISO-8859-1", "UTF-8",
+- NULL, &text_length,
+- NULL);
+- text->text_length = text_length;
+-
+-#endif
+-
+- if (!text->text)
+- {
+- g_free (text);
+- text = NULL;
+- }
+- }
++ g_set_error (error, 0, 0,
++ _("Error creating PNG write struct while saving '%s'."),
++ gimp_filename_to_utf8 (filename));
++ return FALSE;
+ }
+
+- pp = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+ info = png_create_info_struct (pp);
+
+- if (setjmp (pp->jmpbuf))
++ if (setjmp (png_jmpbuf (pp)))
+ {
+ g_set_error (error, 0, 0,
+ _("Error while saving '%s'. Could not save image."),
+@@ -1257,9 +1274,6 @@ save_image (const gchar *filename,
+ return FALSE;
+ }
+
+- if (text)
+- png_set_text (pp, info, text, 1);
+-
+ /*
+ * Open the file and initialize the PNG write "engine"...
+ */
+@@ -1286,17 +1300,6 @@ save_image (const gchar *filename,
+ type = gimp_drawable_type (drawable_ID);
+
+ /*
+- * Set the image dimensions, bit depth, interlacing and compression
+- */
+-
+- png_set_compression_level (pp, pngvals.compression_level);
+-
+- info->width = drawable->width;
+- info->height = drawable->height;
+- info->bit_depth = 8;
+- info->interlace_type = pngvals.interlaced;
+-
+- /*
+ * Initialise remap[]
+ */
+ for (i = 0; i < 256; i++)
+@@ -1306,42 +1309,44 @@ save_image (const gchar *filename,
+ * Set color type and remember bytes per pixel count
+ */
+
++ bit_depth = 8;
++
+ switch (type)
+ {
+ case GIMP_RGB_IMAGE:
+- info->color_type = PNG_COLOR_TYPE_RGB;
++ color_type = PNG_COLOR_TYPE_RGB;
+ bpp = 3;
+ break;
+
+ case GIMP_RGBA_IMAGE:
+- info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
++ color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ bpp = 4;
+ break;
+
+ case GIMP_GRAY_IMAGE:
+- info->color_type = PNG_COLOR_TYPE_GRAY;
++ color_type = PNG_COLOR_TYPE_GRAY;
+ bpp = 1;
+ break;
+
+ case GIMP_GRAYA_IMAGE:
+- info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
++ color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
+ bpp = 2;
+ break;
+
+ case GIMP_INDEXED_IMAGE:
+ bpp = 1;
+- info->color_type = PNG_COLOR_TYPE_PALETTE;
+- info->valid |= PNG_INFO_PLTE;
+- info->palette =
+- (png_colorp) gimp_image_get_colormap (image_ID, &num_colors);
+- info->num_palette = num_colors;
++ color_type = PNG_COLOR_TYPE_PALETTE;
++ pngg.has_plte = TRUE;
++ pngg.palette = (png_colorp) gimp_image_get_colormap (image_ID,
++ &pngg.num_palette);
++ bit_depth = get_bit_depth_for_palette (pngg.num_palette);
+ break;
+
+ case GIMP_INDEXEDA_IMAGE:
+ bpp = 2;
+- info->color_type = PNG_COLOR_TYPE_PALETTE;
++ color_type = PNG_COLOR_TYPE_PALETTE;
+ /* fix up transparency */
+- respin_cmap (pp, info, remap, image_ID, drawable);
++ bit_depth = respin_cmap (pp, info, remap, image_ID, drawable);
+ break;
+
+ default:
+@@ -1349,21 +1354,29 @@ save_image (const gchar *filename,
+ return FALSE;
+ }
+
+- /*
+- * Fix bit depths for (possibly) smaller colormap images
+- */
++ /* Note: png_set_IHDR() must be called before any other png_set_*()
++ functions. */
++ png_set_IHDR (pp, info, drawable->width, drawable->height,
++ bit_depth,
++ color_type,
++ pngvals.interlaced ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE,
++ PNG_COMPRESSION_TYPE_BASE,
++ PNG_FILTER_TYPE_BASE);
++
++ if (pngg.has_trns)
++ {
++ png_set_tRNS (pp, info, pngg.trans, pngg.num_trans, NULL);
++ }
+
+- if (info->valid & PNG_INFO_PLTE)
++ if (pngg.has_plte)
+ {
+- if (info->num_palette <= 2)
+- info->bit_depth = 1;
+- else if (info->num_palette <= 4)
+- info->bit_depth = 2;
+- else if (info->num_palette <= 16)
+- info->bit_depth = 4;
+- /* otherwise the default is fine */
++ png_set_PLTE (pp, info, pngg.palette, pngg.num_palette);
+ }
+
++ /* Set the compression level */
++
++ png_set_compression_level (pp, pngvals.compression_level);
++
+ /* All this stuff is optional extras, if the user is aiming for smallest
+ possible file size she can turn them all off */
+
+@@ -1462,6 +1475,52 @@ save_image (const gchar *filename,
+ }
+ #endif
+
++ if (pngvals.comment)
++ {
++ GimpParasite *parasite;
++#ifndef PNG_iTXt_SUPPORTED
++ gsize text_length = 0;
++#endif /* PNG_iTXt_SUPPORTED */
++
++ parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment");
++ if (parasite)
++ {
++ gchar *comment = g_strndup (gimp_parasite_data (parasite),
++ gimp_parasite_data_size (parasite));
++
++ gimp_parasite_free (parasite);
++
++ text = g_new0 (png_text, 1);
++ text->key = "Comment";
++
++#ifdef PNG_iTXt_SUPPORTED
++
++ text->compression = PNG_ITXT_COMPRESSION_NONE;
++ text->text = comment;
++ text->itxt_length = strlen (comment);
++
++#else
++
++ text->compression = PNG_TEXT_COMPRESSION_NONE;
++ text->text = g_convert (comment, -1,
++ "ISO-8859-1", "UTF-8",
++ NULL, &text_length,
++ NULL);
++ text->text_length = text_length;
++
++#endif
++
++ if (!text->text)
++ {
++ g_free (text);
++ text = NULL;
++ }
++ }
++ }
++
++ if (text)
++ png_set_text (pp, info, text, 1);
++
+ png_write_info (pp, info);
+
+ /*
+@@ -1477,7 +1536,8 @@ save_image (const gchar *filename,
+ * Convert unpacked pixels to packed if necessary
+ */
+
+- if (info->color_type == PNG_COLOR_TYPE_PALETTE && info->bit_depth < 8)
++ if (color_type == PNG_COLOR_TYPE_PALETTE &&
++ bit_depth < 8)
+ png_set_packing (pp);
+
+ /*
+@@ -1507,7 +1567,9 @@ save_image (const gchar *filename,
+
+ gimp_pixel_rgn_get_rect (&pixel_rgn, pixel, 0, begin,
+ drawable->width, num);
+- /*if we are with a RGBA image and have to pre-multiply the alpha channel */
++
++ /* If we are with a RGBA image and have to pre-multiply the
++ alpha channel */
+ if (bpp == 4 && ! pngvals.save_transp_pixels)
+ {
+ for (i = 0; i < num; ++i)
+@@ -1529,7 +1591,7 @@ save_image (const gchar *filename,
+
+ /* If we're dealing with a paletted image with
+ * transparency set, write out the remapped palette */
+- if (info->valid & PNG_INFO_tRNS)
++ if (png_get_valid (pp, info, PNG_INFO_tRNS))
+ {
+ guchar inverse_remap[256];
+
+@@ -1547,9 +1609,11 @@ save_image (const gchar *filename,
+ }
+ }
+ }
++
+ /* Otherwise if we have a paletted image and transparency
+ * couldn't be set, we ignore the alpha channel */
+- else if (info->valid & PNG_INFO_PLTE && bpp == 2)
++ else if (png_get_valid (pp, info, PNG_INFO_PLTE) &&
++ bpp == 2)
+ {
+ for (i = 0; i < num; ++i)
+ {
+@@ -1564,7 +1628,7 @@ save_image (const gchar *filename,
+ png_write_rows (pp, pixels, num);
+
+ gimp_progress_update (((double) pass + (double) end /
+- (double) info->height) /
++ (double) drawable->height) /
+ (double) num_passes);
+ }
+ }
+@@ -1694,14 +1758,14 @@ find_unused_ia_color (GimpDrawable *drawable,
+ }
+
+
+-static void
++static int
+ respin_cmap (png_structp pp,
+ png_infop info,
+ guchar *remap,
+ gint32 image_ID,
+ GimpDrawable *drawable)
+ {
+- static const guchar trans[] = { 0 };
++ static guchar trans[] = { 0 };
+
+ gint colors;
+ guchar *before;
+@@ -1728,10 +1792,13 @@ respin_cmap (png_structp pp,
+ * index - do like gif2png and swap
+ * index 0 and index transparent */
+ {
+- png_color palette[256];
++ static png_color palette[256];
+ gint i;
+
+- png_set_tRNS (pp, info, (png_bytep) trans, 1, NULL);
++ /* Set tRNS chunk values for writing later. */
++ pngg.has_trns = TRUE;
++ pngg.trans = trans;
++ pngg.num_trans = 1;
+
+ /* Transform all pixels with a value = transparent to
+ * 0 and vice versa to compensate for re-ordering in palette
+@@ -1752,7 +1819,10 @@ respin_cmap (png_structp pp,
+ palette[i].blue = before[3 * remap[i] + 2];
+ }
+
+- png_set_PLTE (pp, info, palette, colors);
++ /* Set PLTE chunk values for writing later. */
++ pngg.has_plte = TRUE;
++ pngg.palette = palette;
++ pngg.num_palette = colors;
+ }
+ else
+ {
+@@ -1760,14 +1830,22 @@ respin_cmap (png_structp pp,
+ * transparency & just use the full palette */
+ g_message (_("Couldn't losslessly save transparency, "
+ "saving opacity instead."));
+- png_set_PLTE (pp, info, (png_colorp) before, colors);
++
++ /* Set PLTE chunk values for writing later. */
++ pngg.has_plte = TRUE;
++ pngg.palette = (png_colorp) before;
++ pngg.num_palette = colors;
+ }
+ }
+ else
+ {
+- png_set_PLTE (pp, info, (png_colorp) before, colors);
++ /* Set PLTE chunk values for writing later. */
++ pngg.has_plte = TRUE;
++ pngg.palette = (png_colorp) before;
++ pngg.num_palette = colors;
+ }
+
++ return get_bit_depth_for_palette (colors);
+ }
+
+ static gboolean
diff --git a/staging/gimp/linux.gpl b/staging/gimp/linux.gpl
new file mode 100644
index 000000000..0a73d8979
--- /dev/null
+++ b/staging/gimp/linux.gpl
@@ -0,0 +1,19 @@
+GIMP Palette
+Name: linux
+#
+ 0 0 0
+ 0 0 170
+ 0 170 0
+ 0 170 170
+170 0 0
+170 0 170
+170 85 0
+170 170 170
+ 85 85 85
+ 85 85 255
+ 85 255 85
+ 85 255 255
+255 85 85
+255 85 255
+255 255 85
+255 255 255
diff --git a/staging/gimp/uri-backend-libcurl.patch b/staging/gimp/uri-backend-libcurl.patch
new file mode 100644
index 000000000..85da2fc7f
--- /dev/null
+++ b/staging/gimp/uri-backend-libcurl.patch
@@ -0,0 +1,77 @@
+diff -aur gimp-2.6.11/plug-ins/file-uri/uri-backend-libcurl.c gimp-2.6.11.patched/plug-ins/file-uri/uri-backend-libcurl.c
+--- gimp-2.6.11/plug-ins/file-uri/uri-backend-libcurl.c 2010-07-03 00:51:59.000000000 +0200
++++ gimp-2.6.11.patched/plug-ins/file-uri/uri-backend-libcurl.c 2011-06-23 19:15:30.000000000 +0200
+@@ -4,9 +4,9 @@
+ * libcurl backend for the URI plug-in
+ * Copyright (C) 2006 Mukund Sivaraman <muks@mukund.org>
+ *
+- * This program is free software; you can redistribute it and/or modify
++ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2 of the License, or
++ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+@@ -15,8 +15,7 @@
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ #include "config.h"
+@@ -24,7 +23,6 @@
+ #include <errno.h>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include <glib/gstdio.h>
+@@ -63,7 +61,7 @@
+
+ vinfo = curl_version_info (CURLVERSION_NOW);
+
+- protocols = g_string_new ("http:,ftp:");
++ protocols = g_string_new ("http:,ftp:,gopher:");
+
+ if (vinfo->features & CURL_VERSION_SSL)
+ {
+@@ -153,7 +151,7 @@
+ FILE *out_file;
+ CURL *curl_handle;
+ CURLcode result;
+- gint response_code;
++ glong response_code;
+
+ gimp_progress_init (_("Connecting to server"));
+
+@@ -195,12 +193,12 @@
+
+ curl_easy_getinfo (curl_handle, CURLINFO_RESPONSE_CODE, &response_code);
+
+- if (response_code != 200)
++ if (response_code != 200 && response_code != 226 && response_code != 0)
+ {
+ fclose (out_file);
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Opening '%s' for reading resulted in HTTP "
+- "response code: %d"),
++ "response code: %ld"),
+ uri, response_code);
+ curl_easy_cleanup (curl_handle);
+ return FALSE;
+@@ -224,3 +222,10 @@
+
+ return FALSE;
+ }
++
++gchar *
++uri_backend_map_image (const gchar *uri,
++ GimpRunMode run_mode)
++{
++ return NULL;
++}
diff --git a/staging/gthumb/PKGBUILD b/staging/gthumb/PKGBUILD
new file mode 100644
index 000000000..fee27cc78
--- /dev/null
+++ b/staging/gthumb/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 147076 2012-01-21 15:34:53Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=gthumb
+pkgver=2.14.1
+pkgrel=2
+pkgdesc="Image browser and viewer for the GNOME Desktop"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://gthumb.sourceforge.net/"
+depends=('desktop-file-utils' 'libunique' 'gconf' 'exiv2' 'libsoup-gnome' 'clutter-gtk2' 'hicolor-icon-theme')
+makedepends=('intltool' 'gnome-doc-utils' 'libsm' 'gstreamer0.10-base')
+optdepends=('gstreamer0.10-base: video support')
+options=('!libtool' '!emptydirs')
+install=gthumb.install
+source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
+sha256sums=('002a6611112273189348871ff7c717fb3c776f5570656389e3d6c5b26bffa11f')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gthumb "${pkgdir}"/etc/gconf/schemas/*.schemas
+ rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas
+}
diff --git a/staging/gthumb/gthumb.install b/staging/gthumb/gthumb.install
new file mode 100644
index 000000000..6046ebb6f
--- /dev/null
+++ b/staging/gthumb/gthumb.install
@@ -0,0 +1,24 @@
+pkgname=gthumb
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+ update-desktop-database -q
+ 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() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
diff --git a/staging/java7-openjdk/PKGBUILD b/staging/java7-openjdk/PKGBUILD
new file mode 100644
index 000000000..b5ab884cb
--- /dev/null
+++ b/staging/java7-openjdk/PKGBUILD
@@ -0,0 +1,346 @@
+# $Id: PKGBUILD 147010 2012-01-20 18:19:59Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+# Contributor: Guillaume ALAUX <guillaume@archlinux.org>
+
+pkgname=('jre7-openjdk-headless' 'jre7-openjdk' 'jdk7-openjdk' 'openjdk7-src')
+ # ToDo -demo -doc packages, see Debian file lists http://packages.debian.org/source/wheezy/openjdk-7
+pkgbase=java7-openjdk
+_java_ver=7
+_openjdk_build=b147
+_openjdk_date=27_jun_2011
+_icedtea_ver=2.0
+_date=20110922
+
+# check "${srcdir}/icedtea7"/Makefile.am
+_CORBA_CHANGESET=4d9e4fb8af09
+_HOTSPOT_CHANGESET=b28ae681bae0
+_JAXP_CHANGESET=948e734135ea
+_JAXWS_CHANGESET=a2ebfdc9db7e
+_JDK_CHANGESET=2054526dd141
+_LANGTOOLS_CHANGESET=9b85f1265346
+_OPENJDK_CHANGESET=0a76e5390e68
+
+_bootstrap=0 # 0/1 for quick build or full bootstrap
+
+pkgver=${_java_ver}.${_openjdk_build}_${_icedtea_ver}
+pkgrel=6
+arch=('i686' 'x86_64')
+url="http://icedtea.classpath.org"
+license=('custom')
+options=('!emptydirs')
+makedepends=('jdk7-openjdk' 'libxp' 'libxslt'
+ 'alsa-lib' 'apache-ant>=1.8.1' 'giflib' 'libpng>=1.5.7' 'gtk2'
+ 'rhino' 'libpulse>=0.9.11' 'zip' 'unzip' 'cpio' 'fastjar') # fastjar`?
+[ "$_bootstrap" = "1" ] && makedepends=(${makedepends[@]} 'eclipse-ecj')
+
+_url=http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0
+source=(http://icedtea.classpath.org/download/source/icedtea-${_icedtea_ver}.tar.gz
+ ${_url}/archive/${_OPENJDK_CHANGESET}.tar.gz # openjdk.tar.gz
+ ${_url}/corba/archive/${_CORBA_CHANGESET}.tar.gz # corba.tar.gz
+ ${_url}/jaxp/archive/${_JAXP_CHANGESET}.tar.gz # jaxp.tar.gz
+ ${_url}/jaxws/archive/${_JAXWS_CHANGESET}.tar.gz # jaxws.tar.gz
+ ${_url}/jdk/archive/${_JDK_CHANGESET}.tar.gz # jdk.tar.gz
+ ${_url}/langtools/archive/${_LANGTOOLS_CHANGESET}.tar.gz # langtools.tar.gz
+ ${_url}/hotspot/archive/${_HOTSPOT_CHANGESET}.tar.gz # hotspot.tar.gz
+ fontconfig-paths.diff
+ fix_corba_cmds_path.diff
+ openjdk7_fix_jdk_cmds_path.diff
+ openjdk7_nonreparenting-wm.diff
+ jdk7-openjdk.profile
+ jdk7-openjdk.profile.csh
+ jre7-openjdk.profile
+ jre7-openjdk.profile.csh
+ glibc2_15.diff)
+md5sums=('752721a037a625001fad7a5fc2013f60'
+ '4c34ddf70124ea90c79201c1afede3e3'
+ '8f8d222d0a6d363d06b40576da5f1ea2'
+ '4abf34372e34cccd74ad337e487ed790'
+ 'f2f40590a83889b8aa1d4631b705092d'
+ 'd3beed0118bbd93d4651af762eb748c7'
+ 'c8617700b4bd6cd5de1257bc36509bed'
+ 'f10b711b0c784df8707808d9d0f52abd'
+ 'ee1afda124d5927345014ab382ef581e'
+ 'f7e7a212e50abb56a6ef1a2b1bd27405'
+ 'c195c4865b84d9e2e0fd71ac6d88eadb'
+ '203640d6e79e41b0065e016818c17ccd'
+ 'b7b8996448c7b4fa7dd2d744488ed3bd'
+ 'cdabafad0ec413d9a983888bf445a443'
+ '612b0fec7e0943c37a6de77c43622007'
+ '62443459da0cb28181feb260dc0e5ce7'
+ 'a4293acadff03bdccbc9b412ad288549')
+
+#http://www.java.net/download/openjdk/jdk${_java_ver}/promoted/${_openjdk_build}/openjdk-${_java_ver}-fcs-src-${_openjdk_build}-${_openjdk_date}.zip
+
+noextract=("${_OPENJDK_CHANGESET}.tar.gz"
+ "${_CORBA_CHANGESET}.tar.gz"
+ "${_JAXP_CHANGESET}.tar.gz"
+ "${_JAXWS_CHANGESET}.tar.gz"
+ "${_JDK_CHANGESET}.tar.gz"
+ "${_LANGTOOLS_CHANGESET}.tar.gz"
+ "${_HOTSPOT_CHANGESET}.tar.gz")
+
+ _jvmdir=/usr/lib/jvm/java-7-openjdk
+
+ [ "$CARCH" = "x86_64" ] && _JARCH=amd64
+ [ "$CARCH" = "i686" ] && _JARCH=i386
+
+build() {
+ cd "${srcdir}/icedtea-${_icedtea_ver}"
+
+ unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
+
+ # default is to build with first found java-environment found in our repos - is jdk7-openjdk
+ [ -f /etc/profile.d/jdk.sh ] && . /etc/profile.d/jdk.sh
+
+ unset MAKEFLAGS # parallel build is currently broken
+ export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
+ export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
+
+ . /etc/profile.d/apache-ant.sh
+
+ cp ${srcdir}/*.diff ${srcdir}/icedtea-${_icedtea_ver}/patches
+ export DISTRIBUTION_PATCHES="patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/openjdk7_fix_jdk_cmds_path.diff patches/openjdk7_nonreparenting-wm.diff patches/glibc2_15.diff"
+
+ if [ "$_bootstrap" = "1" ]; then
+ BOOTSTRAPOPT="--enable-bootstrap --with-ecj-jar=/usr/share/java/ecj.jar"
+ else
+ BOOTSTRAPOPT="--disable-bootstrap"
+ fi
+
+ ./configure \
+ $BOOTSTRAPOPT \
+ --with-parallel-jobs="${MAKEFLAGS/-j}" \
+ --disable-tests \
+ --with-pkgversion="ArchLinux build ${pkgver}-${pkgrel}-${CARCH}" \
+ --with-jdk-home=${JAVA_HOME} \
+ --with-openjdk-src-zip=${srcdir}/${_OPENJDK_CHANGESET}.tar.gz \
+ --with-hotspot-src-zip=${srcdir}/${_HOTSPOT_CHANGESET}.tar.gz \
+ --with-corba-src-zip=${srcdir}/${_CORBA_CHANGESET}.tar.gz \
+ --with-jaxp-src-zip=${srcdir}/${_JAXP_CHANGESET}.tar.gz \
+ --with-jaxws-src-zip=${srcdir}/${_JAXWS_CHANGESET}.tar.gz \
+ --with-jdk-src-zip=${srcdir}/${_JDK_CHANGESET}.tar.gz \
+ --with-langtools-src-zip=${srcdir}/${_LANGTOOLS_CHANGESET}.tar.gz \
+ --enable-pulse-java \
+ --enable-nss \
+ --with-rhino
+ #--help
+
+# --enable-systemtap Enable inclusion of SystemTap trace support - needs systemtab from AUR + --with-abs-install-dir=/usr/lib/jvm/java-7-openjdk The absolute path where the j2sdk-image dir will be installed
+
+ make
+}
+
+check() {
+ cd "${srcdir}/icedtea-${_icedtea_ver}"
+ make -k check
+}
+
+package_jre7-openjdk-headless() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - Minimal Java runtime - needed for executing non GUI Java programs"
+ depends=('libjpeg-turbo' 'lcms2' 'nss'
+ 'ca-certificates-java' 'rhino')
+ optdepends=('libcups: needed for Java Mauve support - libmawt.so'
+ 'fontconfig: needed for Java Mauve support - libmawt.so')
+ provides=('java-runtime=7')
+ conflicts=('java-runtime' 'openjdk6')
+ # replaces=('openjdk6') # once we remove openjdk6 pkg from the repos
+ backup=(etc/profile.d/jre.sh
+ etc/profile.d/jre.csh
+ etc/java-7-openjdk/calendars.properties
+ etc/java-7-openjdk/content-types.properties
+ etc/java-7-openjdk/cursors/cursors.properties
+ etc/java-7-openjdk/flavormap.properties
+ etc/java-7-openjdk/fontconfig.bfc
+ etc/java-7-openjdk/fontconfig.properties
+ etc/java-7-openjdk/jvm.cfg
+ etc/java-7-openjdk/logging.properties
+ etc/java-7-openjdk/management/jmxremote.access
+ etc/java-7-openjdk/management/jmxremote.password
+ etc/java-7-openjdk/management/management.properties
+ etc/java-7-openjdk/management/snmp.acl
+ etc/java-7-openjdk/net.properties
+ etc/java-7-openjdk/psfont.properties.ja
+ etc/java-7-openjdk/psfontj2d.properties
+ etc/java-7-openjdk/security/java.policy
+ etc/java-7-openjdk/security/java.security
+ etc/java-7-openjdk/security/nss.cfg
+ etc/java-7-openjdk/sound.properties
+ etc/java-7-openjdk/tz.properties)
+ install=jre7-openjdk-headless.install
+
+ cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/jre"
+
+ mv lib/fontconfig.Ubuntu.properties.src lib/fontconfig.properties
+ mv lib/fontconfig.Ubuntu.bfc lib/fontconfig.bfc
+ rm -f lib/fontconfig.*.bfc
+ rm -f lib/fontconfig.*.properties.src
+ rm -f lib/fontconfig.properties.src
+
+ install -d -m755 ${pkgdir}/${_jvmdir}/jre/
+ cp -a bin lib ${pkgdir}/${_jvmdir}/jre
+
+ # Install man pages
+ pushd ../../j2re-image/man
+ install -m755 -d ${pkgdir}/usr/share/man/{,ja/}man1/
+ install -m644 man1/*.1 ${pkgdir}/usr/share/man/man1
+ install -m644 ja_JP.UTF-8/man1/*.1 ${pkgdir}/usr/share/man/ja/man1
+ popd
+
+ # more files that belong to the desktop package
+ mkdir ${srcdir}/tmp-desktop-jre
+ for file in \
+ "/usr/lib/jvm/java-7-openjdk/jre/bin/policytool" \
+ "/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/libjsoundalsa.so" \
+ "/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/libpulse-java.so" \
+ "/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/libsplashscreen.so" \
+ "/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/xawt/libmawt.so" \
+ "/usr/share/man/ja/man1/policytool.1" \
+ "/usr/share/man/man1/policytool.1"; do
+ dirname=`dirname $file`
+ install -dm755 ${srcdir}/tmp-desktop-jre/$dirname || /bin/true
+ # mv file from fakeinstall to pkgdir
+ mv ${pkgdir}/$file ${srcdir}/tmp-desktop-jre$file
+ done
+ rmdir ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/xawt
+
+ # Link binaries into /usr/bin
+ pushd ${pkgdir}/${_jvmdir}/jre/bin
+ install -m755 -d ${pkgdir}/usr/bin/
+ for file in *; do
+ ln -sf ${_jvmdir}/jre/bin/${file} ${pkgdir}/usr/bin
+ done
+ popd
+
+ # Link JKS keystore from ca-certificates-java
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/security/cacerts
+ ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}/${_jvmdir}/jre/lib/security/cacerts"
+
+ # Set some variables
+ install -m755 -d ${pkgdir}/etc/profile.d/
+ install -m755 ${srcdir}/jre7-openjdk.profile ${pkgdir}/etc/profile.d/jre.sh
+ install -m755 ${srcdir}/jre7-openjdk.profile.csh ${pkgdir}/etc/profile.d/jre.csh
+
+ # Install license
+ install -m755 -d ${pkgdir}/usr/share/licenses/${pkgbase}/
+ install -m644 ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README \
+ ${pkgdir}/usr/share/licenses/${pkgbase}
+
+ # Put some more files under backup control
+ install -m755 -d ${pkgdir}/etc/java-7-openjdk/
+ install -m644 ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/*.properties* ${pkgdir}/etc/java-7-openjdk/
+ # install dummy links to make them found by JAVA
+ cd ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/
+ for file in `ls ${pkgdir}/etc/java-7-openjdk/*.properties*`; do
+ ln -vsf /etc/java-7-openjdk/`basename $file` .
+ done
+ # some more
+ install -m755 -d ${pkgdir}/etc/java-7-openjdk/{cursors,management,security}
+ install -m644 ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/images/cursors/cursors.properties ${pkgdir}/etc/java-7-openjdk/cursors/
+ pushd ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/images/cursors/
+ ln -vsf /etc/java-7-openjdk/cursors/cursors.properties .
+ popd
+ mv ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/management/jmxremote.password.template ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/management/jmxremote.password
+ mv ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/management/snmp.acl.template ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/management/snmp.acl
+ install -m644 ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/management/{management.properties,jmxremote.access,jmxremote.password,snmp.acl} ${pkgdir}/etc/java-7-openjdk/management/
+ pushd ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/management
+ ln -vsf /etc/java-7-openjdk/management/{management.properties,jmxremote.access,jmxremote.password,snmp.acl} .
+ popd
+ install -m644 ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/security/{java.policy,java.security,nss.cfg} ${pkgdir}/etc/java-7-openjdk/security/
+ pushd ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/security
+ ln -vsf /etc/java-7-openjdk/security/{java.policy,java.security,nss.cfg} .
+ popd
+ install -m644 ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/fontconfig.bfc ${pkgdir}/etc/java-7-openjdk/
+ install -m644 ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/jvm.cfg ${pkgdir}/etc/java-7-openjdk/
+ pushd ${pkgdir}/usr/lib/jvm/java-7-openjdk/jre/lib/${_JARCH}/
+ ln -vsf /etc/java-7-openjdk/jvm.cfg .
+ popd
+}
+
+package_jre7-openjdk() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs -Full Java runtime environment - needed for executing Java GUI and Webstart programs"
+ depends=('jre7-openjdk-headless' 'xdg-utils' 'hicolor-icon-theme')
+ optdepends=('icedtea-web-java7: web browser plugin + Java Web Start'
+ 'alsa-lib: for basic sound support'
+ 'giflib: for gif format support'
+ 'libpulse: for advanced sound support'
+ 'gtk2: for the Gtk+ look and feel - desktop usage')
+ install=jre7-openjdk.install
+ conflicts=('openjdk6')
+
+ mv ${srcdir}/tmp-desktop-jre/* ${pkgdir}
+ # Link binaries into /usr/bin
+ pushd ${pkgdir}/${_jvmdir}/jre/bin
+ install -m755 -d ${pkgdir}/usr/bin/
+ for file in *; do
+ ln -sf ${_jvmdir}/jre/bin/${file} ${pkgdir}/usr/bin
+ done
+ popd
+
+ cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/jre"
+
+ # Install icons and menu entries
+ for s in 16 24 32 48 ; do
+ install -m755 -d ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/
+ install -m644 ../../../openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
+ ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png
+ done
+
+ # Install desktop files.
+ install -m755 -d ${pkgdir}/usr/share/applications
+ install -m644 ${srcdir}/icedtea-${_icedtea_ver}/{jconsole,policytool}.desktop ${pkgdir}/usr/share/applications
+}
+
+package_jdk7-openjdk() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - SDK"
+ depends=('jre7-openjdk')
+ provides=('java-environment=7')
+ conflicts=('java-environment')
+ # replaces=('openjdk6')
+ backup=(etc/profile.d/jdk.sh etc/profile.d/jdk.csh)
+
+ cd "${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image"
+
+ # Main files
+ install -m755 -d ${pkgdir}/${_jvmdir}/
+
+ cp -a demo include lib sample ${pkgdir}/${_jvmdir}
+
+ # 'bin' files
+ pushd bin
+ install -m755 -d ${pkgdir}/${_jvmdir}/bin/ \
+ ${pkgdir}/usr/bin/ \
+ ${pkgdir}/usr/share/man/{,ja/}man1/
+
+ # 'java-rmi.cgi' will be handled separately as it should not be in the PATH and has no man page
+ for b in $(ls | grep -v java-rmi.cgi); do
+ if [ -e ../jre/bin/${b} ]; then
+ # Provide a link of the jre binary in the jdk/bin/ directory
+ ln -s ../jre/bin/${b} ${pkgdir}/${_jvmdir}/bin/${b}
+ else
+ # Copy binary to jdk/bin/
+ install -m755 ${b} ${pkgdir}/${_jvmdir}/bin/${b}
+ # Copy man page
+ install -m644 ../man/man1/${b}.1 ${pkgdir}/usr/share/man/man1/${b}.1
+ install -m644 ../man/ja/man1/${b}.1 ${pkgdir}/usr/share/man/ja/man1/${b}.1
+ # Link from /bin/
+ ln -s ${_jvmdir}/bin/${b} ${pkgdir}/usr/bin/${b}
+ fi
+ done
+ popd
+
+ # Handling 'java-rmi.cgi' separately
+ install -m755 -D bin/java-rmi.cgi ${pkgdir}/${_jvmdir}/bin/java-rmi.cgi
+
+ # Set some variables
+ install -m755 -d ${pkgdir}/etc/profile.d/
+ install -m755 ${srcdir}/${pkgname}.profile ${pkgdir}/etc/profile.d/jdk.sh
+ install -m755 ${srcdir}/${pkgname}.profile.csh ${pkgdir}/etc/profile.d/jdk.csh
+}
+
+package_openjdk7-src() {
+ pkgdesc="Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - sources"
+
+ install -D ${srcdir}/icedtea-${_icedtea_ver}/openjdk.build/j2sdk-image/src.zip \
+ ${pkgdir}/${_jvmdir}/src.zip
+}
diff --git a/staging/java7-openjdk/fix_corba_cmds_path.diff b/staging/java7-openjdk/fix_corba_cmds_path.diff
new file mode 100644
index 000000000..842657880
--- /dev/null
+++ b/staging/java7-openjdk/fix_corba_cmds_path.diff
@@ -0,0 +1,33 @@
+--- openjdk/corba/make/common/shared/Defs-utils.gmk.old 2008-04-13 13:26:12.000000000 +0300
++++ openjdk/corba/make/common/shared/Defs-utils.gmk 2008-04-14 15:35:13.000000000 +0300
+@@ -86,10 +86,10 @@
+ CHMOD = $(UTILS_COMMAND_PATH)chmod
+ CMP = $(UTILS_USR_BIN_PATH)cmp
+ COMM = $(UTILS_USR_BIN_PATH)comm
+-COMPRESS = $(UTILS_USR_BIN_PATH)compress
++COMPRESS = $(UTILS_COMMAND_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+ CPIO = $(UTILS_COMMAND_PATH)cpio
+-CUT = $(UTILS_USR_BIN_PATH)cut
++CUT = $(UTILS_COMMAND_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
+ DIFF = $(UTILS_USR_BIN_PATH)diff
+@@ -136,7 +136,7 @@
+ TAR = $(UTILS_COMMAND_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+-TR = $(UTILS_USR_BIN_PATH)tr
++TR = $(UTILS_COMMAND_PATH)tr
+ TRUE = $(UTILS_COMMAND_PATH)true
+ UNAME = $(UTILS_COMMAND_PATH)uname
+ UNIQ = $(UTILS_USR_BIN_PATH)uniq
+@@ -186,7 +186,7 @@
+ # others have it in /usr/bin.
+ SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
+ $(wildcard $(UTILS_USR_BIN_PATH)sort))
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(UTILS_COMMAND_PATH)gawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
diff --git a/staging/java7-openjdk/fontconfig-paths.diff b/staging/java7-openjdk/fontconfig-paths.diff
new file mode 100644
index 000000000..fa08db629
--- /dev/null
+++ b/staging/java7-openjdk/fontconfig-paths.diff
@@ -0,0 +1,134 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2009-05-29 22:45:23.024341869 +0000
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.new 2009-05-29 22:55:13.681366890 +0000
+@@ -275,73 +275,61 @@
+
+ # Font File Names
+
+-filename.DejaVu_Sans=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+-filename.DejaVu_Sans_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
+-filename.DejaVu_Sans_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
+-filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
+-
+-filename.DejaVu_Sans_Mono=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
+-filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
+-filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
+-filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
+-
+-filename.DejaVu_Serif=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
+-filename.DejaVu_Serif_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
+-filename.DejaVu_Serif_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Oblique.ttf
+-filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldOblique.ttf
+-
+-filename.AR_PL_UMing_CN=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_UMing_HK=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_UMing_TW=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttf
+-
+-filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf
+-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
+-filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf
+-filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf
+-filename.Baekmuk_Gulim=/usr/share/fonts/truetype/baekmuk/gulim.ttf
+-filename.UnDotum=/usr/share/fonts/truetype/unfonts/UnDotum.ttf
+-filename.UnDotum_Bold=/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf
+-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
+-filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
+-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
+-filename.Sazanami_Mincho=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf
+-filename.VL_Gothic=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf
+-filename.VL_PGothic=/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf
+-
+-filename.Lohit_Bengali=/usr/share/fonts/truetype/ttf-bengali-fonts/lohit_bn.ttf
+-filename.Lohit_Gujarati=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_gu.ttf
+-filename.Lohit_Hindi=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf
+-filename.Lohit_Kannda=/usr/share/fonts/truetype/ttf-kannada-fonts/lohit_kn.ttf
+-#filename.Lohit_Malayalam=/usr/share/fonts/lohit-malayalam/lohit_ml.ttf
+-filename.Lohit_Oriya=/usr/share/fonts/truetype/ttf-oriya-fonts/lohit_or.ttf
+-filename.Lohit_Punjabi=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf
+-filename.Lohit_Tamil=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf
+-filename.Lohit_Telugu=/usr/share/fonts/truetype/ttf-telugu-fonts/lohit_te.ttf
+-filename.LKLUG=/usr/share/fonts/truetype/ttf-sinhala-lklug/lklug.ttf
+-
+-filename.LuxiSans-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisr.ttf
+-filename.LuxiSans-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisb.ttf
+-filename.LuxiSans-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisri.ttf
+-filename.LuxiSans-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisbi.ttf
+-filename.LuxiMono-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximr.ttf
+-filename.LuxiMono-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf
+-filename.LuxiMono-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximri.ttf
+-filename.LuxiMono-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximbi.ttf
+-filename.LuxiSerif-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirr.ttf
+-filename.LuxiSerif-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirb.ttf
+-filename.LuxiSerif-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirri.ttf
+-filename.LuxiSerif-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirbi.ttf
+-
+-# AWT X11 font paths
+-awtfontpath.latin-1=/usr/share/fonts/X11/Type1
+-awtfontpath.umingcn=/usr/share/fonts/truetype/arphic
+-awtfontpath.uminghk=/usr/share/fonts/truetype/arphic
+-awtfontpath.umingtw=/usr/share/fonts/truetype/arphic
+-awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic
+-awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy
+-awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi
+-awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami
+-awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic
+-awtfontpath.korean-baekmuk=/usr/share/fonts/truetype/baekmuk
+-awtfontpath.korean-un=/usr/share/fonts/truetype/unfonts
++filename.DejaVu_Sans=/usr/share/fonts/TTF/DejaVuSans.ttf
++filename.DejaVu_Sans_Bold=/usr/share/fonts/TTF/DejaVuSans-Bold.ttf
++filename.DejaVu_Sans_Oblique=/usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
++filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSans-BoldOblique.ttf
++
++filename.DejaVu_Sans_Mono=/usr/share/fonts/TTF/DejaVuSansMono.ttf
++filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf
++filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf
++filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSansMono-BoldOblique.ttf
++
++filename.DejaVu_Serif=/usr/share/fonts/TTF/DejaVuSerif.ttf
++filename.DejaVu_Serif_Bold=/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf
++filename.DejaVu_Serif_Oblique=/usr/share/fonts/TTF/DejaVuSerif-Oblique.ttf
++filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSerif-BoldOblique.ttf
++
++filename.AR_PL_UMing_CN=/usr/share/fonts/TTF/uming.ttc
++filename.AR_PL_UMing_HK=/usr/share/fonts/TTF/uming.ttc
++filename.AR_PL_UMing_TW=/usr/share/fonts/TTF/uming.ttc
++filename.AR_PL_ShanHeiSun_Uni=/usr/share/TTF/uming.ttf
++
++filename.WenQuanYi_Zen_Hei=/usr/share/fonts/TTF/wqy-zenhei.ttf
++filename.Baekmuk_Batang=/usr/share/fonts/TTF/batang.ttf
++filename.UnBatang=/usr/share/fonts/TTF/UnBatang.ttf
++filename.UnBatang_Bold=/usr/share/fonts/TTF/UnBatangBold.ttf
++filename.Baekmuk_Gulim=/usr/share/fonts/TTF/gulim.ttf
++filename.UnDotum=/usr/share/fonts/TTF/UnDotum.ttf
++filename.UnDotum_Bold=/usr/share/fonts/TTF/UnDotumBold.ttf
++filename.Kochi_Gothic=/usr/share/fonts/TTF/kochi-gothic.ttf
++filename.Sazanami_Gothic=/usr/share/fonts/TTF/sazanami-gothic.ttf
++filename.Kochi_Mincho=/usr/share/fonts/TTF/kochi-mincho.ttf
++filename.Sazanami_Mincho=/usr/share/fonts/TTF/sazanami-mincho.ttf
++filename.VL_Gothic=/usr/share/fonts/TTF/VL-Gothic-Regular.ttf
++filename.VL_PGothic=/usr/share/fonts/TTF/VL-PGothic-Regular.ttf
++
++filename.Lohit_Bengali=/usr/share/fonts/TTF/lohit_bn.ttf
++filename.Lohit_Gujarati=/usr/share/fonts/TTF/lohit_gu.ttf
++filename.Lohit_Hindi=/usr/share/fonts/TTF/lohit_hi.ttf
++filename.Lohit_Kannda=/usr/share/fonts/TTF/lohit_kn.ttf
++#filename.Lohit_Malayalam=/usr/share/fonts/TTF/lohit_ml.ttf
++filename.Lohit_Oriya=/usr/share/fonts/TTF/lohit_or.ttf
++filename.Lohit_Punjabi=/usr/share/fonts/TTF/lohit_pa.ttf
++filename.Lohit_Tamil=/usr/share/fonts/TTF/lohit_ta.ttf
++filename.Lohit_Telugu=/usr/share/fonts/TTF/lohit_te.ttf
++filename.LKLUG=/usr/share/fonts/TTF/lklug.ttf
++
++filename.LuxiSans-Regular=/usr/share/fonts/TTF/luxisr.ttf
++filename.LuxiSans-Bold=/usr/share/fonts/TTF/luxisb.ttf
++filename.LuxiSans-Oblique=/usr/share/fonts/TTF/luxisri.ttf
++filename.LuxiSans-BoldOblique=/usr/share/fonts/TTF/luxisbi.ttf
++filename.LuxiMono-Regular=/usr/share/fonts/TTF/luximr.ttf
++filename.LuxiMono-Bold=/usr/share/fonts/TTF/luximb.ttf
++filename.LuxiMono-Oblique=/usr/share/fonts/TTF/luximri.ttf
++filename.LuxiMono-BoldOblique=/usr/share/fonts/TTF/luximbi.ttf
++filename.LuxiSerif-Regular=/usr/share/fonts/TTF/luxirr.ttf
++filename.LuxiSerif-Bold=/usr/share/fonts/TTF/luxirb.ttf
++filename.LuxiSerif-Oblique=/usr/share/fonts/TTF/luxirri.ttf
++filename.LuxiSerif-BoldOblique=/usr/share/fonts/TTF/luxirbi.ttf
++
diff --git a/staging/java7-openjdk/glibc2_15.diff b/staging/java7-openjdk/glibc2_15.diff
new file mode 100644
index 000000000..c2fd6124b
--- /dev/null
+++ b/staging/java7-openjdk/glibc2_15.diff
@@ -0,0 +1,232 @@
+
+# HG changeset patch
+# User never
+# Date 1319555835 25200
+# Node ID a6eef545f1a2ceca6aeadf688a965df600ffef28
+# Parent 2ec638646e86e455978c31a9d47fc0ec271ed926
+7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
+Reviewed-by: never
+Contributed-by: Omair Majid <omajid@redhat.com>
+
+--- openjdk/hotspot/src/share/vm/opto/addnode.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/opto/addnode.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -33,8 +33,6 @@
+ #include "opto/subnode.hpp"
+
+ // Portions of code courtesy of Clifford Click
+-
+-#define MAXFLOAT ((float)3.40282346638528860e+38)
+
+ // Classic Add functionality. This covers all the usual 'add' behaviors for
+ // an algebraic ring. Add-integer, add-float, add-double, and binary-or are
+--- openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -107,7 +107,7 @@ extern "C" {
+ if (env != xenv) { \
+ NativeReportJNIFatalError(thr, warn_wrong_jnienv); \
+ } \
+- __ENTRY(result_type, header, thr)
++ VM_ENTRY_BASE(result_type, header, thr)
+
+
+ #define UNCHECKED() (unchecked_jni_NativeInterface)
+--- openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 08:17:15 2011 -0700
+@@ -426,7 +426,7 @@ struct jvmtiInterface_1_ jvmti</xsl:text
+ <xsl:value-of select="$space"/>
+ <xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
+ <xsl:value-of select="$space"/>
+- <xsl:text>__ENTRY(jvmtiError, </xsl:text>
++ <xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
+ <xsl:apply-templates select="." mode="functionid"/>
+ <xsl:text> , current_thread)</xsl:text>
+ <xsl:value-of select="$space"/>
+--- openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -173,7 +173,7 @@ JvmtiEnv::GetThreadLocalStorage(jthread
+ // from native so as to resolve the jthread.
+
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
++ VM_ENTRY_BASE(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ oop thread_oop = JNIHandles::resolve_external_guard(thread);
+--- openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -373,7 +373,7 @@ JvmtiExport::get_jvmti_interface(JavaVM
+ JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
+ // transition code: native to VM
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
++ VM_ENTRY_BASE(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
+--- openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 08:17:15 2011 -0700
+@@ -72,9 +72,9 @@ class HandleMarkCleaner: public StackObj
+ }
+ };
+
+-// InterfaceSupport provides functionality used by the __LEAF and __ENTRY
+-// macros. These macros are used to guard entry points into the VM and
+-// perform checks upon leave of the VM.
++// InterfaceSupport provides functionality used by the VM_LEAF_BASE and
++// VM_ENTRY_BASE macros. These macros are used to guard entry points into
++// the VM and perform checks upon leave of the VM.
+
+
+ class InterfaceSupport: AllStatic {
+@@ -433,7 +433,7 @@ class RuntimeHistogramElement : public H
+
+ // LEAF routines do not lock, GC or throw exceptions
+
+-#define __LEAF(result_type, header) \
++#define VM_LEAF_BASE(result_type, header) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ /* begin of body */
+@@ -441,7 +441,7 @@ class RuntimeHistogramElement : public H
+
+ // ENTRY routines may lock, GC and throw exceptions
+
+-#define __ENTRY(result_type, header, thread) \
++#define VM_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ HandleMarkCleaner __hm(thread); \
+ Thread* THREAD = thread; \
+@@ -450,7 +450,7 @@ class RuntimeHistogramElement : public H
+
+ // QUICK_ENTRY routines behave like ENTRY but without a handle mark
+
+-#define __QUICK_ENTRY(result_type, header, thread) \
++#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ Thread* THREAD = thread; \
+@@ -463,20 +463,20 @@ class RuntimeHistogramElement : public H
+ #define IRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define IRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(No_Safepoint_Verifier __nspv(true);)
+
+
+ #define IRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Another special case for nmethod_entry_point so the nmethod that the
+@@ -487,7 +487,7 @@ class RuntimeHistogramElement : public H
+ result_type header { \
+ nmethodLocker _nmlock(nm); \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+ #define IRT_END }
+
+@@ -497,20 +497,20 @@ class RuntimeHistogramElement : public H
+ #define JRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define JRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(JRT_Leaf_Verifier __jlv;)
+
+
+ #define JRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Same as JRT Entry but allows for return value after the safepoint
+@@ -543,11 +543,11 @@ extern "C" {
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ // Ensure that the VMNativeEntryWrapper constructor, which can cause
+-// a GC, is called outside the NoHandleMark (set via __QUICK_ENTRY).
++// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE).
+ #define JNI_QUICK_ENTRY(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+@@ -555,7 +555,7 @@ extern "C" {
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JNI_LEAF(result_type, header) \
+@@ -563,7 +563,7 @@ extern "C" {
+ result_type JNICALL header { \
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ // Close the routine and the extern "C"
+@@ -579,7 +579,7 @@ extern "C" {
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_ENTRY_NO_ENV(result_type, header) \
+@@ -588,7 +588,7 @@ extern "C" {
+ JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_QUICK_ENTRY(result_type, header) \
+@@ -597,14 +597,14 @@ extern "C" {
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_LEAF(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+ VM_Exit::block_if_vm_exited(); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ #define JVM_END } }
+
diff --git a/staging/java7-openjdk/jdk7-openjdk.profile b/staging/java7-openjdk/jdk7-openjdk.profile
new file mode 100644
index 000000000..91265cc86
--- /dev/null
+++ b/staging/java7-openjdk/jdk7-openjdk.profile
@@ -0,0 +1,6 @@
+export J2SDKDIR=/usr/lib/jvm/java-7-openjdk
+export J2REDIR=$J2SDKDIR/jre
+export JAVA_HOME=/usr/lib/jvm/java-7-openjdk
+
+# For non-reparenting window managers, enable '_JAVA_AWT_WM_NONREPARENTING'
+# in /etc/profile.d/jre7.sh
diff --git a/staging/java7-openjdk/jdk7-openjdk.profile.csh b/staging/java7-openjdk/jdk7-openjdk.profile.csh
new file mode 100644
index 000000000..cc7dc8ab1
--- /dev/null
+++ b/staging/java7-openjdk/jdk7-openjdk.profile.csh
@@ -0,0 +1 @@
+setenv J2SDKDIR "/usr/lib/jvm/java-7-openjdk"
diff --git a/staging/java7-openjdk/jre7-openjdk-headless.install b/staging/java7-openjdk/jre7-openjdk-headless.install
new file mode 100644
index 000000000..45f52fe32
--- /dev/null
+++ b/staging/java7-openjdk/jre7-openjdk-headless.install
@@ -0,0 +1,15 @@
+post_install() {
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/sbin/init-jks-keystore
+ fi
+}
+
+post_upgrade() {
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/sbin/init-jks-keystore
+ fi
+}
+
+#post_remove() {
+#
+#}
diff --git a/staging/java7-openjdk/jre7-openjdk.install b/staging/java7-openjdk/jre7-openjdk.install
new file mode 100644
index 000000000..d98e79ec5
--- /dev/null
+++ b/staging/java7-openjdk/jre7-openjdk.install
@@ -0,0 +1,18 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+ echo "when you use a non-reparenting window manager"
+ echo "set _JAVA_AWT_WM_NONREPARENTING=1 in"
+ echo "/etc/profile.d/jre.sh"
+# update-desktop-database -q
+}
+
+post_upgrade() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+# update-desktop-database -q
+}
+
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+# update-desktop-database -q
+}
diff --git a/staging/java7-openjdk/jre7-openjdk.profile b/staging/java7-openjdk/jre7-openjdk.profile
new file mode 100644
index 000000000..c86ce857a
--- /dev/null
+++ b/staging/java7-openjdk/jre7-openjdk.profile
@@ -0,0 +1,5 @@
+export J2REDIR=/usr/lib/jvm/java-7-openjdk/jre
+export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-7-openjdk/jre}
+
+# enable this for non-reparenting window managers
+#export _JAVA_AWT_WM_NONREPARENTING=1
diff --git a/staging/java7-openjdk/jre7-openjdk.profile.csh b/staging/java7-openjdk/jre7-openjdk.profile.csh
new file mode 100644
index 000000000..a9aed27d1
--- /dev/null
+++ b/staging/java7-openjdk/jre7-openjdk.profile.csh
@@ -0,0 +1,5 @@
+setenv J2REDIR "/usr/lib/jvm/java-7-openjdk/jre"
+setenv JAVA_HOME "/usr/lib/jvm/java-7-openjdk/jre"
+
+# enable this for non-reparenting window managers
+#setenv _JAVA_AWT_WM_NONREPARENTING 1
diff --git a/staging/java7-openjdk/openjdk7_fix_jdk_cmds_path.diff b/staging/java7-openjdk/openjdk7_fix_jdk_cmds_path.diff
new file mode 100644
index 000000000..c68bd4441
--- /dev/null
+++ b/staging/java7-openjdk/openjdk7_fix_jdk_cmds_path.diff
@@ -0,0 +1,24 @@
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk.old 2011-08-06 15:46:01.000000000 +0200
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2011-08-06 15:59:26.000000000 +0200
+@@ -91,10 +91,10 @@
+ CHMOD = $(UTILS_COMMAND_PATH)chmod
+ CMP = $(UTILS_USR_BIN_PATH)cmp
+ COMM = $(UTILS_USR_BIN_PATH)comm
+-COMPRESS = $(UTILS_USR_BIN_PATH)compress
++COMPRESS = $(UTILS_COMMAND_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+ CPIO = $(UTILS_COMMAND_PATH)cpio
+-CUT = $(UTILS_USR_BIN_PATH)cut
++CUT = $(UTILS_COMMAND_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
+ DIFF = $(UTILS_USR_BIN_PATH)diff
+@@ -141,7 +141,7 @@
+ TAR = $(UTILS_COMMAND_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+-TR = $(UTILS_USR_BIN_PATH)tr
++TR = $(UTILS_COMMAND_PATH)tr
+ TRUE = $(UTILS_COMMAND_PATH)true
+ UNAME = $(UTILS_COMMAND_PATH)uname
+ UNIQ = $(UTILS_USR_BIN_PATH)uniq
diff --git a/staging/java7-openjdk/openjdk7_nonreparenting-wm.diff b/staging/java7-openjdk/openjdk7_nonreparenting-wm.diff
new file mode 100644
index 000000000..ba1a588e1
--- /dev/null
+++ b/staging/java7-openjdk/openjdk7_nonreparenting-wm.diff
@@ -0,0 +1,58 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java.orig 2011-08-07 18:45:05.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java 2011-08-07 18:45:54.000000000 +0200
+@@ -102,7 +102,8 @@
+ METACITY_WM = 11,
+ COMPIZ_WM = 12,
+ LG3D_WM = 13,
+- MUTTER_WM = 14;
++ MUTTER_WM = 14,
++ OTHER_NONREPARENTING_WM = 15;
+ public String toString() {
+ switch (WMID) {
+ case NO_WM:
+@@ -576,7 +577,7 @@
+ // TODO: according to wikipedia, compiz is now reparenting. This should
+ // probably be updated.
+ static boolean isNonReparentingWM() {
+- return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM);
++ return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.OTHER_NONREPARENTING_WM);
+ }
+
+ /*
+@@ -762,9 +763,17 @@
+ * supports WIN or _NET wm spec.
+ */
+ else if (l_net_protocol.active()) {
+- awt_wmgr = XWM.OTHER_WM;
++ if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
++ } else {
++ awt_wmgr = XWM.OTHER_WM;
++ }
+ } else if (win.active()) {
+- awt_wmgr = XWM.OTHER_WM;
++ if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
++ } else {
++ awt_wmgr = XWM.OTHER_WM;
++ }
+ }
+ /*
+ * Check for legacy WMs.
+@@ -775,6 +784,8 @@
+ awt_wmgr = XWM.MOTIF_WM;
+ } else if (isOpenLook()) {
+ awt_wmgr = XWM.OPENLOOK_WM;
++ } else if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
+ } else {
+ awt_wmgr = XWM.OTHER_WM;
+ }
+@@ -1289,6 +1300,7 @@
+ res = new Insets(28, 6, 6, 6);
+ break;
+ case NO_WM:
++ case OTHER_NONREPARENTING_WM:
+ case LG3D_WM:
+ res = zeroInsets;
+ break;
diff --git a/staging/libreoffice/PKGBUILD b/staging/libreoffice/PKGBUILD
index de7307ef5..d9a941c88 100644
--- a/staging/libreoffice/PKGBUILD
+++ b/staging/libreoffice/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 146062 2012-01-04 21:30:06Z andyrtr $
+# $Id: PKGBUILD 147059 2012-01-21 10:23:48Z andyrtr $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
pkgbase="libreoffice"
@@ -35,9 +35,9 @@ pkgname=('libreoffice-common'
'libreoffice-extension-validator'
'libreoffice-extension-watch-window'
'libreoffice-extension-wiki-publisher')
-_LOver=3.4.4.2
-pkgver=3.4.4
-pkgrel=5
+_LOver=3.4.5.2
+pkgver=3.4.5
+pkgrel=2
arch=('i686' 'x86_64')
#_LO_tree="3.4"
_OFFICEUPD="340"
@@ -61,8 +61,11 @@ makedepends=( # makedepends
_mirror="http://download.documentfoundation.org/libreoffice/src/${pkgver}"
#_mirror="http://dev-builds.libreoffice.org/pre-releases/src"
+#_mirror="http://dev-builds.libreoffice.org/pre-releases-3-4/src"
_additional_source_url="http://hg.services.openoffice.org/binaries"
+_additional_source_url="http://dev-www.libreoffice.org/src"
source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions,extras,filters,help,impress,libs-core,libs-extern,libs-extern-sys,libs-gui,postprocess,sdk,testing,ure,writer}-${_LOver}.tar.bz2 #,translations
+ ${_additional_source_url}/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
${_additional_source_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
${_additional_source_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
@@ -102,11 +105,9 @@ source=(${_mirror}/${pkgbase}-{artwork,base,bootstrap,calc,components,extensions
buildfix_boost.diff
buildfix_ct2n.diff
vbahelper.visibility.patch
- scp2-more-reasonable-file-access-rights.diff
- oracle-recognition.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=549e54fb2f8113502743c443d6deadfe648dede1
- RemovetheoslSecuritygetHomeDircheck.diff::http://cgit.freedesktop.org/libreoffice/ure/patch/?id=bc9b86940a707e9e2e1076f2954f38075398b5d7
- gcc462_buildfix.diff)
+ scp2-more-reasonable-file-access-rights.diff)
noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll
+ f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
@@ -142,25 +143,26 @@ noextract=(185d60944ea767075d27247c3162b3bc-unowinreg.dll
dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt
b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt
90401bca927835b6fbae4a707ed187c8-nlpsolver-0.9.tar.bz2)
-md5sums=('be8b13f83045f0a53b69fe76d6d72e9c'
- 'db423cbb1cee416b718138044a5de930'
- '31944d2139d6d81ef1131bd513530621'
- 'f447fd4ffe54aab9561c6caa262754b3'
- '97fe698737a35c8803712d4e08007620'
- 'acff44d97a5106d9b53c747dabeb0800'
- '620d43a0b9f36388f423e030513864ef'
- '4c5b1ed870363eca2602f0cb42a8415a'
- '702c6ca31525d7d2c2ded86c77b0bd2e'
- 'ac9b3acf78f43c1395d0e2dedc860f30'
- 'd8d2c41cb86bc8ba2a07e001a5317abb'
- '4d4af2fc06dbe33ec2307df812f7abe1'
- '1398a566eb76598bf3005e187fc2386c'
- 'dd962d2d57f88b9e07e665adad3cabbc'
- 'fff0fc9cd16ef1eb2b2ed5d0a6e77f95'
- 'e54d41d39e63d04ac4a88ce79e37af98'
- 'dbc71403040f447683bf55d1f0be3cad'
- '69ce5b72f44b008d0e78767c5b1dbf39'
- '34a2e8ae6b81a042966740263c53e135'
+md5sums=('a75d7d4ebefb4c9a4bb256acf866fa81'
+ 'c1e2dabdf4cfcd5957779014a7f9787e'
+ '79c9c7fc208e7f56af09f284f261a7da'
+ 'c83a8a374d3d5cc83c6ac3b5ff613e46'
+ 'fa64799ebad8cbd2c160ac2f87bd5599'
+ 'b24fba57aa4185934e86a0a8db4a3433'
+ '4f98020088ab9b597fc21b617121bd47'
+ '3c3be7c5f923339c90b0d1d6ecad0243'
+ '3a0bb4bb096b7488533ed2ee466a2bc9'
+ 'f2b180aa1eff3884b4ca81c048f1e327'
+ 'a9af488ef92ad4442eafba874249c529'
+ 'db6a67c96a9090bc5e21b64e202a984e'
+ 'e00187ae0840e1f6a00fa3290cacf0d1'
+ '20fbf6cffd2b06e90a52105b75a57828'
+ '4af055f590732ec19a2534b2278ac49c'
+ 'c84693796d2b1d9c8269425b1fa53aef'
+ 'd4926dc27b6884656feec6753f4fdf22'
+ '770678ca19cca0f7985c1c82b2dccf48'
+ '97a1e3de430b124faf35bf334248ad53'
+ 'f02578f5218f217a9f20e9c30e119c6a'
'1f24ab1d39f4a51faf22244c94a6203f'
'35c94d2df8893241173de1d16b6034c0'
'798b2ffdc8bcfe7bca2cf92b62caf685'
@@ -200,10 +202,7 @@ md5sums=('be8b13f83045f0a53b69fe76d6d72e9c'
'bc228237108cab7745897a9f466b6d39'
'eee273f501ff45dc5f1365e78c6d57c0'
'43b145db28e6c0d73578ae6fd35e510d'
- '37638431e7e40baf2e47966ebb9bc0e9'
- '3c6c62e77c30649a3dfe73512947cc9a'
- 'eb35d4c715e0dfc23bbc706996033829'
- '10600d04ee81014bc9b5cc04e615d799')
+ '37638431e7e40baf2e47966ebb9bc0e9')
build() {
@@ -233,10 +232,6 @@ build() {
patch -Np1 -i ${srcdir}/buildfix_ct2n.diff
patch -Np0 -i ${srcdir}/vbahelper.visibility.patch
patch -Np0 -i ${srcdir}/scp2-more-reasonable-file-access-rights.diff
- patch -Np1 -i ${srcdir}/oracle-recognition.diff
- patch -Np1 -i ${srcdir}/RemovetheoslSecuritygetHomeDircheck.diff
- # https://www.libreoffice.org/bugzilla/show_bug.cgi?id=43139
- patch -Np1 -i ${srcdir}/gcc462_buildfix.diff
# unset C(XX)FLAGS
# http://www.openoffice.org/issues/show_bug.cgi?id=103205
@@ -290,7 +285,6 @@ build() {
--enable-lockdown\
--enable-opengl \
--enable-odk\
- --enable-opengl\
--enable-ext-barcode \
--enable-ext-diagram \
--enable-ext-google-docs \
@@ -333,7 +327,7 @@ build() {
--with-external-libtextcat-data \
--with-openldap\
--with-ant-home="/usr/share/java/apache-ant"\
- --with-system-boost\
+ --without-system-boost\
--with-system-cairo\
--with-system-libs\
--with-system-mozilla\
diff --git a/staging/libreoffice/PKGBUILD.next_stable b/staging/libreoffice/PKGBUILD.next_stable
index a25819863..a8cb4c5ad 100644
--- a/staging/libreoffice/PKGBUILD.next_stable
+++ b/staging/libreoffice/PKGBUILD.next_stable
@@ -18,9 +18,9 @@ pkgname=('libreoffice-common'
'libreoffice-extension-presenter-screen'
'libreoffice-extension-presentation-minimizer'
'libreoffice-extension-report-builder')
-_LOver=3.4.99.2
-pkgver=3.5.0beta2
-pkgrel=2
+_LOver=3.4.99.3
+pkgver=3.5.0beta3
+pkgrel=1
arch=('i686' 'x86_64')
license=('LGPL3')
url="http://www.libreoffice.org/"
@@ -44,7 +44,8 @@ makedepends=( # makedepends
_mirror="http://dev-builds.libreoffice.org/pre-releases/src"
_additional_source_url="http://dev-www.libreoffice.org/src"
source=(${_mirror}/${pkgbase}-{core,help,translations}-${_LOver}.tar.xz
- ${_additional_source_url}/a8b25a0bf696fd126a08319d88998492-libvisio-0.0.11.tar.bz2
+ ${_additional_source_url}/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
+ ${_additional_source_url}/053a35c244bf132f806e198ac4d960aa-libvisio-0.0.12.tar.bz2
${_additional_source_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
${_additional_source_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
${_additional_source_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
@@ -73,8 +74,9 @@ source=(${_mirror}/${pkgbase}-{core,help,translations}-${_LOver}.tar.xz
#${_additional_source_url}/cc8eb870d6a324d36575420efd856319-libcdr-0.0.0.tar.bz2
http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll
gmake_install.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=1048d8fa4abd3e55a45dfb6884db808da1d72c9e
- fix_menuicons.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=c3569696294bb264a0c645db12f027d44b4e033f)
-noextract=(a8b25a0bf696fd126a08319d88998492-libvisio-0.0.11.tar.bz2
+ smp_buildfix.diff::http://cgit.freedesktop.org/libreoffice/core/patch/?id=cf23f57ae6bb7af689a45e0a850c3c2f67a8f810)
+noextract=(053a35c244bf132f806e198ac4d960aa-libvisio-0.0.12.tar.bz2
+ f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2
185d60944ea767075d27247c3162b3bc-unowinreg.dll
0ff7d225d087793c8c2c680d77aac3e7-mdds_0.5.3.tar.bz2
ada24d37d8d638b3d8a9985e80bc2978-source-9.0.0.7-bj.zip
@@ -103,10 +105,11 @@ noextract=(a8b25a0bf696fd126a08319d88998492-libvisio-0.0.11.tar.bz2
ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
# cc8eb870d6a324d36575420efd856319-libcdr-0.0.0.tar.bz2
)
-md5sums=('e80d9d4b6c6b2a8be882a46bc8757e69'
- '31471ad86996629a8c20f3a4d24ee03e'
- '3146b8522605d24ce4a259fe73ec3519'
- 'a8b25a0bf696fd126a08319d88998492'
+md5sums=('3f223ec797a100e557f7138c8ab4a91b'
+ 'bb08c856e5c9a7a8bcf22fefdb7cf13f'
+ '83bd4be3370840de3e535b2c974e8af5'
+ 'f02578f5218f217a9f20e9c30e119c6a'
+ '053a35c244bf132f806e198ac4d960aa'
'1f24ab1d39f4a51faf22244c94a6203f'
'35c94d2df8893241173de1d16b6034c0'
'798b2ffdc8bcfe7bca2cf92b62caf685'
@@ -134,7 +137,7 @@ md5sums=('e80d9d4b6c6b2a8be882a46bc8757e69'
'7c2549f6b0a8bb604e6c4c729ffdcfe6'
'185d60944ea767075d27247c3162b3bc'
'60ce5dc9bd098f95c2e621a930c98dd9'
- 'f9bd737527dafd3eeb451cf0dd95d7d6')
+ '661a52a02a31b3afbe4b3b3146061afd')
build() {
@@ -157,8 +160,8 @@ build() {
# buildfixes & bugfixes
# one late fix to solve make distro-pack-install issue
patch -Np1 -i ${srcdir}/gmake_install.diff
- patch -Np1 -i ${srcdir}/fix_menuicons.diff
-
+ patch -Np1 -i ${srcdir}/smp_buildfix.diff
+
# unset C(XX)FLAGS
# http://www.openoffice.org/issues/show_bug.cgi?id=103205
# unset CFLAGS
@@ -180,7 +183,7 @@ build() {
# non-SMP test build
# export MAKEFLAGS="-j1"
#./configure --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
- touch autogen.lastrun
+# touch autogen.lastrun
./autogen.sh --with-build-version="${_LOver} ArchLinux build-${pkgrel}" --with-vendor="ArchLinux" \
--with-unix-wrapper="libreoffice" \
--enable-split-app-modules \
@@ -232,7 +235,7 @@ build() {
--without-system-mozilla \
--without-system-mozilla-headers \
--with-ant-home="/usr/share/java/apache-ant"\
- --with-system-boost\
+ --without-system-boost\
--with-system-cairo\
--with-system-libs\
--with-system-mythes\
@@ -258,8 +261,6 @@ build() {
touch src.downloaded
#./download
-# unset MAKEFLAGS
-# ./bootstrap
make
# fake installation to create split file lists
mkdir $srcdir/fakeinstall
diff --git a/staging/libwebkit/PKGBUILD b/staging/libwebkit/PKGBUILD
new file mode 100644
index 000000000..389f67bb5
--- /dev/null
+++ b/staging/libwebkit/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 147026 2012-01-20 21:25:43Z eric $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+
+pkgbase=libwebkit
+pkgname=(libwebkit libwebkit3)
+pkgver=1.6.1
+pkgrel=2
+pkgdesc="An opensource web content engine"
+arch=('i686' 'x86_64')
+url="http://webkitgtk.org/"
+license=('custom')
+depends=('libxt' 'libxslt' 'sqlite3' 'icu' 'gstreamer0.10-base' 'libsoup' 'enchant')
+makedepends=('gperf' 'gtk-doc' 'gobject-introspection' 'python2' 'gtk2' 'gtk3')
+options=('!libtool' '!emptydirs')
+install=libwebkit.install
+source=(http://webkitgtk.org/webkit-${pkgver}.tar.gz)
+md5sums=('c11743694b1b71dad287b2e7a9e73b05')
+
+build() {
+ cd "${srcdir}/webkit-${pkgver}"
+ mkdir build-gtk{2,3}
+
+ ( cd build-gtk2 && _build --with-gtk=2.0 )
+ ( cd build-gtk3 && _build --with-gtk=3.0 )
+}
+
+_build() {
+ PYTHON=/usr/bin/python2 ../configure --prefix=/usr \
+ --enable-introspection \
+ --with-font-backend=freetype --enable-gtk-doc \
+ --with-unicode-backend=icu \
+ --enable-spellcheck "$@"
+ make all stamp-po
+}
+
+package_libwebkit() {
+ pkgdesc+=" (for GTK2)"
+ depends+=(gtk2)
+
+ cd "$srcdir/webkit-$pkgver/build-gtk2"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit/LICENSE"
+}
+
+package_libwebkit3() {
+ pkgdesc+=" (for GTK3)"
+ depends+=(gtk3)
+
+ cd "${srcdir}/webkit-${pkgver}/build-gtk3"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 ../Source/WebKit/LICENSE "${pkgdir}/usr/share/licenses/libwebkit3/LICENSE"
+}
diff --git a/staging/libwebkit/libwebkit.install b/staging/libwebkit/libwebkit.install
new file mode 100644
index 000000000..24072f316
--- /dev/null
+++ b/staging/libwebkit/libwebkit.install
@@ -0,0 +1,11 @@
+post_install() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/staging/netpbm/PKGBUILD b/staging/netpbm/PKGBUILD
new file mode 100644
index 000000000..e94519534
--- /dev/null
+++ b/staging/netpbm/PKGBUILD
@@ -0,0 +1,72 @@
+# $Id: PKGBUILD 147094 2012-01-21 19:51:59Z eric $
+# Maintainer: Kevin Piche <kevin@archlinux.org>
+
+pkgname=netpbm
+pkgver=10.57.1
+pkgrel=1
+pkgdesc="A toolkit for manipulation of graphic images"
+arch=('i686' 'x86_64')
+license=('custom' 'BSD' 'GPL' 'LGPL')
+url="http://netpbm.sourceforge.net/"
+depends=('perl' 'libpng' 'libtiff' 'libxml2')
+makedepends=('python2')
+options=('!makeflags')
+# Releases after 10.34 are available via SVN only.
+# Get Advanced tarball here: http://netpbm.sourceforge.net/release.html#tarball
+# Get version number from version.mk
+# Get docs with: wget --recursive --relative -nH http://netpbm.sourceforge.net/doc/
+source=(ftp://ftp.archlinux.org/other/netpbm/${pkgname}-${pkgver}.tar.gz \
+ ftp://ftp.archlinux.org/other/netpbm/netpbm-doc-22Feb2009.tar.xz \
+ netpbm-CAN-2005-2471.patch netpbm-security-code.patch netpbm-security-scripts.patch)
+sha1sums=('cd0b99333faf994a680d77c5d217034df35ebd4e'
+ 'dfeba9f9a5fe987d64db0aadb5ca8c1b20fcead2'
+ 'b79cf9d42488fea065ba16262ed97694c47af08d'
+ '4cd5b94a24886ecae3973c5ae104d8298fe5a1f5'
+ '2ac31f714121e08e47af9337c6bbaab3cbfc5c75')
+
+build() {
+ cd "${srcdir}/advanced"
+ patch -p1 < ../netpbm-CAN-2005-2471.patch
+ patch -p1 < ../netpbm-security-code.patch
+ patch -p1 < ../netpbm-security-scripts.patch
+ sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' buildtools/makeman
+ sed -i 's|@python|@python2|' buildtools/manpage.mk
+
+ cp config.mk.in config.mk
+ [ "${CARCH}" = 'x86_64' ] && echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
+ echo "NETPBM_DOCURL = file://${srcdir}/doc" >> config.mk
+ echo 'TIFFLIB = libtiff.so' >> config.mk
+ echo 'JPEGLIB = libjpeg.so' >> config.mk
+ echo 'PNGLIB = libpng.so' >> config.mk
+ echo 'ZLIB = libz.so' >> config.mk
+
+ sed -i 's|misc|share/netpbm|' common.mk
+ sed -i 's|/link|/lib|' lib/Makefile
+ sed -i 's|install.manweb install.man|install.man|' GNUmakefile
+
+ make
+
+ # Generating useful man pages with html doc
+ cd "${srcdir}/doc"
+ make MAKEMAN="${srcdir}/advanced/buildtools/makeman" USERGUIDE=. \
+ -f "${srcdir}/advanced/buildtools/manpage.mk" manpages
+}
+
+package() {
+ cd "${srcdir}/advanced"
+ make pkgdir="${pkgdir}/usr" PKGMANDIR=share/man install-run install-dev
+
+# Removing dummy man pages
+ rm "${pkgdir}"/usr/share/man/man{1,3,5}/*
+
+ cd "${srcdir}/doc"
+ make MAKEMAN="${srcdir}/advanced/buildtools/makeman" MANDIR="${pkgdir}/usr/share/man" \
+ -f "${srcdir}/advanced/buildtools/manpage.mk" installman
+
+# Replace obsolete utility
+ echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > "${pkgdir}/usr/bin/pgmtopbm"
+
+# Licensing. Note that each program in the package has a separate license.
+ install -D -m644 "${srcdir}/advanced/doc/copyright_summary" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/copyright_summary.txt"
+}
diff --git a/staging/netpbm/netpbm-CAN-2005-2471.patch b/staging/netpbm/netpbm-CAN-2005-2471.patch
new file mode 100644
index 000000000..3759d7ebe
--- /dev/null
+++ b/staging/netpbm/netpbm-CAN-2005-2471.patch
@@ -0,0 +1,16 @@
+--- netpbm-10.29/converter/other/pstopnm.c.CAN-2005-2471 2005-08-15 02:39:46.000000000 +0200
++++ netpbm-10.29/converter/other/pstopnm.c 2005-08-16 15:38:15.000000000 +0200
+@@ -711,11 +711,11 @@
+ ghostscriptProg, arg0,
+ deviceopt, outfileopt, gopt, ropt, textalphabitsopt,
+ "-q", "-dNOPAUSE",
+- "-dSAFER", "-");
++ "-dPARANOIDSAFER", "-");
+ }
+
+ execl(ghostscriptProg, arg0, deviceopt, outfileopt, gopt, ropt, "-q",
+- "-dNOPAUSE", "-dSAFER", "-", NULL);
++ "-dNOPAUSE", "-dPARANOIDSAFER", "-", NULL);
+
+ pm_error("execl() of Ghostscript ('%s') failed, errno=%d (%s)",
+ ghostscriptProg, errno, strerror(errno));
diff --git a/staging/netpbm/netpbm-security-code.patch b/staging/netpbm/netpbm-security-code.patch
new file mode 100644
index 000000000..da67a8f92
--- /dev/null
+++ b/staging/netpbm/netpbm-security-code.patch
@@ -0,0 +1,1668 @@
+diff -up netpbm-10.47.04/analyzer/pgmtexture.c.security netpbm-10.47.04/analyzer/pgmtexture.c
+--- netpbm-10.47.04/analyzer/pgmtexture.c.security 2009-10-21 13:38:55.000000000 +0200
++++ netpbm-10.47.04/analyzer/pgmtexture.c 2009-10-21 15:09:33.000000000 +0200
+@@ -79,6 +79,9 @@ vector (int nl, int nh)
+ {
+ float *v;
+
++ if(nh < nl)
++ pm_error("assert: h < l");
++ overflow_add(nh - nl, 1);
+ MALLOCARRAY(v, (unsigned) (nh - nl + 1));
+ if (v == NULL)
+ pm_error("Unable to allocate memory for a vector.");
+@@ -95,6 +98,9 @@ matrix (int nrl, int nrh, int ncl, int n
+ float **m;
+
+ /* allocate pointers to rows */
++ if(nrh < nrl)
++ pm_error("assert: h < l");
++ overflow_add(nrh - nrl, 1);
+ MALLOCARRAY(m, (unsigned) (nrh - nrl + 1));
+ if (m == NULL)
+ pm_error("Unable to allocate memory for a matrix.");
+@@ -102,6 +108,9 @@ matrix (int nrl, int nrh, int ncl, int n
+ assert (nch >= ncl);
+
+ /* allocate rows and set pointers to them */
++ if(nch < ncl)
++ pm_error("assert: h < l");
++ overflow_add(nch - ncl, 1);
+ for (i = nrl; i <= nrh; ++i) {
+ MALLOCARRAY(m[i], (unsigned) (nch - ncl + 1));
+ if (m[i] == NULL)
+diff -up netpbm-10.47.04/converter/other/gemtopnm.c.security netpbm-10.47.04/converter/other/gemtopnm.c
+--- netpbm-10.47.04/converter/other/gemtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/gemtopnm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -106,6 +106,7 @@ main(argc, argv)
+
+ pnm_writepnminit( stdout, cols, rows, MAXVAL, type, 0 );
+
++ overflow_add(cols, padright);
+ {
+ /* allocate input row data structure */
+ int plane;
+diff -up netpbm-10.47.04/converter/other/jpegtopnm.c.security netpbm-10.47.04/converter/other/jpegtopnm.c
+--- netpbm-10.47.04/converter/other/jpegtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/jpegtopnm.c 2009-10-21 15:54:30.000000000 +0200
+@@ -861,6 +861,8 @@ convertImage(FILE *
+ /* Calculate output image dimensions so we can allocate space */
+ jpeg_calc_output_dimensions(cinfoP);
+
++ overflow2(cinfoP->output_width, cinfoP->output_components);
++
+ /* Start decompressor */
+ jpeg_start_decompress(cinfoP);
+
+diff -up netpbm-10.47.04/converter/other/pbmtopgm.c.security netpbm-10.47.04/converter/other/pbmtopgm.c
+--- netpbm-10.47.04/converter/other/pbmtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/pbmtopgm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -47,6 +47,7 @@ main(int argc, char *argv[]) {
+ "than the image height (%u rows)", height, rows);
+
+ outrow = pgm_allocrow(cols) ;
++ overflow2(width, height);
+ maxval = MIN(PGM_OVERALLMAXVAL, width*height);
+ pgm_writepgminit(stdout, cols, rows, maxval, 0) ;
+
+diff -up netpbm-10.47.04/converter/other/pngtopnm.c.security netpbm-10.47.04/converter/other/pngtopnm.c
+diff -up netpbm-10.47.04/converter/other/pnmtoddif.c.security netpbm-10.47.04/converter/other/pnmtoddif.c
+--- netpbm-10.47.04/converter/other/pnmtoddif.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/pnmtoddif.c 2009-10-21 15:09:33.000000000 +0200
+@@ -632,6 +632,7 @@ main(int argc, char *argv[]) {
+ switch (PNM_FORMAT_TYPE(format)) {
+ case PBM_TYPE:
+ ip.bits_per_pixel = 1;
++ overflow_add(cols, 7);
+ ip.bytes_per_line = (cols + 7) / 8;
+ ip.spectral = 2;
+ ip.components = 1;
+@@ -647,6 +648,7 @@ main(int argc, char *argv[]) {
+ ip.polarity = 2;
+ break;
+ case PPM_TYPE:
++ overflow2(cols, 3);
+ ip.bytes_per_line = 3 * cols;
+ ip.bits_per_pixel = 24;
+ ip.spectral = 5;
+diff -up netpbm-10.47.04/converter/other/pnmtojpeg.c.security netpbm-10.47.04/converter/other/pnmtojpeg.c
+--- netpbm-10.47.04/converter/other/pnmtojpeg.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/pnmtojpeg.c 2009-10-21 15:56:32.000000000 +0200
+@@ -605,7 +605,11 @@ read_scan_script(j_compress_ptr const ci
+ want JPOOL_PERMANENT.
+ */
+ const unsigned int scan_info_size = nscans * sizeof(jpeg_scan_info);
+- jpeg_scan_info * const scan_info =
++ const jpeg_scan_info * scan_info;
++
++ overflow2(nscans, sizeof(jpeg_scan_info));
++
++ scan_info =
+ (jpeg_scan_info *)
+ (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
+ scan_info_size);
+@@ -936,6 +940,8 @@ compute_rescaling_array(JSAMPLE ** const
+ const long half_maxval = maxval / 2;
+ long val;
+
++ overflow_add(maxval, 1);
++ overflow2(maxval+1, sizeof(JSAMPLE));
+ *rescale_p = (JSAMPLE *)
+ (cinfo.mem->alloc_small) ((j_common_ptr) &cinfo, JPOOL_IMAGE,
+ (size_t) (((long) maxval + 1L) *
+@@ -1014,6 +1020,7 @@ convert_scanlines(struct jpeg_compress_s
+ */
+
+ /* Allocate the libpnm output and compressor input buffers */
++ overflow2(cinfo_p->image_width, cinfo_p->input_components);
+ buffer = (*cinfo_p->mem->alloc_sarray)
+ ((j_common_ptr) cinfo_p, JPOOL_IMAGE,
+ (unsigned int) cinfo_p->image_width * cinfo_p->input_components,
+diff -up netpbm-10.47.04/converter/other/pnmtosgi.c.security netpbm-10.47.04/converter/other/pnmtosgi.c
+--- netpbm-10.47.04/converter/other/pnmtosgi.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/pnmtosgi.c 2009-10-21 15:09:33.000000000 +0200
+@@ -213,6 +213,22 @@ write_channels(cols, rows, channels, put
+ }
+ }
+
++static void *
++xmalloc2(int x, int y)
++{
++ void *mem;
++
++ overflow2(x,y);
++ if( x * y == 0 )
++ return NULL;
++
++ mem = malloc2(x, y);
++ if( mem == NULL )
++ pm_error("out of memory allocating %d bytes", x * y);
++ return mem;
++}
++
++
+ static void
+ put_big_short(short s)
+ {
+@@ -250,6 +266,7 @@ build_channels(FILE *ifp, int cols, int
+ #endif
+
+ if( storage != STORAGE_VERBATIM ) {
++ overflow2(channels, rows);
+ MALLOCARRAY_NOFAIL(table, channels * rows);
+ MALLOCARRAY_NOFAIL(rletemp, WORSTCOMPR(cols));
+ }
+@@ -303,6 +320,8 @@ compress(temp, row, rows, cols, chan_no,
+ break;
+ case STORAGE_RLE:
+ tabrow = chan_no * rows + row;
++ overflow2(chan_no, rows);
++ overflow_add(chan_no* rows, row);
+ len = rle_compress(temp, cols); /* writes result into rletemp */
+ channel[chan_no][row].length = len;
+ MALLOCARRAY(p, len);
+diff -up netpbm-10.47.04/converter/other/rletopnm.c.security netpbm-10.47.04/converter/other/rletopnm.c
+--- netpbm-10.47.04/converter/other/rletopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/rletopnm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -19,6 +19,8 @@
+ * If you modify this software, you should include a notice giving the
+ * name of the person performing the modification, the date of modification,
+ * and the reason for such modification.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+ /*
+ * rletopnm - A conversion program to convert from Utah's "rle" image format
+diff -up netpbm-10.47.04/converter/other/sgitopnm.c.security netpbm-10.47.04/converter/other/sgitopnm.c
+--- netpbm-10.47.04/converter/other/sgitopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/sgitopnm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -252,10 +252,14 @@ read_channels(ifp, head, table, func, oc
+ MALLOCARRAY_NOFAIL(image, head->ysize);
+ } else {
+ maxchannel = MIN(3, head->zsize);
++ overflow2(head->ysize, maxchannel);
+ MALLOCARRAY_NOFAIL(image, head->ysize * maxchannel);
+ }
+- if (table)
++ if (table) {
++ overflow2(head->xsize, 2);
++ overflow_add(head->xsize*2, 2);
+ MALLOCARRAY_NOFAIL(temp, WORSTCOMPR(head->xsize));
++ }
+
+ for(channel = 0; channel < maxchannel; ++channel) {
+ unsigned int row;
+diff -up netpbm-10.47.04/converter/other/sirtopnm.c.security netpbm-10.47.04/converter/other/sirtopnm.c
+--- netpbm-10.47.04/converter/other/sirtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/sirtopnm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -69,6 +69,7 @@ char* argv[];
+ }
+ break;
+ case PPM_TYPE:
++ overflow3(cols, rows, 3);
+ picsize = cols * rows * 3;
+ planesize = cols * rows;
+ if ( !( sirarray = (unsigned char*) malloc( picsize ) ) )
+diff -up netpbm-10.47.04/converter/other/tifftopnm.c.security netpbm-10.47.04/converter/other/tifftopnm.c
+--- netpbm-10.47.04/converter/other/tifftopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/tifftopnm.c 2009-10-21 15:49:29.000000000 +0200
+@@ -1291,7 +1291,9 @@ convertRasterByRows(pnmOut * const
+ if (scanbuf == NULL)
+ pm_error("can't allocate memory for scanline buffer");
+
+- MALLOCARRAY(samplebuf, cols * spp);
++ /* samplebuf is unsigned int * !!! */
++ samplebuf = (unsigned int *) malloc3(cols , sizeof(unsigned int) , spp);
++
+ if (samplebuf == NULL)
+ pm_error("can't allocate memory for row buffer");
+
+diff -up netpbm-10.47.04/converter/other/xwdtopnm.c.security netpbm-10.47.04/converter/other/xwdtopnm.c
+--- netpbm-10.47.04/converter/other/xwdtopnm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/other/xwdtopnm.c 2009-10-21 15:53:27.000000000 +0200
+@@ -209,6 +209,10 @@ processX10Header(X10WDFileHeader * cons
+ *colorsP = pnm_allocrow(2);
+ PNM_ASSIGN1((*colorsP)[0], 0);
+ PNM_ASSIGN1((*colorsP)[1], *maxvalP);
++ overflow_add(h10P->pixmap_width, 15);
++ if(h10P->pixmap_width < 0)
++ pm_error("assert: negative width");
++ overflow2((((h10P->pixmap_width + 15) / 16) * 16 - h10P->pixmap_width), 8);
+ *padrightP =
+ (((h10P->pixmap_width + 15) / 16) * 16 - h10P->pixmap_width) * 8;
+ *bits_per_itemP = 16;
+@@ -634,6 +638,7 @@ processX11Header(X11WDFileHeader * cons
+
+ *colsP = h11FixedP->pixmap_width;
+ *rowsP = h11FixedP->pixmap_height;
++ overflow2(h11FixedP->bytes_per_line, 8);
+ *padrightP =
+ h11FixedP->bytes_per_line * 8 -
+ h11FixedP->pixmap_width * h11FixedP->bits_per_pixel;
+diff -up netpbm-10.47.04/converter/other/sunicontopnm.c.security netpbm-10.47.04/converter/other/sunicontopnm.c
+--- netpbm-10.47.04/converter/other/sunicontopnm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/other/sunicontopnm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -11,6 +11,7 @@
+ */
+
+ #include <string.h>
++#include <limits.h>
+
+ #include "nstring.h"
+ #include "pbm.h"
+@@ -87,6 +88,11 @@ ReadIconFile(FILE * const
+ if (*heightP <= 0)
+ pm_error("invalid height (must be positive): %d", *heightP);
+
++ if ( *widthP > INT_MAX - 16 || *widthP < 0)
++ pm_error( "invalid width: %d", *widthP);
++
++ overflow2(*widthP + 16, *heightP);
++
+ }
+
+
+diff -up netpbm-10.47.04/converter/pbm/mdatopbm.c.security netpbm-10.47.04/converter/pbm/mdatopbm.c
+--- netpbm-10.47.04/converter/pbm/mdatopbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/mdatopbm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -245,10 +245,13 @@ main(int argc, char **argv) {
+ pm_readlittleshort(infile, &yy); nInCols = yy;
+ }
+
++ overflow2(nOutCols, 8);
+ nOutCols = 8 * nInCols;
+ nOutRows = nInRows;
+- if (bScale)
++ if (bScale) {
++ overflow2(nOutRows, 2);
+ nOutRows *= 2;
++ }
+
+ data = pbm_allocarray(nOutCols, nOutRows);
+
+diff -up netpbm-10.47.04/converter/pbm/mgrtopbm.c.security netpbm-10.47.04/converter/pbm/mgrtopbm.c
+--- netpbm-10.47.04/converter/pbm/mgrtopbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/mgrtopbm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -65,6 +65,8 @@ readMgrHeader(FILE * const ifP,
+ if (head.h_high < ' ' || head.l_high < ' ')
+ pm_error("Invalid width field in MGR header");
+
++ overflow_add(*colsP, pad);
++
+ *colsP = (((int)head.h_wide - ' ') << 6) + ((int)head.l_wide - ' ');
+ *rowsP = (((int)head.h_high - ' ') << 6) + ((int) head.l_high - ' ');
+ *padrightP = ( ( *colsP + pad - 1 ) / pad ) * pad - *colsP;
+diff -up netpbm-10.47.04/converter/pbm/pbmto10x.c.security netpbm-10.47.04/converter/pbm/pbmto10x.c
+--- netpbm-10.47.04/converter/pbm/pbmto10x.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmto10x.c 2009-10-21 15:09:33.000000000 +0200
+@@ -162,7 +162,7 @@ main(int argc, char * argv[]) {
+ res_60x72();
+
+ pm_close(ifp);
+- exit(0);
++ return 0;
+ }
+
+
+diff -up netpbm-10.47.04/converter/pbm/pbmto4425.c.security netpbm-10.47.04/converter/pbm/pbmto4425.c
+--- netpbm-10.47.04/converter/pbm/pbmto4425.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmto4425.c 2009-10-21 15:09:33.000000000 +0200
+@@ -2,6 +2,7 @@
+
+ #include "nstring.h"
+ #include "pbm.h"
++#include <string.h>
+
+ static char bit_table[2][3] = {
+ {1, 4, 0x10},
+@@ -160,7 +161,7 @@ main(int argc, char * argv[]) {
+ xres = vmap_width * 2;
+ yres = vmap_height * 3;
+
+- vmap = malloc(vmap_width * vmap_height * sizeof(char));
++ vmap = malloc3(vmap_width, vmap_height, sizeof(char));
+ if(vmap == NULL)
+ {
+ pm_error( "Cannot allocate memory" );
+diff -up netpbm-10.47.04/converter/pbm/pbmtogem.c.security netpbm-10.47.04/converter/pbm/pbmtogem.c
+--- netpbm-10.47.04/converter/pbm/pbmtogem.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtogem.c 2009-10-21 15:09:33.000000000 +0200
+@@ -123,6 +123,7 @@ putinit (rows, cols)
+ bitsperitem = 0;
+ bitshift = 7;
+ outcol = 0;
++ overflow_add(cols, 7);
+ outmax = (cols + 7) / 8;
+ outrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char));
+ lastrow = (unsigned char *) pm_allocrow (outmax, sizeof (unsigned char));
+diff -up netpbm-10.47.04/converter/pbm/pbmtogo.c.security netpbm-10.47.04/converter/pbm/pbmtogo.c
+--- netpbm-10.47.04/converter/pbm/pbmtogo.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtogo.c 2009-10-21 15:09:33.000000000 +0200
+@@ -158,6 +158,7 @@ main(int argc,
+ bitrow = pbm_allocrow(cols);
+
+ /* Round cols up to the nearest multiple of 8. */
++ overflow_add(cols, 7);
+ rucols = ( cols + 7 ) / 8;
+ bytesperrow = rucols; /* GraphOn uses bytes */
+ rucols = rucols * 8;
+diff -up netpbm-10.47.04/converter/pbm/pbmtolj.c.security netpbm-10.47.04/converter/pbm/pbmtolj.c
+--- netpbm-10.47.04/converter/pbm/pbmtolj.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtolj.c 2009-10-21 15:09:33.000000000 +0200
+@@ -120,7 +120,11 @@ parseCommandLine(int argc, char ** argv,
+ static void
+ allocateBuffers(unsigned int const cols) {
+
++ overflow_add(cols, 8);
+ rowBufferSize = (cols + 7) / 8;
++ overflow_add(rowBufferSize, 128);
++ overflow_add(rowBufferSize, rowBufferSize+128);
++ overflow_add(rowBufferSize+10, rowBufferSize/8);
+ packBufferSize = rowBufferSize + (rowBufferSize + 127) / 128 + 1;
+ deltaBufferSize = rowBufferSize + rowBufferSize / 8 + 10;
+
+diff -up netpbm-10.47.04/converter/pbm/pbmtomacp.c.security netpbm-10.47.04/converter/pbm/pbmtomacp.c
+--- netpbm-10.47.04/converter/pbm/pbmtomacp.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtomacp.c 2009-10-21 15:09:33.000000000 +0200
+@@ -101,6 +101,7 @@ char *argv[];
+ if( !lflg )
+ left = 0;
+
++ overflow_add(left, MAX_COLS - 1);
+ if( rflg )
+ { if( right - left >= MAX_COLS )
+ right = left + MAX_COLS - 1;
+@@ -111,6 +112,8 @@ char *argv[];
+ if( !tflg )
+ top = 0;
+
++ overflow_add(top, MAX_LINES - 1);
++
+ if( bflg )
+ { if( bottom - top >= MAX_LINES )
+ bottom = top + MAX_LINES - 1;
+diff -up netpbm-10.47.04/converter/pbm/pbmtomda.c.security netpbm-10.47.04/converter/pbm/pbmtomda.c
+--- netpbm-10.47.04/converter/pbm/pbmtomda.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtomda.c 2009-10-21 15:09:33.000000000 +0200
+@@ -179,6 +179,7 @@ int main(int argc, char **argv)
+
+ nOutRowsUnrounded = bScale ? nInRows/2 : nInRows;
+
++ overflow_add(nOutRowsUnrounded, 3);
+ nOutRows = ((nOutRowsUnrounded + 3) / 4) * 4;
+ /* MDA wants rows a multiple of 4 */
+ nOutCols = nInCols / 8;
+diff -up netpbm-10.47.04/converter/pbm/pbmtomgr.c.security netpbm-10.47.04/converter/pbm/pbmtomgr.c
+diff -up netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c.security netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c
+--- netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtoppa/pbm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned
+ return 0;
+
+ case P4:
++ overflow_add(pbm->width, 7);
+ tmp=(pbm->width+7)/8;
+ tmp2=fread(data,1,tmp,pbm->fptr);
+ if(tmp2 == tmp)
+@@ -129,7 +130,8 @@ void pbm_unreadline (pbm_stat *pbm, void
+ return;
+
+ pbm->unread = 1;
+- pbm->revdata = malloc ((pbm->width+7)/8);
++ overflow_add(pbm->width, 7);
++ pbm->revdata = malloc((pbm->width+7)/8);
+ memcpy (pbm->revdata, data, (pbm->width+7)/8);
+ pbm->current_line--;
+ }
+diff -up netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c.security netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c
+--- netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtoppa/pbmtoppa.c 2009-10-21 15:09:33.000000000 +0200
+@@ -441,6 +441,7 @@ main(int argc, char *argv[]) {
+ pm_error("main(): unrecognized parameter '%s'", argv[argn]);
+ }
+
++ overflow_add(Width, 7);
+ Pwidth=(Width+7)/8;
+ printer.fptr=out;
+
+diff -up netpbm-10.47.04/converter/pbm/pbmtoxbm.c.security netpbm-10.47.04/converter/pbm/pbmtoxbm.c
+--- netpbm-10.47.04/converter/pbm/pbmtoxbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtoxbm.c 2009-10-21 15:36:54.000000000 +0200
+@@ -335,6 +335,8 @@ convertRaster(FILE * const ifP,
+
+ unsigned char * bitrow;
+ unsigned int row;
++
++ overflow_add(cols, padright);
+
+ putinit(xbmVersion);
+
+diff -up netpbm-10.47.04/converter/pbm/pbmtoybm.c.security netpbm-10.47.04/converter/pbm/pbmtoybm.c
+--- netpbm-10.47.04/converter/pbm/pbmtoybm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtoybm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -45,6 +45,7 @@ main( argc, argv )
+ bitrow = pbm_allocrow(cols);
+
+ /* Compute padding to round cols up to the nearest multiple of 16. */
++ overflow_add(cols, 16);
+ padright = ((cols + 15) / 16) * 16 - cols;
+
+ putinit(cols, rows);
+diff -up netpbm-10.47.04/converter/pbm/pbmtozinc.c.security netpbm-10.47.04/converter/pbm/pbmtozinc.c
+--- netpbm-10.47.04/converter/pbm/pbmtozinc.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pbmtozinc.c 2009-10-21 15:09:33.000000000 +0200
+@@ -65,6 +65,7 @@ main(int argc, char * argv[]) {
+ bitrow = pbm_allocrow( cols );
+
+ /* Compute padding to round cols up to the nearest multiple of 16. */
++ overflow_add(cols, 16);
+ padright = ( ( cols + 15 ) / 16 ) * 16 - cols;
+
+ printf( "USHORT %s[] = {\n",name);
+diff -up netpbm-10.47.04/converter/pbm/pktopbm.c.security netpbm-10.47.04/converter/pbm/pktopbm.c
+--- netpbm-10.47.04/converter/pbm/pktopbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/pktopbm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -277,6 +277,7 @@ main(int argc, char *argv[]) {
+ if (flagbyte == 7) { /* long form preamble */
+ integer packetlength = get32() ; /* character packet length */
+ car = get32() ; /* character number */
++ overflow_add(packetlength, pktopbm_pkloc);
+ endofpacket = packetlength + pktopbm_pkloc;
+ /* calculate end of packet */
+ if ((car >= MAXPKCHAR) || !filename[car]) {
+diff -up netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security netpbm-10.47.04/converter/pbm/thinkjettopbm.l
+--- netpbm-10.47.04/converter/pbm/thinkjettopbm.l.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/thinkjettopbm.l 2009-10-21 15:09:33.000000000 +0200
+@@ -107,7 +107,9 @@ DIG [0-9]
+ <RASTERMODE>\033\*b{DIG}+W {
+ int l;
+ if (rowCount >= rowCapacity) {
++ overflow_add(rowCapacity, 100);
+ rowCapacity += 100;
++ overflow2(rowCapacity, sizeof *rows);
+ rows = realloc (rows, rowCapacity * sizeof *rows);
+ if (rows == NULL)
+ pm_error ("Out of memory.");
+@@ -217,6 +219,8 @@ yywrap (void)
+ /*
+ * Quite simple since ThinkJet bit arrangement matches PBM
+ */
++
++ overflow2(maxRowLength, 8);
+ pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0);
+
+ packed_bitrow = malloc(maxRowLength);
+diff -up netpbm-10.47.04/converter/pbm/ybmtopbm.c.security netpbm-10.47.04/converter/pbm/ybmtopbm.c
+--- netpbm-10.47.04/converter/pbm/ybmtopbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/pbm/ybmtopbm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -88,4 +88,5 @@ getinit( file, colsP, rowsP, depthP, pad
+ pm_error("EOF / read error");
+
+ *depthP = 1;
++ overflow_add(*colsP, 15);
+ *padrightP = ((*colsP + 15) / 16) * 16 - *colsP;
+}
+
+diff -up netpbm-10.47.04/converter/pgm/lispmtopgm.c.security netpbm-10.47.04/converter/pgm/lispmtopgm.c
+--- netpbm-10.47.04/converter/pgm/lispmtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/pgm/lispmtopgm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -58,6 +58,7 @@ main( argc, argv )
+ pm_error( "depth (%d bits) is too large", depth);
+
+ pgm_writepgminit( stdout, cols, rows, (gray) maxval, 0 );
++ overflow_add(cols, 7);
+ grayrow = pgm_allocrow( ( cols + 7 ) / 8 * 8 );
+
+ for ( row = 0; row < rows; ++row )
+@@ -102,7 +103,9 @@ getinit( file, colsP, rowsP, depthP, pad
+
+ if ( *depthP == 0 )
+ *depthP = 1; /* very old file */
+-
++
++ overflow_add((int)colsP, 31);
++
+ *padrightP = ( ( *colsP + 31 ) / 32 ) * 32 - *colsP;
+
+ if ( *colsP != (cols_32 - *padrightP) ) {
+diff -up netpbm-10.47.04/converter/pgm/psidtopgm.c.security netpbm-10.47.04/converter/pgm/psidtopgm.c
+--- netpbm-10.47.04/converter/pgm/psidtopgm.c.security 2009-10-21 13:39:06.000000000 +0200
++++ netpbm-10.47.04/converter/pgm/psidtopgm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -78,6 +78,7 @@ main(int argc,
+ pm_error("bits/sample (%d) is too large.", bitspersample);
+
+ pgm_writepgminit(stdout, cols, rows, maxval, 0);
++ overflow_add(cols, 7);
+ grayrow = pgm_allocrow((cols + 7) / 8 * 8);
+ for (row = 0; row < rows; ++row) {
+ unsigned int col;
+diff -up netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security netpbm-10.47.04/converter/ppm/ilbmtoppm.c
+--- netpbm-10.47.04/converter/ppm/ilbmtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ilbmtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -594,6 +594,7 @@ decode_row(FILE * const ifP,
+ rawtype *chp;
+
+ cols = bmhdP->w;
++ overflow_add(cols, 15);
+ bytes = RowBytes(cols);
+ for( plane = 0; plane < nPlanes; plane++ ) {
+ int mask;
+@@ -681,6 +682,23 @@ decode_mask(FILE * const ifP,
+ Multipalette handling
+ ****************************************************************************/
+
++static void *
++xmalloc2(x, y)
++ int x;
++ int y;
++{
++ void *mem;
++
++ overflow2(x,y);
++ if( x * y == 0 )
++ return NULL;
++
++ mem = malloc2(x,y);
++ if( mem == NULL )
++ pm_error("out of memory allocating %d bytes", x * y);
++ return mem;
++}
++
+
+ static void
+ multi_adjust(cmap, row, palchange)
+@@ -1300,6 +1318,9 @@ dcol_to_ppm(FILE * const ifP,
+ if( redmaxval != maxval || greenmaxval != maxval || bluemaxval != maxval )
+ pm_message("scaling colors to %d bits", pm_maxvaltobits(maxval));
+
++ overflow_add(redmaxval, 1);
++ overflow_add(greenmaxval, 1);
++ overflow_add(bluemaxval, 1);
+ MALLOCARRAY_NOFAIL(redtable, redmaxval +1);
+ MALLOCARRAY_NOFAIL(greentable, greenmaxval +1);
+ MALLOCARRAY_NOFAIL(bluetable, bluemaxval +1);
+@@ -1729,7 +1750,9 @@ PCHG_ConvertSmall(PCHG, cmap, mask, data
+ ChangeCount32 = *data++;
+ datasize -= 2;
+
++ overflow_add(ChangeCount16, ChangeCount32);
+ changes = ChangeCount16 + ChangeCount32;
++ overflow_add(changes, 1);
+ for( i = 0; i < changes; i++ ) {
+ if( totalchanges >= PCHG->TotalChanges ) goto fail;
+ if( datasize < 2 ) goto fail;
+@@ -1994,6 +2017,9 @@ read_pchg(FILE * const ifp,
+ cmap->mp_change[i] = NULL;
+ if( PCHG.StartLine < 0 ) {
+ int nch;
++ if(PCHG.MaxReg < PCHG.MinReg)
++ pm_error("assert: MinReg > MaxReg");
++ overflow_add(PCHG.MaxReg-PCHG.MinReg, 2);
+ nch = PCHG.MaxReg - PCHG.MinReg +1;
+ MALLOCARRAY_NOFAIL(cmap->mp_init, nch + 1);
+ for( i = 0; i < nch; i++ )
+@@ -2070,6 +2096,7 @@ process_body( FILE * const ifp,
+ if( typeid == ID_ILBM ) {
+ int isdeep;
+
++ overflow_add(bmhdP->w, 15);
+ MALLOCARRAY_NOFAIL(ilbmrow, RowBytes(bmhdP->w));
+ *viewportmodesP |= fakeviewport; /* -isham/-isehb */
+
+diff -up netpbm-10.47.04/converter/ppm/imgtoppm.c.security netpbm-10.47.04/converter/ppm/imgtoppm.c
+--- netpbm-10.47.04/converter/ppm/imgtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/imgtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -84,6 +84,7 @@ main(int argc, char ** argv) {
+ len = atoi((char*) buf );
+ if ( fread( buf, len, 1, ifp ) != 1 )
+ pm_error( "bad colormap buf" );
++ overflow2(cmaplen, 3);
+ if ( cmaplen * 3 != len )
+ {
+ pm_message(
+@@ -105,6 +106,7 @@ main(int argc, char ** argv) {
+ pm_error( "bad pixel data header" );
+ buf[8] = '\0';
+ len = atoi((char*) buf );
++ overflow2(cols, rows);
+ if ( len != cols * rows )
+ pm_message(
+ "pixel data length (%d) does not match image size (%d)",
+diff -up netpbm-10.47.04/converter/ppm/Makefile.security netpbm-10.47.04/converter/ppm/Makefile
+--- netpbm-10.47.04/converter/ppm/Makefile.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/Makefile 2009-10-21 15:09:33.000000000 +0200
+@@ -11,7 +11,7 @@ SUBDIRS = hpcdtoppm ppmtompeg
+
+ PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
+ leaftoppm mtvtoppm neotoppm \
+- pcxtoppm pc1toppm pi1toppm picttoppm pjtoppm \
++ pcxtoppm pc1toppm pi1toppm pjtoppm \
+ ppmtoacad ppmtoapplevol ppmtoarbtxt ppmtoascii \
+ ppmtobmp ppmtoeyuv ppmtogif ppmtoicr ppmtoilbm \
+ ppmtoleaf ppmtolj ppmtomitsu ppmtoneo \
+diff -up netpbm-10.47.04/converter/ppm/pcxtoppm.c.security netpbm-10.47.04/converter/ppm/pcxtoppm.c
+--- netpbm-10.47.04/converter/ppm/pcxtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/pcxtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -409,6 +409,7 @@ pcx_planes_to_pixels(pixels, bitplanes,
+ /*
+ * clear the pixel buffer
+ */
++ overflow2(bytesperline, 8);
+ npixels = (bytesperline * 8) / bitsperpixel;
+ p = pixels;
+ while (--npixels >= 0)
+@@ -470,6 +471,7 @@ pcx_16col_to_ppm(FILE * const ifP,
+ }
+
+ /* BytesPerLine should be >= BitsPerPixel * cols / 8 */
++ overflow2(BytesPerLine, 8);
+ rawcols = BytesPerLine * 8 / BitsPerPixel;
+ if (headerCols > rawcols) {
+ pm_message("warning - BytesPerLine = %d, "
+diff -up netpbm-10.47.04/converter/ppm/picttoppm.c.security netpbm-10.47.04/converter/ppm/picttoppm.c
+--- netpbm-10.47.04/converter/ppm/picttoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/picttoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -1,3 +1,5 @@
++#error "Unfixable. Don't ship me"
++
+ /*
+ * picttoppm.c -- convert a MacIntosh PICT file to PPM format.
+ *
+diff -up netpbm-10.47.04/converter/ppm/pjtoppm.c.security netpbm-10.47.04/converter/ppm/pjtoppm.c
+--- netpbm-10.47.04/converter/ppm/pjtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/pjtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -127,19 +127,21 @@ main(argc, argv)
+ case 'V': /* send plane */
+ case 'W': /* send last plane */
+ if (rows == -1 || r >= rows || image == NULL) {
+- if (rows == -1 || r >= rows)
++ if (rows == -1 || r >= rows) {
++ overflow_add(rows, 100);
+ rows += 100;
++ }
+ if (image == NULL) {
+- MALLOCARRAY(image, rows * planes);
+- MALLOCARRAY(imlen, rows * planes);
++ image = (unsigned char **)
++ malloc3(rows , planes , sizeof(unsigned char *));
++ imlen = (int *) malloc3(rows , planes, sizeof(int));
+ }
+ else {
++ overflow2(rows,planes);
+ image = (unsigned char **)
+- realloc(image,
+- rows * planes *
++ realloc2(image, rows * planes,
+ sizeof(unsigned char *));
+- imlen = (int *)
+- realloc(imlen, rows * planes * sizeof(int));
++ imlen = (int *) realloc2(imlen, rows * planes, sizeof(int));
+ }
+ }
+ if (image == NULL || imlen == NULL)
+@@ -212,8 +214,10 @@ main(argc, argv)
+ for (i = 0, c = 0; c < imlen[p + r * planes]; c += 2)
+ for (cmd = image[p + r * planes][c],
+ val = image[p + r * planes][c+1];
+- cmd >= 0 && i < newcols; cmd--, i++)
++ cmd >= 0 && i < newcols; cmd--, i++) {
+ buf[i] = val;
++ overflow_add(i, 1);
++ }
+ cols = cols > i ? cols : i;
+ free(image[p + r * planes]);
+ /*
+@@ -224,6 +228,7 @@ main(argc, argv)
+ image[p + r * planes] = (unsigned char *) realloc(buf, i);
+ }
+ }
++ overflow2(cols, 8);
+ cols *= 8;
+ }
+
+diff -up netpbm-10.47.04/converter/ppm/ppmtoeyuv.c.security netpbm-10.47.04/converter/ppm/ppmtoeyuv.c
+--- netpbm-10.47.04/converter/ppm/ppmtoeyuv.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtoeyuv.c 2009-10-21 15:09:33.000000000 +0200
+@@ -114,6 +114,7 @@ create_multiplication_tables(const pixva
+
+ int index;
+
++ overflow_add(maxval, 1);
+ MALLOCARRAY_NOFAIL(mult299 , maxval+1);
+ MALLOCARRAY_NOFAIL(mult587 , maxval+1);
+ MALLOCARRAY_NOFAIL(mult114 , maxval+1);
+diff -up netpbm-10.47.04/converter/ppm/ppmtoicr.c.security netpbm-10.47.04/converter/ppm/ppmtoicr.c
+--- netpbm-10.47.04/converter/ppm/ppmtoicr.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtoicr.c 2009-10-21 15:09:33.000000000 +0200
+@@ -169,7 +169,7 @@ char* argv[];
+
+ if (rleflag) {
+ pm_message("sending run-length encoded picture data ..." );
+- testimage = (char*) malloc(rows*cols);
++ testimage = (char*) malloc2(rows, cols);
+ p = testimage;
+ for (i=0; i<rows; i++)
+ for (j=0; j<cols; j++)
+diff -up netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security netpbm-10.47.04/converter/ppm/ppmtoilbm.c
+--- netpbm-10.47.04/converter/ppm/ppmtoilbm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtoilbm.c 2009-10-21 15:47:50.000000000 +0200
+@@ -1214,6 +1214,7 @@ ppm_to_rgb8(ifP, cols, rows, maxval)
+
+ maskmethod = 0; /* no masking - RGB8 uses genlock bits */
+ compmethod = 4; /* RGB8 files are always compressed */
++ overflow2(cols, 4);
+ MALLOCARRAY_NOFAIL(compr_row, cols * 4);
+
+ if( maxval != 255 ) {
+@@ -1302,6 +1303,7 @@ ppm_to_rgbn(ifP, cols, rows, maxval)
+
+ maskmethod = 0; /* no masking - RGBN uses genlock bits */
+ compmethod = 4; /* RGBN files are always compressed */
++ overflow2(cols, 2);
+ MALLOCARRAY_NOFAIL(compr_row, cols * 2);
+
+ if( maxval != 15 ) {
+@@ -1779,6 +1781,7 @@ make_val_table(oldmaxval, newmaxval)
+ unsigned int i;
+ int * table;
+
++ overflow_add(oldmaxval, 1);
+ MALLOCARRAY_NOFAIL(table, oldmaxval + 1);
+ for (i = 0; i <= oldmaxval; ++i)
+ table[i] = ROUNDDIV(i * newmaxval, oldmaxval);
+@@ -2283,8 +2286,11 @@ main(int argc, char ** argv) {
+ MALLOCARRAY_NOFAIL(coded_rowbuf, RowBytes(cols));
+ for (i = 0; i < RowBytes(cols); ++i)
+ coded_rowbuf[i] = 0;
+- if (DO_COMPRESS)
++ if (DO_COMPRESS) {
++ overflow2(cols,2);
++ overflow_add(cols*2,2);
+ MALLOCARRAY_NOFAIL(compr_rowbuf, WORSTCOMPR(RowBytes(cols)));
++ }
+ }
+
+ switch (mode) {
+diff -up netpbm-10.47.04/converter/ppm/ppmtolj.c.security netpbm-10.47.04/converter/ppm/ppmtolj.c
+--- netpbm-10.47.04/converter/ppm/ppmtolj.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtolj.c 2009-10-21 15:09:33.000000000 +0200
+@@ -181,7 +181,8 @@ int main(int argc, char *argv[]) {
+
+ ppm_readppminit( ifp, &cols, &rows, &maxval, &format );
+ pixelrow = ppm_allocrow( cols );
+-
++
++ overflow2(cols, 6);
+ obuf = (unsigned char *) pm_allocrow(cols * 3, sizeof(unsigned char));
+ cbuf = (unsigned char *) pm_allocrow(cols * 6, sizeof(unsigned char));
+ if (mode == C_TRANS_MODE_DELTA)
+diff -up netpbm-10.47.04/converter/ppm/ppmtomitsu.c.security netpbm-10.47.04/converter/ppm/ppmtomitsu.c
+--- netpbm-10.47.04/converter/ppm/ppmtomitsu.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtomitsu.c 2009-10-21 15:48:30.000000000 +0200
+@@ -685,6 +685,8 @@ main(int argc, char * argv[]) {
+ medias = MSize_User;
+
+ if (dpi300) {
++ overflow2(medias.maxcols, 2);
++ overflow2(medias.maxrows, 2);
+ medias.maxcols *= 2;
+ medias.maxrows *= 2;
+ }
+diff -up netpbm-10.47.04/converter/ppm/ppmtopcx.c.security netpbm-10.47.04/converter/ppm/ppmtopcx.c
+--- netpbm-10.47.04/converter/ppm/ppmtopcx.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtopcx.c 2009-10-21 15:09:33.000000000 +0200
+@@ -419,6 +419,8 @@ ppmTo16ColorPcx(pixel ** cons
+ else Planes = 1;
+ }
+ }
++ overflow2(BitsPerPixel, cols);
++ overflow_add(BitsPerPixel * cols, 7);
+ BytesPerLine = ((cols * BitsPerPixel) + 7) / 8;
+ MALLOCARRAY_NOFAIL(indexRow, cols);
+ MALLOCARRAY_NOFAIL(planesrow, BytesPerLine);
+diff -up netpbm-10.47.04/converter/ppm/ppmtopict.c.security netpbm-10.47.04/converter/ppm/ppmtopict.c
+--- netpbm-10.47.04/converter/ppm/ppmtopict.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtopict.c 2009-10-21 15:09:33.000000000 +0200
+@@ -245,6 +245,8 @@ char *argv[];
+ putShort(stdout, 0); /* mode */
+
+ /* Finally, write out the data. */
++ overflow_add(cols/MAX_COUNT, 1);
++ overflow_add(cols, cols/MAX_COUNT+1);
+ packed = malloc((unsigned)(cols+cols/MAX_COUNT+1));
+ for (row = 0, oc = 0; row < rows; row++)
+ oc += putRow(stdout, row, cols, pixels[row], packed);
+diff -up netpbm-10.47.04/converter/ppm/ppmtopj.c.security netpbm-10.47.04/converter/ppm/ppmtopj.c
+--- netpbm-10.47.04/converter/ppm/ppmtopj.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtopj.c 2009-10-21 15:09:33.000000000 +0200
+@@ -179,6 +179,7 @@ char *argv[];
+ pixels = ppm_readppm( ifp, &cols, &rows, &maxval );
+
+ pm_close( ifp );
++ overflow2(cols,2);
+ obuf = (unsigned char *) pm_allocrow(cols, sizeof(unsigned char));
+ cbuf = (unsigned char *) pm_allocrow(cols * 2, sizeof(unsigned char));
+
+diff -up netpbm-10.47.04/converter/ppm/ppmtopjxl.c.security netpbm-10.47.04/converter/ppm/ppmtopjxl.c
+--- netpbm-10.47.04/converter/ppm/ppmtopjxl.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtopjxl.c 2009-10-21 15:43:31.000000000 +0200
+@@ -276,6 +276,8 @@ main(int argc, const char * argv[]) {
+ pm_error("image too large; reduce with ppmscale");
+ if (maxval > PCL_MAXVAL)
+ pm_error("color range too large; reduce with ppmcscale");
++ if (cols < 0 || rows < 0)
++ pm_error("negative size is not possible");
+
+ /* Figure out the colormap. */
+ pm_message("Computing colormap...");
+@@ -296,6 +298,8 @@ main(int argc, const char * argv[]) {
+ case 0: /* direct mode (no palette) */
+ bpp = bitsperpixel(maxval); /* bits per pixel */
+ bpg = bpp; bpb = bpp;
++ overflow2(bpp, 3);
++ overflow_add(bpp*3, 7);
+ bpp = (bpp*3+7)>>3; /* bytes per pixel now */
+ bpr = (bpp<<3)-bpg-bpb;
+ bpp *= cols; /* bytes per row now */
+@@ -305,9 +309,13 @@ main(int argc, const char * argv[]) {
+ case 3: case 7: pclindex++;
+ default:
+ bpp = 8/pclindex;
++ overflow_add(cols, bpp);
++ if(bpp == 0)
++ pm_error("assert: no bpp");
+ bpp = (cols+bpp-1)/bpp; /* bytes per row */
+ }
+ }
++ overflow2(bpp,2);
+ inrow = (char *)malloc((unsigned)bpp);
+ outrow = (char *)malloc((unsigned)bpp*2);
+ runcnt = (signed char *)malloc((unsigned)bpp);
+diff -up netpbm-10.47.04/converter/ppm/ppmtowinicon.c.security netpbm-10.47.04/converter/ppm/ppmtowinicon.c
+--- netpbm-10.47.04/converter/ppm/ppmtowinicon.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtowinicon.c 2009-10-21 15:44:54.000000000 +0200
+@@ -12,6 +12,7 @@
+
+ #include <math.h>
+ #include <string.h>
++#include <stdlib.h>
+
+ #include "pm_c_util.h"
+ #include "winico.h"
+@@ -219,6 +220,7 @@ createAndBitmap (gray ** const ba, int c
+ MALLOCARRAY_NOFAIL(rowData, rows);
+ icBitmap->xBytes = xBytes;
+ icBitmap->data = rowData;
++ overflow2(xBytes, rows);
+ icBitmap->size = xBytes * rows;
+ for (y=0;y<rows;y++) {
+ u1 * row;
+@@ -347,6 +349,7 @@ create4Bitmap (pixel ** const pa, int co
+ MALLOCARRAY_NOFAIL(rowData, rows);
+ icBitmap->xBytes = xBytes;
+ icBitmap->data = rowData;
++ overflow2(xBytes, rows);
+ icBitmap->size = xBytes * rows;
+
+ for (y=0;y<rows;y++) {
+@@ -407,6 +410,7 @@ create8Bitmap (pixel ** const pa, int co
+ MALLOCARRAY_NOFAIL(rowData, rows);
+ icBitmap->xBytes = xBytes;
+ icBitmap->data = rowData;
++ overflow2(xBytes, rows);
+ icBitmap->size = xBytes * rows;
+
+ for (y=0;y<rows;y++) {
+@@ -714,6 +718,10 @@ addEntryToIcon(MS_Ico const MSIcon
+ entry->bitcount = bpp;
+ entry->ih = createInfoHeader(entry, xorBitmap, andBitmap);
+ entry->colors = palette->colors;
++ overflow2(4, entry->color_count);
++ overflow_add(xorBitmap->size, andBitmap->size);
++ overflow_add(xorBitmap->size + andBitmap->size, 40);
++ overflow_add(xorBitmap->size + andBitmap->size + 40, 4 * entry->color_count);
+ entry->size_in_bytes =
+ xorBitmap->size + andBitmap->size + 40 + (4 * entry->color_count);
+ if (verbose)
+diff -up netpbm-10.47.04/converter/ppm/ppmtoxpm.c.security netpbm-10.47.04/converter/ppm/ppmtoxpm.c
+--- netpbm-10.47.04/converter/ppm/ppmtoxpm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ppmtoxpm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -197,6 +197,7 @@ genNumstr(unsigned int const input, int
+ unsigned int i;
+
+ /* Allocate memory for printed number. Abort if error. */
++ overflow_add(digits, 1);
+ if (!(str = (char *) malloc(digits + 1)))
+ pm_error("out of memory");
+
+@@ -314,6 +315,7 @@ genCmap(colorhist_vector const chv,
+ unsigned int charsPerPixel;
+ unsigned int xpmMaxval;
+
++ if (includeTransparent) overflow_add(ncolors, 1);
+ MALLOCARRAY(cmap, cmapSize);
+ if (cmapP == NULL)
+ pm_error("Out of memory allocating %u bytes for a color map.",
+diff -up netpbm-10.47.04/converter/ppm/qrttoppm.c.security netpbm-10.47.04/converter/ppm/qrttoppm.c
+--- netpbm-10.47.04/converter/ppm/qrttoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/qrttoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -46,7 +46,7 @@ main( argc, argv )
+
+ ppm_writeppminit( stdout, cols, rows, maxval, 0 );
+ pixelrow = ppm_allocrow( cols );
+- buf = (unsigned char *) malloc( 3 * cols );
++ buf = (unsigned char *) malloc2( 3 , cols );
+ if ( buf == (unsigned char *) 0 )
+ pm_error( "out of memory" );
+
+diff -up netpbm-10.47.04/converter/ppm/sldtoppm.c.security netpbm-10.47.04/converter/ppm/sldtoppm.c
+--- netpbm-10.47.04/converter/ppm/sldtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/sldtoppm.c 2009-10-21 15:44:11.000000000 +0200
+@@ -455,6 +455,8 @@ slider(slvecfn slvec,
+
+ /* Allocate image buffer and clear it to black. */
+
++ overflow_add(ixdots,1);
++ overflow_add(iydots,1);
+ pixels = ppm_allocarray(pixcols = ixdots + 1, pixrows = iydots + 1);
+ PPM_ASSIGN(rgbcolor, 0, 0, 0);
+ ppmd_filledrectangle(pixels, pixcols, pixrows, pixmaxval, 0, 0,
+diff -up netpbm-10.47.04/converter/ppm/ximtoppm.c.security netpbm-10.47.04/converter/ppm/ximtoppm.c
+--- netpbm-10.47.04/converter/ppm/ximtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/ximtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -117,6 +117,7 @@ ReadXimHeader(FILE * const in_fp,
+ header->bits_channel = atoi(a_head.bits_per_channel);
+ header->alpha_flag = atoi(a_head.alpha_channel);
+ if (strlen(a_head.author)) {
++ overflow_add(strlen(a_head.author),1);
+ if (!(header->author = calloc((unsigned int)strlen(a_head.author)+1,
+ 1))) {
+ pm_message("ReadXimHeader: can't calloc author string" );
+@@ -126,6 +127,7 @@ ReadXimHeader(FILE * const in_fp,
+ strncpy(header->author, a_head.author, strlen(a_head.author));
+ }
+ if (strlen(a_head.date)) {
++ overflow_add(strlen(a_head.date),1);
+ if (!(header->date =calloc((unsigned int)strlen(a_head.date)+1,1))){
+ pm_message("ReadXimHeader: can't calloc date string" );
+ return(0);
+@@ -134,6 +136,7 @@ ReadXimHeader(FILE * const in_fp,
+ strncpy(header->date, a_head.date, strlen(a_head.date));
+ }
+ if (strlen(a_head.program)) {
++ overflow_add(strlen(a_head.program),1);
+ if (!(header->program = calloc(
+ (unsigned int)strlen(a_head.program) + 1, 1))) {
+ pm_message("ReadXimHeader: can't calloc program string" );
+@@ -160,6 +163,7 @@ ReadXimHeader(FILE * const in_fp,
+ if (header->nchannels == 3 && header->bits_channel == 8)
+ header->ncolors = 0;
+ else if (header->nchannels == 1 && header->bits_channel == 8) {
++ overflow2(header->ncolors, sizeof(Color));
+ header->colors = (Color *)calloc((unsigned int)header->ncolors,
+ sizeof(Color));
+ if (header->colors == NULL) {
+diff -up netpbm-10.47.04/converter/ppm/xpmtoppm.c.security netpbm-10.47.04/converter/ppm/xpmtoppm.c
+--- netpbm-10.47.04/converter/ppm/xpmtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/xpmtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -701,6 +701,7 @@ ReadXPMFile(FILE * const stream, int * c
+ &ncolors, colorsP, &ptab);
+ *transparentP = -1; /* No transparency in version 1 */
+ }
++ overflow2(*widthP, *heightP);
+ totalpixels = *widthP * *heightP;
+ MALLOCARRAY(*dataP, totalpixels);
+ if (*dataP == NULL)
+diff -up netpbm-10.47.04/converter/ppm/yuvtoppm.c.security netpbm-10.47.04/converter/ppm/yuvtoppm.c
+--- netpbm-10.47.04/converter/ppm/yuvtoppm.c.security 2009-10-21 13:39:10.000000000 +0200
++++ netpbm-10.47.04/converter/ppm/yuvtoppm.c 2009-10-21 15:09:33.000000000 +0200
+@@ -72,6 +72,7 @@ main(argc, argv)
+
+ ppm_writeppminit(stdout, cols, rows, (pixval) 255, 0);
+ pixrow = ppm_allocrow(cols);
++ overflow_add(cols, 1);
+ MALLOCARRAY(yuvbuf, (cols+1)/2);
+ if (yuvbuf == NULL)
+ pm_error("Unable to allocate YUV buffer for %d columns.", cols);
+diff -up netpbm-10.47.04/editor/pamcut.c.security netpbm-10.47.04/editor/pamcut.c
+--- netpbm-10.47.04/editor/pamcut.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pamcut.c 2009-10-21 15:29:36.000000000 +0200
+@@ -655,6 +655,8 @@ cutOneImage(FILE * const ifP
+
+ outpam = inpam; /* Initial value -- most fields should be same */
+ outpam.file = ofP;
++ overflow_add(rightcol, 1);
++ overflow_add(bottomrow, 1);
+ outpam.width = rightcol - leftcol + 1;
+ outpam.height = bottomrow - toprow + 1;
+
+diff -up netpbm-10.47.04/editor/pbmreduce.c.security netpbm-10.47.04/editor/pbmreduce.c
+--- netpbm-10.47.04/editor/pbmreduce.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pbmreduce.c 2009-10-21 15:26:13.000000000 +0200
+@@ -94,6 +94,7 @@ main( argc, argv )
+ if (halftone == QT_FS) {
+ unsigned int col;
+ /* Initialize Floyd-Steinberg. */
++ overflow_add(newcols, 2);
+ MALLOCARRAY(thiserr, newcols + 2);
+ MALLOCARRAY(nexterr, newcols + 2);
+ if (thiserr == NULL || nexterr == NULL)
+diff -up netpbm-10.47.04/editor/pnmgamma.c.security netpbm-10.47.04/editor/pnmgamma.c
+--- netpbm-10.47.04/editor/pnmgamma.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmgamma.c 2009-10-21 15:09:34.000000000 +0200
+@@ -586,6 +586,7 @@ createGammaTables(enum transferFunction
+ xelval ** const btableP) {
+
+ /* Allocate space for the tables. */
++ overflow_add(maxval, 1);
+ MALLOCARRAY(*rtableP, maxval+1);
+ MALLOCARRAY(*gtableP, maxval+1);
+ MALLOCARRAY(*btableP, maxval+1);
+diff -up netpbm-10.47.04/editor/pnmhisteq.c.security netpbm-10.47.04/editor/pnmhisteq.c
+--- netpbm-10.47.04/editor/pnmhisteq.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmhisteq.c 2009-10-21 15:09:34.000000000 +0200
+@@ -103,6 +103,7 @@ computeLuminosityHistogram(xel * const *
+ unsigned int pixelCount;
+ unsigned int * lumahist;
+
++ overflow_add(maxval, 1);
+ MALLOCARRAY(lumahist, maxval + 1);
+ if (lumahist == NULL)
+ pm_error("Out of storage allocating array for %u histogram elements",
+diff -up netpbm-10.47.04/editor/pnmindex.csh.security netpbm-10.47.04/editor/pnmindex.csh
+--- netpbm-10.47.04/editor/pnmindex.csh.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmindex.csh 2009-10-21 15:09:34.000000000 +0200
+@@ -1,5 +1,8 @@
+ #!/bin/csh -f
+ #
++echo "Unsafe code, needs debugging, do not ship"
++exit 1
++#
+ # pnmindex - build a visual index of a bunch of anymaps
+ #
+ # Copyright (C) 1991 by Jef Poskanzer.
+diff -up netpbm-10.47.04/editor/pnmpad.c.security netpbm-10.47.04/editor/pnmpad.c
+--- netpbm-10.47.04/editor/pnmpad.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmpad.c 2009-10-21 15:33:51.000000000 +0200
+@@ -527,6 +527,8 @@ main(int argc, const char ** argv) {
+
+ computePadSizes(cmdline, cols, rows, &lpad, &rpad, &tpad, &bpad);
+
++ overflow_add(cols, lpad);
++ overflow_add(cols + lpad, rpad);
+ newcols = cols + lpad + rpad;
+
+ if (PNM_FORMAT_TYPE(format) == PBM_TYPE)
+diff -up netpbm-10.47.04/editor/pnmpaste.c.security netpbm-10.47.04/editor/pnmpaste.c
+diff -up netpbm-10.47.04/editor/pnmremap.c.security netpbm-10.47.04/editor/pnmremap.c
+--- netpbm-10.47.04/editor/pnmremap.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmremap.c 2009-10-21 15:28:20.000000000 +0200
+@@ -408,7 +408,7 @@ initFserr(struct pam * const pamP,
+ unsigned int plane;
+
+ unsigned int const fserrSize = pamP->width + 2;
+-
++ overflow_add(pamP->width, 2);
+ fserrP->width = pamP->width;
+
+ MALLOCARRAY(fserrP->thiserr, pamP->depth);
+@@ -444,6 +444,7 @@ floydInitRow(struct pam * const pamP, st
+
+ int col;
+
++ overflow_add(pamP->width, 2);
+ for (col = 0; col < pamP->width + 2; ++col) {
+ unsigned int plane;
+ for (plane = 0; plane < pamP->depth; ++plane)
+diff -up netpbm-10.47.04/editor/pnmscalefixed.c.security netpbm-10.47.04/editor/pnmscalefixed.c
+--- netpbm-10.47.04/editor/pnmscalefixed.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmscalefixed.c 2009-10-21 15:09:34.000000000 +0200
+@@ -211,6 +211,8 @@ compute_output_dimensions(const struct c
+ const int rows, const int cols,
+ int * newrowsP, int * newcolsP) {
+
++ overflow2(rows, cols);
++
+ if (cmdline.pixels) {
+ if (rows * cols <= cmdline.pixels) {
+ *newrowsP = rows;
+@@ -262,6 +264,8 @@ compute_output_dimensions(const struct c
+
+ if (*newcolsP < 1) *newcolsP = 1;
+ if (*newrowsP < 1) *newrowsP = 1;
++
++ overflow2(*newcolsP, *newrowsP);
+ }
+
+
+@@ -443,6 +447,9 @@ main(int argc, char **argv ) {
+ unfilled. We can address that by stretching, whereas the other
+ case would require throwing away some of the input.
+ */
++
++ overflow2(newcols, SCALE);
++ overflow2(newrows, SCALE);
+ sxscale = SCALE * newcols / cols;
+ syscale = SCALE * newrows / rows;
+
+diff -up netpbm-10.47.04/editor/pnmshear.c.security netpbm-10.47.04/editor/pnmshear.c
+--- netpbm-10.47.04/editor/pnmshear.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/editor/pnmshear.c 2009-10-21 15:31:26.000000000 +0200
+@@ -15,6 +15,7 @@
+ #include <assert.h>
+ #include <math.h>
+ #include <string.h>
++#include <limits.h>
+
+ #include "pm_c_util.h"
+ #include "ppm.h"
+@@ -236,6 +237,11 @@ main(int argc, char * argv[]) {
+
+ shearfac = fabs(tan(cmdline.angle));
+
++ if(rows * shearfac >= INT_MAX-1)
++ pm_error("image too large");
++
++ overflow_add(rows * shearfac, cols+1);
++
+ newcols = rows * shearfac + cols + 0.999999;
+
+ pnm_writepnminit(stdout, newcols, rows, newmaxval, newformat, 0);
+diff -up netpbm-10.47.04/editor/specialty/pamoil.c.security netpbm-10.47.04/editor/specialty/pamoil.c
+--- netpbm-10.47.04/editor/specialty/pamoil.c.security 2009-10-21 13:38:56.000000000 +0200
++++ netpbm-10.47.04/editor/specialty/pamoil.c 2009-10-21 15:09:33.000000000 +0200
+@@ -112,6 +112,7 @@ main(int argc, char *argv[] ) {
+ tuples = pnm_readpam(ifp, &inpam, PAM_STRUCT_SIZE(tuple_type));
+ pm_close(ifp);
+
++ overflow_add(inpam.maxval, 1);
+ MALLOCARRAY(hist, inpam.maxval + 1);
+ if (hist == NULL)
+ pm_error("Unable to allocate memory for histogram.");
+diff -up netpbm-10.47.04/generator/pbmtext.c.security netpbm-10.47.04/generator/pbmtext.c
+--- netpbm-10.47.04/generator/pbmtext.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/generator/pbmtext.c 2009-10-21 15:23:15.000000000 +0200
+@@ -96,12 +96,14 @@ parseCommandLine(int argc, const char **
+
+ for (i = 1; i < argc; ++i) {
+ if (i > 1) {
++ overflow_add(totaltextsize, 1);
+ totaltextsize += 1;
+ text = realloc(text, totaltextsize);
+ if (text == NULL)
+ pm_error("out of memory allocating space for input text");
+ strcat(text, " ");
+ }
++ overflow_add(totaltextsize, strlen(argv[i]));
+ totaltextsize += strlen(argv[i]);
+ text = realloc(text, totaltextsize);
+ if (text == NULL)
+@@ -711,6 +713,7 @@ getText(const char cmdline_text
+ pm_error("A line of input text is longer than %u characters."
+ "Cannot process.", sizeof(buf)-1);
+ if (lineCount >= maxlines) {
++ overflow2(maxlines, 2);
+ maxlines *= 2;
+ REALLOCARRAY(text_array, maxlines);
+ if (text_array == NULL)
+@@ -831,6 +834,7 @@ main(int argc, const char *argv[]) {
+ hmargin = fontP->maxwidth;
+ } else {
+ vmargin = fontP->maxheight;
++ overflow2(2, fontP->maxwidth);
+ hmargin = 2 * fontP->maxwidth;
+ }
+ }
+diff -up netpbm-10.47.04/generator/pgmcrater.c.security netpbm-10.47.04/generator/pgmcrater.c
+--- netpbm-10.47.04/generator/pgmcrater.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/generator/pgmcrater.c 2009-10-21 15:09:34.000000000 +0200
+@@ -130,7 +130,7 @@ static void gencraters()
+ /* Acquire the elevation array and initialize it to mean
+ surface elevation. */
+
+- MALLOCARRAY(aux, SCRX * SCRY);
++ aux = (unsigned short *) malloc3(SCRX, SCRY, sizeof(short));
+ if (aux == NULL)
+ pm_error("out of memory allocating elevation array");
+
+diff -up netpbm-10.47.04/generator/pgmkernel.c.security netpbm-10.47.04/generator/pgmkernel.c
+--- netpbm-10.47.04/generator/pgmkernel.c.security 2009-10-21 13:38:57.000000000 +0200
++++ netpbm-10.47.04/generator/pgmkernel.c 2009-10-21 15:09:34.000000000 +0200
+@@ -68,7 +68,7 @@ main ( argc, argv )
+ kycenter = (fysize - 1) / 2.0;
+ ixsize = fxsize + 0.999;
+ iysize = fysize + 0.999;
+- MALLOCARRAY(fkernel, ixsize * iysize);
++ fkernel = (double *) malloc3 (ixsize, iysize, sizeof(double));
+ for (i = 0; i < iysize; i++)
+ for (j = 0; j < ixsize; j++) {
+ fkernel[i*ixsize+j] = 1.0 / (1.0 + w * sqrt((double)
+diff -up netpbm-10.47.04/lib/libpam.c.security netpbm-10.47.04/lib/libpam.c
+--- netpbm-10.47.04/lib/libpam.c.security 2009-10-21 13:39:00.000000000 +0200
++++ netpbm-10.47.04/lib/libpam.c 2009-10-21 15:09:34.000000000 +0200
+@@ -235,7 +235,8 @@ allocPamRow(const struct pam * const pam
+ int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample);
+ tuple * tuplerow;
+
+- tuplerow = malloc(pamP->width * (sizeof(tuple *) + bytesPerTuple));
++ overflow_add(sizeof(tuple *), bytesPerTuple);
++ tuplerow = malloc2(pamP->width, sizeof(tuple *) + bytesPerTuple);
+
+ if (tuplerow != NULL) {
+ /* Now we initialize the pointers to the individual tuples
+diff -up netpbm-10.47.04/lib/libpammap.c.security netpbm-10.47.04/lib/libpammap.c
+--- netpbm-10.47.04/lib/libpammap.c.security 2009-10-21 13:39:00.000000000 +0200
++++ netpbm-10.47.04/lib/libpammap.c 2009-10-21 15:09:34.000000000 +0200
+@@ -104,6 +104,8 @@ allocTupleIntListItem(struct pam * const
+ */
+ struct tupleint_list_item * retval;
+
++ overflow2(pamP->depth, sizeof(sample));
++ overflow_add(sizeof(*retval)-sizeof(retval->tupleint.tuple), pamP->depth*sizeof(sample));
+ unsigned int const size =
+ sizeof(*retval) - sizeof(retval->tupleint.tuple)
+ + pamP->depth * sizeof(sample);
+diff -up netpbm-10.47.04/lib/libpbm1.c.security netpbm-10.47.04/lib/libpbm1.c
+--- netpbm-10.47.04/lib/libpbm1.c.security 2009-10-21 13:39:00.000000000 +0200
++++ netpbm-10.47.04/lib/libpbm1.c 2009-10-21 15:09:34.000000000 +0200
+@@ -77,6 +77,7 @@ pbm_check(FILE * file, const enum pm_che
+ pm_message("pm_filepos passed to pm_check() is %u bytes",
+ sizeof(pm_filepos));
+ #endif
++ overflow2(bytes_per_row, rows);
+ pm_check(file, check_type, need_raster_size, retval_p);
+ }
+ }
+--- netpbm-10.47.04/lib/libpm.c.security 2009-10-21 13:39:00.000000000 +0200
++++ netpbm-10.47.04/lib/libpm.c 2009-10-21 15:09:34.000000000 +0200
+@@ -827,4 +827,53 @@ pm_parse_height(const char * const arg)
+ }
+
+
++/*
++ * Maths wrapping
++ */
++
++void __overflow2(int a, int b)
++{
++ if(a < 0 || b < 0)
++ pm_error("object too large");
++ if(b == 0)
++ return;
++ if(a > INT_MAX / b)
++ pm_error("object too large");
++}
++
++void overflow3(int a, int b, int c)
++{
++ overflow2(a,b);
++ overflow2(a*b, c);
++}
++
++void overflow_add(int a, int b)
++{
++ if( a > INT_MAX - b)
++ pm_error("object too large");
++}
++
++void *malloc2(int a, int b)
++{
++ overflow2(a, b);
++ if(a*b == 0)
++ pm_error("Zero byte allocation");
++ return malloc(a*b);
++}
++
++void *malloc3(int a, int b, int c)
++{
++ overflow3(a, b, c);
++ if(a*b*c == 0)
++ pm_error("Zero byte allocation");
++ return malloc(a*b*c);
++}
++
++void *realloc2(void * a, int b, int c)
++{
++ overflow2(b, c);
++ if(b*c == 0)
++ pm_error("Zero byte allocation");
++ return realloc(a, b*c);
++}
+
+diff -up netpbm-10.47.04/lib/pm.h.security netpbm-10.47.04/lib/pm.h
+--- netpbm-10.47.04/lib/pm.h.security 2009-10-21 13:39:00.000000000 +0200
++++ netpbm-10.47.04/lib/pm.h 2009-10-21 15:09:34.000000000 +0200
+@@ -377,4 +377,11 @@ pm_parse_height(const char * const arg);
+ #endif
+
+
++void *malloc2(int, int);
++void *malloc3(int, int, int);
++#define overflow2(a,b) __overflow2(a,b)
++void __overflow2(int, int);
++void overflow3(int, int, int);
++void overflow_add(int, int);
++
+ #endif
+diff -up netpbm-10.47.04/other/pnmcolormap.c.security netpbm-10.47.04/other/pnmcolormap.c
+--- netpbm-10.47.04/other/pnmcolormap.c.security 2009-10-21 13:38:54.000000000 +0200
++++ netpbm-10.47.04/other/pnmcolormap.c 2009-10-21 15:09:34.000000000 +0200
+@@ -840,6 +840,7 @@ colormapToSquare(struct pam * const pamP
+ pamP->width = intsqrt;
+ else
+ pamP->width = intsqrt + 1;
++ overflow_add(intsqrt, 1);
+ }
+ {
+ unsigned int const intQuotient = colormap.size / pamP->width;
+diff -up netpbm-10.47.04/urt/rle_addhist.c.security netpbm-10.47.04/urt/rle_addhist.c
+--- netpbm-10.47.04/urt/rle_addhist.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/rle_addhist.c 2009-10-21 15:09:34.000000000 +0200
+@@ -14,6 +14,8 @@
+ * If you modify this software, you should include a notice giving the
+ * name of the person performing the modification, the date of modification,
+ * and the reason for such modification.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+ /*
+ * rle_addhist.c - Add to the HISTORY comment in header
+@@ -76,13 +78,19 @@ rle_addhist(char * argv[],
+ return;
+
+ length = 0;
+- for (i = 0; argv[i]; ++i)
++ for (i = 0; argv[i]; ++i) {
++ overflow_add(length, strlen(argv[i]));
++ overflow_add(length+1, strlen(argv[i]));
+ length += strlen(argv[i]) +1; /* length of each arg plus space. */
++ }
+
+ time(&temp);
+ timedate = ctime(&temp);
+ length += strlen(timedate); /* length of date and time in ASCII. */
+
++ overflow_add(strlen(padding), 4);
++ overflow_add(strlen(histoire), strlen(padding) + 4);
++ overflow_add(length, strlen(histoire) + strlen(padding) + 4);
+ length += strlen(padding) + 3 + strlen(histoire) + 1;
+ /* length of padding, "on " and length of history name plus "="*/
+ if (in_hdr) /* if we are interested in the old comments... */
+@@ -90,9 +98,12 @@ rle_addhist(char * argv[],
+ else
+ old = NULL;
+
+- if (old && *old)
++ if (old && *old) {
++ overflow_add(length, strlen(old));
+ length += strlen(old); /* add length if there. */
++ }
+
++ overflow_add(length, 1);
+ ++length; /*Cater for the null. */
+
+ MALLOCARRAY(newc, length);
+diff -up netpbm-10.47.04/urt/rle_getrow.c.security netpbm-10.47.04/urt/rle_getrow.c
+--- netpbm-10.47.04/urt/rle_getrow.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/rle_getrow.c 2009-10-21 15:09:34.000000000 +0200
+@@ -17,6 +17,8 @@
+ *
+ * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
+ * to have all "void" functions so declared.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+ /*
+ * rle_getrow.c - Read an RLE file in.
+@@ -168,6 +170,7 @@ rle_get_setup(rle_hdr * const the_hdr) {
+ register char * cp;
+
+ VAXSHORT( comlen, infile ); /* get comment length */
++ overflow_add(comlen, 1);
+ evenlen = (comlen + 1) & ~1; /* make it even */
+ if ( evenlen )
+ {
+diff -up netpbm-10.47.04/urt/rle_hdr.c.security netpbm-10.47.04/urt/rle_hdr.c
+--- netpbm-10.47.04/urt/rle_hdr.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/rle_hdr.c 2009-10-21 15:09:34.000000000 +0200
+@@ -14,6 +14,8 @@
+ * If you modify this software, you should include a notice giving the
+ * name of the person performing the modification, the date of modification,
+ * and the reason for such modification.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+ /*
+ * rle_hdr.c - Functions to manipulate rle_hdr structures.
+@@ -79,7 +81,10 @@ int img_num;
+ /* Fill in with copies of the strings. */
+ if ( the_hdr->cmd != pgmname )
+ {
+- char *tmp = (char *)malloc( strlen( pgmname ) + 1 );
++ char *tmp ;
++
++ overflow_add(strlen(pgmname), 1);
++ tmp = malloc( strlen( pgmname ) + 1 );
+ RLE_CHECK_ALLOC( pgmname, tmp, 0 );
+ strcpy( tmp, pgmname );
+ the_hdr->cmd = tmp;
+@@ -87,7 +92,9 @@ int img_num;
+
+ if ( the_hdr->file_name != fname )
+ {
+- char *tmp = (char *)malloc( strlen( fname ) + 1 );
++ char *tmp;
++ overflow_add(strlen(fname), 1);
++ tmp = malloc( strlen( fname ) + 1 );
+ RLE_CHECK_ALLOC( pgmname, tmp, 0 );
+ strcpy( tmp, fname );
+ the_hdr->file_name = tmp;
+@@ -152,6 +159,7 @@ rle_hdr *from_hdr, *to_hdr;
+ if ( to_hdr->bg_color )
+ {
+ int size = to_hdr->ncolors * sizeof(int);
++ overflow2(to_hdr->ncolors, sizeof(int));
+ to_hdr->bg_color = (int *)malloc( size );
+ RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->bg_color, "background color" );
+ memcpy( to_hdr->bg_color, from_hdr->bg_color, size );
+@@ -160,7 +168,7 @@ rle_hdr *from_hdr, *to_hdr;
+ if ( to_hdr->cmap )
+ {
+ int size = to_hdr->ncmap * (1 << to_hdr->cmaplen) * sizeof(rle_map);
+- to_hdr->cmap = (rle_map *)malloc( size );
++ to_hdr->cmap = (rle_map *)malloc3( to_hdr->ncmap, 1<<to_hdr->cmaplen, sizeof(rle_map));
+ RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->cmap, "color map" );
+ memcpy( to_hdr->cmap, from_hdr->cmap, size );
+ }
+@@ -173,11 +181,16 @@ rle_hdr *from_hdr, *to_hdr;
+ int size = 0;
+ CONST_DECL char **cp;
+ for ( cp=to_hdr->comments; *cp; cp++ )
++ {
++ overflow_add(size, 1);
+ size++; /* Count the comments. */
++ }
+ /* Check if there are really any comments. */
+ if ( size )
+ {
++ overflow_add(size, 1);
+ size++; /* Copy the NULL pointer, too. */
++ overflow2(size, sizeof(char *));
+ size *= sizeof(char *);
+ to_hdr->comments = (CONST_DECL char **)malloc( size );
+ RLE_CHECK_ALLOC( to_hdr->cmd, to_hdr->comments, "comments" );
+diff -up netpbm-10.47.04/urt/rle_open_f.c.security netpbm-10.47.04/urt/rle_open_f.c
+--- netpbm-10.47.04/urt/rle_open_f.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/rle_open_f.c 2009-10-21 15:15:38.000000000 +0200
+@@ -163,64 +163,7 @@ dealWithSubprocess(const char * const f
+ bool * const noSubprocessP,
+ const char ** const errorP) {
+
+-#ifdef NO_OPEN_PIPES
+ *noSubprocessP = TRUE;
+-#else
+- const char *cp;
+-
+- reapChildren(catchingChildrenP, pids);
+-
+- /* Real file, not stdin or stdout. If name ends in ".Z",
+- * pipe from/to un/compress (depending on r/w mode).
+- *
+- * If it starts with "|", popen that command.
+- */
+-
+- cp = file_name + strlen(file_name) - 2;
+- /* Pipe case. */
+- if (file_name[0] == '|') {
+- pid_t thepid; /* PID from my_popen */
+-
+- *noSubprocessP = FALSE;
+-
+- *fpP = my_popen(file_name + 1, mode, &thepid);
+- if (*fpP == NULL)
+- *errorP = "%s: can't invoke <<%s>> for %s: ";
+- else {
+- /* One more child to catch, eventually. */
+- if (*catchingChildrenP < MAX_CHILDREN)
+- pids[(*catchingChildrenP)++] = thepid;
+- }
+- } else if (cp > file_name && *cp == '.' && *(cp + 1) == 'Z' ) {
+- /* Compress case. */
+- pid_t thepid; /* PID from my_popen. */
+- const char * command;
+-
+- *noSubprocessP = FALSE;
+-
+- if (*mode == 'w')
+- pm_asprintf(&command, "compress > %s", file_name);
+- else if (*mode == 'a')
+- pm_asprintf(&command, "compress >> %s", file_name);
+- else
+- pm_asprintf(&command, "compress -d < %s", file_name);
+-
+- *fpP = my_popen(command, mode, &thepid);
+-
+- if (*fpP == NULL)
+- *errorP = "%s: can't invoke 'compress' program, "
+- "trying to open %s for %s";
+- else {
+- /* One more child to catch, eventually. */
+- if (*catchingChildrenP < MAX_CHILDREN)
+- pids[(*catchingChildrenP)++] = thepid;
+- }
+- pm_strfree(command);
+- } else {
+- *noSubprocessP = TRUE;
+- *errorP = NULL;
+- }
+-#endif
+ }
+
+
+diff -up netpbm-10.47.04/urt/rle_putcom.c.security netpbm-10.47.04/urt/rle_putcom.c
+--- netpbm-10.47.04/urt/rle_putcom.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/rle_putcom.c 2009-10-21 15:09:34.000000000 +0200
+@@ -14,6 +14,8 @@
+ * If you modify this software, you should include a notice giving the
+ * name of the person performing the modification, the date of modification,
+ * and the reason for such modification.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+ /*
+ * rle_putcom.c - Add a picture comment to the header struct.
+@@ -98,12 +100,14 @@ rle_putcom(const char * const value,
+ const char * v;
+ const char ** old_comments;
+ int i;
+- for (i = 2, cp = the_hdr->comments; *cp != NULL; ++i, ++cp)
++ for (i = 2, cp = the_hdr->comments; *cp != NULL; ++i, ++cp) {
++ overflow_add(i, 1);
+ if (match(value, *cp) != NULL) {
+ v = *cp;
+ *cp = value;
+ return v;
+ }
++ }
+ /* Not found */
+ /* Can't realloc because somebody else might be pointing to this
+ * comments block. Of course, if this were true, then the
+diff -up netpbm-10.47.04/urt/Runput.c.security netpbm-10.47.04/urt/Runput.c
+--- netpbm-10.47.04/urt/Runput.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/Runput.c 2009-10-21 15:09:34.000000000 +0200
+@@ -17,6 +17,8 @@
+ *
+ * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
+ * to have all "void" functions so declared.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+ /*
+ * Runput.c - General purpose Run Length Encoding.
+@@ -202,9 +204,11 @@ RunSetup(rle_hdr * the_hdr)
+ if ( the_hdr->background != 0 )
+ {
+ register int i;
+- register rle_pixel *background =
+- (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) );
++ register rle_pixel *background;
+ register int *bg_color;
++
++ overflow_add(the_hdr->ncolors,1);
++ background = (rle_pixel *)malloc( (unsigned)(the_hdr->ncolors + 1) );
+ /*
+ * If even number of bg color bytes, put out one more to get to
+ * 16 bit boundary.
+@@ -224,7 +228,7 @@ RunSetup(rle_hdr * the_hdr)
+ /* Big-endian machines are harder */
+ register int i, nmap = (1 << the_hdr->cmaplen) *
+ the_hdr->ncmap;
+- register char *h_cmap = (char *)malloc( nmap * 2 );
++ register char *h_cmap = (char *)malloc2( nmap, 2 );
+ if ( h_cmap == NULL )
+ {
+ fprintf( stderr,
+diff -up netpbm-10.47.04/urt/scanargs.c.security netpbm-10.47.04/urt/scanargs.c
+--- netpbm-10.47.04/urt/scanargs.c.security 2009-10-21 13:39:11.000000000 +0200
++++ netpbm-10.47.04/urt/scanargs.c 2009-10-21 15:09:34.000000000 +0200
+@@ -38,6 +38,8 @@
+ *
+ * Modified at BRL 16-May-88 by Mike Muuss to avoid Alliant STDC desire
+ * to have all "void" functions so declared.
++ *
++ * 2002-12-19: Fix maths wrapping bugs. Alan Cox <alan@redhat.com>
+ */
+
+ #include "rle.h"
+@@ -65,8 +67,8 @@ typedef int *ptr;
+ /*
+ * Storage allocation macros
+ */
+-#define NEW( type, cnt ) (type *) malloc( (cnt) * sizeof( type ) )
+-#define RENEW( type, ptr, cnt ) (type *) realloc( ptr, (cnt) * sizeof( type ) )
++#define NEW( type, cnt ) (type *) malloc2( (cnt) , sizeof( type ) )
++#define RENEW( type, ptr, cnt ) (type *) realloc2( ptr, (cnt), sizeof( type ) )
+
+ #if defined(c_plusplus) && !defined(USE_PROTOTYPES)
+ #define USE_PROTOTYPES
+--- advanced/urt/rle_hdr.c.old 2012-01-21 05:57:25.000000000 -0500
++++ advanced/urt/rle_hdr.c 2012-01-21 05:57:50.000000000 -0500
+@@ -29,6 +29,18 @@
+
+ #include <string.h>
+
++/*
++ * Provided by pm library
++ */
++
++extern void overflow_add(int, int);
++#define overflow2(a,b) __overflow2(a,b)
++extern void __overflow2(int, int);
++extern void overflow3(int, int, int);
++extern void *malloc2(int, int);
++/*extern void *malloc3(int, int, int);*/
++extern void *realloc2(void *, int, int);
++
+ /*****************************************************************
+ * TAG( rle_names )
+ *
diff --git a/staging/netpbm/netpbm-security-scripts.patch b/staging/netpbm/netpbm-security-scripts.patch
new file mode 100644
index 000000000..557914b66
--- /dev/null
+++ b/staging/netpbm/netpbm-security-scripts.patch
@@ -0,0 +1,393 @@
+diff -up netpbm-10.47.05/converter/other/anytopnm.security-scripts netpbm-10.47.05/converter/other/anytopnm
+--- netpbm-10.47.05/converter/other/anytopnm.security-scripts 2009-12-10 08:34:36.000000000 +0100
++++ netpbm-10.47.05/converter/other/anytopnm 2010-03-16 21:28:09.000000000 +0100
+@@ -510,10 +510,7 @@ else
+ inputFile="-"
+ fi
+
+-tempdir="${TMPDIR-/tmp}/anytopnm.$$"
+-mkdir -m 0700 $tempdir || \
+- { echo "Could not create temporary file. Exiting."; exit 1;}
+-trap 'rm -rf $tempdir' 0
++tempdir=$(mktemp -d -t anytopnm.XXXXXXXXXX) || exit 1
+
+ # Take out all spaces
+ # Find the filename extension for last-ditch efforts later
+@@ -539,9 +536,17 @@ if [ "$filetype" = "unknown" ]; then
+ echo "$progname: unknown file type. " \
+ "'file' says mime type is '$mimeType', " 1>&2
+ echo "type description is '$typeDescription'" 1>&2
++ if [ -d "$tempdir" ] ; then
++ rm -rf "$tempdir"
++ fi
++
+ exit 1
+ fi
+
+ convertIt $file $filetype
+
++if [ -d "$tempdir" ] ; then
++ rm -rf "$tempdir"
++fi
++
+ exit 0
+diff -up netpbm-10.47.05/editor/pamstretch-gen.security-scripts netpbm-10.47.05/editor/pamstretch-gen
+--- netpbm-10.47.05/editor/pamstretch-gen.security-scripts 2009-12-10 08:34:32.000000000 +0100
++++ netpbm-10.47.05/editor/pamstretch-gen 2010-03-16 21:28:47.000000000 +0100
+@@ -31,13 +31,9 @@ if [ "$1" = "" ]; then
+ exit 1
+ fi
+
+-tempdir="${TMPDIR-/tmp}/pamstretch-gen.$$"
+-mkdir -m 0700 $tempdir || \
+- { echo "Could not create temporary file. Exiting."; exit 1;}
++tempfile=$(mktemp /tmp/pnmig.XXXXXXXXXX) || exit 1
+ trap 'rm -rf $tempdir' 0 1 3 15
+
+-tempfile=$tempdir/pnmig
+-
+ if ! cat $2 >$tempfile 2>/dev/null; then
+ echo 'pamstretch-gen: error reading file' 1>&2
+ exit 1
+diff -up netpbm-10.47.05/editor/pnmmargin.security-scripts netpbm-10.47.05/editor/pnmmargin
+--- netpbm-10.47.05/editor/pnmmargin.security-scripts 2009-12-10 08:34:32.000000000 +0100
++++ netpbm-10.47.05/editor/pnmmargin 2010-03-16 21:28:09.000000000 +0100
+@@ -11,15 +11,11 @@
+ # documentation. This software is provided "as is" without express or
+ # implied warranty.
+
+-tempdir="${TMPDIR-/tmp}/pnmmargin.$$"
+-mkdir -m 0700 $tempdir || \
+- { echo "Could not create temporary file. Exiting." 1>&2; exit 1;}
+-trap 'rm -rf $tempdir' 0 1 3 15
+-
+-tmp1=$tempdir/pnmm1
+-tmp2=$tempdir/pnmm2
+-tmp3=$tempdir/pnmm3
+-tmp4=$tempdir/pnmm4
++tmpdir=$(mktemp -d -t ppmmargin.XXXXXXX) || exit 1
++tmp1="$tmpdir/tmp1"
++tmp2="$tmpdir/tmp2"
++tmp3="$tmpdir/tmp3"
++tmp4="$tmpdir/tmp4"
+
+ color="-gofigure"
+ plainopt=""
+@@ -90,6 +86,7 @@ else
+ -white | -black )
+ pnmpad $plainopt $color \
+ -left=$size -right=$size -top=$size -bottom=$size $tmp1
++ rm -rf "$tmpdir"
+ exit
+ ;;
+ * )
+@@ -102,7 +99,4 @@ else
+ pnmcat -lr $tmp2 $tmp1 $tmp2 > $tmp4
+ pnmcat -tb $plainopt $tmp3 $tmp4 $tmp3
+ fi
+-
+-
+-
+-
++rm -rf "$tmpdir"
+diff -up netpbm-10.47.05/editor/ppmfade.security-scripts netpbm-10.47.05/editor/ppmfade
+--- netpbm-10.47.05/editor/ppmfade.security-scripts 2009-12-10 08:34:32.000000000 +0100
++++ netpbm-10.47.05/editor/ppmfade 2010-03-16 21:28:09.000000000 +0100
+@@ -14,6 +14,7 @@
+ #
+ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ use strict;
++use File::Temp "tempdir";
+
+ my $SPREAD = 1;
+ my $SHIFT = 2;
+@@ -111,20 +112,26 @@ if ($first_file ne "undefined") {
+
+ print("Frames are " . $width . "W x " . $height . "H\n");
+
++#
++# We create a tmp-directory right here
++#
++my $tmpdir = tempdir("ppmfade.XXXXXX", CLEANUP => 1);
++
++
+ if ($first_file eq "undefined") {
+ print "Fading from black to ";
+- system("ppmmake \\#000 $width $height >junk1$$.ppm");
++ system("ppmmake \\#000 $width $height >$tmpdir/junk1$$.ppm");
+ } else {
+ print "Fading from $first_file to ";
+- system("cp", $first_file, "junk1$$.ppm");
++ system("cp", $first_file, "$tmpdir/junk1$$.ppm");
+ }
+
+ if ($last_file eq "undefined") {
+ print "black.\n";
+- system("ppmmake \\#000 $width $height >junk2$$.ppm");
++ system("ppmmake \\#000 $width $height >$tmpdir/junk2$$.ppm");
+ } else {
+ print "$last_file\n";
+- system("cp", $last_file, "junk2$$.ppm");
++ system("cp", $last_file, "$tmpdir/junk2$$.ppm");
+ }
+
+ #
+@@ -132,14 +139,14 @@ if ($last_file eq "undefined") {
+ #
+
+ # Here's what our temporary files are:
+-# junk1$$.ppm: The original (fade-from) image
+-# junk2$$.ppm: The target (fade-from) image
+-# junk3$$.ppm: The frame of the fade for the current iteration of the
+-# the for loop.
+-# junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate
+-# image to another, this is the first frame of that
+-# sequence.
+-# junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence
++# $tmpdir/junk1$$.ppm: The original (fade-from) image
++# $tmpdir/junk2$$.ppm: The target (fade-from) image
++# $tmpdir/junk3$$.ppm: The frame of the fade for the current iteration of the
++# the for loop.
++# $tmpdir/junk1a$$.ppm: If the fade involves a ppmmix sequence from one intermediate
++# image to another, this is the first frame of that
++# sequence.
++# $tmpdir/junk2a$$.ppm: This is the last frame of the above-mentioned ppmmix sequence
+
+ my $i; # Frame number
+ for ($i = 1; $i <= $nframes; $i++) {
+@@ -147,147 +154,147 @@ for ($i = 1; $i <= $nframes; $i++) {
+ if ($mode eq $SPREAD) {
+ if ($i <= 10) {
+ my $n = $spline20[$i] * 100;
+- system("ppmspread $n junk1$$.ppm >junk3$$.ppm");
++ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n;
+ $n = $spline20[$i] * 100;
+- system("ppmspread $n junk1$$.ppm >junk1a$$.ppm");
++ system("ppmspread $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm");
+ $n = (1-$spline20[$i-10]) * 100;
+- system("ppmspread $n junk2$$.ppm >junk2a$$.ppm");
++ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm");
+ $n = $spline10[$i-10];
+- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = (1-$spline20[$i-10])*100;
+- system("ppmspread $n junk2$$.ppm >junk3$$.ppm");
++ system("ppmspread $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ }
+ } elsif ($mode eq $SHIFT) {
+ if ($i <= 10) {
+ my $n = $spline20[$i] * 100;
+- system("ppmshift $n junk1$$.ppm >junk3$$.ppm");
++ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n;
+ $n = $spline20[$i] * 100;
+- system("ppmshift $n junk1$$.ppm >junk1a$$.ppm");
++ system("ppmshift $n $tmpdir/junk1$$.ppm >$tmpdir/junk1a$$.ppm");
+ $n = (1-$spline20[$i-10])*100;
+- system("ppmshift $n junk2$$.ppm >junk2a$$.ppm");
++ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk2a$$.ppm");
+ $n = $spline10[$i-10];
+- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = (1-$spline20[$i-10]) * 100;
+- system("ppmshift $n junk2$$.ppm >junk3$$.ppm");
++ system("ppmshift $n $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ }
+ } elsif ($mode eq $RELIEF) {
+ if ($i == 1) {
+- system("ppmrelief junk1$$.ppm >junk1r$$.ppm");
++ system("ppmrelief $tmpdir/junk1$$.ppm >$tmpdir/junk1r$$.ppm");
+ }
+ if ($i <= 10) {
+ my $n = $spline10[$i];
+- system("ppmmix $n junk1$$.ppm junk1r$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1r$$.ppm >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n = $spline10[$i-10];
+- system("ppmmix $n junk1r$$.ppm junk2r$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1r$$.ppm $tmpdir/junk2r$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = $spline10[$i-20];
+- system("ppmmix $n junk2r$$.ppm junk2$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk2r$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ }
+ if ($i == 10) {
+- system("ppmrelief junk2$$.ppm >junk2r$$.ppm");
++ system("ppmrelief $tmpdir/junk2$$.ppm >$tmpdir/junk2r$$.ppm");
+ }
+ } elsif ($mode eq $OIL) {
+ if ($i == 1) {
+- system("ppmtopgm junk1$$.ppm | pgmoil >junko$$.ppm");
+- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
+- ">junk1o$$.ppm");
++ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmoil >$tmpdir/junko$$.ppm");
++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
++ ">$tmpdir/junk1o$$.ppm");
+ }
+ if ($i <= 10) {
+ my $n = $spline10[$i];
+- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n = $spline10[$i-10];
+- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = $spline10[$i-20];
+- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ }
+ if ($i == 10) {
+- system("ppmtopgm junk2$$.ppm | pgmoil >junko$$.ppm");
+- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
+- ">junk2o$$.ppm");
++ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmoil >$tmpdir/junko$$.ppm");
++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
++ ">$tmpdir/junk2o$$.ppm");
+ }
+ } elsif ($mode eq $EDGE) {
+ if ($i == 1) {
+- system("ppmtopgm junk1$$.ppm | pgmedge >junko$$.ppm");
+- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
+- ">junk1o$$.ppm");
++ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmedge >$tmpdir/junko$$.ppm");
++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
++ ">$tmpdir/junk1o$$.ppm");
+ }
+ if ($i <= 10) {
+ my $n = $spline10[$i];
+- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n = $spline10[$i-10];
+- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = $spline10[$i-20];
+- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ }
+ if ($i == 10) {
+- system("ppmtopgm junk2$$.ppm | pgmedge >junko$$.ppm");
+- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
+- ">junk2o$$.ppm");
++ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmedge >$tmpdir/junko$$.ppm");
++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
++ ">$tmpdir/junk2o$$.ppm");
+ }
+ } elsif ($mode eq $BENTLEY) {
+ if ($i == 1) {
+- system("ppmtopgm junk1$$.ppm | pgmbentley >junko$$.ppm");
+- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
+- ">junk1o$$.ppm");
++ system("ppmtopgm $tmpdir/junk1$$.ppm | pgmbentley >$tmpdir/junko$$.ppm");
++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
++ ">$tmpdir/junk1o$$.ppm");
+ }
+ if ($i <= 10) {
+ my $n = $spline10[$i];
+- system("ppmmix $n junk1$$.ppm junk1o$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1$$.ppm $tmpdir/junk1o$$.ppm >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n = $spline10[$i-10];
+- system("ppmmix $n junk1o$$.ppm junk2o$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1o$$.ppm $tmpdir/junk2o$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = $spline10[$i-20];
+- system("ppmmix $n junk2o$$.ppm junk2$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk2o$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ }
+ if ($i == 10) {
+- system("ppmtopgm junk2$$.ppm | pgmbentley >junko$$.ppm");
+- system("rgb3toppm junko$$.ppm junko$$.ppm junko$$.ppm " .
+- ">junk2o$$.ppm");
++ system("ppmtopgm $tmpdir/junk2$$.ppm | pgmbentley >$tmpdir/junko$$.ppm");
++ system("rgb3toppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm $tmpdir/junko$$.ppm " .
++ ">$tmpdir/junk2o$$.ppm");
+ }
+ } elsif ($mode eq $BLOCK) {
+ if ($i <= 10) {
+ my $n = 1 - 1.9*$spline20[$i];
+- system("pamscale $n junk1$$.ppm | " .
+- "pamscale -width $width -height $height >junk3$$.ppm");
++ system("pamscale $n $tmpdir/junk1$$.ppm | " .
++ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm");
+ } elsif ($i <= 20) {
+ my $n = $spline10[$i-10];
+- system("ppmmix $n junk1a$$.ppm junk2a$$.ppm >junk3$$.ppm");
++ system("ppmmix $n $tmpdir/junk1a$$.ppm $tmpdir/junk2a$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ my $n = 1 - 1.9*$spline20[31-$i];
+- system("pamscale $n junk2$$.ppm | " .
+- "pamscale -width $width -height $height >junk3$$.ppm");
++ system("pamscale $n $tmpdir/junk2$$.ppm | " .
++ "pamscale -width $width -height $height >$tmpdir/junk3$$.ppm");
+ }
+ if ($i == 10) {
+- system("cp", "junk3$$.ppm", "junk1a$$.ppm");
+- system("pamscale $n junk2$$.ppm | " .
+- "pamscale -width $width -height $height >junk2a$$.ppm");
++ system("cp", "$tmpdir/junk3$$.ppm", "$tmpdir/junk1a$$.ppm");
++ system("pamscale $n $tmpdir/junk2$$.ppm | " .
++ "pamscale -width $width -height $height >$tmpdir/junk2a$$.ppm");
+ }
+ } elsif ($mode eq $MIX) {
+ my $fade_factor = sqrt(1/($nframes-$i+1));
+- system("ppmmix $fade_factor junk1$$.ppm junk2$$.ppm >junk3$$.ppm");
++ system("ppmmix $fade_factor $tmpdir/junk1$$.ppm $tmpdir/junk2$$.ppm >$tmpdir/junk3$$.ppm");
+ } else {
+ print("Internal error: impossible mode value '$mode'\n");
+ }
+
+ my $outfile = sprintf("%s.%04d.ppm", $base_name, $i);
+- system("cp", "junk3$$.ppm", $outfile);
++ system("cp", "$tmpdir/junk3$$.ppm", $outfile);
+ }
+
+ #
+ # Clean up shop.
+ #
+-system("rm junk*$$.ppm");
++system("rm $tmpdir/junk*$$.ppm");
+
+ exit(0);
+diff -up netpbm-10.47.05/editor/ppmquantall.security-scripts netpbm-10.47.05/editor/ppmquantall
+--- netpbm-10.47.05/editor/ppmquantall.security-scripts 2009-12-10 08:34:32.000000000 +0100
++++ netpbm-10.47.05/editor/ppmquantall 2010-03-16 21:28:09.000000000 +0100
+@@ -70,12 +70,8 @@ for i in ${files[@]}; do
+ heights=(${heights[*]} `grep -v '^#' $i | sed '1d; s/.* //; 2q'`)
+ done
+
+-tempdir="${TMPDIR-/tmp}/ppmquantall.$$"
+-mkdir -m 0700 $tempdir || \
+- { echo "Could not create temporary file. Exiting."; exit 1;}
+-trap 'rm -rf $tempdir' 0 1 3 15
+-
+-all=$tempdir/pqa.all.$$
++all=$(mktemp -t pqa.all.XXXXXXXXXX) || exit 1
++rm -f $all
+
+ pnmcat -topbottom -jleft -white ${files[@]} | pnmquant $newcolors > $all
+ if [ $? != 0 ]; then
+diff -up netpbm-10.47.05/editor/ppmshadow.security-scripts netpbm-10.47.05/editor/ppmshadow
+--- netpbm-10.47.05/editor/ppmshadow.security-scripts 2009-12-10 08:34:32.000000000 +0100
++++ netpbm-10.47.05/editor/ppmshadow 2010-03-16 21:28:09.000000000 +0100
+@@ -72,9 +72,10 @@ sub makeConvolutionKernel($$) {
+
+
+ my $tmpdir = $ENV{TMPDIR} || "/tmp";
+-my $ourtmp = "$tmpdir/ppmshadow$$";
+-mkdir($ourtmp, 0777) or
+- die("Unable to create directory for temporary files '$ourtmp");
++my $ourtmp; chomp($ourtmp = `mktemp -d -t PPMshadow.XXXXXX`);
++if ($? >> 8) {
++ die "Can't create directory for temporary files";
++}
+
+ # Process command line options
+
diff --git a/staging/nx-common/NXproto.h.64bit.diff b/staging/nx-common/NXproto.h.64bit.diff
new file mode 100644
index 000000000..ac326ebcd
--- /dev/null
+++ b/staging/nx-common/NXproto.h.64bit.diff
@@ -0,0 +1,66 @@
+--- nxcomp.old/NXproto.h 2006-06-19 19:55:56.000000000 +0200
++++ nxcomp/NXproto.h 2007-02-12 18:17:41.000000000 +0100
+@@ -26,6 +26,30 @@
+ #include <X11/Xmd.h>
+ #include <X11/Xproto.h>
+
++/*
++ Copied from Xproto.h
++ */
++
++/* For the purpose of the structure definitions in this file,
++we must redefine the following types in terms of Xmd.h's types, which may
++include bit fields. All of these are #undef'd at the end of this file,
++restoring the definitions in X.h. */
++
++#define Window CARD32
++#define Drawable CARD32
++#define Font CARD32
++#define Pixmap CARD32
++#define Cursor CARD32
++#define Colormap CARD32
++#define GContext CARD32
++#define Atom CARD32
++#define VisualID CARD32
++#define Time CARD32
++#define KeyCode CARD8
++#define KeySym CARD32
++
++/* End copied from Xproto.h */
++
+ #define sz_xNXGetControlParametersReq 4
+ #define sz_xNXGetCleanupParametersReq 4
+ #define sz_xNXGetImageParametersReq 4
+@@ -343,9 +367,9 @@
+ CARD8 dstDepth;
+ CARD32 srcLength B32;
+ CARD32 dstLength B32;
+- INT16 srcX B16, srcY B16;
++ CARD16 srcX B16, srcY B16;
+ CARD16 srcWidth B16, srcHeight B16;
+- INT16 dstX B16, dstY B16;
++ CARD16 dstX B16, dstY B16;
+ CARD16 dstWidth B16, dstHeight B16;
+ } xNXPutPackedImageReq;
+
+@@ -463,4 +487,20 @@
+ }
+ #endif
+
++/* Copied from Xproto.h */
++
++/* restore these definitions back to the typedefs in X.h */
++#undef Window
++#undef Drawable
++#undef Font
++#undef Pixmap
++#undef Cursor
++#undef Colormap
++#undef GContext
++#undef Atom
++#undef VisualID
++#undef Time
++#undef KeyCode
++#undef KeySym
++
+ #endif /* NXproto_H */
diff --git a/staging/nx-common/PKGBUILD b/staging/nx-common/PKGBUILD
new file mode 100644
index 000000000..372871404
--- /dev/null
+++ b/staging/nx-common/PKGBUILD
@@ -0,0 +1,59 @@
+# $Id: PKGBUILD 147024 2012-01-20 21:12:16Z andyrtr $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributed: eliott <eliott@solarblue.net>, Andre Naumann <anaumann@SPARCed.org>
+
+pkgname=nx-common
+pkgver=3.5.0
+pkgrel=3
+pkgdesc="NoMachine NX common package for client and server"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://nomachine.com/"
+depends=('libjpeg-turbo>=1.1.1' 'libpng>=1.5.7' 'openssl>=1.0.0' 'gcc-libs' 'bash')
+makedepends=('xorg-server-devel')
+source=( #Compression libs and proxy sources
+ http://64.34.161.181/download/$pkgver/sources/nxcomp-$pkgver-2.tar.gz
+ http://64.34.161.181/download/$pkgver/sources/nxcompsh-$pkgver-1.tar.gz
+ http://64.34.161.181/download/$pkgver/sources/nxssh-$pkgver-2.tar.gz
+ nxcompsh-gcc43.patch
+ nx-3.5.0-libpng15.patch)
+options=(!libtool)
+md5sums=('ad8c0f133122c6d07732ca69c8759410'
+ '84ade443b79ea079380b754aba9d392e'
+ 'f52fcdb38e09f8dcfb9ff0344dfbbbd6'
+ 'b6c279654dac421fc3dd1a27d66ff53c'
+ '2966353cabb96829eab291212ef078dc')
+
+build() {
+ # nxcomp
+ cd ${srcdir}/nxcomp
+ patch -Np1 -i ${srcdir}/nx-3.5.0-libpng15.patch
+
+ ./configure --prefix=/opt/NX
+ make
+ # nxcompsh
+ cd ${srcdir}/nxcompsh
+ patch -Np1 -i ${srcdir}/nxcompsh-gcc43.patch
+
+ ./configure --prefix=/opt/NX
+ make
+ # nxssh
+ cd ${srcdir}/nxssh
+ ./configure --prefix=/opt/NX
+ make
+}
+
+package() {
+ mkdir -p ${pkgdir}/opt/NX/bin
+ mkdir -p ${pkgdir}/opt/NX/lib
+
+ # nxcomp
+ cd ${srcdir}/nxcomp
+ cp -a libXcomp.so* ${pkgdir}/opt/NX/lib
+ # nxcompsh
+ cd ${srcdir}/nxcompsh
+ cp -a libXcompsh.so* ${pkgdir}/opt/NX/lib
+ # nxssh
+ cd ${srcdir}/nxssh
+ install -D -m755 nxssh ${pkgdir}/opt/NX/bin/nxssh
+}
diff --git a/staging/nx-common/nx-3.5.0-libpng15.patch b/staging/nx-common/nx-3.5.0-libpng15.patch
new file mode 100644
index 000000000..c8f2a9559
--- /dev/null
+++ b/staging/nx-common/nx-3.5.0-libpng15.patch
@@ -0,0 +1,30 @@
+diff -ur nxcomp.orig/Pgn.cpp nxcomp/Pgn.cpp
+--- nxcomp.orig/Pgn.cpp 2010-03-01 19:18:59.000000000 +0200
++++ nxcomp/Pgn.cpp 2011-09-13 16:35:12.000000000 +0300
+@@ -414,7 +414,7 @@
+
+ png_read_info(pngPtr, infoPtr);
+
+- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_set_expand(pngPtr);
+ }
+@@ -565,7 +565,7 @@
+
+ png_read_info( pngPtr, infoPtr ) ;
+
+- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_set_expand(pngPtr);
+ }
+@@ -709,7 +709,7 @@
+ png_read_info(pngPtr, infoPtr) ;
+
+
+- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_set_expand(pngPtr);
+ }
diff --git a/staging/nx-common/nxcompsh-gcc43.patch b/staging/nx-common/nxcompsh-gcc43.patch
new file mode 100644
index 000000000..681a0dab5
--- /dev/null
+++ b/staging/nx-common/nxcompsh-gcc43.patch
@@ -0,0 +1,19 @@
+--- nxcompsh/Misc.h~ 2007-06-04 13:39:49.000000000 +0200
++++ nxcompsh/Misc.h 2008-04-12 12:46:24.000000000 +0200
+@@ -18,10 +18,12 @@
+ #ifndef Misc_H
+ #define Misc_H
+
+-#include <iostream.h>
++#include <iostream>
+
+-#include <errno.h>
+-#include <string.h>
++#include <cerrno>
++#include <cstring>
++
++using namespace std;
+
+ //
+ // Error handling macros.
+
diff --git a/staging/nxserver/NXproto.h.64bit.diff b/staging/nxserver/NXproto.h.64bit.diff
new file mode 100644
index 000000000..ac326ebcd
--- /dev/null
+++ b/staging/nxserver/NXproto.h.64bit.diff
@@ -0,0 +1,66 @@
+--- nxcomp.old/NXproto.h 2006-06-19 19:55:56.000000000 +0200
++++ nxcomp/NXproto.h 2007-02-12 18:17:41.000000000 +0100
+@@ -26,6 +26,30 @@
+ #include <X11/Xmd.h>
+ #include <X11/Xproto.h>
+
++/*
++ Copied from Xproto.h
++ */
++
++/* For the purpose of the structure definitions in this file,
++we must redefine the following types in terms of Xmd.h's types, which may
++include bit fields. All of these are #undef'd at the end of this file,
++restoring the definitions in X.h. */
++
++#define Window CARD32
++#define Drawable CARD32
++#define Font CARD32
++#define Pixmap CARD32
++#define Cursor CARD32
++#define Colormap CARD32
++#define GContext CARD32
++#define Atom CARD32
++#define VisualID CARD32
++#define Time CARD32
++#define KeyCode CARD8
++#define KeySym CARD32
++
++/* End copied from Xproto.h */
++
+ #define sz_xNXGetControlParametersReq 4
+ #define sz_xNXGetCleanupParametersReq 4
+ #define sz_xNXGetImageParametersReq 4
+@@ -343,9 +367,9 @@
+ CARD8 dstDepth;
+ CARD32 srcLength B32;
+ CARD32 dstLength B32;
+- INT16 srcX B16, srcY B16;
++ CARD16 srcX B16, srcY B16;
+ CARD16 srcWidth B16, srcHeight B16;
+- INT16 dstX B16, dstY B16;
++ CARD16 dstX B16, dstY B16;
+ CARD16 dstWidth B16, dstHeight B16;
+ } xNXPutPackedImageReq;
+
+@@ -463,4 +487,20 @@
+ }
+ #endif
+
++/* Copied from Xproto.h */
++
++/* restore these definitions back to the typedefs in X.h */
++#undef Window
++#undef Drawable
++#undef Font
++#undef Pixmap
++#undef Cursor
++#undef Colormap
++#undef GContext
++#undef Atom
++#undef VisualID
++#undef Time
++#undef KeyCode
++#undef KeySym
++
+ #endif /* NXproto_H */
diff --git a/staging/nxserver/PKGBUILD b/staging/nxserver/PKGBUILD
new file mode 100644
index 000000000..5110e7097
--- /dev/null
+++ b/staging/nxserver/PKGBUILD
@@ -0,0 +1,95 @@
+# $Id: PKGBUILD 147028 2012-01-20 21:33:04Z andyrtr $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributed: eliott <eliott@solarblue.net>, Andre Naumann <anaumann@SPARCed.org>
+
+pkgname=nxserver
+pkgver=3.5.0
+pkgrel=5
+pkgdesc="NoMachine NX is the next-generation X compression and roundtrip suppression scheme."
+arch=(i686 x86_64)
+url="http://nomachine.com/"
+license=('GPL')
+depends=("nx-common" 'libxaw' 'libxrender' 'libxp' 'gcc-libs' 'libjpeg>=8' #>=$pkgver
+ 'libxpm' 'libpng>=1.5.7' 'libxdamage' 'libxrandr' 'libxcomposite' 'libxtst' 'freetype2'
+ 'xorg-sessreg')
+makedepends=('imake')
+source=(
+#X11 support programs and libraries
+http://64.34.161.181/download/$pkgver/sources/nx-X11-$pkgver-2.tar.gz
+http://64.34.161.181/download/$pkgver/sources/nxwin-$pkgver-2.tar.gz
+http://64.34.161.181/download/$pkgver/sources/nxauth-$pkgver-1.tar.gz
+http://64.34.161.181/download/$pkgver/sources/nxcomp-$pkgver-2.tar.gz # needed to provide NX.h and -LXcomp - part of nx-common
+#X11 Agent sources
+http://64.34.161.181/download/$pkgver/sources/nxagent-$pkgver-7.tar.gz
+http://64.34.161.181/download/$pkgver/sources/nxcompsh-$pkgver-1.tar.gz # needed to get X11 built - part of nx-common
+#Compression libs and proxy sources
+http://64.34.161.181/download/$pkgver/sources/nxproxy-$pkgver-1.tar.gz
+http://64.34.161.181/download/$pkgver/sources/nxcompext-$pkgver-1.tar.gz
+http://64.34.161.181/download/$pkgver/sources/nxcompshad-$pkgver-2.tar.gz
+# gcc 43 fix
+nxcompsh-gcc43.patch
+nx-3.5.0-libpng15.patch)
+options=(!libtool)
+md5sums=('12060433a74ac61a1c776d1d6d136117'
+ '84c7f1575d9a1506370125ed050514ab'
+ 'cf38ec1e5a5f6453946cd387c14f2684'
+ 'ad8c0f133122c6d07732ca69c8759410'
+ '0a36c7e6a86c6c741179464b8f79c487'
+ '84ade443b79ea079380b754aba9d392e'
+ '488bb4d9b8e9f82dc272b4e6e9c57d30'
+ 'abde2ccc33e31fc695031c2cfb60f3dd'
+ '90a762dd9eb19c8c97876ad837923857'
+ 'b6c279654dac421fc3dd1a27d66ff53c'
+ '2966353cabb96829eab291212ef078dc')
+
+build() {
+ cd ${srcdir}
+
+ # nxcomp
+ cd ${srcdir}/nxcomp
+ patch -Np1 -i ${srcdir}/nx-3.5.0-libpng15.patch
+ ./configure --prefix=/opt/NX
+ make
+ # nxcompshad
+ cd ${srcdir}/nxcompshad
+ ./configure --prefix=/opt/NX
+ make
+ # nxcompsh
+ cd ${srcdir}/nxcompsh
+ patch -Np1 -i ${srcdir}/nxcompsh-gcc43.patch
+ ./configure --prefix=/opt/NX
+ make
+ # nxproxy
+ cd ${srcdir}/nxproxy
+ ./configure --prefix=/opt/NX
+ make
+ # nx-X11
+ cd ${srcdir}/nx-X11
+ make World
+ # nxcompext
+ cd ${srcdir}/nxcompext
+ ./configure --prefix=/opt/NX
+ make
+}
+
+package() {
+ mkdir -p ${pkgdir}/opt/NX/bin
+ mkdir -p ${pkgdir}/opt/NX/lib
+
+ # nxcompshad
+ cd ${srcdir}/nxcompshad
+ cp -a libXcompshad.so* ${pkgdir}/opt/NX/lib
+ # nxproxy
+ cd ${srcdir}/nxproxy
+ make prefix=${pkgdir}/opt/NX install
+ # nx-X11
+ cd ${srcdir}/nx-X11
+ cp -a lib/X11/libX11.so* ${pkgdir}/opt/NX/lib
+ cp -a lib/Xext/libXext.so* ${pkgdir}/opt/NX/lib
+ cp -a lib/Xrender/libXrender.so* ${pkgdir}/opt/NX/lib
+ install -D -m755 programs/Xserver/nxagent ${pkgdir}/opt/NX/bin/nxagent
+ install -D -m755 programs/nxauth/nxauth ${pkgdir}/opt/NX/bin/nxauth
+ # nxcompext
+ cd ${srcdir}/nxcompext
+ cp -a libXcompext.so* ${pkgdir}/opt/NX/lib
+} \ No newline at end of file
diff --git a/staging/nxserver/nx-3.5.0-libpng15.patch b/staging/nxserver/nx-3.5.0-libpng15.patch
new file mode 100644
index 000000000..c8f2a9559
--- /dev/null
+++ b/staging/nxserver/nx-3.5.0-libpng15.patch
@@ -0,0 +1,30 @@
+diff -ur nxcomp.orig/Pgn.cpp nxcomp/Pgn.cpp
+--- nxcomp.orig/Pgn.cpp 2010-03-01 19:18:59.000000000 +0200
++++ nxcomp/Pgn.cpp 2011-09-13 16:35:12.000000000 +0300
+@@ -414,7 +414,7 @@
+
+ png_read_info(pngPtr, infoPtr);
+
+- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_set_expand(pngPtr);
+ }
+@@ -565,7 +565,7 @@
+
+ png_read_info( pngPtr, infoPtr ) ;
+
+- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_set_expand(pngPtr);
+ }
+@@ -709,7 +709,7 @@
+ png_read_info(pngPtr, infoPtr) ;
+
+
+- if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++ if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_set_expand(pngPtr);
+ }
diff --git a/staging/nxserver/nxcompsh-gcc43.patch b/staging/nxserver/nxcompsh-gcc43.patch
new file mode 100644
index 000000000..681a0dab5
--- /dev/null
+++ b/staging/nxserver/nxcompsh-gcc43.patch
@@ -0,0 +1,19 @@
+--- nxcompsh/Misc.h~ 2007-06-04 13:39:49.000000000 +0200
++++ nxcompsh/Misc.h 2008-04-12 12:46:24.000000000 +0200
+@@ -18,10 +18,12 @@
+ #ifndef Misc_H
+ #define Misc_H
+
+-#include <iostream.h>
++#include <iostream>
+
+-#include <errno.h>
+-#include <string.h>
++#include <cerrno>
++#include <cstring>
++
++using namespace std;
+
+ //
+ // Error handling macros.
+
diff --git a/staging/opencv/PKGBUILD b/staging/opencv/PKGBUILD
new file mode 100644
index 000000000..8829b6e70
--- /dev/null
+++ b/staging/opencv/PKGBUILD
@@ -0,0 +1,119 @@
+# $Id: PKGBUILD 147051 2012-01-21 05:36:50Z schiv $
+# Maintainer: Ray Rashif <schiv@archlinux.org>
+# Contributor: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgbase=opencv
+pkgname=('opencv' 'opencv-docs' 'opencv-samples')
+_realname=OpenCV
+pkgver=2.3.1_a
+_realver=2.3.1
+pkgrel=4
+pkgdesc="Open Source Computer Vision Library"
+arch=('i686' 'x86_64')
+license=('BSD')
+url="http://opencv.willowgarage.com/"
+depends=('jasper' 'gstreamer0.10-base' 'openexr'
+ 'gtk2' 'xine-lib' 'libdc1394' 'v4l-utils')
+makedepends=('pkg-config' 'cmake' 'python2-numpy' 'eigen2')
+optdepends=('opencv-docs'
+ 'opencv-samples'
+ 'eigen2'
+ 'python2-numpy: Python 2.x interface')
+options=('!libtool')
+source=("http://downloads.sourceforge.net/opencvlibrary/$_realname-${_realver}a.tar.bz2")
+md5sums=('82e4b6bfa349777233eea09b075e931e')
+
+_cmakeopts=('-D CMAKE_BUILD_TYPE=Release'
+ '-D CMAKE_INSTALL_PREFIX=/usr'
+ '-D CMAKE_SKIP_RPATH=ON'
+ '-D BUILD_TESTS=OFF'
+ '-D ENABLE_SSE=ON'
+ '-D ENABLE_SSE2=ON'
+ '-D ENABLE_SSE3=OFF'
+ '-D ENABLE_SSSE3=OFF'
+ '-D ENABLE_SSE41=OFF'
+ '-D ENABLE_SSE42=OFF'
+ '-D BUILD_EXAMPLES=ON'
+ '-D INSTALL_C_EXAMPLES=ON'
+ '-D INSTALL_PYTHON_EXAMPLES=ON'
+ '-D WITH_XINE=ON'
+ '-D WITH_QT=OFF'
+ '-D WITH_QT_OPENGL=OFF'
+ '-D WITH_UNICAP=OFF'
+ '-D WITH_PVAPI=OFF'
+ '-D WITH_OPENNI=OFF'
+ '-D WITH_TBB=OFF'
+ '-D WITH_IPP=OFF'
+ '-D WITH_CUDA=OFF'
+ '-D USE_FAST_MATH=ON')
+
+build() {
+ cd "$srcdir/$_realname-$_realver"
+
+ # x64, i.e "Athlon64" and upwards, can use SSE3
+ [ $CARCH = x86_64 ] && \
+ _cmakeopts=${_cmakeopts[@]/ENABLE_SSE3=OFF/ENABLE_SSE3=ON}
+
+ cmake ${_cmakeopts[@]} .
+
+ make
+}
+
+package_opencv() {
+ cd "$srcdir/$_realname-$_realver"
+
+ make DESTDIR="$pkgdir" install
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$_realver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ cd "$pkgdir/usr/share"
+
+ # prepare FSH-friendly dirs
+ if [ -d OpenCV ]; then
+ mv opencv/samples OpenCV/
+ rm -r opencv
+ mv OpenCV opencv
+ fi
+
+ # separate docs package; also be -R friendly
+ [ -d opencv/doc ] && mv opencv/doc "$srcdir/opencv-doc"
+
+ # separate samples package
+ [ -d opencv/samples ] && mv opencv/samples "$srcdir/opencv-samples"
+}
+
+package_opencv-docs() {
+ pkgdesc+=" (documentation)"
+ unset depends
+ unset optdepends
+ options=('docs')
+
+ cd "$srcdir"
+
+ mkdir -p "$pkgdir/usr/share/doc"
+ cp -r opencv-doc "$pkgdir/usr/share/doc/opencv"
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$_realver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_opencv-samples() {
+ pkgdesc+=" (samples)"
+ depends=('bash')
+ unset optdepends
+ unset options
+
+ cd "$srcdir"
+
+ mkdir -p "$pkgdir/usr/share/opencv"
+ cp -r opencv-samples "$pkgdir/usr/share/opencv/samples"
+
+ # install license file
+ install -Dm644 "$srcdir/$_realname-$_realver/doc/license.txt" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/openjdk6/PKGBUILD b/staging/openjdk6/PKGBUILD
new file mode 100644
index 000000000..428f10348
--- /dev/null
+++ b/staging/openjdk6/PKGBUILD
@@ -0,0 +1,183 @@
+# $Id: PKGBUILD 147004 2012-01-20 15:47:29Z andyrtr $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+
+pkgname=('openjdk6' 'openjdk6-src')
+pkgbase="openjdk6"
+_javaver=6
+_icedteaver=1.10.5
+_openjdk_version=b22
+_openjdk_date=28_feb_2011
+pkgver=${_javaver}.${_openjdk_version}_${_icedteaver}
+pkgrel=2
+url='http://icedtea.classpath.org'
+arch=('i686' 'x86_64')
+license=('custom')
+makedepends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst' 'alsa-lib' 'giflib' 'libxp' 'gtk2'
+ 'nspr' 'zlib' 'freetype2' 'libjpeg>=8' 'libx11' 'libcups' 'patch' 'xalan-java' 'libxt' 'nss'
+ 'apache-ant' 'autoconf' 'unzip' 'rhino' 'mercurial' 'zip' 'cpio' 'openjdk6')
+options=('!emptydirs') # 'force') # force needed for hg shots
+source=(http://icedtea.classpath.org/download/source/icedtea6-${_icedteaver}.tar.gz
+ http://download.java.net/openjdk/jdk6/promoted/${_openjdk_version}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz
+ http://icedtea.classpath.org/download/drops/jaxp144_01.zip
+ http://icedtea.classpath.org/download/drops/jdk6-jaxws-b20.zip
+ http://icedtea.classpath.org/download/drops/jdk6-jaf-b20.zip
+ fix_jdk_cmds_path.diff
+ fix_corba_cmds_path.diff
+ fontconfig-paths.diff
+ nonreparenting-wm.diff
+ openjdk6.profile
+ openjdk6.profile.csh
+ glibc2_15.diff)
+noextract=(openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz
+ jaxp144_01.zip
+ jdk6-jaxws-b20.zip
+ jdk6-jaf-b20.zip)
+md5sums=('e2316f463b5d9f53f8c5c9020f2a7e5a'
+ '2d2bbbb0f9b81f1fec41ec730da8a933'
+ 'ef7a8b3624ea904bf584bc46d79b5e75'
+ '91adfd41e6f001add4f92ae31216b1e3'
+ 'bc95c133620bd68c161cac9891592901'
+ '5da3e39fa60985576c4f37d1491efbe2'
+ 'f7e7a212e50abb56a6ef1a2b1bd27405'
+ 'ee1afda124d5927345014ab382ef581e'
+ '9b4d368f5ee08de248eaf029303a446c'
+ '74c4a7adc782edd087802bf92ae3d6d0'
+ 'fdf295e2f186dfa4d308691a3d7ac8c5'
+ '0c8f0a398c88f85e0db44b4417562cf3')
+
+build() {
+
+ unset JAVA_HOME
+ unset CLASSPATH
+
+ [ -z "${ANT_HOME}" ] && . /etc/profile.d/apache-ant.sh
+
+ _javaver=6
+ _jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
+
+ cd ${srcdir}/icedtea6-${_icedteaver}
+
+ ln -s ${srcdir}/openjdk-6-src-${_openjdk_version}-${_openjdk_date}.tar.gz .
+
+ cp ${srcdir}/*.diff ${srcdir}/icedtea6-${_icedteaver}/patches/
+
+ autoreconf -i
+
+ export DISTRIBUTION_PATCHES="patches/fix_jdk_cmds_path.diff patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/nonreparenting-wm.diff patches/glibc2_15.diff"
+
+ export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
+ export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
+ unset MAKEFLAGS
+
+ ./configure --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
+ --with-xalan2-jar=/usr/share/java/xalan.jar \
+ --with-ant-home=/usr/share/java/apache-ant \
+ --with-pkgversion=ArchLinux-${pkgver}-${pkgrel}-$CARCH \
+ --with-jaxp-drop-zip=${srcdir}/jaxp144_01.zip \
+ --with-jaxws-drop-zip=${srcdir}/jdk6-jaxws-b20.zip \
+ --with-jaf-drop-zip=${srcdir}/jdk6-jaf-b20.zip \
+ --disable-bootstrap
+ LD_PRELOAD="" make
+}
+
+package_openjdk6() {
+ pkgdesc='Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs.'
+ backup=(etc/profile.d/openjdk6.sh)
+ depends=('gcc-libs' 'xdg-utils' 'hicolor-icon-theme' 'ca-certificates-java' 'libxtst' 'libxt' 'nss' 'libjpeg' 'freetype2' 'libxrender' 'libpng>=1.5.7')
+ optdepends=('icedtea-web: web browser plugin + Java Web Start'
+ 'alsa-lib: for sound'
+ 'giflib: for gif format support')
+ conflicts=('java-environment' 'java-runtime')
+ provides=('java-environment=6' 'java-runtime=6')
+ install=openjdk6.install
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ _arch=amd64
+ else
+ _arch=i586
+ fi
+
+ _javaver=6
+ _jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
+
+ cd ${srcdir}/icedtea6-${_icedteaver}
+ install -m755 -d ${pkgdir}/${_jvmdir}/jre
+
+ pushd ${srcdir}/icedtea6-${_icedteaver}/openjdk.build/j2sdk-image
+
+ # Install main files.
+ cp -a bin include lib ${pkgdir}/${_jvmdir}/
+ cp -a jre/bin jre/lib ${pkgdir}/${_jvmdir}/jre/
+
+ mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.properties.src \
+ ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.properties.src
+ mv ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.Ubuntu.bfc \
+ ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.bfc
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.bfc
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/fontconfig.*.properties.src
+
+ # Install man pages.
+ install -m755 -d ${pkgdir}/usr/share/man/man1
+ install -m644 man/man1/*.1 ${pkgdir}/usr/share/man/man1/
+
+ # Install demos and samples.
+ cp -a demo ${pkgdir}/${_jvmdir}/
+ install -m755 -d sample/rmi
+ mv bin/java-rmi.cgi sample/rmi
+ cp -a sample ${pkgdir}/${_jvmdir}/
+ popd
+
+ # Install icons and menu entries.
+ for s in 16 24 32 48 ; do
+ install -m755 -d ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps
+ install -m644 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
+ ${pkgdir}/usr/share/icons/hicolor/${s}x${s}/apps/java.png
+ done
+
+ # Install desktop files.
+ install -m755 -d ${pkgdir}/usr/share/applications
+ install -m644 {jconsole,policytool}.desktop ${pkgdir}/usr/share/applications
+
+ # link binaries into /usr/bin
+ install -m755 -d ${pkgdir}/usr/bin
+ pushd ${pkgdir}/${_jvmdir}/bin
+ for file in *; do
+ ln -sf ${_jvmdir}/bin/${file} \
+ ${pkgdir}/usr/bin
+ done
+ popd
+
+ # link JKS keystore from ca-certificates-java
+ rm -f ${pkgdir}/${_jvmdir}/jre/lib/security/cacerts
+ ln -sf /etc/ssl/certs/java/cacerts "${pkgdir}/${_jvmdir}/jre/lib/security/cacerts"
+
+ # set some variables
+ install -m755 -d ${pkgdir}/etc/profile.d
+ install -m755 ${srcdir}/openjdk6.profile ${pkgdir}/etc/profile.d/openjdk6.sh
+ install -m755 ${srcdir}/openjdk6.profile.csh ${pkgdir}/etc/profile.d/openjdk6.csh
+
+ # install license
+ install -Dm644 ${srcdir}//icedtea6-${_icedteaver}/openjdk/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_openjdk6-src() {
+ pkgdesc='Free Java environment based on OpenJDK 6.0 Source Bundle'
+ depends=('openjdk6')
+
+ if [ "${CARCH}" = "x86_64" ]; then
+ _arch=amd64
+ else
+ _arch=i586
+ fi
+
+ _javaver=6
+ _jvmdir=/usr/lib/jvm/java-${_javaver}-openjdk
+
+ cd ${srcdir}/icedtea6-${_icedteaver}
+ install -m755 -d ${pkgdir}/${_jvmdir}/jre
+
+ pushd ${srcdir}/icedtea6-${_icedteaver}/openjdk.build/j2sdk-image
+ # Install src.zip file
+ cp -a src.zip ${pkgdir}/${_jvmdir}/
+}
diff --git a/staging/openjdk6/fix_corba_cmds_path.diff b/staging/openjdk6/fix_corba_cmds_path.diff
new file mode 100644
index 000000000..842657880
--- /dev/null
+++ b/staging/openjdk6/fix_corba_cmds_path.diff
@@ -0,0 +1,33 @@
+--- openjdk/corba/make/common/shared/Defs-utils.gmk.old 2008-04-13 13:26:12.000000000 +0300
++++ openjdk/corba/make/common/shared/Defs-utils.gmk 2008-04-14 15:35:13.000000000 +0300
+@@ -86,10 +86,10 @@
+ CHMOD = $(UTILS_COMMAND_PATH)chmod
+ CMP = $(UTILS_USR_BIN_PATH)cmp
+ COMM = $(UTILS_USR_BIN_PATH)comm
+-COMPRESS = $(UTILS_USR_BIN_PATH)compress
++COMPRESS = $(UTILS_COMMAND_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+ CPIO = $(UTILS_COMMAND_PATH)cpio
+-CUT = $(UTILS_USR_BIN_PATH)cut
++CUT = $(UTILS_COMMAND_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
+ DIFF = $(UTILS_USR_BIN_PATH)diff
+@@ -136,7 +136,7 @@
+ TAR = $(UTILS_COMMAND_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+-TR = $(UTILS_USR_BIN_PATH)tr
++TR = $(UTILS_COMMAND_PATH)tr
+ TRUE = $(UTILS_COMMAND_PATH)true
+ UNAME = $(UTILS_COMMAND_PATH)uname
+ UNIQ = $(UTILS_USR_BIN_PATH)uniq
+@@ -186,7 +186,7 @@
+ # others have it in /usr/bin.
+ SORT=$(firstword $(wildcard $(UTILS_COMMAND_PATH)sort) \
+ $(wildcard $(UTILS_USR_BIN_PATH)sort))
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(UTILS_COMMAND_PATH)gawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
diff --git a/staging/openjdk6/fix_jdk_cmds_path.diff b/staging/openjdk6/fix_jdk_cmds_path.diff
new file mode 100644
index 000000000..7e16e1744
--- /dev/null
+++ b/staging/openjdk6/fix_jdk_cmds_path.diff
@@ -0,0 +1,33 @@
+--- openjdk/jdk/make/common/shared/Defs-utils.gmk.old 2008-04-13 13:33:23.000000000 +0300
++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2008-04-14 15:37:34.000000000 +0300
+@@ -76,10 +76,10 @@
+ CHMOD = $(UTILS_COMMAND_PATH)chmod
+ CMP = $(UTILS_USR_BIN_PATH)cmp
+ COMM = $(UTILS_USR_BIN_PATH)comm
+-COMPRESS = $(UTILS_USR_BIN_PATH)compress
++COMPRESS = $(UTILS_COMMAND_PATH)compress
+ CP = $(UTILS_COMMAND_PATH)cp
+ CPIO = $(UTILS_COMMAND_PATH)cpio
+-CUT = $(UTILS_USR_BIN_PATH)cut
++CUT = $(UTILS_COMMAND_PATH)cut
+ DATE = $(UTILS_COMMAND_PATH)date
+ DF = $(UTILS_COMMAND_PATH)df
+ DIFF = $(UTILS_USR_BIN_PATH)diff
+@@ -126,7 +126,7 @@
+ TAR = $(UTILS_COMMAND_PATH)tar
+ TEST = $(UTILS_USR_BIN_PATH)test
+ TOUCH = $(UTILS_COMMAND_PATH)touch
+-TR = $(UTILS_USR_BIN_PATH)tr
++TR = $(UTILS_COMMAND_PATH)tr
+ TRUE = $(UTILS_COMMAND_PATH)true
+ UNAME = $(UTILS_COMMAND_PATH)uname
+ UNIQ = $(UTILS_USR_BIN_PATH)uniq
+@@ -173,7 +173,7 @@
+ BASENAME=$(firstword $(wildcard $(UTILS_COMMAND_PATH)basename) \
+ $(wildcard $(UTILS_USR_BIN_PATH)basename))
+
+- NAWK = $(USRBIN_PATH)gawk
++ NAWK = $(UTILS_COMMAND_PATH)gawk
+ # Intrinsic unix command, with backslash-escaped character interpretation
+ ECHO = /bin/echo -e
+ # These are really in UTILS_USR_BIN_PATH on Linux (only sccs is not)
diff --git a/staging/openjdk6/fontconfig-paths.diff b/staging/openjdk6/fontconfig-paths.diff
new file mode 100644
index 000000000..fa08db629
--- /dev/null
+++ b/staging/openjdk6/fontconfig-paths.diff
@@ -0,0 +1,134 @@
+--- openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties 2009-05-29 22:45:23.024341869 +0000
++++ openjdk/jdk/src/solaris/classes/sun/awt/fontconfigs/linux.fontconfig.Ubuntu.properties.new 2009-05-29 22:55:13.681366890 +0000
+@@ -275,73 +275,61 @@
+
+ # Font File Names
+
+-filename.DejaVu_Sans=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
+-filename.DejaVu_Sans_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
+-filename.DejaVu_Sans_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
+-filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
+-
+-filename.DejaVu_Sans_Mono=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
+-filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
+-filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
+-filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-BoldOblique.ttf
+-
+-filename.DejaVu_Serif=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
+-filename.DejaVu_Serif_Bold=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
+-filename.DejaVu_Serif_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Oblique.ttf
+-filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldOblique.ttf
+-
+-filename.AR_PL_UMing_CN=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_UMing_HK=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_UMing_TW=/usr/share/fonts/truetype/arphic/uming.ttc
+-filename.AR_PL_ShanHeiSun_Uni=/usr/share/fonts/truetype/arphic/uming.ttf
+-
+-filename.WenQuanYi_Zen_Hei=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf
+-filename.Baekmuk_Batang=/usr/share/fonts/truetype/baekmuk/batang.ttf
+-filename.UnBatang=/usr/share/fonts/truetype/unfonts/UnBatang.ttf
+-filename.UnBatang_Bold=/usr/share/fonts/truetype/unfonts/UnBatangBold.ttf
+-filename.Baekmuk_Gulim=/usr/share/fonts/truetype/baekmuk/gulim.ttf
+-filename.UnDotum=/usr/share/fonts/truetype/unfonts/UnDotum.ttf
+-filename.UnDotum_Bold=/usr/share/fonts/truetype/unfonts/UnDotumBold.ttf
+-filename.Kochi_Gothic=/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
+-filename.Sazanami_Gothic=/usr/share/fonts/truetype/sazanami/sazanami-gothic.ttf
+-filename.Kochi_Mincho=/usr/share/fonts/truetype/kochi/kochi-mincho.ttf
+-filename.Sazanami_Mincho=/usr/share/fonts/truetype/sazanami/sazanami-mincho.ttf
+-filename.VL_Gothic=/usr/share/fonts/truetype/vlgothic/VL-Gothic-Regular.ttf
+-filename.VL_PGothic=/usr/share/fonts/truetype/vlgothic/VL-PGothic-Regular.ttf
+-
+-filename.Lohit_Bengali=/usr/share/fonts/truetype/ttf-bengali-fonts/lohit_bn.ttf
+-filename.Lohit_Gujarati=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_gu.ttf
+-filename.Lohit_Hindi=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf
+-filename.Lohit_Kannda=/usr/share/fonts/truetype/ttf-kannada-fonts/lohit_kn.ttf
+-#filename.Lohit_Malayalam=/usr/share/fonts/lohit-malayalam/lohit_ml.ttf
+-filename.Lohit_Oriya=/usr/share/fonts/truetype/ttf-oriya-fonts/lohit_or.ttf
+-filename.Lohit_Punjabi=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf
+-filename.Lohit_Tamil=/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf
+-filename.Lohit_Telugu=/usr/share/fonts/truetype/ttf-telugu-fonts/lohit_te.ttf
+-filename.LKLUG=/usr/share/fonts/truetype/ttf-sinhala-lklug/lklug.ttf
+-
+-filename.LuxiSans-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisr.ttf
+-filename.LuxiSans-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisb.ttf
+-filename.LuxiSans-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisri.ttf
+-filename.LuxiSans-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxisbi.ttf
+-filename.LuxiMono-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximr.ttf
+-filename.LuxiMono-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximb.ttf
+-filename.LuxiMono-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximri.ttf
+-filename.LuxiMono-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luximbi.ttf
+-filename.LuxiSerif-Regular=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirr.ttf
+-filename.LuxiSerif-Bold=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirb.ttf
+-filename.LuxiSerif-Oblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirri.ttf
+-filename.LuxiSerif-BoldOblique=/usr/share/fonts/truetype/ttf-xfree86-nonfree/luxirbi.ttf
+-
+-# AWT X11 font paths
+-awtfontpath.latin-1=/usr/share/fonts/X11/Type1
+-awtfontpath.umingcn=/usr/share/fonts/truetype/arphic
+-awtfontpath.uminghk=/usr/share/fonts/truetype/arphic
+-awtfontpath.umingtw=/usr/share/fonts/truetype/arphic
+-awtfontpath.shanheisun=/usr/share/fonts/truetype/arphic
+-awtfontpath.wqy-zenhei=/usr/share/fonts/truetype/wqy
+-awtfontpath.japanese-kochi=/usr/share/fonts/truetype/kochi
+-awtfontpath.japanese-sazanami=/usr/share/fonts/truetype/sazanami
+-awtfontpath.japanese-vlgothic=/usr/share/fonts/truetype/vlgothic
+-awtfontpath.korean-baekmuk=/usr/share/fonts/truetype/baekmuk
+-awtfontpath.korean-un=/usr/share/fonts/truetype/unfonts
++filename.DejaVu_Sans=/usr/share/fonts/TTF/DejaVuSans.ttf
++filename.DejaVu_Sans_Bold=/usr/share/fonts/TTF/DejaVuSans-Bold.ttf
++filename.DejaVu_Sans_Oblique=/usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
++filename.DejaVu_Sans_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSans-BoldOblique.ttf
++
++filename.DejaVu_Sans_Mono=/usr/share/fonts/TTF/DejaVuSansMono.ttf
++filename.DejaVu_Sans_Mono_Bold=/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf
++filename.DejaVu_Sans_Mono_Oblique=/usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf
++filename.DejaVu_Sans_Mono_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSansMono-BoldOblique.ttf
++
++filename.DejaVu_Serif=/usr/share/fonts/TTF/DejaVuSerif.ttf
++filename.DejaVu_Serif_Bold=/usr/share/fonts/TTF/DejaVuSerif-Bold.ttf
++filename.DejaVu_Serif_Oblique=/usr/share/fonts/TTF/DejaVuSerif-Oblique.ttf
++filename.DejaVu_Serif_Bold_Oblique=/usr/share/fonts/TTF/DejaVuSerif-BoldOblique.ttf
++
++filename.AR_PL_UMing_CN=/usr/share/fonts/TTF/uming.ttc
++filename.AR_PL_UMing_HK=/usr/share/fonts/TTF/uming.ttc
++filename.AR_PL_UMing_TW=/usr/share/fonts/TTF/uming.ttc
++filename.AR_PL_ShanHeiSun_Uni=/usr/share/TTF/uming.ttf
++
++filename.WenQuanYi_Zen_Hei=/usr/share/fonts/TTF/wqy-zenhei.ttf
++filename.Baekmuk_Batang=/usr/share/fonts/TTF/batang.ttf
++filename.UnBatang=/usr/share/fonts/TTF/UnBatang.ttf
++filename.UnBatang_Bold=/usr/share/fonts/TTF/UnBatangBold.ttf
++filename.Baekmuk_Gulim=/usr/share/fonts/TTF/gulim.ttf
++filename.UnDotum=/usr/share/fonts/TTF/UnDotum.ttf
++filename.UnDotum_Bold=/usr/share/fonts/TTF/UnDotumBold.ttf
++filename.Kochi_Gothic=/usr/share/fonts/TTF/kochi-gothic.ttf
++filename.Sazanami_Gothic=/usr/share/fonts/TTF/sazanami-gothic.ttf
++filename.Kochi_Mincho=/usr/share/fonts/TTF/kochi-mincho.ttf
++filename.Sazanami_Mincho=/usr/share/fonts/TTF/sazanami-mincho.ttf
++filename.VL_Gothic=/usr/share/fonts/TTF/VL-Gothic-Regular.ttf
++filename.VL_PGothic=/usr/share/fonts/TTF/VL-PGothic-Regular.ttf
++
++filename.Lohit_Bengali=/usr/share/fonts/TTF/lohit_bn.ttf
++filename.Lohit_Gujarati=/usr/share/fonts/TTF/lohit_gu.ttf
++filename.Lohit_Hindi=/usr/share/fonts/TTF/lohit_hi.ttf
++filename.Lohit_Kannda=/usr/share/fonts/TTF/lohit_kn.ttf
++#filename.Lohit_Malayalam=/usr/share/fonts/TTF/lohit_ml.ttf
++filename.Lohit_Oriya=/usr/share/fonts/TTF/lohit_or.ttf
++filename.Lohit_Punjabi=/usr/share/fonts/TTF/lohit_pa.ttf
++filename.Lohit_Tamil=/usr/share/fonts/TTF/lohit_ta.ttf
++filename.Lohit_Telugu=/usr/share/fonts/TTF/lohit_te.ttf
++filename.LKLUG=/usr/share/fonts/TTF/lklug.ttf
++
++filename.LuxiSans-Regular=/usr/share/fonts/TTF/luxisr.ttf
++filename.LuxiSans-Bold=/usr/share/fonts/TTF/luxisb.ttf
++filename.LuxiSans-Oblique=/usr/share/fonts/TTF/luxisri.ttf
++filename.LuxiSans-BoldOblique=/usr/share/fonts/TTF/luxisbi.ttf
++filename.LuxiMono-Regular=/usr/share/fonts/TTF/luximr.ttf
++filename.LuxiMono-Bold=/usr/share/fonts/TTF/luximb.ttf
++filename.LuxiMono-Oblique=/usr/share/fonts/TTF/luximri.ttf
++filename.LuxiMono-BoldOblique=/usr/share/fonts/TTF/luximbi.ttf
++filename.LuxiSerif-Regular=/usr/share/fonts/TTF/luxirr.ttf
++filename.LuxiSerif-Bold=/usr/share/fonts/TTF/luxirb.ttf
++filename.LuxiSerif-Oblique=/usr/share/fonts/TTF/luxirri.ttf
++filename.LuxiSerif-BoldOblique=/usr/share/fonts/TTF/luxirbi.ttf
++
diff --git a/staging/openjdk6/glibc2_15.diff b/staging/openjdk6/glibc2_15.diff
new file mode 100644
index 000000000..8fe1b077a
--- /dev/null
+++ b/staging/openjdk6/glibc2_15.diff
@@ -0,0 +1,236 @@
+# HG changeset patch
+# User never
+# Date 1319555835 25200
+# Node ID a6eef545f1a2ceca6aeadf688a965df600ffef28
+# Parent 2ec638646e86e455978c31a9d47fc0ec271ed926
+7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
+Reviewed-by: never
+Contributed-by: Omair Majid <omajid@redhat.com>
+
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/opto/addnode.cpp
+--- openjdk/hotspot/src/share/vm/opto/addnode.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/opto/addnode.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -34,8 +34,6 @@
+
+ // Portions of code courtesy of Clifford Click
+
+-#define MAXFLOAT ((float)3.40282346638528860e+38)
+-
+ // Classic Add functionality. This covers all the usual 'add' behaviors for
+ // an algebraic ring. Add-integer, add-float, add-double, and binary-or are
+ // all inherited from this class. The various identity values are supplied
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jniCheck.cpp
+--- openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -107,7 +107,7 @@
+ if (env != xenv) { \
+ NativeReportJNIFatalError(thr, warn_wrong_jnienv); \
+ } \
+- __ENTRY(result_type, header, thr)
++ VM_ENTRY_BASE(result_type, header, thr)
+
+
+ #define UNCHECKED() (unchecked_jni_NativeInterface)
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jvmtiEnter.xsl
+--- openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 08:17:15 2011 -0700
+@@ -426,7 +426,7 @@
+ <xsl:value-of select="$space"/>
+ <xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
+ <xsl:value-of select="$space"/>
+- <xsl:text>__ENTRY(jvmtiError, </xsl:text>
++ <xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
+ <xsl:apply-templates select="." mode="functionid"/>
+ <xsl:text> , current_thread)</xsl:text>
+ <xsl:value-of select="$space"/>
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jvmtiEnv.cpp
+--- openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -173,7 +173,7 @@
+ // from native so as to resolve the jthread.
+
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
++ VM_ENTRY_BASE(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ oop thread_oop = JNIHandles::resolve_external_guard(thread);
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jvmtiExport.cpp
+--- openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -373,7 +373,7 @@
+ JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
+ // transition code: native to VM
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
++ VM_ENTRY_BASE(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/runtime/interfaceSupport.hpp
+--- openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 08:17:15 2011 -0700
+@@ -72,9 +72,9 @@
+ }
+ };
+
+-// InterfaceSupport provides functionality used by the __LEAF and __ENTRY
+-// macros. These macros are used to guard entry points into the VM and
+-// perform checks upon leave of the VM.
++// InterfaceSupport provides functionality used by the VM_LEAF_BASE and
++// VM_ENTRY_BASE macros. These macros are used to guard entry points into
++// the VM and perform checks upon leave of the VM.
+
+
+ class InterfaceSupport: AllStatic {
+@@ -433,7 +433,7 @@
+
+ // LEAF routines do not lock, GC or throw exceptions
+
+-#define __LEAF(result_type, header) \
++#define VM_LEAF_BASE(result_type, header) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ /* begin of body */
+@@ -441,7 +441,7 @@
+
+ // ENTRY routines may lock, GC and throw exceptions
+
+-#define __ENTRY(result_type, header, thread) \
++#define VM_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ HandleMarkCleaner __hm(thread); \
+ Thread* THREAD = thread; \
+@@ -450,7 +450,7 @@
+
+ // QUICK_ENTRY routines behave like ENTRY but without a handle mark
+
+-#define __QUICK_ENTRY(result_type, header, thread) \
++#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ Thread* THREAD = thread; \
+@@ -463,20 +463,20 @@
+ #define IRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define IRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(No_Safepoint_Verifier __nspv(true);)
+
+
+ #define IRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Another special case for nmethod_entry_point so the nmethod that the
+@@ -487,7 +487,7 @@
+ result_type header { \
+ nmethodLocker _nmlock(nm); \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+ #define IRT_END }
+
+@@ -497,20 +497,20 @@
+ #define JRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define JRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(JRT_Leaf_Verifier __jlv;)
+
+
+ #define JRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Same as JRT Entry but allows for return value after the safepoint
+@@ -543,11 +543,11 @@
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ // Ensure that the VMNativeEntryWrapper constructor, which can cause
+-// a GC, is called outside the NoHandleMark (set via __QUICK_ENTRY).
++// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE).
+ #define JNI_QUICK_ENTRY(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+@@ -555,7 +555,7 @@
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JNI_LEAF(result_type, header) \
+@@ -563,7 +563,7 @@
+ result_type JNICALL header { \
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ // Close the routine and the extern "C"
+@@ -579,7 +579,7 @@
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_ENTRY_NO_ENV(result_type, header) \
+@@ -588,7 +588,7 @@
+ JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_QUICK_ENTRY(result_type, header) \
+@@ -597,14 +597,14 @@
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_LEAF(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+ VM_Exit::block_if_vm_exited(); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ #define JVM_END } } \ No newline at end of file
diff --git a/staging/openjdk6/nonreparenting-wm.diff b/staging/openjdk6/nonreparenting-wm.diff
new file mode 100644
index 000000000..65fa66e89
--- /dev/null
+++ b/staging/openjdk6/nonreparenting-wm.diff
@@ -0,0 +1,60 @@
+diff --git a/jdk/src/solaris/classes/sun/awt/X11/XWM.java b/jdk/src/solaris/classes/sun/awt/X11/XWM.java
+index 68d1ff7..878327e 100644
+--- openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XWM.java
+@@ -99,7 +99,8 @@
+ METACITY_WM = 11,
+ COMPIZ_WM = 12,
+ LG3D_WM = 13,
+- MUTTER_WM = 14;
++ MUTTER_WM = 14,
++ OTHER_NONREPARENTING_WM = 15;
+ public String toString() {
+ switch (WMID) {
+ case NO_WM:
+@@ -564,7 +567,7 @@ class XWM implements MWMConstants, XUtilConstants {
+ }
+
+ static boolean isNonReparentingWM() {
+- return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM);
++ return (XWM.getWMID() == XWM.COMPIZ_WM || XWM.getWMID() == XWM.LG3D_WM || XWM.getWMID() == XWM.OTHER_NONREPARENTING_WM);
+ }
+
+ /*
+@@ -764,9 +767,17 @@ class XWM implements MWMConstants, XUtilConstants {
+ * supports WIN or _NET wm spec.
+ */
+ else if (l_net_protocol.active()) {
+- awt_wmgr = XWM.OTHER_WM;
++ if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
++ } else {
++ awt_wmgr = XWM.OTHER_WM;
++ }
+ } else if (win.active()) {
+- awt_wmgr = XWM.OTHER_WM;
++ if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
++ } else {
++ awt_wmgr = XWM.OTHER_WM;
++ }
+ }
+ /*
+ * Check for legacy WMs.
+@@ -777,6 +788,8 @@ class XWM implements MWMConstants, XUtilConstants {
+ awt_wmgr = XWM.MOTIF_WM;
+ } else if (isOpenLook()) {
+ awt_wmgr = XWM.OPENLOOK_WM;
++ } else if (XToolkit.getEnv("_JAVA_AWT_WM_NONREPARENTING") != null) {
++ awt_wmgr = XWM.OTHER_NONREPARENTING_WM;
+ } else {
+ awt_wmgr = XWM.OTHER_WM;
+ }
+@@ -1298,6 +1311,7 @@ class XWM implements MWMConstants, XUtilConstants {
+ res = new Insets(28, 6, 6, 6);
+ break;
+ case NO_WM:
++ case OTHER_NONREPARENTING_WM:
+ case LG3D_WM:
+ res = zeroInsets;
+ break;
diff --git a/staging/openjdk6/openjdk6.install b/staging/openjdk6/openjdk6.install
new file mode 100644
index 000000000..653c8fe2f
--- /dev/null
+++ b/staging/openjdk6/openjdk6.install
@@ -0,0 +1,24 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/sbin/init-jks-keystore
+ fi
+ echo "when you use a non-reparenting window manager"
+ echo "set _JAVA_AWT_WM_NONREPARENTING=1 in"
+ echo "/etc/profile.d/openjdk6.sh"
+# update-desktop-database -q
+}
+
+post_upgrade() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+ if [ ! -f /etc/ssl/certs/java/cacerts ]; then
+ /usr/sbin/init-jks-keystore
+ fi
+# update-desktop-database -q
+}
+
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+# update-desktop-database -q
+}
diff --git a/staging/openjdk6/openjdk6.profile b/staging/openjdk6/openjdk6.profile
new file mode 100644
index 000000000..9da4421ef
--- /dev/null
+++ b/staging/openjdk6/openjdk6.profile
@@ -0,0 +1,6 @@
+export J2SDKDIR=/usr/lib/jvm/java-6-openjdk
+export J2REDIR=$J2SDKDIR/jre
+export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+
+# enable this for non-reparenting window managers
+#export _JAVA_AWT_WM_NONREPARENTING=1
diff --git a/staging/openjdk6/openjdk6.profile.csh b/staging/openjdk6/openjdk6.profile.csh
new file mode 100644
index 000000000..3cb15fd49
--- /dev/null
+++ b/staging/openjdk6/openjdk6.profile.csh
@@ -0,0 +1,6 @@
+setenv J2SDKDIR "/usr/lib/jvm/java-6-openjdk"
+setenv J2REDIR "$J2SDKDIR/jre"
+setenv JAVA_HOME "/usr/lib/jvm/java-6-openjdk"
+
+# enable this for non-reparenting window managers
+#setenv _JAVA_AWT_WM_NONREPARENTING 1
diff --git a/staging/perl-tk/PKGBUILD b/staging/perl-tk/PKGBUILD
new file mode 100644
index 000000000..5e195a545
--- /dev/null
+++ b/staging/perl-tk/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 146993 2012-01-20 05:40:57Z eric $
+# Maintainer: François Charette <francois ατ archlinux δοτ org>
+# Contributor: Jason Chu <jchu@xentac.net>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+
+pkgname=perl-tk
+_cpanname=Tk
+pkgver=804.030
+pkgrel=2
+pkgdesc="A graphical user interface toolkit for Perl"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/${_cpanname}"
+license=('PerlArtistic' 'GPL' 'custom')
+depends=('libpng' 'libjpeg' 'tk' 'perl')
+options=('!emptydirs')
+replaces=('perltk')
+provides=('perltk')
+source=(http://www.cpan.org/authors/id/S/SR/SREZIC/${_cpanname}-${pkgver}.tar.gz)
+md5sums=('13275e85f99ee467a86d9598a437abff')
+
+build() {
+ cd "$srcdir/${_cpanname}-$pkgver"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+#check() {
+# cd "$srcdir/${_cpanname}-$pkgver"
+# make test
+#}
+
+package() {
+ cd "$srcdir/${_cpanname}-$pkgver"
+ make install DESTDIR="$pkgdir"
+
+ # license
+ install -D -m644 pTk/license.terms \
+ "${pkgdir}/usr/share/licenses/${pkgname}/tk.license"
+ install -D -m644 pTk/Tix.license \
+ "${pkgdir}/usr/share/licenses/${pkgname}/tix.license"
+}
diff --git a/staging/poppler/PKGBUILD b/staging/poppler/PKGBUILD
new file mode 100644
index 000000000..a34a01a83
--- /dev/null
+++ b/staging/poppler/PKGBUILD
@@ -0,0 +1,83 @@
+# $Id: PKGBUILD 147049 2012-01-21 04:25:49Z eric $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgbase=poppler
+pkgname=('poppler' 'poppler-glib' 'poppler-qt')
+pkgver=0.18.2
+pkgrel=2
+arch=(i686 x86_64)
+license=('GPL')
+makedepends=('libjpeg' 'gcc-libs' 'cairo' 'fontconfig' 'openjpeg' 'gtk2' 'qt' 'pkgconfig' 'lcms' 'gobject-introspection')
+options=('!libtool' '!emptydirs')
+url="http://poppler.freedesktop.org/"
+_testtag=0d2bfd4af4c76a3bac27ccaff793d9129df7b57a
+source=(http://poppler.freedesktop.org/${pkgbase}-${pkgver}.tar.gz
+ http://cgit.freedesktop.org/poppler/test/snapshot/test-${_testtag}.tar.bz2
+ git-fixes.patch)
+md5sums=('38616927823ef01937aab26872e957e4'
+ '9dc64c254a31e570507bdd4ad4ba629a'
+ 'af56b7b1b24a08f7498a0c7f5e862b93')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ sed -i -e '/AC_PATH_XTRA/d' configure.ac
+ patch -Np1 -i "${srcdir}/git-fixes.patch"
+
+ autoreconf -fi
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static \
+ --enable-cairo-output \
+ --enable-xpdf-headers \
+ --enable-libjpeg --enable-zlib \
+ --enable-poppler-qt4 \
+ --enable-poppler-glib
+ make
+}
+
+check() {
+ cd "${srcdir}"
+ ln -sf test-${_testtag} test
+ cd ${pkgbase}-${pkgver}
+ LANG=en_US.UTF8 make check
+}
+
+package_poppler() {
+ pkgdesc="PDF rendering library based on xpdf 3.0"
+ depends=('libjpeg' 'gcc-libs' 'cairo' 'fontconfig' 'openjpeg' 'lcms' 'poppler-data')
+ conflicts=("poppler-qt3<${pkgver}")
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ sed -e 's/^glib_subdir =.*/glib_subdir =/' \
+ -e 's/^qt4_subdir =.*/qt4_subdir =/' -i Makefile
+ make DESTDIR="${pkgdir}" install
+
+ rm -f "${pkgdir}"/usr/lib/pkgconfig/poppler-{glib,qt4}.pc
+}
+
+package_poppler-glib() {
+ pkgdesc="Poppler glib bindings"
+ depends=("poppler=${pkgver}" 'glib2')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/poppler"
+ make DESTDIR="${pkgdir}" install-libLTLIBRARIES
+ cd "${srcdir}/${pkgbase}-${pkgver}/glib"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
+ install -m644 ../poppler-glib.pc "${pkgdir}/usr/lib/pkgconfig/"
+ rm -f "${pkgdir}"/usr/lib/libpoppler.*
+ rm -f "${pkgdir}/usr/bin/poppler-glib-demo"
+}
+
+package_poppler-qt() {
+ pkgdesc="Poppler Qt bindings"
+ depends=("poppler=${pkgver}" 'qt')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/poppler"
+ make DESTDIR="${pkgdir}" install-libLTLIBRARIES
+ cd "${srcdir}/${pkgbase}-${pkgver}/qt4"
+ make DESTDIR="${pkgdir}" install
+ install -m755 -d "${pkgdir}/usr/lib/pkgconfig"
+ install -m644 ../poppler-qt4.pc "${pkgdir}/usr/lib/pkgconfig/"
+ rm -f "${pkgdir}"/usr/lib/libpoppler.*
+}
diff --git a/staging/poppler/git-fixes.patch b/staging/poppler/git-fixes.patch
new file mode 100644
index 000000000..24a66b84f
--- /dev/null
+++ b/staging/poppler/git-fixes.patch
@@ -0,0 +1,110 @@
+From 74f4299e8f9e2d204979479f6579dd784db678a4 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Sun, 04 Dec 2011 16:29:45 +0000
+Subject: Do not fail if we are trying to save a file with Encrypt but that we have not modified at all
+
+Fixes KDE bug #288045
+(cherry picked from commit 63c942a45227ef28fb94ef4765171d9812fffafa)
+---
+diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
+index 01d2759..2758206 100644
+--- a/poppler/PDFDoc.cc
++++ b/poppler/PDFDoc.cc
+@@ -707,35 +707,44 @@ int PDFDoc::saveAs(GooString *name, PDFWriteMode mode) {
+
+ int PDFDoc::saveAs(OutStream *outStr, PDFWriteMode mode) {
+
+- // we don't support files with Encrypt at the moment
++ // find if we have updated objects
++ GBool updated = gFalse;
++ for(int i=0; i<xref->getNumObjects(); i++) {
++ if (xref->getEntry(i)->updated) {
++ updated = gTrue;
++ break;
++ }
++ }
++
++ // we don't support rewriting files with Encrypt at the moment
+ Object obj;
+ xref->getTrailerDict()->getDict()->lookupNF("Encrypt", &obj);
+ if (!obj.isNull())
+ {
+ obj.free();
+- return errEncrypted;
++ if (!updated && mode == writeStandard) {
++ // simply copy the original file
++ saveWithoutChangesAs (outStr);
++ } else {
++ return errEncrypted;
++ }
+ }
+- obj.free();
++ else
++ {
++ obj.free();
+
+- if (mode == writeForceRewrite) {
+- saveCompleteRewrite(outStr);
+- } else if (mode == writeForceIncremental) {
+- saveIncrementalUpdate(outStr);
+- } else { // let poppler decide
+- // find if we have updated objects
+- GBool updated = gFalse;
+- for(int i=0; i<xref->getNumObjects(); i++) {
+- if (xref->getEntry(i)->updated) {
+- updated = gTrue;
+- break;
++ if (mode == writeForceRewrite) {
++ saveCompleteRewrite(outStr);
++ } else if (mode == writeForceIncremental) {
++ saveIncrementalUpdate(outStr);
++ } else { // let poppler decide
++ if(updated) {
++ saveIncrementalUpdate(outStr);
++ } else {
++ // simply copy the original file
++ saveWithoutChangesAs (outStr);
+ }
+ }
+- if(updated) {
+- saveIncrementalUpdate(outStr);
+- } else {
+- // simply copy the original file
+- saveWithoutChangesAs (outStr);
+- }
+ }
+
+ return errNone;
+--
+cgit v0.9.0.2-2-gbebe
+From 03544e2f602319f0b381f5f357e14cc2cc77d2c1 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Tue, 06 Dec 2011 22:21:15 +0000
+Subject: include strings.h as we use memcpy
+
+Fixes bug 43558
+(cherry picked from commit 388d72ac27ae98fe3a1ebd21760f2b0fa0249a9b)
+---
+diff --git a/goo/PNGWriter.cc b/goo/PNGWriter.cc
+index f88c3a7..1fb8cab 100644
+--- a/goo/PNGWriter.cc
++++ b/goo/PNGWriter.cc
+@@ -6,7 +6,7 @@
+ //
+ // Copyright (C) 2009 Warren Toomey <wkt@tuhs.org>
+ // Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
+-// Copyright (C) 2009 Albert Astals Cid <aacid@kde.org>
++// Copyright (C) 2009, 2011 Albert Astals Cid <aacid@kde.org>
+ // Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
+ // Copyright (C) 2010, 2011 Adrian Johnson <ajohnson@redneon.com>
+ // Copyright (C) 2011 Thomas Klausner <wiz@danbala.tuwien.ac.at>
+@@ -19,6 +19,7 @@
+
+ #include <zlib.h>
+ #include <stdlib.h>
++#include <string.h>
+
+ #include "poppler/Error.h"
+ #include "goo/gmem.h"
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/staging/qiv/PKGBUILD b/staging/qiv/PKGBUILD
new file mode 100644
index 000000000..520b5847e
--- /dev/null
+++ b/staging/qiv/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 147092 2012-01-21 19:18:31Z eric $
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+# Maintainer: Paul Mattal <paul@archlinux.org>
+
+pkgname=qiv
+pkgver=2.2.4
+pkgrel=2
+pkgdesc="Quick Image Viewer (qiv) is a very small and fast GDK/Imlib image viewer"
+arch=('i686' 'x86_64')
+url="http://spiegl.de/qiv/"
+license=('GPL2')
+depends=('file' 'gtk2' 'imlib2')
+source=(http://spiegl.de/qiv/download/$pkgname-$pkgver.tgz)
+md5sums=('1425f89c90f9c045858fccf24d894c97')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ install -D -m 0755 qiv "$pkgdir/usr/bin/qiv"
+ install -D -m 0644 qiv.1 "$pkgdir/usr/share/man/man1/qiv.1"
+}
diff --git a/staging/streamtuner/PKGBUILD b/staging/streamtuner/PKGBUILD
new file mode 100644
index 000000000..d25ae0451
--- /dev/null
+++ b/staging/streamtuner/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 147014 2012-01-20 18:50:13Z andyrtr $
+# Contributor: Greg Grabinski <greg@grabinski.ch>
+# Maintainer: ndreas Radke <andyrtr@archlinux.org>
+
+pkgname=streamtuner
+pkgver=0.99.99
+pkgrel=12
+pkgdesc="A stream directory browser"
+arch=('i686' 'x86_64')
+url="http://www.nongnu.org/streamtuner/"
+license=('custom')
+depends=('taglib' 'libxml2' 'gtk2' 'curl>=7.16.2' 'pygtk>=2.13.0-2')
+conflicts=('streamtuner-live365')
+replaces=('streamtuner-live365')
+source=(http://savannah.nongnu.org/download/streamtuner/$pkgname-$pkgver.tar.gz \
+ http://savannah.nongnu.org/download/streamtuner/streamtuner-0.99.99-live365.diff \
+ http://savannah.nongnu.org/download/streamtuner/streamtuner-0.99.99-pygtk-2.6.diff
+ streamtuner-0.99.99-shoutcast.diff
+ shoutcast-redesign-patch.diff)
+options=('!libtool' '!emptydirs')
+md5sums=('2027b7c34e85b594524b0b4351c14362'
+ '8aa1994a849b05d2b8fffbda702b8a25'
+ '7aff45a41c60358cb2332c7ce644f661'
+ '1eab6edce130e1a1e5f208cd3ed6766a'
+ '8a3a17a1719a79353d6ad7ac8564947b')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p0 -i ${srcdir}/streamtuner-0.99.99-live365.diff
+ patch -p0 -i ${srcdir}/streamtuner-0.99.99-pygtk-2.6.diff
+ # fix http://bugs.archlinux.org/task/10308
+ patch -p0 -i ${srcdir}/streamtuner-0.99.99-shoutcast.diff
+ # fix http://bugs.archlinux.org/task/11463
+ patch -p1 -i ${srcdir}/shoutcast-redesign-patch.diff
+
+ # python2 fixes
+ sed -i "s:^for ac_prog in python:for ac_prog in python2:" ${srcdir}/${pkgname}-${pkgver}/configure
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make prefix=${pkgdir}/usr install
+
+ #Add license file
+ install -Dm0644 ${srcdir}/${pkgname}-${pkgver}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/staging/streamtuner/shoutcast-redesign-patch.diff b/staging/streamtuner/shoutcast-redesign-patch.diff
new file mode 100644
index 000000000..644e2273e
--- /dev/null
+++ b/staging/streamtuner/shoutcast-redesign-patch.diff
@@ -0,0 +1,12 @@
+diff -uar streamtuner-0.99.99-orig/src/plugins/shoutcast/shoutcast.c streamtuner-0.99.99-patched/src/plugins/shoutcast/shoutcast.c
+--- streamtuner-0.99.99-orig/src/plugins/shoutcast/shoutcast.c 2008-09-12 18:04:00.229785732 -0400
++++ streamtuner-0.99.99-patched/src/plugins/shoutcast/shoutcast.c 2008-09-12 18:05:56.716440720 -0400
+@@ -37,7 +37,7 @@
+
+ /*** cpp *********************************************************************/
+
+-#define SHOUTCAST_ROOT "http://www.shoutcast.com/"
++#define SHOUTCAST_ROOT "http://classic.shoutcast.com/"
+
+ #define MAX_STREAMS_PER_PAGE 100 /* enforced by SHOUTcast */
+
diff --git a/staging/streamtuner/streamtuner-0.99.99-shoutcast.diff b/staging/streamtuner/streamtuner-0.99.99-shoutcast.diff
new file mode 100644
index 000000000..e7fcbca94
--- /dev/null
+++ b/staging/streamtuner/streamtuner-0.99.99-shoutcast.diff
@@ -0,0 +1,41 @@
+--- src/plugins/shoutcast/shoutcast.c.orig 2004-12-19 15:21:00.000000000 +0000
++++ src/plugins/shoutcast/shoutcast.c 2008-03-16 10:39:24.000000000 +0000
+@@ -94,6 +94,8 @@
+
+ GNode *parent_node;
+ SHOUTcastStream *stream;
++
++ int parse_genres;
+ } ReloadInfo;
+
+ /*** variable declarations ***************************************************/
+@@ -518,6 +520,7 @@
+ info.npages = 0;
+ info.parent_node = NULL;
+ info.stream = NULL;
++ info.parse_genres = 0;
+
+ status = st_transfer_session_get_by_line(session,
+ url,
+@@ -565,10 +568,16 @@
+ info->stream = stream_new_cb(NULL);
+ info->stream->url_postfix = st_sgml_ref_expand_len(s1, s2 - s1);
+ }
+- else if (info->page < 2
+- && (((s1 = st_str_has_prefix_span(line, "\t<OPTION VALUE=\""))
+- || (s1 = st_str_has_prefix_span(line, "\t\t<OPTION VALUE=\"")))
+- && (s2 = strstr(s1, "\">"))))
++ else if (info->page < 2 && (s1 = st_strstr_span(line, "<OPTION VALUE=\"TopTen\">")))
++ {
++ info->parse_genres = 1;
++ }
++ else if (info->page < 2 && info->parse_genres == 1 && (s1 = st_strstr_span(line, "</SELECT>")))
++ {
++ info->parse_genres = 0;
++ }
++ else if (info->page < 2 && info->parse_genres == 1
++ && ((s1 = st_strstr_span(line, "<OPTION VALUE=\"")) && (s2 = strstr(s1, "\">"))))
+ {
+ STCategory *category;
+ GNode *node;
+
diff --git a/staging/transcode/PKGBUILD b/staging/transcode/PKGBUILD
new file mode 100644
index 000000000..82e0d15fc
--- /dev/null
+++ b/staging/transcode/PKGBUILD
@@ -0,0 +1,57 @@
+# $Id: PKGBUILD 147020 2012-01-20 20:01:07Z giovanni $
+# Maintainer:
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+# Contributor: roberto <roberto@archlinux.org>
+
+pkgname=transcode
+_sripver=0.3-4
+pkgver=1.1.7
+pkgrel=2
+pkgdesc="A video/DVD ripper and encoder for the terminal/console"
+arch=('i686' 'x86_64')
+url="http://tcforge.berlios.de/"
+license=('GPL')
+depends=('gawk' 'imagemagick' 'lzo2' 'libdvdread' 'ffmpeg' 'mjpegtools'
+ 'libmpeg2' 'libxaw' 'libxml2' 'libxv' 'a52dec')
+makedepends=('nasm')
+options=('!libtool')
+source=(https://bitbucket.org/france/transcode-tcforge/downloads/${pkgname}-${pkgver}.tar.bz2
+ http://downloads.sourceforge.net/sourceforge/subtitleripper/subtitleripper-${_sripver}.tgz
+ subtitleripper-0.3.4-linkingorder.patch subtitleripper-0.3.4-respect-ldflags.patch)
+sha1sums=('e35df68b960eb56ef0a59a4cdbed1491be56aee6'
+ 'd93ff3578dd5f722c8f4ef16bc0903eec5781a0d'
+ 'fa05aa1770d9350d90b7cf315aa7c4a1fd921ac7'
+ '591943a33235342a66c3df0625a164a1479c09ae')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr \
+ --disable-sse --disable-sse2 --disable-altivec --enable-mmx \
+ --enable-lame --enable-ogg --enable-vorbis --enable-theora \
+ --enable-libdv --enable-libxml2 --enable-v4l \
+ --enable-imagemagick --enable-libjpeg --enable-lzo --enable-mjpegtools \
+ --enable-sdl --enable-freetype2 --enable-a52 --enable-libpostproc \
+ --enable-xvid --enable-x264 --enable-alsa --enable-libmpeg2 --enable-libmpeg2convert
+ make
+
+ cd "${srcdir}/subtitleripper"
+ patch -p1 -i "${srcdir}/subtitleripper-0.3.4-linkingorder.patch"
+ patch -p1 -i "${srcdir}/subtitleripper-0.3.4-respect-ldflags.patch"
+ sed -e 's|^\(.*lppm.*\)$|#\1|' \
+ -e 's|^\(.*D_HAVE_LIB_PPM.*\)$|#\1|' \
+ -e 's/DEFINES :=/DEFINES = -DHAVE_GETLINE/' \
+ -i Makefile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ cd "${srcdir}/subtitleripper"
+ install -m 755 pgm2txt "${pkgdir}/usr/bin/"
+ install -m 755 srttool "${pkgdir}/usr/bin/"
+ install -m 755 subtitle2pgm "${pkgdir}/usr/bin/"
+ install -m 755 subtitle2vobsub "${pkgdir}/usr/bin/"
+ install -m 755 vobsub2pgm "${pkgdir}/usr/bin/"
+}
diff --git a/staging/transcode/subtitleripper-0.3.4-linkingorder.patch b/staging/transcode/subtitleripper-0.3.4-linkingorder.patch
new file mode 100644
index 000000000..7efe22346
--- /dev/null
+++ b/staging/transcode/subtitleripper-0.3.4-linkingorder.patch
@@ -0,0 +1,28 @@
+Index: subtitleripper/Makefile
+===================================================================
+--- subtitleripper.orig/Makefile
++++ subtitleripper/Makefile
+@@ -70,19 +70,19 @@ vobsub2pgm.o: vobsub2pgm.c vobsub.h spud
+ # Target
+ subtitle2pgm: subtitle2pgm.o spudec.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) $^ -o $@
++ @$(CC) $^ -o $@ $(LIBS)
+
+ subtitle2vobsub: subtitle2vobsub.o vobsub.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) $^ -o $@
++ @$(CC) $^ -o $@ $(LIBS)
+
+ srttool: srttool.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) -g $^ -o $@
++ @$(CC) -g $^ -o $@ $(LIBS)
+
+ vobsub2pgm: vobsub2pgm.o vobsub.o spudec.o
+ @echo "Linking $@"
+- @$(CC) $(LIBS) -g $^ -o $@
++ @$(CC) -g $^ -o $@ $(LIBS)
+
+ .PHONY: clean dist rpm
+ clean:
diff --git a/staging/transcode/subtitleripper-0.3.4-respect-ldflags.patch b/staging/transcode/subtitleripper-0.3.4-respect-ldflags.patch
new file mode 100644
index 000000000..2af11d257
--- /dev/null
+++ b/staging/transcode/subtitleripper-0.3.4-respect-ldflags.patch
@@ -0,0 +1,28 @@
+Index: subtitleripper/Makefile
+===================================================================
+--- subtitleripper.orig/Makefile
++++ subtitleripper/Makefile
+@@ -70,19 +70,19 @@ vobsub2pgm.o: vobsub2pgm.c vobsub.h spud
+ # Target
+ subtitle2pgm: subtitle2pgm.o spudec.o
+ @echo "Linking $@"
+- @$(CC) $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ subtitle2vobsub: subtitle2vobsub.o vobsub.o
+ @echo "Linking $@"
+- @$(CC) $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ srttool: srttool.o
+ @echo "Linking $@"
+- @$(CC) -g $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ vobsub2pgm: vobsub2pgm.o vobsub.o spudec.o
+ @echo "Linking $@"
+- @$(CC) -g $^ -o $@ $(LIBS)
++ @$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
+
+ .PHONY: clean dist rpm
+ clean:
diff --git a/staging/tuxpuck/PKGBUILD b/staging/tuxpuck/PKGBUILD
new file mode 100644
index 000000000..19f50020a
--- /dev/null
+++ b/staging/tuxpuck/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 147018 2012-01-20 19:49:39Z giovanni $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+
+pkgname=tuxpuck
+pkgver=0.8.2
+pkgrel=5
+pkgdesc="Airhockey with tux"
+arch=('i686' 'x86_64')
+url="http://home.no.net/munsuun/tuxpuck/"
+license=('GPL2')
+depends=('libjpeg' 'sdl' 'libpng' 'libvorbis')
+makedepends=('freetype2')
+options=('!makeflags')
+source=("http://ftp.de.debian.org/debian/pool/main/t/${pkgname}/${pkgname}_$pkgver.orig.tar.gz"
+ 'tuxpuck-0.8.2-ldflags.patch'
+ 'tuxpuck-0.8.2-libpng15.patch')
+md5sums=('fc839abc2b1f3eafae397e1ed6487079'
+ 'cb914d211bf3f519b7700fda180612b0'
+ 'a4da530d670a0c30ac0840aab1db0dca')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ sed -i 's|usr/man|usr/share/man|' Makefile
+ sed -i -e 's/-Werror//' \
+ -e '/^CC/d' \
+ Makefile \
+ utils/Makefile \
+ data/Makefile
+
+ patch -Np0 -i "${srcdir}/tuxpuck-0.8.2-ldflags.patch"
+ patch -Np0 -i "${srcdir}/tuxpuck-0.8.2-libpng15.patch"
+
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ make DESTDIR=$pkgdir install
+}
diff --git a/staging/tuxpuck/tuxpuck-0.8.2-ldflags.patch b/staging/tuxpuck/tuxpuck-0.8.2-ldflags.patch
new file mode 100644
index 000000000..28fcef48a
--- /dev/null
+++ b/staging/tuxpuck/tuxpuck-0.8.2-ldflags.patch
@@ -0,0 +1,11 @@
+--- Makefile.old 2010-10-05 10:34:57.000000000 +0200
++++ Makefile 2010-10-05 10:35:28.000000000 +0200
+@@ -20,7 +20,7 @@
+
+ $(NAME) : $(OBJS)
+ cd data; $(MAKE)
+- $(CC) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
++ $(CC) $(LDFLAGS) $(CFLAGS) $(OBJS) data/libdata.a `sdl-config --libs` -lm -lpng \
+ -ljpeg -lz -lvorbisfile -lvorbis -logg -o $(NAME)
+
+ w32icon.o : data/icons/tuxpuck.ico
diff --git a/staging/tuxpuck/tuxpuck-0.8.2-libpng15.patch b/staging/tuxpuck/tuxpuck-0.8.2-libpng15.patch
new file mode 100644
index 000000000..ca9539f39
--- /dev/null
+++ b/staging/tuxpuck/tuxpuck-0.8.2-libpng15.patch
@@ -0,0 +1,63 @@
+--- png.c.old 2011-09-14 16:25:54.415338149 +0200
++++ png.c 2011-09-14 17:41:02.190803110 +0200
+@@ -38,6 +38,8 @@
+ png_color_16 *transv;
+ SDL_RWops *src = NULL;
+ Uint32 size;
++ int num_palette;
++ png_colorp png_palette;
+
+ memcpy(&size, data, sizeof(Uint32));
+ if (memcounter)
+@@ -74,7 +76,7 @@
+ * the normal method of doing things with libpng). REQUIRED unless you
+ * set up your own error handlers in png_create_read_struct() earlier.
+ */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ SDL_SetError("Error reading the PNG file.");
+ goto done;
+ }
+@@ -142,9 +144,9 @@
+ Rmask = 0x000000FF;
+ Gmask = 0x0000FF00;
+ Bmask = 0x00FF0000;
+- Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
++ Amask = (png_get_channels(png_ptr, info_ptr) == 4) ? 0xFF000000 : 0;
+ } else {
+- int s = (info_ptr->channels == 4) ? 0 : 8;
++ int s = (png_get_channels(png_ptr, info_ptr) == 4) ? 0 : 8;
+ Rmask = 0xFF000000 >> s;
+ Gmask = 0x00FF0000 >> s;
+ Bmask = 0x0000FF00 >> s;
+@@ -152,7 +154,7 @@
+ }
+ }
+ surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
+- bit_depth * info_ptr->channels, Rmask, Gmask,
++ bit_depth * png_get_channels(png_ptr, info_ptr), Rmask, Gmask,
+ Bmask, Amask);
+ if (surface == NULL) {
+ SDL_SetError("Out of memory");
+@@ -197,12 +199,15 @@
+ palette->colors[i].g = i;
+ palette->colors[i].b = i;
+ }
+- } else if (info_ptr->num_palette > 0) {
+- palette->ncolors = info_ptr->num_palette;
+- for (i = 0; i < info_ptr->num_palette; ++i) {
+- palette->colors[i].b = info_ptr->palette[i].blue;
+- palette->colors[i].g = info_ptr->palette[i].green;
+- palette->colors[i].r = info_ptr->palette[i].red;
++ } else {
++ png_get_PLTE(png_ptr, info_ptr, &png_palette, &num_palette);
++ if (num_palette > 0) {
++ palette->ncolors = num_palette;
++ for (i = 0; i < num_palette; ++i) {
++ palette->colors[i].b = png_palette[i].blue;
++ palette->colors[i].g = png_palette[i].green;
++ palette->colors[i].r = png_palette[i].red;
++ }
+ }
+ }
+ }
diff --git a/staging/vigra/PKGBUILD b/staging/vigra/PKGBUILD
new file mode 100644
index 000000000..ebc7f60a6
--- /dev/null
+++ b/staging/vigra/PKGBUILD
@@ -0,0 +1,69 @@
+# $Id: PKGBUILD 147002 2012-01-20 14:21:18Z andyrtr $
+# Maintainer: AndyRTR <andyrtr@archlinux.org>
+# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+
+pkgbase=vigra
+pkgname=('vigra' 'vigra-doc')
+pkgver=1.8.0
+pkgrel=3
+arch=('i686' 'x86_64')
+url="http://hci.iwr.uni-heidelberg.de/vigra/"
+license=('custom:MIT')
+makedepends=(# runtime deps
+ 'libpng>=1.5.7' 'libtiff>=4.0.0' 'gcc-libs' 'sh' 'hdf5>=1.8.7' 'fftw'
+ # additional makedeps
+ 'cmake' 'python-nose' 'doxygen' 'python-sphinx' 'boost' 'python-numpy')
+options=('!libtool')
+source=(http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/${pkgname}-${pkgver}-src.tar.gz
+ vigra-1.7.1.gcc460.patch)
+md5sums=('15c5544448e529ee60020758ab6be264'
+ '25ef8bc26bc38ee67e5b512d2acd0166')
+sha1sums=('09f1d506c2748ebeb7d9f1c77ce387f9e7b837d2'
+ '1de6381a74dd136ea25df5a27f249187b0dbd17e')
+
+build() {
+ cd "${srcdir}"/${pkgbase}-${pkgver}
+ patch -Np1 -i ${srcdir}/vigra-1.7.1.gcc460.patch
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DWITH_VIGRANUMPY=1 \
+ -DDOCINSTALL=share/doc
+ make
+}
+
+check() {
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make -k check || /bin/true # i686 fails
+}
+
+package_vigra() {
+ pkgdesc="Computer vision library"
+ depends=('libpng>=1.5.7' 'libtiff>=4.0.0' 'gcc-libs' 'sh' 'hdf5>=1.8.7' 'fftw')
+ optdepends=('python2: for python bindings'
+ 'boost-libs: for python bindings')
+
+ cd "${srcdir}"/${pkgbase}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+ # license
+ install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+ # remove doc
+ rm -rf "${pkgdir}"/usr/share/doc
+
+ #fix shebang for python2
+ sed -i 's|python$|python2|' "$pkgdir"/usr/bin/vigra-config
+}
+
+package_vigra-doc() {
+ pkgdesc="Computer vision library - documentation and examples"
+ #depends=('vigra')
+ #arch=('any')
+
+ cd "${srcdir}"/${pkgbase}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+ # cleanup
+ rm -rf "${pkgdir}"/usr/{bin,include,lib}
+
+ # license
+ install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
diff --git a/staging/vigra/vigra-1.7.1.gcc460.patch b/staging/vigra/vigra-1.7.1.gcc460.patch
new file mode 100644
index 000000000..46f194dbc
--- /dev/null
+++ b/staging/vigra/vigra-1.7.1.gcc460.patch
@@ -0,0 +1,33 @@
+diff -baur vigra-1.7.1.old/include/vigra/random_forest.hxx vigra-1.7.1/include/vigra/random_forest.hxx
+--- vigra-1.7.1.old/include/vigra/random_forest.hxx 2010-12-03 17:40:34.000000000 +0000
++++ vigra-1.7.1/include/vigra/random_forest.hxx 2011-01-28 00:16:32.000000000 +0000
+@@ -43,6 +43,7 @@
+ #include <set>
+ #include <list>
+ #include <numeric>
++#include <stddef.h>
+ #include "mathutil.hxx"
+ #include "array_vector.hxx"
+ #include "sized_int.hxx"
+diff -baur vigra-1.7.1.old/include/vigra/sifImport.hxx vigra-1.7.1/include/vigra/sifImport.hxx
+--- vigra-1.7.1.old/include/vigra/sifImport.hxx 2010-12-03 17:40:34.000000000 +0000
++++ vigra-1.7.1/include/vigra/sifImport.hxx 2011-01-28 00:23:31.000000000 +0000
+@@ -57,6 +57,7 @@
+ #include <fstream>
+ #include <cstring>
+ #include <vector>
++#include <stddef.h>
+ #include "vigra/multi_array.hxx"
+
+ namespace vigra {
+diff -baur vigra-1.7.1.old/include/vigra/multi_iterator.hxx vigra-1.7.1/include/vigra/multi_iterator.hxx
+--- vigra-1.7.1.old/include/vigra/multi_iterator.hxx 2010-12-03 17:40:34.000000000 +0000
++++ vigra-1.7.1/include/vigra/multi_iterator.hxx 2011-01-28 00:23:31.000000000 +0000
+@@ -41,6 +41,7 @@
+ #define VIGRA_MULTI_ITERATOR_HXX
+
+ #include <sys/types.h>
++#include <stddef.h>
+ #include "tinyvector.hxx"
+ #include "iteratortags.hxx"
+
diff --git a/testing/freeglut/PKGBUILD b/testing/freeglut/PKGBUILD
new file mode 100644
index 000000000..b817a6a43
--- /dev/null
+++ b/testing/freeglut/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 147022 2012-01-20 20:50:51Z heftig $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
+
+pkgname=freeglut
+pkgver=2.8.0
+pkgrel=1
+pkgdesc="Provides functionality for small OpenGL programs"
+arch=('i686' 'x86_64')
+url="http://freeglut.sourceforge.net/"
+license=('MIT')
+depends=('libxxf86vm' 'mesa' 'libxi')
+replaces=('glut')
+provides=('glut')
+conflicts=('glut')
+options=('!libtool')
+source=(http://downloads.sourceforge.net/freeglut/${pkgname}-${pkgver}.tar.gz)
+md5sums=('5db8651af306bc403fbfd36934a20e1d')
+sha1sums=('4debbe559c6c9841ce1abaddc9d461d17c6083b1')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --disable-static
+ make all
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/iproute2/PKGBUILD b/testing/iproute2/PKGBUILD
index 56c035bbc..1295549c3 100644
--- a/testing/iproute2/PKGBUILD
+++ b/testing/iproute2/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 146339 2012-01-09 18:52:29Z stephane $
+# $Id: PKGBUILD 147098 2012-01-21 22:46:26Z ibiru $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=iproute2
pkgver=3.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="IP Routing Utilities"
arch=('i686' 'x86_64')
license=('GPL2')
@@ -19,10 +19,11 @@ options=('!makeflags')
backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_protos' \
'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables')
source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz
- iproute2-fhs.patch)
+ iproute2-fhs.patch
+ fix-ip-l.patch)
sha1sums=('1e217f22b0bbfc870ddf746de883ee375cd9e533'
- '2416b11252364d7a6c742eabb4a6924a75637a46')
-
+ '2416b11252364d7a6c742eabb4a6924a75637a46'
+ '2ec5513c44f89046438d65e2cda1a014010e3b73')
build() {
cd $srcdir/$pkgname-$pkgver
@@ -30,6 +31,9 @@ build() {
# set correct fhs structure
patch -Np1 -i "$srcdir/iproute2-fhs.patch"
+ #upstream fixes
+ patch -Np1 -i "$srcdir/fix-ip-l.patch"
+
./configure
make
diff --git a/testing/iproute2/fix-ip-l.patch b/testing/iproute2/fix-ip-l.patch
new file mode 100644
index 000000000..7f1749cbb
--- /dev/null
+++ b/testing/iproute2/fix-ip-l.patch
@@ -0,0 +1,27 @@
+From 5aa08f6bf4107f8aec43c0678466a314dbd0d054 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <shemminger@vyatta.com>
+Date: Fri, 20 Jan 2012 08:16:02 -0800
+Subject: [PATCH] ip: make 'ip l' be 'ip link'
+
+Restore compatiablity for those lazy typists.
+---
+ ip/ip.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/ip/ip.c b/ip/ip.c
+index 7b4bacb..20dc3b5 100644
+--- a/ip/ip.c
++++ b/ip/ip.c
+@@ -72,8 +72,8 @@ static const struct cmd {
+ { "neighbour", do_ipneigh },
+ { "ntable", do_ipntable },
+ { "ntbl", do_ipntable },
+- { "l2tp", do_ipl2tp },
+ { "link", do_iplink },
++ { "l2tp", do_ipl2tp },
+ { "tunnel", do_iptunnel },
+ { "tunl", do_iptunnel },
+ { "tuntap", do_iptuntap },
+--
+1.7.6.5
+
diff --git a/testing/mdadm/PKGBUILD b/testing/mdadm/PKGBUILD
new file mode 100644
index 000000000..cc524eb63
--- /dev/null
+++ b/testing/mdadm/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 147000 2012-01-20 13:40:09Z tpowa $
+# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
+# Contributor: Judd Vinet <jvinet@zeroflux.org>
+pkgname=mdadm
+pkgver=3.2.3
+pkgrel=1
+pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID"
+arch=(i686 x86_64)
+license=('GPL')
+url="http://neil.brown.name/blog/mdadm"
+groups=('base')
+conflicts=('mkinitcpio<0.7')
+depends=('glibc')
+backup=('etc/mdadm.conf')
+source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2
+ mdadm
+ mdadm.conf
+ mdadm_install
+ mdadm_hook
+ mdadm_udev_install
+ disable-werror.patch)
+
+install=mdadm.install
+replaces=('raidtools')
+md5sums=('d789d6ecb9c1d5ebcc64f0fc52bca92f'
+ '6df172c8f77b280018cf87eb3d313f29'
+ '00cbed931db4f15b6ce49e3e7d433966'
+ '9b01e96b6c3c218fb61628c9281fe688'
+ 'c8c0713f5c7da51822ee6f3911473a1c'
+ 'cd258e1bf430c02a25f40b4329df9f57'
+ '4ad87b74a4bc9a34621280abe0e0c3e4')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ patch -Np0 -i ../disable-werror.patch
+ make CXFLAGS="$CFLAGS"
+ # build static mdassemble for Arch's initramfs
+ make MDASSEMBLE_AUTO=1 mdassemble
+
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make INSTALL=/bin/install DESTDIR=$pkgdir install
+ install -D -m755 mdassemble $pkgdir/sbin/mdassemble
+ install -D -m644 ../mdadm.conf $pkgdir/etc/mdadm.conf
+ install -D -m755 ../mdadm $pkgdir/etc/rc.d/mdadm
+ install -D -m644 ../mdadm_install $pkgdir/lib/initcpio/install/mdadm
+ install -D -m644 ../mdadm_hook $pkgdir/lib/initcpio/hooks/mdadm
+ install -D -m644 ../mdadm_udev_install $pkgdir/lib/initcpio/install/mdadm_udev
+ # symlink for backward compatibility
+ ln -sf /lib/initcpio/hooks/mdadm $pkgdir/lib/initcpio/hooks/raid
+}
diff --git a/testing/mdadm/disable-werror.patch b/testing/mdadm/disable-werror.patch
new file mode 100644
index 000000000..50a33f19d
--- /dev/null
+++ b/testing/mdadm/disable-werror.patch
@@ -0,0 +1,11 @@
+--- Makefile.old 2011-06-17 09:38:03.269238332 +0200
++++ Makefile 2011-06-17 09:38:14.122398837 +0200
+@@ -42,7 +42,7 @@
+
+ CC = $(CROSS_COMPILE)gcc
+ CXFLAGS = -ggdb
+-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
++CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O
+ endif
diff --git a/testing/mdadm/linux-3.0.patch b/testing/mdadm/linux-3.0.patch
new file mode 100644
index 000000000..cd9d5473c
--- /dev/null
+++ b/testing/mdadm/linux-3.0.patch
@@ -0,0 +1,45 @@
+From f161d047eed634b3380262767f955eb888502e88 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Fri, 17 Jun 2011 22:49:24 +1000
+Subject: [PATCH 1/1] util: correctly parse shorter linux version numbers.
+
+The next version of Linux might be 3.0. If it is, get_linux_version
+will fail.
+So make it more robust.
+
+Reported-by: Namhyung Kim <namhyung@gmail.com>
+Reported-by: Milan Broz <mbroz@redhat.com>
+Signed-off-by: NeilBrown <neilb@suse.de>
+---
+ util.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/util.c b/util.c
+index 10bbe56..55d171a 100644
+--- a/util.c
++++ b/util.c
+@@ -146,16 +146,16 @@ int get_linux_version()
+ {
+ struct utsname name;
+ char *cp;
+- int a,b,c;
++ int a = 0, b = 0,c = 0;
+ if (uname(&name) <0)
+ return -1;
+
+ cp = name.release;
+ a = strtoul(cp, &cp, 10);
+- if (*cp != '.') return -1;
+- b = strtoul(cp+1, &cp, 10);
+- if (*cp != '.') return -1;
+- c = strtoul(cp+1, NULL, 10);
++ if (*cp == '.')
++ b = strtoul(cp+1, &cp, 10);
++ if (*cp == '.')
++ c = strtoul(cp+1, &cp, 10);
+
+ return (a*1000000)+(b*1000)+c;
+ }
+--
+1.7.2.3
+
diff --git a/testing/mdadm/mdadm b/testing/mdadm/mdadm
new file mode 100755
index 000000000..e196f3642
--- /dev/null
+++ b/testing/mdadm/mdadm
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /sbin/mdadm`
+case "$1" in
+ start)
+ stat_busy "Starting mdadm RAID Monitor"
+ if [ -z "$PID" ]; then
+ /sbin/mdadm --monitor --scan -i /var/run/mdadm.pid -f
+ fi
+ if [ ! -z "$PID" -o $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon mdadm
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping mdadm RAID Monitor"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mdadm
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
diff --git a/testing/mdadm/mdadm.conf b/testing/mdadm/mdadm.conf
new file mode 100644
index 000000000..57bd4c683
--- /dev/null
+++ b/testing/mdadm/mdadm.conf
@@ -0,0 +1,67 @@
+# mdadm configuration file
+#
+# mdadm will function properly without the use of a configuration file,
+# but this file is useful for keeping track of arrays and member disks.
+# In general, a mdadm.conf file is created, and updated, after arrays
+# are created. This is the opposite behavior of /etc/raidtab which is
+# created prior to array construction.
+#
+#
+# the config file takes two types of lines:
+#
+# DEVICE lines specify a list of devices of where to look for
+# potential member disks
+#
+# ARRAY lines specify information about how to identify arrays so
+# so that they can be activated
+#
+
+
+# You can have more than one device line and use wild cards. The first
+# example includes SCSI the first partition of SCSI disks /dev/sdb,
+# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
+# line looks for array slices on IDE disks.
+#
+#DEVICE /dev/sd[bcdjkl]1
+#DEVICE /dev/hda1 /dev/hdb1
+#
+# The designation "partitions" will scan all partitions found in
+# /proc/partitions
+DEVICE partitions
+
+
+# ARRAY lines specify an array to assemble and a method of identification.
+# Arrays can currently be identified by using a UUID, superblock minor number,
+# or a listing of devices.
+#
+# super-minor is usually the minor number of the metadevice
+# UUID is the Universally Unique Identifier for the array
+# Each can be obtained using
+#
+# mdadm -D <md>
+#
+# To capture the UUIDs for all your RAID arrays to this file, run these:
+# to get a list of running arrays:
+# # mdadm -D --scan >>/etc/mdadm.conf
+# to get a list from superblocks:
+# # mdadm -E --scan >>/etc/mdadm.conf
+#
+#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
+#ARRAY /dev/md1 super-minor=1
+#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
+#
+# ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor
+# will then move a spare between arrays in a spare-group if one array has a
+# failed drive but no spare
+#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
+#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
+#
+
+
+# When used in --follow (aka --monitor) mode, mdadm needs a
+# mail address and/or a program. To start mdadm's monitor mode, add
+# "mdadm" to your DAEMONS array in /etc/rc.conf
+#
+# If the lines are not found, mdadm will exit quietly
+#MAILADDR root@mydomain.tld
+#PROGRAM /usr/sbin/handle-mdadm-events
diff --git a/testing/mdadm/mdadm.install b/testing/mdadm/mdadm.install
new file mode 100644
index 000000000..e8404c260
--- /dev/null
+++ b/testing/mdadm/mdadm.install
@@ -0,0 +1,10 @@
+# arg 1: the new package version
+# arg 2: the old package version
+
+post_upgrade() {
+ if [ "$(vercmp $2 2.6.8-2)" -lt 0 -a "$(grep raid_partitions /etc/mkinitcpio.conf)" ]; then
+ echo "Attention mdadm update:"
+ echo "raid_partitions hook has been replaced by the more powerfull mdadm hook."
+ echo "Please update your /etc/mkinitcpio.conf accordingly."
+ fi
+}
diff --git a/testing/mdadm/mdadm_hook b/testing/mdadm/mdadm_hook
new file mode 100755
index 000000000..7b2dc1ad1
--- /dev/null
+++ b/testing/mdadm/mdadm_hook
@@ -0,0 +1,44 @@
+# vim: set ft=sh:
+run_hook ()
+{
+ input="$(cat /proc/cmdline)"
+ mdconfig="/etc/mdadm.conf"
+ # for partitionable raid, we need to load md_mod first!
+ modprobe md_mod 2>/dev/null
+ # If md is specified on commandline, create config file from those parameters.
+ if [ "$(echo $input | grep "md=")" ]; then
+ #Create initial mdadm.conf
+ # scan all devices in /proc/partitions
+ echo DEVICE partitions > $mdconfig
+ for i in $input; do
+ case $i in
+ # raid
+ md=[0-9]*,/*)
+ device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=||g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device devices=$array" >> $mdconfig
+ ;;
+ # partitionable raid
+ md=d[0-9]*,/*)
+ device="$(echo "$i" | sed -e 's|,/.*||g' -e 's|=|_|g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device devices=$array" >> $mdconfig
+ ;;
+ # raid UUID
+ md=[0-9]*,[0-9,a-z]*)
+ device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=||g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
+ ;;
+ # partitionable raid UUID
+ md=d[0-9]*,[0-9,a-z]*)
+ device="$(echo "$i" | sed -e 's|,.*||g' -e 's|=|_|g')"
+ array="$(echo $i | cut -d, -f2-)"
+ echo "ARRAY /dev/$device UUID=$array" >> $mdconfig
+ ;;
+ esac
+ done
+ fi
+ # assemble everything
+ [ -e $mdconfig ] && /sbin/mdassemble
+}
diff --git a/testing/mdadm/mdadm_install b/testing/mdadm/mdadm_install
new file mode 100644
index 000000000..b53258676
--- /dev/null
+++ b/testing/mdadm/mdadm_install
@@ -0,0 +1,45 @@
+# vim: set ft=sh:
+
+build()
+{
+ MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
+ BINARIES=""
+ FILES=""
+ SCRIPT="mdadm"
+ # check if a custom mdadm.conf exists
+ if grep -q ^ARRAY /etc/mdadm.conf; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+ add_binary "/sbin/mdassemble"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the necessary modules for any raid root device,
+ and assembles the raid device when run.
+
+ If arrays are defined in /etc/mdadm.conf, the file will be used instead
+ of command line assembling.
+
+ Command Line Setup:
+ - for raid arrays with persistent superblocks:
+ md=<md device no.>,dev0,dev1,...,devn
+ md=<md device no.>,uuid
+ - for partitionable raid arrays with persistent superblocks:
+ md=d<md device no.>,dev0,dev1,...,devn
+ md=d<md device no.>,uuid
+
+ Parameters:
+ - <md device no.> = the number of the md device:
+ 0 means md0, 1 means md1, ...
+ - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
+ or 0900878d:f95f6057:c39a36e9:55efa60a
+ Examples:
+ - md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1
+ This will setup 2 md partitionable arrays.
+ - md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
+ This will setup 2 md arrays with persistent superblocks.
+HELPEOF
+}
diff --git a/testing/mdadm/mdadm_udev_install b/testing/mdadm/mdadm_udev_install
new file mode 100644
index 000000000..9fc161624
--- /dev/null
+++ b/testing/mdadm/mdadm_udev_install
@@ -0,0 +1,23 @@
+# vim: set ft=sh:
+
+build()
+{
+ MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
+ BINARIES=""
+ FILES=""
+ SCRIPT=""
+ # check if a custom mdadm.conf exists
+ if grep -q ^ARRAY /etc/mdadm.conf; then
+ echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
+ add_file "/etc/mdadm.conf"
+ fi
+ add_binary "/sbin/mdadm"
+ add_file "/lib/udev/rules.d/64-md-raid.rules"
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads raid arrays with udev.
+HELPEOF
+}
diff --git a/testing/perl-alien-sdl/PKGBUILD b/testing/perl-alien-sdl/PKGBUILD
new file mode 100644
index 000000000..8fa64cb8d
--- /dev/null
+++ b/testing/perl-alien-sdl/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 147088 2012-01-21 18:19:18Z heftig $
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Sarah Hay <sarahhay@mb.sympatico.ca>
+
+# This package must not by "any" arch.
+# Requires rebuild with every change to sdl-config
+
+pkgname=perl-alien-sdl
+_realname=Alien-SDL
+pkgver=1.430
+pkgrel=1
+pkgdesc="Building, finding and using SDL binaries"
+arch=(i686 x86_64)
+license=(PerlArtistic GPL)
+url="http://search.cpan.org/dist/Alien-SDL/"
+depends=(sdl=1.2.15 perl-file-sharedir perl-capture-tiny)
+makedepends=(perl-file-which perl-text-patch)
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/F/FR/FROGGS/$_realname-$pkgver.tar.gz)
+md5sums=('9d7774212fb4e1c46325746c953a808b')
+
+package() {
+ cd "$srcdir/$_realname-$pkgver"
+
+ # install module in vendor directories
+ perl Build.PL installdirs=vendor destdir="$pkgdir" --with-sdl-config
+
+ perl Build
+ perl Build install
+}
diff --git a/testing/udev/PKGBUILD b/testing/udev/PKGBUILD
index 171a03bc5..2a3787ae9 100644
--- a/testing/udev/PKGBUILD
+++ b/testing/udev/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 146792 2012-01-18 11:05:48Z tomegun $
+# $Id: PKGBUILD 147057 2012-01-21 10:00:01Z tpowa $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Aaron Griffin <aaron@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
@@ -6,23 +6,20 @@
pkgbase="udev"
pkgname=('udev' 'udev-compat')
-pkgver=177
-pkgrel=3
+pkgver=178
+pkgrel=1
arch=(i686 x86_64)
url="http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary"
license=('GPL')
groups=('base')
options=(!makeflags !libtool)
makedepends=('gobject-introspection' 'gperf' 'libxslt' 'usbutils' 'kmod')
-source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.xz
- 0001-udevd-kill-hanging-event-processes-after-30-seconds.patch)
+source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.xz)
+md5sums=('173cc6061e3a82dd6e9a1a5cf767a858')
build() {
cd $srcdir/$pkgbase-$pkgver
- # deal with broken drivers waiting for firmware to be loaded
- patch -p1 -i ../0001-udevd-kill-hanging-event-processes-after-30-seconds.patch
-
./configure --prefix=/usr \
--with-rootprefix= \
--sysconfdir=/etc \
@@ -103,5 +100,4 @@ package_udev-compat() {
mknod cpu/microcode c 10 184
}
-md5sums=('b4e00faf8153fd7202a7ef609284b0c3'
- '3e40dca1c4f8194b4633e3befb4da4d4')
+md5sums=('173cc6061e3a82dd6e9a1a5cf767a858')
diff --git a/x86_64/blender/PKGBUILD b/x86_64/blender/PKGBUILD
new file mode 100644
index 000000000..0f23b4ae5
--- /dev/null
+++ b/x86_64/blender/PKGBUILD
@@ -0,0 +1,102 @@
+# $Id: PKGBUILD 145008 2011-12-14 03:12:03Z eric $
+# Contributor: John Sowiak <john@archlinux.org>
+# Contributor: tobias <tobias@archlinux.org>
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+
+# Apparently, the blender guys refuse to release source tarballs for
+# intermediate releases that deal mainly with binaries but incorporate tiny
+# minor changes from svn. Since I'm sick and tired of the urges of users that
+# look for release numbers only, we make a messy PKGBUILD that can checkout svn
+# release if necessary.
+
+#_svn=true
+_svn=false
+
+pkgname=blender
+pkgver=2.61
+pkgrel=4
+epoch=3
+pkgdesc="A fully integrated 3D graphics creation suite"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.blender.org"
+depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' \
+ 'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew' \
+ 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'openimageio')
+makedepends=('cmake' 'boost' 'cuda-toolkit')
+optdepends=('cuda-toolkit: cycles renderer cuda support')
+options=(!strip)
+install=blender.install
+if [ $_svn = false ]; then
+ source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
+ md5sums=('11a4721ff92286f678bb2e05e5f29c97')
+else
+ source=(ftp://ftp.archlinux.org/other/${pkgname}/$pkgname-$pkgver.tar.xz)
+ md5sums=('7579d1139d0d6025df8afcfca64a65c4')
+fi
+
+# source PKGBUILD && mksource
+mksource() {
+ [[ -x /usr/bin/svn ]] || (echo "svn not found. Install subversion." && return 1)
+ _svnver=38016
+ _svntrunk="https://svn.blender.org/svnroot/bf-blender/trunk/blender"
+ _svnmod="$pkgname-$pkgver"
+ mkdir ${pkgname}-$pkgver
+ pushd ${pkgname}-$pkgver
+ svn co $_svntrunk --config-dir ./ -r $_svnver $_svnmod
+ find . -depth -type d -name .svn -exec rm -rf {} \;
+ tar -cJf ../${pkgname}-$pkgver.tar.xz ${pkgname}-$pkgver/*
+ popd
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ mkdir build
+ cd build
+
+ [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD:BOOL=OFF"
+
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DWITH_INSTALL_PORTABLE:BOOL=OFF \
+ -DWITH_PYTHON_INSTALL:BOOL=OFF \
+ -DWITH_OPENCOLLADA:BOOL=ON \
+ -DOPENIMAGEIO_ROOT_DIR:STRING=/usr \
+ -DWITH_GAMEENGINE:BOOL=ON \
+ -DWITH_PLAYER:BOOL=ON \
+ -DWITH_BUILTIN_GLEW:BOOL=OFF \
+ -DWITH_CODEC_FFMPEG:BOOL=ON \
+ -DWITH_CODEC_SNDFILE:BOOL=ON \
+ -DWITH_CYCLES:BOOL=ON \
+ -DWITH_CYCLES_CUDA_BINARIES:BOOL=ON \
+ -DCUDA_TOOLKIT_ROOT_DIR:STRING=/opt/cuda-toolkit/ \
+ -DWITH_FFTW3:BOOL=ON \
+ -DWITH_MOD_OCEANSIM:BOOL=ON \
+ -DPYTHON_VERSION:STRING=3.2 \
+ -DPYTHON_LIBPATH:STRING=/usr/lib \
+ -DPYTHON_LIBRARY:STRING=python3.2mu \
+ -DPYTHON_INCLUDE_DIRS:STRING=/usr/include/python3.2mu \
+ $ENABLESSE2
+
+ make $MAKEFLAGS
+
+ cp -rf "$srcdir"/${pkgname}-$pkgver/release/plugins/* \
+ "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/
+ cd "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi
+ chmod 755 bmake
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver/build"
+ make DESTDIR="${pkgdir}" install
+ python -m compileall "${pkgdir}/usr/share/blender"
+
+# install plugins
+ install -d -m755 "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/{sequence,texture}
+ cp "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/sequence/*.so \
+ "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/sequence/
+ cp "$srcdir"/${pkgname}-$pkgver/source/blender/blenpluginapi/texture/*.so \
+ "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/texture/
+}
diff --git a/x86_64/blender/blender.install b/x86_64/blender/blender.install
new file mode 100644
index 000000000..724bfce00
--- /dev/null
+++ b/x86_64/blender/blender.install
@@ -0,0 +1,13 @@
+post_install() {
+ update-desktop-database -q
+ update-mime-database usr/share/mime &> /dev/null
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/~fauno/mips64el-unknown-linux-gnu-binutils/PKGBUILD b/~fauno/mips64el-unknown-linux-gnu-binutils/PKGBUILD
new file mode 100644
index 000000000..6fc5b1f16
--- /dev/null
+++ b/~fauno/mips64el-unknown-linux-gnu-binutils/PKGBUILD
@@ -0,0 +1,62 @@
+# $Id: PKGBUILD 60835 2011-12-18 22:14:40Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+_cross=mips64el-unknown-linux-gnu
+pkgname=${_cross}-binutils
+pkgver=2.22
+pkgrel=1
+_date=20111227
+_xprefix=/usr
+pkgdesc="A set of programs to assemble and manipulate binary and object files"
+arch=(i686 x86_64)
+group=('mips64el-devel')
+license=(GPL)
+options=(!libtool)
+url="http://www.gnu.org/software/binutils/"
+depends=('glibc' 'zlib')
+#makedepends=("${_cross}-libtool")
+source=(http://mirrors.kernel.org/archlinux/other/binutils/binutils-${pkgver}_${_date}.tar.bz2)
+md5sums=('c2377089c15bb1a1bfaeca8d0e59dd4d')
+
+build() {
+ cd $srcdir/binutils
+
+ #export PATH=/usr/${_cross}/bin/:$PATH
+
+ [ $NOEXTRACT -eq 1 ] || ./configure --prefix=${_xprefix} \
+ --program-prefix=${_cross}- \
+ --enable-shared \
+ --disable-multilib \
+ --with-lib-path=${_xprefix}/lib/binutils/${_cross} \
+ --disable-nls \
+ --target=${_cross} \
+ --host=${CHOST} \
+ --build=${CHOST} \
+ --with-sysroot=/usr/${CHOST}/${_cross} \
+
+ make configure-host
+ make tooldir=$pkgdir/${_xprefix}
+
+}
+
+package() {
+ cd $srcdir/binutils
+
+ make prefix=$pkgdir/${_xprefix} tooldir=$pkgdir/${_xprefix} install
+
+ mkdir -p $pkgdir/${_xprefix}/lib/binutils/${_cross}
+ cp -v include/libiberty.h $pkgdir/${_xprefix}/lib/binutils/${_cross}
+
+ rm -f $pkgdir/${_xprefix}/man/man1/{dlltool,nlmconv,windres}*
+
+ rm -f $pkgdir/usr/bin/ar
+ rm -f $pkgdir/usr/bin/as
+ rm -f $pkgdir/usr/bin/ld
+ rm -f $pkgdir/usr/bin/nm
+ rm -f $pkgdir/usr/bin/objdump
+ rm -f $pkgdir/usr/bin/ranlib
+ rm -f $pkgdir/usr/bin/strip
+ rm -f $pkgdir/usr/bin/objcopy
+ rm -f $pkgdir/usr/lib/libiberty.a
+ rm -rf $pkgdir/usr/share
+}
diff --git a/~fauno/mips64el-unknown-linux-gnu-gcc-base/PKGBUILD b/~fauno/mips64el-unknown-linux-gnu-gcc-base/PKGBUILD
new file mode 100644
index 000000000..becc02cfe
--- /dev/null
+++ b/~fauno/mips64el-unknown-linux-gnu-gcc-base/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD 60837 2011-12-18 22:34:22Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+_cross=mips64el-unknown-linux-gnu
+pkgname=${_cross}-gcc-base
+pkgver=4.6.2
+pkgrel=1
+pkgdesc="The GNU Compiler Collection"
+arch=(i686 x86_64)
+license=('GPL' 'LGPL')
+url="http://gcc.gnu.org"
+depends=("${_cross}-binutils" 'libmpc' 'libelf')
+options=(!libtool !emptydirs zipman docs !strip)
+source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-core-${pkgver}.tar.bz2)
+md5sums=('780f614ab18c7a9066dec6387d7490b2')
+
+build() {
+ cd $srcdir/gcc-$pkgver
+
+ export CFLAGS="-O2 -pipe"
+ export CXXFLAGS="-O2 -pipe"
+
+ [ $NOEXTRACT -eq 1 ] || rm -rf build
+ mkdir build
+ cd build
+
+ [ $NOEXTRACT -eq 1 ] || ../configure --prefix=/usr \
+ --target=${_cross} \
+ --host=${CHOST} \
+ --build=${CHOST} \
+ --enable-shared --disable-nls --enable-languages=c --enable-multilib \
+ --with-local-prefix=/usr/lib/${_cross} \
+ --with-as=/usr/bin/${_cross}-as --with-ld=/usr/bin/${_cross}-ld \
+ --with-sysroot=/usr/$CHOST/${_cross}
+
+ make all-gcc all-target-libgcc
+}
+
+package() {
+ cd $srcdir/gcc-$pkgver/build
+
+ export CFLAGS="-O2 -pipe"
+ export CXXFLAGS="-O2 -pipe"
+
+ make DESTDIR=$pkgdir install-gcc install-target-libgcc
+
+ rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
+ rm -f $pkgdir/usr/share/man/man7/gfdl.7*
+ rm -f $pkgdir/usr/share/man/man7/gpl.7*
+ rm -rf $pkgdir/usr/share/info
+
+ cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/
+ rm -rf $pkgdir/usr/libexec
+
+ # strip it manually
+ strip $pkgdir/usr/bin/* 2>/dev/null || true
+ find $pkgdir/usr/lib -type f -exec ${_cross}-strip {} \; 2>/dev/null || true
+}
diff --git a/~fauno/notmuch/PKGBUILD b/~fauno/notmuch/PKGBUILD
index e965ea15f..9b02b0919 100644
--- a/~fauno/notmuch/PKGBUILD
+++ b/~fauno/notmuch/PKGBUILD
@@ -3,7 +3,7 @@
# Maintainer: Richard Murri <admin@richardmurri.com>
pkgname=notmuch
-pkgver=0.11
+pkgver=0.11_rc3
pkgrel=1
pkgdesc="Notmuch is not much of an email program"
arch=(i686 x86_64 mips64el)
@@ -16,10 +16,13 @@ optdepends=('emacs: for using the emacs interface'
'python2: for using the python bindings'
'ruby: for using the ruby bindings'
'gnupg: for email encryption')
-source=("http://notmuchmail.org/releases/${pkgname}-${pkgver}.tar.gz")
+_commit='310608f279150c735b9fde89f2d632f3b41abd6c'
+source=(#"http://notmuchmail.org/releases/${pkgname}-${pkgver}.tar.gz"
+ "http://git.notmuchmail.org/git/notmuch/snapshot/${_commit}.tar.gz")
build() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ #cd "$srcdir/${pkgname}-${pkgver}"
+ cd $srcdir/${pkgname}-*
./configure --prefix=/usr --sysconfdir=/etc
make
@@ -30,12 +33,14 @@ build() {
}
check() {
- cd "$srcdir/${pkgname}-${pkgver}"
+ #cd "$srcdir/${pkgname}-${pkgver}"
+ cd $srcdir/${pkgname}-*
make test
}
package(){
- cd "$srcdir/${pkgname}-${pkgver}"
+ #cd "$srcdir/${pkgname}-${pkgver}"
+ cd $srcdir/${pkgname}-*
make DESTDIR="$pkgdir/" LIBDIR_IN_LDCONFIG=0 install
install -D notmuch $pkgdir/usr/sbin/notmuch
@@ -46,7 +51,7 @@ package(){
# Install python bindings
- cd "$srcdir/${pkgname}-${pkgver}/bindings/python"
+ cd $srcdir/${pkgname}-*/bindings/python
find "." -name '*.py' -print0 |xargs -0 \
sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \
@@ -56,7 +61,8 @@ package(){
env LD_LIBRARY_PATH="." python2 setup.py install --prefix=/usr --root=$pkgdir
# Install ruby bindings
- cd "$srcdir/${pkgname}-${pkgver}/bindings/ruby"
+ cd $srcdir/${pkgname}-*/bindings/ruby
sed -i -e 's,/site_ruby,,g' Makefile
make prefix=${pkgdir}/usr install
}
+md5sums=('0383f55b5e800e626fd805919138c1b3')
diff --git a/~fauno/vala-notmuch/PKGBUILD b/~fauno/vala-notmuch/PKGBUILD
new file mode 100644
index 000000000..0e97683a4
--- /dev/null
+++ b/~fauno/vala-notmuch/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Mark Foxwell fastfret79@archlinux.org.uk
+
+pkgname=vala-notmuch
+pkgver=20120112
+pkgrel=1
+pkgdesc="a notmuch address book in vala"
+url="https://github.com/spaetz/vala-notmuch"
+arch=('i686' 'x86_64' 'mips64el')
+license=('GPL2')
+makedepends=('vala')
+depends=('notmuch')
+install=vala-notmuch.install
+source=("https://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}-${pkgrel}-any.src.tar.xz")
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}/src"
+
+ ./make
+
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ install -D -m755 src/addrlookup ${pkgdir}/usr/bin/addrlookup
+
+}
+
+# vim:set ts=2 sw=2 et:
+md5sums=('99e264c0cb36e0a0f18048fb2ebd07e0')
+md5sums=('ca73980225368309119cf17ff5b3f3c4')
diff --git a/~fauno/vala-notmuch/SRCBUILD b/~fauno/vala-notmuch/SRCBUILD
new file mode 100644
index 000000000..89b6c67ba
--- /dev/null
+++ b/~fauno/vala-notmuch/SRCBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Mark Foxwell fastfret79@archlinux.org.uk
+
+pkgname=vala-notmuch
+pkgver=20120112
+pkgrel=1
+pkgdesc="A notmuch address book in vala"
+url="https://github.com/spaetz/vala-notmuch"
+arch=('any')
+license=('GPL2')
+makedepends=('git')
+
+_gitroot="https://github.com/spaetz/vala-notmuch.git"
+_gitname="${pkgname}"
+
+build() {
+ cd "$srcdir"
+ msg 'Connecting to GIT server...'
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname; git pull origin
+ msg 'The local files are updated.'
+ else
+ git clone $_gitroot $_gitname
+ fi
+
+ msg "GIT checkout done or server timeout"
+
+}
+
+package() {
+ cd ${pkgdir}
+ export PKGDEST=${SRCDEST}
+ export PKGEXT=.src.tar.xz
+
+ git clone ${srcdir}/${pkgname} ${pkgname}-${pkgver}
+
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/~fauno/vala-notmuch/vala-notmuch.install b/~fauno/vala-notmuch/vala-notmuch.install
new file mode 100644
index 000000000..d1ce89da6
--- /dev/null
+++ b/~fauno/vala-notmuch/vala-notmuch.install
@@ -0,0 +1,6 @@
+post_install() {
+echo "To use within emacs, add the following to your .emacs:"
+echo "(require 'notmuch-address)"
+echo "(setq notmuch-address-command "/usr/bin/addrlookup")"
+echo "(notmuch-address-message-insinuate)"
+}
diff --git a/~lukeshu/cntlm/PKGBUILD b/~lukeshu/cntlm/PKGBUILD
new file mode 100644
index 000000000..2381a924e
--- /dev/null
+++ b/~lukeshu/cntlm/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
+
+pkgname=cntlm
+pkgver=0.92.1
+pkgrel=1
+pkgdesc="An NTLM / NTLM Session Response / NTLMv2 authenticating HTTP proxy intended to help you break free from the chains of Microsoft proprietary world."
+arch=(i686 x86_64)
+url="http://cntlm.sourceforge.net/"
+license=('GPL2')
+backup=('etc/cntlm.conf')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2")
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir/" install
+}
+
+md5sums=('4ae420663bf67666777e17b6b32c4148')
diff --git a/~lukeshu/emacs24/PKGBUILD b/~lukeshu/emacs24/PKGBUILD
index 6742edd52..f9eb76d64 100644
--- a/~lukeshu/emacs24/PKGBUILD
+++ b/~lukeshu/emacs24/PKGBUILD
@@ -10,6 +10,7 @@ arch=('i686' 'x86_64')
url="http://www.gnu.org/software/emacs/emacs.html"
license=('GPL3')
depends=('librsvg' 'gpm' 'giflib' 'libxpm' 'gtk2' 'hicolor-icon-theme' 'gconf' 'desktop-file-utils' 'alsa-lib')
+makedepends=('bzr')
install=emacs.install
source=(emacs.desktop)
md5sums=()
@@ -22,10 +23,10 @@ build() {
msg "Connecting to Bazaar server...."
if [[ -d "$_bzrmod" ]]; then
- cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
+ cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -v -r "$pkgver" 2>&1
msg "The local files are updated."
else
- bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
+ bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -v -r "$pkgver" 2>&1
fi
msg "Bazaar checkout done or server timeout"
diff --git a/~lukeshu/git-svn-abandon-git/PKGBUILD b/~lukeshu/git-svn-abandon-git/PKGBUILD
index eb5d94402..fe9f9990c 100644
--- a/~lukeshu/git-svn-abandon-git/PKGBUILD
+++ b/~lukeshu/git-svn-abandon-git/PKGBUILD
@@ -4,9 +4,9 @@ _pkgname=git-svn-abandon
pkgname=$_pkgname-git
provides=($_pkgname)
conflicts=($_pkgname)
-pkgver=20120101
+pkgver=20120112
pkgrel=1
-pkgdesc=""
+pkgdesc="History preserving svn to git migration using git-svn."
arch=('any')
url="http://blog.woobling.org/2009/06/git-svn-abandon.html"
license=('MIT')