Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 00/50] Merge in yocto changes made since split
@ 2011-02-27  9:28 Koen Kooi
  2011-02-27  9:29 ` [PATCH 01/50] documentation/yocto-project-qs/yocto-project-qs.xml: [BUGID# 628] - Added note about Python 2.6 bitbake requirement Koen Kooi
                   ` (50 more replies)
  0 siblings, 51 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:28 UTC (permalink / raw)
  To: openembedded-core

This merges in the yocto changes that were made since we split off oe-core, minus changes made to bitbake since oe-core doesn't ship that anymore.

Pull URL: git://dominion.thruhere.net/var/cache/git/openembedded-core.git
  Branch: poky-merge-20110227
  Browse: http://dominion.thruhere.net/git/cgit.cgi/openembedded-core//log/?h=poky-merge-20110227

Thanks,
     Koen Kooi <koen@dominion.thruhere.net>
---


Beth Flanagan (5):
  Emenlow Removal from Poky Core: meta-emenlow
  Fix LICENSE parsing: license.bblcass
  Fixing my bad license parsing: license.bbclass
  Fix to the libtool LICENSE field: libtool.inc
  Fixing type: license.bbclass

Bruce Ashfield (2):
  linux-yocto: update to 2.6.37.2
  linux-yocto: add crownbay BSP infrastructure

Dongxiao Xu (1):
  package.bbclass: Use hard link for package split instead of copy

Gary Thomas (1):
  Suppress useless warnings during udev startup

Jingdong Lu (2):
  task-poky-lsb: add necessary packages name
  libxml-parser-perl: remove FILES_${PN}

Joshua Lock (2):
  Ensure Bash is used when spawning terminals
  dropbear: add SRC_URI checksums

Mark Hatle (6):
  Revise stripping and splitting of debug information
  package.bbclass: Refactor split and strip function
  rootfs_rpm: Fix rootfs generation using RPM packages
  rpm: Fix rpm usage of prelink on the target
  rpm: Fix rpm-dbg package split
  prelink: Add missing macro.prelink file

Nitin A Kamble (1):
  perl: import parallel build fixes from upstream git tree

Richard Purdie (9):
  poky.conf: Weakly set PREMIRRORS
  mtd-utils: Set the revision to use explicitly else failures occur
    with BB_NO_NETWORK
  poky-setup-builddir: Update references to the manual
  package.bbclass: Unbreak per file dependencies and blacklist doc
    packages
  package.bbclass: Ensure dependency version information is preserved
  package.bbclass: Fix debug sources directory creation to reference
    the target system
  linux-libc-headers: Update to 2.6.37.2
  conf/machine: Use linux-libc-headers instead of
    linux-libc-headers-yocto
  package.bbclass: Rewrite package_do_filedeps() to reduce the amount
    of subprocesses created and improve speed

Saul Wold (8):
  bitbake.conf: Add DISTROOVERRIDES variable
  poky-lsb.conf: Add DISTROOVERRIDES variable for poky
  poky-lsb.conf: remove OVERRIDES
  poky-qemu: Update -sdk image name due to recent change to sato-sdk
  poky-image-lsb-sdk.bb: add image for LSB SDK Build
  utils.bbclass: add new wrapper script
  file: add wrapper to file-native
  task-poky-lsb: libqtopenqgl4 should be for qemux86 and atom-pc only

Scott Garman (5):
  gtk+: disable build of faq and tutorial docs
  linuxdoc-tools-native: new recipe v0.99.6
  libuser: enable documentation
  poky-qemu: handle cases where an nfs directory contains -image-
  linuxdoc-tools-native: disable doc builds requriing latex and dvips

Scott Rifenbark (6):
  documentation/yocto-project-qs/yocto-project-qs.xml: [BUGID# 628] -
    Added note about Python 2.6 bitbake requirement
  documentation/poky-ref-manual/faq.xml: [BUGID# 628] - Added new
    question for Python 2.6 requirement.
  documentation/poky-ref-manual/poky-ref-manual.xml: updated copyright
    date
  documentation/bsp-guide/bsp-guide.xml: Updated copyright
  documentation/kernel-manual/kernel-manual.xml: Updated copyright date
  documentation/yocto-project-qs/yocto-project-qs.xml: Added Copyright
    dates

Yu Ke (2):
  xf86-video-intel: add config option to support rootless X
  xserver-nodm-init: add rootless-x support

 documentation/bsp-guide/bsp-guide.xml              |    2 +-
 documentation/kernel-manual/kernel-manual.xml      |    2 +-
 documentation/poky-ref-manual/faq.xml              |   41 +
 documentation/poky-ref-manual/poky-ref-manual.xml  |    2 +-
 .../yocto-project-qs/yocto-project-qs.xml          |    7 +
 meta-emenlow/COPYING.MIT                           |   17 -
 meta-emenlow/README                                |   78 -
 meta-emenlow/conf/checksums.ini                    |   23 -
 meta-emenlow/conf/layer.conf                       |   10 -
 meta-emenlow/conf/machine/emenlow.conf             |   48 -
 .../formfactor/formfactor/emenlow/machconfig       |    3 -
 .../recipes-bsp/formfactor/formfactor_0.0.bbappend |    3 -
 .../libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch      |   61 -
 .../libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb         |   19 -
 .../libva-0.31.0/033_g45_add_rgba_subpic.patch     |  111 -
 .../034_g45_fix_return_for_unimpl.patch            |   83 -
 .../035_g45_add_yv12_image_format.patch            |  102 -
 .../libva-0.31.0/036_g45_add_vaGetImage.patch      |   71 -
 .../libva-0.31.0/037_g45_add_vaPutImage.patch      |  111 -
 .../038_g45_vaPutSurface_cliprects.patch           |  531 --
 .../libva-0.31.0/102_attribute_visibility.patch    |   47 -
 .../libva/libva-0.31.0/103_fix_vainfo_deps.patch   |   24 -
 .../104_fix_libva_pkgconfig_deps.patch             |   18 -
 .../105_dont_search_LIBGL_DRIVERS_PATH.patch       |   21 -
 .../libva/libva-0.31.0/108_drivers_path.patch      |   25 -
 .../libva-0.31.0/203_fix_fglrx_detection.patch     |  542 --
 .../libva-0.31.0/204_check_ATIFGLEXTENSION.patch   |  312 -
 .../libva/libva-0.31.0/300_sds_version.patch       |   87 -
 .../libva/libva-0.31.0/301_vdpau_mpeg4.patch       |   26 -
 .../320_move_vaPutSurface_flags_def.patch          |   60 -
 .../libva/libva-0.31.0/321_libva_glx.base.patch    |  212 -
 .../libva/libva-0.31.0/322_libva_glx.patch         | 2024 ------
 .../libva/libva-0.31.0/390_compat.base.patch       |  135 -
 .../libva/libva-0.31.0/391_compat.patch            | 3273 ----------
 .../libva/libva-0.31.0/392_compat.dso.patch        |  183 -
 .../libva/libva-0.31.0/libdrm-poulsbo.patch        |   26 -
 .../recipes-graphics/libva/libva_0.31.0.bb         |   40 -
 .../psb-firmware/psb-firmware_0.30.bb              |   15 -
 .../psb-kernel-source-4.42.0/build.patch           |  175 -
 .../psb-kernel-source/psb-kernel-source_4.42.0.bb  |   24 -
 .../xorg-xserver/files/crosscompile.patch          |   19 -
 .../files/fix_open_max_preprocessor_error.patch    |   13 -
 .../xorg-xserver/files/libdrm-poulsbo.patch        |   26 -
 .../xorg-xserver/files/macro_tweak.patch           |   18 -
 .../xorg-xserver/files/nodolt.patch                |   12 -
 .../xorg-xserver/xserver-psb_1.7.99.2.bb           |   21 -
 .../xserver-xf86-config/emenlow/xorg.conf          |   13 -
 .../xorg-xserver/xserver-xf86-config_0.1.bbappend  |    3 -
 .../xpsb-glx/xpsb-glx-0.18/cross-compile.patch     |   58 -
 .../xpsb-glx/xpsb-glx-0.18/libdrmname.patch        |   63 -
 .../xpsb-glx/xpsb-glx-0.18/native-matypes.patch    |   20 -
 .../recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb     |   46 -
 .../01_disable_lid_timer.patch                     |   12 -
 .../xserver-xorg-video-psb-0.32.1/dri-h.patch      |   20 -
 .../libdrm-poulsbo.patch                           |   13 -
 .../xserver-xorg-video-psb-0.32.1/psb_mixed.patch  |   35 -
 .../psb_xvtempfix.patch                            |   17 -
 .../xserver-xorg-video-psb-0.32.1/stubs.patch      |   23 -
 .../xserver-xorg-video-psb-0.32.1/visibility.patch |   12 -
 .../xorg-x11-drv-psb-0.31.0-ignoreacpi.patch       |   11 -
 .../xorg-x11-drv-psb-0.31.0-xserver17.patch        |   85 -
 .../xserver-xorg-video-psb-0.31.0-assert.patch     |   11 -
 ...rver-xorg-video-psb-0.31.0-comment_unused.patch |   75 -
 .../xserver-xorg-video-psb-0.31.0-greedy.patch     |   19 -
 .../xserver-xorg-video-psb-0.31.0-loader.patch     |   84 -
 .../xserver-xorg-video-psb_0.32.1.bb               |   34 -
 .../recipes-kernel/linux/linux-2.6.33.2/defconfig  |   68 -
 .../linux/linux-yocto-stable_git.bbappend          |    3 -
 .../recipes-kernel/linux/linux_2.6.33.2.bbappend   |    3 -
 meta/classes/devshell.bbclass                      |    4 +-
 meta/classes/image-prelink.bbclass                 |    2 +-
 meta/classes/insane.bbclass                        |    4 +-
 meta/classes/kernel.bbclass                        |    2 +-
 meta/classes/license.bbclass                       |    4 +-
 meta/classes/package.bbclass                       |  417 +-
 meta/classes/package_rpm.bbclass                   |   15 +-
 meta/classes/populate_sdk_rpm.bbclass              |   13 +-
 meta/classes/rootfs_rpm.bbclass                    |    5 +-
 meta/classes/utils.bbclass                         |   23 +
 meta/conf/bblayers.conf.sample                     |    3 +-
 meta/conf/bitbake.conf                             |   12 +-
 .../conf/distro/include/poky-default-revisions.inc |   26 +-
 meta/conf/distro/poky-lsb.conf                     |    3 +
 meta/conf/distro/poky.conf                         |    2 +-
 meta/conf/local.conf.sample                        |   31 +
 meta/conf/machine/atom-pc.conf                     |    2 +
 meta/conf/machine/beagleboard.conf                 |    2 +-
 meta/conf/machine/include/qemu.inc                 |    2 +-
 meta/conf/machine/mpc8315e-rdb.conf                |    2 +-
 meta/conf/machine/routerstationpro.conf            |    2 +-
 meta/conf/sanity.conf                              |    2 +-
 meta/files/common-licenses/MIT                     |    6 +
 meta/files/common-licenses/MIT-style               |    1 +
 meta/recipes-core/dropbear/dropbear_0.52.bb        |    3 +
 meta/recipes-core/udev/udev-164/init               |    2 +-
 meta/recipes-devtools/file/file_5.04.bb            |    8 +-
 meta/recipes-devtools/libtool/libtool.inc          |    2 +-
 .../linuxdoc-tools-native/disable_dvips_doc.patch  |   29 +
 .../linuxdoc-tools-native/disable_sgml2rtf.patch   |   49 +
 .../linuxdoc-tools-native/disable_tex_doc.patch    |   25 +
 .../linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb |   23 +
 meta/recipes-devtools/mtd/mtd-utils_1.4.1.bb       |    2 +-
 .../perl/libxml-parser-perl_2.36.bb                |    6 +-
 .../perl/perl-5.12.2/parallel_build_fix.patch      |   18 -
 .../perl/perl-5.12.2/parallel_build_fix_1.patch    |   25 +
 .../perl/perl-5.12.2/parallel_build_fix_2.patch    |   22 +
 .../perl/perl-5.12.2/parallel_build_fix_3.patch    | 6583 ++++++++++++++++++++
 meta/recipes-devtools/perl/perl-native_5.12.2.bb   |    6 +-
 meta/recipes-devtools/perl/perl_5.12.2.bb          |    6 +-
 .../prelink/prelink/macros.prelink                 |    5 +
 meta/recipes-devtools/prelink/prelink_git.bb       |    8 +-
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    7 +-
 meta/recipes-extended/images/poky-image-lsb-sdk.bb |    9 +
 .../libuser/libuser-0.57.1/disable-sgml-doc.patch  |   18 -
 meta/recipes-extended/libuser/libuser_0.57.1.bb    |    9 +-
 meta/recipes-extended/tasks/task-poky-lsb.bb       |   68 +-
 .../recipes-gnome/gtk+/gtk+-2.22.1/doc-fixes.patch |   44 +-
 meta/recipes-gnome/gtk+/gtk+_2.22.1.bb             |    2 +-
 .../x11-common/xserver-nodm-init.bb                |   22 +-
 .../x11-common/xserver-nodm-init/Xusername         |    1 +
 .../x11-common/xserver-nodm-init/xserver-nodm      |    4 +
 .../xorg-driver/xf86-video-intel_2.14.0.bb         |    5 +
 ...rs_2.6.36.bb => linux-libc-headers_2.6.37.2.bb} |    0
 meta/recipes-kernel/linux/linux-yocto_git.bb       |    3 +-
 scripts/poky-qemu                                  |   16 +-
 scripts/poky-setup-builddir                        |    8 +-
 126 files changed, 7436 insertions(+), 9618 deletions(-)
 delete mode 100644 meta-emenlow/COPYING.MIT
 delete mode 100644 meta-emenlow/README
 delete mode 100644 meta-emenlow/binary/.gitignore
 delete mode 100644 meta-emenlow/conf/checksums.ini
 delete mode 100644 meta-emenlow/conf/layer.conf
 delete mode 100644 meta-emenlow/conf/machine/emenlow.conf
 delete mode 100644 meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow/machconfig
 delete mode 100644 meta-emenlow/recipes-bsp/formfactor/formfactor_0.0.bbappend
 delete mode 100644 meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/033_g45_add_rgba_subpic.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/034_g45_fix_return_for_unimpl.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/035_g45_add_yv12_image_format.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/037_g45_add_vaPutImage.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/038_g45_vaPutSurface_cliprects.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/103_fix_vainfo_deps.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/104_fix_libva_pkgconfig_deps.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/105_dont_search_LIBGL_DRIVERS_PATH.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/108_drivers_path.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/203_fix_fglrx_detection.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/204_check_ATIFGLEXTENSION.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/300_sds_version.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/301_vdpau_mpeg4.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/320_move_vaPutSurface_flags_def.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/321_libva_glx.base.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/322_libva_glx.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/390_compat.base.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/391_compat.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/392_compat.dso.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva_0.31.0.bb
 delete mode 100644 meta-emenlow/recipes-graphics/psb-firmware/psb-firmware_0.30.bb
 delete mode 100644 meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source-4.42.0/build.patch
 delete mode 100644 meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source_4.42.0.bb
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/crosscompile.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/fix_open_max_preprocessor_error.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/macro_tweak.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/nodolt.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb_1.7.99.2.bb
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow/xorg.conf
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/01_disable_lid_timer.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/dri-h.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_mixed.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_xvtempfix.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/stubs.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/visibility.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-ignoreacpi.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-xserver17.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-assert.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-comment_unused.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-greedy.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-loader.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb_0.32.1.bb
 delete mode 100644 meta-emenlow/recipes-kernel/linux/linux-2.6.33.2/defconfig
 delete mode 100644 meta-emenlow/recipes-kernel/linux/linux-yocto-stable_git.bbappend
 delete mode 100644 meta-emenlow/recipes-kernel/linux/linux_2.6.33.2.bbappend
 create mode 100644 meta/files/common-licenses/MIT
 create mode 120000 meta/files/common-licenses/MIT-style
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_dvips_doc.patch
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_sgml2rtf.patch
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_tex_doc.patch
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb
 delete mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix.patch
 create mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_1.patch
 create mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_2.patch
 create mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_3.patch
 create mode 100644 meta/recipes-devtools/prelink/prelink/macros.prelink
 create mode 100644 meta/recipes-extended/images/poky-image-lsb-sdk.bb
 delete mode 100644 meta/recipes-extended/libuser/libuser-0.57.1/disable-sgml-doc.patch
 create mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
 rename meta/recipes-kernel/linux-libc-headers/{linux-libc-headers_2.6.36.bb => linux-libc-headers_2.6.37.2.bb} (100%)




^ permalink raw reply	[flat|nested] 55+ messages in thread

* [PATCH 01/50] documentation/yocto-project-qs/yocto-project-qs.xml: [BUGID# 628] - Added note about Python 2.6 bitbake requirement
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 02/50] documentation/poky-ref-manual/faq.xml: [BUGID# 628] - Added new question for Python 2.6 requirement Koen Kooi
                   ` (49 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Rifenbark <scott.m.rifenbark@intel.com>

Part of the fix for Bug 628 is to add a note that bitbake requires
python 2.6.  I added this note before the example bitbake command
that builds an image.  I also added a linked reference to the Poky
Reference Manual and mentioned the FAQ appendix.  There will be more
information about the python requirement in the FAQ.

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
---
 .../yocto-project-qs/yocto-project-qs.xml          |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml
index 56dafe5..452282f 100644
--- a/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -278,6 +278,12 @@
      $ bitbake poky-image-sato
                  </literallayout>
              </para></note>
+             <note><para>
+                 BitBake requires Python 2.6.  For more information on this requirement, 
+                 see the FAQ appendix in the 
+                 <ulink url='http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html'>
+                 Poky Reference Manual</ulink>.
+             </para></note>
              The final command runs the image:
              <literallayout class='monospaced'>
      $ poky-qemu qemux86
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 02/50] documentation/poky-ref-manual/faq.xml: [BUGID# 628] - Added new question for Python 2.6 requirement.
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
  2011-02-27  9:29 ` [PATCH 01/50] documentation/yocto-project-qs/yocto-project-qs.xml: [BUGID# 628] - Added note about Python 2.6 bitbake requirement Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 03/50] xf86-video-intel: add config option to support rootless X Koen Kooi
                   ` (48 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Rifenbark <scott.m.rifenbark@intel.com>

As part of the fix for #628 I added a new question to the FAQ for use
of Poky when you do not have Python 2.6.

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
---
 documentation/poky-ref-manual/faq.xml |   41 +++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/documentation/poky-ref-manual/faq.xml b/documentation/poky-ref-manual/faq.xml
index b209fff..7a891b0 100644
--- a/documentation/poky-ref-manual/faq.xml
+++ b/documentation/poky-ref-manual/faq.xml
@@ -20,6 +20,47 @@
             </para>
         </answer>
     </qandaentry>
+
+
+
+
+
+    <qandaentry>
+        <question>
+            <para>
+                I only have Python 2.4 or 2.5 but BitBake requires Python 2.6.
+                Can I still use Poky?
+            </para>
+        </question>
+        <answer>
+            <para>
+                You can use a stand-alone tarball to provide Python 2.6.
+                You can find pre-built 32 and 64-bit versions of Python 2.6 at the following locations:
+                <itemizedlist>
+                    <listitem><para><ulink url='http://autobuilder.yoctoproject.org/downloads/miscsupport/python-nativesdk-standalone-i586.tar.bz2'></ulink></para></listitem>
+                    <listitem><para><ulink url='http://autobuilder.yoctoproject.org/downloads/miscsupport/python-nativesdk-standalone-x86_64.tar.bz2'></ulink></para></listitem>
+                </itemizedlist>
+            </para>
+            <para>
+                These tarballs are self-contained with all required libraries and should work 
+                on most Linux systems.  
+                To use the tarballs extract them into the root 
+                directory and run the appropriate command:
+                <literallayout class='monospaced'>
+     $ export PATH=/opt/poky/sysroots/i586-pokysdk-linux/usr/bin/:$PATH
+     $ export PATH=/opt/poky/sysroots/x86_64-pokysdk-linux/usr/bin/:$PATH
+                </literallayout>
+            </para>
+            <para>
+                Once you run the command, BitBake uses Python 2.6.
+            </para>
+        </answer>
+    </qandaentry>
+
+
+
+
+
     <qandaentry>
         <question>
             <para>
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 03/50] xf86-video-intel: add config option to support rootless X
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
  2011-02-27  9:29 ` [PATCH 01/50] documentation/yocto-project-qs/yocto-project-qs.xml: [BUGID# 628] - Added note about Python 2.6 bitbake requirement Koen Kooi
  2011-02-27  9:29 ` [PATCH 02/50] documentation/poky-ref-manual/faq.xml: [BUGID# 628] - Added new question for Python 2.6 requirement Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 04/50] xserver-nodm-init: add rootless-x support Koen Kooi
                   ` (47 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Yu Ke <ke.yu@intel.com>

- add global config option ROOTLESS_X to control if enable
  rootless X for the machine. ROOTLESS_X requires graphics
  driver supporting KMS (kernel mode setting), so far, only
  atom_pc support this. so enable ROOTLESS_X for atom_pc machine

- add config options for xf86-video-intel to support rootless X

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 meta/conf/machine/atom-pc.conf                     |    2 ++
 .../xorg-driver/xf86-video-intel_2.14.0.bb         |    5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/meta/conf/machine/atom-pc.conf b/meta/conf/machine/atom-pc.conf
index 58c9b0d..b94deb2 100644
--- a/meta/conf/machine/atom-pc.conf
+++ b/meta/conf/machine/atom-pc.conf
@@ -42,3 +42,5 @@ GLIBC_ADDONS = "nptl"
 GLIBC_EXTRA_OECONF = "--with-tls"
 
 EXTRA_OECONF_append_pn-matchbox-panel-2 = " --with-battery=acpi"
+
+ROOTLESS_X = "1"
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.14.0.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.14.0.bb
index 017a2e0..099cf9d 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.14.0.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.14.0.bb
@@ -9,8 +9,13 @@ Infrastructure (DRI)."
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=8730ad58d11c7bbad9a7066d69f7808e"
 
+PR = "r1"
+
 EXTRA_OECONF += "--disable-xvmc"
 
+# --enable-kms-only option is required by ROOTLESS_X
+EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "", d )}'
+
 DEPENDS += "virtual/libx11 libxvmc drm xf86driproto glproto \
 	    virtual/libgl xineramaproto xf86driproto libpciaccess"
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 04/50] xserver-nodm-init: add rootless-x support
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (2 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 03/50] xf86-video-intel: add config option to support rootless X Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 05/50] bitbake.conf: Add DISTROOVERRIDES variable Koen Kooi
                   ` (46 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Yu Ke <ke.yu@intel.com>

most rootless X work are already done in the kernel, xserver and
graphics driver, this patches add the the remaining userspace setting:

- create /etc/X11/Xusername to set rootless X user
- add rootless X user to group video, tty to access /dev/tty[0-4]
  and /dev/dri/card0
- grant rootless X user access right to /dev/input/*, /var/log

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 .../x11-common/xserver-nodm-init.bb                |   22 +++++++++++++++++++-
 .../x11-common/xserver-nodm-init/Xusername         |    1 +
 .../x11-common/xserver-nodm-init/xserver-nodm      |    4 +++
 3 files changed, 26 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername

diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
index 03a6ca3..a93acc9 100644
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init.bb
@@ -3,10 +3,11 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SECTION = "x11"
 PRIORITY = "optional"
-PR = "r23"
+PR = "r24"
 RDEPENDS_${PN} = "dbus-wait sudo"
 
 SRC_URI = "file://xserver-nodm \
+           file://Xusername \
            file://gplv2-license.patch"
 
 S = ${WORKDIR}
@@ -17,6 +18,25 @@ do_install() {
     install -d ${D}/etc
     install -d ${D}/etc/init.d
     install xserver-nodm ${D}/etc/init.d
+    if [ "${ROOTLESS_X}" = "1" ] ; then
+        install -d ${D}/etc/X11
+        install Xusername ${D}/etc/X11
+    fi
+}
+
+pkg_postinst_${PN} () {
+    if [ "x$D" != "x" ] ; then
+        exit 1
+    fi
+
+    if [ -f /etc/X11/Xusername ]; then
+        # create the rootless X user, and add user to group tty, video
+        username=`cat /etc/X11/Xusername`
+        adduser --disabled-password $username
+        # FIXME: use addgroup if busybox addgroup is ready
+        sed -i -e "s/^video:.*/&${username}/g" /etc/group
+        sed -i -e "s/^tty:.*/&${username}/g" /etc/group
+    fi
 }
 
 inherit update-rc.d
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
new file mode 100644
index 0000000..7060e5e
--- /dev/null
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/Xusername
@@ -0,0 +1 @@
+xuser
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
index 69ea949..d8c4ba0 100755
--- a/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm
@@ -30,6 +30,10 @@ case "$1" in
        echo "Starting Xserver"
        if [ -f /etc/X11/Xusername ]; then
            username=`cat /etc/X11/Xusername`
+           # setting for rootless X
+           chmod o+w /var/log
+           chmod g+r /dev/tty[0-3]
+           chmod o+rw /dev/input/*
        fi
        # Using sudo -i here has the nice side effect of making sire
        # HOME, USER and other previously problematic variables
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 05/50] bitbake.conf: Add DISTROOVERRIDES variable
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (3 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 04/50] xserver-nodm-init: add rootless-x support Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 06/50] poky-lsb.conf: Add DISTROOVERRIDES variable for poky Koen Kooi
                   ` (45 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/conf/bitbake.conf |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 162c792..cba918e 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -649,7 +649,8 @@ AUTO_LIBNAME_PKGS = "${PACKAGES}"
 #
 # This works for  functions as well, they are really just environment variables.
 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
-OVERRIDES = "local:${MACHINE}:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}:forcevariable"
+OVERRIDES = "local:${MACHINE}:${DISTROOVERRIDES}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}:forcevariable"
+DISTROOVERRIDES ?= "${DISTRO}"
 
 CPU_FEATURES ?= ""
 CPU_FEATURES_arm ?= "vfp"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 06/50] poky-lsb.conf: Add DISTROOVERRIDES variable for poky
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (4 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 05/50] bitbake.conf: Add DISTROOVERRIDES variable Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 07/50] poky.conf: Weakly set PREMIRRORS Koen Kooi
                   ` (44 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/conf/distro/poky-lsb.conf |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/meta/conf/distro/poky-lsb.conf b/meta/conf/distro/poky-lsb.conf
index 86514d3..9a34a15 100644
--- a/meta/conf/distro/poky-lsb.conf
+++ b/meta/conf/distro/poky-lsb.conf
@@ -1,6 +1,10 @@
 require conf/distro/poky.conf
 
 DISTRO = "poky-lsb"
+DISTROOVERIDES = "poky:poky-lsb"
 
 DISTRO_FEATURES += "pam"
 PREFERRED_PROVIDER_virtual/libx11 = "libx11"
+
+OVERRIDES = "local:${MACHINE}:poky:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}:forcevariable"
+
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 07/50] poky.conf: Weakly set PREMIRRORS
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (5 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 06/50] poky-lsb.conf: Add DISTROOVERRIDES variable for poky Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 08/50] mtd-utils: Set the revision to use explicitly else failures occur with BB_NO_NETWORK Koen Kooi
                   ` (43 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

We should only weakly set PREMIRRORS as users often want to override this.

[BUGID #753]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/distro/poky.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/conf/distro/poky.conf b/meta/conf/distro/poky.conf
index 400b8c2..71e40de 100644
--- a/meta/conf/distro/poky.conf
+++ b/meta/conf/distro/poky.conf
@@ -150,7 +150,7 @@ BB_GENERATE_MIRROR_TARBALLS ??= "0"
 
 require conf/distro/include/world-broken.inc
 
-PREMIRRORS =+ "\
+PREMIRRORS ?= "\
 bzr://.*/.*   http://autobuilder.yoctoproject.org/sources/ \n \
 cvs://.*/.*   http://autobuilder.yoctoproject.org/sources/ \n \
 git://.*/.*   http://autobuilder.yoctoproject.org/sources/ \n \
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 08/50] mtd-utils: Set the revision to use explicitly else failures occur with BB_NO_NETWORK
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (6 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 07/50] poky.conf: Weakly set PREMIRRORS Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 09/50] poky-lsb.conf: remove OVERRIDES Koen Kooi
                   ` (42 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

[BUGID #752]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/mtd/mtd-utils_1.4.1.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_1.4.1.bb b/meta/recipes-devtools/mtd/mtd-utils_1.4.1.bb
index 5e6db0e..f2de74d 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_1.4.1.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_1.4.1.bb
@@ -6,7 +6,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
 
-SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV} \
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=3c3674a6e1d3f59554b0ff68ca59be2fd4134e0c \
 		file://add-exclusion-to-mkfs-jffs2-git-2.patch;patch=1"
 
 S = "${WORKDIR}/git/"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 09/50] poky-lsb.conf: remove OVERRIDES
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (7 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 08/50] mtd-utils: Set the revision to use explicitly else failures occur with BB_NO_NETWORK Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 10/50] Ensure Bash is used when spawning terminals Koen Kooi
                   ` (41 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/conf/distro/poky-lsb.conf |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/meta/conf/distro/poky-lsb.conf b/meta/conf/distro/poky-lsb.conf
index 9a34a15..749c858 100644
--- a/meta/conf/distro/poky-lsb.conf
+++ b/meta/conf/distro/poky-lsb.conf
@@ -1,10 +1,9 @@
 require conf/distro/poky.conf
 
 DISTRO = "poky-lsb"
-DISTROOVERIDES = "poky:poky-lsb"
+DISTROOVERRIDES = "poky:poky-lsb"
 
 DISTRO_FEATURES += "pam"
 PREFERRED_PROVIDER_virtual/libx11 = "libx11"
 
-OVERRIDES = "local:${MACHINE}:poky:${DISTRO}:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}:forcevariable"
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 10/50] Ensure Bash is used when spawning terminals
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (8 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 09/50] poky-lsb.conf: remove OVERRIDES Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 11/50] poky-setup-builddir: Update references to the manual Koen Kooi
                   ` (40 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

We rely on Bashisms when spawning a terminal so ensure that bash is used
when using devshell and menuconfig.

Fixes [BUGID #119]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/devshell.bbclass |    4 ++--
 meta/classes/kernel.bbclass   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index 4fb3e63..5f262f4 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -9,7 +9,8 @@ devshell_do_devshell() {
 	export XAUTHORITY='${XAUTHORITY}'
 	export TERMWINDOWTITLE="Bitbake Developer Shell"
 	export EXTRA_OEMAKE='${EXTRA_OEMAKE}'
-	${TERMCMD}
+	export SHELLCMDS="bash"
+	${TERMCMDRUN}
 	if [ $? -ne 0 ]; then
 	    echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
 	    exit 1
@@ -17,6 +18,5 @@ devshell_do_devshell() {
 }
 addtask devshell after do_patch
 
-
 EXPORT_FUNCTIONS do_devshell
 
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index a1b1354..5d9b86a 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -202,7 +202,7 @@ do_menuconfig() {
         export DBUS_SESSION_BUS_ADDRESS='${DBUS_SESSION_BUS_ADDRESS}'
         export XAUTHORITY='${XAUTHORITY}'
 	export TERMWINDOWTITLE="${PN} Kernel Configuration"
-	export SHELLCMDS="make menuconfig"
+	export SHELLCMDS="bash make menuconfig"
 	${TERMCMDRUN}
 	if [ $? -ne 0 ]; then
 		echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable."
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 11/50] poky-setup-builddir: Update references to the manual
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (9 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 10/50] Ensure Bash is used when spawning terminals Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 12/50] poky-qemu: Update -sdk image name due to recent change to sato-sdk Koen Kooi
                   ` (39 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/poky-setup-builddir |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/poky-setup-builddir b/scripts/poky-setup-builddir
index 7a1452f..7a49a8f 100755
--- a/scripts/poky-setup-builddir
+++ b/scripts/poky-setup-builddir
@@ -66,8 +66,8 @@ you with some default values. You may wish to edit it to use a different MACHINE
 cores for example. See the file for more information as common configuration
 options are commented.
 
-Also, for more information see the Poky handbook:
-http://pokylinux.org/doc/poky-handbook.html
+Also, for more information see the Poky Reference Manual:
+    http://yoctoproject.org/community/documentation
 
 EOM
     cp -f $POKYLOCALCONF $BUILDDIR/conf/local.conf
@@ -82,8 +82,8 @@ You had no conf/bblayers.conf file. Poky has created this configuration file for
 you with some default values. To add additional metadata layers into your
 configuration please add entries to this file.
 
-For more information see the Poky handbook:
-    http://pokylinux.org/doc/poky-handbook.html
+For more information see the Poky Reference Manual:
+    http://yoctoproject.org/community/documentation
 
 EOM
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 12/50] poky-qemu: Update -sdk image name due to recent change to sato-sdk
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (10 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 11/50] poky-setup-builddir: Update references to the manual Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 13/50] perl: import parallel build fixes from upstream git tree Koen Kooi
                   ` (38 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 scripts/poky-qemu |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index cb08f27..1086c3d 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -228,23 +228,23 @@ machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
 # Defaults used when these vars need to be inferred
 QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
 QEMUX86_DEFAULT_FSTYPE=ext3
-QEMUX86_DEFAULT_ROOTFS="poky-image-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
+QEMUX86_DEFAULT_ROOTFS="poky-image-sato-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
 
 QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
 QEMUX86_64_DEFAULT_FSTYPE=ext3
-QEMUX86_64_DEFAULT_ROOTFS="poky-image-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
+QEMUX86_64_DEFAULT_ROOTFS="poky-image-sato-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
 
 QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
 QEMUARM_DEFAULT_FSTYPE=ext3
-QEMUARM_DEFAULT_ROOTFS="poky-image-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
+QEMUARM_DEFAULT_ROOTFS="poky-image-sato-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
 
 QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
 QEMUMIPS_DEFAULT_FSTYPE=ext3
-QEMUMIPS_DEFAULT_ROOTFS="poky-image-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
+QEMUMIPS_DEFAULT_ROOTFS="poky-image-sato-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
 
 QEMUPPC_DEFAULT_KERNEL=zImage-qemuppc.bin
 QEMUPPC_DEFAULT_FSTYPE=ext3
-QEMUPPC_DEFAULT_ROOTFS="poky-image-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
+QEMUPPC_DEFAULT_ROOTFS="poky-image-sato-sdk poky-image-sato poky-image-lsb poky-image-basic poky-image-minimal"
 
 AKITA_DEFAULT_KERNEL=zImage-akita.bin
 AKITA_DEFAULT_FSTYPE=jffs2
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 13/50] perl: import parallel build fixes from upstream git tree
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (11 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 12/50] poky-qemu: Update -sdk image name due to recent change to sato-sdk Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 14/50] Suppress useless warnings during udev startup Koen Kooi
                   ` (37 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Nitin A Kamble <nitin.a.kamble@intel.com>

The parallel build issue is fixed in the upstream perl git tree
differently. Replacing our fix with the upstream fix.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 .../perl/perl-5.12.2/parallel_build_fix.patch      |   18 -
 .../perl/perl-5.12.2/parallel_build_fix_1.patch    |   25 +
 .../perl/perl-5.12.2/parallel_build_fix_2.patch    |   22 +
 .../perl/perl-5.12.2/parallel_build_fix_3.patch    | 6583 ++++++++++++++++++++
 meta/recipes-devtools/perl/perl-native_5.12.2.bb   |    6 +-
 meta/recipes-devtools/perl/perl_5.12.2.bb          |    6 +-
 6 files changed, 6638 insertions(+), 22 deletions(-)
 delete mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix.patch
 create mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_1.patch
 create mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_2.patch
 create mode 100644 meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_3.patch

diff --git a/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix.patch b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix.patch
deleted file mode 100644
index 476577e..0000000
--- a/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This patch fixes the parallel make issue on a 40 way build system
-
-Nitin A Kamble <nitin.a.kamble@intel.com>
-2011-02-16
-
-Index: perl-5.12.2/Makefile.SH
-===================================================================
---- perl-5.12.2.orig/Makefile.SH	2010-09-06 16:30:32.000000000 -0700
-+++ perl-5.12.2/Makefile.SH	2011-02-16 16:21:30.744143773 -0800
-@@ -198,6 +198,8 @@
- $this_target: uni.data" ;;
- 	Text/ParseWords) extra_dep="$extra_dep
- $this_target: lib/auto/Scalar/Util.$dlext" ;;
-+	POSIX) extra_dep="$extra_dep
-+$this_target: lib/auto/Cwd/Cwd.$dlext" ;;
-     esac
- done
- 
diff --git a/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_1.patch b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_1.patch
new file mode 100644
index 0000000..63e6410
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_1.patch
@@ -0,0 +1,25 @@
+Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com>
+2011-02-23
+
+commit 6695a346c41138df5b2c0e26b9a49b1f96137da0
+Author: Tony Cook <tony@openbsd32.tony.develop-help.com>
+Date:   Thu Jul 22 09:54:13 2010 +1000
+
+    make_ext.pl populates @INC correctly, don't override it badly
+    
+    PERL5LIB is populated by make_ext.pl with paths to the modules we need
+    to run, don't override this with "../../lib" since that may not have
+    been populated yet in a parallel build.
+
+diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
+index 392b6fb..9e6d091 100644
+--- a/ext/POSIX/Makefile.PL
++++ b/ext/POSIX/Makefile.PL
+@@ -1,7 +1,3 @@
+-# Explicitly avoid including '.' in @INC; autoloader gets confused since it
+-# can find POSIX.pm, but can't find autosplit.ix.
+-BEGIN { @INC = '../../lib';}
+-#
+ use ExtUtils::MakeMaker;
+ use ExtUtils::Constant 0.11 'WriteConstants';
+ use Config;
diff --git a/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_2.patch b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_2.patch
new file mode 100644
index 0000000..6c536dd
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_2.patch
@@ -0,0 +1,22 @@
+Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com>
+2011-02-23
+
+commit 24e93d7838b346d2ed632075f3d824a325170616
+Author: Tony Cook <tony@develop-help.com>
+Date:   Sat Aug 14 00:21:29 2010 +1000
+
+    POSIX/t/posix.t expects a certain start to Makefile.PL
+    
+    6695a346 changed the start of Makefile.PL, but t/posix.t reads that to
+    test its read() implementation, restore enough of the original for the
+    test to pass.
+
+diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
+index 9e6d091..292882c 100644
+--- a/ext/POSIX/Makefile.PL
++++ b/ext/POSIX/Makefile.PL
+@@ -1,3 +1,4 @@
++# Expect this line to be read by t/posix.t, don't change it
+ use ExtUtils::MakeMaker;
+ use ExtUtils::Constant 0.11 'WriteConstants';
+ use Config;
diff --git a/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_3.patch b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_3.patch
new file mode 100644
index 0000000..a74a45d
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.12.2/parallel_build_fix_3.patch
@@ -0,0 +1,6583 @@
+Imported from perl git tree by Nitin A Kamble <nitin.a.kamble@intel.com>
+2011-02-23
+
+commit 4feb80ac47a22e7de7d7c1c1d5dfb3d744a2a3a7
+Author: Jerry D. Hedden <jdhedden@cpan.org>
+Date:   Tue Aug 17 13:17:11 2010 -0400
+
+    Move POSIX.pm to lib/POSIX.pm to fix autosplitter problem
+
+diff --git a/MANIFEST b/MANIFEST
+index 3036d73..faf8974 100644
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -3183,9 +3183,9 @@ ext/POSIX/hints/openbsd.pl	Hint for POSIX for named architecture
+ ext/POSIX/hints/sunos_4.pl	Hint for POSIX for named architecture
+ ext/POSIX/hints/svr4.pl		Hint for POSIX for named architecture
+ ext/POSIX/hints/uts.pl		Hint for POSIX for named architecture
++ext/POSIX/lib/POSIX.pm		POSIX extension Perl module
++ext/POSIX/lib/POSIX.pod		POSIX extension documentation
+ ext/POSIX/Makefile.PL		POSIX extension makefile writer
+-ext/POSIX/POSIX.pm		POSIX extension Perl module
+-ext/POSIX/POSIX.pod		POSIX extension documentation
+ ext/POSIX/POSIX.xs		POSIX extension external subroutines
+ ext/POSIX/t/is.t		See if POSIX isxxx() work
+ ext/POSIX/t/math.t		Basic math tests for POSIX
+diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL
+index 292882c..07c3841 100644
+--- a/ext/POSIX/Makefile.PL
++++ b/ext/POSIX/Makefile.PL
+@@ -18,7 +18,8 @@ WriteMakefile(
+     NAME	=> 'POSIX',
+     @libs,
+     XSPROTOARG	=> '-noprototypes',	# XXX remove later?
+-    VERSION_FROM => 'POSIX.pm',
++    VERSION_FROM => 'lib/POSIX.pm',
++    ABSTRACT_FROM => 'lib/POSIX.pod',
+     realclean	=> {FILES=> 'const-c.inc const-xs.inc'},
+ );
+ 
+diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm
+deleted file mode 100644
+index ffbd9de..0000000
+--- a/ext/POSIX/POSIX.pm
++++ /dev/null
+@@ -1,1042 +0,0 @@
+-package POSIX;
+-use strict;
+-use warnings;
+-
+-our(@ISA, %EXPORT_TAGS, @EXPORT_OK, @EXPORT, $AUTOLOAD, %SIGRT) = ();
+-
+-our $VERSION = "1.19";
+-
+-use AutoLoader;
+-
+-use XSLoader ();
+-
+-use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
+-	     F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
+-	     O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
+-	     O_WRONLY SEEK_CUR SEEK_END SEEK_SET
+-	     S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
+-	     S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
+-	     S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR);
+-
+-# Grandfather old foo_h form to new :foo_h form
+-my $loaded;
+-
+-sub import {
+-    load_imports() unless $loaded++;
+-    my $this = shift;
+-    my @list = map { m/^\w+_h$/ ? ":$_" : $_ } @_;
+-    local $Exporter::ExportLevel = 1;
+-    Exporter::import($this,@list);
+-}
+-
+-sub croak { require Carp;  goto &Carp::croak }
+-# declare usage to assist AutoLoad
+-sub usage;
+-
+-XSLoader::load 'POSIX', $VERSION;
+-
+-sub AUTOLOAD {
+-    no strict;
+-    no warnings 'uninitialized';
+-    if ($AUTOLOAD =~ /::(_?[a-z])/) {
+-	# require AutoLoader;
+-	$AutoLoader::AUTOLOAD = $AUTOLOAD;
+-	goto &AutoLoader::AUTOLOAD
+-    }
+-    local $! = 0;
+-    my $constname = $AUTOLOAD;
+-    $constname =~ s/.*:://;
+-    my ($error, $val) = constant($constname);
+-    croak $error if $error;
+-    *$AUTOLOAD = sub { $val };
+-
+-    goto &$AUTOLOAD;
+-}
+-
+-package POSIX::SigAction;
+-
+-use AutoLoader 'AUTOLOAD';
+-
+-package POSIX::SigRt;
+-
+-use AutoLoader 'AUTOLOAD';
+-
+-use Tie::Hash;
+-
+-use vars qw($SIGACTION_FLAGS $_SIGRTMIN $_SIGRTMAX $_sigrtn @ISA);
+-@POSIX::SigRt::ISA = qw(Tie::StdHash);
+-
+-$SIGACTION_FLAGS = 0;
+-
+-tie %POSIX::SIGRT, 'POSIX::SigRt';
+-
+-sub DESTROY {};
+-
+-package POSIX;
+-
+-1;
+-__END__
+-
+-sub usage {
+-    my ($mess) = @_;
+-    croak "Usage: POSIX::$mess";
+-}
+-
+-sub redef {
+-    my ($mess) = @_;
+-    croak "Use method $mess instead";
+-}
+-
+-sub unimpl {
+-    my ($mess) = @_;
+-    $mess =~ s/xxx//;
+-    croak "Unimplemented: POSIX::$mess";
+-}
+-
+-sub assert {
+-    usage "assert(expr)" if @_ != 1;
+-    if (!$_[0]) {
+-	croak "Assertion failed";
+-    }
+-}
+-
+-sub tolower {
+-    usage "tolower(string)" if @_ != 1;
+-    lc($_[0]);
+-}
+-
+-sub toupper {
+-    usage "toupper(string)" if @_ != 1;
+-    uc($_[0]);
+-}
+-
+-sub closedir {
+-    usage "closedir(dirhandle)" if @_ != 1;
+-    CORE::closedir($_[0]);
+-}
+-
+-sub opendir {
+-    usage "opendir(directory)" if @_ != 1;
+-    my $dirhandle;
+-    CORE::opendir($dirhandle, $_[0])
+-	? $dirhandle
+-	: undef;
+-}
+-
+-sub readdir {
+-    usage "readdir(dirhandle)" if @_ != 1;
+-    CORE::readdir($_[0]);
+-}
+-
+-sub rewinddir {
+-    usage "rewinddir(dirhandle)" if @_ != 1;
+-    CORE::rewinddir($_[0]);
+-}
+-
+-sub errno {
+-    usage "errno()" if @_ != 0;
+-    $! + 0;
+-}
+-
+-sub creat {
+-    usage "creat(filename, mode)" if @_ != 2;
+-    &open($_[0], &O_WRONLY | &O_CREAT | &O_TRUNC, $_[1]);
+-}
+-
+-sub fcntl {
+-    usage "fcntl(filehandle, cmd, arg)" if @_ != 3;
+-    CORE::fcntl($_[0], $_[1], $_[2]);
+-}
+-
+-sub getgrgid {
+-    usage "getgrgid(gid)" if @_ != 1;
+-    CORE::getgrgid($_[0]);
+-}
+-
+-sub getgrnam {
+-    usage "getgrnam(name)" if @_ != 1;
+-    CORE::getgrnam($_[0]);
+-}
+-
+-sub atan2 {
+-    usage "atan2(x,y)" if @_ != 2;
+-    CORE::atan2($_[0], $_[1]);
+-}
+-
+-sub cos {
+-    usage "cos(x)" if @_ != 1;
+-    CORE::cos($_[0]);
+-}
+-
+-sub exp {
+-    usage "exp(x)" if @_ != 1;
+-    CORE::exp($_[0]);
+-}
+-
+-sub fabs {
+-    usage "fabs(x)" if @_ != 1;
+-    CORE::abs($_[0]);
+-}
+-
+-sub log {
+-    usage "log(x)" if @_ != 1;
+-    CORE::log($_[0]);
+-}
+-
+-sub pow {
+-    usage "pow(x,exponent)" if @_ != 2;
+-    $_[0] ** $_[1];
+-}
+-
+-sub sin {
+-    usage "sin(x)" if @_ != 1;
+-    CORE::sin($_[0]);
+-}
+-
+-sub sqrt {
+-    usage "sqrt(x)" if @_ != 1;
+-    CORE::sqrt($_[0]);
+-}
+-
+-sub getpwnam {
+-    usage "getpwnam(name)" if @_ != 1;
+-    CORE::getpwnam($_[0]);
+-}
+-
+-sub getpwuid {
+-    usage "getpwuid(uid)" if @_ != 1;
+-    CORE::getpwuid($_[0]);
+-}
+-
+-sub longjmp {
+-    unimpl "longjmp() is C-specific: use die instead";
+-}
+-
+-sub setjmp {
+-    unimpl "setjmp() is C-specific: use eval {} instead";
+-}
+-
+-sub siglongjmp {
+-    unimpl "siglongjmp() is C-specific: use die instead";
+-}
+-
+-sub sigsetjmp {
+-    unimpl "sigsetjmp() is C-specific: use eval {} instead";
+-}
+-
+-sub kill {
+-    usage "kill(pid, sig)" if @_ != 2;
+-    CORE::kill $_[1], $_[0];
+-}
+-
+-sub raise {
+-    usage "raise(sig)" if @_ != 1;
+-    CORE::kill $_[0], $$;	# Is this good enough?
+-}
+-
+-sub offsetof {
+-    unimpl "offsetof() is C-specific, stopped";
+-}
+-
+-sub clearerr {
+-    redef "IO::Handle::clearerr()";
+-}
+-
+-sub fclose {
+-    redef "IO::Handle::close()";
+-}
+-
+-sub fdopen {
+-    redef "IO::Handle::new_from_fd()";
+-}
+-
+-sub feof {
+-    redef "IO::Handle::eof()";
+-}
+-
+-sub fgetc {
+-    redef "IO::Handle::getc()";
+-}
+-
+-sub fgets {
+-    redef "IO::Handle::gets()";
+-}
+-
+-sub fileno {
+-    redef "IO::Handle::fileno()";
+-}
+-
+-sub fopen {
+-    redef "IO::File::open()";
+-}
+-
+-sub fprintf {
+-    unimpl "fprintf() is C-specific--use printf instead";
+-}
+-
+-sub fputc {
+-    unimpl "fputc() is C-specific--use print instead";
+-}
+-
+-sub fputs {
+-    unimpl "fputs() is C-specific--use print instead";
+-}
+-
+-sub fread {
+-    unimpl "fread() is C-specific--use read instead";
+-}
+-
+-sub freopen {
+-    unimpl "freopen() is C-specific--use open instead";
+-}
+-
+-sub fscanf {
+-    unimpl "fscanf() is C-specific--use <> and regular expressions instead";
+-}
+-
+-sub fseek {
+-    redef "IO::Seekable::seek()";
+-}
+-
+-sub fsync {
+-    redef "IO::Handle::sync()";
+-}
+-
+-sub ferror {
+-    redef "IO::Handle::error()";
+-}
+-
+-sub fflush {
+-    redef "IO::Handle::flush()";
+-}
+-
+-sub fgetpos {
+-    redef "IO::Seekable::getpos()";
+-}
+-
+-sub fsetpos {
+-    redef "IO::Seekable::setpos()";
+-}
+-
+-sub ftell {
+-    redef "IO::Seekable::tell()";
+-}
+-
+-sub fwrite {
+-    unimpl "fwrite() is C-specific--use print instead";
+-}
+-
+-sub getc {
+-    usage "getc(handle)" if @_ != 1;
+-    CORE::getc($_[0]);
+-}
+-
+-sub getchar {
+-    usage "getchar()" if @_ != 0;
+-    CORE::getc(STDIN);
+-}
+-
+-sub gets {
+-    usage "gets()" if @_ != 0;
+-    scalar <STDIN>;
+-}
+-
+-sub perror {
+-    print STDERR "@_: " if @_;
+-    print STDERR $!,"\n";
+-}
+-
+-sub printf {
+-    usage "printf(pattern, args...)" if @_ < 1;
+-    CORE::printf STDOUT @_;
+-}
+-
+-sub putc {
+-    unimpl "putc() is C-specific--use print instead";
+-}
+-
+-sub putchar {
+-    unimpl "putchar() is C-specific--use print instead";
+-}
+-
+-sub puts {
+-    unimpl "puts() is C-specific--use print instead";
+-}
+-
+-sub remove {
+-    usage "remove(filename)" if @_ != 1;
+-    (-d $_[0]) ? CORE::rmdir($_[0]) : CORE::unlink($_[0]);
+-}
+-
+-sub rename {
+-    usage "rename(oldfilename, newfilename)" if @_ != 2;
+-    CORE::rename($_[0], $_[1]);
+-}
+-
+-sub rewind {
+-    usage "rewind(filehandle)" if @_ != 1;
+-    CORE::seek($_[0],0,0);
+-}
+-
+-sub scanf {
+-    unimpl "scanf() is C-specific--use <> and regular expressions instead";
+-}
+-
+-sub sprintf {
+-    usage "sprintf(pattern,args)" if @_ == 0;
+-    CORE::sprintf(shift,@_);
+-}
+-
+-sub sscanf {
+-    unimpl "sscanf() is C-specific--use regular expressions instead";
+-}
+-
+-sub tmpfile {
+-    redef "IO::File::new_tmpfile()";
+-}
+-
+-sub ungetc {
+-    redef "IO::Handle::ungetc()";
+-}
+-
+-sub vfprintf {
+-    unimpl "vfprintf() is C-specific";
+-}
+-
+-sub vprintf {
+-    unimpl "vprintf() is C-specific";
+-}
+-
+-sub vsprintf {
+-    unimpl "vsprintf() is C-specific";
+-}
+-
+-sub abs {
+-    usage "abs(x)" if @_ != 1;
+-    CORE::abs($_[0]);
+-}
+-
+-sub atexit {
+-    unimpl "atexit() is C-specific: use END {} instead";
+-}
+-
+-sub atof {
+-    unimpl "atof() is C-specific, stopped";
+-}
+-
+-sub atoi {
+-    unimpl "atoi() is C-specific, stopped";
+-}
+-
+-sub atol {
+-    unimpl "atol() is C-specific, stopped";
+-}
+-
+-sub bsearch {
+-    unimpl "bsearch() not supplied";
+-}
+-
+-sub calloc {
+-    unimpl "calloc() is C-specific, stopped";
+-}
+-
+-sub div {
+-    unimpl "div() is C-specific, use /, % and int instead";
+-}
+-
+-sub exit {
+-    usage "exit(status)" if @_ != 1;
+-    CORE::exit($_[0]);
+-}
+-
+-sub free {
+-    unimpl "free() is C-specific, stopped";
+-}
+-
+-sub getenv {
+-    usage "getenv(name)" if @_ != 1;
+-    $ENV{$_[0]};
+-}
+-
+-sub labs {
+-    unimpl "labs() is C-specific, use abs instead";
+-}
+-
+-sub ldiv {
+-    unimpl "ldiv() is C-specific, use /, % and int instead";
+-}
+-
+-sub malloc {
+-    unimpl "malloc() is C-specific, stopped";
+-}
+-
+-sub qsort {
+-    unimpl "qsort() is C-specific, use sort instead";
+-}
+-
+-sub rand {
+-    unimpl "rand() is non-portable, use Perl's rand instead";
+-}
+-
+-sub realloc {
+-    unimpl "realloc() is C-specific, stopped";
+-}
+-
+-sub srand {
+-    unimpl "srand()";
+-}
+-
+-sub system {
+-    usage "system(command)" if @_ != 1;
+-    CORE::system($_[0]);
+-}
+-
+-sub memchr {
+-    unimpl "memchr() is C-specific, use index() instead";
+-}
+-
+-sub memcmp {
+-    unimpl "memcmp() is C-specific, use eq instead";
+-}
+-
+-sub memcpy {
+-    unimpl "memcpy() is C-specific, use = instead";
+-}
+-
+-sub memmove {
+-    unimpl "memmove() is C-specific, use = instead";
+-}
+-
+-sub memset {
+-    unimpl "memset() is C-specific, use x instead";
+-}
+-
+-sub strcat {
+-    unimpl "strcat() is C-specific, use .= instead";
+-}
+-
+-sub strchr {
+-    unimpl "strchr() is C-specific, use index() instead";
+-}
+-
+-sub strcmp {
+-    unimpl "strcmp() is C-specific, use eq instead";
+-}
+-
+-sub strcpy {
+-    unimpl "strcpy() is C-specific, use = instead";
+-}
+-
+-sub strcspn {
+-    unimpl "strcspn() is C-specific, use regular expressions instead";
+-}
+-
+-sub strerror {
+-    usage "strerror(errno)" if @_ != 1;
+-    local $! = $_[0];
+-    $! . "";
+-}
+-
+-sub strlen {
+-    unimpl "strlen() is C-specific, use length instead";
+-}
+-
+-sub strncat {
+-    unimpl "strncat() is C-specific, use .= instead";
+-}
+-
+-sub strncmp {
+-    unimpl "strncmp() is C-specific, use eq instead";
+-}
+-
+-sub strncpy {
+-    unimpl "strncpy() is C-specific, use = instead";
+-}
+-
+-sub strpbrk {
+-    unimpl "strpbrk() is C-specific, stopped";
+-}
+-
+-sub strrchr {
+-    unimpl "strrchr() is C-specific, use rindex() instead";
+-}
+-
+-sub strspn {
+-    unimpl "strspn() is C-specific, stopped";
+-}
+-
+-sub strstr {
+-    usage "strstr(big, little)" if @_ != 2;
+-    CORE::index($_[0], $_[1]);
+-}
+-
+-sub strtok {
+-    unimpl "strtok() is C-specific, stopped";
+-}
+-
+-sub chmod {
+-    usage "chmod(mode, filename)" if @_ != 2;
+-    CORE::chmod($_[0], $_[1]);
+-}
+-
+-sub fstat {
+-    usage "fstat(fd)" if @_ != 1;
+-    local *TMP;
+-    CORE::open(TMP, "<&$_[0]");		# Gross.
+-    my @l = CORE::stat(TMP);
+-    CORE::close(TMP);
+-    @l;
+-}
+-
+-sub mkdir {
+-    usage "mkdir(directoryname, mode)" if @_ != 2;
+-    CORE::mkdir($_[0], $_[1]);
+-}
+-
+-sub stat {
+-    usage "stat(filename)" if @_ != 1;
+-    CORE::stat($_[0]);
+-}
+-
+-sub umask {
+-    usage "umask(mask)" if @_ != 1;
+-    CORE::umask($_[0]);
+-}
+-
+-sub wait {
+-    usage "wait()" if @_ != 0;
+-    CORE::wait();
+-}
+-
+-sub waitpid {
+-    usage "waitpid(pid, options)" if @_ != 2;
+-    CORE::waitpid($_[0], $_[1]);
+-}
+-
+-sub gmtime {
+-    usage "gmtime(time)" if @_ != 1;
+-    CORE::gmtime($_[0]);
+-}
+-
+-sub localtime {
+-    usage "localtime(time)" if @_ != 1;
+-    CORE::localtime($_[0]);
+-}
+-
+-sub time {
+-    usage "time()" if @_ != 0;
+-    CORE::time;
+-}
+-
+-sub alarm {
+-    usage "alarm(seconds)" if @_ != 1;
+-    CORE::alarm($_[0]);
+-}
+-
+-sub chdir {
+-    usage "chdir(directory)" if @_ != 1;
+-    CORE::chdir($_[0]);
+-}
+-
+-sub chown {
+-    usage "chown(uid, gid, filename)" if @_ != 3;
+-    CORE::chown($_[0], $_[1], $_[2]);
+-}
+-
+-sub execl {
+-    unimpl "execl() is C-specific, stopped";
+-}
+-
+-sub execle {
+-    unimpl "execle() is C-specific, stopped";
+-}
+-
+-sub execlp {
+-    unimpl "execlp() is C-specific, stopped";
+-}
+-
+-sub execv {
+-    unimpl "execv() is C-specific, stopped";
+-}
+-
+-sub execve {
+-    unimpl "execve() is C-specific, stopped";
+-}
+-
+-sub execvp {
+-    unimpl "execvp() is C-specific, stopped";
+-}
+-
+-sub fork {
+-    usage "fork()" if @_ != 0;
+-    CORE::fork;
+-}
+-
+-sub getegid {
+-    usage "getegid()" if @_ != 0;
+-    $) + 0;
+-}
+-
+-sub geteuid {
+-    usage "geteuid()" if @_ != 0;
+-    $> + 0;
+-}
+-
+-sub getgid {
+-    usage "getgid()" if @_ != 0;
+-    $( + 0;
+-}
+-
+-sub getgroups {
+-    usage "getgroups()" if @_ != 0;
+-    my %seen;
+-    grep(!$seen{$_}++, split(' ', $) ));
+-}
+-
+-sub getlogin {
+-    usage "getlogin()" if @_ != 0;
+-    CORE::getlogin();
+-}
+-
+-sub getpgrp {
+-    usage "getpgrp()" if @_ != 0;
+-    CORE::getpgrp;
+-}
+-
+-sub getpid {
+-    usage "getpid()" if @_ != 0;
+-    $$;
+-}
+-
+-sub getppid {
+-    usage "getppid()" if @_ != 0;
+-    CORE::getppid;
+-}
+-
+-sub getuid {
+-    usage "getuid()" if @_ != 0;
+-    $<;
+-}
+-
+-sub isatty {
+-    usage "isatty(filehandle)" if @_ != 1;
+-    -t $_[0];
+-}
+-
+-sub link {
+-    usage "link(oldfilename, newfilename)" if @_ != 2;
+-    CORE::link($_[0], $_[1]);
+-}
+-
+-sub rmdir {
+-    usage "rmdir(directoryname)" if @_ != 1;
+-    CORE::rmdir($_[0]);
+-}
+-
+-sub setbuf {
+-    redef "IO::Handle::setbuf()";
+-}
+-
+-sub setvbuf {
+-    redef "IO::Handle::setvbuf()";
+-}
+-
+-sub sleep {
+-    usage "sleep(seconds)" if @_ != 1;
+-    $_[0] - CORE::sleep($_[0]);
+-}
+-
+-sub unlink {
+-    usage "unlink(filename)" if @_ != 1;
+-    CORE::unlink($_[0]);
+-}
+-
+-sub utime {
+-    usage "utime(filename, atime, mtime)" if @_ != 3;
+-    CORE::utime($_[1], $_[2], $_[0]);
+-}
+-
+-sub load_imports {
+-%EXPORT_TAGS = (
+-
+-    assert_h =>	[qw(assert NDEBUG)],
+-
+-    ctype_h =>	[qw(isalnum isalpha iscntrl isdigit isgraph islower
+-		isprint ispunct isspace isupper isxdigit tolower toupper)],
+-
+-    dirent_h =>	[],
+-
+-    errno_h =>	[qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT
+-		EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED
+-		ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT
+-		EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS
+-		EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
+-		EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH
+-		ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM
+-		ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
+-		ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
+-		EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE
+-		ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT
+-		ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY
+-		EUSERS EWOULDBLOCK EXDEV errno)],
+-
+-    fcntl_h =>	[qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK
+-		F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK
+-		O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK
+-		O_RDONLY O_RDWR O_TRUNC O_WRONLY
+-		creat
+-		SEEK_CUR SEEK_END SEEK_SET
+-		S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
+-		S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID
+-		S_IWGRP S_IWOTH S_IWUSR)],
+-
+-    float_h =>	[qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG
+-		DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP
+-		DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP
+-		FLT_DIG FLT_EPSILON FLT_MANT_DIG
+-		FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP
+-		FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP
+-		FLT_RADIX FLT_ROUNDS
+-		LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG
+-		LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP
+-		LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)],
+-
+-    grp_h =>	[],
+-
+-    limits_h =>	[qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX
+-		INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON
+-		MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX
+-		PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN
+-		SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX
+-		ULONG_MAX USHRT_MAX _POSIX_ARG_MAX _POSIX_CHILD_MAX
+-		_POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT
+-		_POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX
+-		_POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX
+-		_POSIX_STREAM_MAX _POSIX_TZNAME_MAX)],
+-
+-    locale_h =>	[qw(LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES
+-		    LC_MONETARY LC_NUMERIC LC_TIME NULL
+-		    localeconv setlocale)],
+-
+-    math_h =>	[qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
+-		frexp ldexp log10 modf pow sinh tan tanh)],
+-
+-    pwd_h =>	[],
+-
+-    setjmp_h =>	[qw(longjmp setjmp siglongjmp sigsetjmp)],
+-
+-    signal_h =>	[qw(SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK
+-		SA_RESETHAND SA_RESTART SA_SIGINFO SIGABRT SIGALRM
+-		SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL
+-		SIGPIPE %SIGRT SIGRTMIN SIGRTMAX SIGQUIT SIGSEGV SIGSTOP
+-		SIGTERM SIGTSTP SIGTTIN	SIGTTOU SIGUSR1 SIGUSR2
+-		SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
+-		raise sigaction signal sigpending sigprocmask sigsuspend)],
+-
+-    stdarg_h =>	[],
+-
+-    stddef_h =>	[qw(NULL offsetof)],
+-
+-    stdio_h =>	[qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid
+-		L_tmpname NULL SEEK_CUR SEEK_END SEEK_SET
+-		STREAM_MAX TMP_MAX stderr stdin stdout
+-		clearerr fclose fdopen feof ferror fflush fgetc fgetpos
+-		fgets fopen fprintf fputc fputs fread freopen
+-		fscanf fseek fsetpos ftell fwrite getchar gets
+-		perror putc putchar puts remove rewind
+-		scanf setbuf setvbuf sscanf tmpfile tmpnam
+-		ungetc vfprintf vprintf vsprintf)],
+-
+-    stdlib_h =>	[qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX
+-		abort atexit atof atoi atol bsearch calloc div
+-		free getenv labs ldiv malloc mblen mbstowcs mbtowc
+-		qsort realloc strtod strtol strtoul wcstombs wctomb)],
+-
+-    string_h =>	[qw(NULL memchr memcmp memcpy memmove memset strcat
+-		strchr strcmp strcoll strcpy strcspn strerror strlen
+-		strncat strncmp strncpy strpbrk strrchr strspn strstr
+-		strtok strxfrm)],
+-
+-    sys_stat_h => [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
+-		S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG
+-		S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
+-		fstat mkfifo)],
+-
+-    sys_times_h => [],
+-
+-    sys_types_h => [],
+-
+-    sys_utsname_h => [qw(uname)],
+-
+-    sys_wait_h => [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED
+-		WNOHANG WSTOPSIG WTERMSIG WUNTRACED)],
+-
+-    termios_h => [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400
+-		B300 B38400 B4800 B50 B600 B75 B9600 BRKINT CLOCAL
+-		CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB ECHO ECHOE ECHOK
+-		ECHONL HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR
+-		INLCR INPCK ISIG ISTRIP IXOFF IXON NCCS NOFLSH OPOST
+-		PARENB PARMRK PARODD TCIFLUSH TCIOFF TCIOFLUSH TCION
+-		TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW
+-		TOSTOP VEOF VEOL VERASE VINTR VKILL VMIN VQUIT VSTART
+-		VSTOP VSUSP VTIME
+-		cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain
+-		tcflow tcflush tcgetattr tcsendbreak tcsetattr )],
+-
+-    time_h =>	[qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime
+-		difftime mktime strftime tzset tzname)],
+-
+-    unistd_h =>	[qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET
+-		STDERR_FILENO STDIN_FILENO STDOUT_FILENO W_OK X_OK
+-		_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON
+-		_PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX
+-		_PC_PIPE_BUF _PC_VDISABLE _POSIX_CHOWN_RESTRICTED
+-		_POSIX_JOB_CONTROL _POSIX_NO_TRUNC _POSIX_SAVED_IDS
+-		_POSIX_VDISABLE _POSIX_VERSION _SC_ARG_MAX
+-		_SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL
+-		_SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS
+-		_SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
+-		_exit access ctermid cuserid
+-		dup2 dup execl execle execlp execv execve execvp
+-		fpathconf fsync getcwd getegid geteuid getgid getgroups
+-		getpid getuid isatty lseek pathconf pause setgid setpgid
+-		setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)],
+-
+-    utime_h =>	[],
+-
+-);
+-
+-# Exporter::export_tags();
+-{
+-  # De-duplicate the export list: 
+-  my %export;
+-  @export{map {@$_} values %EXPORT_TAGS} = ();
+-  # Doing the de-dup with a temporary hash has the advantage that the SVs in
+-  # @EXPORT are actually shared hash key sacalars, which will save some memory.
+-  push @EXPORT, keys %export;
+-}
+-
+-@EXPORT_OK = qw(
+-		abs
+-		alarm
+-		atan2
+-		chdir
+-		chmod
+-		chown
+-		close
+-		closedir
+-		cos
+-		exit
+-		exp
+-		fcntl
+-		fileno
+-		fork
+-		getc
+-		getgrgid
+-		getgrnam
+-		getlogin
+-		getpgrp
+-		getppid
+-		getpwnam
+-		getpwuid
+-		gmtime
+-		isatty
+-		kill
+-		lchown
+-		link
+-		localtime
+-		log
+-		mkdir
+-		nice
+-		open
+-		opendir
+-		pipe
+-		printf
+-		rand
+-		read
+-		readdir
+-		rename
+-		rewinddir
+-		rmdir
+-		sin
+-		sleep
+-		sprintf
+-		sqrt
+-		srand
+-		stat
+-		system
+-		time
+-		times
+-		umask
+-		unlink
+-		utime
+-		wait
+-		waitpid
+-		write
+-);
+-
+-require Exporter;
+-}
+-
+-package POSIX::SigAction;
+-
+-sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0, SAFE => 0}, $_[0] }
+-sub handler { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} };
+-sub mask    { $_[0]->{MASK}    = $_[1] if @_ > 1; $_[0]->{MASK} };
+-sub flags   { $_[0]->{FLAGS}   = $_[1] if @_ > 1; $_[0]->{FLAGS} };
+-sub safe    { $_[0]->{SAFE}    = $_[1] if @_ > 1; $_[0]->{SAFE} };
+-
+-package POSIX::SigRt;
+-
+-
+-sub _init {
+-    $_SIGRTMIN = &POSIX::SIGRTMIN;
+-    $_SIGRTMAX = &POSIX::SIGRTMAX;
+-    $_sigrtn   = $_SIGRTMAX - $_SIGRTMIN;
+-}
+-
+-sub _croak {
+-    &_init unless defined $_sigrtn;
+-    die "POSIX::SigRt not available" unless defined $_sigrtn && $_sigrtn > 0;
+-}
+-
+-sub _getsig {
+-    &_croak;
+-    my $rtsig = $_[0];
+-    # Allow (SIGRT)?MIN( + n)?, a common idiom when doing these things in C.
+-    $rtsig = $_SIGRTMIN + ($1 || 0)
+-	if $rtsig =~ /^(?:(?:SIG)?RT)?MIN(\s*\+\s*(\d+))?$/;
+-    return $rtsig;
+-}
+-
+-sub _exist {
+-    my $rtsig = _getsig($_[1]);
+-    my $ok    = $rtsig >= $_SIGRTMIN && $rtsig <= $_SIGRTMAX;
+-    ($rtsig, $ok);
+-}
+-
+-sub _check {
+-    my ($rtsig, $ok) = &_exist;
+-    die "No POSIX::SigRt signal $_[1] (valid range SIGRTMIN..SIGRTMAX, or $_SIGRTMIN..$_SIGRTMAX)"
+-	unless $ok;
+-    return $rtsig;
+-}
+-
+-sub new {
+-    my ($rtsig, $handler, $flags) = @_;
+-    my $sigset = POSIX::SigSet->new($rtsig);
+-    my $sigact = POSIX::SigAction->new($handler,
+-				       $sigset,
+-				       $flags);
+-    POSIX::sigaction($rtsig, $sigact);
+-}
+-
+-sub EXISTS { &_exist }
+-sub FETCH  { my $rtsig = &_check;
+-	     my $oa = POSIX::SigAction->new();
+-	     POSIX::sigaction($rtsig, undef, $oa);
+-	     return $oa->{HANDLER} }
+-sub STORE  { my $rtsig = &_check; new($rtsig, $_[2], $SIGACTION_FLAGS) }
+-sub DELETE { delete $SIG{ &_check } }
+-sub CLEAR  { &_exist; delete @SIG{ &POSIX::SIGRTMIN .. &POSIX::SIGRTMAX } }
+-sub SCALAR { &_croak; $_sigrtn + 1 }
+diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod
+deleted file mode 100644
+index 64852e9..0000000
+--- a/ext/POSIX/POSIX.pod
++++ /dev/null
+@@ -1,2218 +0,0 @@
+-=head1 NAME
+-
+-POSIX - Perl interface to IEEE Std 1003.1
+-
+-=head1 SYNOPSIS
+-
+-    use POSIX;
+-    use POSIX qw(setsid);
+-    use POSIX qw(:errno_h :fcntl_h);
+-
+-    printf "EINTR is %d\n", EINTR;
+-
+-    $sess_id = POSIX::setsid();
+-
+-    $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
+-	# note: that's a filedescriptor, *NOT* a filehandle
+-
+-=head1 DESCRIPTION
+-
+-The POSIX module permits you to access all (or nearly all) the standard
+-POSIX 1003.1 identifiers.  Many of these identifiers have been given Perl-ish
+-interfaces.
+-
+-I<Everything is exported by default> with the exception of any POSIX
+-functions with the same name as a built-in Perl function, such as
+-C<abs>, C<alarm>, C<rmdir>, C<write>, etc.., which will be exported
+-only if you ask for them explicitly.  This is an unfortunate backwards
+-compatibility feature.  You can stop the exporting by saying C<use
+-POSIX ()> and then use the fully qualified names (ie. C<POSIX::SEEK_END>).
+-
+-This document gives a condensed list of the features available in the POSIX
+-module.  Consult your operating system's manpages for general information on
+-most features.  Consult L<perlfunc> for functions which are noted as being
+-identical to Perl's builtin functions.
+-
+-The first section describes POSIX functions from the 1003.1 specification.
+-The second section describes some classes for signal objects, TTY objects,
+-and other miscellaneous objects.  The remaining sections list various
+-constants and macros in an organization which roughly follows IEEE Std
+-1003.1b-1993.
+-
+-=head1 NOTE
+-
+-The POSIX module is probably the most complex Perl module supplied with
+-the standard distribution.  It incorporates autoloading, namespace games,
+-and dynamic loading of code that's in Perl, C, or both.  It's a great
+-source of wisdom.
+-
+-=head1 CAVEATS
+-
+-A few functions are not implemented because they are C specific.  If you
+-attempt to call these, they will print a message telling you that they
+-aren't implemented, and suggest using the Perl equivalent should one
+-exist.  For example, trying to access the setjmp() call will elicit the
+-message "setjmp() is C-specific: use eval {} instead".
+-
+-Furthermore, some evil vendors will claim 1003.1 compliance, but in fact
+-are not so: they will not pass the PCTS (POSIX Compliance Test Suites).
+-For example, one vendor may not define EDEADLK, or the semantics of the
+-errno values set by open(2) might not be quite right.  Perl does not
+-attempt to verify POSIX compliance.  That means you can currently
+-successfully say "use POSIX",  and then later in your program you find
+-that your vendor has been lax and there's no usable ICANON macro after
+-all.  This could be construed to be a bug.
+-
+-=head1 FUNCTIONS
+-
+-=over 8
+-
+-=item _exit
+-
+-This is identical to the C function C<_exit()>.  It exits the program
+-immediately which means among other things buffered I/O is B<not> flushed.
+-
+-Note that when using threads and in Linux this is B<not> a good way to
+-exit a thread because in Linux processes and threads are kind of the
+-same thing (Note: while this is the situation in early 2003 there are
+-projects under way to have threads with more POSIXly semantics in Linux).
+-If you want not to return from a thread, detach the thread.
+-
+-=item abort
+-
+-This is identical to the C function C<abort()>.  It terminates the
+-process with a C<SIGABRT> signal unless caught by a signal handler or
+-if the handler does not return normally (it e.g.  does a C<longjmp>).
+-
+-=item abs
+-
+-This is identical to Perl's builtin C<abs()> function, returning
+-the absolute value of its numerical argument.
+-
+-=item access
+-
+-Determines the accessibility of a file.
+-
+-	if( POSIX::access( "/", &POSIX::R_OK ) ){
+-		print "have read permission\n";
+-	}
+-
+-Returns C<undef> on failure.  Note: do not use C<access()> for
+-security purposes.  Between the C<access()> call and the operation
+-you are preparing for the permissions might change: a classic
+-I<race condition>.
+-
+-=item acos
+-
+-This is identical to the C function C<acos()>, returning
+-the arcus cosine of its numerical argument.  See also L<Math::Trig>.
+-
+-=item alarm
+-
+-This is identical to Perl's builtin C<alarm()> function,
+-either for arming or disarming the C<SIGARLM> timer.
+-
+-=item asctime
+-
+-This is identical to the C function C<asctime()>.  It returns
+-a string of the form
+-
+-	"Fri Jun  2 18:22:13 2000\n\0"
+-
+-and it is called thusly
+-
+-	$asctime = asctime($sec, $min, $hour, $mday, $mon, $year,
+-			   $wday, $yday, $isdst);
+-
+-The C<$mon> is zero-based: January equals C<0>.  The C<$year> is
+-1900-based: 2001 equals C<101>.  C<$wday> and C<$yday> default to zero
+-(and are usually ignored anyway), and C<$isdst> defaults to -1.
+-
+-=item asin
+-
+-This is identical to the C function C<asin()>, returning
+-the arcus sine of its numerical argument.  See also L<Math::Trig>.
+-
+-=item assert
+-
+-Unimplemented, but you can use L<perlfunc/die> and the L<Carp> module
+-to achieve similar things.
+-
+-=item atan
+-
+-This is identical to the C function C<atan()>, returning the
+-arcus tangent of its numerical argument.  See also L<Math::Trig>.
+-
+-=item atan2
+-
+-This is identical to Perl's builtin C<atan2()> function, returning
+-the arcus tangent defined by its two numerical arguments, the I<y>
+-coordinate and the I<x> coordinate.  See also L<Math::Trig>.
+-
+-=item atexit
+-
+-atexit() is C-specific: use C<END {}> instead, see L<perlsub>.
+-
+-=item atof
+-
+-atof() is C-specific.  Perl converts strings to numbers transparently.
+-If you need to force a scalar to a number, add a zero to it.
+-
+-=item atoi
+-
+-atoi() is C-specific.  Perl converts strings to numbers transparently.
+-If you need to force a scalar to a number, add a zero to it.
+-If you need to have just the integer part, see L<perlfunc/int>.
+-
+-=item atol
+-
+-atol() is C-specific.  Perl converts strings to numbers transparently.
+-If you need to force a scalar to a number, add a zero to it.
+-If you need to have just the integer part, see L<perlfunc/int>.
+-
+-=item bsearch
+-
+-bsearch() not supplied.  For doing binary search on wordlists,
+-see L<Search::Dict>.
+-
+-=item calloc
+-
+-calloc() is C-specific.  Perl does memory management transparently.
+-
+-=item ceil
+-
+-This is identical to the C function C<ceil()>, returning the smallest
+-integer value greater than or equal to the given numerical argument.
+-
+-=item chdir
+-
+-This is identical to Perl's builtin C<chdir()> function, allowing
+-one to change the working (default) directory, see L<perlfunc/chdir>.
+-
+-=item chmod
+-
+-This is identical to Perl's builtin C<chmod()> function, allowing
+-one to change file and directory permissions, see L<perlfunc/chmod>.
+-
+-=item chown
+-
+-This is identical to Perl's builtin C<chown()> function, allowing one
+-to change file and directory owners and groups, see L<perlfunc/chown>.
+-
+-=item clearerr
+-
+-Use the method C<IO::Handle::clearerr()> instead, to reset the error
+-state (if any) and EOF state (if any) of the given stream.
+-
+-=item clock
+-
+-This is identical to the C function C<clock()>, returning the
+-amount of spent processor time in microseconds.
+-
+-=item close
+-
+-Close the file.  This uses file descriptors such as those obtained by calling
+-C<POSIX::open>.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
+-	POSIX::close( $fd );
+-
+-Returns C<undef> on failure.
+-
+-See also L<perlfunc/close>.
+-
+-=item closedir
+-
+-This is identical to Perl's builtin C<closedir()> function for closing
+-a directory handle, see L<perlfunc/closedir>.
+-
+-=item cos
+-
+-This is identical to Perl's builtin C<cos()> function, for returning
+-the cosine of its numerical argument, see L<perlfunc/cos>.
+-See also L<Math::Trig>.
+-
+-=item cosh
+-
+-This is identical to the C function C<cosh()>, for returning
+-the hyperbolic cosine of its numeric argument.  See also L<Math::Trig>.
+-
+-=item creat
+-
+-Create a new file.  This returns a file descriptor like the ones returned by
+-C<POSIX::open>.  Use C<POSIX::close> to close the file.
+-
+-	$fd = POSIX::creat( "foo", 0611 );
+-	POSIX::close( $fd );
+-
+-See also L<perlfunc/sysopen> and its C<O_CREAT> flag.
+-
+-=item ctermid
+-
+-Generates the path name for the controlling terminal.
+-
+-	$path = POSIX::ctermid();
+-
+-=item ctime
+-
+-This is identical to the C function C<ctime()> and equivalent
+-to C<asctime(localtime(...))>, see L</asctime> and L</localtime>.
+-
+-=item cuserid
+-
+-Get the login name of the owner of the current process.
+-
+-	$name = POSIX::cuserid();
+-
+-=item difftime
+-
+-This is identical to the C function C<difftime()>, for returning
+-the time difference (in seconds) between two times (as returned
+-by C<time()>), see L</time>.
+-
+-=item div
+-
+-div() is C-specific, use L<perlfunc/int> on the usual C</> division and
+-the modulus C<%>.
+-
+-=item dup
+-
+-This is similar to the C function C<dup()>, for duplicating a file
+-descriptor.
+-
+-This uses file descriptors such as those obtained by calling
+-C<POSIX::open>.
+-
+-Returns C<undef> on failure.
+-
+-=item dup2
+-
+-This is similar to the C function C<dup2()>, for duplicating a file
+-descriptor to an another known file descriptor.
+-
+-This uses file descriptors such as those obtained by calling
+-C<POSIX::open>.
+-
+-Returns C<undef> on failure.
+-
+-=item errno
+-
+-Returns the value of errno.
+-
+-	$errno = POSIX::errno();
+-
+-This identical to the numerical values of the C<$!>, see L<perlvar/$ERRNO>.
+-
+-=item execl
+-
+-execl() is C-specific, see L<perlfunc/exec>.
+-
+-=item execle
+-
+-execle() is C-specific, see L<perlfunc/exec>.
+-
+-=item execlp
+-
+-execlp() is C-specific, see L<perlfunc/exec>.
+-
+-=item execv
+-
+-execv() is C-specific, see L<perlfunc/exec>.
+-
+-=item execve
+-
+-execve() is C-specific, see L<perlfunc/exec>.
+-
+-=item execvp
+-
+-execvp() is C-specific, see L<perlfunc/exec>.
+-
+-=item exit
+-
+-This is identical to Perl's builtin C<exit()> function for exiting the
+-program, see L<perlfunc/exit>.
+-
+-=item exp
+-
+-This is identical to Perl's builtin C<exp()> function for
+-returning the exponent (I<e>-based) of the numerical argument,
+-see L<perlfunc/exp>.
+-
+-=item fabs
+-
+-This is identical to Perl's builtin C<abs()> function for returning
+-the absolute value of the numerical argument, see L<perlfunc/abs>.
+-
+-=item fclose
+-
+-Use method C<IO::Handle::close()> instead, or see L<perlfunc/close>.
+-
+-=item fcntl
+-
+-This is identical to Perl's builtin C<fcntl()> function,
+-see L<perlfunc/fcntl>.
+-
+-=item fdopen
+-
+-Use method C<IO::Handle::new_from_fd()> instead, or see L<perlfunc/open>.
+-
+-=item feof
+-
+-Use method C<IO::Handle::eof()> instead, or see L<perlfunc/eof>.
+-
+-=item ferror
+-
+-Use method C<IO::Handle::error()> instead.
+-
+-=item fflush
+-
+-Use method C<IO::Handle::flush()> instead.
+-See also L<perlvar/$OUTPUT_AUTOFLUSH>.
+-
+-=item fgetc
+-
+-Use method C<IO::Handle::getc()> instead, or see L<perlfunc/read>.
+-
+-=item fgetpos
+-
+-Use method C<IO::Seekable::getpos()> instead, or see L<L/seek>.
+-
+-=item fgets
+-
+-Use method C<IO::Handle::gets()> instead.  Similar to E<lt>E<gt>, also known
+-as L<perlfunc/readline>.
+-
+-=item fileno
+-
+-Use method C<IO::Handle::fileno()> instead, or see L<perlfunc/fileno>.
+-
+-=item floor
+-
+-This is identical to the C function C<floor()>, returning the largest
+-integer value less than or equal to the numerical argument.
+-
+-=item fmod
+-
+-This is identical to the C function C<fmod()>.
+-
+-	$r = fmod($x, $y);
+-
+-It returns the remainder C<$r = $x - $n*$y>, where C<$n = trunc($x/$y)>.
+-The C<$r> has the same sign as C<$x> and magnitude (absolute value)
+-less than the magnitude of C<$y>.
+-
+-=item fopen
+-
+-Use method C<IO::File::open()> instead, or see L<perlfunc/open>.
+-
+-=item fork
+-
+-This is identical to Perl's builtin C<fork()> function
+-for duplicating the current process, see L<perlfunc/fork>
+-and L<perlfork> if you are in Windows.
+-
+-=item fpathconf
+-
+-Retrieves the value of a configurable limit on a file or directory.  This
+-uses file descriptors such as those obtained by calling C<POSIX::open>.
+-
+-The following will determine the maximum length of the longest allowable
+-pathname on the filesystem which holds C</var/foo>.
+-
+-	$fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
+-	$path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
+-
+-Returns C<undef> on failure.
+-
+-=item fprintf
+-
+-fprintf() is C-specific, see L<perlfunc/printf> instead.
+-
+-=item fputc
+-
+-fputc() is C-specific, see L<perlfunc/print> instead.
+-
+-=item fputs
+-
+-fputs() is C-specific, see L<perlfunc/print> instead.
+-
+-=item fread
+-
+-fread() is C-specific, see L<perlfunc/read> instead.
+-
+-=item free
+-
+-free() is C-specific.  Perl does memory management transparently.
+-
+-=item freopen
+-
+-freopen() is C-specific, see L<perlfunc/open> instead.
+-
+-=item frexp
+-
+-Return the mantissa and exponent of a floating-point number.
+-
+-	($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
+-
+-=item fscanf
+-
+-fscanf() is C-specific, use E<lt>E<gt> and regular expressions instead.
+-
+-=item fseek
+-
+-Use method C<IO::Seekable::seek()> instead, or see L<perlfunc/seek>.
+-
+-=item fsetpos
+-
+-Use method C<IO::Seekable::setpos()> instead, or seek L<perlfunc/seek>.
+-
+-=item fstat
+-
+-Get file status.  This uses file descriptors such as those obtained by
+-calling C<POSIX::open>.  The data returned is identical to the data from
+-Perl's builtin C<stat> function.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
+-	@stats = POSIX::fstat( $fd );
+-
+-=item fsync
+-
+-Use method C<IO::Handle::sync()> instead.
+-
+-=item ftell
+-
+-Use method C<IO::Seekable::tell()> instead, or see L<perlfunc/tell>.
+-
+-=item fwrite
+-
+-fwrite() is C-specific, see L<perlfunc/print> instead.
+-
+-=item getc
+-
+-This is identical to Perl's builtin C<getc()> function,
+-see L<perlfunc/getc>.
+-
+-=item getchar
+-
+-Returns one character from STDIN.  Identical to Perl's C<getc()>,
+-see L<perlfunc/getc>.
+-
+-=item getcwd
+-
+-Returns the name of the current working directory.
+-See also L<Cwd>.
+-
+-=item getegid
+-
+-Returns the effective group identifier.  Similar to Perl' s builtin
+-variable C<$(>, see L<perlvar/$EGID>.
+-
+-=item getenv
+-
+-Returns the value of the specified environment variable.
+-The same information is available through the C<%ENV> array.
+-
+-=item geteuid
+-
+-Returns the effective user identifier.  Identical to Perl's builtin C<$E<gt>>
+-variable, see L<perlvar/$EUID>.
+-
+-=item getgid
+-
+-Returns the user's real group identifier.  Similar to Perl's builtin
+-variable C<$)>, see L<perlvar/$GID>.
+-
+-=item getgrgid
+-
+-This is identical to Perl's builtin C<getgrgid()> function for
+-returning group entries by group identifiers, see
+-L<perlfunc/getgrgid>.
+-
+-=item getgrnam
+-
+-This is identical to Perl's builtin C<getgrnam()> function for
+-returning group entries by group names, see L<perlfunc/getgrnam>.
+-
+-=item getgroups
+-
+-Returns the ids of the user's supplementary groups.  Similar to Perl's
+-builtin variable C<$)>, see L<perlvar/$GID>.
+-
+-=item getlogin
+-
+-This is identical to Perl's builtin C<getlogin()> function for
+-returning the user name associated with the current session, see
+-L<perlfunc/getlogin>.
+-
+-=item getpgrp
+-
+-This is identical to Perl's builtin C<getpgrp()> function for
+-returning the process group identifier of the current process, see
+-L<perlfunc/getpgrp>.
+-
+-=item getpid
+-
+-Returns the process identifier.  Identical to Perl's builtin
+-variable C<$$>, see L<perlvar/$PID>.
+-
+-=item getppid
+-
+-This is identical to Perl's builtin C<getppid()> function for
+-returning the process identifier of the parent process of the current
+-process , see L<perlfunc/getppid>.
+-
+-=item getpwnam
+-
+-This is identical to Perl's builtin C<getpwnam()> function for
+-returning user entries by user names, see L<perlfunc/getpwnam>.
+-
+-=item getpwuid
+-
+-This is identical to Perl's builtin C<getpwuid()> function for
+-returning user entries by user identifiers, see L<perlfunc/getpwuid>.
+-
+-=item gets
+-
+-Returns one line from C<STDIN>, similar to E<lt>E<gt>, also known
+-as the C<readline()> function, see L<perlfunc/readline>.
+-
+-B<NOTE>: if you have C programs that still use C<gets()>, be very
+-afraid.  The C<gets()> function is a source of endless grief because
+-it has no buffer overrun checks.  It should B<never> be used.  The
+-C<fgets()> function should be preferred instead.
+-
+-=item getuid
+-
+-Returns the user's identifier.  Identical to Perl's builtin C<$E<lt>> variable,
+-see L<perlvar/$UID>.
+-
+-=item gmtime
+-
+-This is identical to Perl's builtin C<gmtime()> function for
+-converting seconds since the epoch to a date in Greenwich Mean Time,
+-see L<perlfunc/gmtime>.
+-
+-=item isalnum
+-
+-This is identical to the C function, except that it can apply to a
+-single character or to a whole string.  Note that locale settings may
+-affect what characters are considered C<isalnum>.  Does not work on
+-Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:alnum:]]/> construct instead, or possibly
+-the C</\w/> construct.
+-
+-=item isalpha
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<isalpha>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:alpha:]]/> construct instead.
+-
+-=item isatty
+-
+-Returns a boolean indicating whether the specified filehandle is connected
+-to a tty.  Similar to the C<-t> operator, see L<perlfunc/-X>.
+-
+-=item iscntrl
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<iscntrl>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:cntrl:]]/> construct instead.
+-
+-=item isdigit
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<isdigit> (unlikely, but
+-still possible). Does not work on Unicode characters code point 256
+-or higher.  Consider using regular expressions and the C</[[:digit:]]/>
+-construct instead, or the C</\d/> construct.
+-
+-=item isgraph
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<isgraph>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:graph:]]/> construct instead.
+-
+-=item islower
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<islower>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:lower:]]/> construct instead.  Do B<not> use
+-C</[a-z]/>.
+-
+-=item isprint
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<isprint>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:print:]]/> construct instead.
+-
+-=item ispunct
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<ispunct>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:punct:]]/> construct instead.
+-
+-=item isspace
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<isspace>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:space:]]/> construct instead, or the C</\s/>
+-construct.  (Note that C</\s/> and C</[[:space:]]/> are slightly
+-different in that C</[[:space:]]/> can normally match a vertical tab,
+-while C</\s/> does not.)
+-
+-=item isupper
+-
+-This is identical to the C function, except that it can apply to
+-a single character or to a whole string.  Note that locale settings
+-may affect what characters are considered C<isupper>.  Does not work
+-on Unicode characters code point 256 or higher.  Consider using regular
+-expressions and the C</[[:upper:]]/> construct instead.  Do B<not> use
+-C</[A-Z]/>.
+-
+-=item isxdigit
+-
+-This is identical to the C function, except that it can apply to a single
+-character or to a whole string.  Note that locale settings may affect what
+-characters are considered C<isxdigit> (unlikely, but still possible).
+-Does not work on Unicode characters code point 256 or higher.
+-Consider using regular expressions and the C</[[:xdigit:]]/>
+-construct instead, or simply C</[0-9a-f]/i>.
+-
+-=item kill
+-
+-This is identical to Perl's builtin C<kill()> function for sending
+-signals to processes (often to terminate them), see L<perlfunc/kill>.
+-
+-=item labs
+-
+-(For returning absolute values of long integers.)
+-labs() is C-specific, see L<perlfunc/abs> instead.
+-
+-=item lchown
+-
+-This is identical to the C function, except the order of arguments is
+-consistent with Perl's builtin C<chown()> with the added restriction
+-of only one path, not an list of paths.  Does the same thing as the 
+-C<chown()> function but changes the owner of a symbolic link instead 
+-of the file the symbolic link points to.
+-
+-=item ldexp
+-
+-This is identical to the C function C<ldexp()>
+-for multiplying floating point numbers with powers of two.
+-
+-	$x_quadrupled = POSIX::ldexp($x, 2);
+-
+-=item ldiv
+-
+-(For computing dividends of long integers.)
+-ldiv() is C-specific, use C</> and C<int()> instead.
+-
+-=item link
+-
+-This is identical to Perl's builtin C<link()> function
+-for creating hard links into files, see L<perlfunc/link>.
+-
+-=item localeconv
+-
+-Get numeric formatting information.  Returns a reference to a hash
+-containing the current locale formatting values.
+-
+-Here is how to query the database for the B<de> (Deutsch or German) locale.
+-
+-	$loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
+-	print "Locale = $loc\n";
+-	$lconv = POSIX::localeconv();
+-	print "decimal_point	= ", $lconv->{decimal_point},	"\n";
+-	print "thousands_sep	= ", $lconv->{thousands_sep},	"\n";
+-	print "grouping	= ", $lconv->{grouping},	"\n";
+-	print "int_curr_symbol	= ", $lconv->{int_curr_symbol},	"\n";
+-	print "currency_symbol	= ", $lconv->{currency_symbol},	"\n";
+-	print "mon_decimal_point = ", $lconv->{mon_decimal_point}, "\n";
+-	print "mon_thousands_sep = ", $lconv->{mon_thousands_sep}, "\n";
+-	print "mon_grouping	= ", $lconv->{mon_grouping},	"\n";
+-	print "positive_sign	= ", $lconv->{positive_sign},	"\n";
+-	print "negative_sign	= ", $lconv->{negative_sign},	"\n";
+-	print "int_frac_digits	= ", $lconv->{int_frac_digits},	"\n";
+-	print "frac_digits	= ", $lconv->{frac_digits},	"\n";
+-	print "p_cs_precedes	= ", $lconv->{p_cs_precedes},	"\n";
+-	print "p_sep_by_space	= ", $lconv->{p_sep_by_space},	"\n";
+-	print "n_cs_precedes	= ", $lconv->{n_cs_precedes},	"\n";
+-	print "n_sep_by_space	= ", $lconv->{n_sep_by_space},	"\n";
+-	print "p_sign_posn	= ", $lconv->{p_sign_posn},	"\n";
+-	print "n_sign_posn	= ", $lconv->{n_sign_posn},	"\n";
+-
+-=item localtime
+-
+-This is identical to Perl's builtin C<localtime()> function for
+-converting seconds since the epoch to a date see L<perlfunc/localtime>.
+-
+-=item log
+-
+-This is identical to Perl's builtin C<log()> function,
+-returning the natural (I<e>-based) logarithm of the numerical argument,
+-see L<perlfunc/log>.
+-
+-=item log10
+-
+-This is identical to the C function C<log10()>,
+-returning the 10-base logarithm of the numerical argument.
+-You can also use
+-
+-    sub log10 { log($_[0]) / log(10) }
+-
+-or
+-
+-    sub log10 { log($_[0]) / 2.30258509299405 }
+-
+-or
+-
+-    sub log10 { log($_[0]) * 0.434294481903252 }
+-
+-=item longjmp
+-
+-longjmp() is C-specific: use L<perlfunc/die> instead.
+-
+-=item lseek
+-
+-Move the file's read/write position.  This uses file descriptors such as
+-those obtained by calling C<POSIX::open>.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
+-	$off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
+-
+-Returns C<undef> on failure.
+-
+-=item malloc
+-
+-malloc() is C-specific.  Perl does memory management transparently.
+-
+-=item mblen
+-
+-This is identical to the C function C<mblen()>.
+-Perl does not have any support for the wide and multibyte
+-characters of the C standards, so this might be a rather
+-useless function.
+-
+-=item mbstowcs
+-
+-This is identical to the C function C<mbstowcs()>.
+-Perl does not have any support for the wide and multibyte
+-characters of the C standards, so this might be a rather
+-useless function.
+-
+-=item mbtowc
+-
+-This is identical to the C function C<mbtowc()>.
+-Perl does not have any support for the wide and multibyte
+-characters of the C standards, so this might be a rather
+-useless function.
+-
+-=item memchr
+-
+-memchr() is C-specific, see L<perlfunc/index> instead.
+-
+-=item memcmp
+-
+-memcmp() is C-specific, use C<eq> instead, see L<perlop>.
+-
+-=item memcpy
+-
+-memcpy() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
+-
+-=item memmove
+-
+-memmove() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
+-
+-=item memset
+-
+-memset() is C-specific, use C<x> instead, see L<perlop>.
+-
+-=item mkdir
+-
+-This is identical to Perl's builtin C<mkdir()> function
+-for creating directories, see L<perlfunc/mkdir>.
+-
+-=item mkfifo
+-
+-This is similar to the C function C<mkfifo()> for creating
+-FIFO special files.
+-
+-	if (mkfifo($path, $mode)) { ....
+-
+-Returns C<undef> on failure.  The C<$mode> is similar to the
+-mode of C<mkdir()>, see L<perlfunc/mkdir>, though for C<mkfifo>
+-you B<must> specify the C<$mode>.
+-
+-=item mktime
+-
+-Convert date/time info to a calendar time.
+-
+-Synopsis:
+-
+-	mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
+-
+-The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
+-I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1.  The
+-year (C<year>) is given in years since 1900.  I.e. The year 1995 is 95; the
+-year 2001 is 101.  Consult your system's C<mktime()> manpage for details
+-about these and the other arguments.
+-
+-Calendar time for December 12, 1995, at 10:30 am.
+-
+-	$time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
+-	print "Date = ", POSIX::ctime($time_t);
+-
+-Returns C<undef> on failure.
+-
+-=item modf
+-
+-Return the integral and fractional parts of a floating-point number.
+-
+-	($fractional, $integral) = POSIX::modf( 3.14 );
+-
+-=item nice
+-
+-This is similar to the C function C<nice()>, for changing
+-the scheduling preference of the current process.  Positive
+-arguments mean more polite process, negative values more
+-needy process.  Normal user processes can only be more polite.
+-
+-Returns C<undef> on failure.
+-
+-=item offsetof
+-
+-offsetof() is C-specific, you probably want to see L<perlfunc/pack> instead.
+-
+-=item open
+-
+-Open a file for reading for writing.  This returns file descriptors, not
+-Perl filehandles.  Use C<POSIX::close> to close the file.
+-
+-Open a file read-only with mode 0666.
+-
+-	$fd = POSIX::open( "foo" );
+-
+-Open a file for read and write.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_RDWR );
+-
+-Open a file for write, with truncation.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC );
+-
+-Create a new file with mode 0640.  Set up the file for writing.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640 );
+-
+-Returns C<undef> on failure.
+-
+-See also L<perlfunc/sysopen>.
+-
+-=item opendir
+-
+-Open a directory for reading.
+-
+-	$dir = POSIX::opendir( "/var" );
+-	@files = POSIX::readdir( $dir );
+-	POSIX::closedir( $dir );
+-
+-Returns C<undef> on failure.
+-
+-=item pathconf
+-
+-Retrieves the value of a configurable limit on a file or directory.
+-
+-The following will determine the maximum length of the longest allowable
+-pathname on the filesystem which holds C</var>.
+-
+-	$path_max = POSIX::pathconf( "/var", &POSIX::_PC_PATH_MAX );
+-
+-Returns C<undef> on failure.
+-
+-=item pause
+-
+-This is similar to the C function C<pause()>, which suspends
+-the execution of the current process until a signal is received.
+-
+-Returns C<undef> on failure.
+-
+-=item perror
+-
+-This is identical to the C function C<perror()>, which outputs to the
+-standard error stream the specified message followed by ": " and the
+-current error string.  Use the C<warn()> function and the C<$!>
+-variable instead, see L<perlfunc/warn> and L<perlvar/$ERRNO>.
+-
+-=item pipe
+-
+-Create an interprocess channel.  This returns file descriptors like those
+-returned by C<POSIX::open>.
+-
+-	my ($read, $write) = POSIX::pipe();
+-	POSIX::write( $write, "hello", 5 );
+-	POSIX::read( $read, $buf, 5 );
+-
+-See also L<perlfunc/pipe>.
+-
+-=item pow
+-
+-Computes C<$x> raised to the power C<$exponent>.
+-
+-	$ret = POSIX::pow( $x, $exponent );
+-
+-You can also use the C<**> operator, see L<perlop>.
+-
+-=item printf
+-
+-Formats and prints the specified arguments to STDOUT.
+-See also L<perlfunc/printf>.
+-
+-=item putc
+-
+-putc() is C-specific, see L<perlfunc/print> instead.
+-
+-=item putchar
+-
+-putchar() is C-specific, see L<perlfunc/print> instead.
+-
+-=item puts
+-
+-puts() is C-specific, see L<perlfunc/print> instead.
+-
+-=item qsort
+-
+-qsort() is C-specific, see L<perlfunc/sort> instead.
+-
+-=item raise
+-
+-Sends the specified signal to the current process.
+-See also L<perlfunc/kill> and the C<$$> in L<perlvar/$PID>.
+-
+-=item rand
+-
+-C<rand()> is non-portable, see L<perlfunc/rand> instead.
+-
+-=item read
+-
+-Read from a file.  This uses file descriptors such as those obtained by
+-calling C<POSIX::open>.  If the buffer C<$buf> is not large enough for the
+-read then Perl will extend it to make room for the request.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
+-	$bytes = POSIX::read( $fd, $buf, 3 );
+-
+-Returns C<undef> on failure.
+-
+-See also L<perlfunc/sysread>.
+-
+-=item readdir
+-
+-This is identical to Perl's builtin C<readdir()> function
+-for reading directory entries, see L<perlfunc/readdir>.
+-
+-=item realloc
+-
+-realloc() is C-specific.  Perl does memory management transparently.
+-
+-=item remove
+-
+-This is identical to Perl's builtin C<unlink()> function
+-for removing files, see L<perlfunc/unlink>.
+-
+-=item rename
+-
+-This is identical to Perl's builtin C<rename()> function
+-for renaming files, see L<perlfunc/rename>.
+-
+-=item rewind
+-
+-Seeks to the beginning of the file.
+-
+-=item rewinddir
+-
+-This is identical to Perl's builtin C<rewinddir()> function for
+-rewinding directory entry streams, see L<perlfunc/rewinddir>.
+-
+-=item rmdir
+-
+-This is identical to Perl's builtin C<rmdir()> function
+-for removing (empty) directories, see L<perlfunc/rmdir>.
+-
+-=item scanf
+-
+-scanf() is C-specific, use E<lt>E<gt> and regular expressions instead,
+-see L<perlre>.
+-
+-=item setgid
+-
+-Sets the real group identifier and the effective group identifier for
+-this process.  Similar to assigning a value to the Perl's builtin
+-C<$)> variable, see L<perlvar/$EGID>, except that the latter
+-will change only the real user identifier, and that the setgid()
+-uses only a single numeric argument, as opposed to a space-separated
+-list of numbers.
+-
+-=item setjmp
+-
+-C<setjmp()> is C-specific: use C<eval {}> instead,
+-see L<perlfunc/eval>.
+-
+-=item setlocale
+-
+-Modifies and queries program's locale.  The following examples assume
+-
+-	use POSIX qw(setlocale LC_ALL LC_CTYPE);
+-
+-has been issued.
+-
+-The following will set the traditional UNIX system locale behavior
+-(the second argument C<"C">).
+-
+-	$loc = setlocale( LC_ALL, "C" );
+-
+-The following will query the current LC_CTYPE category.  (No second
+-argument means 'query'.)
+-
+-	$loc = setlocale( LC_CTYPE );
+-
+-The following will set the LC_CTYPE behaviour according to the locale
+-environment variables (the second argument C<"">).
+-Please see your systems C<setlocale(3)> documentation for the locale
+-environment variables' meaning or consult L<perllocale>.
+-
+-	$loc = setlocale( LC_CTYPE, "" );
+-
+-The following will set the LC_COLLATE behaviour to Argentinian
+-Spanish. B<NOTE>: The naming and availability of locales depends on
+-your operating system. Please consult L<perllocale> for how to find
+-out which locales are available in your system.
+-
+-	$loc = setlocale( LC_COLLATE, "es_AR.ISO8859-1" );
+-
+-=item setpgid
+-
+-This is similar to the C function C<setpgid()> for
+-setting the process group identifier of the current process.
+-
+-Returns C<undef> on failure.
+-
+-=item setsid
+-
+-This is identical to the C function C<setsid()> for
+-setting the session identifier of the current process.
+-
+-=item setuid
+-
+-Sets the real user identifier and the effective user identifier for
+-this process.  Similar to assigning a value to the Perl's builtin
+-C<$E<lt>> variable, see L<perlvar/$UID>, except that the latter
+-will change only the real user identifier.
+-
+-=item sigaction
+-
+-Detailed signal management.  This uses C<POSIX::SigAction> objects for
+-the C<action> and C<oldaction> arguments (the oldaction can also be
+-just a hash reference).  Consult your system's C<sigaction> manpage
+-for details, see also C<POSIX::SigRt>.
+-
+-Synopsis:
+-
+-	sigaction(signal, action, oldaction = 0)
+-
+-Returns C<undef> on failure.  The C<signal> must be a number (like
+-SIGHUP), not a string (like "SIGHUP"), though Perl does try hard
+-to understand you.
+-
+-If you use the SA_SIGINFO flag, the signal handler will in addition to
+-the first argument, the signal name, also receive a second argument, a
+-hash reference, inside which are the following keys with the following
+-semantics, as defined by POSIX/SUSv3:
+-
+-    signo       the signal number
+-    errno       the error number
+-    code        if this is zero or less, the signal was sent by
+-                a user process and the uid and pid make sense,
+-                otherwise the signal was sent by the kernel
+-
+-The following are also defined by POSIX/SUSv3, but unfortunately
+-not very widely implemented:
+-
+-    pid         the process id generating the signal
+-    uid         the uid of the process id generating the signal
+-    status      exit value or signal for SIGCHLD
+-    band        band event for SIGPOLL
+-
+-A third argument is also passed to the handler, which contains a copy
+-of the raw binary contents of the siginfo structure: if a system has
+-some non-POSIX fields, this third argument is where to unpack() them
+-from.
+-
+-Note that not all siginfo values make sense simultaneously (some are
+-valid only for certain signals, for example), and not all values make
+-sense from Perl perspective, you should to consult your system's
+-C<sigaction> and possibly also C<siginfo> documentation.
+-
+-=item siglongjmp
+-
+-siglongjmp() is C-specific: use L<perlfunc/die> instead.
+-
+-=item sigpending
+-
+-Examine signals that are blocked and pending.  This uses C<POSIX::SigSet>
+-objects for the C<sigset> argument.  Consult your system's C<sigpending>
+-manpage for details.
+-
+-Synopsis:
+-
+-	sigpending(sigset)
+-
+-Returns C<undef> on failure.
+-
+-=item sigprocmask
+-
+-Change and/or examine calling process's signal mask.  This uses
+-C<POSIX::SigSet> objects for the C<sigset> and C<oldsigset> arguments.
+-Consult your system's C<sigprocmask> manpage for details.
+-
+-Synopsis:
+-
+-	sigprocmask(how, sigset, oldsigset = 0)
+-
+-Returns C<undef> on failure.
+-
+-=item sigsetjmp
+-
+-C<sigsetjmp()> is C-specific: use C<eval {}> instead,
+-see L<perlfunc/eval>.
+-
+-=item sigsuspend
+-
+-Install a signal mask and suspend process until signal arrives.  This uses
+-C<POSIX::SigSet> objects for the C<signal_mask> argument.  Consult your
+-system's C<sigsuspend> manpage for details.
+-
+-Synopsis:
+-
+-	sigsuspend(signal_mask)
+-
+-Returns C<undef> on failure.
+-
+-=item sin
+-
+-This is identical to Perl's builtin C<sin()> function
+-for returning the sine of the numerical argument,
+-see L<perlfunc/sin>.  See also L<Math::Trig>.
+-
+-=item sinh
+-
+-This is identical to the C function C<sinh()>
+-for returning the hyperbolic sine of the numerical argument.
+-See also L<Math::Trig>.
+-
+-=item sleep
+-
+-This is functionally identical to Perl's builtin C<sleep()> function
+-for suspending the execution of the current for process for certain
+-number of seconds, see L<perlfunc/sleep>.  There is one significant
+-difference, however: C<POSIX::sleep()> returns the number of
+-B<unslept> seconds, while the C<CORE::sleep()> returns the
+-number of slept seconds.
+-
+-=item sprintf
+-
+-This is similar to Perl's builtin C<sprintf()> function
+-for returning a string that has the arguments formatted as requested,
+-see L<perlfunc/sprintf>.
+-
+-=item sqrt
+-
+-This is identical to Perl's builtin C<sqrt()> function.
+-for returning the square root of the numerical argument,
+-see L<perlfunc/sqrt>.
+-
+-=item srand
+-
+-Give a seed the pseudorandom number generator, see L<perlfunc/srand>.
+-
+-=item sscanf
+-
+-sscanf() is C-specific, use regular expressions instead,
+-see L<perlre>.
+-
+-=item stat
+-
+-This is identical to Perl's builtin C<stat()> function
+-for returning information about files and directories.
+-
+-=item strcat
+-
+-strcat() is C-specific, use C<.=> instead, see L<perlop>.
+-
+-=item strchr
+-
+-strchr() is C-specific, see L<perlfunc/index> instead.
+-
+-=item strcmp
+-
+-strcmp() is C-specific, use C<eq> or C<cmp> instead, see L<perlop>.
+-
+-=item strcoll
+-
+-This is identical to the C function C<strcoll()>
+-for collating (comparing) strings transformed using
+-the C<strxfrm()> function.  Not really needed since
+-Perl can do this transparently, see L<perllocale>.
+-
+-=item strcpy
+-
+-strcpy() is C-specific, use C<=> instead, see L<perlop>.
+-
+-=item strcspn
+-
+-strcspn() is C-specific, use regular expressions instead,
+-see L<perlre>.
+-
+-=item strerror
+-
+-Returns the error string for the specified errno.
+-Identical to the string form of the C<$!>, see L<perlvar/$ERRNO>.
+-
+-=item strftime
+-
+-Convert date and time information to string.  Returns the string.
+-
+-Synopsis:
+-
+-	strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
+-
+-The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
+-I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1.  The
+-year (C<year>) is given in years since 1900.  I.e., the year 1995 is 95; the
+-year 2001 is 101.  Consult your system's C<strftime()> manpage for details
+-about these and the other arguments.
+-
+-If you want your code to be portable, your format (C<fmt>) argument
+-should use only the conversion specifiers defined by the ANSI C
+-standard (C89, to play safe).  These are C<aAbBcdHIjmMpSUwWxXyYZ%>.
+-But even then, the B<results> of some of the conversion specifiers are
+-non-portable.  For example, the specifiers C<aAbBcpZ> change according
+-to the locale settings of the user, and both how to set locales (the
+-locale names) and what output to expect are non-standard.
+-The specifier C<c> changes according to the timezone settings of the
+-user and the timezone computation rules of the operating system.
+-The C<Z> specifier is notoriously unportable since the names of
+-timezones are non-standard. Sticking to the numeric specifiers is the
+-safest route.
+-
+-The given arguments are made consistent as though by calling
+-C<mktime()> before calling your system's C<strftime()> function,
+-except that the C<isdst> value is not affected.
+-
+-The string for Tuesday, December 12, 1995.
+-
+-	$str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2 );
+-	print "$str\n";
+-
+-=item strlen
+-
+-strlen() is C-specific, use C<length()> instead, see L<perlfunc/length>.
+-
+-=item strncat
+-
+-strncat() is C-specific, use C<.=> instead, see L<perlop>.
+-
+-=item strncmp
+-
+-strncmp() is C-specific, use C<eq> instead, see L<perlop>.
+-
+-=item strncpy
+-
+-strncpy() is C-specific, use C<=> instead, see L<perlop>.
+-
+-=item strpbrk
+-
+-strpbrk() is C-specific, use regular expressions instead,
+-see L<perlre>.
+-
+-=item strrchr
+-
+-strrchr() is C-specific, see L<perlfunc/rindex> instead.
+-
+-=item strspn
+-
+-strspn() is C-specific, use regular expressions instead,
+-see L<perlre>.
+-
+-=item strstr
+-
+-This is identical to Perl's builtin C<index()> function,
+-see L<perlfunc/index>.
+-
+-=item strtod
+-
+-String to double translation. Returns the parsed number and the number
+-of characters in the unparsed portion of the string.  Truly
+-POSIX-compliant systems set $! ($ERRNO) to indicate a translation
+-error, so clear $! before calling strtod.  However, non-POSIX systems
+-may not check for overflow, and therefore will never set $!.
+-
+-strtod should respect any POSIX I<setlocale()> settings.
+-
+-To parse a string $str as a floating point number use
+-
+-    $! = 0;
+-    ($num, $n_unparsed) = POSIX::strtod($str);
+-
+-The second returned item and $! can be used to check for valid input:
+-
+-    if (($str eq '') || ($n_unparsed != 0) || $!) {
+-        die "Non-numeric input $str" . ($! ? ": $!\n" : "\n");
+-    }
+-
+-When called in a scalar context strtod returns the parsed number.
+-
+-=item strtok
+-
+-strtok() is C-specific, use regular expressions instead, see
+-L<perlre>, or L<perlfunc/split>.
+-
+-=item strtol
+-
+-String to (long) integer translation.  Returns the parsed number and
+-the number of characters in the unparsed portion of the string.  Truly
+-POSIX-compliant systems set $! ($ERRNO) to indicate a translation
+-error, so clear $! before calling strtol.  However, non-POSIX systems
+-may not check for overflow, and therefore will never set $!.
+-
+-strtol should respect any POSIX I<setlocale()> settings.
+-
+-To parse a string $str as a number in some base $base use
+-
+-    $! = 0;
+-    ($num, $n_unparsed) = POSIX::strtol($str, $base);
+-
+-The base should be zero or between 2 and 36, inclusive.  When the base
+-is zero or omitted strtol will use the string itself to determine the
+-base: a leading "0x" or "0X" means hexadecimal; a leading "0" means
+-octal; any other leading characters mean decimal.  Thus, "1234" is
+-parsed as a decimal number, "01234" as an octal number, and "0x1234"
+-as a hexadecimal number.
+-
+-The second returned item and $! can be used to check for valid input:
+-
+-    if (($str eq '') || ($n_unparsed != 0) || !$!) {
+-        die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
+-    }
+-
+-When called in a scalar context strtol returns the parsed number.
+-
+-=item strtoul
+-
+-String to unsigned (long) integer translation.  strtoul() is identical
+-to strtol() except that strtoul() only parses unsigned integers.  See
+-L</strtol> for details.
+-
+-Note: Some vendors supply strtod() and strtol() but not strtoul().
+-Other vendors that do supply strtoul() parse "-1" as a valid value.
+-
+-=item strxfrm
+-
+-String transformation.  Returns the transformed string.
+-
+-	$dst = POSIX::strxfrm( $src );
+-
+-Used in conjunction with the C<strcoll()> function, see L</strcoll>.
+-
+-Not really needed since Perl can do this transparently, see
+-L<perllocale>.
+-
+-=item sysconf
+-
+-Retrieves values of system configurable variables.
+-
+-The following will get the machine's clock speed.
+-
+-	$clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
+-
+-Returns C<undef> on failure.
+-
+-=item system
+-
+-This is identical to Perl's builtin C<system()> function, see
+-L<perlfunc/system>.
+-
+-=item tan
+-
+-This is identical to the C function C<tan()>, returning the
+-tangent of the numerical argument.  See also L<Math::Trig>.
+-
+-=item tanh
+-
+-This is identical to the C function C<tanh()>, returning the
+-hyperbolic tangent of the numerical argument.   See also L<Math::Trig>.
+-
+-=item tcdrain
+-
+-This is similar to the C function C<tcdrain()> for draining
+-the output queue of its argument stream.
+-
+-Returns C<undef> on failure.
+-
+-=item tcflow
+-
+-This is similar to the C function C<tcflow()> for controlling
+-the flow of its argument stream.
+-
+-Returns C<undef> on failure.
+-
+-=item tcflush
+-
+-This is similar to the C function C<tcflush()> for flushing
+-the I/O buffers of its argument stream.
+-
+-Returns C<undef> on failure.
+-
+-=item tcgetpgrp
+-
+-This is identical to the C function C<tcgetpgrp()> for returning the
+-process group identifier of the foreground process group of the controlling
+-terminal.
+-
+-=item tcsendbreak
+-
+-This is similar to the C function C<tcsendbreak()> for sending
+-a break on its argument stream.
+-
+-Returns C<undef> on failure.
+-
+-=item tcsetpgrp
+-
+-This is similar to the C function C<tcsetpgrp()> for setting the
+-process group identifier of the foreground process group of the controlling
+-terminal.
+-
+-Returns C<undef> on failure.
+-
+-=item time
+-
+-This is identical to Perl's builtin C<time()> function
+-for returning the number of seconds since the epoch
+-(whatever it is for the system), see L<perlfunc/time>.
+-
+-=item times
+-
+-The times() function returns elapsed realtime since some point in the past
+-(such as system startup), user and system times for this process, and user
+-and system times used by child processes.  All times are returned in clock
+-ticks.
+-
+-    ($realtime, $user, $system, $cuser, $csystem) = POSIX::times();
+-
+-Note: Perl's builtin C<times()> function returns four values, measured in
+-seconds.
+-
+-=item tmpfile
+-
+-Use method C<IO::File::new_tmpfile()> instead, or see L<File::Temp>.
+-
+-=item tmpnam
+-
+-Returns a name for a temporary file.
+-
+-	$tmpfile = POSIX::tmpnam();
+-
+-For security reasons, which are probably detailed in your system's
+-documentation for the C library tmpnam() function, this interface
+-should not be used; instead see L<File::Temp>.
+-
+-=item tolower
+-
+-This is identical to the C function, except that it can apply to a single
+-character or to a whole string.  Consider using the C<lc()> function,
+-see L<perlfunc/lc>, or the equivalent C<\L> operator inside doublequotish
+-strings.
+-
+-=item toupper
+-
+-This is identical to the C function, except that it can apply to a single
+-character or to a whole string.  Consider using the C<uc()> function,
+-see L<perlfunc/uc>, or the equivalent C<\U> operator inside doublequotish
+-strings.
+-
+-=item ttyname
+-
+-This is identical to the C function C<ttyname()> for returning the
+-name of the current terminal.
+-
+-=item tzname
+-
+-Retrieves the time conversion information from the C<tzname> variable.
+-
+-	POSIX::tzset();
+-	($std, $dst) = POSIX::tzname();
+-
+-=item tzset
+-
+-This is identical to the C function C<tzset()> for setting
+-the current timezone based on the environment variable C<TZ>,
+-to be used by C<ctime()>, C<localtime()>, C<mktime()>, and C<strftime()>
+-functions.
+-
+-=item umask
+-
+-This is identical to Perl's builtin C<umask()> function
+-for setting (and querying) the file creation permission mask,
+-see L<perlfunc/umask>.
+-
+-=item uname
+-
+-Get name of current operating system.
+-
+-	($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
+-
+-Note that the actual meanings of the various fields are not
+-that well standardized, do not expect any great portability.
+-The C<$sysname> might be the name of the operating system,
+-the C<$nodename> might be the name of the host, the C<$release>
+-might be the (major) release number of the operating system,
+-the C<$version> might be the (minor) release number of the
+-operating system, and the C<$machine> might be a hardware identifier.
+-Maybe.
+-
+-=item ungetc
+-
+-Use method C<IO::Handle::ungetc()> instead.
+-
+-=item unlink
+-
+-This is identical to Perl's builtin C<unlink()> function
+-for removing files, see L<perlfunc/unlink>.
+-
+-=item utime
+-
+-This is identical to Perl's builtin C<utime()> function
+-for changing the time stamps of files and directories,
+-see L<perlfunc/utime>.
+-
+-=item vfprintf
+-
+-vfprintf() is C-specific, see L<perlfunc/printf> instead.
+-
+-=item vprintf
+-
+-vprintf() is C-specific, see L<perlfunc/printf> instead.
+-
+-=item vsprintf
+-
+-vsprintf() is C-specific, see L<perlfunc/sprintf> instead.
+-
+-=item wait
+-
+-This is identical to Perl's builtin C<wait()> function,
+-see L<perlfunc/wait>.
+-
+-=item waitpid
+-
+-Wait for a child process to change state.  This is identical to Perl's
+-builtin C<waitpid()> function, see L<perlfunc/waitpid>.
+-
+-	$pid = POSIX::waitpid( -1, POSIX::WNOHANG );
+-	print "status = ", ($? / 256), "\n";
+-
+-=item wcstombs
+-
+-This is identical to the C function C<wcstombs()>.
+-Perl does not have any support for the wide and multibyte
+-characters of the C standards, so this might be a rather
+-useless function.
+-
+-=item wctomb
+-
+-This is identical to the C function C<wctomb()>.
+-Perl does not have any support for the wide and multibyte
+-characters of the C standards, so this might be a rather
+-useless function.
+-
+-=item write
+-
+-Write to a file.  This uses file descriptors such as those obtained by
+-calling C<POSIX::open>.
+-
+-	$fd = POSIX::open( "foo", &POSIX::O_WRONLY );
+-	$buf = "hello";
+-	$bytes = POSIX::write( $fd, $buf, 5 );
+-
+-Returns C<undef> on failure.
+-
+-See also L<perlfunc/syswrite>.
+-
+-=back
+-
+-=head1 CLASSES
+-
+-=head2 POSIX::SigAction
+-
+-=over 8
+-
+-=item new
+-
+-Creates a new C<POSIX::SigAction> object which corresponds to the C
+-C<struct sigaction>.  This object will be destroyed automatically when
+-it is no longer needed.  The first parameter is the handler, a sub
+-reference.  The second parameter is a C<POSIX::SigSet> object, it
+-defaults to the empty set.  The third parameter contains the
+-C<sa_flags>, it defaults to 0.
+-
+-	$sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
+-	$sigaction = POSIX::SigAction->new( \&handler, $sigset, &POSIX::SA_NOCLDSTOP );
+-
+-This C<POSIX::SigAction> object is intended for use with the C<POSIX::sigaction()>
+-function.
+-
+-=back
+-
+-=over 8
+-
+-=item handler
+-
+-=item mask
+-
+-=item flags
+-
+-accessor functions to get/set the values of a SigAction object.
+-
+-	$sigset = $sigaction->mask;
+-	$sigaction->flags(&POSIX::SA_RESTART);
+-
+-=item safe
+-
+-accessor function for the "safe signals" flag of a SigAction object; see
+-L<perlipc> for general information on safe (a.k.a. "deferred") signals.  If
+-you wish to handle a signal safely, use this accessor to set the "safe" flag
+-in the C<POSIX::SigAction> object:
+-
+-	$sigaction->safe(1);
+-
+-You may also examine the "safe" flag on the output action object which is
+-filled in when given as the third parameter to C<POSIX::sigaction()>:
+-
+-	sigaction(SIGINT, $new_action, $old_action);
+-	if ($old_action->safe) {
+-	    # previous SIGINT handler used safe signals
+-	}
+-
+-=back
+-
+-=head2 POSIX::SigRt
+-
+-=over 8
+-
+-=item %SIGRT
+-
+-A hash of the POSIX realtime signal handlers.  It is an extension of
+-the standard %SIG, the $POSIX::SIGRT{SIGRTMIN} is roughly equivalent
+-to $SIG{SIGRTMIN}, but the right POSIX moves (see below) are made with
+-the POSIX::SigSet and POSIX::sigaction instead of accessing the %SIG.
+-
+-You can set the %POSIX::SIGRT elements to set the POSIX realtime
+-signal handlers, use C<delete> and C<exists> on the elements, and use
+-C<scalar> on the C<%POSIX::SIGRT> to find out how many POSIX realtime
+-signals there are available (SIGRTMAX - SIGRTMIN + 1, the SIGRTMAX is
+-a valid POSIX realtime signal).
+-
+-Setting the %SIGRT elements is equivalent to calling this:
+-
+-  sub new {
+-    my ($rtsig, $handler, $flags) = @_;
+-    my $sigset = POSIX::SigSet($rtsig);
+-    my $sigact = POSIX::SigAction->new($handler, $sigset, $flags);
+-    sigaction($rtsig, $sigact);
+-  }
+-
+-The flags default to zero, if you want something different you can
+-either use C<local> on $POSIX::SigRt::SIGACTION_FLAGS, or you can
+-derive from POSIX::SigRt and define your own C<new()> (the tied hash
+-STORE method of the %SIGRT calls C<new($rtsig, $handler, $SIGACTION_FLAGS)>,
+-where the $rtsig ranges from zero to SIGRTMAX - SIGRTMIN + 1).
+-
+-Just as with any signal, you can use sigaction($rtsig, undef, $oa) to
+-retrieve the installed signal handler (or, rather, the signal action).
+-
+-B<NOTE:> whether POSIX realtime signals really work in your system, or
+-whether Perl has been compiled so that it works with them, is outside
+-of this discussion.
+-
+-=item SIGRTMIN
+-
+-Return the minimum POSIX realtime signal number available, or C<undef>
+-if no POSIX realtime signals are available.
+-
+-=item SIGRTMAX
+-
+-Return the maximum POSIX realtime signal number available, or C<undef>
+-if no POSIX realtime signals are available.
+-
+-=back
+-
+-=head2 POSIX::SigSet
+-
+-=over 8
+-
+-=item new
+-
+-Create a new SigSet object.  This object will be destroyed automatically
+-when it is no longer needed.  Arguments may be supplied to initialize the
+-set.
+-
+-Create an empty set.
+-
+-	$sigset = POSIX::SigSet->new;
+-
+-Create a set with SIGUSR1.
+-
+-	$sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 );
+-
+-=item addset
+-
+-Add a signal to a SigSet object.
+-
+-	$sigset->addset( &POSIX::SIGUSR2 );
+-
+-Returns C<undef> on failure.
+-
+-=item delset
+-
+-Remove a signal from the SigSet object.
+-
+-	$sigset->delset( &POSIX::SIGUSR2 );
+-
+-Returns C<undef> on failure.
+-
+-=item emptyset
+-
+-Initialize the SigSet object to be empty.
+-
+-	$sigset->emptyset();
+-
+-Returns C<undef> on failure.
+-
+-=item fillset
+-
+-Initialize the SigSet object to include all signals.
+-
+-	$sigset->fillset();
+-
+-Returns C<undef> on failure.
+-
+-=item ismember
+-
+-Tests the SigSet object to see if it contains a specific signal.
+-
+-	if( $sigset->ismember( &POSIX::SIGUSR1 ) ){
+-		print "contains SIGUSR1\n";
+-	}
+-
+-=back
+-
+-=head2 POSIX::Termios
+-
+-=over 8
+-
+-=item new
+-
+-Create a new Termios object.  This object will be destroyed automatically
+-when it is no longer needed.  A Termios object corresponds to the termios
+-C struct.  new() mallocs a new one, getattr() fills it from a file descriptor,
+-and setattr() sets a file descriptor's parameters to match Termios' contents.
+-
+-	$termios = POSIX::Termios->new;
+-
+-=item getattr
+-
+-Get terminal control attributes.
+-
+-Obtain the attributes for stdin.
+-
+-	$termios->getattr( 0 ) # Recommended for clarity.
+-	$termios->getattr()
+-
+-Obtain the attributes for stdout.
+-
+-	$termios->getattr( 1 )
+-
+-Returns C<undef> on failure.
+-
+-=item getcc
+-
+-Retrieve a value from the c_cc field of a termios object.  The c_cc field is
+-an array so an index must be specified.
+-
+-	$c_cc[1] = $termios->getcc(1);
+-
+-=item getcflag
+-
+-Retrieve the c_cflag field of a termios object.
+-
+-	$c_cflag = $termios->getcflag;
+-
+-=item getiflag
+-
+-Retrieve the c_iflag field of a termios object.
+-
+-	$c_iflag = $termios->getiflag;
+-
+-=item getispeed
+-
+-Retrieve the input baud rate.
+-
+-	$ispeed = $termios->getispeed;
+-
+-=item getlflag
+-
+-Retrieve the c_lflag field of a termios object.
+-
+-	$c_lflag = $termios->getlflag;
+-
+-=item getoflag
+-
+-Retrieve the c_oflag field of a termios object.
+-
+-	$c_oflag = $termios->getoflag;
+-
+-=item getospeed
+-
+-Retrieve the output baud rate.
+-
+-	$ospeed = $termios->getospeed;
+-
+-=item setattr
+-
+-Set terminal control attributes.
+-
+-Set attributes immediately for stdout.
+-
+-	$termios->setattr( 1, &POSIX::TCSANOW );
+-
+-Returns C<undef> on failure.
+-
+-=item setcc
+-
+-Set a value in the c_cc field of a termios object.  The c_cc field is an
+-array so an index must be specified.
+-
+-	$termios->setcc( &POSIX::VEOF, 1 );
+-
+-=item setcflag
+-
+-Set the c_cflag field of a termios object.
+-
+-	$termios->setcflag( $c_cflag | &POSIX::CLOCAL );
+-
+-=item setiflag
+-
+-Set the c_iflag field of a termios object.
+-
+-	$termios->setiflag( $c_iflag | &POSIX::BRKINT );
+-
+-=item setispeed
+-
+-Set the input baud rate.
+-
+-	$termios->setispeed( &POSIX::B9600 );
+-
+-Returns C<undef> on failure.
+-
+-=item setlflag
+-
+-Set the c_lflag field of a termios object.
+-
+-	$termios->setlflag( $c_lflag | &POSIX::ECHO );
+-
+-=item setoflag
+-
+-Set the c_oflag field of a termios object.
+-
+-	$termios->setoflag( $c_oflag | &POSIX::OPOST );
+-
+-=item setospeed
+-
+-Set the output baud rate.
+-
+-	$termios->setospeed( &POSIX::B9600 );
+-
+-Returns C<undef> on failure.
+-
+-=item Baud rate values
+-
+-B38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200 B9600 B600 B4800 B50 B2400 B110
+-
+-=item Terminal interface values
+-
+-TCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
+-
+-=item c_cc field values
+-
+-VEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART VSTOP VMIN VTIME NCCS
+-
+-=item c_cflag field values
+-
+-CLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL PARENB PARODD
+-
+-=item c_iflag field values
+-
+-BRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP IXOFF IXON PARMRK
+-
+-=item c_lflag field values
+-
+-ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH TOSTOP
+-
+-=item c_oflag field values
+-
+-OPOST
+-
+-=back
+-
+-=head1 PATHNAME CONSTANTS
+-
+-=over 8
+-
+-=item Constants
+-
+-_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE
+-
+-=back
+-
+-=head1 POSIX CONSTANTS
+-
+-=over 8
+-
+-=item Constants
+-
+-_POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION
+-
+-=back
+-
+-=head1 SYSTEM CONFIGURATION
+-
+-=over 8
+-
+-=item Constants
+-
+-_SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
+-
+-=back
+-
+-=head1 ERRNO
+-
+-=over 8
+-
+-=item Constants
+-
+-E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
+-EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
+-EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS EINTR
+-EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG
+-ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODEV ENOENT ENOEXEC
+-ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
+-ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE
+-EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS
+-ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS
+-ETXTBSY EUSERS EWOULDBLOCK EXDEV
+-
+-=back
+-
+-=head1 FCNTL
+-
+-=over 8
+-
+-=item Constants
+-
+-FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY
+-
+-=back
+-
+-=head1 FLOAT
+-
+-=over 8
+-
+-=item Constants
+-
+-DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX FLT_ROUNDS LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP
+-
+-=back
+-
+-=head1 LIMITS
+-
+-=over 8
+-
+-=item Constants
+-
+-ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
+-
+-=back
+-
+-=head1 LOCALE
+-
+-=over 8
+-
+-=item Constants
+-
+-LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
+-
+-=back
+-
+-=head1 MATH
+-
+-=over 8
+-
+-=item Constants
+-
+-HUGE_VAL
+-
+-=back
+-
+-=head1 SIGNAL
+-
+-=over 8
+-
+-=item Constants
+-
+-SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND SA_RESTART
+-SA_SIGINFO SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT
+-SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
+-SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK
+-SIG_UNBLOCK
+-
+-=back
+-
+-=head1 STAT
+-
+-=over 8
+-
+-=item Constants
+-
+-S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
+-
+-=item Macros
+-
+-S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
+-
+-=back
+-
+-=head1 STDLIB
+-
+-=over 8
+-
+-=item Constants
+-
+-EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
+-
+-=back
+-
+-=head1 STDIO
+-
+-=over 8
+-
+-=item Constants
+-
+-BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid L_tmpname TMP_MAX
+-
+-=back
+-
+-=head1 TIME
+-
+-=over 8
+-
+-=item Constants
+-
+-CLK_TCK CLOCKS_PER_SEC
+-
+-=back
+-
+-=head1 UNISTD
+-
+-=over 8
+-
+-=item Constants
+-
+-R_OK SEEK_CUR SEEK_END SEEK_SET STDIN_FILENO STDOUT_FILENO STDERR_FILENO W_OK X_OK
+-
+-=back
+-
+-=head1 WAIT
+-
+-=over 8
+-
+-=item Constants
+-
+-WNOHANG WUNTRACED
+-
+-=over 16
+-
+-=item WNOHANG
+-
+-Do not suspend the calling process until a child process
+-changes state but instead return immediately.
+-
+-=item WUNTRACED
+-
+-Catch stopped child processes.
+-
+-=back
+-
+-=item Macros
+-
+-WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG
+-
+-=over 16
+-
+-=item WIFEXITED
+-
+-WIFEXITED($?) returns true if the child process exited normally
+-(C<exit()> or by falling off the end of C<main()>)
+-
+-=item WEXITSTATUS
+-
+-WEXITSTATUS($?) returns the normal exit status of the child process
+-(only meaningful if WIFEXITED($?) is true)
+-
+-=item WIFSIGNALED
+-
+-WIFSIGNALED($?) returns true if the child process terminated because
+-of a signal
+-
+-=item WTERMSIG
+-
+-WTERMSIG($?) returns the signal the child process terminated for
+-(only meaningful if WIFSIGNALED($?) is true)
+-
+-=item WIFSTOPPED
+-
+-WIFSTOPPED($?) returns true if the child process is currently stopped
+-(can happen only if you specified the WUNTRACED flag to waitpid())
+-
+-=item WSTOPSIG
+-
+-WSTOPSIG($?) returns the signal the child process was stopped for
+-(only meaningful if WIFSTOPPED($?) is true)
+-
+-=back
+-
+-=back
+-
+diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
+new file mode 100644
+index 0000000..ffbd9de
+--- /dev/null
++++ b/ext/POSIX/lib/POSIX.pm
+@@ -0,0 +1,1042 @@
++package POSIX;
++use strict;
++use warnings;
++
++our(@ISA, %EXPORT_TAGS, @EXPORT_OK, @EXPORT, $AUTOLOAD, %SIGRT) = ();
++
++our $VERSION = "1.19";
++
++use AutoLoader;
++
++use XSLoader ();
++
++use Fcntl qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK F_SETFD
++	     F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND
++	     O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC
++	     O_WRONLY SEEK_CUR SEEK_END SEEK_SET
++	     S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
++	     S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID
++	     S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR);
++
++# Grandfather old foo_h form to new :foo_h form
++my $loaded;
++
++sub import {
++    load_imports() unless $loaded++;
++    my $this = shift;
++    my @list = map { m/^\w+_h$/ ? ":$_" : $_ } @_;
++    local $Exporter::ExportLevel = 1;
++    Exporter::import($this,@list);
++}
++
++sub croak { require Carp;  goto &Carp::croak }
++# declare usage to assist AutoLoad
++sub usage;
++
++XSLoader::load 'POSIX', $VERSION;
++
++sub AUTOLOAD {
++    no strict;
++    no warnings 'uninitialized';
++    if ($AUTOLOAD =~ /::(_?[a-z])/) {
++	# require AutoLoader;
++	$AutoLoader::AUTOLOAD = $AUTOLOAD;
++	goto &AutoLoader::AUTOLOAD
++    }
++    local $! = 0;
++    my $constname = $AUTOLOAD;
++    $constname =~ s/.*:://;
++    my ($error, $val) = constant($constname);
++    croak $error if $error;
++    *$AUTOLOAD = sub { $val };
++
++    goto &$AUTOLOAD;
++}
++
++package POSIX::SigAction;
++
++use AutoLoader 'AUTOLOAD';
++
++package POSIX::SigRt;
++
++use AutoLoader 'AUTOLOAD';
++
++use Tie::Hash;
++
++use vars qw($SIGACTION_FLAGS $_SIGRTMIN $_SIGRTMAX $_sigrtn @ISA);
++@POSIX::SigRt::ISA = qw(Tie::StdHash);
++
++$SIGACTION_FLAGS = 0;
++
++tie %POSIX::SIGRT, 'POSIX::SigRt';
++
++sub DESTROY {};
++
++package POSIX;
++
++1;
++__END__
++
++sub usage {
++    my ($mess) = @_;
++    croak "Usage: POSIX::$mess";
++}
++
++sub redef {
++    my ($mess) = @_;
++    croak "Use method $mess instead";
++}
++
++sub unimpl {
++    my ($mess) = @_;
++    $mess =~ s/xxx//;
++    croak "Unimplemented: POSIX::$mess";
++}
++
++sub assert {
++    usage "assert(expr)" if @_ != 1;
++    if (!$_[0]) {
++	croak "Assertion failed";
++    }
++}
++
++sub tolower {
++    usage "tolower(string)" if @_ != 1;
++    lc($_[0]);
++}
++
++sub toupper {
++    usage "toupper(string)" if @_ != 1;
++    uc($_[0]);
++}
++
++sub closedir {
++    usage "closedir(dirhandle)" if @_ != 1;
++    CORE::closedir($_[0]);
++}
++
++sub opendir {
++    usage "opendir(directory)" if @_ != 1;
++    my $dirhandle;
++    CORE::opendir($dirhandle, $_[0])
++	? $dirhandle
++	: undef;
++}
++
++sub readdir {
++    usage "readdir(dirhandle)" if @_ != 1;
++    CORE::readdir($_[0]);
++}
++
++sub rewinddir {
++    usage "rewinddir(dirhandle)" if @_ != 1;
++    CORE::rewinddir($_[0]);
++}
++
++sub errno {
++    usage "errno()" if @_ != 0;
++    $! + 0;
++}
++
++sub creat {
++    usage "creat(filename, mode)" if @_ != 2;
++    &open($_[0], &O_WRONLY | &O_CREAT | &O_TRUNC, $_[1]);
++}
++
++sub fcntl {
++    usage "fcntl(filehandle, cmd, arg)" if @_ != 3;
++    CORE::fcntl($_[0], $_[1], $_[2]);
++}
++
++sub getgrgid {
++    usage "getgrgid(gid)" if @_ != 1;
++    CORE::getgrgid($_[0]);
++}
++
++sub getgrnam {
++    usage "getgrnam(name)" if @_ != 1;
++    CORE::getgrnam($_[0]);
++}
++
++sub atan2 {
++    usage "atan2(x,y)" if @_ != 2;
++    CORE::atan2($_[0], $_[1]);
++}
++
++sub cos {
++    usage "cos(x)" if @_ != 1;
++    CORE::cos($_[0]);
++}
++
++sub exp {
++    usage "exp(x)" if @_ != 1;
++    CORE::exp($_[0]);
++}
++
++sub fabs {
++    usage "fabs(x)" if @_ != 1;
++    CORE::abs($_[0]);
++}
++
++sub log {
++    usage "log(x)" if @_ != 1;
++    CORE::log($_[0]);
++}
++
++sub pow {
++    usage "pow(x,exponent)" if @_ != 2;
++    $_[0] ** $_[1];
++}
++
++sub sin {
++    usage "sin(x)" if @_ != 1;
++    CORE::sin($_[0]);
++}
++
++sub sqrt {
++    usage "sqrt(x)" if @_ != 1;
++    CORE::sqrt($_[0]);
++}
++
++sub getpwnam {
++    usage "getpwnam(name)" if @_ != 1;
++    CORE::getpwnam($_[0]);
++}
++
++sub getpwuid {
++    usage "getpwuid(uid)" if @_ != 1;
++    CORE::getpwuid($_[0]);
++}
++
++sub longjmp {
++    unimpl "longjmp() is C-specific: use die instead";
++}
++
++sub setjmp {
++    unimpl "setjmp() is C-specific: use eval {} instead";
++}
++
++sub siglongjmp {
++    unimpl "siglongjmp() is C-specific: use die instead";
++}
++
++sub sigsetjmp {
++    unimpl "sigsetjmp() is C-specific: use eval {} instead";
++}
++
++sub kill {
++    usage "kill(pid, sig)" if @_ != 2;
++    CORE::kill $_[1], $_[0];
++}
++
++sub raise {
++    usage "raise(sig)" if @_ != 1;
++    CORE::kill $_[0], $$;	# Is this good enough?
++}
++
++sub offsetof {
++    unimpl "offsetof() is C-specific, stopped";
++}
++
++sub clearerr {
++    redef "IO::Handle::clearerr()";
++}
++
++sub fclose {
++    redef "IO::Handle::close()";
++}
++
++sub fdopen {
++    redef "IO::Handle::new_from_fd()";
++}
++
++sub feof {
++    redef "IO::Handle::eof()";
++}
++
++sub fgetc {
++    redef "IO::Handle::getc()";
++}
++
++sub fgets {
++    redef "IO::Handle::gets()";
++}
++
++sub fileno {
++    redef "IO::Handle::fileno()";
++}
++
++sub fopen {
++    redef "IO::File::open()";
++}
++
++sub fprintf {
++    unimpl "fprintf() is C-specific--use printf instead";
++}
++
++sub fputc {
++    unimpl "fputc() is C-specific--use print instead";
++}
++
++sub fputs {
++    unimpl "fputs() is C-specific--use print instead";
++}
++
++sub fread {
++    unimpl "fread() is C-specific--use read instead";
++}
++
++sub freopen {
++    unimpl "freopen() is C-specific--use open instead";
++}
++
++sub fscanf {
++    unimpl "fscanf() is C-specific--use <> and regular expressions instead";
++}
++
++sub fseek {
++    redef "IO::Seekable::seek()";
++}
++
++sub fsync {
++    redef "IO::Handle::sync()";
++}
++
++sub ferror {
++    redef "IO::Handle::error()";
++}
++
++sub fflush {
++    redef "IO::Handle::flush()";
++}
++
++sub fgetpos {
++    redef "IO::Seekable::getpos()";
++}
++
++sub fsetpos {
++    redef "IO::Seekable::setpos()";
++}
++
++sub ftell {
++    redef "IO::Seekable::tell()";
++}
++
++sub fwrite {
++    unimpl "fwrite() is C-specific--use print instead";
++}
++
++sub getc {
++    usage "getc(handle)" if @_ != 1;
++    CORE::getc($_[0]);
++}
++
++sub getchar {
++    usage "getchar()" if @_ != 0;
++    CORE::getc(STDIN);
++}
++
++sub gets {
++    usage "gets()" if @_ != 0;
++    scalar <STDIN>;
++}
++
++sub perror {
++    print STDERR "@_: " if @_;
++    print STDERR $!,"\n";
++}
++
++sub printf {
++    usage "printf(pattern, args...)" if @_ < 1;
++    CORE::printf STDOUT @_;
++}
++
++sub putc {
++    unimpl "putc() is C-specific--use print instead";
++}
++
++sub putchar {
++    unimpl "putchar() is C-specific--use print instead";
++}
++
++sub puts {
++    unimpl "puts() is C-specific--use print instead";
++}
++
++sub remove {
++    usage "remove(filename)" if @_ != 1;
++    (-d $_[0]) ? CORE::rmdir($_[0]) : CORE::unlink($_[0]);
++}
++
++sub rename {
++    usage "rename(oldfilename, newfilename)" if @_ != 2;
++    CORE::rename($_[0], $_[1]);
++}
++
++sub rewind {
++    usage "rewind(filehandle)" if @_ != 1;
++    CORE::seek($_[0],0,0);
++}
++
++sub scanf {
++    unimpl "scanf() is C-specific--use <> and regular expressions instead";
++}
++
++sub sprintf {
++    usage "sprintf(pattern,args)" if @_ == 0;
++    CORE::sprintf(shift,@_);
++}
++
++sub sscanf {
++    unimpl "sscanf() is C-specific--use regular expressions instead";
++}
++
++sub tmpfile {
++    redef "IO::File::new_tmpfile()";
++}
++
++sub ungetc {
++    redef "IO::Handle::ungetc()";
++}
++
++sub vfprintf {
++    unimpl "vfprintf() is C-specific";
++}
++
++sub vprintf {
++    unimpl "vprintf() is C-specific";
++}
++
++sub vsprintf {
++    unimpl "vsprintf() is C-specific";
++}
++
++sub abs {
++    usage "abs(x)" if @_ != 1;
++    CORE::abs($_[0]);
++}
++
++sub atexit {
++    unimpl "atexit() is C-specific: use END {} instead";
++}
++
++sub atof {
++    unimpl "atof() is C-specific, stopped";
++}
++
++sub atoi {
++    unimpl "atoi() is C-specific, stopped";
++}
++
++sub atol {
++    unimpl "atol() is C-specific, stopped";
++}
++
++sub bsearch {
++    unimpl "bsearch() not supplied";
++}
++
++sub calloc {
++    unimpl "calloc() is C-specific, stopped";
++}
++
++sub div {
++    unimpl "div() is C-specific, use /, % and int instead";
++}
++
++sub exit {
++    usage "exit(status)" if @_ != 1;
++    CORE::exit($_[0]);
++}
++
++sub free {
++    unimpl "free() is C-specific, stopped";
++}
++
++sub getenv {
++    usage "getenv(name)" if @_ != 1;
++    $ENV{$_[0]};
++}
++
++sub labs {
++    unimpl "labs() is C-specific, use abs instead";
++}
++
++sub ldiv {
++    unimpl "ldiv() is C-specific, use /, % and int instead";
++}
++
++sub malloc {
++    unimpl "malloc() is C-specific, stopped";
++}
++
++sub qsort {
++    unimpl "qsort() is C-specific, use sort instead";
++}
++
++sub rand {
++    unimpl "rand() is non-portable, use Perl's rand instead";
++}
++
++sub realloc {
++    unimpl "realloc() is C-specific, stopped";
++}
++
++sub srand {
++    unimpl "srand()";
++}
++
++sub system {
++    usage "system(command)" if @_ != 1;
++    CORE::system($_[0]);
++}
++
++sub memchr {
++    unimpl "memchr() is C-specific, use index() instead";
++}
++
++sub memcmp {
++    unimpl "memcmp() is C-specific, use eq instead";
++}
++
++sub memcpy {
++    unimpl "memcpy() is C-specific, use = instead";
++}
++
++sub memmove {
++    unimpl "memmove() is C-specific, use = instead";
++}
++
++sub memset {
++    unimpl "memset() is C-specific, use x instead";
++}
++
++sub strcat {
++    unimpl "strcat() is C-specific, use .= instead";
++}
++
++sub strchr {
++    unimpl "strchr() is C-specific, use index() instead";
++}
++
++sub strcmp {
++    unimpl "strcmp() is C-specific, use eq instead";
++}
++
++sub strcpy {
++    unimpl "strcpy() is C-specific, use = instead";
++}
++
++sub strcspn {
++    unimpl "strcspn() is C-specific, use regular expressions instead";
++}
++
++sub strerror {
++    usage "strerror(errno)" if @_ != 1;
++    local $! = $_[0];
++    $! . "";
++}
++
++sub strlen {
++    unimpl "strlen() is C-specific, use length instead";
++}
++
++sub strncat {
++    unimpl "strncat() is C-specific, use .= instead";
++}
++
++sub strncmp {
++    unimpl "strncmp() is C-specific, use eq instead";
++}
++
++sub strncpy {
++    unimpl "strncpy() is C-specific, use = instead";
++}
++
++sub strpbrk {
++    unimpl "strpbrk() is C-specific, stopped";
++}
++
++sub strrchr {
++    unimpl "strrchr() is C-specific, use rindex() instead";
++}
++
++sub strspn {
++    unimpl "strspn() is C-specific, stopped";
++}
++
++sub strstr {
++    usage "strstr(big, little)" if @_ != 2;
++    CORE::index($_[0], $_[1]);
++}
++
++sub strtok {
++    unimpl "strtok() is C-specific, stopped";
++}
++
++sub chmod {
++    usage "chmod(mode, filename)" if @_ != 2;
++    CORE::chmod($_[0], $_[1]);
++}
++
++sub fstat {
++    usage "fstat(fd)" if @_ != 1;
++    local *TMP;
++    CORE::open(TMP, "<&$_[0]");		# Gross.
++    my @l = CORE::stat(TMP);
++    CORE::close(TMP);
++    @l;
++}
++
++sub mkdir {
++    usage "mkdir(directoryname, mode)" if @_ != 2;
++    CORE::mkdir($_[0], $_[1]);
++}
++
++sub stat {
++    usage "stat(filename)" if @_ != 1;
++    CORE::stat($_[0]);
++}
++
++sub umask {
++    usage "umask(mask)" if @_ != 1;
++    CORE::umask($_[0]);
++}
++
++sub wait {
++    usage "wait()" if @_ != 0;
++    CORE::wait();
++}
++
++sub waitpid {
++    usage "waitpid(pid, options)" if @_ != 2;
++    CORE::waitpid($_[0], $_[1]);
++}
++
++sub gmtime {
++    usage "gmtime(time)" if @_ != 1;
++    CORE::gmtime($_[0]);
++}
++
++sub localtime {
++    usage "localtime(time)" if @_ != 1;
++    CORE::localtime($_[0]);
++}
++
++sub time {
++    usage "time()" if @_ != 0;
++    CORE::time;
++}
++
++sub alarm {
++    usage "alarm(seconds)" if @_ != 1;
++    CORE::alarm($_[0]);
++}
++
++sub chdir {
++    usage "chdir(directory)" if @_ != 1;
++    CORE::chdir($_[0]);
++}
++
++sub chown {
++    usage "chown(uid, gid, filename)" if @_ != 3;
++    CORE::chown($_[0], $_[1], $_[2]);
++}
++
++sub execl {
++    unimpl "execl() is C-specific, stopped";
++}
++
++sub execle {
++    unimpl "execle() is C-specific, stopped";
++}
++
++sub execlp {
++    unimpl "execlp() is C-specific, stopped";
++}
++
++sub execv {
++    unimpl "execv() is C-specific, stopped";
++}
++
++sub execve {
++    unimpl "execve() is C-specific, stopped";
++}
++
++sub execvp {
++    unimpl "execvp() is C-specific, stopped";
++}
++
++sub fork {
++    usage "fork()" if @_ != 0;
++    CORE::fork;
++}
++
++sub getegid {
++    usage "getegid()" if @_ != 0;
++    $) + 0;
++}
++
++sub geteuid {
++    usage "geteuid()" if @_ != 0;
++    $> + 0;
++}
++
++sub getgid {
++    usage "getgid()" if @_ != 0;
++    $( + 0;
++}
++
++sub getgroups {
++    usage "getgroups()" if @_ != 0;
++    my %seen;
++    grep(!$seen{$_}++, split(' ', $) ));
++}
++
++sub getlogin {
++    usage "getlogin()" if @_ != 0;
++    CORE::getlogin();
++}
++
++sub getpgrp {
++    usage "getpgrp()" if @_ != 0;
++    CORE::getpgrp;
++}
++
++sub getpid {
++    usage "getpid()" if @_ != 0;
++    $$;
++}
++
++sub getppid {
++    usage "getppid()" if @_ != 0;
++    CORE::getppid;
++}
++
++sub getuid {
++    usage "getuid()" if @_ != 0;
++    $<;
++}
++
++sub isatty {
++    usage "isatty(filehandle)" if @_ != 1;
++    -t $_[0];
++}
++
++sub link {
++    usage "link(oldfilename, newfilename)" if @_ != 2;
++    CORE::link($_[0], $_[1]);
++}
++
++sub rmdir {
++    usage "rmdir(directoryname)" if @_ != 1;
++    CORE::rmdir($_[0]);
++}
++
++sub setbuf {
++    redef "IO::Handle::setbuf()";
++}
++
++sub setvbuf {
++    redef "IO::Handle::setvbuf()";
++}
++
++sub sleep {
++    usage "sleep(seconds)" if @_ != 1;
++    $_[0] - CORE::sleep($_[0]);
++}
++
++sub unlink {
++    usage "unlink(filename)" if @_ != 1;
++    CORE::unlink($_[0]);
++}
++
++sub utime {
++    usage "utime(filename, atime, mtime)" if @_ != 3;
++    CORE::utime($_[1], $_[2], $_[0]);
++}
++
++sub load_imports {
++%EXPORT_TAGS = (
++
++    assert_h =>	[qw(assert NDEBUG)],
++
++    ctype_h =>	[qw(isalnum isalpha iscntrl isdigit isgraph islower
++		isprint ispunct isspace isupper isxdigit tolower toupper)],
++
++    dirent_h =>	[],
++
++    errno_h =>	[qw(E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT
++		EAGAIN EALREADY EBADF EBUSY ECHILD ECONNABORTED
++		ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT
++		EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS
++		EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
++		EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH
++		ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM
++		ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
++		ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
++		EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE
++		ERANGE EREMOTE ERESTART EROFS ESHUTDOWN ESOCKTNOSUPPORT
++		ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY
++		EUSERS EWOULDBLOCK EXDEV errno)],
++
++    fcntl_h =>	[qw(FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_RDLCK
++		F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK
++		O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK
++		O_RDONLY O_RDWR O_TRUNC O_WRONLY
++		creat
++		SEEK_CUR SEEK_END SEEK_SET
++		S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
++		S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG S_ISUID
++		S_IWGRP S_IWOTH S_IWUSR)],
++
++    float_h =>	[qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG
++		DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP
++		DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP
++		FLT_DIG FLT_EPSILON FLT_MANT_DIG
++		FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP
++		FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP
++		FLT_RADIX FLT_ROUNDS
++		LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG
++		LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP
++		LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP)],
++
++    grp_h =>	[],
++
++    limits_h =>	[qw( ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX
++		INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON
++		MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX
++		PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN
++		SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX
++		ULONG_MAX USHRT_MAX _POSIX_ARG_MAX _POSIX_CHILD_MAX
++		_POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT
++		_POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_OPEN_MAX
++		_POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX
++		_POSIX_STREAM_MAX _POSIX_TZNAME_MAX)],
++
++    locale_h =>	[qw(LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES
++		    LC_MONETARY LC_NUMERIC LC_TIME NULL
++		    localeconv setlocale)],
++
++    math_h =>	[qw(HUGE_VAL acos asin atan ceil cosh fabs floor fmod
++		frexp ldexp log10 modf pow sinh tan tanh)],
++
++    pwd_h =>	[],
++
++    setjmp_h =>	[qw(longjmp setjmp siglongjmp sigsetjmp)],
++
++    signal_h =>	[qw(SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK
++		SA_RESETHAND SA_RESTART SA_SIGINFO SIGABRT SIGALRM
++		SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL
++		SIGPIPE %SIGRT SIGRTMIN SIGRTMAX SIGQUIT SIGSEGV SIGSTOP
++		SIGTERM SIGTSTP SIGTTIN	SIGTTOU SIGUSR1 SIGUSR2
++		SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK SIG_UNBLOCK
++		raise sigaction signal sigpending sigprocmask sigsuspend)],
++
++    stdarg_h =>	[],
++
++    stddef_h =>	[qw(NULL offsetof)],
++
++    stdio_h =>	[qw(BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid
++		L_tmpname NULL SEEK_CUR SEEK_END SEEK_SET
++		STREAM_MAX TMP_MAX stderr stdin stdout
++		clearerr fclose fdopen feof ferror fflush fgetc fgetpos
++		fgets fopen fprintf fputc fputs fread freopen
++		fscanf fseek fsetpos ftell fwrite getchar gets
++		perror putc putchar puts remove rewind
++		scanf setbuf setvbuf sscanf tmpfile tmpnam
++		ungetc vfprintf vprintf vsprintf)],
++
++    stdlib_h =>	[qw(EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX NULL RAND_MAX
++		abort atexit atof atoi atol bsearch calloc div
++		free getenv labs ldiv malloc mblen mbstowcs mbtowc
++		qsort realloc strtod strtol strtoul wcstombs wctomb)],
++
++    string_h =>	[qw(NULL memchr memcmp memcpy memmove memset strcat
++		strchr strcmp strcoll strcpy strcspn strerror strlen
++		strncat strncmp strncpy strpbrk strrchr strspn strstr
++		strtok strxfrm)],
++
++    sys_stat_h => [qw(S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU
++		S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISGID S_ISREG
++		S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
++		fstat mkfifo)],
++
++    sys_times_h => [],
++
++    sys_types_h => [],
++
++    sys_utsname_h => [qw(uname)],
++
++    sys_wait_h => [qw(WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED
++		WNOHANG WSTOPSIG WTERMSIG WUNTRACED)],
++
++    termios_h => [qw( B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400
++		B300 B38400 B4800 B50 B600 B75 B9600 BRKINT CLOCAL
++		CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB ECHO ECHOE ECHOK
++		ECHONL HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR
++		INLCR INPCK ISIG ISTRIP IXOFF IXON NCCS NOFLSH OPOST
++		PARENB PARMRK PARODD TCIFLUSH TCIOFF TCIOFLUSH TCION
++		TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW
++		TOSTOP VEOF VEOL VERASE VINTR VKILL VMIN VQUIT VSTART
++		VSTOP VSUSP VTIME
++		cfgetispeed cfgetospeed cfsetispeed cfsetospeed tcdrain
++		tcflow tcflush tcgetattr tcsendbreak tcsetattr )],
++
++    time_h =>	[qw(CLK_TCK CLOCKS_PER_SEC NULL asctime clock ctime
++		difftime mktime strftime tzset tzname)],
++
++    unistd_h =>	[qw(F_OK NULL R_OK SEEK_CUR SEEK_END SEEK_SET
++		STDERR_FILENO STDIN_FILENO STDOUT_FILENO W_OK X_OK
++		_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON
++		_PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX
++		_PC_PIPE_BUF _PC_VDISABLE _POSIX_CHOWN_RESTRICTED
++		_POSIX_JOB_CONTROL _POSIX_NO_TRUNC _POSIX_SAVED_IDS
++		_POSIX_VDISABLE _POSIX_VERSION _SC_ARG_MAX
++		_SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL
++		_SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS
++		_SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
++		_exit access ctermid cuserid
++		dup2 dup execl execle execlp execv execve execvp
++		fpathconf fsync getcwd getegid geteuid getgid getgroups
++		getpid getuid isatty lseek pathconf pause setgid setpgid
++		setsid setuid sysconf tcgetpgrp tcsetpgrp ttyname)],
++
++    utime_h =>	[],
++
++);
++
++# Exporter::export_tags();
++{
++  # De-duplicate the export list: 
++  my %export;
++  @export{map {@$_} values %EXPORT_TAGS} = ();
++  # Doing the de-dup with a temporary hash has the advantage that the SVs in
++  # @EXPORT are actually shared hash key sacalars, which will save some memory.
++  push @EXPORT, keys %export;
++}
++
++@EXPORT_OK = qw(
++		abs
++		alarm
++		atan2
++		chdir
++		chmod
++		chown
++		close
++		closedir
++		cos
++		exit
++		exp
++		fcntl
++		fileno
++		fork
++		getc
++		getgrgid
++		getgrnam
++		getlogin
++		getpgrp
++		getppid
++		getpwnam
++		getpwuid
++		gmtime
++		isatty
++		kill
++		lchown
++		link
++		localtime
++		log
++		mkdir
++		nice
++		open
++		opendir
++		pipe
++		printf
++		rand
++		read
++		readdir
++		rename
++		rewinddir
++		rmdir
++		sin
++		sleep
++		sprintf
++		sqrt
++		srand
++		stat
++		system
++		time
++		times
++		umask
++		unlink
++		utime
++		wait
++		waitpid
++		write
++);
++
++require Exporter;
++}
++
++package POSIX::SigAction;
++
++sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0, SAFE => 0}, $_[0] }
++sub handler { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} };
++sub mask    { $_[0]->{MASK}    = $_[1] if @_ > 1; $_[0]->{MASK} };
++sub flags   { $_[0]->{FLAGS}   = $_[1] if @_ > 1; $_[0]->{FLAGS} };
++sub safe    { $_[0]->{SAFE}    = $_[1] if @_ > 1; $_[0]->{SAFE} };
++
++package POSIX::SigRt;
++
++
++sub _init {
++    $_SIGRTMIN = &POSIX::SIGRTMIN;
++    $_SIGRTMAX = &POSIX::SIGRTMAX;
++    $_sigrtn   = $_SIGRTMAX - $_SIGRTMIN;
++}
++
++sub _croak {
++    &_init unless defined $_sigrtn;
++    die "POSIX::SigRt not available" unless defined $_sigrtn && $_sigrtn > 0;
++}
++
++sub _getsig {
++    &_croak;
++    my $rtsig = $_[0];
++    # Allow (SIGRT)?MIN( + n)?, a common idiom when doing these things in C.
++    $rtsig = $_SIGRTMIN + ($1 || 0)
++	if $rtsig =~ /^(?:(?:SIG)?RT)?MIN(\s*\+\s*(\d+))?$/;
++    return $rtsig;
++}
++
++sub _exist {
++    my $rtsig = _getsig($_[1]);
++    my $ok    = $rtsig >= $_SIGRTMIN && $rtsig <= $_SIGRTMAX;
++    ($rtsig, $ok);
++}
++
++sub _check {
++    my ($rtsig, $ok) = &_exist;
++    die "No POSIX::SigRt signal $_[1] (valid range SIGRTMIN..SIGRTMAX, or $_SIGRTMIN..$_SIGRTMAX)"
++	unless $ok;
++    return $rtsig;
++}
++
++sub new {
++    my ($rtsig, $handler, $flags) = @_;
++    my $sigset = POSIX::SigSet->new($rtsig);
++    my $sigact = POSIX::SigAction->new($handler,
++				       $sigset,
++				       $flags);
++    POSIX::sigaction($rtsig, $sigact);
++}
++
++sub EXISTS { &_exist }
++sub FETCH  { my $rtsig = &_check;
++	     my $oa = POSIX::SigAction->new();
++	     POSIX::sigaction($rtsig, undef, $oa);
++	     return $oa->{HANDLER} }
++sub STORE  { my $rtsig = &_check; new($rtsig, $_[2], $SIGACTION_FLAGS) }
++sub DELETE { delete $SIG{ &_check } }
++sub CLEAR  { &_exist; delete @SIG{ &POSIX::SIGRTMIN .. &POSIX::SIGRTMAX } }
++sub SCALAR { &_croak; $_sigrtn + 1 }
+diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod
+new file mode 100644
+index 0000000..64852e9
+--- /dev/null
++++ b/ext/POSIX/lib/POSIX.pod
+@@ -0,0 +1,2218 @@
++=head1 NAME
++
++POSIX - Perl interface to IEEE Std 1003.1
++
++=head1 SYNOPSIS
++
++    use POSIX;
++    use POSIX qw(setsid);
++    use POSIX qw(:errno_h :fcntl_h);
++
++    printf "EINTR is %d\n", EINTR;
++
++    $sess_id = POSIX::setsid();
++
++    $fd = POSIX::open($path, O_CREAT|O_EXCL|O_WRONLY, 0644);
++	# note: that's a filedescriptor, *NOT* a filehandle
++
++=head1 DESCRIPTION
++
++The POSIX module permits you to access all (or nearly all) the standard
++POSIX 1003.1 identifiers.  Many of these identifiers have been given Perl-ish
++interfaces.
++
++I<Everything is exported by default> with the exception of any POSIX
++functions with the same name as a built-in Perl function, such as
++C<abs>, C<alarm>, C<rmdir>, C<write>, etc.., which will be exported
++only if you ask for them explicitly.  This is an unfortunate backwards
++compatibility feature.  You can stop the exporting by saying C<use
++POSIX ()> and then use the fully qualified names (ie. C<POSIX::SEEK_END>).
++
++This document gives a condensed list of the features available in the POSIX
++module.  Consult your operating system's manpages for general information on
++most features.  Consult L<perlfunc> for functions which are noted as being
++identical to Perl's builtin functions.
++
++The first section describes POSIX functions from the 1003.1 specification.
++The second section describes some classes for signal objects, TTY objects,
++and other miscellaneous objects.  The remaining sections list various
++constants and macros in an organization which roughly follows IEEE Std
++1003.1b-1993.
++
++=head1 NOTE
++
++The POSIX module is probably the most complex Perl module supplied with
++the standard distribution.  It incorporates autoloading, namespace games,
++and dynamic loading of code that's in Perl, C, or both.  It's a great
++source of wisdom.
++
++=head1 CAVEATS
++
++A few functions are not implemented because they are C specific.  If you
++attempt to call these, they will print a message telling you that they
++aren't implemented, and suggest using the Perl equivalent should one
++exist.  For example, trying to access the setjmp() call will elicit the
++message "setjmp() is C-specific: use eval {} instead".
++
++Furthermore, some evil vendors will claim 1003.1 compliance, but in fact
++are not so: they will not pass the PCTS (POSIX Compliance Test Suites).
++For example, one vendor may not define EDEADLK, or the semantics of the
++errno values set by open(2) might not be quite right.  Perl does not
++attempt to verify POSIX compliance.  That means you can currently
++successfully say "use POSIX",  and then later in your program you find
++that your vendor has been lax and there's no usable ICANON macro after
++all.  This could be construed to be a bug.
++
++=head1 FUNCTIONS
++
++=over 8
++
++=item _exit
++
++This is identical to the C function C<_exit()>.  It exits the program
++immediately which means among other things buffered I/O is B<not> flushed.
++
++Note that when using threads and in Linux this is B<not> a good way to
++exit a thread because in Linux processes and threads are kind of the
++same thing (Note: while this is the situation in early 2003 there are
++projects under way to have threads with more POSIXly semantics in Linux).
++If you want not to return from a thread, detach the thread.
++
++=item abort
++
++This is identical to the C function C<abort()>.  It terminates the
++process with a C<SIGABRT> signal unless caught by a signal handler or
++if the handler does not return normally (it e.g.  does a C<longjmp>).
++
++=item abs
++
++This is identical to Perl's builtin C<abs()> function, returning
++the absolute value of its numerical argument.
++
++=item access
++
++Determines the accessibility of a file.
++
++	if( POSIX::access( "/", &POSIX::R_OK ) ){
++		print "have read permission\n";
++	}
++
++Returns C<undef> on failure.  Note: do not use C<access()> for
++security purposes.  Between the C<access()> call and the operation
++you are preparing for the permissions might change: a classic
++I<race condition>.
++
++=item acos
++
++This is identical to the C function C<acos()>, returning
++the arcus cosine of its numerical argument.  See also L<Math::Trig>.
++
++=item alarm
++
++This is identical to Perl's builtin C<alarm()> function,
++either for arming or disarming the C<SIGARLM> timer.
++
++=item asctime
++
++This is identical to the C function C<asctime()>.  It returns
++a string of the form
++
++	"Fri Jun  2 18:22:13 2000\n\0"
++
++and it is called thusly
++
++	$asctime = asctime($sec, $min, $hour, $mday, $mon, $year,
++			   $wday, $yday, $isdst);
++
++The C<$mon> is zero-based: January equals C<0>.  The C<$year> is
++1900-based: 2001 equals C<101>.  C<$wday> and C<$yday> default to zero
++(and are usually ignored anyway), and C<$isdst> defaults to -1.
++
++=item asin
++
++This is identical to the C function C<asin()>, returning
++the arcus sine of its numerical argument.  See also L<Math::Trig>.
++
++=item assert
++
++Unimplemented, but you can use L<perlfunc/die> and the L<Carp> module
++to achieve similar things.
++
++=item atan
++
++This is identical to the C function C<atan()>, returning the
++arcus tangent of its numerical argument.  See also L<Math::Trig>.
++
++=item atan2
++
++This is identical to Perl's builtin C<atan2()> function, returning
++the arcus tangent defined by its two numerical arguments, the I<y>
++coordinate and the I<x> coordinate.  See also L<Math::Trig>.
++
++=item atexit
++
++atexit() is C-specific: use C<END {}> instead, see L<perlsub>.
++
++=item atof
++
++atof() is C-specific.  Perl converts strings to numbers transparently.
++If you need to force a scalar to a number, add a zero to it.
++
++=item atoi
++
++atoi() is C-specific.  Perl converts strings to numbers transparently.
++If you need to force a scalar to a number, add a zero to it.
++If you need to have just the integer part, see L<perlfunc/int>.
++
++=item atol
++
++atol() is C-specific.  Perl converts strings to numbers transparently.
++If you need to force a scalar to a number, add a zero to it.
++If you need to have just the integer part, see L<perlfunc/int>.
++
++=item bsearch
++
++bsearch() not supplied.  For doing binary search on wordlists,
++see L<Search::Dict>.
++
++=item calloc
++
++calloc() is C-specific.  Perl does memory management transparently.
++
++=item ceil
++
++This is identical to the C function C<ceil()>, returning the smallest
++integer value greater than or equal to the given numerical argument.
++
++=item chdir
++
++This is identical to Perl's builtin C<chdir()> function, allowing
++one to change the working (default) directory, see L<perlfunc/chdir>.
++
++=item chmod
++
++This is identical to Perl's builtin C<chmod()> function, allowing
++one to change file and directory permissions, see L<perlfunc/chmod>.
++
++=item chown
++
++This is identical to Perl's builtin C<chown()> function, allowing one
++to change file and directory owners and groups, see L<perlfunc/chown>.
++
++=item clearerr
++
++Use the method C<IO::Handle::clearerr()> instead, to reset the error
++state (if any) and EOF state (if any) of the given stream.
++
++=item clock
++
++This is identical to the C function C<clock()>, returning the
++amount of spent processor time in microseconds.
++
++=item close
++
++Close the file.  This uses file descriptors such as those obtained by calling
++C<POSIX::open>.
++
++	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
++	POSIX::close( $fd );
++
++Returns C<undef> on failure.
++
++See also L<perlfunc/close>.
++
++=item closedir
++
++This is identical to Perl's builtin C<closedir()> function for closing
++a directory handle, see L<perlfunc/closedir>.
++
++=item cos
++
++This is identical to Perl's builtin C<cos()> function, for returning
++the cosine of its numerical argument, see L<perlfunc/cos>.
++See also L<Math::Trig>.
++
++=item cosh
++
++This is identical to the C function C<cosh()>, for returning
++the hyperbolic cosine of its numeric argument.  See also L<Math::Trig>.
++
++=item creat
++
++Create a new file.  This returns a file descriptor like the ones returned by
++C<POSIX::open>.  Use C<POSIX::close> to close the file.
++
++	$fd = POSIX::creat( "foo", 0611 );
++	POSIX::close( $fd );
++
++See also L<perlfunc/sysopen> and its C<O_CREAT> flag.
++
++=item ctermid
++
++Generates the path name for the controlling terminal.
++
++	$path = POSIX::ctermid();
++
++=item ctime
++
++This is identical to the C function C<ctime()> and equivalent
++to C<asctime(localtime(...))>, see L</asctime> and L</localtime>.
++
++=item cuserid
++
++Get the login name of the owner of the current process.
++
++	$name = POSIX::cuserid();
++
++=item difftime
++
++This is identical to the C function C<difftime()>, for returning
++the time difference (in seconds) between two times (as returned
++by C<time()>), see L</time>.
++
++=item div
++
++div() is C-specific, use L<perlfunc/int> on the usual C</> division and
++the modulus C<%>.
++
++=item dup
++
++This is similar to the C function C<dup()>, for duplicating a file
++descriptor.
++
++This uses file descriptors such as those obtained by calling
++C<POSIX::open>.
++
++Returns C<undef> on failure.
++
++=item dup2
++
++This is similar to the C function C<dup2()>, for duplicating a file
++descriptor to an another known file descriptor.
++
++This uses file descriptors such as those obtained by calling
++C<POSIX::open>.
++
++Returns C<undef> on failure.
++
++=item errno
++
++Returns the value of errno.
++
++	$errno = POSIX::errno();
++
++This identical to the numerical values of the C<$!>, see L<perlvar/$ERRNO>.
++
++=item execl
++
++execl() is C-specific, see L<perlfunc/exec>.
++
++=item execle
++
++execle() is C-specific, see L<perlfunc/exec>.
++
++=item execlp
++
++execlp() is C-specific, see L<perlfunc/exec>.
++
++=item execv
++
++execv() is C-specific, see L<perlfunc/exec>.
++
++=item execve
++
++execve() is C-specific, see L<perlfunc/exec>.
++
++=item execvp
++
++execvp() is C-specific, see L<perlfunc/exec>.
++
++=item exit
++
++This is identical to Perl's builtin C<exit()> function for exiting the
++program, see L<perlfunc/exit>.
++
++=item exp
++
++This is identical to Perl's builtin C<exp()> function for
++returning the exponent (I<e>-based) of the numerical argument,
++see L<perlfunc/exp>.
++
++=item fabs
++
++This is identical to Perl's builtin C<abs()> function for returning
++the absolute value of the numerical argument, see L<perlfunc/abs>.
++
++=item fclose
++
++Use method C<IO::Handle::close()> instead, or see L<perlfunc/close>.
++
++=item fcntl
++
++This is identical to Perl's builtin C<fcntl()> function,
++see L<perlfunc/fcntl>.
++
++=item fdopen
++
++Use method C<IO::Handle::new_from_fd()> instead, or see L<perlfunc/open>.
++
++=item feof
++
++Use method C<IO::Handle::eof()> instead, or see L<perlfunc/eof>.
++
++=item ferror
++
++Use method C<IO::Handle::error()> instead.
++
++=item fflush
++
++Use method C<IO::Handle::flush()> instead.
++See also L<perlvar/$OUTPUT_AUTOFLUSH>.
++
++=item fgetc
++
++Use method C<IO::Handle::getc()> instead, or see L<perlfunc/read>.
++
++=item fgetpos
++
++Use method C<IO::Seekable::getpos()> instead, or see L<L/seek>.
++
++=item fgets
++
++Use method C<IO::Handle::gets()> instead.  Similar to E<lt>E<gt>, also known
++as L<perlfunc/readline>.
++
++=item fileno
++
++Use method C<IO::Handle::fileno()> instead, or see L<perlfunc/fileno>.
++
++=item floor
++
++This is identical to the C function C<floor()>, returning the largest
++integer value less than or equal to the numerical argument.
++
++=item fmod
++
++This is identical to the C function C<fmod()>.
++
++	$r = fmod($x, $y);
++
++It returns the remainder C<$r = $x - $n*$y>, where C<$n = trunc($x/$y)>.
++The C<$r> has the same sign as C<$x> and magnitude (absolute value)
++less than the magnitude of C<$y>.
++
++=item fopen
++
++Use method C<IO::File::open()> instead, or see L<perlfunc/open>.
++
++=item fork
++
++This is identical to Perl's builtin C<fork()> function
++for duplicating the current process, see L<perlfunc/fork>
++and L<perlfork> if you are in Windows.
++
++=item fpathconf
++
++Retrieves the value of a configurable limit on a file or directory.  This
++uses file descriptors such as those obtained by calling C<POSIX::open>.
++
++The following will determine the maximum length of the longest allowable
++pathname on the filesystem which holds C</var/foo>.
++
++	$fd = POSIX::open( "/var/foo", &POSIX::O_RDONLY );
++	$path_max = POSIX::fpathconf( $fd, &POSIX::_PC_PATH_MAX );
++
++Returns C<undef> on failure.
++
++=item fprintf
++
++fprintf() is C-specific, see L<perlfunc/printf> instead.
++
++=item fputc
++
++fputc() is C-specific, see L<perlfunc/print> instead.
++
++=item fputs
++
++fputs() is C-specific, see L<perlfunc/print> instead.
++
++=item fread
++
++fread() is C-specific, see L<perlfunc/read> instead.
++
++=item free
++
++free() is C-specific.  Perl does memory management transparently.
++
++=item freopen
++
++freopen() is C-specific, see L<perlfunc/open> instead.
++
++=item frexp
++
++Return the mantissa and exponent of a floating-point number.
++
++	($mantissa, $exponent) = POSIX::frexp( 1.234e56 );
++
++=item fscanf
++
++fscanf() is C-specific, use E<lt>E<gt> and regular expressions instead.
++
++=item fseek
++
++Use method C<IO::Seekable::seek()> instead, or see L<perlfunc/seek>.
++
++=item fsetpos
++
++Use method C<IO::Seekable::setpos()> instead, or seek L<perlfunc/seek>.
++
++=item fstat
++
++Get file status.  This uses file descriptors such as those obtained by
++calling C<POSIX::open>.  The data returned is identical to the data from
++Perl's builtin C<stat> function.
++
++	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
++	@stats = POSIX::fstat( $fd );
++
++=item fsync
++
++Use method C<IO::Handle::sync()> instead.
++
++=item ftell
++
++Use method C<IO::Seekable::tell()> instead, or see L<perlfunc/tell>.
++
++=item fwrite
++
++fwrite() is C-specific, see L<perlfunc/print> instead.
++
++=item getc
++
++This is identical to Perl's builtin C<getc()> function,
++see L<perlfunc/getc>.
++
++=item getchar
++
++Returns one character from STDIN.  Identical to Perl's C<getc()>,
++see L<perlfunc/getc>.
++
++=item getcwd
++
++Returns the name of the current working directory.
++See also L<Cwd>.
++
++=item getegid
++
++Returns the effective group identifier.  Similar to Perl' s builtin
++variable C<$(>, see L<perlvar/$EGID>.
++
++=item getenv
++
++Returns the value of the specified environment variable.
++The same information is available through the C<%ENV> array.
++
++=item geteuid
++
++Returns the effective user identifier.  Identical to Perl's builtin C<$E<gt>>
++variable, see L<perlvar/$EUID>.
++
++=item getgid
++
++Returns the user's real group identifier.  Similar to Perl's builtin
++variable C<$)>, see L<perlvar/$GID>.
++
++=item getgrgid
++
++This is identical to Perl's builtin C<getgrgid()> function for
++returning group entries by group identifiers, see
++L<perlfunc/getgrgid>.
++
++=item getgrnam
++
++This is identical to Perl's builtin C<getgrnam()> function for
++returning group entries by group names, see L<perlfunc/getgrnam>.
++
++=item getgroups
++
++Returns the ids of the user's supplementary groups.  Similar to Perl's
++builtin variable C<$)>, see L<perlvar/$GID>.
++
++=item getlogin
++
++This is identical to Perl's builtin C<getlogin()> function for
++returning the user name associated with the current session, see
++L<perlfunc/getlogin>.
++
++=item getpgrp
++
++This is identical to Perl's builtin C<getpgrp()> function for
++returning the process group identifier of the current process, see
++L<perlfunc/getpgrp>.
++
++=item getpid
++
++Returns the process identifier.  Identical to Perl's builtin
++variable C<$$>, see L<perlvar/$PID>.
++
++=item getppid
++
++This is identical to Perl's builtin C<getppid()> function for
++returning the process identifier of the parent process of the current
++process , see L<perlfunc/getppid>.
++
++=item getpwnam
++
++This is identical to Perl's builtin C<getpwnam()> function for
++returning user entries by user names, see L<perlfunc/getpwnam>.
++
++=item getpwuid
++
++This is identical to Perl's builtin C<getpwuid()> function for
++returning user entries by user identifiers, see L<perlfunc/getpwuid>.
++
++=item gets
++
++Returns one line from C<STDIN>, similar to E<lt>E<gt>, also known
++as the C<readline()> function, see L<perlfunc/readline>.
++
++B<NOTE>: if you have C programs that still use C<gets()>, be very
++afraid.  The C<gets()> function is a source of endless grief because
++it has no buffer overrun checks.  It should B<never> be used.  The
++C<fgets()> function should be preferred instead.
++
++=item getuid
++
++Returns the user's identifier.  Identical to Perl's builtin C<$E<lt>> variable,
++see L<perlvar/$UID>.
++
++=item gmtime
++
++This is identical to Perl's builtin C<gmtime()> function for
++converting seconds since the epoch to a date in Greenwich Mean Time,
++see L<perlfunc/gmtime>.
++
++=item isalnum
++
++This is identical to the C function, except that it can apply to a
++single character or to a whole string.  Note that locale settings may
++affect what characters are considered C<isalnum>.  Does not work on
++Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:alnum:]]/> construct instead, or possibly
++the C</\w/> construct.
++
++=item isalpha
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<isalpha>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:alpha:]]/> construct instead.
++
++=item isatty
++
++Returns a boolean indicating whether the specified filehandle is connected
++to a tty.  Similar to the C<-t> operator, see L<perlfunc/-X>.
++
++=item iscntrl
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<iscntrl>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:cntrl:]]/> construct instead.
++
++=item isdigit
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<isdigit> (unlikely, but
++still possible). Does not work on Unicode characters code point 256
++or higher.  Consider using regular expressions and the C</[[:digit:]]/>
++construct instead, or the C</\d/> construct.
++
++=item isgraph
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<isgraph>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:graph:]]/> construct instead.
++
++=item islower
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<islower>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:lower:]]/> construct instead.  Do B<not> use
++C</[a-z]/>.
++
++=item isprint
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<isprint>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:print:]]/> construct instead.
++
++=item ispunct
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<ispunct>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:punct:]]/> construct instead.
++
++=item isspace
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<isspace>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:space:]]/> construct instead, or the C</\s/>
++construct.  (Note that C</\s/> and C</[[:space:]]/> are slightly
++different in that C</[[:space:]]/> can normally match a vertical tab,
++while C</\s/> does not.)
++
++=item isupper
++
++This is identical to the C function, except that it can apply to
++a single character or to a whole string.  Note that locale settings
++may affect what characters are considered C<isupper>.  Does not work
++on Unicode characters code point 256 or higher.  Consider using regular
++expressions and the C</[[:upper:]]/> construct instead.  Do B<not> use
++C</[A-Z]/>.
++
++=item isxdigit
++
++This is identical to the C function, except that it can apply to a single
++character or to a whole string.  Note that locale settings may affect what
++characters are considered C<isxdigit> (unlikely, but still possible).
++Does not work on Unicode characters code point 256 or higher.
++Consider using regular expressions and the C</[[:xdigit:]]/>
++construct instead, or simply C</[0-9a-f]/i>.
++
++=item kill
++
++This is identical to Perl's builtin C<kill()> function for sending
++signals to processes (often to terminate them), see L<perlfunc/kill>.
++
++=item labs
++
++(For returning absolute values of long integers.)
++labs() is C-specific, see L<perlfunc/abs> instead.
++
++=item lchown
++
++This is identical to the C function, except the order of arguments is
++consistent with Perl's builtin C<chown()> with the added restriction
++of only one path, not an list of paths.  Does the same thing as the 
++C<chown()> function but changes the owner of a symbolic link instead 
++of the file the symbolic link points to.
++
++=item ldexp
++
++This is identical to the C function C<ldexp()>
++for multiplying floating point numbers with powers of two.
++
++	$x_quadrupled = POSIX::ldexp($x, 2);
++
++=item ldiv
++
++(For computing dividends of long integers.)
++ldiv() is C-specific, use C</> and C<int()> instead.
++
++=item link
++
++This is identical to Perl's builtin C<link()> function
++for creating hard links into files, see L<perlfunc/link>.
++
++=item localeconv
++
++Get numeric formatting information.  Returns a reference to a hash
++containing the current locale formatting values.
++
++Here is how to query the database for the B<de> (Deutsch or German) locale.
++
++	$loc = POSIX::setlocale( &POSIX::LC_ALL, "de" );
++	print "Locale = $loc\n";
++	$lconv = POSIX::localeconv();
++	print "decimal_point	= ", $lconv->{decimal_point},	"\n";
++	print "thousands_sep	= ", $lconv->{thousands_sep},	"\n";
++	print "grouping	= ", $lconv->{grouping},	"\n";
++	print "int_curr_symbol	= ", $lconv->{int_curr_symbol},	"\n";
++	print "currency_symbol	= ", $lconv->{currency_symbol},	"\n";
++	print "mon_decimal_point = ", $lconv->{mon_decimal_point}, "\n";
++	print "mon_thousands_sep = ", $lconv->{mon_thousands_sep}, "\n";
++	print "mon_grouping	= ", $lconv->{mon_grouping},	"\n";
++	print "positive_sign	= ", $lconv->{positive_sign},	"\n";
++	print "negative_sign	= ", $lconv->{negative_sign},	"\n";
++	print "int_frac_digits	= ", $lconv->{int_frac_digits},	"\n";
++	print "frac_digits	= ", $lconv->{frac_digits},	"\n";
++	print "p_cs_precedes	= ", $lconv->{p_cs_precedes},	"\n";
++	print "p_sep_by_space	= ", $lconv->{p_sep_by_space},	"\n";
++	print "n_cs_precedes	= ", $lconv->{n_cs_precedes},	"\n";
++	print "n_sep_by_space	= ", $lconv->{n_sep_by_space},	"\n";
++	print "p_sign_posn	= ", $lconv->{p_sign_posn},	"\n";
++	print "n_sign_posn	= ", $lconv->{n_sign_posn},	"\n";
++
++=item localtime
++
++This is identical to Perl's builtin C<localtime()> function for
++converting seconds since the epoch to a date see L<perlfunc/localtime>.
++
++=item log
++
++This is identical to Perl's builtin C<log()> function,
++returning the natural (I<e>-based) logarithm of the numerical argument,
++see L<perlfunc/log>.
++
++=item log10
++
++This is identical to the C function C<log10()>,
++returning the 10-base logarithm of the numerical argument.
++You can also use
++
++    sub log10 { log($_[0]) / log(10) }
++
++or
++
++    sub log10 { log($_[0]) / 2.30258509299405 }
++
++or
++
++    sub log10 { log($_[0]) * 0.434294481903252 }
++
++=item longjmp
++
++longjmp() is C-specific: use L<perlfunc/die> instead.
++
++=item lseek
++
++Move the file's read/write position.  This uses file descriptors such as
++those obtained by calling C<POSIX::open>.
++
++	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
++	$off_t = POSIX::lseek( $fd, 0, &POSIX::SEEK_SET );
++
++Returns C<undef> on failure.
++
++=item malloc
++
++malloc() is C-specific.  Perl does memory management transparently.
++
++=item mblen
++
++This is identical to the C function C<mblen()>.
++Perl does not have any support for the wide and multibyte
++characters of the C standards, so this might be a rather
++useless function.
++
++=item mbstowcs
++
++This is identical to the C function C<mbstowcs()>.
++Perl does not have any support for the wide and multibyte
++characters of the C standards, so this might be a rather
++useless function.
++
++=item mbtowc
++
++This is identical to the C function C<mbtowc()>.
++Perl does not have any support for the wide and multibyte
++characters of the C standards, so this might be a rather
++useless function.
++
++=item memchr
++
++memchr() is C-specific, see L<perlfunc/index> instead.
++
++=item memcmp
++
++memcmp() is C-specific, use C<eq> instead, see L<perlop>.
++
++=item memcpy
++
++memcpy() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
++
++=item memmove
++
++memmove() is C-specific, use C<=>, see L<perlop>, or see L<perlfunc/substr>.
++
++=item memset
++
++memset() is C-specific, use C<x> instead, see L<perlop>.
++
++=item mkdir
++
++This is identical to Perl's builtin C<mkdir()> function
++for creating directories, see L<perlfunc/mkdir>.
++
++=item mkfifo
++
++This is similar to the C function C<mkfifo()> for creating
++FIFO special files.
++
++	if (mkfifo($path, $mode)) { ....
++
++Returns C<undef> on failure.  The C<$mode> is similar to the
++mode of C<mkdir()>, see L<perlfunc/mkdir>, though for C<mkfifo>
++you B<must> specify the C<$mode>.
++
++=item mktime
++
++Convert date/time info to a calendar time.
++
++Synopsis:
++
++	mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
++
++The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
++I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1.  The
++year (C<year>) is given in years since 1900.  I.e. The year 1995 is 95; the
++year 2001 is 101.  Consult your system's C<mktime()> manpage for details
++about these and the other arguments.
++
++Calendar time for December 12, 1995, at 10:30 am.
++
++	$time_t = POSIX::mktime( 0, 30, 10, 12, 11, 95 );
++	print "Date = ", POSIX::ctime($time_t);
++
++Returns C<undef> on failure.
++
++=item modf
++
++Return the integral and fractional parts of a floating-point number.
++
++	($fractional, $integral) = POSIX::modf( 3.14 );
++
++=item nice
++
++This is similar to the C function C<nice()>, for changing
++the scheduling preference of the current process.  Positive
++arguments mean more polite process, negative values more
++needy process.  Normal user processes can only be more polite.
++
++Returns C<undef> on failure.
++
++=item offsetof
++
++offsetof() is C-specific, you probably want to see L<perlfunc/pack> instead.
++
++=item open
++
++Open a file for reading for writing.  This returns file descriptors, not
++Perl filehandles.  Use C<POSIX::close> to close the file.
++
++Open a file read-only with mode 0666.
++
++	$fd = POSIX::open( "foo" );
++
++Open a file for read and write.
++
++	$fd = POSIX::open( "foo", &POSIX::O_RDWR );
++
++Open a file for write, with truncation.
++
++	$fd = POSIX::open( "foo", &POSIX::O_WRONLY | &POSIX::O_TRUNC );
++
++Create a new file with mode 0640.  Set up the file for writing.
++
++	$fd = POSIX::open( "foo", &POSIX::O_CREAT | &POSIX::O_WRONLY, 0640 );
++
++Returns C<undef> on failure.
++
++See also L<perlfunc/sysopen>.
++
++=item opendir
++
++Open a directory for reading.
++
++	$dir = POSIX::opendir( "/var" );
++	@files = POSIX::readdir( $dir );
++	POSIX::closedir( $dir );
++
++Returns C<undef> on failure.
++
++=item pathconf
++
++Retrieves the value of a configurable limit on a file or directory.
++
++The following will determine the maximum length of the longest allowable
++pathname on the filesystem which holds C</var>.
++
++	$path_max = POSIX::pathconf( "/var", &POSIX::_PC_PATH_MAX );
++
++Returns C<undef> on failure.
++
++=item pause
++
++This is similar to the C function C<pause()>, which suspends
++the execution of the current process until a signal is received.
++
++Returns C<undef> on failure.
++
++=item perror
++
++This is identical to the C function C<perror()>, which outputs to the
++standard error stream the specified message followed by ": " and the
++current error string.  Use the C<warn()> function and the C<$!>
++variable instead, see L<perlfunc/warn> and L<perlvar/$ERRNO>.
++
++=item pipe
++
++Create an interprocess channel.  This returns file descriptors like those
++returned by C<POSIX::open>.
++
++	my ($read, $write) = POSIX::pipe();
++	POSIX::write( $write, "hello", 5 );
++	POSIX::read( $read, $buf, 5 );
++
++See also L<perlfunc/pipe>.
++
++=item pow
++
++Computes C<$x> raised to the power C<$exponent>.
++
++	$ret = POSIX::pow( $x, $exponent );
++
++You can also use the C<**> operator, see L<perlop>.
++
++=item printf
++
++Formats and prints the specified arguments to STDOUT.
++See also L<perlfunc/printf>.
++
++=item putc
++
++putc() is C-specific, see L<perlfunc/print> instead.
++
++=item putchar
++
++putchar() is C-specific, see L<perlfunc/print> instead.
++
++=item puts
++
++puts() is C-specific, see L<perlfunc/print> instead.
++
++=item qsort
++
++qsort() is C-specific, see L<perlfunc/sort> instead.
++
++=item raise
++
++Sends the specified signal to the current process.
++See also L<perlfunc/kill> and the C<$$> in L<perlvar/$PID>.
++
++=item rand
++
++C<rand()> is non-portable, see L<perlfunc/rand> instead.
++
++=item read
++
++Read from a file.  This uses file descriptors such as those obtained by
++calling C<POSIX::open>.  If the buffer C<$buf> is not large enough for the
++read then Perl will extend it to make room for the request.
++
++	$fd = POSIX::open( "foo", &POSIX::O_RDONLY );
++	$bytes = POSIX::read( $fd, $buf, 3 );
++
++Returns C<undef> on failure.
++
++See also L<perlfunc/sysread>.
++
++=item readdir
++
++This is identical to Perl's builtin C<readdir()> function
++for reading directory entries, see L<perlfunc/readdir>.
++
++=item realloc
++
++realloc() is C-specific.  Perl does memory management transparently.
++
++=item remove
++
++This is identical to Perl's builtin C<unlink()> function
++for removing files, see L<perlfunc/unlink>.
++
++=item rename
++
++This is identical to Perl's builtin C<rename()> function
++for renaming files, see L<perlfunc/rename>.
++
++=item rewind
++
++Seeks to the beginning of the file.
++
++=item rewinddir
++
++This is identical to Perl's builtin C<rewinddir()> function for
++rewinding directory entry streams, see L<perlfunc/rewinddir>.
++
++=item rmdir
++
++This is identical to Perl's builtin C<rmdir()> function
++for removing (empty) directories, see L<perlfunc/rmdir>.
++
++=item scanf
++
++scanf() is C-specific, use E<lt>E<gt> and regular expressions instead,
++see L<perlre>.
++
++=item setgid
++
++Sets the real group identifier and the effective group identifier for
++this process.  Similar to assigning a value to the Perl's builtin
++C<$)> variable, see L<perlvar/$EGID>, except that the latter
++will change only the real user identifier, and that the setgid()
++uses only a single numeric argument, as opposed to a space-separated
++list of numbers.
++
++=item setjmp
++
++C<setjmp()> is C-specific: use C<eval {}> instead,
++see L<perlfunc/eval>.
++
++=item setlocale
++
++Modifies and queries program's locale.  The following examples assume
++
++	use POSIX qw(setlocale LC_ALL LC_CTYPE);
++
++has been issued.
++
++The following will set the traditional UNIX system locale behavior
++(the second argument C<"C">).
++
++	$loc = setlocale( LC_ALL, "C" );
++
++The following will query the current LC_CTYPE category.  (No second
++argument means 'query'.)
++
++	$loc = setlocale( LC_CTYPE );
++
++The following will set the LC_CTYPE behaviour according to the locale
++environment variables (the second argument C<"">).
++Please see your systems C<setlocale(3)> documentation for the locale
++environment variables' meaning or consult L<perllocale>.
++
++	$loc = setlocale( LC_CTYPE, "" );
++
++The following will set the LC_COLLATE behaviour to Argentinian
++Spanish. B<NOTE>: The naming and availability of locales depends on
++your operating system. Please consult L<perllocale> for how to find
++out which locales are available in your system.
++
++	$loc = setlocale( LC_COLLATE, "es_AR.ISO8859-1" );
++
++=item setpgid
++
++This is similar to the C function C<setpgid()> for
++setting the process group identifier of the current process.
++
++Returns C<undef> on failure.
++
++=item setsid
++
++This is identical to the C function C<setsid()> for
++setting the session identifier of the current process.
++
++=item setuid
++
++Sets the real user identifier and the effective user identifier for
++this process.  Similar to assigning a value to the Perl's builtin
++C<$E<lt>> variable, see L<perlvar/$UID>, except that the latter
++will change only the real user identifier.
++
++=item sigaction
++
++Detailed signal management.  This uses C<POSIX::SigAction> objects for
++the C<action> and C<oldaction> arguments (the oldaction can also be
++just a hash reference).  Consult your system's C<sigaction> manpage
++for details, see also C<POSIX::SigRt>.
++
++Synopsis:
++
++	sigaction(signal, action, oldaction = 0)
++
++Returns C<undef> on failure.  The C<signal> must be a number (like
++SIGHUP), not a string (like "SIGHUP"), though Perl does try hard
++to understand you.
++
++If you use the SA_SIGINFO flag, the signal handler will in addition to
++the first argument, the signal name, also receive a second argument, a
++hash reference, inside which are the following keys with the following
++semantics, as defined by POSIX/SUSv3:
++
++    signo       the signal number
++    errno       the error number
++    code        if this is zero or less, the signal was sent by
++                a user process and the uid and pid make sense,
++                otherwise the signal was sent by the kernel
++
++The following are also defined by POSIX/SUSv3, but unfortunately
++not very widely implemented:
++
++    pid         the process id generating the signal
++    uid         the uid of the process id generating the signal
++    status      exit value or signal for SIGCHLD
++    band        band event for SIGPOLL
++
++A third argument is also passed to the handler, which contains a copy
++of the raw binary contents of the siginfo structure: if a system has
++some non-POSIX fields, this third argument is where to unpack() them
++from.
++
++Note that not all siginfo values make sense simultaneously (some are
++valid only for certain signals, for example), and not all values make
++sense from Perl perspective, you should to consult your system's
++C<sigaction> and possibly also C<siginfo> documentation.
++
++=item siglongjmp
++
++siglongjmp() is C-specific: use L<perlfunc/die> instead.
++
++=item sigpending
++
++Examine signals that are blocked and pending.  This uses C<POSIX::SigSet>
++objects for the C<sigset> argument.  Consult your system's C<sigpending>
++manpage for details.
++
++Synopsis:
++
++	sigpending(sigset)
++
++Returns C<undef> on failure.
++
++=item sigprocmask
++
++Change and/or examine calling process's signal mask.  This uses
++C<POSIX::SigSet> objects for the C<sigset> and C<oldsigset> arguments.
++Consult your system's C<sigprocmask> manpage for details.
++
++Synopsis:
++
++	sigprocmask(how, sigset, oldsigset = 0)
++
++Returns C<undef> on failure.
++
++=item sigsetjmp
++
++C<sigsetjmp()> is C-specific: use C<eval {}> instead,
++see L<perlfunc/eval>.
++
++=item sigsuspend
++
++Install a signal mask and suspend process until signal arrives.  This uses
++C<POSIX::SigSet> objects for the C<signal_mask> argument.  Consult your
++system's C<sigsuspend> manpage for details.
++
++Synopsis:
++
++	sigsuspend(signal_mask)
++
++Returns C<undef> on failure.
++
++=item sin
++
++This is identical to Perl's builtin C<sin()> function
++for returning the sine of the numerical argument,
++see L<perlfunc/sin>.  See also L<Math::Trig>.
++
++=item sinh
++
++This is identical to the C function C<sinh()>
++for returning the hyperbolic sine of the numerical argument.
++See also L<Math::Trig>.
++
++=item sleep
++
++This is functionally identical to Perl's builtin C<sleep()> function
++for suspending the execution of the current for process for certain
++number of seconds, see L<perlfunc/sleep>.  There is one significant
++difference, however: C<POSIX::sleep()> returns the number of
++B<unslept> seconds, while the C<CORE::sleep()> returns the
++number of slept seconds.
++
++=item sprintf
++
++This is similar to Perl's builtin C<sprintf()> function
++for returning a string that has the arguments formatted as requested,
++see L<perlfunc/sprintf>.
++
++=item sqrt
++
++This is identical to Perl's builtin C<sqrt()> function.
++for returning the square root of the numerical argument,
++see L<perlfunc/sqrt>.
++
++=item srand
++
++Give a seed the pseudorandom number generator, see L<perlfunc/srand>.
++
++=item sscanf
++
++sscanf() is C-specific, use regular expressions instead,
++see L<perlre>.
++
++=item stat
++
++This is identical to Perl's builtin C<stat()> function
++for returning information about files and directories.
++
++=item strcat
++
++strcat() is C-specific, use C<.=> instead, see L<perlop>.
++
++=item strchr
++
++strchr() is C-specific, see L<perlfunc/index> instead.
++
++=item strcmp
++
++strcmp() is C-specific, use C<eq> or C<cmp> instead, see L<perlop>.
++
++=item strcoll
++
++This is identical to the C function C<strcoll()>
++for collating (comparing) strings transformed using
++the C<strxfrm()> function.  Not really needed since
++Perl can do this transparently, see L<perllocale>.
++
++=item strcpy
++
++strcpy() is C-specific, use C<=> instead, see L<perlop>.
++
++=item strcspn
++
++strcspn() is C-specific, use regular expressions instead,
++see L<perlre>.
++
++=item strerror
++
++Returns the error string for the specified errno.
++Identical to the string form of the C<$!>, see L<perlvar/$ERRNO>.
++
++=item strftime
++
++Convert date and time information to string.  Returns the string.
++
++Synopsis:
++
++	strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
++
++The month (C<mon>), weekday (C<wday>), and yearday (C<yday>) begin at zero.
++I.e. January is 0, not 1; Sunday is 0, not 1; January 1st is 0, not 1.  The
++year (C<year>) is given in years since 1900.  I.e., the year 1995 is 95; the
++year 2001 is 101.  Consult your system's C<strftime()> manpage for details
++about these and the other arguments.
++
++If you want your code to be portable, your format (C<fmt>) argument
++should use only the conversion specifiers defined by the ANSI C
++standard (C89, to play safe).  These are C<aAbBcdHIjmMpSUwWxXyYZ%>.
++But even then, the B<results> of some of the conversion specifiers are
++non-portable.  For example, the specifiers C<aAbBcpZ> change according
++to the locale settings of the user, and both how to set locales (the
++locale names) and what output to expect are non-standard.
++The specifier C<c> changes according to the timezone settings of the
++user and the timezone computation rules of the operating system.
++The C<Z> specifier is notoriously unportable since the names of
++timezones are non-standard. Sticking to the numeric specifiers is the
++safest route.
++
++The given arguments are made consistent as though by calling
++C<mktime()> before calling your system's C<strftime()> function,
++except that the C<isdst> value is not affected.
++
++The string for Tuesday, December 12, 1995.
++
++	$str = POSIX::strftime( "%A, %B %d, %Y", 0, 0, 0, 12, 11, 95, 2 );
++	print "$str\n";
++
++=item strlen
++
++strlen() is C-specific, use C<length()> instead, see L<perlfunc/length>.
++
++=item strncat
++
++strncat() is C-specific, use C<.=> instead, see L<perlop>.
++
++=item strncmp
++
++strncmp() is C-specific, use C<eq> instead, see L<perlop>.
++
++=item strncpy
++
++strncpy() is C-specific, use C<=> instead, see L<perlop>.
++
++=item strpbrk
++
++strpbrk() is C-specific, use regular expressions instead,
++see L<perlre>.
++
++=item strrchr
++
++strrchr() is C-specific, see L<perlfunc/rindex> instead.
++
++=item strspn
++
++strspn() is C-specific, use regular expressions instead,
++see L<perlre>.
++
++=item strstr
++
++This is identical to Perl's builtin C<index()> function,
++see L<perlfunc/index>.
++
++=item strtod
++
++String to double translation. Returns the parsed number and the number
++of characters in the unparsed portion of the string.  Truly
++POSIX-compliant systems set $! ($ERRNO) to indicate a translation
++error, so clear $! before calling strtod.  However, non-POSIX systems
++may not check for overflow, and therefore will never set $!.
++
++strtod should respect any POSIX I<setlocale()> settings.
++
++To parse a string $str as a floating point number use
++
++    $! = 0;
++    ($num, $n_unparsed) = POSIX::strtod($str);
++
++The second returned item and $! can be used to check for valid input:
++
++    if (($str eq '') || ($n_unparsed != 0) || $!) {
++        die "Non-numeric input $str" . ($! ? ": $!\n" : "\n");
++    }
++
++When called in a scalar context strtod returns the parsed number.
++
++=item strtok
++
++strtok() is C-specific, use regular expressions instead, see
++L<perlre>, or L<perlfunc/split>.
++
++=item strtol
++
++String to (long) integer translation.  Returns the parsed number and
++the number of characters in the unparsed portion of the string.  Truly
++POSIX-compliant systems set $! ($ERRNO) to indicate a translation
++error, so clear $! before calling strtol.  However, non-POSIX systems
++may not check for overflow, and therefore will never set $!.
++
++strtol should respect any POSIX I<setlocale()> settings.
++
++To parse a string $str as a number in some base $base use
++
++    $! = 0;
++    ($num, $n_unparsed) = POSIX::strtol($str, $base);
++
++The base should be zero or between 2 and 36, inclusive.  When the base
++is zero or omitted strtol will use the string itself to determine the
++base: a leading "0x" or "0X" means hexadecimal; a leading "0" means
++octal; any other leading characters mean decimal.  Thus, "1234" is
++parsed as a decimal number, "01234" as an octal number, and "0x1234"
++as a hexadecimal number.
++
++The second returned item and $! can be used to check for valid input:
++
++    if (($str eq '') || ($n_unparsed != 0) || !$!) {
++        die "Non-numeric input $str" . $! ? ": $!\n" : "\n";
++    }
++
++When called in a scalar context strtol returns the parsed number.
++
++=item strtoul
++
++String to unsigned (long) integer translation.  strtoul() is identical
++to strtol() except that strtoul() only parses unsigned integers.  See
++L</strtol> for details.
++
++Note: Some vendors supply strtod() and strtol() but not strtoul().
++Other vendors that do supply strtoul() parse "-1" as a valid value.
++
++=item strxfrm
++
++String transformation.  Returns the transformed string.
++
++	$dst = POSIX::strxfrm( $src );
++
++Used in conjunction with the C<strcoll()> function, see L</strcoll>.
++
++Not really needed since Perl can do this transparently, see
++L<perllocale>.
++
++=item sysconf
++
++Retrieves values of system configurable variables.
++
++The following will get the machine's clock speed.
++
++	$clock_ticks = POSIX::sysconf( &POSIX::_SC_CLK_TCK );
++
++Returns C<undef> on failure.
++
++=item system
++
++This is identical to Perl's builtin C<system()> function, see
++L<perlfunc/system>.
++
++=item tan
++
++This is identical to the C function C<tan()>, returning the
++tangent of the numerical argument.  See also L<Math::Trig>.
++
++=item tanh
++
++This is identical to the C function C<tanh()>, returning the
++hyperbolic tangent of the numerical argument.   See also L<Math::Trig>.
++
++=item tcdrain
++
++This is similar to the C function C<tcdrain()> for draining
++the output queue of its argument stream.
++
++Returns C<undef> on failure.
++
++=item tcflow
++
++This is similar to the C function C<tcflow()> for controlling
++the flow of its argument stream.
++
++Returns C<undef> on failure.
++
++=item tcflush
++
++This is similar to the C function C<tcflush()> for flushing
++the I/O buffers of its argument stream.
++
++Returns C<undef> on failure.
++
++=item tcgetpgrp
++
++This is identical to the C function C<tcgetpgrp()> for returning the
++process group identifier of the foreground process group of the controlling
++terminal.
++
++=item tcsendbreak
++
++This is similar to the C function C<tcsendbreak()> for sending
++a break on its argument stream.
++
++Returns C<undef> on failure.
++
++=item tcsetpgrp
++
++This is similar to the C function C<tcsetpgrp()> for setting the
++process group identifier of the foreground process group of the controlling
++terminal.
++
++Returns C<undef> on failure.
++
++=item time
++
++This is identical to Perl's builtin C<time()> function
++for returning the number of seconds since the epoch
++(whatever it is for the system), see L<perlfunc/time>.
++
++=item times
++
++The times() function returns elapsed realtime since some point in the past
++(such as system startup), user and system times for this process, and user
++and system times used by child processes.  All times are returned in clock
++ticks.
++
++    ($realtime, $user, $system, $cuser, $csystem) = POSIX::times();
++
++Note: Perl's builtin C<times()> function returns four values, measured in
++seconds.
++
++=item tmpfile
++
++Use method C<IO::File::new_tmpfile()> instead, or see L<File::Temp>.
++
++=item tmpnam
++
++Returns a name for a temporary file.
++
++	$tmpfile = POSIX::tmpnam();
++
++For security reasons, which are probably detailed in your system's
++documentation for the C library tmpnam() function, this interface
++should not be used; instead see L<File::Temp>.
++
++=item tolower
++
++This is identical to the C function, except that it can apply to a single
++character or to a whole string.  Consider using the C<lc()> function,
++see L<perlfunc/lc>, or the equivalent C<\L> operator inside doublequotish
++strings.
++
++=item toupper
++
++This is identical to the C function, except that it can apply to a single
++character or to a whole string.  Consider using the C<uc()> function,
++see L<perlfunc/uc>, or the equivalent C<\U> operator inside doublequotish
++strings.
++
++=item ttyname
++
++This is identical to the C function C<ttyname()> for returning the
++name of the current terminal.
++
++=item tzname
++
++Retrieves the time conversion information from the C<tzname> variable.
++
++	POSIX::tzset();
++	($std, $dst) = POSIX::tzname();
++
++=item tzset
++
++This is identical to the C function C<tzset()> for setting
++the current timezone based on the environment variable C<TZ>,
++to be used by C<ctime()>, C<localtime()>, C<mktime()>, and C<strftime()>
++functions.
++
++=item umask
++
++This is identical to Perl's builtin C<umask()> function
++for setting (and querying) the file creation permission mask,
++see L<perlfunc/umask>.
++
++=item uname
++
++Get name of current operating system.
++
++	($sysname, $nodename, $release, $version, $machine) = POSIX::uname();
++
++Note that the actual meanings of the various fields are not
++that well standardized, do not expect any great portability.
++The C<$sysname> might be the name of the operating system,
++the C<$nodename> might be the name of the host, the C<$release>
++might be the (major) release number of the operating system,
++the C<$version> might be the (minor) release number of the
++operating system, and the C<$machine> might be a hardware identifier.
++Maybe.
++
++=item ungetc
++
++Use method C<IO::Handle::ungetc()> instead.
++
++=item unlink
++
++This is identical to Perl's builtin C<unlink()> function
++for removing files, see L<perlfunc/unlink>.
++
++=item utime
++
++This is identical to Perl's builtin C<utime()> function
++for changing the time stamps of files and directories,
++see L<perlfunc/utime>.
++
++=item vfprintf
++
++vfprintf() is C-specific, see L<perlfunc/printf> instead.
++
++=item vprintf
++
++vprintf() is C-specific, see L<perlfunc/printf> instead.
++
++=item vsprintf
++
++vsprintf() is C-specific, see L<perlfunc/sprintf> instead.
++
++=item wait
++
++This is identical to Perl's builtin C<wait()> function,
++see L<perlfunc/wait>.
++
++=item waitpid
++
++Wait for a child process to change state.  This is identical to Perl's
++builtin C<waitpid()> function, see L<perlfunc/waitpid>.
++
++	$pid = POSIX::waitpid( -1, POSIX::WNOHANG );
++	print "status = ", ($? / 256), "\n";
++
++=item wcstombs
++
++This is identical to the C function C<wcstombs()>.
++Perl does not have any support for the wide and multibyte
++characters of the C standards, so this might be a rather
++useless function.
++
++=item wctomb
++
++This is identical to the C function C<wctomb()>.
++Perl does not have any support for the wide and multibyte
++characters of the C standards, so this might be a rather
++useless function.
++
++=item write
++
++Write to a file.  This uses file descriptors such as those obtained by
++calling C<POSIX::open>.
++
++	$fd = POSIX::open( "foo", &POSIX::O_WRONLY );
++	$buf = "hello";
++	$bytes = POSIX::write( $fd, $buf, 5 );
++
++Returns C<undef> on failure.
++
++See also L<perlfunc/syswrite>.
++
++=back
++
++=head1 CLASSES
++
++=head2 POSIX::SigAction
++
++=over 8
++
++=item new
++
++Creates a new C<POSIX::SigAction> object which corresponds to the C
++C<struct sigaction>.  This object will be destroyed automatically when
++it is no longer needed.  The first parameter is the handler, a sub
++reference.  The second parameter is a C<POSIX::SigSet> object, it
++defaults to the empty set.  The third parameter contains the
++C<sa_flags>, it defaults to 0.
++
++	$sigset = POSIX::SigSet->new(SIGINT, SIGQUIT);
++	$sigaction = POSIX::SigAction->new( \&handler, $sigset, &POSIX::SA_NOCLDSTOP );
++
++This C<POSIX::SigAction> object is intended for use with the C<POSIX::sigaction()>
++function.
++
++=back
++
++=over 8
++
++=item handler
++
++=item mask
++
++=item flags
++
++accessor functions to get/set the values of a SigAction object.
++
++	$sigset = $sigaction->mask;
++	$sigaction->flags(&POSIX::SA_RESTART);
++
++=item safe
++
++accessor function for the "safe signals" flag of a SigAction object; see
++L<perlipc> for general information on safe (a.k.a. "deferred") signals.  If
++you wish to handle a signal safely, use this accessor to set the "safe" flag
++in the C<POSIX::SigAction> object:
++
++	$sigaction->safe(1);
++
++You may also examine the "safe" flag on the output action object which is
++filled in when given as the third parameter to C<POSIX::sigaction()>:
++
++	sigaction(SIGINT, $new_action, $old_action);
++	if ($old_action->safe) {
++	    # previous SIGINT handler used safe signals
++	}
++
++=back
++
++=head2 POSIX::SigRt
++
++=over 8
++
++=item %SIGRT
++
++A hash of the POSIX realtime signal handlers.  It is an extension of
++the standard %SIG, the $POSIX::SIGRT{SIGRTMIN} is roughly equivalent
++to $SIG{SIGRTMIN}, but the right POSIX moves (see below) are made with
++the POSIX::SigSet and POSIX::sigaction instead of accessing the %SIG.
++
++You can set the %POSIX::SIGRT elements to set the POSIX realtime
++signal handlers, use C<delete> and C<exists> on the elements, and use
++C<scalar> on the C<%POSIX::SIGRT> to find out how many POSIX realtime
++signals there are available (SIGRTMAX - SIGRTMIN + 1, the SIGRTMAX is
++a valid POSIX realtime signal).
++
++Setting the %SIGRT elements is equivalent to calling this:
++
++  sub new {
++    my ($rtsig, $handler, $flags) = @_;
++    my $sigset = POSIX::SigSet($rtsig);
++    my $sigact = POSIX::SigAction->new($handler, $sigset, $flags);
++    sigaction($rtsig, $sigact);
++  }
++
++The flags default to zero, if you want something different you can
++either use C<local> on $POSIX::SigRt::SIGACTION_FLAGS, or you can
++derive from POSIX::SigRt and define your own C<new()> (the tied hash
++STORE method of the %SIGRT calls C<new($rtsig, $handler, $SIGACTION_FLAGS)>,
++where the $rtsig ranges from zero to SIGRTMAX - SIGRTMIN + 1).
++
++Just as with any signal, you can use sigaction($rtsig, undef, $oa) to
++retrieve the installed signal handler (or, rather, the signal action).
++
++B<NOTE:> whether POSIX realtime signals really work in your system, or
++whether Perl has been compiled so that it works with them, is outside
++of this discussion.
++
++=item SIGRTMIN
++
++Return the minimum POSIX realtime signal number available, or C<undef>
++if no POSIX realtime signals are available.
++
++=item SIGRTMAX
++
++Return the maximum POSIX realtime signal number available, or C<undef>
++if no POSIX realtime signals are available.
++
++=back
++
++=head2 POSIX::SigSet
++
++=over 8
++
++=item new
++
++Create a new SigSet object.  This object will be destroyed automatically
++when it is no longer needed.  Arguments may be supplied to initialize the
++set.
++
++Create an empty set.
++
++	$sigset = POSIX::SigSet->new;
++
++Create a set with SIGUSR1.
++
++	$sigset = POSIX::SigSet->new( &POSIX::SIGUSR1 );
++
++=item addset
++
++Add a signal to a SigSet object.
++
++	$sigset->addset( &POSIX::SIGUSR2 );
++
++Returns C<undef> on failure.
++
++=item delset
++
++Remove a signal from the SigSet object.
++
++	$sigset->delset( &POSIX::SIGUSR2 );
++
++Returns C<undef> on failure.
++
++=item emptyset
++
++Initialize the SigSet object to be empty.
++
++	$sigset->emptyset();
++
++Returns C<undef> on failure.
++
++=item fillset
++
++Initialize the SigSet object to include all signals.
++
++	$sigset->fillset();
++
++Returns C<undef> on failure.
++
++=item ismember
++
++Tests the SigSet object to see if it contains a specific signal.
++
++	if( $sigset->ismember( &POSIX::SIGUSR1 ) ){
++		print "contains SIGUSR1\n";
++	}
++
++=back
++
++=head2 POSIX::Termios
++
++=over 8
++
++=item new
++
++Create a new Termios object.  This object will be destroyed automatically
++when it is no longer needed.  A Termios object corresponds to the termios
++C struct.  new() mallocs a new one, getattr() fills it from a file descriptor,
++and setattr() sets a file descriptor's parameters to match Termios' contents.
++
++	$termios = POSIX::Termios->new;
++
++=item getattr
++
++Get terminal control attributes.
++
++Obtain the attributes for stdin.
++
++	$termios->getattr( 0 ) # Recommended for clarity.
++	$termios->getattr()
++
++Obtain the attributes for stdout.
++
++	$termios->getattr( 1 )
++
++Returns C<undef> on failure.
++
++=item getcc
++
++Retrieve a value from the c_cc field of a termios object.  The c_cc field is
++an array so an index must be specified.
++
++	$c_cc[1] = $termios->getcc(1);
++
++=item getcflag
++
++Retrieve the c_cflag field of a termios object.
++
++	$c_cflag = $termios->getcflag;
++
++=item getiflag
++
++Retrieve the c_iflag field of a termios object.
++
++	$c_iflag = $termios->getiflag;
++
++=item getispeed
++
++Retrieve the input baud rate.
++
++	$ispeed = $termios->getispeed;
++
++=item getlflag
++
++Retrieve the c_lflag field of a termios object.
++
++	$c_lflag = $termios->getlflag;
++
++=item getoflag
++
++Retrieve the c_oflag field of a termios object.
++
++	$c_oflag = $termios->getoflag;
++
++=item getospeed
++
++Retrieve the output baud rate.
++
++	$ospeed = $termios->getospeed;
++
++=item setattr
++
++Set terminal control attributes.
++
++Set attributes immediately for stdout.
++
++	$termios->setattr( 1, &POSIX::TCSANOW );
++
++Returns C<undef> on failure.
++
++=item setcc
++
++Set a value in the c_cc field of a termios object.  The c_cc field is an
++array so an index must be specified.
++
++	$termios->setcc( &POSIX::VEOF, 1 );
++
++=item setcflag
++
++Set the c_cflag field of a termios object.
++
++	$termios->setcflag( $c_cflag | &POSIX::CLOCAL );
++
++=item setiflag
++
++Set the c_iflag field of a termios object.
++
++	$termios->setiflag( $c_iflag | &POSIX::BRKINT );
++
++=item setispeed
++
++Set the input baud rate.
++
++	$termios->setispeed( &POSIX::B9600 );
++
++Returns C<undef> on failure.
++
++=item setlflag
++
++Set the c_lflag field of a termios object.
++
++	$termios->setlflag( $c_lflag | &POSIX::ECHO );
++
++=item setoflag
++
++Set the c_oflag field of a termios object.
++
++	$termios->setoflag( $c_oflag | &POSIX::OPOST );
++
++=item setospeed
++
++Set the output baud rate.
++
++	$termios->setospeed( &POSIX::B9600 );
++
++Returns C<undef> on failure.
++
++=item Baud rate values
++
++B38400 B75 B200 B134 B300 B1800 B150 B0 B19200 B1200 B9600 B600 B4800 B50 B2400 B110
++
++=item Terminal interface values
++
++TCSADRAIN TCSANOW TCOON TCIOFLUSH TCOFLUSH TCION TCIFLUSH TCSAFLUSH TCIOFF TCOOFF
++
++=item c_cc field values
++
++VEOF VEOL VERASE VINTR VKILL VQUIT VSUSP VSTART VSTOP VMIN VTIME NCCS
++
++=item c_cflag field values
++
++CLOCAL CREAD CSIZE CS5 CS6 CS7 CS8 CSTOPB HUPCL PARENB PARODD
++
++=item c_iflag field values
++
++BRKINT ICRNL IGNBRK IGNCR IGNPAR INLCR INPCK ISTRIP IXOFF IXON PARMRK
++
++=item c_lflag field values
++
++ECHO ECHOE ECHOK ECHONL ICANON IEXTEN ISIG NOFLSH TOSTOP
++
++=item c_oflag field values
++
++OPOST
++
++=back
++
++=head1 PATHNAME CONSTANTS
++
++=over 8
++
++=item Constants
++
++_PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE
++
++=back
++
++=head1 POSIX CONSTANTS
++
++=over 8
++
++=item Constants
++
++_POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED _POSIX_JOB_CONTROL _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SAVED_IDS _POSIX_SSIZE_MAX _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION
++
++=back
++
++=head1 SYSTEM CONFIGURATION
++
++=over 8
++
++=item Constants
++
++_SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX _SC_VERSION
++
++=back
++
++=head1 ERRNO
++
++=over 8
++
++=item Constants
++
++E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
++EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
++EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH EINPROGRESS EINTR
++EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG
++ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODEV ENOENT ENOEXEC
++ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR
++ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE
++EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS
++ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS
++ETXTBSY EUSERS EWOULDBLOCK EXDEV
++
++=back
++
++=head1 FCNTL
++
++=over 8
++
++=item Constants
++
++FD_CLOEXEC F_DUPFD F_GETFD F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK F_WRLCK O_ACCMODE O_APPEND O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY
++
++=back
++
++=head1 FLOAT
++
++=over 8
++
++=item Constants
++
++DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX FLT_MAX_10_EXP FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX FLT_ROUNDS LDBL_DIG LDBL_EPSILON LDBL_MANT_DIG LDBL_MAX LDBL_MAX_10_EXP LDBL_MAX_EXP LDBL_MIN LDBL_MIN_10_EXP LDBL_MIN_EXP
++
++=back
++
++=head1 LIMITS
++
++=over 8
++
++=item Constants
++
++ARG_MAX CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX INT_MAX INT_MIN LINK_MAX LONG_MAX LONG_MIN MAX_CANON MAX_INPUT MB_LEN_MAX NAME_MAX NGROUPS_MAX OPEN_MAX PATH_MAX PIPE_BUF SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN SSIZE_MAX STREAM_MAX TZNAME_MAX UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX
++
++=back
++
++=head1 LOCALE
++
++=over 8
++
++=item Constants
++
++LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
++
++=back
++
++=head1 MATH
++
++=over 8
++
++=item Constants
++
++HUGE_VAL
++
++=back
++
++=head1 SIGNAL
++
++=over 8
++
++=item Constants
++
++SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND SA_RESTART
++SA_SIGINFO SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT
++SIGKILL SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
++SIGUSR1 SIGUSR2 SIG_BLOCK SIG_DFL SIG_ERR SIG_IGN SIG_SETMASK
++SIG_UNBLOCK
++
++=back
++
++=head1 STAT
++
++=over 8
++
++=item Constants
++
++S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
++
++=item Macros
++
++S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG
++
++=back
++
++=head1 STDLIB
++
++=over 8
++
++=item Constants
++
++EXIT_FAILURE EXIT_SUCCESS MB_CUR_MAX RAND_MAX
++
++=back
++
++=head1 STDIO
++
++=over 8
++
++=item Constants
++
++BUFSIZ EOF FILENAME_MAX L_ctermid L_cuserid L_tmpname TMP_MAX
++
++=back
++
++=head1 TIME
++
++=over 8
++
++=item Constants
++
++CLK_TCK CLOCKS_PER_SEC
++
++=back
++
++=head1 UNISTD
++
++=over 8
++
++=item Constants
++
++R_OK SEEK_CUR SEEK_END SEEK_SET STDIN_FILENO STDOUT_FILENO STDERR_FILENO W_OK X_OK
++
++=back
++
++=head1 WAIT
++
++=over 8
++
++=item Constants
++
++WNOHANG WUNTRACED
++
++=over 16
++
++=item WNOHANG
++
++Do not suspend the calling process until a child process
++changes state but instead return immediately.
++
++=item WUNTRACED
++
++Catch stopped child processes.
++
++=back
++
++=item Macros
++
++WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG WIFSTOPPED WSTOPSIG
++
++=over 16
++
++=item WIFEXITED
++
++WIFEXITED($?) returns true if the child process exited normally
++(C<exit()> or by falling off the end of C<main()>)
++
++=item WEXITSTATUS
++
++WEXITSTATUS($?) returns the normal exit status of the child process
++(only meaningful if WIFEXITED($?) is true)
++
++=item WIFSIGNALED
++
++WIFSIGNALED($?) returns true if the child process terminated because
++of a signal
++
++=item WTERMSIG
++
++WTERMSIG($?) returns the signal the child process terminated for
++(only meaningful if WIFSIGNALED($?) is true)
++
++=item WIFSTOPPED
++
++WIFSTOPPED($?) returns true if the child process is currently stopped
++(can happen only if you specified the WUNTRACED flag to waitpid())
++
++=item WSTOPSIG
++
++WSTOPSIG($?) returns the signal the child process was stopped for
++(only meaningful if WIFSTOPPED($?) is true)
++
++=back
++
++=back
++
diff --git a/meta/recipes-devtools/perl/perl-native_5.12.2.bb b/meta/recipes-devtools/perl/perl-native_5.12.2.bb
index 5996494..cd21e9e 100644
--- a/meta/recipes-devtools/perl/perl-native_5.12.2.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.12.2.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
 LICENSE = "Artistic|GPL"
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 		    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
-PR = "r5"
+PR = "r6"
 
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
                     file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
@@ -12,7 +12,9 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
            file://Configure-multilib.patch;patch=1 \
            file://perl-configpm-switch.patch;patch=1 \
-           file://parallel_build_fix.patch \
+           file://parallel_build_fix_1.patch \
+           file://parallel_build_fix_2.patch \
+           file://parallel_build_fix_3.patch \
            file://native-nopacklist.patch;patch=1 \
            file://native-perlinc.patch;patch=1"
 
diff --git a/meta/recipes-devtools/perl/perl_5.12.2.bb b/meta/recipes-devtools/perl/perl_5.12.2.bb
index e659152..18fad18 100644
--- a/meta/recipes-devtools/perl/perl_5.12.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.12.2.bb
@@ -8,7 +8,7 @@ PRIORITY = "optional"
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db perl-native-${PV} grep-native"
 DEPENDS += "gdbm zlib"
-PR = "r1"
+PR = "r2"
 
 # 5.10.1 has Module::Build built-in
 PROVIDES += "libmodule-build-perl"
@@ -18,7 +18,9 @@ PROVIDES += "libmodule-build-perl"
 
 SRC_URI = "ftp://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz \
         file://Makefile.patch;patch=1 \
-        file://parallel_build_fix.patch \
+        file://parallel_build_fix_1.patch \
+        file://parallel_build_fix_2.patch \
+        file://parallel_build_fix_3.patch \
         file://Makefile.SH.patch;patch=1 \
         file://installperl.patch;patch=1 \
         file://perl-dynloader.patch;patch=1 \
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 14/50] Suppress useless warnings during udev startup
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (12 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 13/50] perl: import parallel build fixes from upstream git tree Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 15/50] gtk+: disable build of faq and tutorial docs Koen Kooi
                   ` (36 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Gary Thomas <gary@mlbassoc.com>

I have a number of platforms which have no realtime clock
(i.e. no sense of what day/time it is).  On these platforms,
poky dutifully tries to keep somewhat sane with stored
time stamps that are saved on reboot and restored early
on during initialization.  A fair compromise.

However, before that code runs, the udev script tries to
restore well known devices using tar.  This will often
lead to messages such as these since the kernel has no
way to set the time:
   tar: dev/pts: implausibly old time stamp 1970-01-01 00:00:00
   tar: dev/char/3:134: time stamp 1970-01-01 00:00:09 is 0.435041705 s in the future

The attached patch filters these messages out as they don't
convey anything useful and indeed are worrisome to more naive
users.

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

From a6773d3e00dbd168817730fff1c3fc7e1b6950f5 Mon Sep 17 00:00:00 2001
From: Gary Thomas <gary@mlbassoc.com>
Date: Thu, 17 Feb 2011 11:30:18 -0700
Subject: [PATCH] Suppress messages about bad time stamps during initial device setup

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/udev/udev-164/init |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/udev/udev-164/init b/meta/recipes-core/udev/udev-164/init
index eb5e507..1a8fca5 100644
--- a/meta/recipes-core/udev/udev-164/init
+++ b/meta/recipes-core/udev/udev-164/init
@@ -35,7 +35,7 @@ LANG=C awk "\$2 == \"/dev\" && \$4 == \"tmpfs\" { exit 1 }" /proc/mounts && {
 }
 
 if [ -e /etc/dev.tar ]; then
-	(cd /; tar xf /etc/dev.tar)
+	(cd /; tar xf /etc/dev.tar 2>&1 | grep -v 'time stamp')
 	not_first_boot=1
 fi
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 15/50] gtk+: disable build of faq and tutorial docs
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (13 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 14/50] Suppress useless warnings during udev startup Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 16/50] package.bbclass: Unbreak per file dependencies and blacklist doc packages Koen Kooi
                   ` (35 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

Joshua Lock noted that these problematic doc builds have been removed
upstream, and they are really superfluous for embedded builds.

This fixes [BUGID #741]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 .../recipes-gnome/gtk+/gtk+-2.22.1/doc-fixes.patch |   44 +++++++-------------
 meta/recipes-gnome/gtk+/gtk+_2.22.1.bb             |    2 +-
 2 files changed, 16 insertions(+), 30 deletions(-)

diff --git a/meta/recipes-gnome/gtk+/gtk+-2.22.1/doc-fixes.patch b/meta/recipes-gnome/gtk+/gtk+-2.22.1/doc-fixes.patch
index 67fd29a..c2e3ae7 100644
--- a/meta/recipes-gnome/gtk+/gtk+-2.22.1/doc-fixes.patch
+++ b/meta/recipes-gnome/gtk+/gtk+-2.22.1/doc-fixes.patch
@@ -1,33 +1,19 @@
-This fixes the following build errors with the gtk+ faq and tutorial
-documentation:
+There are issues building the gtk+ tutorial and faq documentation.
+Since they were removed in gtk+ upstream and are superfluous in
+embedded applications, just don't build them.
 
-mv: cannot stat `gtk-faq': No such file or directory
-mv: cannot stat `gtk-tut': No such file or directory
+Thanks to Joshua Lock for suggesting this approach.
 
 Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-diff -urN gtk+-2.22.1.orig//docs/faq/Makefile.am gtk+-2.22.1/docs/faq/Makefile.am
---- gtk+-2.22.1.orig//docs/faq/Makefile.am	2010-11-15 04:13:09.000000000 -0800
-+++ gtk+-2.22.1/docs/faq/Makefile.am	2011-02-17 13:16:30.603214103 -0800
-@@ -9,7 +9,8 @@
- 	  (cd $(srcdir); \
- 	   db2html gtk-faq.sgml; \
- 	   test -d html && rm -r html; \
--	   mv gtk-faq html); \
-+	   mkdir html; \
-+	   mv *.html html); \
- 	fi
+diff -urN gtk+-2.22.1.orig/docs/Makefile.am gtk+-2.22.1/docs/Makefile.am
+--- gtk+-2.22.1.orig/docs/Makefile.am	2010-11-15 04:13:09.000000000 -0800
++++ gtk+-2.22.1/docs/Makefile.am	2011-02-23 19:25:16.914815097 -0800
+@@ -1,7 +1,7 @@
+ ## Process this file with automake to produce Makefile.in
+ include $(top_srcdir)/Makefile.decl
  
- pdf:
-diff -urN gtk+-2.22.1.orig//docs/tutorial/Makefile.am gtk+-2.22.1/docs/tutorial/Makefile.am
---- gtk+-2.22.1.orig//docs/tutorial/Makefile.am	2010-11-15 04:13:09.000000000 -0800
-+++ gtk+-2.22.1/docs/tutorial/Makefile.am	2011-02-17 13:15:40.110369180 -0800
-@@ -42,7 +42,8 @@
- 	  (cd $(srcdir); \
- 	   db2html gtk-tut.sgml; \
- 	   test -d html && rm -r html; \
--	   mv gtk-tut html; \
-+	   mkdir html; \
-+	   mv *.html html; \
- 	   mkdir html/images; \
- 	   cp images/*.png html/images); \
- 	fi
+-SUBDIRS = tutorial faq reference tools
++SUBDIRS = reference tools
+ 
+ EXTRA_DIST += \
+ 	defsformat.txt			\
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.22.1.bb b/meta/recipes-gnome/gtk+/gtk+_2.22.1.bb
index 9ae762d..ce1e03e 100644
--- a/meta/recipes-gnome/gtk+/gtk+_2.22.1.bb
+++ b/meta/recipes-gnome/gtk+/gtk+_2.22.1.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
                     file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
                     file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
                     file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://download.gnome.org/sources/gtk+/2.22/gtk+-${PV}.tar.bz2 \
            file://xsettings.patch;patch=1 \
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 16/50] package.bbclass: Unbreak per file dependencies and blacklist doc packages
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (14 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 15/50] gtk+: disable build of faq and tutorial docs Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 17/50] dropbear: add SRC_URI checksums Koen Kooi
                   ` (34 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index fa1abf0..dcece40 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -642,7 +642,7 @@ python package_do_filedeps() {
 
 	# Determine dependencies
 	for pkg in packages.split():
-		if pkg.endswith('-dbg') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1  or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-') != -1:
+		if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1  or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
 			continue
 
 		# Process provides
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 17/50] dropbear: add SRC_URI checksums
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (15 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 16/50] package.bbclass: Unbreak per file dependencies and blacklist doc packages Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 18/50] package.bbclass: Use hard link for package split instead of copy Koen Kooi
                   ` (33 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/recipes-core/dropbear/dropbear_0.52.bb |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/dropbear/dropbear_0.52.bb b/meta/recipes-core/dropbear/dropbear_0.52.bb
index 51217ea..6556bb4 100644
--- a/meta/recipes-core/dropbear/dropbear_0.52.bb
+++ b/meta/recipes-core/dropbear/dropbear_0.52.bb
@@ -1,3 +1,6 @@
 require dropbear.inc
 
+SRC_URI[md5sum] = "1c69ec674481d7745452f68f2ea5597e"
+SRC_URI[sha256sum] = "e3a2ca49ed85ce562240c0ac06e2f72826d7e52a83e80d91c067c8b97bf5c108"
+
 PR="r0"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 18/50] package.bbclass: Use hard link for package split instead of copy
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (16 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 17/50] dropbear: add SRC_URI checksums Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 19/50] package.bbclass: Ensure dependency version information is preserved Koen Kooi
                   ` (32 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Dongxiao Xu <dongxiao.xu@intel.com>

When doing package split, we use hard link instead of copy, which can
save about 10% disk space when building poky-image-minimal.

If fail, it will fall back to the copyfile function.

[Updated by Richard to use os.link and avoid an exec() call per file]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
---
 meta/classes/package.bbclass |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index dcece40..2f3e9bf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -427,22 +427,13 @@ python populate_packages () {
 			fpath = os.path.join(root,file)
 			dpath = os.path.dirname(fpath)
 			bb.mkdirhier(dpath)
-
-			# Check if this is a hardlink to something... if it is
-			# attempt to preserve the link information, instead of copy.
 			if not os.path.islink(file):
-				s = os.stat(file)
-				if s.st_nlink > 1:
-					file_reference = "%d_%d" % (s.st_dev, s.st_ino)
-					if file_reference not in file_links:
-						# Save the reference for next time...
-						file_links[file_reference] = fpath
-					else:
-						os.link(file_links[file_reference], fpath)
-						continue
+				os.link(file, fpath)
+				continue
 			ret = bb.copyfile(file, fpath)
 			if ret is False or ret == 0:
 				raise bb.build.FuncFailed("File population failed")
+
 		del localdata
 	os.chdir(workdir)
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 19/50] package.bbclass: Ensure dependency version information is preserved
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (17 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 18/50] package.bbclass: Use hard link for package split instead of copy Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 20/50] linuxdoc-tools-native: new recipe v0.99.6 Koen Kooi
                   ` (31 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

[BUGID #176]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2f3e9bf..02c2dd3 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -478,7 +478,8 @@ python populate_packages () {
 					dangling_links[pkg].append(os.path.normpath(target))
 
 	for pkg in package_list:
-		rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, True) or bb.data.getVar('RDEPENDS', d, True) or "")
+		rdepends = bb.utils.explode_dep_versions(bb.data.getVar('RDEPENDS_' + pkg, d, True) or bb.data.getVar('RDEPENDS', d, True) or "")
+
 		for l in dangling_links[pkg]:
 			found = False
 			bb.debug(1, "%s contains dangling link %s" % (pkg, l))
@@ -489,12 +490,12 @@ python populate_packages () {
 						bb.debug(1, "target found in %s" % p)
 						if p == pkg:
 							break
-						if not p in rdepends:
-							rdepends.append(p)
+						if p not in rdepends:
+							rdepends[p] = ""
 						break
 			if found == False:
 				bb.note("%s contains dangling symlink to %s" % (pkg, l))
-		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
+		bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
 }
 populate_packages[dirs] = "${D}"
 
@@ -955,7 +956,8 @@ python package_do_pkgconfig () {
 python read_shlibdeps () {
 	packages = bb.data.getVar('PACKAGES', d, True).split()
 	for pkg in packages:
-		rdepends = bb.utils.explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
+		rdepends = bb.utils.explode_dep_versions(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
+
 		for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
 			depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d)
 			if os.access(depsfile, os.R_OK):
@@ -963,8 +965,8 @@ python read_shlibdeps () {
 				lines = fd.readlines()
 				fd.close()
 				for l in lines:
-					rdepends.append(l.rstrip())
-		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
+					rdepends[l.rstrip()] = ""
+		bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
 }
 
 python package_depchains() {
@@ -988,7 +990,7 @@ python package_depchains() {
 	def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
 
 		#bb.note('depends for %s is %s' % (base, depends))
-		rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "")
+		rreclist = bb.utils.explode_dep_versions(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "")
 
 		for depend in depends:
 			if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
@@ -1000,16 +1002,16 @@ python package_depchains() {
 				depend = depend.replace('-dbg', '')
 			pkgname = getname(depend, suffix)
 			#bb.note("Adding %s for %s" % (pkgname, depend))
-			if not pkgname in rreclist:
-				rreclist.append(pkgname)
+			if pkgname not in rreclist:
+				rreclist[pkgname] = ""
 
 		#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
-		bb.data.setVar('RRECOMMENDS_%s' % pkg, ' '.join(rreclist), d)
+		bb.data.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False), d)
 
 	def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
 
 		#bb.note('rdepends for %s is %s' % (base, rdepends))
-		rreclist = bb.utils.explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "")
+		rreclist = bb.utils.explode_dep_versions(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "")
 
 		for depend in rdepends:
 			if depend.find('virtual-locale-') != -1:
@@ -1021,11 +1023,11 @@ python package_depchains() {
 				depend = depend.replace('-dbg', '')
 			pkgname = getname(depend, suffix)
 			#bb.note("Adding %s for %s" % (pkgname, depend))
-			if not pkgname in rreclist:
-				rreclist.append(pkgname)
+			if pkgname not in rreclist:
+				rreclist[pkgname] = ""
 
 		#bb.note('setting: RRECOMMENDS_%s=%s' % (pkg, ' '.join(rreclist)))
-		bb.data.setVar('RRECOMMENDS_%s' % pkg, ' '.join(rreclist), d)
+		bb.data.setVar('RRECOMMENDS_%s' % pkg, bb.utils.join_deps(rreclist, commasep=False), d)
 
 	def add_dep(list, dep):
 		dep = dep.split(' (')[0].strip()
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 20/50] linuxdoc-tools-native: new recipe v0.99.6
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (18 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 19/50] package.bbclass: Ensure dependency version information is preserved Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 21/50] libuser: enable documentation Koen Kooi
                   ` (30 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

This package includes utilities such as sgml2html and sgml2txt,
which are used by other packages (e.g, libuser) for building
documentation.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 .../linuxdoc-tools-native/disable_sgml2rtf.patch   |   49 ++++++++++++++++++++
 .../linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb |   21 ++++++++
 2 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_sgml2rtf.patch
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb

diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_sgml2rtf.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_sgml2rtf.patch
new file mode 100644
index 0000000..0fcaceb
--- /dev/null
+++ b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_sgml2rtf.patch
@@ -0,0 +1,49 @@
+The build of sgml2rtf is problematic due to the way it wants to
+link to a shared library version of flex. Flex only ships with a
+static lib. Rather than diverging from upstream flex, simply skip
+building this un-needed utility.
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+diff -urN linuxdoc-tools-0.9.66.orig//Makefile.in linuxdoc-tools-0.9.66/Makefile.in
+--- linuxdoc-tools-0.9.66.orig//Makefile.in	2009-11-09 11:58:25.000000000 -0800
++++ linuxdoc-tools-0.9.66/Makefile.in	2011-02-24 15:37:46.556937051 -0800
+@@ -40,7 +40,7 @@
+ pkgdata_ddir       = $(DESTDIR)$(pkgdatadir)
+ tex_ddir           = $(DESTDIR)$(texdir)
+ 
+-progs    := sgml2html sgml2info sgml2latex sgml2lyx sgml2rtf sgml2txt sgmlcheck
++progs    := sgml2html sgml2info sgml2latex sgml2lyx sgml2txt sgmlcheck
+ 
+ OPTIMIZE  = -O
+ 
+@@ -64,9 +64,9 @@
+ 	@echo "Compiling preprocessor (in sgmlpre/)..."
+ 	( cd sgmlpre ; \
+ 	  $(MAKE) CFLAGS="$(OPTIMIZE)" LEX=flex sgmlpre || exit -1 )
+-	@echo "Compiling RTF conversion tools (in rtf-fix/)..."
+-	( cd rtf-fix ; \
+-	  $(MAKE) CFLAGS="$(OPTIMIZE)" || exit -1 )
++#	@echo "Compiling RTF conversion tools (in rtf-fix/)..."
++#	( cd rtf-fix ; \
++#	  $(MAKE) CFLAGS="$(OPTIMIZE)" || exit -1 )
+ 	@echo "making man pages in genman ..."
+ 	if [ ! -d genman ]; then mkdir genman ; fi
+ 	for ii in man/* ; do \
+@@ -109,7 +109,7 @@
+ 
+ #    -- Install auxiliary programs
+ 	mkdir -p $(auxbin_ddir)
+-	for ii in sgmlpre/sgmlpre rtf-fix/rtf2rtf; do \
++	for ii in sgmlpre/sgmlpre; do \
+ 	  bn=`basename $$ii`; \
+ 	  $(INSTALL_PROGRAM) $$ii $(auxbin_ddir)/$$bn; \
+ 	done
+@@ -198,7 +198,7 @@
+ 
+ clean::
+ 	-rm -f *~ bin/*~ bin/linuxdoc
+-	for d in $(DDIRS) $(MDIRS) rtf-fix; do $(MAKE) -C $$d clean; done
++	for d in $(DDIRS) $(MDIRS); do $(MAKE) -C $$d clean; done
+ 	(cd sgmlpre ; rm -f sgmlpre.o sgmlpre)
+ 	-rm -rf genman/
+ 
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb
new file mode 100644
index 0000000..f3cd195
--- /dev/null
+++ b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Convert LinuxDoc SGML source into other formats"
+DESCRIPTION = "Convert LinuxDoc SGML source into other formats"
+HOMEPAGE = "http://packages.debian.org/linuxdoc-tools"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5fbccc46cff2379505ca4e09c7d6ccfe"
+
+DEPENDS = "openjade-native"
+
+PR = "r0"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/l/linuxdoc-tools/linuxdoc-tools_${PV}.tar.gz \
+           file://disable_sgml2rtf.patch"
+
+SRC_URI[md5sum] = "f214e79b0dd084689cd04f18722bd563"
+SRC_URI[sha256sum] = "128cabb52ef8fb2f370ee488ea92bf4d8e49859200c7c8cae807abfe860a62ec"
+
+inherit autotools native
+
+do_configure () {
+	oe_runconf
+}
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 21/50] libuser: enable documentation
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (19 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 20/50] linuxdoc-tools-native: new recipe v0.99.6 Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 22/50] poky-qemu: handle cases where an nfs directory contains -image- Koen Kooi
                   ` (29 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

Added popt to DEPENDS. This fixes the following build error:

apps/luserdel.c:25:18: fatal error: popt.h: No such file or directory

Remove patch and configure flag which had disabled doc generation

Add docbook-utils-native and linuxdoc-tools-native to DEPENDS

This fixes [BUGID #213]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 .../libuser/libuser-0.57.1/disable-sgml-doc.patch  |   18 ------------------
 meta/recipes-extended/libuser/libuser_0.57.1.bb    |    9 ++++-----
 2 files changed, 4 insertions(+), 23 deletions(-)
 delete mode 100644 meta/recipes-extended/libuser/libuser-0.57.1/disable-sgml-doc.patch

diff --git a/meta/recipes-extended/libuser/libuser-0.57.1/disable-sgml-doc.patch b/meta/recipes-extended/libuser/libuser-0.57.1/disable-sgml-doc.patch
deleted file mode 100644
index a2017c5..0000000
--- a/meta/recipes-extended/libuser/libuser-0.57.1/disable-sgml-doc.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Disable generating docs from sgml, which requries linuxdoc-tools.
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-Index: libuser-0.56.16/docs/Makefile.am
-===================================================================
---- libuser-0.56.16.orig/docs/Makefile.am	2010-08-12 13:29:43.000000000 +0800
-+++ libuser-0.56.16/docs/Makefile.am	2010-08-12 13:29:51.000000000 +0800
-@@ -14,8 +14,8 @@
- 
- sgml/libuser.txt: $(srcdir)/sgml/libuser.sgml
- 	[ -d sgml ] || mkdir sgml
--	cd sgml; sgml2txt ../$(srcdir)/sgml/libuser.sgml
-+#	cd sgml; sgml2txt ../$(srcdir)/sgml/libuser.sgml
- 
- sgml/libuser.html: $(srcdir)/sgml/libuser.sgml
- 	[ -d sgml ] || mkdir sgml
--	cd sgml; sgml2html ../$(srcdir)/sgml/libuser.sgml
-+#	cd sgml; sgml2html ../$(srcdir)/sgml/libuser.sgml
diff --git a/meta/recipes-extended/libuser/libuser_0.57.1.bb b/meta/recipes-extended/libuser/libuser_0.57.1.bb
index d2e7c3a..2dd3f11 100644
--- a/meta/recipes-extended/libuser/libuser_0.57.1.bb
+++ b/meta/recipes-extended/libuser/libuser_0.57.1.bb
@@ -11,15 +11,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
 
 SECTION = "base"
 
-SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
-           file://disable-sgml-doc.patch;patch=1"
+SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz"
 
 SRC_URI[md5sum] = "be82c6941264d0b4bd04f95fb342ec7d"
 SRC_URI[sha256sum] = "a61289867581fa715354a3fafe09c3e481173ce0a2dcb33b04588b6ac13cead5"
-PR = "r0"
+PR = "r1"
 
-DEPENDS = "gettext libpam glib-2.0 xz-native"
+DEPENDS = "gettext popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native"
 
-EXTRA_OECONF += "--disable-gtk-doc --without-python"
+EXTRA_OECONF += "--without-python"
 
 inherit autotools
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 22/50] poky-qemu: handle cases where an nfs directory contains -image-
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (20 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 21/50] libuser: enable documentation Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 23/50] Emenlow Removal from Poky Core: meta-emenlow Koen Kooi
                   ` (28 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

Previously we mistakenly assumed that any argument which contained
*-image-* was the name of a rootfs image file. This allows nfs
directory paths to work correctly when they contain this substring.

This fixes [BUGID #743]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 scripts/poky-qemu |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index 1086c3d..c76b3ab 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -113,6 +113,12 @@ while [ $i -le $# ]; do
             if [ -z "$ROOTFS" ]; then
                 if [ -f "$arg" ]; then
                     process_filename $arg
+                elif [ -d "$arg" ]; then
+                    # Handle the case where the nfsroot dir has -image-
+                    # in the pathname
+                    echo "Assuming $arg is an nfs rootfs"
+                    FSTYPE=nfs
+                    ROOTFS=$arg
                 else
                     ROOTFS=$arg
                     LAZY_ROOTFS="true"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 23/50] Emenlow Removal from Poky Core: meta-emenlow
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (21 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 22/50] poky-qemu: handle cases where an nfs directory contains -image- Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 24/50] documentation/poky-ref-manual/poky-ref-manual.xml: updated copyright date Koen Kooi
                   ` (27 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 377449 bytes --]

From: Beth Flanagan <elizabeth.flanagan@intel.com>

Removing Emenlow from poky core as it is now in meta-intel as a BSP layer

[BUGID #769]

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta-emenlow/COPYING.MIT                           |   17 -
 meta-emenlow/README                                |   78 -
 meta-emenlow/conf/checksums.ini                    |   23 -
 meta-emenlow/conf/layer.conf                       |   10 -
 meta-emenlow/conf/machine/emenlow.conf             |   48 -
 .../formfactor/formfactor/emenlow/machconfig       |    3 -
 .../recipes-bsp/formfactor/formfactor_0.0.bbappend |    3 -
 .../libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch      |   61 -
 .../libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb         |   19 -
 .../libva-0.31.0/033_g45_add_rgba_subpic.patch     |  111 -
 .../034_g45_fix_return_for_unimpl.patch            |   83 -
 .../035_g45_add_yv12_image_format.patch            |  102 -
 .../libva-0.31.0/036_g45_add_vaGetImage.patch      |   71 -
 .../libva-0.31.0/037_g45_add_vaPutImage.patch      |  111 -
 .../038_g45_vaPutSurface_cliprects.patch           |  531 ----
 .../libva-0.31.0/102_attribute_visibility.patch    |   47 -
 .../libva/libva-0.31.0/103_fix_vainfo_deps.patch   |   24 -
 .../104_fix_libva_pkgconfig_deps.patch             |   18 -
 .../105_dont_search_LIBGL_DRIVERS_PATH.patch       |   21 -
 .../libva/libva-0.31.0/108_drivers_path.patch      |   25 -
 .../libva-0.31.0/203_fix_fglrx_detection.patch     |  542 ----
 .../libva-0.31.0/204_check_ATIFGLEXTENSION.patch   |  312 --
 .../libva/libva-0.31.0/300_sds_version.patch       |   87 -
 .../libva/libva-0.31.0/301_vdpau_mpeg4.patch       |   26 -
 .../320_move_vaPutSurface_flags_def.patch          |   60 -
 .../libva/libva-0.31.0/321_libva_glx.base.patch    |  212 --
 .../libva/libva-0.31.0/322_libva_glx.patch         | 2024 ------------
 .../libva/libva-0.31.0/390_compat.base.patch       |  135 -
 .../libva/libva-0.31.0/391_compat.patch            | 3273 --------------------
 .../libva/libva-0.31.0/392_compat.dso.patch        |  183 --
 .../libva/libva-0.31.0/libdrm-poulsbo.patch        |   26 -
 .../recipes-graphics/libva/libva_0.31.0.bb         |   40 -
 .../psb-firmware/psb-firmware_0.30.bb              |   15 -
 .../psb-kernel-source-4.42.0/build.patch           |  175 --
 .../psb-kernel-source/psb-kernel-source_4.42.0.bb  |   24 -
 .../xorg-xserver/files/crosscompile.patch          |   19 -
 .../files/fix_open_max_preprocessor_error.patch    |   13 -
 .../xorg-xserver/files/libdrm-poulsbo.patch        |   26 -
 .../xorg-xserver/files/macro_tweak.patch           |   18 -
 .../xorg-xserver/files/nodolt.patch                |   12 -
 .../xorg-xserver/xserver-psb_1.7.99.2.bb           |   21 -
 .../xserver-xf86-config/emenlow/xorg.conf          |   13 -
 .../xorg-xserver/xserver-xf86-config_0.1.bbappend  |    3 -
 .../xpsb-glx/xpsb-glx-0.18/cross-compile.patch     |   58 -
 .../xpsb-glx/xpsb-glx-0.18/libdrmname.patch        |   63 -
 .../xpsb-glx/xpsb-glx-0.18/native-matypes.patch    |   20 -
 .../recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb     |   46 -
 .../01_disable_lid_timer.patch                     |   12 -
 .../xserver-xorg-video-psb-0.32.1/dri-h.patch      |   20 -
 .../libdrm-poulsbo.patch                           |   13 -
 .../xserver-xorg-video-psb-0.32.1/psb_mixed.patch  |   35 -
 .../psb_xvtempfix.patch                            |   17 -
 .../xserver-xorg-video-psb-0.32.1/stubs.patch      |   23 -
 .../xserver-xorg-video-psb-0.32.1/visibility.patch |   12 -
 .../xorg-x11-drv-psb-0.31.0-ignoreacpi.patch       |   11 -
 .../xorg-x11-drv-psb-0.31.0-xserver17.patch        |   85 -
 .../xserver-xorg-video-psb-0.31.0-assert.patch     |   11 -
 ...rver-xorg-video-psb-0.31.0-comment_unused.patch |   75 -
 .../xserver-xorg-video-psb-0.31.0-greedy.patch     |   19 -
 .../xserver-xorg-video-psb-0.31.0-loader.patch     |   84 -
 .../xserver-xorg-video-psb_0.32.1.bb               |   34 -
 .../recipes-kernel/linux/linux-2.6.33.2/defconfig  |   68 -
 .../linux/linux-yocto-stable_git.bbappend          |    3 -
 .../recipes-kernel/linux/linux_2.6.33.2.bbappend   |    3 -
 meta/conf/bblayers.conf.sample                     |    3 +-
 meta/conf/sanity.conf                              |    2 +-
 66 files changed, 2 insertions(+), 9380 deletions(-)
 delete mode 100644 meta-emenlow/COPYING.MIT
 delete mode 100644 meta-emenlow/README
 delete mode 100644 meta-emenlow/binary/.gitignore
 delete mode 100644 meta-emenlow/conf/checksums.ini
 delete mode 100644 meta-emenlow/conf/layer.conf
 delete mode 100644 meta-emenlow/conf/machine/emenlow.conf
 delete mode 100644 meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow/machconfig
 delete mode 100644 meta-emenlow/recipes-bsp/formfactor/formfactor_0.0.bbappend
 delete mode 100644 meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/033_g45_add_rgba_subpic.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/034_g45_fix_return_for_unimpl.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/035_g45_add_yv12_image_format.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/037_g45_add_vaPutImage.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/038_g45_vaPutSurface_cliprects.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/103_fix_vainfo_deps.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/104_fix_libva_pkgconfig_deps.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/105_dont_search_LIBGL_DRIVERS_PATH.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/108_drivers_path.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/203_fix_fglrx_detection.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/204_check_ATIFGLEXTENSION.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/300_sds_version.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/301_vdpau_mpeg4.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/320_move_vaPutSurface_flags_def.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/321_libva_glx.base.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/322_libva_glx.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/390_compat.base.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/391_compat.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/392_compat.dso.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva-0.31.0/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/libva/libva_0.31.0.bb
 delete mode 100644 meta-emenlow/recipes-graphics/psb-firmware/psb-firmware_0.30.bb
 delete mode 100644 meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source-4.42.0/build.patch
 delete mode 100644 meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source_4.42.0.bb
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/crosscompile.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/fix_open_max_preprocessor_error.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/macro_tweak.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/files/nodolt.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb_1.7.99.2.bb
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow/xorg.conf
 delete mode 100644 meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/01_disable_lid_timer.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/dri-h.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/libdrm-poulsbo.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_mixed.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_xvtempfix.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/stubs.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/visibility.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-ignoreacpi.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-xserver17.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-assert.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-comment_unused.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-greedy.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-loader.patch
 delete mode 100644 meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb_0.32.1.bb
 delete mode 100644 meta-emenlow/recipes-kernel/linux/linux-2.6.33.2/defconfig
 delete mode 100644 meta-emenlow/recipes-kernel/linux/linux-yocto-stable_git.bbappend
 delete mode 100644 meta-emenlow/recipes-kernel/linux/linux_2.6.33.2.bbappend

diff --git a/meta-emenlow/COPYING.MIT b/meta-emenlow/COPYING.MIT
deleted file mode 100644
index fb950dc..0000000
--- a/meta-emenlow/COPYING.MIT
+++ /dev/null
@@ -1,17 +0,0 @@
-Permission is hereby granted, free of charge, to any person obtaining a copy 
-of this software and associated documentation files (the "Software"), to deal 
-in the Software without restriction, including without limitation the rights 
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-copies of the Software, and to permit persons to whom the Software is 
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in 
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-THE SOFTWARE.
diff --git a/meta-emenlow/README b/meta-emenlow/README
deleted file mode 100644
index 862af54..0000000
--- a/meta-emenlow/README
+++ /dev/null
@@ -1,78 +0,0 @@
-This README file contains information on building the meta-emenlow
-BSP layer using any of the supported machine configurations, and
-booting the images contained in the /binary directory.
-
-If you're only interested in booting the images in the /binary
-directory of a BSP tarball you've downloaded, there's nothing special
-to do - the appropriate images are already in the /binary directory
-depending on which BSP tarball you downloaded.
-
-Please see the corresponding sections below for details.
-
-
-Table of Contents
-=================
-
- I. Building the meta-emenlow BSP layer
-II. Booting the images in /binary
-
-
-I. Building the meta-emenlow BSP layer
-=======================================
-
-In order to build an image with BSP support for emenlow, you just need
-to check out the poky master branch.
-
-Having done that, you can build an emenlow image by adding the
-location of the meta-emenlow layer to bblayers.conf e.g.:
-
-  yocto/meta-emenlow \
-
-To enable the emenlow layer, add the emenlow MACHINE to local.conf:
-
-  MACHINE ?= "emenlow"
-
-You should then be able to build an emenlow image as such:
-
-  $ source poky-init-build-env
-  $ bitbake poky-image-sato-live
-
-At the end of a successful build, you should have a live image that
-you can boot from a USB flash drive (see instructions on how to do
-that below, in the section 'Booting the images from /binary').
-
-
-II. Booting the images in /binary
-=================================
-
-This BSP contains bootable live images, which can be used to directly
-boot Yocto off of a USB flash drive.
-
-Under Linux, insert a USB flash drive.  Assuming the USB flash drive
-takes device /dev/sdf, use dd to copy the live image to it.  For
-example:
-
-# dd if=poky-image-sato-live-emenlow-20101207053738.hddimg of=/dev/sdf
-# sync
-# eject /dev/sdf
-
-This should give you a bootable USB flash device.  Insert the device
-into a bootable USB socket on the target, and power on.  This should
-result in a system booted to the Sato graphical desktop.
-
-If you want a terminal, use the arrows at the top of the UI to move to
-different pages of available applications, one of which is named
-'Terminal'.  Clicking that should give you a root terminal.
-
-If you want to ssh into the system, you can use the root terminal to
-ifconfig the IP address and use that to ssh in.  The root password is
-empty, so to log in type 'root' for the user name and hit 'Enter' at
-the Password prompt: and you should be in.
-
-----
-
-If you find you're getting corrupt images on the USB (it doesn't show
-the syslinux boot: prompt, or the boot: prompt contains strange
-characters), try doing this first:
-
-# dd if=/dev/zero of=/dev/sdf bs=1M count=512
diff --git a/meta-emenlow/binary/.gitignore b/meta-emenlow/binary/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/meta-emenlow/conf/checksums.ini b/meta-emenlow/conf/checksums.ini
deleted file mode 100644
index e6fc77f..0000000
--- a/meta-emenlow/conf/checksums.ini
+++ /dev/null
@@ -1,23 +0,0 @@
-[https://launchpad.net/~gma500/+archive/ppa/+files/libdrm-poulsbo_2.3.0-1ubuntu0sarvatt4~1004um1ubuntu1.tar.gz]
-md5=82c00bb9f1239f1d00b18411b89c2380
-sha256=335d4ac6694687475efe07b44a2d77a9a9fadcbc16946d01ea8a02339ae7d9ec
-
-[https://launchpad.net/~gma500/+archive/ppa/+files/libva_0.31.0-1+sds9.1ubuntu1.tar.gz]
-md5=860f13e5a9d09511d7c6807b880e758b
-sha256=306468f87b9e13fdb3b6f0c6e2159b20198b33eed9eda4c31d7381a88911554f
-
-[https://launchpad.net/~gma500/+archive/ppa/+files/psb-firmware_0.30-0ubuntu1netbook1ubuntu1.tar.gz]
-md5=760005739edc64387240e56f6916e825
-sha256=714bc9162409b172caaabdaff5a942bc9d104a9b3a47a165754f7090803ba4b3
-
-[https://launchpad.net/~gma500/+archive/ppa/+files/psb-kernel-source_4.42.0-0ubuntu2~1004um2.tar.gz]
-md5=4f079e4f880bd45b281f5f3c017e8afa
-sha256=91ac0646ab02423a91b0a6027ffa1b0dbf1082588c03a3f7e4302c37c155f3fd
-
-[https://launchpad.net/~gma500/+archive/ppa/+files/xpsb-glx_0.18-0ubuntu1netbook2~1004um1ubuntu1.tar.gz]
-md5=50423a9e861ccff5814eb95a32494952
-sha256=03c958defef56ae0ec051c6f67620fa90733649925386824b7bf029f40bd7905
-
-[https://launchpad.net/~gma500/+archive/ppa/+files/xserver-xorg-video-psb_0.36.0-0ubuntu3~1004um9.tar.gz]
-md5=67bd808960db4fe9b3a7ff2582da1608
-sha256=deeaf6e4d059e709d8a4268bd013a172f7fbd70778236d7d1e2712d1951de72c
diff --git a/meta-emenlow/conf/layer.conf b/meta-emenlow/conf/layer.conf
deleted file mode 100644
index 563b9c8..0000000
--- a/meta-emenlow/conf/layer.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH := "${BBPATH}:${LAYERDIR}"
-
-# We have a packages directory, add to BBFILES
-BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \
-	${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "emenlow"
-BBFILE_PATTERN_emenlow := "^${LAYERDIR}/"
-BBFILE_PRIORITY_emenlow = "6"
diff --git a/meta-emenlow/conf/machine/emenlow.conf b/meta-emenlow/conf/machine/emenlow.conf
deleted file mode 100644
index faedfe5..0000000
--- a/meta-emenlow/conf/machine/emenlow.conf
+++ /dev/null
@@ -1,48 +0,0 @@
-#@TYPE: Machine
-#@NAME: emenlow
-
-#@DESCRIPTION: Machine configuration for eMenlow based systems, like the
-# Webs-2120 box.
-
-TARGET_ARCH = "i586"
-PACKAGE_EXTRA_ARCHS = "x86 core2"
-
-include conf/machine/include/tune-atom.inc
-
-BASE_PACKAGE_ARCH="core2"
-
-MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 x86 \
-                    acpi serial usbgadget"
-
-KERNEL_IMAGETYPE = "bzImage"
-
-PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-stable"
-#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
-PREFERRED_PROVIDER_libdrm = "libdrm-poulsbo"
-PREFERRED_PROVIDER_drm = "libdrm-poulsbo"
-PREFERRED_PROVIDER_virtual/libx11 = "libx11-trim"
-PREFERRED_PROVIDER_virtual/libgl = "xpsb-glx"
-PREFERRED_PROVIDER_virtual/xserver = "xserver-psb"
-PREFERRED_PROVIDER_virtual/xserver-xf86 = "xserver-psb"
-PREFERRED_PROVIDER_xserver-xf86-dri-lite = "xserver-psb"
-
-XSERVER ?= "xserver-psb \
-           xf86-input-mouse \
-           xf86-input-keyboard \
-           xf86-input-evdev"
-
-SERIAL_CONSOLE = "115200 ttyS0"
-
-MACHINE_EXTRA_RRECOMMENDS = "kernel-modules eee-acpi-scripts"
-
-GUI_MACHINE_CLASS = "bigscreen"
-
-IMAGE_ROOTFS_SIZE_ext3 = "2000000"
-
-IMAGE_FSTYPES ?= "ext3 cpio.gz"
-
-GLIBC_ADDONS = "nptl"
-GLIBC_EXTRA_OECONF = "--with-tls"
-
-SRCREV_machine_pn-linux-yocto-stable_emenlow ?= "aae69fdf104b0a9d7b3710f808aac6ab303490f7"
-SRCREV_meta_pn-linux-yocto-stable_emenlow ?= "50ccd2b3213b6a1bacb3f898c035119802dac420"
diff --git a/meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow/machconfig b/meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow/machconfig
deleted file mode 100644
index ffce012..0000000
--- a/meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow/machconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-# Assume a USB mouse and keyboard are connected
-HAVE_TOUCHSCREEN=0
-HAVE_KEYBOARD=1
diff --git a/meta-emenlow/recipes-bsp/formfactor/formfactor_0.0.bbappend b/meta-emenlow/recipes-bsp/formfactor/formfactor_0.0.bbappend
deleted file mode 100644
index 4a41d48..0000000
--- a/meta-emenlow/recipes-bsp/formfactor/formfactor_0.0.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS := "${THISDIR}/${PN}"
- 
-PRINC = "1"
diff --git a/meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch b/meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch
deleted file mode 100644
index 14bde68..0000000
--- a/meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo-2.3.0/libdrm-poulsbo.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-# Make this package produce libdrm-poulsbo instead of libdrm so that the 
-# emenlow libdrm can coexist with the normal libdrm.
-# jdike@linux.intel.com
-
-Index: libdrm-poulsbo-2.3.0/configure.ac
-===================================================================
---- libdrm-poulsbo-2.3.0.orig/configure.ac
-+++ libdrm-poulsbo-2.3.0/configure.ac
-@@ -19,7 +19,7 @@
- #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- 
- AC_PREREQ(2.57)
--AC_INIT([libdrm], 2.3.1, [dri-devel@lists.sourceforge.net], libdrm)
-+AC_INIT([libdrm_poulsbo], 2.3.1, [dri-devel@lists.sourceforge.net], libdrm_poulsbo)
- AC_CONFIG_SRCDIR([Makefile.am])
- AM_INIT_AUTOMAKE([dist-bzip2])
- 
-@@ -35,4 +35,4 @@ AC_SYS_LARGEFILE
- pkgconfigdir=${libdir}/pkgconfig
- AC_SUBST(pkgconfigdir)
- 
--AC_OUTPUT([Makefile libdrm/Makefile shared-core/Makefile libdrm.pc])
-+AC_OUTPUT([Makefile libdrm/Makefile shared-core/Makefile libdrm_poulsbo.pc])
-Index: libdrm-poulsbo-2.3.0/Makefile.am
-===================================================================
---- libdrm-poulsbo-2.3.0.orig/Makefile.am
-+++ libdrm-poulsbo-2.3.0/Makefile.am
-@@ -25,6 +25,6 @@ AUTOMAKE_OPTIONS = foreign
- SUBDIRS = libdrm shared-core
- 
- pkgconfigdir = @pkgconfigdir@
--pkgconfig_DATA = libdrm.pc
-+pkgconfig_DATA = libdrm_poulsbo.pc
- 
--EXTRA_DIST = libdrm.pc.in
-+EXTRA_DIST = libdrm_poulsbo.pc.in
-Index: libdrm-poulsbo-2.3.0/libdrm/Makefile.am
-===================================================================
---- libdrm-poulsbo-2.3.0.orig/libdrm/Makefile.am
-+++ libdrm-poulsbo-2.3.0/libdrm/Makefile.am
-@@ -18,14 +18,14 @@
- #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- 
--libdrm_la_LTLIBRARIES = libdrm.la
--libdrm_ladir = $(libdir)
--libdrm_la_LDFLAGS = -version-number 2:3:0 -no-undefined
-+libdrm_poulsbo_la_LTLIBRARIES = libdrm_poulsbo.la
-+libdrm_poulsbo_ladir = $(libdir)
-+libdrm_poulsbo_la_LDFLAGS = -version-number 2:3:0 -no-undefined
- 
- AM_CFLAGS = -I$(top_srcdir)/shared-core
--libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmMode.c
-+libdrm_poulsbo_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmMode.c
- 
--libdrmincludedir = ${includedir}/psb
--libdrminclude_HEADERS = xf86drm.h xf86mm.h xf86drmMode.h
-+libdrm_poulsboincludedir = ${includedir}/psb
-+libdrm_poulsboinclude_HEADERS = xf86drm.h xf86mm.h xf86drmMode.h
- 
- EXTRA_DIST = ChangeLog TODO
diff --git a/meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb b/meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb
deleted file mode 100644
index d0e14a5..0000000
--- a/meta-emenlow/recipes-graphics/libdrm-poulsbo/libdrm-poulsbo_2.3.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "Userspace interface to kernel DRM services"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://MIT_License.txt;md5=732825ecdcf420261531d935fcd914a7"
-PR = "r4"
-
-PROVIDES = "libdrm-poulsbo"
-
-inherit autotools pkgconfig
-
-SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/libdrm-poulsbo_2.3.0-1ubuntu0sarvatt4~1004um1ubuntu1.tar.gz \
-	file://libdrm-poulsbo.patch"
-
-SRC_URI[md5sum] = "82c00bb9f1239f1d00b18411b89c2380"
-SRC_URI[sha256sum] = "335d4ac6694687475efe07b44a2d77a9a9fadcbc16946d01ea8a02339ae7d9ec"
-
-do_configure_prepend() {
-	sed -e 's/-ldrm/-ldrm_poulsbo/' -e 's/libdrm/libdrm_poulsbo/' \
-	    < ${S}/libdrm.pc.in > ${S}/libdrm_poulsbo.pc.in
-}
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/033_g45_add_rgba_subpic.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/033_g45_add_rgba_subpic.patch
deleted file mode 100644
index 1b928b4..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/033_g45_add_rgba_subpic.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 6622e8eba85cea476f8ef5b8c3620c4a0f024dcd Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 4 Nov 2009 10:56:54 +0000
-Subject: [PATCH] [G45] Add RGBA subpictures.
-
----
- i965_drv_video/i965_drv_video.c |   18 ++++++++++++++++++
- i965_drv_video/i965_drv_video.h |    3 ++-
- i965_drv_video/i965_render.c    |    8 ++++----
- 3 files changed, 24 insertions(+), 5 deletions(-)
-
-diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
-index 8f4bfc1..92c4785 100644
---- a/i965_drv_video/i965_drv_video.c
-+++ b/i965_drv_video/i965_drv_video.c
-@@ -70,6 +70,14 @@ i965_subpic_formats_map[I965_MAX_SUBPIC_FORMATS + 1] = {
-     { I965_SURFACETYPE_INDEXED, I965_SURFACEFORMAT_A4P4_UNORM,
-       { VA_FOURCC('A','I','4','4'), VA_MSB_FIRST, 8, },
-       0 },
-+    { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_B8G8R8A8_UNORM,
-+      { VA_FOURCC('B','G','R','A'), VA_LSB_FIRST, 32,
-+        32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000 },
-+      0 },
-+    { I965_SURFACETYPE_RGBA, I965_SURFACEFORMAT_R8G8B8A8_UNORM,
-+      { VA_FOURCC('R','G','B','A'), VA_LSB_FIRST, 32,
-+        32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 },
-+      0 },
- };
- 
- static const i965_subpic_format_map_t *
-@@ -467,6 +475,7 @@ i965_CreateSubpicture(VADriverContextP ctx,
-     obj_subpic->format = m->format;
-     obj_subpic->width  = obj_image->image.width;
-     obj_subpic->height = obj_image->image.height;
-+    obj_subpic->pitch  = obj_image->image.pitches[0];
-     obj_subpic->bo     = obj_image->bo;
-     return VA_STATUS_SUCCESS;
- }
-@@ -1218,6 +1227,15 @@ i965_CreateImage(VADriverContextP ctx,
-         image->component_order[1]  = 'G';
-         image->component_order[2]  = 'B';
-         break;
-+    case VA_FOURCC('A','R','G','B'):
-+    case VA_FOURCC('A','B','G','R'):
-+    case VA_FOURCC('B','G','R','A'):
-+    case VA_FOURCC('R','G','B','A'):
-+        image->num_planes = 1;
-+        image->pitches[0] = width * 4;
-+        image->offsets[0] = 0;
-+        image->data_size  = image->offsets[0] + image->pitches[0] * height;
-+        break;
-     default:
-         goto error;
-     }
-diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
-index c95c799..4d775da 100644
---- a/i965_drv_video/i965_drv_video.h
-+++ b/i965_drv_video/i965_drv_video.h
-@@ -42,7 +42,7 @@
- #define I965_MAX_ENTRYPOINTS                    5
- #define I965_MAX_CONFIG_ATTRIBUTES              10
- #define I965_MAX_IMAGE_FORMATS                  10
--#define I965_MAX_SUBPIC_FORMATS                 2
-+#define I965_MAX_SUBPIC_FORMATS                 4
- #define I965_MAX_DISPLAY_ATTRIBUTES             4
- #define I965_STR_VENDOR                         "i965 Driver 0.1"
- 
-@@ -124,6 +124,7 @@ struct object_subpic
-     unsigned int format;
-     int width;
-     int height;
-+    int pitch;
-     dri_bo *bo;
- };
- 
-diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
-index f105e90..0476087 100644
---- a/i965_drv_video/i965_render.c
-+++ b/i965_drv_video/i965_render.c
-@@ -586,7 +586,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
-                               int index,
-                               dri_bo *region,
-                               unsigned long offset,
--                              int w, int h, int format)
-+                              int w, int h, int p, int format)
- {
-     struct i965_driver_data *i965 = i965_driver_data(ctx);  
-     struct i965_render_state *render_state = &i965->render_state;
-@@ -620,7 +620,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
-     ss->ss2.mip_count = 0;
-     ss->ss2.render_target_rotation = 0;
- 
--    ss->ss3.pitch = w - 1;
-+    ss->ss3.pitch = p - 1;
- 
-     dri_bo_emit_reloc(ss_bo,
-                       I915_GEM_DOMAIN_SAMPLER, 0,
-@@ -678,8 +678,8 @@ i965_subpic_render_src_surfaces_state(VADriverContextP ctx,
-     region = obj_surface->bo;
-     subpic_region = obj_image->bo;
-     /*subpicture surface*/
--    i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format);     
--    i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->format);     
-+    i965_subpic_render_src_surface_state(ctx, 1, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format);     
-+    i965_subpic_render_src_surface_state(ctx, 2, subpic_region, 0, obj_subpic->width, obj_subpic->height, obj_subpic->pitch, obj_subpic->format);     
- }
- 
- static void
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/034_g45_fix_return_for_unimpl.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/034_g45_fix_return_for_unimpl.patch
deleted file mode 100644
index a461213..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/034_g45_fix_return_for_unimpl.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 3935c6a836b8f90947f0af658a76b97a08a03c67 Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 4 Nov 2009 13:23:40 +0000
-Subject: [PATCH] [G45] Don't return VA_STATUS_SUCCESS for unimplemented functions.
-
----
- i965_drv_video/i965_drv_video.c |   18 +++++++++++-------
- 1 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
-index 10baffb..d8a7bd1 100644
---- a/i965_drv_video/i965_drv_video.c
-+++ b/i965_drv_video/i965_drv_video.c
-@@ -534,7 +534,8 @@ i965_SetSubpictureImage(VADriverContextP ctx,
-                         VASubpictureID subpicture,
-                         VAImageID image)
- {
--    return VA_STATUS_SUCCESS;
-+    /* TODO */
-+    return VA_STATUS_ERROR_UNIMPLEMENTED;
- }
- 
- VAStatus 
-@@ -544,7 +545,8 @@ i965_SetSubpictureChromakey(VADriverContextP ctx,
-                             unsigned int chromakey_max,
-                             unsigned int chromakey_mask)
- {
--    return VA_STATUS_SUCCESS;
-+    /* TODO */
-+    return VA_STATUS_ERROR_UNIMPLEMENTED;
- }
- 
- VAStatus 
-@@ -552,7 +554,8 @@ i965_SetSubpictureGlobalAlpha(VADriverContextP ctx,
-                               VASubpictureID subpicture,
-                               float global_alpha)
- {
--    return VA_STATUS_SUCCESS;
-+    /* TODO */
-+    return VA_STATUS_ERROR_UNIMPLEMENTED;
- }
- 
- VAStatus 
-@@ -1141,7 +1144,7 @@ i965_GetDisplayAttributes(VADriverContextP ctx,
-                           int num_attributes)
- {
-     /* TODO */
--    return VA_STATUS_ERROR_UNKNOWN;
-+    return VA_STATUS_ERROR_UNIMPLEMENTED;
- }
- 
- /* 
-@@ -1156,7 +1159,7 @@ i965_SetDisplayAttributes(VADriverContextP ctx,
-                           int num_attributes)
- {
-     /* TODO */
--    return VA_STATUS_ERROR_UNKNOWN;
-+    return VA_STATUS_ERROR_UNIMPLEMENTED;
- }
- 
- VAStatus 
-@@ -1166,7 +1169,7 @@ i965_DbgCopySurfaceToBuffer(VADriverContextP ctx,
-                             unsigned int *stride)       /* out */
- {
-     /* TODO */
--    return VA_STATUS_ERROR_UNKNOWN;
-+    return VA_STATUS_ERROR_UNIMPLEMENTED;
- }
- 
- static VAStatus 
-@@ -1318,7 +1321,8 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
-                           VASurfaceID surface,
-                           VAImage *image)        /* out */
- {
--    return VA_STATUS_SUCCESS;
-+    /* TODO */
-+    return VA_STATUS_ERROR_OPERATION_FAILED;
- }
- 
- static void 
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/035_g45_add_yv12_image_format.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/035_g45_add_yv12_image_format.patch
deleted file mode 100644
index 92d814c..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/035_g45_add_yv12_image_format.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 23b23e8d65551779f10aedddee7882c2e71ac162 Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 4 Nov 2009 13:01:44 +0000
-Subject: [PATCH] [G45] Add YV12 image format.
-
----
- i965_drv_video/i965_drv_video.c |   50 ++++++++++++++++++++++++++++++++++++++-
- i965_drv_video/i965_drv_video.h |    2 +-
- 2 files changed, 50 insertions(+), 2 deletions(-)
-
-diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
-index 1f026bc..8558d0e 100644
---- a/i965_drv_video/i965_drv_video.c
-+++ b/i965_drv_video/i965_drv_video.c
-@@ -54,6 +54,36 @@ enum {
-     I965_SURFACETYPE_INDEXED
- };
- 
-+/* List of supported image formats */
-+typedef struct {
-+    unsigned int        type;
-+    VAImageFormat       va_format;
-+} i965_image_format_map_t;
-+
-+static const i965_image_format_map_t
-+i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
-+    { I965_SURFACETYPE_YUV,
-+      { VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
-+};
-+
-+static const i965_image_format_map_t *
-+get_image_format(const VAImageFormat *va_format)
-+{
-+    unsigned int i;
-+    for (i = 0; i965_image_formats_map[i].type != 0; i++) {
-+        const i965_image_format_map_t * const m = &i965_image_formats_map[i];
-+        if (m->va_format.fourcc == va_format->fourcc &&
-+            (m->type == I965_SURFACETYPE_RGBA ?
-+             (m->va_format.byte_order == va_format->byte_order &&
-+              m->va_format.red_mask   == va_format->red_mask   &&
-+              m->va_format.green_mask == va_format->green_mask &&
-+              m->va_format.blue_mask  == va_format->blue_mask  &&
-+              m->va_format.alpha_mask == va_format->alpha_mask) : 1))
-+            return m;
-+    }
-+    return NULL;
-+}
-+
- /* List of supported subpicture formats */
- typedef struct {
-     unsigned int        type;
-@@ -398,8 +428,16 @@ i965_QueryImageFormats(VADriverContextP ctx,
-                        VAImageFormat *format_list,      /* out */
-                        int *num_formats)                /* out */
- {
-+    int n;
-+
-+    for (n = 0; i965_image_formats_map[n].va_format.fourcc != 0; n++) {
-+        const i965_image_format_map_t * const m = &i965_image_formats_map[n];
-+        if (format_list)
-+            format_list[n] = m->va_format;
-+    }
-+
-     if (num_formats)
--        *num_formats = 0;
-+        *num_formats = n;
- 
-     return VA_STATUS_SUCCESS;
- }
-@@ -1236,6 +1274,16 @@ i965_CreateImage(VADriverContextP ctx,
-         image->offsets[0] = 0;
-         image->data_size  = image->offsets[0] + image->pitches[0] * height;
-         break;
-+    case VA_FOURCC('Y','V','1','2'):
-+        image->num_planes = 3;
-+        image->pitches[0] = width;
-+        image->offsets[0] = 0;
-+        image->pitches[1] = width2;
-+        image->offsets[1] = size;
-+        image->pitches[2] = width2;
-+        image->offsets[2] = size + size2;
-+        image->data_size  = size + 2 * size2;
-+        break;
-     default:
-         goto error;
-     }
-diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
-index 4d775da..f512793 100644
---- a/i965_drv_video/i965_drv_video.h
-+++ b/i965_drv_video/i965_drv_video.h
-@@ -41,7 +41,7 @@
- #define I965_MAX_PROFILES                       11
- #define I965_MAX_ENTRYPOINTS                    5
- #define I965_MAX_CONFIG_ATTRIBUTES              10
--#define I965_MAX_IMAGE_FORMATS                  10
-+#define I965_MAX_IMAGE_FORMATS                  1
- #define I965_MAX_SUBPIC_FORMATS                 4
- #define I965_MAX_DISPLAY_ATTRIBUTES             4
- #define I965_STR_VENDOR                         "i965 Driver 0.1"
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch
deleted file mode 100644
index dc25d9f..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/036_g45_add_vaGetImage.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 37f40c0cdc9667907dfb784874b42fb16c2c9bde Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 4 Nov 2009 13:16:34 +0000
-Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaGetImage()=20for=20full-sized=20surface=20readback.?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf-8
-Content-Transfer-Encoding: 8bit
-
----
- i965_drv_video/i965_drv_video.c |   45 ++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 44 insertions(+), 1 deletions(-)
-
-diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
-index 8558d0e..10baffb 100644
---- a/i965_drv_video/i965_drv_video.c
-+++ b/i965_drv_video/i965_drv_video.c
-@@ -1388,7 +1388,50 @@ i965_GetImage(VADriverContextP ctx,
-               unsigned int height,
-               VAImageID image)
- {
--    return VA_STATUS_SUCCESS;
-+    struct i965_driver_data *i965 = i965_driver_data(ctx);
-+
-+    struct object_surface *obj_surface = SURFACE(surface);
-+    if (!obj_surface)
-+        return VA_STATUS_ERROR_INVALID_SURFACE;
-+
-+    struct object_image *obj_image = IMAGE(image);
-+    if (!obj_image)
-+        return VA_STATUS_ERROR_INVALID_IMAGE;
-+
-+    /* XXX: we only support full-size surface readback */
-+    if (x != 0 ||
-+        y != 0 ||
-+        width != obj_surface->width ||
-+        height != obj_surface->height)
-+        return VA_STATUS_ERROR_INVALID_PARAMETER;
-+
-+    /* XXX: we only support 1:1 image copies */
-+    if (width != obj_image->image.width ||
-+        height != obj_image->image.height)
-+        return VA_STATUS_ERROR_INVALID_PARAMETER;
-+
-+    VAStatus va_status;
-+    void *image_data = NULL;
-+
-+    va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data);
-+    if (va_status != VA_STATUS_SUCCESS)
-+        return va_status;
-+
-+    dri_bo_map(obj_surface->bo, 0);
-+
-+    switch (obj_image->image.format.fourcc) {
-+    case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
-+        memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
-+        break;
-+    default:
-+        va_status = VA_STATUS_ERROR_OPERATION_FAILED;
-+        break;
-+    }
-+
-+    dri_bo_unmap(obj_surface->bo);
-+
-+    i965_UnmapBuffer(ctx, obj_image->image.buf);
-+    return va_status;
- }
- 
- VAStatus 
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/037_g45_add_vaPutImage.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/037_g45_add_vaPutImage.patch
deleted file mode 100644
index ce638cc..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/037_g45_add_vaPutImage.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 000807cfbd8bcbc9cd4bf28a066087fee43396b4 Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 4 Nov 2009 13:36:39 +0000
-Subject: [PATCH] =?utf-8?q?[G45]=C2=A0Implement=20vaPutImage()=20for=20full-sized=20surface=20uploads.?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=utf-8
-Content-Transfer-Encoding: 8bit
-
----
- i965_drv_video/i965_drv_video.c |   78 +++++++++++++++++++++++++++++++--------
- 1 files changed, 62 insertions(+), 16 deletions(-)
-
-diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
-index d8a7bd1..e8f638c 100644
---- a/i965_drv_video/i965_drv_video.c
-+++ b/i965_drv_video/i965_drv_video.c
-@@ -443,22 +443,6 @@ i965_QueryImageFormats(VADriverContextP ctx,
- }
- 
- VAStatus 
--i965_PutImage(VADriverContextP ctx,
--               VASurfaceID surface,
--               VAImageID image,
--               int src_x,
--               int src_y,
--               unsigned int src_width,
--               unsigned int src_height,
--               int dest_x,
--               int dest_y,
--               unsigned int dest_width,
--               unsigned int dest_height)
--{
--    return VA_STATUS_SUCCESS;
--}
--
--VAStatus 
- i965_QuerySubpictureFormats(VADriverContextP ctx,
-                             VAImageFormat *format_list,         /* out */
-                             unsigned int *flags,                /* out */
-@@ -1439,6 +1423,68 @@ i965_GetImage(VADriverContextP ctx,
- }
- 
- VAStatus 
-+i965_PutImage(VADriverContextP ctx,
-+               VASurfaceID surface,
-+               VAImageID image,
-+               int src_x,
-+               int src_y,
-+               unsigned int src_width,
-+               unsigned int src_height,
-+               int dest_x,
-+               int dest_y,
-+               unsigned int dest_width,
-+               unsigned int dest_height)
-+{
-+    struct i965_driver_data *i965 = i965_driver_data(ctx);
-+
-+    struct object_surface *obj_surface = SURFACE(surface);
-+    if (!obj_surface)
-+        return VA_STATUS_ERROR_INVALID_SURFACE;
-+
-+    struct object_image *obj_image = IMAGE(image);
-+    if (!obj_image)
-+        return VA_STATUS_ERROR_INVALID_IMAGE;
-+
-+    /* XXX: we don't support partial video surface updates */
-+    if (src_x != 0 ||
-+        src_y != 0 ||
-+        src_width != obj_image->image.width ||
-+        src_height != obj_image->image.height)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+    if (dest_x != 0 ||
-+        dest_y != 0 ||
-+        dest_width != obj_surface->width ||
-+        dest_height != obj_surface->height)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+    if (src_width != dest_width ||
-+        src_height != dest_height)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+
-+    VAStatus va_status;
-+    void *image_data = NULL;
-+
-+    va_status = i965_MapBuffer(ctx, obj_image->image.buf, &image_data);
-+    if (va_status != VA_STATUS_SUCCESS)
-+        return va_status;
-+
-+    dri_bo_map(obj_surface->bo, 1);
-+
-+    switch (obj_image->image.format.fourcc) {
-+    case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
-+        memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
-+        break;
-+    default:
-+        va_status = VA_STATUS_ERROR_OPERATION_FAILED;
-+        break;
-+    }
-+
-+    dri_bo_unmap(obj_surface->bo);
-+
-+    i965_UnmapBuffer(ctx, obj_image->image.buf);
-+    return va_status;
-+}
-+
-+VAStatus 
- i965_PutSurface(VADriverContextP ctx,
-                 VASurfaceID surface,
-                 Drawable draw, /* X Drawable */
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/038_g45_vaPutSurface_cliprects.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/038_g45_vaPutSurface_cliprects.patch
deleted file mode 100644
index ca2e1bd..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/038_g45_vaPutSurface_cliprects.patch
+++ /dev/null
@@ -1,531 +0,0 @@
-From 90de12a47e26ccc0b4cc8189c76991609481870d Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 4 Nov 2009 17:34:53 +0000
-Subject: [PATCH] [G45] Handle cliprects in vaPutSurface().
-
----
- i965_drv_video/i965_drv_video.c |   39 ++++--
- i965_drv_video/i965_render.c    |  284 +++++++++++++++++++--------------------
- i965_drv_video/i965_render.h    |   30 ++---
- 3 files changed, 176 insertions(+), 177 deletions(-)
-
-diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
-index e8f638c..20d6bab 100644
---- a/i965_drv_video/i965_drv_video.c
-+++ b/i965_drv_video/i965_drv_video.c
-@@ -1507,13 +1507,23 @@ i965_PutSurface(VADriverContextP ctx,
-     union dri_buffer *buffer;
-     struct intel_region *dest_region;
-     struct object_surface *obj_surface; 
--	int ret;
-+    int ret;
-     uint32_t name;
-+    VARectangle src_rect, dst_rect;
-     Bool new_region = False;
-+
-     /* Currently don't support DRI1 */
-     if (dri_state->driConnectedFlag != VA_DRI2)
-         return VA_STATUS_ERROR_UNKNOWN;
- 
-+    /* XXX: we currently only support up to 64 cliprects */
-+    if (number_cliprects > MAX_CLIP_RECTS)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+
-+    obj_surface = SURFACE(surface);
-+    if (!obj_surface)
-+        return VA_STATUS_ERROR_INVALID_SURFACE;
-+
-     dri_drawable = dri_get_drawable(ctx, draw);
-     assert(dri_drawable);
- 
-@@ -1552,17 +1562,24 @@ i965_PutSurface(VADriverContextP ctx,
-         assert(ret == 0);
-     }
- 
--    i965_render_put_surface(ctx, surface,
--                            srcx, srcy, srcw, srch,
--                            destx, desty, destw, desth);
--    obj_surface = SURFACE(surface);
--    if(obj_surface->subpic != VA_INVALID_ID) {	
--	i965_render_put_subpic(ctx, surface,
--                           srcx, srcy, srcw, srch,
--                           destx, desty, destw, desth);
--    } 
--    dri_swap_buffer(ctx, dri_drawable);
-+    src_rect.x      = srcx;
-+    src_rect.y      = srcy;
-+    src_rect.width  = srcw;
-+    src_rect.height = srch;
-+
-+    dst_rect.x      = destx;
-+    dst_rect.y      = desty;
-+    dst_rect.width  = destw;
-+    dst_rect.height = desth;
- 
-+    i965_render_put_surface(ctx, surface, &src_rect, &dst_rect,
-+                            cliprects, number_cliprects);
-+
-+    if (obj_surface->subpic != VA_INVALID_ID)
-+	i965_render_put_subpic(ctx, surface, &src_rect, &dst_rect,
-+                               cliprects, number_cliprects);
-+
-+    dri_swap_buffer(ctx, dri_drawable);
-     return VA_STATUS_SUCCESS;
- }
- 
-diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
-index 0476087..d7cd8fe 100644
---- a/i965_drv_video/i965_render.c
-+++ b/i965_drv_video/i965_render.c
-@@ -787,13 +787,81 @@ i965_render_binding_table(VADriverContextP ctx)
-     dri_bo_unmap(render_state->wm.binding_table);
- }
- 
--static void 
-+static unsigned int
-+i965_render_do_upload_vertex(VADriverContextP   ctx,
-+                             unsigned int       width,
-+                             unsigned int       height,
-+                             const VARectangle *src_rect,
-+                             const VARectangle *dst_rect,
-+                             const VARectangle *cliprects,
-+                             unsigned int       num_cliprects)
-+{
-+    struct i965_driver_data *i965 = i965_driver_data(ctx);
-+    struct i965_render_state *render_state = &i965->render_state;
-+    struct intel_region *dest_region = render_state->draw_region;
-+    float *vb, tx1, tx2, ty1, ty2;
-+    int x1, x2, y1, y2;
-+    unsigned int i, n;
-+
-+    if (!cliprects || num_cliprects == 0) {
-+        cliprects = dst_rect;
-+        num_cliprects = 1;
-+    }
-+
-+    dri_bo_map(render_state->vb.vertex_buffer, 1);
-+    assert(render_state->vb.vertex_buffer->virtual);
-+    vb = render_state->vb.vertex_buffer->virtual;
-+
-+    for (n = 0, i = 0; i < num_cliprects; i++) {
-+        x1 = dest_region->x + cliprects[i].x;
-+        y1 = dest_region->y + cliprects[i].y;
-+        x2 = x1 + cliprects[i].width;
-+        y2 = y1 + cliprects[i].height;
-+        x1 = MAX(x1, dst_rect->x);
-+        y1 = MAX(y1, dst_rect->y);
-+        x2 = MIN(x2, dst_rect->x + dst_rect->width);
-+        y2 = MIN(y2, dst_rect->y + dst_rect->height);
-+
-+        if (x2 <= x1 || y2 <= y1)
-+            continue;
-+
-+        const float sx1 = (float)(x1 - dst_rect->x) / (float)dst_rect->width;
-+        const float sy1 = (float)(y1 - dst_rect->y) / (float)dst_rect->height;
-+        const float sx2 = (float)(x2 - dst_rect->x) / (float)dst_rect->width;
-+        const float sy2 = (float)(y2 - dst_rect->y) / (float)dst_rect->height;
-+        tx1 = ((float)src_rect->x + sx1 * (float)src_rect->width) / width;
-+        ty1 = ((float)src_rect->y + sy1 * (float)src_rect->height) / height;
-+        tx2 = ((float)src_rect->x + sx2 * (float)src_rect->width) / width;
-+        ty2 = ((float)src_rect->y + sy2 * (float)src_rect->height) / height;
-+
-+        vb[n++] = tx2;
-+        vb[n++] = ty2;
-+        vb[n++] = x2;
-+        vb[n++] = y2;
-+
-+        vb[n++] = tx1;
-+        vb[n++] = ty2;
-+        vb[n++] = x1;
-+        vb[n++] = y2;
-+
-+        vb[n++] = tx1;
-+        vb[n++] = ty1;
-+        vb[n++] = x1;
-+        vb[n++] = y1;
-+    }
-+
-+    dri_bo_unmap(render_state->vb.vertex_buffer);
-+    return n / 12;
-+}
-+
-+static unsigned int
- i965_subpic_render_upload_vertex(VADriverContextP ctx,
-                                  VASurfaceID surface,
--                                 const VARectangle *output_rect)
--{    
-+                                 const VARectangle *output_rect,
-+                                 const VARectangle *cliprects,
-+                                 unsigned int num_cliprects)
-+{
-     struct i965_driver_data  *i965         = i965_driver_data(ctx);
--    struct i965_render_state *render_state = &i965->render_state;
-     struct object_surface    *obj_surface  = SURFACE(surface);
-     struct object_subpic     *obj_subpic   = SUBPIC(obj_surface->subpic);
- 
-@@ -803,8 +871,6 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
-     const float ssy = (float)output_rect->height / (float)obj_surface->height;
-     const float sx  = psx * ssx;
-     const float sy  = psy * ssy;
--    float *vb, tx1, tx2, ty1, ty2, x1, x2, y1, y2;
--    int i = 0;
- 
-     VARectangle dst_rect;
-     dst_rect.x      = output_rect->x + sx * (float)obj_subpic->dst_rect.x;
-@@ -812,106 +878,38 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
-     dst_rect.width  = sx * (float)obj_subpic->dst_rect.width;
-     dst_rect.height = sy * (float)obj_subpic->dst_rect.height;
- 
--    dri_bo_map(render_state->vb.vertex_buffer, 1);
--    assert(render_state->vb.vertex_buffer->virtual);
--    vb = render_state->vb.vertex_buffer->virtual;
--
--    tx1 = (float)obj_subpic->src_rect.x / (float)obj_subpic->width;
--    ty1 = (float)obj_subpic->src_rect.y / (float)obj_subpic->height;
--    tx2 = (float)(obj_subpic->src_rect.x + obj_subpic->src_rect.width) / (float)obj_subpic->width;
--    ty2 = (float)(obj_subpic->src_rect.y + obj_subpic->src_rect.height) / (float)obj_subpic->height;
--
--    x1 = (float)dst_rect.x;
--    y1 = (float)dst_rect.y;
--    x2 = (float)(dst_rect.x + dst_rect.width);
--    y2 = (float)(dst_rect.y + dst_rect.height);
--
--    vb[i++] = tx2;
--    vb[i++] = ty2;
--    vb[i++] = x2;
--    vb[i++] = y2;
--
--    vb[i++] = tx1;
--    vb[i++] = ty2;
--    vb[i++] = x1;
--    vb[i++] = y2;
--
--    vb[i++] = tx1;
--    vb[i++] = ty1;
--    vb[i++] = x1;
--    vb[i++] = y1;
--    dri_bo_unmap(render_state->vb.vertex_buffer);
-+    return i965_render_do_upload_vertex(ctx,
-+                                        obj_subpic->width, obj_subpic->height,
-+                                        &obj_subpic->src_rect, &dst_rect,
-+                                        cliprects, num_cliprects);
- }
- 
--static void 
-+static unsigned int 
- i965_render_upload_vertex(VADriverContextP ctx,
-                           VASurfaceID surface,
--                          short srcx,
--                          short srcy,
--                          unsigned short srcw,
--                          unsigned short srch,
--                          short destx,
--                          short desty,
--                          unsigned short destw,
--                          unsigned short desth)
-+                          const VARectangle *src_rect,
-+                          const VARectangle *dst_rect,
-+                          const VARectangle *cliprects,
-+                          unsigned int num_cliprects)
- {
-     struct i965_driver_data *i965 = i965_driver_data(ctx);
--    struct i965_render_state *render_state = &i965->render_state;
--    struct intel_region *dest_region = render_state->draw_region;
--    struct object_surface *obj_surface;
--    float *vb;
--
--    float u1, v1, u2, v2;
--    int i, width, height;
--    int box_x1 = dest_region->x + destx;
--    int box_y1 = dest_region->y + desty;
--    int box_x2 = box_x1 + destw;
--    int box_y2 = box_y1 + desth;
--
--    obj_surface = SURFACE(surface);
--    assert(surface);
--    width = obj_surface->width;
--    height = obj_surface->height;
--
--    u1 = (float)srcx / width;
--    v1 = (float)srcy / height;
--    u2 = (float)(srcx + srcw) / width;
--    v2 = (float)(srcy + srch) / height;
--
--    dri_bo_map(render_state->vb.vertex_buffer, 1);
--    assert(render_state->vb.vertex_buffer->virtual);
--    vb = render_state->vb.vertex_buffer->virtual;
--
--    i = 0;
--    vb[i++] = u2;
--    vb[i++] = v2;
--    vb[i++] = (float)box_x2;
--    vb[i++] = (float)box_y2;
--    
--    vb[i++] = u1;
--    vb[i++] = v2;
--    vb[i++] = (float)box_x1;
--    vb[i++] = (float)box_y2;
--
--    vb[i++] = u1;
--    vb[i++] = v1;
--    vb[i++] = (float)box_x1;
--    vb[i++] = (float)box_y1;
-+    struct object_surface *obj_surface = SURFACE(surface);
-+    assert(obj_surface);
- 
--    dri_bo_unmap(render_state->vb.vertex_buffer);
-+    return i965_render_do_upload_vertex(ctx,
-+                                        obj_surface->width, obj_surface->height,
-+                                        src_rect,
-+                                        dst_rect,
-+                                        cliprects, num_cliprects);
- }
- 
--static void
-+static unsigned int
- i965_surface_render_state_setup(VADriverContextP ctx,
--                        VASurfaceID surface,
--                        short srcx,
--                        short srcy,
--                        unsigned short srcw,
--                        unsigned short srch,
--                        short destx,
--                        short desty,
--                        unsigned short destw,
--                        unsigned short desth)
-+                                VASurfaceID surface,
-+                                const VARectangle *src_rect,
-+                                const VARectangle *dst_rect,
-+                                const VARectangle *cliprects,
-+                                unsigned int num_cliprects)
- {
-     i965_render_vs_unit(ctx);
-     i965_render_sf_unit(ctx);
-@@ -922,21 +920,17 @@ i965_surface_render_state_setup(VADriverContextP ctx,
-     i965_render_cc_viewport(ctx);
-     i965_render_cc_unit(ctx);
-     i965_render_binding_table(ctx);
--    i965_render_upload_vertex(ctx, surface,
--                              srcx, srcy, srcw, srch,
--                              destx, desty, destw, desth);
-+    return i965_render_upload_vertex(ctx, surface, src_rect, dst_rect,
-+                                     cliprects, num_cliprects);
- }
--static void
-+
-+static unsigned int
- i965_subpic_render_state_setup(VADriverContextP ctx,
--                        VASurfaceID surface,
--                        short srcx,
--                        short srcy,
--                        unsigned short srcw,
--                        unsigned short srch,
--                        short destx,
--                        short desty,
--                        unsigned short destw,
--                        unsigned short desth)
-+                               VASurfaceID surface,
-+                               const VARectangle *src_rect,
-+                               const VARectangle *dst_rect,
-+                               const VARectangle *cliprects,
-+                               unsigned int num_cliprects)
- {
-     i965_render_vs_unit(ctx);
-     i965_render_sf_unit(ctx);
-@@ -947,16 +941,10 @@ i965_subpic_render_state_setup(VADriverContextP ctx,
-     i965_render_cc_viewport(ctx);
-     i965_subpic_render_cc_unit(ctx);
-     i965_render_binding_table(ctx);
--
--    VARectangle output_rect;
--    output_rect.x      = destx;
--    output_rect.y      = desty;
--    output_rect.width  = destw;
--    output_rect.height = desth;
--    i965_subpic_render_upload_vertex(ctx, surface, &output_rect);
-+    return i965_subpic_render_upload_vertex(ctx, surface, dst_rect,
-+                                            cliprects, num_cliprects);
- }
- 
--
- static void
- i965_render_pipeline_select(VADriverContextP ctx)
- {
-@@ -1192,7 +1180,7 @@ i965_render_upload_image_palette(
- }
- 
- static void
--i965_render_startup(VADriverContextP ctx)
-+i965_render_startup(VADriverContextP ctx, unsigned int vb_offset)
- {
-     struct i965_driver_data *i965 = i965_driver_data(ctx);
-     struct i965_render_state *render_state = &i965->render_state;
-@@ -1203,7 +1191,7 @@ i965_render_startup(VADriverContextP ctx)
-               (0 << VB0_BUFFER_INDEX_SHIFT) |
-               VB0_VERTEXDATA |
-               ((4 * 4) << VB0_BUFFER_PITCH_SHIFT));
--    OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0);
-+    OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, vb_offset);
- 
-     if (IS_IGDNG(i965->intel.device_id))
-         OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 12 * 4);
-@@ -1268,8 +1256,10 @@ i965_clear_dest_region(VADriverContextP ctx)
- }
- 
- static void
--i965_surface_render_pipeline_setup(VADriverContextP ctx)
-+i965_surface_render_pipeline_setup(VADriverContextP ctx, unsigned int n_rects)
- {
-+    unsigned int i;
-+
-     intel_batchbuffer_start_atomic(ctx, 0x1000);
-     intel_batchbuffer_emit_mi_flush(ctx);
-     i965_clear_dest_region(ctx);
-@@ -1283,13 +1273,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx)
-     i965_render_cs_urb_layout(ctx);
-     i965_render_drawing_rectangle(ctx);
-     i965_render_vertex_elements(ctx);
--    i965_render_startup(ctx);
-+    for (i = 0; i < n_rects; i++)
-+        i965_render_startup(ctx, 48 * i);
-     intel_batchbuffer_end_atomic(ctx);
- }
- 
- static void
--i965_subpic_render_pipeline_setup(VADriverContextP ctx)
-+i965_subpic_render_pipeline_setup(VADriverContextP ctx, unsigned int n_rects)
- {
-+    unsigned int i;
-+
-     intel_batchbuffer_start_atomic(ctx, 0x1000);
-     intel_batchbuffer_emit_mi_flush(ctx);
-     i965_render_pipeline_select(ctx);
-@@ -1302,7 +1295,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx)
-     i965_render_cs_urb_layout(ctx);
-     i965_render_drawing_rectangle(ctx);
-     i965_render_vertex_elements(ctx);
--    i965_render_startup(ctx);
-+    for (i = 0; i < n_rects; i++)
-+        i965_render_startup(ctx, 48 * i);
-     intel_batchbuffer_end_atomic(ctx);
- }
- 
-@@ -1396,45 +1390,39 @@ i965_render_initialize(VADriverContextP ctx)
- void
- i965_render_put_surface(VADriverContextP ctx,
-                         VASurfaceID surface,
--                        short srcx,
--                        short srcy,
--                        unsigned short srcw,
--                        unsigned short srch,
--                        short destx,
--                        short desty,
--                        unsigned short destw,
--                        unsigned short desth)
-+                        const VARectangle *src_rect,
-+                        const VARectangle *dst_rect,
-+                        const VARectangle *cliprects,
-+                        unsigned int num_cliprects)
- {
-+    unsigned int n_rects;
-+
-     i965_render_initialize(ctx);
--    i965_surface_render_state_setup(ctx, surface,
--                            srcx, srcy, srcw, srch,
--                            destx, desty, destw, desth);
--    i965_surface_render_pipeline_setup(ctx);
-+    n_rects = i965_surface_render_state_setup(ctx, surface,
-+                                              src_rect, dst_rect,
-+                                              cliprects, num_cliprects);
-+    i965_surface_render_pipeline_setup(ctx, n_rects);
-     intel_batchbuffer_flush(ctx);
- }
- 
- void
- i965_render_put_subpic(VADriverContextP ctx,
--                        VASurfaceID surface,
--                        short srcx,
--                        short srcy,
--                        unsigned short srcw,
--                        unsigned short srch,
--                        short destx,
--                        short desty,
--                        unsigned short destw,
--                        unsigned short desth)
-+                       VASurfaceID surface,
-+                       const VARectangle *src_rect,
-+                       const VARectangle *dst_rect,
-+                       const VARectangle *cliprects,
-+                       unsigned int num_cliprects)
- {
-     struct i965_driver_data *i965 = i965_driver_data(ctx);
-     struct object_surface *obj_surface = SURFACE(surface);
-     struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
-+    unsigned int n_rects;
-     assert(obj_subpic);
- 
-     i965_render_initialize(ctx);
--    i965_subpic_render_state_setup(ctx, surface,
--	    srcx, srcy, srcw, srch,
--	    destx, desty, destw, desth);
--    i965_subpic_render_pipeline_setup(ctx);
-+    n_rects = i965_subpic_render_state_setup(ctx, surface, src_rect, dst_rect,
-+                                             cliprects, num_cliprects);
-+    i965_subpic_render_pipeline_setup(ctx, n_rects);
-     i965_render_upload_image_palette(ctx, obj_subpic->image, 0xff);
-     intel_batchbuffer_flush(ctx);
- }
-diff --git a/i965_drv_video/i965_render.h b/i965_drv_video/i965_render.h
-index e3dce02..d2e23f1 100644
---- a/i965_drv_video/i965_render.h
-+++ b/i965_drv_video/i965_render.h
-@@ -28,6 +28,7 @@
- #ifndef _I965_RENDER_H_
- #define _I965_RENDER_H_
- 
-+#define MAX_CLIP_RECTS          80 /* vb_bo:4096 / vb:(3*4*4) */
- #define MAX_RENDER_SURFACES     16
- #define MAX_SAMPLERS            16
- 
-@@ -65,27 +66,20 @@ struct i965_render_state
- 
- Bool i965_render_init(VADriverContextP ctx);
- Bool i965_render_terminate(VADriverContextP ctx);
-+
- void i965_render_put_surface(VADriverContextP ctx,
-                              VASurfaceID surface,
--                             short srcx,
--                             short srcy,
--                             unsigned short srcw,
--                             unsigned short srch,
--                             short destx,
--                             short desty,
--                             unsigned short destw,
--                             unsigned short desth);
--
-+                             const VARectangle *src_rect,
-+                             const VARectangle *dst_rect,
-+                             const VARectangle *cliprects,
-+                             unsigned int num_cliprects);
- 
- void
- i965_render_put_subpic(VADriverContextP ctx,
--                        VASurfaceID surface,
--                        short srcx,
--                        short srcy,
--                        unsigned short srcw,
--                        unsigned short srch,
--                        short destx,
--                        short desty,
--                        unsigned short destw,
--                        unsigned short desth);
-+                       VASurfaceID surface,
-+                       const VARectangle *src_rect,
-+                       const VARectangle *dst_rect,
-+                       const VARectangle *cliprects,
-+                       unsigned int num_cliprects);
-+
- #endif /* _I965_RENDER_H_ */
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
deleted file mode 100644
index 2885ab7..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/102_attribute_visibility.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-commit 8d0004cbd40305114bbe8019122319b43d25a772
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 8 12:34:39 2009 +0000
-
-    Fix ATTRIBUTE_HIDDEN definition if __attribute__((visibility("hidden"))) is not supported.
-
-commit 7a8bf489ffd436d853364dd0d3c9a6734b8cc7eb
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Sep 3 15:46:37 2009 +0000
-
-    Check for __attribute__((visibility("hidden"))).
-
-diff --git a/configure.ac b/configure.ac
-index da96872..abef435 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -132,6 +132,30 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr
- fi
- AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
- 
-+dnl Check for __attribute__((visibility()))
-+AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
-+    libva_cv_visibility_attribute,
-+    [cat > conftest.c <<EOF
-+int foo __attribute__ ((visibility ("hidden"))) = 1;
-+int bar __attribute__ ((visibility ("protected"))) = 1;
-+EOF
-+    libva_cv_visibility_attribute=no
-+    if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-+        if grep '\.hidden.*foo' conftest.s >/dev/null; then
-+            if grep '\.protected.*bar' conftest.s >/dev/null; then
-+	       libva_cv_visibility_attribute=yes
-+            fi
-+        fi
-+    fi
-+    rm -f conftest.[cs]
-+])
-+ATTRIBUTE_HIDDEN=""
-+if test $libva_cv_visibility_attribute = yes; then
-+    ATTRIBUTE_HIDDEN="__attribute__((visibility(\"hidden\")))"
-+fi
-+AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
-+    [Defined to __attribute__((visibility("hidden"))) when available])
-+
- # We only need the headers, we don't link against the DRM libraries
- LIBVA_CFLAGS="$DRM_CFLAGS"
- AC_SUBST(LIBVA_CFLAGS)
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/103_fix_vainfo_deps.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/103_fix_vainfo_deps.patch
deleted file mode 100644
index 942c26d..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/103_fix_vainfo_deps.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-commit 11e626a3610daf0fce253ef48ab8736bce6178f9
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 22 12:29:56 2009 +0000
-
-    Fix vainfo dependencies (Konstantin Pavlov).
-
-diff --git a/test/Makefile.am b/test/Makefile.am
-index 58e1677..ee78d34 100644
---- a/test/Makefile.am
-+++ b/test/Makefile.am
-@@ -31,10 +31,10 @@ AM_CFLAGS = -I$(top_srcdir)/../../include/external/ -I$(top_srcdir)/src -I$(top_
- 
- TESTS = $(check_PROGRAMS)
- 
--TEST_LIBS = $(top_srcdir)/src/$(libvabackendlib)
-+TEST_LIBS = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
- 
--vainfo_LDADD = $(top_srcdir)/src/$(libvabackendlib)
--vainfo_DEPENDENCIES = $(top_srcdir)/src/$(libvabackendlib)
-+vainfo_LDADD = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
-+vainfo_DEPENDENCIES = $(top_srcdir)/src/libva.la $(top_srcdir)/src/$(libvabackendlib)
- vainfo_SOURCES = vainfo.c
- 
- test_01_LDADD = $(TEST_LIBS)
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/104_fix_libva_pkgconfig_deps.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/104_fix_libva_pkgconfig_deps.patch
deleted file mode 100644
index bd212bf..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/104_fix_libva_pkgconfig_deps.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-commit f0b352251894becfcec50de1430bda12c314a464
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 22 13:00:34 2009 +0000
-
-    Fix libva-x11 pkgconfig dependencies.
-
-diff --git a/libva-x11.pc.in b/libva-x11.pc.in
-index 75e4f0b..6dde07f 100644
---- a/libva-x11.pc.in
-+++ b/libva-x11.pc.in
-@@ -6,6 +6,7 @@ display=x11
- 
- Name: libva-${display}
- Description: Userspace Video Acceleration (VA) ${display} interface
-+Requires: libva
- Version: @PACKAGE_VERSION@
- Libs: -L${libdir} -lva-${display}
- Cflags: -I${includedir}
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/105_dont_search_LIBGL_DRIVERS_PATH.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/105_dont_search_LIBGL_DRIVERS_PATH.patch
deleted file mode 100644
index de873d6..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/105_dont_search_LIBGL_DRIVERS_PATH.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 035374378644216fb3a7d3974a8c46b1bd425918
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 22 13:03:23 2009 +0000
-
-    Don't search LIBGL_DRIVERS_PATH, stick to LIBVA_DRIVERS_PATH only or the default path.
-
-diff --git a/src/va.c b/src/va.c
-index 12662cd..723235e 100644
---- a/src/va.c
-+++ b/src/va.c
-@@ -134,10 +134,6 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
-     {
-         /* don't allow setuid apps to use LIBVA_DRIVERS_PATH */
-         search_path = getenv("LIBVA_DRIVERS_PATH");
--        if (!search_path)
--        {
--            search_path = getenv("LIBGL_DRIVERS_PATH");
--        }
-     }
-     if (!search_path)
-     {
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/108_drivers_path.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/108_drivers_path.patch
deleted file mode 100644
index 073c987..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/108_drivers_path.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 332bfec6020b5cfcef5d655f4bf525dab67c0b92 Mon Sep 17 00:00:00 2001
-From: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date: Wed, 24 Jun 2009 08:12:13 +0000
-Subject: [PATCH] Install drivers into pkglibdir/va/.
-
----
- configure.ac |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 4be2b56..d595ac9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -73,7 +73,7 @@ AC_ARG_ENABLE(i965-driver,
- 
- AC_ARG_WITH(drivers-path,
- 	    [AC_HELP_STRING([--with-drivers-path=[[path]]], [drivers path])],,
--	    [with_drivers_path="$libdir/dri"])
-+	    [with_drivers_path="$libdir/va/drivers"])
- 
- LIBVA_DRIVERS_PATH="$with_drivers_path"
- AC_SUBST(LIBVA_DRIVERS_PATH)
--- 
-1.5.4.3
-
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/203_fix_fglrx_detection.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/203_fix_fglrx_detection.patch
deleted file mode 100644
index ce7f106..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/203_fix_fglrx_detection.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-commit fb6ccda5984eda96bcb394b23255143dcbc21f18
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Sep 10 12:22:17 2009 +0000
-
-    Don't link against libdrm to workaround XvBA / fglrx >= 8.66-RC1 bugs.
-
-commit ab3c0f65182462b54729d2d82d4d645c8be5b2d1
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Sep 9 13:24:46 2009 +0000
-
-    Fix DRM device opening with fglrx >= 8.66-RC1.
-
-diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am
-index c70380d..b6916f2 100644
---- a/src/x11/Makefile.am
-+++ b/src/x11/Makefile.am
-@@ -25,6 +25,6 @@ noinst_LTLIBRARIES = libva_x11.la
- libva_x11includedir = ${includedir}/va
- libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h
- 
--libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c
-+libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c
- 
--EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h
-+EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
-diff --git a/src/x11/dri1_util.c b/src/x11/dri1_util.c
-index b3db5b4..3bd490f 100644
---- a/src/x11/dri1_util.c
-+++ b/src/x11/dri1_util.c
-@@ -1,10 +1,12 @@
-+#include "config.h"
-+#include <stdio.h>
- #include <stdlib.h>
- #include <fcntl.h>
- #include <unistd.h>
- #include <sys/mman.h>
- #include <assert.h>
- 
--#include <xf86drm.h>
-+#include "libdrm_glue.h"
- 
- #include "X11/Xlib.h"
- #include "va.h"
-@@ -21,6 +23,75 @@ struct dri1_drawable
-     int height;
- };
- 
-+static int
-+firegl_drmOpenMinor(int minor)
-+{
-+    char buf[64];
-+    int fd;
-+
-+    sprintf(buf, "/dev/ati/card%d", minor);
-+    if ((fd = open(buf, O_RDWR, 0)) >= 0)
-+        return fd;
-+    return -1;
-+}
-+
-+static int
-+firegl_drmOpenByBusID(const char *busid)
-+{
-+    int i, fd;
-+    drmSetVersion sv;
-+    const char *buf;
-+
-+    for (i = 0; i < DRM_MAX_MINOR; i++) {
-+        if ((fd = firegl_drmOpenMinor(i)) < 0)
-+            continue;
-+        sv.drm_di_major = 1;
-+        sv.drm_di_minor = 1;
-+        sv.drm_dd_major = -1;
-+        sv.drm_dd_minor = -1;
-+        libdrm_drmSetInterfaceVersion(fd, &sv);
-+        buf = libdrm_drmGetBusid(fd);
-+        if (buf && strcasecmp(buf, busid) == 0) { /* XXX: drmMatchBusID() */
-+            libdrm_drmFreeBusid(buf);
-+            return fd;
-+        }
-+        if (buf)
-+            libdrm_drmFreeBusid(buf);
-+        close(fd);
-+    }
-+    return -1;
-+}
-+
-+static int
-+drm_open_once(struct dri_state *dri_state, const char *BusID, int *newlyopened)
-+{
-+    dri_state->driConnectedFlag = VA_NONE;
-+    dri_state->fd = libdrm_drmOpenOnce(NULL, BusID, newlyopened);
-+    if (dri_state->fd < 0) {
-+        dri_state->fd = firegl_drmOpenByBusID(BusID);
-+        if (dri_state->fd >= 0) {
-+            *newlyopened = 1;
-+            dri_state->driConnectedFlag |= VA_DRI_AMD;
-+        }
-+    }
-+    return dri_state->fd;
-+}
-+
-+static void
-+drm_close_once(struct dri_state *dri_state)
-+{
-+    /* XXX: dri_state->close() doesn't seem to be called, thus this
-+       function is never called either */
-+    if (dri_state->fd < 0)
-+        return;
-+    if (dri_state->driConnectedFlag & VA_DRI_AMD)
-+        close(dri_state->fd);
-+    else
-+        libdrm_drmCloseOnce(dri_state->fd);
-+    dri_state->fd = -1;
-+    dri_state->driConnectedFlag = VA_NONE;
-+}
-+
- static struct dri_drawable * 
- dri1CreateDrawable(VADriverContextP ctx, XID x_drawable)
- {
-@@ -64,9 +135,9 @@ dri1Close(VADriverContextP ctx)
-     free_drawable_hashtable(ctx);
-     VA_DRIDestroyContext(ctx->x11_dpy, ctx->x11_screen, dri_state->hwContextID);
-     assert(dri_state->pSAREA != MAP_FAILED);
--    drmUnmap(dri_state->pSAREA, SAREA_MAX);
-+    libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX);
-     assert(dri_state->fd >= 0);
--    drmCloseOnce(dri_state->fd);
-+    drm_close_once(dri_state);
-     VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
- }
- 
-@@ -104,21 +175,20 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
-                               &dri_state->hSAREA, &BusID))
-         goto err_out0;
- 
--    
--    dri_state->fd = drmOpenOnce(NULL, BusID, &newlyopened);
-+    drm_open_once(dri_state, BusID, &newlyopened);
-     XFree(BusID);
- 
-     if (dri_state->fd < 0)
-         goto err_out1;
- 
- 
--    if (drmGetMagic(dri_state->fd, &magic))
-+    if (libdrm_drmGetMagic(dri_state->fd, &magic))
-         goto err_out1;
- 
-     if (newlyopened && !VA_DRIAuthConnection(ctx->x11_dpy, ctx->x11_screen, magic))
-         goto err_out1;
- 
--    if (drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
-+    if (libdrm_drmMap(dri_state->fd, dri_state->hSAREA, SAREA_MAX, &dri_state->pSAREA))
-         goto err_out1;
- 
-     if (!VA_DRICreateContext(ctx->x11_dpy, ctx->x11_screen,
-@@ -127,7 +196,8 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
-                              &dri_state->hwContextID, &dri_state->hwContext))
-         goto err_out1;
- 
--    dri_state->driConnectedFlag = VA_DRI1;
-+    dri_state->driConnectedFlag &= VA_DRI_AMD; /* clear flags but AMD bit */
-+    dri_state->driConnectedFlag |= VA_DRI1;
-     dri_state->createDrawable = dri1CreateDrawable;
-     dri_state->destroyDrawable = dri1DestroyDrawable;
-     dri_state->swapBuffer = dri1SwapBuffer;
-@@ -138,10 +208,10 @@ isDRI1Connected(VADriverContextP ctx, char **driver_name)
- 
- err_out1:
-     if (dri_state->pSAREA != MAP_FAILED)
--        drmUnmap(dri_state->pSAREA, SAREA_MAX);
-+        libdrm_drmUnmap(dri_state->pSAREA, SAREA_MAX);
- 
-     if (dri_state->fd >= 0)
--        drmCloseOnce(dri_state->fd);
-+        drm_close_once(dri_state);
- 
-     VA_DRICloseConnection(ctx->x11_dpy, ctx->x11_screen);
- 
-diff --git a/src/x11/dri2_util.c b/src/x11/dri2_util.c
-index ebe7a2c..b727e97 100644
---- a/src/x11/dri2_util.c
-+++ b/src/x11/dri2_util.c
-@@ -3,7 +3,7 @@
- #include <unistd.h>
- #include <assert.h>
- 
--#include <xf86drm.h>
-+#include "libdrm_glue.h"
- 
- #include <X11/Xlibint.h>
- #include <X11/Xlib.h>
-@@ -166,7 +166,7 @@ isDRI2Connected(VADriverContextP ctx, char **driver_name)
-     if (dri_state->fd < 0)
-         goto err_out;
- 
--    if (drmGetMagic(dri_state->fd, &magic))
-+    if (libdrm_drmGetMagic(dri_state->fd, &magic))
-         goto err_out;
- 
-     if (!VA_DRI2Authenticate(ctx->x11_dpy, RootWindow(ctx->x11_dpy, ctx->x11_screen),
-diff --git a/src/x11/libdrm_glue.c b/src/x11/libdrm_glue.c
-new file mode 100644
-index 0000000..b72a2d1
---- /dev/null
-+++ b/src/x11/libdrm_glue.c
-@@ -0,0 +1,208 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#define _GNU_SOURCE 1
-+#include "libdrm_glue.h"
-+#include <stdio.h>
-+#include <string.h>
-+#include <dlfcn.h>
-+#include <assert.h>
-+
-+#define LOAD_FUNC_(NAME, RET, ARGS, FALLBACK)   \
-+    static RET (*lib_##NAME) ARGS;              \
-+    if (lib_##NAME == NULL) {                   \
-+        lib_##NAME = libdrm_symbol(#NAME);      \
-+        if (!lib_##NAME)                        \
-+            lib_##NAME = FALLBACK;              \
-+    }                                           \
-+    assert(lib_##NAME != NULL)
-+
-+#define LOAD_FUNC(NAME, RET, ARGS)              \
-+    LOAD_FUNC_(NAME, RET, ARGS, NULL)
-+
-+static void *libdrm_handle;
-+static int libdrm_handle_ok = -1;
-+
-+static inline void *libdrm_symbol(const char *name)
-+{
-+    if (!libdrm_open())
-+        return NULL;
-+    return dlsym(libdrm_handle, name);
-+}
-+
-+int libdrm_open(void)
-+{
-+    if (libdrm_handle_ok < 0) {
-+        libdrm_handle = dlopen("libdrm.so.2", RTLD_LOCAL|RTLD_LAZY);
-+        libdrm_handle_ok = libdrm_handle != NULL;
-+    }
-+    assert(libdrm_handle);
-+    return libdrm_handle_ok;
-+}
-+
-+void libdrm_close(void)
-+{
-+    if (libdrm_handle)
-+        dlclose(libdrm_handle);
-+}
-+
-+// Default drmOpenOnce() and drmCloseOnce() implementations based on current GIT
-+#define DRM_MAX_FDS 16
-+static struct {
-+    char *BusID;
-+    int fd;
-+    int refcount;
-+} connection[DRM_MAX_FDS];
-+
-+static int nr_fds = 0;
-+
-+// Default implementation for drmOpenOnce() if none exists in the library
-+static int
-+libdrm_default_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
-+{
-+    int i;
-+    int fd;
-+
-+    for (i = 0; i < nr_fds; i++)
-+        if (strcmp(BusID, connection[i].BusID) == 0) {
-+            connection[i].refcount++;
-+            *newlyopened = 0;
-+            return connection[i].fd;
-+        }
-+
-+    fd = libdrm_drmOpen(unused, BusID);
-+    if (fd <= 0 || nr_fds == DRM_MAX_FDS)
-+        return fd;
-+
-+    connection[nr_fds].BusID = strdup(BusID);
-+    connection[nr_fds].fd = fd;
-+    connection[nr_fds].refcount = 1;
-+    *newlyopened = 1;
-+
-+    if (0)
-+        fprintf(stderr, "saved connection %d for %s %d\n", 
-+                nr_fds, connection[nr_fds].BusID, 
-+                strcmp(BusID, connection[nr_fds].BusID));
-+    nr_fds++;
-+    return fd;
-+}
-+
-+// Default implementation for drmCloseOnce() if none exists in the library
-+static void libdrm_default_drmCloseOnce(int fd)
-+{
-+    int i;
-+
-+    for (i = 0; i < nr_fds; i++) {
-+        if (fd == connection[i].fd) {
-+            if (--connection[i].refcount == 0) {
-+                libdrm_drmClose(connection[i].fd);
-+                free(connection[i].BusID);
-+                if (i < --nr_fds) 
-+                    connection[i] = connection[nr_fds];
-+                return;
-+            }
-+        }
-+    }
-+}
-+
-+// Determine whether the DRM kernel driver has been loaded
-+int libdrm_drmAvailable(void)
-+{
-+    LOAD_FUNC(drmAvailable, int, (void));
-+    return lib_drmAvailable();
-+}
-+
-+// Open the DRM device
-+int libdrm_drmOpen(const char *name, const char *busid)
-+{
-+    LOAD_FUNC(drmOpen, int, (const char *, const char *));
-+    return lib_drmOpen(name, busid);
-+}
-+
-+// Close the device
-+int libdrm_drmClose(int fd)
-+{
-+    LOAD_FUNC(drmClose, int, (int));
-+    return lib_drmClose(fd);
-+}
-+
-+// Open the DRM device (re-use an existing connection)
-+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
-+{
-+    LOAD_FUNC_(drmOpenOnce, int, (void *, const char *, int *),
-+               libdrm_default_drmOpenOnce);
-+    return lib_drmOpenOnce(unused, BusID, newlyopened);
-+}
-+
-+// Close the device (unref an existing connection prior to actually closing it)
-+void libdrm_drmCloseOnce(int fd)
-+{
-+    LOAD_FUNC_(drmCloseOnce, void, (int), libdrm_default_drmCloseOnce);
-+    lib_drmCloseOnce(fd);
-+}
-+
-+// DRM connection cookie
-+int libdrm_drmGetMagic(int fd, drm_magic_t * magic)
-+{
-+    LOAD_FUNC(drmGetMagic, int, (int, drm_magic_t *));
-+    return lib_drmGetMagic(fd, magic);
-+}
-+
-+// Issue a set-version ioctl
-+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version)
-+{
-+    LOAD_FUNC(drmSetInterfaceVersion, int, (int, drmSetVersion *));
-+    return lib_drmSetInterfaceVersion(fd, version);
-+}
-+
-+// Get the bus ID of the device
-+char *libdrm_drmGetBusid(int fd)
-+{
-+    LOAD_FUNC(drmGetBusid, char *, (int));
-+    return lib_drmGetBusid(fd);
-+}
-+
-+// Free the bus ID information
-+void libdrm_drmFreeBusid(const char *busid)
-+{
-+    LOAD_FUNC(drmFreeBusid, void, (const char *));
-+    lib_drmFreeBusid(busid);
-+}
-+
-+// Map a region of memory
-+int libdrm_drmMap(int fd,
-+                  drm_handle_t handle,
-+                  drmSize size,
-+                  drmAddressPtr address)
-+{
-+    LOAD_FUNC(drmMap, int, (int, drm_handle_t, drmSize, drmAddressPtr));
-+    return lib_drmMap(fd, handle, size, address);
-+}
-+
-+// Unmap mappings obtained with drmMap()
-+int libdrm_drmUnmap(drmAddress address, drmSize size)
-+{
-+    LOAD_FUNC(drmUnmap, int, (drmAddress, drmSize));
-+    return lib_drmUnmap(address, size);
-+}
-diff --git a/src/x11/libdrm_glue.h b/src/x11/libdrm_glue.h
-new file mode 100644
-index 0000000..878470b
---- /dev/null
-+++ b/src/x11/libdrm_glue.h
-@@ -0,0 +1,73 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef LIBDRM_GLUE_H
-+#define LIBDRM_GLUE_H
-+
-+#include "config.h"
-+#include <xf86drm.h>
-+
-+int libdrm_open(void)
-+    ATTRIBUTE_HIDDEN;
-+
-+void libdrm_close(void)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmAvailable(void)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmOpen(const char *name, const char *busid)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmClose(int fd)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmOpenOnce(void *unused, const char *BusID, int *newlyopened)
-+    ATTRIBUTE_HIDDEN;
-+
-+void libdrm_drmCloseOnce(int fd)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmGetMagic(int fd, drm_magic_t * magic)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmSetInterfaceVersion(int fd, drmSetVersion *version)
-+    ATTRIBUTE_HIDDEN;
-+
-+char *libdrm_drmGetBusid(int fd)
-+    ATTRIBUTE_HIDDEN;
-+
-+void libdrm_drmFreeBusid(const char *busid)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmMap(int fd,
-+                  drm_handle_t handle,
-+                  drmSize size,
-+                  drmAddressPtr address)
-+    ATTRIBUTE_HIDDEN;
-+
-+int libdrm_drmUnmap(drmAddress address, drmSize size)
-+    ATTRIBUTE_HIDDEN;
-+
-+#endif /* LIBDRM_GLUE_H */
-diff --git a/src/x11/va_dricommon.h b/src/x11/va_dricommon.h
-index a2a51a6..0da35fe 100644
---- a/src/x11/va_dricommon.h
-+++ b/src/x11/va_dricommon.h
-@@ -13,7 +13,8 @@ enum
- {
-     VA_NONE = 0,
-     VA_DRI1 = 1,
--    VA_DRI2 = 2
-+    VA_DRI2 = 2,
-+    VA_DRI_AMD = 4 /* AMD DRI implementation */
- };
- 
- union dri_buffer 
-diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
-index b8c60fa..414c261 100644
---- a/src/x11/va_x11.c
-+++ b/src/x11/va_x11.c
-@@ -31,6 +31,7 @@
- #include "va_dri2.h"
- #include "va_dricommon.h"
- #include "va_nvctrl.h"
-+#include "libdrm_glue.h"
- #include <stdio.h>
- #include <stdarg.h>
- #include <string.h>
-@@ -94,6 +75,8 @@ static void va_DisplayContextDestroy (
- 	}
- 	ctx = &((*ctx)->pNext);
-     }
-+
-+    libdrm_close();
-     free(pDisplayContext->pDriverContext->dri_state);
-     free(pDisplayContext->pDriverContext);
-     free(pDisplayContext);
-diff --git a/src/Makefile.am b/src/Makefile.am
-index e50a15f..d1f8f70 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -45,7 +45,7 @@ libva_la_LDFLAGS = $(LDADD) -no-undefined
- libva_la_LIBADD = $(LIBVA_LIBS) -ldl
- 
- libva_x11_la_SOURCES = 
--libva_x11_la_LIBADD  = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
-+libva_x11_la_LIBADD  = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(XFIXES_LIBS) -ldl
- libva_x11_la_LDFLAGS = $(LDADD)
- libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
- 
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/204_check_ATIFGLEXTENSION.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/204_check_ATIFGLEXTENSION.patch
deleted file mode 100644
index 02920a8..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/204_check_ATIFGLEXTENSION.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-commit d91645f8b37aa43bafa76da3146dcdc9c17963ff
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Nov 20 15:51:22 2009 +0000
-
-    Fix detection of fglrx.
-
-diff --git a/src/x11/Makefile.am b/src/x11/Makefile.am
-index b6916f2..0b61c33 100644
---- a/src/x11/Makefile.am
-+++ b/src/x11/Makefile.am
-@@ -25,6 +25,23 @@ noinst_LTLIBRARIES = libva_x11.la
- libva_x11includedir = ${includedir}/va
- libva_x11include_HEADERS = va_x11.h va_dri.h va_dri2.h va_dricommon.h
- 
--libva_x11_la_SOURCES = va_x11.c va_dri.c va_dri2.c va_dricommon.c dri2_util.c dri1_util.c va_nvctrl.c libdrm_glue.c
-+libva_x11_la_SOURCES =	\
-+	dri1_util.c	\
-+	dri2_util.c	\
-+	libdrm_glue.c	\
-+	va_dri.c	\
-+	va_dri2.c	\
-+	va_dricommon.c	\
-+	va_fglext.c	\
-+	va_nvctrl.c	\
-+	va_x11.c	\
-+	$(NULL)
- 
--EXTRA_DIST = va_dristr.h va_dri2str.h va_dri2tokens.h va_nvctrl.h libdrm_glue.h
-+EXTRA_DIST =		\
-+	libdrm_glue.h	\
-+	va_dri2str.h	\
-+	va_dri2tokens.h	\
-+	va_dristr.h	\
-+	va_fglext.h	\
-+	va_nvctrl.h	\
-+	$(NULL)
-diff --git a/src/x11/va_fglext.c b/src/x11/va_fglext.c
-new file mode 100644
-index 0000000..bc58e8b
---- /dev/null
-+++ b/src/x11/va_fglext.c
-@@ -0,0 +1,175 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#define _GNU_SOURCE 1
-+#include <string.h>
-+
-+#define NEED_REPLIES
-+#include <stdlib.h>
-+#include <X11/Xlibint.h>
-+#include <X11/Xutil.h>
-+#include <X11/extensions/Xext.h>
-+#include <X11/extensions/extutil.h>
-+#include "va_fglext.h"
-+
-+#define ATIFGL_EXTENSION_NAME "ATIFGLEXTENSION"
-+#define ATIFGL_EXTENSION_EVENTS 0
-+
-+typedef struct _FGLGetDriverData {
-+    CARD8   reqType;
-+    CARD8   fireglReqType;
-+    CARD16  length B16;
-+    CARD32  screen B32;
-+    CARD16  size B16;
-+    CARD16  pad1;
-+} xFGLGetDriverDataReq;
-+#define sz_xFGLGetDriverDataReq sizeof(xFGLGetDriverDataReq)
-+
-+typedef struct {
-+    BYTE    type;
-+    BYTE    pad1;
-+    CARD16  sequenceNumber B16;
-+    CARD32  length B32;
-+    CARD8   majorVersion;
-+    CARD8   minorVersion;
-+    CARD8   patchlevel B16;
-+    CARD8   BIOSVersionMajor;
-+    CARD8   BIOSVersionMinor;
-+    CARD8   HasSecondary;
-+    CARD16  pad3 B16;
-+    CARD32  pad4 B32;
-+    CARD32  pad5 B32;
-+    CARD32  pad6 B32;
-+    CARD32  pad7 B32;
-+    // ... there are more fields
-+} xFGLGetDriverDataReply;
-+#define sz_xFGLGetDriverDataReply sizeof(xFGLGetDriverDataReply)
-+
-+#define X_FGLGetDriverData 0
-+
-+static XExtensionInfo _fglext_ext_info_data;
-+static XExtensionInfo *fglext_ext_info = &_fglext_ext_info_data;
-+static /* const */ char *fglext_extension_name = ATIFGL_EXTENSION_NAME;
-+
-+#define xFGLCheckExtension(dpy,i,val) \
-+  XextCheckExtension (dpy, i, fglext_extension_name, val)
-+
-+static int close_display();
-+static /* const */ XExtensionHooks fglext_extension_hooks = {
-+    NULL,                               /* create_gc */
-+    NULL,                               /* copy_gc */
-+    NULL,                               /* flush_gc */
-+    NULL,                               /* free_gc */
-+    NULL,                               /* create_font */
-+    NULL,                               /* free_font */
-+    close_display,                      /* close_display */
-+    NULL,                               /* wire_to_event */
-+    NULL,                               /* event_to_wire */
-+    NULL,                               /* error */
-+    NULL,                               /* error_string */
-+};
-+
-+static XEXT_GENERATE_FIND_DISPLAY (find_display, fglext_ext_info,
-+                                   fglext_extension_name, 
-+                                   &fglext_extension_hooks,
-+                                   ATIFGL_EXTENSION_EVENTS, NULL)
-+
-+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, fglext_ext_info)
-+
-+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen,
-+    Bool *isCapable )
-+{
-+    char **extensions;
-+    int i, n_extensions, has_fglext = 0, has_fglrxdri = 0;
-+
-+    if (isCapable)
-+        *isCapable = False;
-+
-+    extensions = XListExtensions(dpy, &n_extensions);
-+    if (!extensions)
-+        return False;
-+
-+    for (i = 0; i < n_extensions; i++) {
-+        if (strcmp(extensions[i], ATIFGL_EXTENSION_NAME) == 0)
-+            has_fglext = 1;
-+        if (strcmp(extensions[i], "ATIFGLRXDRI") == 0)
-+            has_fglrxdri = 1;
-+    }
-+    XFreeExtensionList(extensions);
-+
-+    if (!has_fglext)
-+        return False;
-+
-+    if (isCapable)
-+        *isCapable = has_fglrxdri;
-+
-+    return True;
-+}
-+
-+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen,
-+    int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
-+    int *ddxDriverPatchVersion, char **clientDriverName )
-+{
-+    XExtDisplayInfo *info = find_display (dpy);
-+    xFGLGetDriverDataReply rep;
-+    xFGLGetDriverDataReq  *req;
-+
-+    if (ddxDriverMajorVersion)
-+        *ddxDriverMajorVersion = 0;
-+    if (ddxDriverMinorVersion)
-+        *ddxDriverMinorVersion = 0;
-+    if (ddxDriverPatchVersion)
-+        *ddxDriverPatchVersion = 0;
-+    if (clientDriverName)
-+        *clientDriverName = NULL;
-+
-+    if(!XextHasExtension(info))
-+        return False;
-+
-+    xFGLCheckExtension (dpy, info, False);
-+
-+    LockDisplay (dpy);
-+    GetReq (FGLGetDriverData, req);
-+    req->reqType = info->codes->major_opcode;
-+    req->fireglReqType = X_FGLGetDriverData;
-+    req->screen = screen;
-+    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
-+        UnlockDisplay (dpy);
-+        SyncHandle ();
-+        return False;
-+    }
-+    UnlockDisplay (dpy);
-+    SyncHandle ();
-+
-+    if (ddxDriverMajorVersion)
-+        *ddxDriverMajorVersion = rep.majorVersion;
-+    if (ddxDriverMinorVersion)
-+        *ddxDriverMinorVersion = rep.minorVersion;
-+    if (ddxDriverPatchVersion)
-+        *ddxDriverPatchVersion = rep.patchlevel;
-+    if (clientDriverName)
-+        *clientDriverName = strdup("fglrx");
-+
-+    return True;
-+}
-diff --git a/src/x11/va_fglext.h b/src/x11/va_fglext.h
-new file mode 100644
-index 0000000..f2d87c3
---- /dev/null
-+++ b/src/x11/va_fglext.h
-@@ -0,0 +1,37 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef VA_FGLEXTLIB_H
-+#define VA_FGLEXTLIB_H
-+
-+#include <X11/Xlib.h>
-+
-+Bool VA_FGLEXTQueryDirectRenderingCapable( Display *dpy, int screen,
-+    Bool *isCapable );
-+
-+Bool VA_FGLEXTGetClientDriverName( Display *dpy, int screen,
-+    int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
-+    int *ddxDriverPatchVersion, char **clientDriverName );
-+
-+#endif /* VA_FGLEXTLIB_H */
-diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
-index 414c261..0510e00 100644
---- a/src/x11/va_x11.c
-+++ b/src/x11/va_x11.c
-@@ -31,6 +31,7 @@
- #include "va_dri2.h"
- #include "va_dricommon.h"
- #include "va_nvctrl.h"
-+#include "va_fglext.h"
- #include "libdrm_glue.h"
- #include <stdio.h>
- #include <stdarg.h>
-@@ -132,6 +133,29 @@ static VAStatus va_NVCTRL_GetDriverName (
-     return VA_STATUS_SUCCESS;
- }
- 
-+static VAStatus va_FGLEXT_GetDriverName(
-+    VADisplayContextP pDisplayContext,
-+    char **driver_name
-+)
-+{
-+    VADriverContextP ctx = pDisplayContext->pDriverContext;
-+    int direct_capable, driver_major, driver_minor, driver_patch;
-+    Bool result;
-+
-+    result = VA_FGLEXTQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen,
-+                                                  &direct_capable);
-+    if (!result || !direct_capable)
-+        return VA_STATUS_ERROR_UNKNOWN;
-+
-+    result = VA_FGLEXTGetClientDriverName(ctx->x11_dpy, ctx->x11_screen,
-+                                          &driver_major, &driver_minor,
-+                                          &driver_patch, driver_name);
-+    if (!result)
-+        return VA_STATUS_ERROR_UNKNOWN;
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
- static VAStatus va_DisplayContextGetDriverName (
-     VADisplayContextP pDisplayContext,
-     char **driver_name
-@@ -156,7 +180,8 @@ static VAStatus va_DisplayContextGetDriverName (
-         vaStatus = va_DRIGetDriverName(pDisplayContext, driver_name);
-     if (vaStatus != VA_STATUS_SUCCESS)
-         vaStatus = va_NVCTRL_GetDriverName(pDisplayContext, driver_name);
--   
-+    if (vaStatus != VA_STATUS_SUCCESS)
-+        vaStatus = va_FGLEXT_GetDriverName(pDisplayContext, driver_name);
-     return vaStatus;
- }
- 
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/300_sds_version.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/300_sds_version.patch
deleted file mode 100644
index 07531c9..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/300_sds_version.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-commit 890acc1975ed9f6b7173ff6fbf9d689943590913
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Jun 24 11:32:40 2009 +0000
-
-    Explicit API extensions from SDS.
-
-diff --git a/configure.ac b/configure.ac
-index 3999dc4..17b0403 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -28,6 +28,9 @@ m4_define([libva_micro_version], [0])
- m4_define([libva_version],
-           [libva_major_version.libva_minor_version.libva_micro_version])
- 
-+# increase this number for each API change
-+m4_define([libva_sds_version], [4])
-+
- # if the library source code has changed, increment revision
- m4_define([libva_lt_revision], [0])
- # if any interface was added/removed/changed, then inc current, reset revision
-@@ -52,11 +55,14 @@ AC_SUBST(LIBVA_MINOR_VERSION)
- AC_SUBST(LIBVA_MICRO_VERSION)
- AC_SUBST(LIBVA_VERSION)
- 
-+LIBVA_SDS_VERSION=libva_sds_version
-+AC_SUBST(LIBVA_SDS_VERSION)
-+
- LIBVA_LT_CURRENT=libva_lt_current
- LIBVA_LT_REV=libva_lt_revision
- LIBVA_LT_AGE=libva_lt_age
- LIBVA_LT_VERSION="$LIBVA_LT_CURRENT:$LIBVA_LT_REV:$LIBVA_LT_AGE"
--LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION"
-+LIBVA_LT_LDFLAGS="-version-info $LIBVA_LT_VERSION -release $LIBVA_VERSION.$LIBVA_SDS_VERSION"
- AC_SUBST(LIBVA_LT_VERSION)
- AC_SUBST(LIBVA_LT_LDFLAGS)
- 
-diff --git a/src/va.c b/src/va.c
-index f9791f8..b60ac12 100644
---- a/src/va.c
-+++ b/src/va.c
-@@ -35,6 +35,7 @@
- #include <linux/videodev2.h>
- 
- #define DRIVER_INIT_FUNC	"__vaDriverInit_0_31"
-+#define DRIVER_INIT_FUNC_SDS	"__vaDriverInit_0_31_sds"
- 
- #define DRIVER_EXTENSION	"_drv_video.so"
- 
-@@ -160,6 +161,11 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
-             init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
-             if (!init_func)
-             {
-+                /* Then try SDS extensions (VDPAU and XvBA backends) */
-+                init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS);
-+            }
-+            if (!init_func)
-+            {
-                 va_errorMessage("%s has no function %s\n", driver_path, DRIVER_INIT_FUNC);
-                 dlclose(handle);
-             }
-diff --git a/src/va_version.h.in b/src/va_version.h.in
-index c9ea97a..197c482 100644
---- a/src/va_version.h.in
-+++ b/src/va_version.h.in
-@@ -47,6 +47,13 @@
- #define VA_MICRO_VERSION   (@LIBVA_MICRO_VERSION@)
- 
- /**
-+ * VA_SDS_VERSION:
-+ *
-+ * The version of the SDS API extensions to the VA library
-+ */
-+#define VA_SDS_VERSION     (@LIBVA_SDS_VERSION@)
-+
-+/**
-  * VA_VERSION:
-  *
-  * The full version of the VA library, like 1.2.3
-@@ -59,7 +66,7 @@
-  * The full version of the VA library, in string form (suited for
-  * string concatenation)
-  */
--#define VA_VERSION_S       "@LIBVA_VERSION@"
-+#define VA_VERSION_S       "@LIBVA_VERSION@-sds@LIBVA_SDS_VERSION@"
- 
- /**
-  * VA_VERSION_HEX:
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/301_vdpau_mpeg4.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/301_vdpau_mpeg4.patch
deleted file mode 100644
index 8618890..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/301_vdpau_mpeg4.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 3c2d45290e1369083a27d53a5f94276c82512974
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Mon Nov 23 12:21:24 2009 +0000
-
-    Add extra picture info fields for VDPAU/MPEG-4.
-
-diff --git a/src/va.h b/src/va.h
-index fa34850..f89a5cb 100755
---- a/src/va.h
-+++ b/src/va.h
-@@ -672,6 +672,7 @@ typedef struct _VAPictureParameterBufferMPEG4
-             unsigned int quarter_sample			: 1; 
-             unsigned int data_partitioned		: 1; 
-             unsigned int reversible_vlc			: 1; 
-+            unsigned int resync_marker_disable		: 1; 
-         } bits;
-         unsigned int value;
-     } vol_fields;
-@@ -692,6 +693,7 @@ typedef struct _VAPictureParameterBufferMPEG4
-     } vop_fields;
-     unsigned char vop_fcode_forward;
-     unsigned char vop_fcode_backward;
-+    unsigned short vop_time_increment_resolution;
-     /* short header related */
-     unsigned char num_gobs_in_vop;
-     unsigned char num_macroblocks_in_gob;
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/320_move_vaPutSurface_flags_def.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/320_move_vaPutSurface_flags_def.patch
deleted file mode 100644
index f00c52c..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/320_move_vaPutSurface_flags_def.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-commit c682fb5ebd1964638f90590f66edf49629e7481d
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Aug 21 11:34:50 2009 +0000
-
-    Move vaPutSurface() flags to <va/va.h> header.
-
-diff --git a/src/va.h b/src/va.h
-index 0519f6f..6b4bbd4 100755
---- a/src/va.h
-+++ b/src/va.h
-@@ -127,6 +127,22 @@ typedef int VAStatus;	/* Return status type from functions */
- #define VA_STATUS_ERROR_RESOLUTION_NOT_SUPPORTED 0x00000013
- #define VA_STATUS_ERROR_UNKNOWN			0xFFFFFFFF
- 
-+/* De-interlacing flags for vaPutSurface() */
-+#define VA_FRAME_PICTURE        0x00000000 
-+#define VA_TOP_FIELD            0x00000001
-+#define VA_BOTTOM_FIELD         0x00000002
-+
-+/*
-+ * Clears the drawable with background color.
-+ * for hardware overlay based implementation this flag
-+ * can be used to turn off the overlay
-+ */
-+#define VA_CLEAR_DRAWABLE       0x00000008 
-+
-+/* Color space conversion flags for vaPutSurface() */
-+#define VA_SRC_BT601            0x00000010
-+#define VA_SRC_BT709            0x00000020
-+
- /*
-  * Returns a short english description of error_status
-  */
-diff --git a/src/x11/va_x11.h b/src/x11/va_x11.h
-index 2171ac6..5ab5200 100644
---- a/src/x11/va_x11.h
-+++ b/src/x11/va_x11.h
-@@ -27,22 +27,6 @@ VADisplay vaGetDisplay (
-  * color space conversion and scaling to the destination
-  * rectangle
-  */
--/* de-interlacing flags for vaPutSurface */
--#define VA_FRAME_PICTURE	0x00000000 
--#define VA_TOP_FIELD		0x00000001
--#define VA_BOTTOM_FIELD		0x00000002
--
--/* 
-- * clears the drawable with background color.
-- * for hardware overlay based implementation this flag
-- * can be used to turn off the overlay
-- */
--#define VA_CLEAR_DRAWABLE	0x00000008 
--
--/* color space conversion flags for vaPutSurface */
--#define VA_SRC_BT601		0x00000010
--#define VA_SRC_BT709		0x00000020
--
- VAStatus vaPutSurface (
-     VADisplay dpy,
-     VASurfaceID surface,	
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/321_libva_glx.base.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/321_libva_glx.base.patch
deleted file mode 100644
index 43af6f4..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/321_libva_glx.base.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-commit f0b352251894becfcec50de1430bda12c314a464
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 22 13:00:34 2009 +0000
-
-    Fix libva-glx pkgconfig dependencies.
-
-commit df0953a951d8a2e5e4b0a28a95ae0f1ac735726e
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 8 12:25:14 2009 +0000
-
-    Add generic VA/GLX implementation with TFP and FBO.
-
-commit f640b1cf9eab4e5d478239b608ed0d8b68f6c5f6
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 8 12:15:35 2009 +0000
-
-    Move GLX VTable to a new file.
-
-commit 70d9cb6d1aa2fc2dde6646f3b692433e0d93d431
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Aug 28 11:15:51 2009 +0000
-
-    Add OpenGL extensions (v3).
-
-diff --git a/Makefile.am b/Makefile.am
-index 07385e6..6fb4cae 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -32,10 +32,13 @@ endif
- 
- pcfiles = libva.pc
- pcfiles += libva-x11.pc
-+if USE_GLX
-+pcfiles += libva-glx.pc
-+endif
- 
- pkgconfigdir = @pkgconfigdir@
- pkgconfig_DATA = $(pcfiles)
- 
--EXTRA_DIST = libva.pc.in libva-x11.pc.in
-+EXTRA_DIST = libva.pc.in libva-x11.pc.in libva-glx.pc.in
- 
- CLEANFILES = $(pcfiles)
-diff --git a/configure.ac b/configure.ac
-index c3aba90..abef435 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -52,6 +55,11 @@ AC_SUBST(LIBVA_MINOR_VERSION)
- AC_SUBST(LIBVA_LT_VERSION)
- AC_SUBST(LIBVA_LT_LDFLAGS)
- 
-+AC_ARG_ENABLE(glx,
-+              [AC_HELP_STRING([--enable-glx],
-+                              [build with OpenGL for X11 support])],
-+              [], [enable_glx=yes])
-+
- AC_ARG_ENABLE(dummy-driver,
-               [AC_HELP_STRING([--enable-dummy-driver],
-                               [build dummy video driver])],
-@@ -100,6 +132,23 @@ if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdr
- AC_DEFINE_UNQUOTED([ATTRIBUTE_HIDDEN], [$ATTRIBUTE_HIDDEN],
-     [Defined to __attribute__((visibility("hidden"))) when available])
- 
-+# Check for OpenGL (X11)
-+USE_GLX="no"
-+GL_DEPS_CFLAGS=""
-+GL_DEPS_LIBS=""
-+
-+if test x$enable_glx = xyes; then
-+    AC_CHECK_HEADERS([GL/gl.h])
-+    AC_CHECK_HEADERS([GL/glx.h])
-+    AC_CHECK_LIB(GL, glXCreateContext, [
-+        USE_GLX="yes"
-+        GL_DEPS_LIBS="-lX11 -lGL"
-+    ])
-+fi
-+AC_SUBST(GL_DEPS_CFLAGS)
-+AC_SUBST(GL_DEPS_LIBS)
-+AM_CONDITIONAL(USE_GLX, test "$USE_GLX" = "yes")
-+
- # We only need the headers, we don't link against the DRM libraries
- LIBVA_CFLAGS="$DRM_CFLAGS"
- AC_SUBST(LIBVA_CFLAGS)
-@@ -119,6 +192,7 @@ AC_OUTPUT([
- 	src/Makefile
- 	src/va_version.h
- 	src/x11/Makefile
-+	src/glx/Makefile
- 	dummy_drv_video/Makefile
- 	i965_drv_video/Makefile
- 	i965_drv_video/shaders/Makefile
-@@ -128,5 +202,6 @@ AC_OUTPUT([
- 	test/Makefile
- 	libva.pc
- 	libva-x11.pc
-+	libva-glx.pc
- ])
- 
-diff --git a/libva-glx.pc.in b/libva-glx.pc.in
-new file mode 100644
-index 0000000..20ba20a
---- /dev/null
-+++ b/libva-glx.pc.in
-@@ -0,0 +1,12 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+display=glx
-+
-+Name: libva-${display}
-+Description: Userspace Video Acceleration (VA) ${display} interface
-+Requires: libva
-+Version: @PACKAGE_VERSION@
-+Libs: -L${libdir} -lva-${display}
-+Cflags: -I${includedir}
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 2f4210a..e50a15f 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -28,9 +28,17 @@ INCLUDES = \
- LDADD = \
- 	$(LIBVA_LT_LDFLAGS)
- 
--lib_LTLIBRARIES = \
--	libva.la \
--	libva-x11.la
-+libva_x11_backend	= libva-x11.la
-+libva_x11_backenddir	= x11
-+if USE_GLX
-+libva_glx_backend	= libva-glx.la
-+libva_glx_backenddir	= glx
-+else
-+libva_glx_backend	=
-+libva_glx_backenddir	=
-+endif
-+
-+lib_LTLIBRARIES = libva.la $(libva_x11_backend) $(libva_glx_backend)
- 
- libva_ladir = $(libdir)
- libva_la_LDFLAGS = $(LDADD) -no-undefined
-@@ -41,7 +49,14 @@ libva_x11_la_LIBADD  = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS
- libva_x11_la_LDFLAGS = $(LDADD)
- libva_x11_la_DEPENDENCIES = $(libvacorelib) x11/libva_x11.la
- 
--SUBDIRS = x11
-+libva_glx_la_SOURCES = 
-+libva_glx_la_LIBADD  = $(libvacorelib) glx/libva_glx.la libva-x11.la $(GL_DEPS_LIBS) -ldl
-+libva_glx_la_LDFLAGS = $(LDADD)
-+libva_glx_la_DEPENDENCIES = $(libvacorelib) glx/libva_glx.la libva-x11.la
-+
-+SUBDIRS = $(libva_x11_backenddir) $(libva_glx_backenddir)
-+
-+DIST_SUBDIRS = x11 glx
- 
- libva_la_SOURCES = va.c
- 
-diff --git a/src/va_backend.h b/src/va_backend.h
-index 6f858f5..8f722a3 100644
---- a/src/va_backend.h
-+++ b/src/va_backend.h
-@@ -32,9 +32,11 @@
- #ifdef IN_LIBVA
- #include "va.h"
- #include "x11/va_x11.h"
-+#include "glx/va_backend_glx.h"
- #else
- #include <va/va.h>
- #include <va/va_x11.h>
-+#include <va/va_backend_glx.h>
- #endif
- 
- #include <stdlib.h>
-@@ -372,6 +374,9 @@ struct VADriverVTable
-                 unsigned int *chroma_v_offset,
-                 void **buffer
-         );
-+
-+        /* Optional: GLX support hooks */
-+        struct VADriverVTableGLX glx;
- };
- 
- struct VADriverContext
-@@ -394,6 +399,7 @@ struct VADriverContext
-     void *handle;			/* dlopen handle */
-     
-     void *dri_state;
-+    void *glx;                          /* opaque for GLX code */
- };
- 
- struct VADisplayContext
-@@ -413,6 +420,8 @@ struct VADisplayContext
- 	VADisplayContextP ctx,
- 	char **driver_name
-     );
-+
-+    void *opaque;                       /* opaque for display extensions (e.g. GLX) */
- };
- 
- typedef VAStatus (*VADriverInit) (
-diff --git a/src/x11/va_x11.c b/src/x11/va_x11.c
-index 9de904e..b8c60fa 100644
---- a/src/x11/va_x11.c
-+++ b/src/x11/va_x11.c
-@@ -243,6 +243,7 @@ VADisplay vaGetDisplay (
- 	  pDisplayContext->vaIsValid       = va_DisplayContextIsValid;
- 	  pDisplayContext->vaDestroy       = va_DisplayContextDestroy;
- 	  pDisplayContext->vaGetDriverName = va_DisplayContextGetDriverName;
-+          pDisplayContext->opaque          = NULL;
- 	  pDisplayContexts                 = pDisplayContext;
- 	  pDriverContext->dri_state 	   = dri_state;
- 	  dpy                              = (VADisplay)pDisplayContext;
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/322_libva_glx.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/322_libva_glx.patch
deleted file mode 100644
index ccd9ae0..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/322_libva_glx.patch
+++ /dev/null
@@ -1,2024 +0,0 @@
-commit 8e76000abce070da5f1c902a6290f4ccaa3eccc8
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Sep 18 15:51:08 2009 +0000
-
-    Add C++ guards.
-
-commit bf1ae22ef324fbb347f5369e1ba307e847553fe8
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Sep 18 15:49:55 2009 +0000
-
-    Fix check for GL extensions.
-
-commit df0953a951d8a2e5e4b0a28a95ae0f1ac735726e
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 8 12:25:14 2009 +0000
-
-    Add generic VA/GLX implementation with TFP and FBO.
-
-commit f640b1cf9eab4e5d478239b608ed0d8b68f6c5f6
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Tue Sep 8 12:15:35 2009 +0000
-
-    Move GLX VTable to a new file.
-
-commit 70d9cb6d1aa2fc2dde6646f3b692433e0d93d431
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Aug 28 11:15:51 2009 +0000
-
-    Add OpenGL extensions (v3).
-
-diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
-new file mode 100644
-index 0000000..7783d8c
---- /dev/null
-+++ b/src/glx/Makefile.am
-@@ -0,0 +1,41 @@
-+# Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a
-+# copy of this software and associated documentation files (the
-+# "Software"), to deal in the Software without restriction, including
-+# without limitation the rights to use, copy, modify, merge, publish,
-+# distribute, sub license, and/or sell copies of the Software, and to
-+# permit persons to whom the Software is furnished to do so, subject to
-+# the following conditions:
-+# 
-+# The above copyright notice and this permission notice (including the
-+# next paragraph) shall be included in all copies or substantial portions
-+# of the Software.
-+# 
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+
-+AM_CFLAGS = -DLINUX -DIN_LIBVA -I$(top_srcdir)/src -I$(top_srcdir)/src/x11
-+
-+source_c = \
-+	va_glx.c		\
-+	va_glx_impl.c
-+
-+source_h = \
-+	va_glx.h		\
-+	va_backend_glx.h
-+
-+source_h_priv = \
-+	va_glx_impl.h		\
-+	va_glx_private.h
-+
-+noinst_LTLIBRARIES	 = libva_glx.la
-+libva_glxincludedir	 = ${includedir}/va
-+libva_glxinclude_HEADERS = $(source_h)
-+libva_glx_la_SOURCES	 = $(source_c)
-+noinst_HEADERS		 = $(source_h_priv)
-diff --git a/src/glx/va_backend_glx.h b/src/glx/va_backend_glx.h
-new file mode 100644
-index 0000000..3885d30
---- /dev/null
-+++ b/src/glx/va_backend_glx.h
-@@ -0,0 +1,87 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef VA_BACKEND_GLX_H
-+#define VA_BACKEND_GLX_H
-+
-+struct VADriverContext;
-+
-+struct VADriverVTableGLX {
-+    /* Optional: create a surface used for display to OpenGL */
-+    VAStatus (*vaCreateSurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        unsigned int            gl_target,
-+        unsigned int            gl_texture,
-+        void                  **gl_surface
-+    );
-+
-+    /* Optional: destroy a VA/GLX surface */
-+    VAStatus (*vaDestroySurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface
-+    );
-+
-+    /* Optional: associate a VA surface to a VA/GLX surface */
-+    VAStatus (*vaAssociateSurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface,
-+        VASurfaceID             surface,
-+        unsigned int            flags
-+    );
-+
-+    /* Optional: deassociate a VA surface from a VA/GLX surface */
-+    VAStatus (*vaDeassociateSurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface
-+    );
-+
-+    /* Optional: synchronize a VA/GLX surface */
-+    VAStatus (*vaSyncSurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface
-+    );
-+
-+    /* Optional: prepare VA/GLX surface for rendering */
-+    VAStatus (*vaBeginRenderSurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface
-+    );
-+
-+    /* Optional: notify the server that the VA/GLX surface is no
-+       longer used for rendering */
-+    VAStatus (*vaEndRenderSurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface
-+    );
-+
-+    /* Optional: copy a VA surface to a VA/GLX surface */
-+    VAStatus (*vaCopySurfaceGLX)(
-+        struct VADriverContext *ctx,
-+        void                   *gl_surface,
-+        VASurfaceID             surface,
-+        unsigned int            flags
-+    );
-+};
-+
-+#endif /* VA_BACKEND_GLX_H */
-diff --git a/src/glx/va_glx.c b/src/glx/va_glx.c
-new file mode 100644
-index 0000000..f6ec2c3
---- /dev/null
-+++ b/src/glx/va_glx.c
-@@ -0,0 +1,295 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#include "va_glx_private.h"
-+#include "va_glx_impl.h"
-+
-+#define INIT_CONTEXT(ctx, dpy) do {                             \
-+        if (!vaDisplayIsValid(dpy))                             \
-+            return VA_STATUS_ERROR_INVALID_DISPLAY;             \
-+                                                                \
-+        ctx = ((VADisplayContextP)(dpy))->pDriverContext;       \
-+        if (!(ctx))                                             \
-+            return VA_STATUS_ERROR_INVALID_DISPLAY;             \
-+                                                                \
-+        VAStatus status = va_glx_init_context(ctx);             \
-+        if (status != VA_STATUS_SUCCESS)                        \
-+            return status;                                      \
-+    } while (0)
-+
-+#define INIT_SURFACE(surface, surface_arg) do {                 \
-+        surface = (VASurfaceGLXP)(surface_arg);                 \
-+        if (!vaSurfaceIsValid(surface))                         \
-+            return VA_STATUS_ERROR_INVALID_SURFACE;             \
-+    } while (0)
-+
-+#define INVOKE(ctx, func, args) do {                            \
-+        VADriverVTableGLXP vtable;                              \
-+        vtable = &VA_DRIVER_CONTEXT_GLX(ctx)->vtable;           \
-+        if (!vtable->va##func##GLX)                             \
-+            return VA_STATUS_ERROR_UNIMPLEMENTED;               \
-+        status = vtable->va##func##GLX args;                    \
-+    } while (0)
-+
-+// Check VADisplay is valid
-+static inline int vaDisplayIsValid(VADisplay dpy)
-+{
-+    VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
-+
-+    return (pDisplayContext &&
-+            pDisplayContext->vaIsValid &&
-+            pDisplayContext->vaIsValid(pDisplayContext));
-+}
-+
-+// Check VASurfaceGLX is valid
-+static inline int vaSurfaceIsValid(VASurfaceGLXP pSurfaceGLX)
-+{
-+    return pSurfaceGLX && pSurfaceGLX->magic == VA_SURFACE_GLX_MAGIC;
-+}
-+
-+// Destroy VA/GLX display context
-+static void va_DisplayContextDestroy(VADisplayContextP pDisplayContext)
-+{
-+    VADisplayContextGLXP pDisplayContextGLX;
-+    VADriverContextP     pDriverContext;
-+    VADriverContextGLXP  pDriverContextGLX;
-+
-+    if (!pDisplayContext)
-+        return;
-+
-+    pDriverContext     = pDisplayContext->pDriverContext;
-+    pDriverContextGLX  = pDriverContext->glx;
-+    if (pDriverContextGLX) {
-+        free(pDriverContextGLX);
-+        pDriverContext->glx = NULL;
-+    }
-+
-+    pDisplayContextGLX = pDisplayContext->opaque;
-+    if (pDisplayContextGLX) {
-+        if (pDisplayContextGLX->vaDestroy)
-+            pDisplayContextGLX->vaDestroy(pDisplayContext);
-+        free(pDisplayContextGLX);
-+        pDisplayContext->opaque = NULL;
-+    }
-+}
-+
-+// Return a suitable VADisplay for VA API
-+VADisplay vaGetDisplayGLX(Display *native_dpy)
-+{
-+    VADisplay            dpy                = NULL;
-+    VADisplayContextP    pDisplayContext    = NULL;
-+    VADisplayContextGLXP pDisplayContextGLX = NULL;
-+    VADriverContextP     pDriverContext;
-+    VADriverContextGLXP  pDriverContextGLX  = NULL;
-+
-+    dpy = vaGetDisplay(native_dpy);
-+    if (!dpy)
-+        return NULL;
-+    pDisplayContext = (VADisplayContextP)dpy;
-+    pDriverContext  = pDisplayContext->pDriverContext;
-+
-+    pDisplayContextGLX = calloc(1, sizeof(*pDisplayContextGLX));
-+    if (!pDisplayContextGLX)
-+        goto error;
-+
-+    pDriverContextGLX = calloc(1, sizeof(*pDriverContextGLX));
-+    if (!pDriverContextGLX)
-+        goto error;
-+
-+    pDisplayContextGLX->vaDestroy = pDisplayContext->vaDestroy;
-+    pDisplayContext->vaDestroy    = va_DisplayContextDestroy;
-+    pDisplayContext->opaque       = pDisplayContextGLX;
-+    pDriverContext->glx           = pDriverContextGLX;
-+    return dpy;
-+
-+error:
-+    free(pDriverContextGLX);
-+    free(pDisplayContextGLX);
-+    pDisplayContext->vaDestroy(pDisplayContext);
-+    return NULL;
-+}
-+
-+// Create a surface used for display to OpenGL
-+VAStatus vaCreateSurfaceGLX(
-+    VADisplay dpy,
-+    GLenum    target,
-+    GLuint    texture,
-+    void    **gl_surface
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    /* Make sure it is a valid GL texture object */
-+    if (!glIsTexture(texture))
-+        return VA_STATUS_ERROR_INVALID_PARAMETER;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+
-+    pSurfaceGLX = va_glx_create_surface(ctx, target, texture);
-+    if (!pSurfaceGLX)
-+        return VA_STATUS_ERROR_ALLOCATION_FAILED;
-+
-+    INVOKE(ctx, CreateSurface, (ctx, target, texture, &pSurfaceGLX->priv));
-+
-+    if (status != VA_STATUS_SUCCESS)
-+        va_glx_destroy_surface(ctx, &pSurfaceGLX);
-+
-+    *gl_surface = pSurfaceGLX;
-+    return status;
-+}
-+
-+// Destroy a VA/GLX surface
-+VAStatus vaDestroySurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, DestroySurface, (ctx, pSurfaceGLX));
-+
-+    free(pSurfaceGLX);
-+    return status;
-+}
-+
-+// Associate a VA surface to a VA/GLX surface
-+VAStatus vaAssociateSurfaceGLX(
-+    VADisplay    dpy,
-+    void        *gl_surface,
-+    VASurfaceID  surface,
-+    unsigned int flags
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, AssociateSurface, (ctx, pSurfaceGLX, surface, flags));
-+
-+    if (status == VA_STATUS_SUCCESS)
-+        pSurfaceGLX->surface = surface;
-+
-+    return status;
-+}
-+
-+// Deassociate a VA surface from a VA/GLX surface
-+VAStatus vaDeassociateSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, DeassociateSurface, (ctx, pSurfaceGLX));
-+
-+    if (status == VA_STATUS_SUCCESS)
-+        pSurfaceGLX->surface = VA_INVALID_SURFACE;
-+
-+    return status;
-+}
-+
-+// Synchronize a VA/GLX surface
-+VAStatus vaSyncSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, SyncSurface, (ctx, pSurfaceGLX));
-+    return status;
-+}
-+
-+// Prepare VA/GLX surface for rendering
-+VAStatus vaBeginRenderSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, BeginRenderSurface, (ctx, pSurfaceGLX));
-+    return status;
-+}
-+
-+// Notify the server that the VA/GLX surface is no longer used for rendering
-+VAStatus vaEndRenderSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, EndRenderSurface, (ctx, pSurfaceGLX));
-+    return status;
-+}
-+
-+// Copy a VA surface to a VA/GLX surface
-+VAStatus vaCopySurfaceGLX(
-+    VADisplay    dpy,
-+    void        *gl_surface,
-+    VASurfaceID  surface,
-+    unsigned int flags
-+)
-+{
-+    VADriverContextP ctx;
-+    VASurfaceGLXP pSurfaceGLX;
-+    VAStatus status;
-+
-+    INIT_CONTEXT(ctx, dpy);
-+    INIT_SURFACE(pSurfaceGLX, gl_surface);
-+
-+    INVOKE(ctx, CopySurface, (ctx, pSurfaceGLX, surface, flags));
-+    return status;
-+}
-diff --git a/src/glx/va_glx.h b/src/glx/va_glx.h
-new file mode 100644
-index 0000000..183ef3a
---- /dev/null
-+++ b/src/glx/va_glx.h
-@@ -0,0 +1,217 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef VA_GLX_H
-+#define VA_GLX_H
-+
-+#ifdef IN_LIBVA
-+#include "va.h"
-+#else
-+#include <va/va.h>
-+#endif
-+#include <GL/glx.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/**
-+ * Return a suitable VADisplay for VA API
-+ *
-+ * @param[in] dpy the X11 display
-+ * @return a VADisplay
-+ */
-+VADisplay vaGetDisplayGLX(
-+    Display *dpy
-+);
-+
-+/**
-+ * Create a surface used for display to OpenGL
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  target     the GL target to which the texture needs to be bound
-+ * @param[in]  texture    the GL texture
-+ * @param[out] gl_surface the VA/GLX surface
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaCreateSurfaceGLX(
-+    VADisplay dpy,
-+    GLenum    target,
-+    GLuint    texture,
-+    void    **gl_surface
-+);
-+
-+/**
-+ * Destroy a VA/GLX surface
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA surface
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaDestroySurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+);
-+
-+/**
-+ * Associate a VA surface to a VA/GLX surface
-+ *
-+ * The association is live until vaDeassociateSurfaceGLX(),
-+ * vaCopySurfaceGLX() or the next call to vaBeginPicture() with the
-+ * specificed VA surface.
-+ * 
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA/GLX surface
-+ * @param[in]  surface    the VA surface
-+ * @param[in]  flags      the PutSurface flags
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaAssociateSurfaceGLX(
-+    VADisplay    dpy,
-+    void        *gl_surface,
-+    VASurfaceID  surface,
-+    unsigned int flags
-+);
-+
-+/**
-+ * Deassociate a VA surface from a VA/GLX surface
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA surface
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaDeassociateSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+);
-+
-+/**
-+ * Synchronize a VA/GLX surface
-+ *
-+ * This function blocks until all pending operations on the VA/GLX
-+ * surface have been completed.
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA surface
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaSyncSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+);
-+
-+/**
-+ * Prepare VA/GLX surface for rendering
-+ *
-+ * This function performs an implicit vaSyncSurfaceGLX().
-+ *
-+ * Implementations using the GLX texture-from-pixmap extension will
-+ * generally call glXBindTexImage() here.
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA surface
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaBeginRenderSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+);
-+
-+/**
-+ * Notify the server that the VA/GLX surface is no longer used for
-+ * rendering
-+ *
-+ * Implementations using the GLX texture-from-pixmap extension will
-+ * generally call glXReleaseTexImage() here.
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA surface
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaEndRenderSurfaceGLX(
-+    VADisplay dpy,
-+    void     *gl_surface
-+);
-+
-+/**
-+ * Copy a VA surface to a VA/GLX surface
-+ *
-+ * This function kills any association that was previously made with
-+ * vaAssociateSurfaceGLX() and will not return until the copy is
-+ * completed.
-+ *
-+ * Upon successful return, the underlying GL texture will contain the
-+ * complete pixels and no call to vaBeginRenderSurfaceGLX() or
-+ * vaEndRenderSurfaceGLX() is required.
-+ *
-+ * The application shall maintain the live GLX context itself.
-+ * Implementations are free to use glXGetCurrentContext() and
-+ * glXGetCurrentDrawable() functions for internal purposes.
-+ *
-+ * @param[in]  dpy        the VA display
-+ * @param[in]  gl_surface the VA/GLX destination surface
-+ * @param[in]  surface    the VA source surface
-+ * @param[in]  flags      the PutSurface flags
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus vaCopySurfaceGLX(
-+    VADisplay    dpy,
-+    void        *gl_surface,
-+    VASurfaceID  surface,
-+    unsigned int flags
-+);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif /* VA_GLX_H */
-diff --git a/src/glx/va_glx_impl.c b/src/glx/va_glx_impl.c
-new file mode 100644
-index 0000000..d4f9c1d
---- /dev/null
-+++ b/src/glx/va_glx_impl.c
-@@ -0,0 +1,1168 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#define _GNU_SOURCE 1
-+#include "va_glx_private.h"
-+#include "va_glx_impl.h"
-+#include <stdio.h>
-+#include <stdarg.h>
-+#include <string.h>
-+#include <assert.h>
-+#include <dlfcn.h>
-+
-+static void va_glx_error_message(const char *format, ...)
-+{
-+    va_list args;
-+    va_start(args, format);
-+    fprintf(stderr, "[%s] ", PACKAGE_NAME);
-+    vfprintf(stderr, format, args);
-+    va_end(args);
-+}
-+
-+// X error trap
-+static int x11_error_code = 0;
-+static int (*old_error_handler)(Display *, XErrorEvent *);
-+
-+static int error_handler(Display *dpy, XErrorEvent *error)
-+{
-+    x11_error_code = error->error_code;
-+    return 0;
-+}
-+
-+static void x11_trap_errors(void)
-+{
-+    x11_error_code    = 0;
-+    old_error_handler = XSetErrorHandler(error_handler);
-+}
-+
-+static int x11_untrap_errors(void)
-+{
-+    XSetErrorHandler(old_error_handler);
-+    return x11_error_code;
-+}
-+
-+// Returns a string representation of an OpenGL error
-+static const char *gl_get_error_string(GLenum error)
-+{
-+    static const struct {
-+        GLenum val;
-+        const char *str;
-+    }
-+    gl_errors[] = {
-+        { GL_NO_ERROR,          "no error" },
-+        { GL_INVALID_ENUM,      "invalid enumerant" },
-+        { GL_INVALID_VALUE,     "invalid value" },
-+        { GL_INVALID_OPERATION, "invalid operation" },
-+        { GL_STACK_OVERFLOW,    "stack overflow" },
-+        { GL_STACK_UNDERFLOW,   "stack underflow" },
-+        { GL_OUT_OF_MEMORY,     "out of memory" },
-+#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT
-+        { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "invalid framebuffer operation" },
-+#endif
-+        { ~0, NULL }
-+    };
-+
-+    int i;
-+    for (i = 0; gl_errors[i].str; i++) {
-+        if (gl_errors[i].val == error)
-+            return gl_errors[i].str;
-+    }
-+    return "unknown";
-+}
-+
-+static inline int gl_do_check_error(int report)
-+{
-+    GLenum error;
-+    int is_error = 0;
-+    while ((error = glGetError()) != GL_NO_ERROR) {
-+        if (report)
-+            va_glx_error_message("glError: %s caught\n",
-+                                 gl_get_error_string(error));
-+        is_error = 1;
-+    }
-+    return is_error;
-+}
-+
-+static inline void gl_purge_errors(void)
-+{
-+    gl_do_check_error(0);
-+}
-+
-+static inline int gl_check_error(void)
-+{
-+    return gl_do_check_error(1);
-+}
-+
-+// glGetFloatv() wrapper
-+static int gl_get_current_color(float color[4])
-+{
-+    gl_purge_errors();
-+    glGetFloatv(GL_CURRENT_COLOR, color);
-+    if (gl_check_error())
-+        return -1;
-+    return 0;
-+}
-+
-+// glGetIntegerv() wrapper
-+static int gl_get_param(GLenum param, unsigned int *pval)
-+{
-+    GLint val;
-+
-+    gl_purge_errors();
-+    glGetIntegerv(param, &val);
-+    if (gl_check_error())
-+        return -1;
-+    if (pval)
-+        *pval = val;
-+    return 0;
-+}
-+
-+// glGetTexLevelParameteriv() wrapper
-+static int gl_get_texture_param(GLenum param, unsigned int *pval)
-+{
-+    GLint val;
-+
-+    gl_purge_errors();
-+    glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, param, &val);
-+    if (gl_check_error())
-+        return -1;
-+    if (pval)
-+        *pval = val;
-+    return 0;
-+}
-+
-+// Returns the OpenGL VTable
-+static inline VAOpenGLVTableP gl_get_vtable(VADriverContextP ctx)
-+{
-+    return &VA_DRIVER_CONTEXT_GLX(ctx)->gl_vtable;
-+}
-+
-+// Lookup for a GLX function
-+typedef void (*GLFuncPtr)(void);
-+typedef GLFuncPtr (*GLXGetProcAddressProc)(const char *);
-+
-+static GLFuncPtr get_proc_address_default(const char *name)
-+{
-+    return NULL;
-+}
-+
-+static GLXGetProcAddressProc get_proc_address_func(void)
-+{
-+    GLXGetProcAddressProc get_proc_func;
-+
-+    dlerror();
-+    get_proc_func = (GLXGetProcAddressProc)
-+        dlsym(RTLD_DEFAULT, "glXGetProcAddress");
-+    if (dlerror() == NULL)
-+        return get_proc_func;
-+
-+    get_proc_func = (GLXGetProcAddressProc)
-+        dlsym(RTLD_DEFAULT, "glXGetProcAddressARB");
-+    if (dlerror() == NULL)
-+        return get_proc_func;
-+
-+    return get_proc_address_default;
-+}
-+
-+static inline GLFuncPtr get_proc_address(const char *name)
-+{
-+    static GLXGetProcAddressProc get_proc_func = NULL;
-+    if (get_proc_func == NULL)
-+        get_proc_func = get_proc_address_func();
-+    return get_proc_func(name);
-+}
-+
-+// Check for GLX extensions (TFP, FBO)
-+static int check_extension(const char *name, const char *ext)
-+{
-+    const char *end;
-+    int name_len, n;
-+
-+    if (name == NULL || ext == NULL)
-+        return 0;
-+
-+    end = ext + strlen(ext);
-+    name_len = strlen(name);
-+    while (ext < end) {
-+        n = strcspn(ext, " ");
-+        if (n == name_len && strncmp(name, ext, n) == 0)
-+            return 1;
-+        ext += (n + 1);
-+    }
-+    return 0;
-+}
-+
-+static int check_tfp_extensions(VADriverContextP ctx)
-+{
-+    const char *gl_extensions;
-+    const char *glx_extensions;
-+
-+    gl_extensions = (const char *)glGetString(GL_EXTENSIONS);
-+    if (!check_extension("GL_ARB_texture_non_power_of_two", gl_extensions))
-+        return 0;
-+
-+    glx_extensions = glXQueryExtensionsString(ctx->x11_dpy, ctx->x11_screen);
-+    if (!check_extension("GLX_EXT_texture_from_pixmap", glx_extensions))
-+        return 0;
-+    return 1;
-+}
-+
-+static int check_fbo_extensions(VADriverContextP ctx)
-+{
-+    const char *gl_extensions;
-+
-+    gl_extensions = (const char *)glGetString(GL_EXTENSIONS);
-+    if (!check_extension("GL_ARB_framebuffer_object", gl_extensions))
-+        return 0;
-+    if (!check_extension("GL_EXT_framebuffer_object", gl_extensions))
-+        return 0;
-+    return 1;
-+}
-+
-+// Load GLX extensions
-+static int load_tfp_extensions(VADriverContextP ctx)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+
-+    pOpenGLVTable->glx_bind_tex_image = (PFNGLXBINDTEXIMAGEEXTPROC)
-+        get_proc_address("glXBindTexImageEXT");
-+    if (pOpenGLVTable->glx_bind_tex_image == NULL)
-+        return 0;
-+    pOpenGLVTable->glx_release_tex_image = (PFNGLXRELEASETEXIMAGEEXTPROC)
-+        get_proc_address("glXReleaseTexImageEXT");
-+    if (pOpenGLVTable->glx_release_tex_image == NULL)
-+        return 0;
-+    return 1;
-+}
-+
-+static int load_fbo_extensions(VADriverContextP ctx)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+
-+    pOpenGLVTable->gl_gen_framebuffers = (PFNGLGENFRAMEBUFFERSEXTPROC)
-+        get_proc_address("glGenFramebuffersEXT");
-+    if (pOpenGLVTable->gl_gen_framebuffers == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_delete_framebuffers = (PFNGLDELETEFRAMEBUFFERSEXTPROC)
-+        get_proc_address("glDeleteFramebuffersEXT");
-+    if (pOpenGLVTable->gl_delete_framebuffers == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_bind_framebuffer = (PFNGLBINDFRAMEBUFFEREXTPROC)
-+        get_proc_address("glBindFramebufferEXT");
-+    if (pOpenGLVTable->gl_bind_framebuffer == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_gen_renderbuffers = (PFNGLGENRENDERBUFFERSEXTPROC)
-+        get_proc_address("glGenRenderbuffersEXT");
-+    if (pOpenGLVTable->gl_gen_renderbuffers == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_delete_renderbuffers = (PFNGLDELETERENDERBUFFERSEXTPROC)
-+        get_proc_address("glDeleteRenderbuffersEXT");
-+    if (pOpenGLVTable->gl_delete_renderbuffers == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_bind_renderbuffer = (PFNGLBINDRENDERBUFFEREXTPROC)
-+        get_proc_address("glBindRenderbufferEXT");
-+    if (pOpenGLVTable->gl_bind_renderbuffer == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_renderbuffer_storage = (PFNGLRENDERBUFFERSTORAGEEXTPROC)
-+        get_proc_address("glRenderbufferStorageEXT");
-+    if (pOpenGLVTable->gl_renderbuffer_storage == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_framebuffer_renderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)
-+        get_proc_address("glFramebufferRenderbufferEXT");
-+    if (pOpenGLVTable->gl_framebuffer_renderbuffer == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_framebuffer_texture_2d = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)
-+        get_proc_address("glFramebufferTexture2DEXT");
-+    if (pOpenGLVTable->gl_framebuffer_texture_2d == NULL)
-+        return 0;
-+    pOpenGLVTable->gl_check_framebuffer_status = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)
-+        get_proc_address("glCheckFramebufferStatusEXT");
-+    if (pOpenGLVTable->gl_check_framebuffer_status == NULL)
-+        return 0;
-+    return 1;
-+}
-+
-+
-+/* ========================================================================= */
-+/* === VA/GLX helpers                                                    === */
-+/* ========================================================================= */
-+
-+// OpenGL texture state
-+typedef struct OpenGLTextureState *OpenGLTextureStateP;
-+
-+struct OpenGLTextureState {
-+    int    was_enabled;
-+    int    was_bound;
-+    GLenum target;
-+    GLuint old_texture;
-+};
-+
-+// Bind texture, preserve previous texture state
-+static int bind_texture(OpenGLTextureStateP ts, GLenum target, GLuint texture)
-+{
-+    ts->target      = target;
-+    ts->old_texture = 0;
-+    ts->was_bound   = 0;
-+    ts->was_enabled = glIsEnabled(target);
-+    if (!ts->was_enabled)
-+        glEnable(target);
-+
-+    GLenum texture_binding;
-+    switch (target) {
-+    case GL_TEXTURE_1D:
-+        texture_binding = GL_TEXTURE_BINDING_1D;
-+        break;
-+    case GL_TEXTURE_2D:
-+        texture_binding = GL_TEXTURE_BINDING_2D;
-+        break;
-+    case GL_TEXTURE_3D:
-+        texture_binding = GL_TEXTURE_BINDING_3D;
-+        break;
-+    case GL_TEXTURE_RECTANGLE_ARB:
-+        texture_binding = GL_TEXTURE_BINDING_RECTANGLE_ARB;
-+        break;
-+    default:
-+        assert(!target);
-+        return -1;
-+    }
-+
-+    if (ts->was_enabled && gl_get_param(texture_binding, &ts->old_texture) < 0)
-+        return -1;
-+
-+    ts->was_bound = texture == ts->old_texture;
-+    if (!ts->was_bound) {
-+        gl_purge_errors();
-+        glBindTexture(target, texture);
-+        if (gl_check_error())
-+            return -1;
-+    }
-+    return 0;
-+}
-+
-+// Unbind texture, restore previous texture state
-+static void unbind_texture(OpenGLTextureStateP ts)
-+{
-+    if (!ts->was_bound && ts->old_texture)
-+        glBindTexture(ts->target, ts->old_texture);
-+    if (!ts->was_enabled)
-+        glDisable(ts->target);
-+}
-+
-+// Create Pixmaps for GLX texture-from-pixmap extension
-+static int create_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    const unsigned int     width      = pSurfaceGLX->width;
-+    const unsigned int     height     = pSurfaceGLX->height;
-+    Pixmap                 pixmap     = None;
-+    GLXFBConfig           *fbconfig   = NULL;
-+    GLXPixmap              glx_pixmap = None;
-+    Window                 root_window;
-+    XWindowAttributes      wattr;
-+    int                   *attrib;
-+    int                    n_fbconfig_attribs, x, y, status;
-+    unsigned int           border_width, depth, dummy;
-+
-+    root_window = RootWindow(ctx->x11_dpy, ctx->x11_screen);
-+    XGetWindowAttributes(ctx->x11_dpy, root_window, &wattr);
-+    pixmap = XCreatePixmap(ctx->x11_dpy, root_window,
-+                           width, height, wattr.depth);
-+    if (!pixmap)
-+        return -1;
-+    pSurfaceGLX->pixmap = pixmap;
-+
-+    x11_trap_errors();
-+    status = XGetGeometry(ctx->x11_dpy,
-+                          (Drawable)pixmap,
-+                          &root_window,
-+                          &x,
-+                          &y,
-+                          &dummy,
-+                          &dummy,
-+                          &border_width,
-+                          &depth);
-+    if (x11_untrap_errors() != 0 || status == 0)
-+        return -1;
-+    if (depth != 24 && depth != 32)
-+        return -1;
-+
-+    int fbconfig_attribs[32] = {
-+        GLX_DRAWABLE_TYPE,      GLX_PIXMAP_BIT,
-+        GLX_DOUBLEBUFFER,       GL_TRUE,
-+        GLX_RENDER_TYPE,        GLX_RGBA_BIT,
-+        GLX_X_RENDERABLE,       GL_TRUE,
-+        GLX_Y_INVERTED_EXT,     GL_TRUE,
-+        GLX_RED_SIZE,           8,
-+        GLX_GREEN_SIZE,         8,
-+        GLX_BLUE_SIZE,          8,
-+        GL_NONE,
-+    };
-+    for (attrib = fbconfig_attribs; *attrib != GL_NONE; attrib += 2)
-+        ;
-+    *attrib++ = GLX_DEPTH_SIZE;                         *attrib++ = depth;
-+    if (depth == 32) {
-+        *attrib++ = GLX_ALPHA_SIZE;                     *attrib++ = 8;
-+        *attrib++ = GLX_BIND_TO_TEXTURE_RGBA_EXT;       *attrib++ = GL_TRUE;
-+    }
-+    else {
-+        *attrib++ = GLX_BIND_TO_TEXTURE_RGB_EXT;        *attrib++ = GL_TRUE;
-+    }
-+    *attrib++ = GL_NONE;
-+
-+    fbconfig = glXChooseFBConfig(ctx->x11_dpy, ctx->x11_screen, fbconfig_attribs, &n_fbconfig_attribs);
-+    if (fbconfig == NULL)
-+        return -1;
-+
-+    int pixmap_attribs[10] = {
-+        GLX_TEXTURE_TARGET_EXT, GLX_TEXTURE_2D_EXT,
-+        GLX_MIPMAP_TEXTURE_EXT, GL_FALSE,
-+        GL_NONE,
-+    };
-+    for (attrib = pixmap_attribs; *attrib != GL_NONE; attrib += 2)
-+        ;
-+    *attrib++ = GLX_TEXTURE_FORMAT_EXT;
-+    if (depth == 32)
-+        *attrib++ = GLX_TEXTURE_FORMAT_RGBA_EXT;
-+    else
-+        *attrib++ = GLX_TEXTURE_FORMAT_RGB_EXT;
-+    *attrib++ = GL_NONE;
-+
-+    x11_trap_errors();
-+    glx_pixmap = glXCreatePixmap(ctx->x11_dpy,
-+                                 fbconfig[0],
-+                                 pixmap,
-+                                 pixmap_attribs);
-+    free(fbconfig);
-+    if (x11_untrap_errors() != 0)
-+        return -1;
-+    pSurfaceGLX->glx_pixmap = glx_pixmap;
-+    return 0;
-+}
-+
-+// Destroy Pixmaps used for TFP
-+static void destroy_tfp_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    if (pSurfaceGLX->glx_pixmap) {
-+        glXDestroyPixmap(ctx->x11_dpy, pSurfaceGLX->glx_pixmap);
-+        pSurfaceGLX->glx_pixmap = None;
-+    }
-+
-+    if (pSurfaceGLX->pixmap) {
-+        XFreePixmap(ctx->x11_dpy, pSurfaceGLX->pixmap);
-+        pSurfaceGLX->pixmap = None;
-+    }
-+}
-+
-+// Bind GLX Pixmap to texture
-+static int bind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+
-+    if (pSurfaceGLX->is_bound)
-+        return 0;
-+
-+    x11_trap_errors();
-+    pOpenGLVTable->glx_bind_tex_image(ctx->x11_dpy, pSurfaceGLX->glx_pixmap,
-+                                      GLX_FRONT_LEFT_EXT, NULL);
-+    XSync(ctx->x11_dpy, False);
-+    if (x11_untrap_errors() != 0) {
-+        va_glx_error_message("failed to bind pixmap\n");
-+        return -1;
-+    }
-+
-+    pSurfaceGLX->is_bound = 1;
-+    return 0;
-+}
-+
-+// Release GLX Pixmap from texture
-+static int unbind_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+
-+    if (!pSurfaceGLX->is_bound)
-+        return 0;
-+
-+    x11_trap_errors();
-+    pOpenGLVTable->glx_release_tex_image(ctx->x11_dpy, pSurfaceGLX->glx_pixmap,
-+                                         GLX_FRONT_LEFT_EXT);
-+    XSync(ctx->x11_dpy, False);
-+    if (x11_untrap_errors() != 0) {
-+        va_glx_error_message("failed to release pixmap\n");
-+        return -1;
-+    }
-+
-+    pSurfaceGLX->is_bound = 0;
-+    return 0;
-+}
-+
-+// Render GLX Pixmap to texture
-+static void render_pixmap(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    const unsigned int w = pSurfaceGLX->width;
-+    const unsigned int h = pSurfaceGLX->height;
-+    float old_color[4];
-+
-+    gl_get_current_color(old_color);
-+    glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
-+    glBegin(GL_QUADS);
-+    {
-+        glTexCoord2f(0.0f, 0.0f); glVertex2i(0, 0);
-+        glTexCoord2f(0.0f, 1.0f); glVertex2i(0, h);
-+        glTexCoord2f(1.0f, 1.0f); glVertex2i(w, h);
-+        glTexCoord2f(1.0f, 0.0f); glVertex2i(w, 0);
-+    }
-+    glEnd();
-+    glColor4fv(old_color);
-+}
-+
-+// Create offscreen surface
-+static int create_fbo_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    VAOpenGLVTableP       pOpenGLVTable  = gl_get_vtable(ctx);
-+    const GLenum          texture        = pSurfaceGLX->texture;
-+    const unsigned int    texture_width  = pSurfaceGLX->width;
-+    const unsigned int    texture_height = pSurfaceGLX->height;
-+    GLuint fbo, fbo_buffer, fbo_texture;
-+    GLenum status;
-+
-+    glGenTextures(1, &fbo_texture);
-+    glBindTexture(GL_TEXTURE_2D, fbo_texture);
-+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-+    glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
-+    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture_width, texture_height, 0,
-+                 GL_BGRA, GL_UNSIGNED_BYTE, NULL);
-+
-+    pOpenGLVTable->gl_gen_framebuffers(1, &fbo);
-+    pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, fbo);
-+    pOpenGLVTable->gl_gen_renderbuffers(1, &fbo_buffer);
-+    pOpenGLVTable->gl_bind_renderbuffer(GL_RENDERBUFFER_EXT, fbo_buffer);
-+
-+    glBindTexture(GL_TEXTURE_2D, texture);
-+    pOpenGLVTable->gl_framebuffer_texture_2d(GL_FRAMEBUFFER_EXT,
-+                                             GL_COLOR_ATTACHMENT0_EXT,
-+                                             GL_TEXTURE_2D, texture, 0);
-+
-+    status = pOpenGLVTable->gl_check_framebuffer_status(GL_DRAW_FRAMEBUFFER_EXT);
-+    pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, 0);
-+    if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
-+        return -1;
-+
-+    pSurfaceGLX->fbo         = fbo;
-+    pSurfaceGLX->fbo_buffer  = fbo_buffer;
-+    pSurfaceGLX->fbo_texture = fbo_texture;
-+    return 0;
-+}
-+
-+// Destroy offscreen surface
-+static void destroy_fbo_surface(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+
-+    if (pSurfaceGLX->fbo_texture) {
-+        glDeleteTextures(1, &pSurfaceGLX->fbo_texture);
-+        pSurfaceGLX->fbo_texture = 0;
-+    }
-+
-+    if (pSurfaceGLX->fbo_buffer) {
-+        pOpenGLVTable->gl_delete_renderbuffers(1, &pSurfaceGLX->fbo_buffer);
-+        pSurfaceGLX->fbo_buffer = 0;
-+    }
-+
-+    if (pSurfaceGLX->fbo) {
-+        pOpenGLVTable->gl_delete_framebuffers(1, &pSurfaceGLX->fbo);
-+        pSurfaceGLX->fbo = 0;
-+    }
-+}
-+
-+// Setup matrices to match the FBO texture dimensions
-+static void fbo_enter(VADriverContextP ctx, VASurfaceGLXP pSurfaceGLX)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+    const unsigned int width  = pSurfaceGLX->width;
-+    const unsigned int height = pSurfaceGLX->height;
-+
-+    pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, pSurfaceGLX->fbo);
-+    glPushAttrib(GL_VIEWPORT_BIT);
-+    glMatrixMode(GL_PROJECTION);
-+    glPushMatrix();
-+    glLoadIdentity();
-+    glMatrixMode(GL_MODELVIEW);
-+    glPushMatrix();
-+    glLoadIdentity();
-+    glViewport(0, 0, width, height);
-+    glTranslatef(-1.0f, -1.0f, 0.0f);
-+    glScalef(2.0f / width, 2.0f / height, 1.0f);
-+
-+    glBindTexture(GL_TEXTURE_2D, pSurfaceGLX->fbo_texture);
-+}
-+
-+// Restore original OpenGL matrices
-+static void fbo_leave(VADriverContextP ctx)
-+{
-+    VAOpenGLVTableP pOpenGLVTable = gl_get_vtable(ctx);
-+
-+    glPopAttrib();
-+    glMatrixMode(GL_PROJECTION);
-+    glPopMatrix();
-+    glMatrixMode(GL_MODELVIEW);
-+    glPopMatrix();
-+    pOpenGLVTable->gl_bind_framebuffer(GL_FRAMEBUFFER_EXT, 0);
-+}
-+
-+// Create VA/GLX surface
-+VASurfaceGLXP
-+va_glx_create_surface(VADriverContextP ctx, GLenum target, GLuint texture)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VASurfaceGLXP pSurfaceGLX;
-+    unsigned int internal_format, border_width, width, height;
-+    int is_error = 1;
-+
-+    /* Make sure binding succeeds, if texture was not already bound */
-+    struct OpenGLTextureState ts;
-+    if (bind_texture(&ts, target, texture) < 0)
-+        goto end;
-+
-+    pSurfaceGLX = malloc(sizeof(*pSurfaceGLX));
-+    if (!pSurfaceGLX)
-+        goto end;
-+
-+    pSurfaceGLX->magic          = VA_SURFACE_GLX_MAGIC;
-+    pSurfaceGLX->target         = target;
-+    pSurfaceGLX->texture        = texture;
-+    pSurfaceGLX->surface        = VA_INVALID_SURFACE;
-+    pSurfaceGLX->is_bound       = 0;
-+    pSurfaceGLX->pixmap         = None;
-+    pSurfaceGLX->glx_pixmap     = None;
-+    pSurfaceGLX->fbo            = 0;
-+    pSurfaceGLX->fbo_buffer     = 0;
-+    pSurfaceGLX->fbo_texture    = 0;
-+    pSurfaceGLX->priv           = NULL;
-+
-+    /* XXX: we don't support other textures than RGBA */
-+    if (gl_get_texture_param(GL_TEXTURE_INTERNAL_FORMAT, &internal_format) < 0)
-+        goto end;
-+    if (internal_format != GL_RGBA)
-+        goto end;
-+
-+    /* Check texture dimensions */
-+    if (gl_get_texture_param(GL_TEXTURE_BORDER, &border_width) < 0)
-+        goto end;
-+    if (gl_get_texture_param(GL_TEXTURE_WIDTH, &width) < 0)
-+        goto end;
-+    if (gl_get_texture_param(GL_TEXTURE_HEIGHT, &height) < 0)
-+        goto end;
-+
-+    width  -= 2 * border_width;
-+    height -= 2 * border_width;
-+    if (width == 0 || height == 0)
-+        goto end;
-+
-+    pSurfaceGLX->width  = width;
-+    pSurfaceGLX->height = height;
-+
-+    /* Create Pixmaps for TFP */
-+    if (pDriverContextGLX->use_tfp) {
-+        if (create_tfp_surface(ctx, pSurfaceGLX) < 0)
-+            goto end;
-+    }
-+
-+    /* Create Pixmaps for FBO */
-+    if (pDriverContextGLX->use_fbo) {
-+        if (create_fbo_surface(ctx, pSurfaceGLX) < 0)
-+            goto end;
-+    }
-+
-+    is_error = 0;
-+end:
-+    if (is_error && pSurfaceGLX)
-+        va_glx_destroy_surface(ctx, &pSurfaceGLX);
-+
-+    unbind_texture(&ts);
-+    return pSurfaceGLX;
-+}
-+
-+// Destroy VA/GLX surface
-+void va_glx_destroy_surface(VADriverContextP ctx, VASurfaceGLXP *ppSurfaceGLX)
-+{
-+    VASurfaceGLXP pSurfaceGLX = *ppSurfaceGLX;
-+
-+    unbind_pixmap(ctx, pSurfaceGLX);
-+    destroy_fbo_surface(ctx, pSurfaceGLX);
-+    destroy_tfp_surface(ctx, pSurfaceGLX);
-+
-+    free(pSurfaceGLX);
-+    *ppSurfaceGLX = NULL;
-+}
-+
-+
-+/* ========================================================================= */
-+/* === VA/GLX implementation from the driver (fordward calls)            === */
-+/* ========================================================================= */
-+
-+#define INVOKE(ctx, func, args) do {                    \
-+        VADriverVTableGLXP vtable = &(ctx)->vtable.glx; \
-+        if (!vtable->va##func##GLX)                     \
-+            return VA_STATUS_ERROR_UNIMPLEMENTED;       \
-+                                                        \
-+        VAStatus status = vtable->va##func##GLX args;   \
-+        if (status != VA_STATUS_SUCCESS)                \
-+            return status;                              \
-+    } while (0)
-+
-+static VAStatus
-+vaCreateSurfaceGLX_impl_driver(
-+    VADriverContextP    ctx,
-+    GLenum              target,
-+    GLuint              texture,
-+    void              **gl_surface
-+)
-+{
-+    INVOKE(ctx, CreateSurface, (ctx, target, texture, gl_surface));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaDestroySurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, DestroySurface, (ctx, pSurfaceGLX->priv));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaAssociateSurfaceGLX_impl_driver(
-+    VADriverContextP    ctx,
-+    void               *gl_surface,
-+    VASurfaceID         surface,
-+    unsigned int        flags
-+)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, AssociateSurface, (ctx, pSurfaceGLX->priv, surface, flags));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaDeassociateSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, DeassociateSurface, (ctx, pSurfaceGLX->priv));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaSyncSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, SyncSurface, (ctx, pSurfaceGLX->priv));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaBeginRenderSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, BeginRenderSurface, (ctx, pSurfaceGLX->priv));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaEndRenderSurfaceGLX_impl_driver(VADriverContextP ctx, void *gl_surface)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, EndRenderSurface, (ctx, pSurfaceGLX->priv));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaCopySurfaceGLX_impl_driver(
-+    VADriverContextP    ctx,
-+    void               *gl_surface,
-+    VASurfaceID         surface,
-+    unsigned int        flags
-+)
-+{
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    INVOKE(ctx, CopySurface, (ctx, pSurfaceGLX->priv, surface, flags));
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+#undef INVOKE
-+
-+
-+/* ========================================================================= */
-+/* === VA/GLX implementation from libVA (generic and suboptimal path)    === */
-+/* ========================================================================= */
-+
-+static VAStatus
-+vaCreateSurfaceGLX_impl_libva(
-+    VADriverContextP    ctx,
-+    GLenum              target,
-+    GLuint              texture,
-+    void              **gl_surface
-+)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    *gl_surface = NULL;
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaDestroySurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaAssociateSurfaceGLX_impl_libva(
-+    VADriverContextP    ctx,
-+    void               *gl_surface,
-+    VASurfaceID         surface,
-+    unsigned int        flags
-+)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VADriverVTableGLXP vtable = &pDriverContextGLX->vtable;
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+    VAStatus status;
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    /* XXX: only support VA_FRAME_PICTURE */
-+    if (flags != VA_FRAME_PICTURE)
-+        return VA_STATUS_ERROR_FLAG_NOT_SUPPORTED;
-+
-+    /* XXX: optimise case where we are associating the same VA surface
-+       as before an no changed occurred to it */
-+    status = vtable->vaDeassociateSurfaceGLX(ctx, gl_surface);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    x11_trap_errors();
-+    status = ctx->vtable.vaPutSurface(ctx,
-+                                      surface,
-+                                      pSurfaceGLX->pixmap,
-+                                      0, 0,
-+                                      pSurfaceGLX->width,
-+                                      pSurfaceGLX->height,
-+                                      0, 0,
-+                                      pSurfaceGLX->width,
-+                                      pSurfaceGLX->height,
-+                                      NULL, 0,
-+                                      flags);
-+    XSync(ctx->x11_dpy, False);
-+    if (x11_untrap_errors() != 0)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    pSurfaceGLX->surface = surface;
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaDeassociateSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    if (unbind_pixmap(ctx, pSurfaceGLX) < 0)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+
-+    pSurfaceGLX->surface = VA_INVALID_SURFACE;
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaSyncSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    if (pSurfaceGLX->surface == VA_INVALID_SURFACE)
-+        return VA_STATUS_ERROR_INVALID_SURFACE;
-+
-+    return ctx->vtable.vaSyncSurface(ctx, pSurfaceGLX->surface);
-+}
-+
-+static VAStatus
-+vaBeginRenderSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+    VAStatus status;
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    status = vaSyncSurfaceGLX_impl_libva(ctx, gl_surface);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    if (bind_pixmap(ctx, pSurfaceGLX) < 0)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaEndRenderSurfaceGLX_impl_libva(VADriverContextP ctx, void *gl_surface)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+    VAStatus status;
-+
-+    if (!pDriverContextGLX->use_tfp)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    if (unbind_pixmap(ctx, pSurfaceGLX) < 0)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaCopySurfaceGLX_impl_libva(
-+    VADriverContextP    ctx,
-+    void               *gl_surface,
-+    VASurfaceID         surface,
-+    unsigned int        flags
-+)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VADriverVTableGLXP vtable = &pDriverContextGLX->vtable;
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+    VAStatus status;
-+
-+    if (!pDriverContextGLX->use_fbo)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    /* XXX: only support VA_FRAME_PICTURE */
-+    if (flags != VA_FRAME_PICTURE)
-+        return VA_STATUS_ERROR_FLAG_NOT_SUPPORTED;
-+
-+    /* Associate VA surface */
-+    status = vtable->vaAssociateSurfaceGLX(ctx, gl_surface, surface, flags);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    /* Make sure binding succeeds, if texture was not already bound */
-+    struct OpenGLTextureState ts;
-+    if (bind_texture(&ts, pSurfaceGLX->target, pSurfaceGLX->texture) < 0)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+
-+    /* Render to FBO */
-+    fbo_enter(ctx, pSurfaceGLX);
-+    status = vtable->vaBeginRenderSurfaceGLX(ctx, gl_surface);
-+    if (status == VA_STATUS_SUCCESS) {
-+        render_pixmap(ctx, pSurfaceGLX);
-+        status = vtable->vaEndRenderSurfaceGLX(ctx, gl_surface);
-+    }
-+    fbo_leave(ctx);
-+    unbind_texture(&ts);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    return vtable->vaDeassociateSurfaceGLX(ctx, gl_surface);
-+}
-+
-+
-+/* ========================================================================= */
-+/* === VA/GLX bind functions implementation with vaCopySurfaceGLX()      === */
-+/* ========================================================================= */
-+
-+static VAStatus
-+vaAssociateSurfaceGLX_impl_bind(
-+    VADriverContextP    ctx,
-+    void               *gl_surface,
-+    VASurfaceID         surface,
-+    unsigned int        flags
-+)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VADriverVTableGLXP vtable = &pDriverContextGLX->vtable;
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+    VAStatus status;
-+
-+    if (!pDriverContextGLX->has_copy)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    status = vtable->vaCopySurfaceGLX(ctx, gl_surface, surface, flags);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    pSurfaceGLX->surface = surface;
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaDeassociateSurfaceGLX_impl_bind(VADriverContextP ctx, void *gl_surface)
-+{
-+    VADriverContextGLXP pDriverContextGLX = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VASurfaceGLXP pSurfaceGLX = gl_surface;
-+
-+    if (!pDriverContextGLX->has_copy)
-+        return VA_STATUS_ERROR_UNIMPLEMENTED;
-+
-+    pSurfaceGLX->surface = VA_INVALID_SURFACE;
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaBeginRenderSurfaceGLX_impl_bind(VADriverContextP ctx, void *gl_surface)
-+{
-+    /* Surface is already copied into the texture, in vaAssociateSurfaceGLX() */
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus
-+vaEndRenderSurfaceGLX_impl_bind(VADriverContextP ctx, void *gl_surface)
-+{
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+
-+/* ========================================================================= */
-+/* === Private VA/GLX vtable initialization                              === */
-+/* ========================================================================= */
-+
-+// Initialize GLX driver context
-+VAStatus va_glx_init_context(VADriverContextP ctx)
-+{
-+    VADriverContextGLXP glx_ctx = VA_DRIVER_CONTEXT_GLX(ctx);
-+    VADriverVTableGLXP  vtable  = &glx_ctx->vtable;
-+    int needs_tfp = 0, needs_fbo = 0;
-+
-+    if (glx_ctx->is_initialized)
-+        return VA_STATUS_SUCCESS;
-+
-+    glx_ctx->has_copy = ctx->vtable.glx.vaCopySurfaceGLX != NULL;
-+    glx_ctx->has_bind = (ctx->vtable.glx.vaAssociateSurfaceGLX   != NULL &&
-+                         ctx->vtable.glx.vaBeginRenderSurfaceGLX != NULL &&
-+                         ctx->vtable.glx.vaEndRenderSurfaceGLX   != NULL &&
-+                         ctx->vtable.glx.vaDeassociateSurfaceGLX != NULL);
-+
-+    switch ((((unsigned int)glx_ctx->has_bind) << 1) | glx_ctx->has_copy) {
-+    case 0:
-+        /* Full implementation in libVA */
-+        needs_tfp = 1;
-+        needs_fbo = 1;
-+        vtable->vaCreateSurfaceGLX      = vaCreateSurfaceGLX_impl_libva;
-+        vtable->vaDestroySurfaceGLX     = vaDestroySurfaceGLX_impl_libva;
-+        vtable->vaAssociateSurfaceGLX   = vaAssociateSurfaceGLX_impl_libva;
-+        vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_libva;
-+        vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_libva;
-+        vtable->vaEndRenderSurfaceGLX   = vaEndRenderSurfaceGLX_impl_libva;
-+        vtable->vaSyncSurfaceGLX        = vaSyncSurfaceGLX_impl_libva;
-+        vtable->vaCopySurfaceGLX        = vaCopySurfaceGLX_impl_libva;
-+        break;
-+    case 1:
-+        /* Add bind functions based on vaCopySurfaceGLX() */
-+        /* XXX: override vaSyncSurfaceGLX()? */
-+        vtable->vaCreateSurfaceGLX      = vaCreateSurfaceGLX_impl_driver;
-+        vtable->vaDestroySurfaceGLX     = vaDestroySurfaceGLX_impl_driver;
-+        vtable->vaAssociateSurfaceGLX   = vaAssociateSurfaceGLX_impl_bind;
-+        vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_bind;
-+        vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_bind;
-+        vtable->vaEndRenderSurfaceGLX   = vaEndRenderSurfaceGLX_impl_bind;
-+        vtable->vaSyncSurfaceGLX        = vaSyncSurfaceGLX_impl_driver;
-+        vtable->vaCopySurfaceGLX        = vaCopySurfaceGLX_impl_driver;
-+        break;
-+    case 2:
-+        /* Add copy function based on vaBeginRenderSurfaceGLX() et al. */
-+        needs_fbo = 1;
-+        vtable->vaCreateSurfaceGLX      = vaCreateSurfaceGLX_impl_driver;
-+        vtable->vaDestroySurfaceGLX     = vaDestroySurfaceGLX_impl_driver;
-+        vtable->vaAssociateSurfaceGLX   = vaAssociateSurfaceGLX_impl_driver;
-+        vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_driver;
-+        vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_driver;
-+        vtable->vaEndRenderSurfaceGLX   = vaEndRenderSurfaceGLX_impl_driver;
-+        vtable->vaSyncSurfaceGLX        = vaSyncSurfaceGLX_impl_driver;
-+        vtable->vaCopySurfaceGLX        = vaCopySurfaceGLX_impl_libva;
-+        break;
-+    case 3:
-+        /* Keep driver bind & copy functions */
-+        vtable->vaCreateSurfaceGLX      = vaCreateSurfaceGLX_impl_driver;
-+        vtable->vaDestroySurfaceGLX     = vaDestroySurfaceGLX_impl_driver;
-+        vtable->vaAssociateSurfaceGLX   = vaAssociateSurfaceGLX_impl_driver;
-+        vtable->vaDeassociateSurfaceGLX = vaDeassociateSurfaceGLX_impl_driver;
-+        vtable->vaBeginRenderSurfaceGLX = vaBeginRenderSurfaceGLX_impl_driver;
-+        vtable->vaEndRenderSurfaceGLX   = vaEndRenderSurfaceGLX_impl_driver;
-+        vtable->vaSyncSurfaceGLX        = vaSyncSurfaceGLX_impl_driver;
-+        vtable->vaCopySurfaceGLX        = vaCopySurfaceGLX_impl_driver;
-+        break;
-+    default:
-+        /* Fatal error: this cannot happen */
-+        assert(0);
-+        return VA_STATUS_ERROR_UNKNOWN;
-+    }
-+
-+    glx_ctx->has_tfp = 0;
-+    glx_ctx->use_tfp = 0;
-+    glx_ctx->has_fbo = 0;
-+    glx_ctx->use_fbo = 0;
-+
-+    if (needs_tfp) {
-+        glx_ctx->has_tfp = check_tfp_extensions(ctx);
-+        if (!glx_ctx->has_tfp || !load_tfp_extensions(ctx))
-+            return VA_STATUS_ERROR_UNIMPLEMENTED;
-+        glx_ctx->use_tfp = 1;
-+    }
-+
-+    if (needs_fbo) {
-+        glx_ctx->has_fbo = check_fbo_extensions(ctx);
-+        if (!glx_ctx->has_fbo || !load_fbo_extensions(ctx))
-+            return VA_STATUS_ERROR_UNIMPLEMENTED;
-+        glx_ctx->use_fbo = 1;
-+    }
-+
-+    glx_ctx->is_initialized = 1;
-+    return VA_STATUS_SUCCESS;
-+}
-diff --git a/src/glx/va_glx_impl.h b/src/glx/va_glx_impl.h
-new file mode 100644
-index 0000000..977bfcc
---- /dev/null
-+++ b/src/glx/va_glx_impl.h
-@@ -0,0 +1,46 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef VA_GLX_IMPL_H
-+#define VA_GLX_IMPL_H
-+
-+/**
-+ * Initialize GLX driver context
-+ *
-+ * @param[in]  ctx        the VA driver context
-+ * @return VA_STATUS_SUCCESS if successful
-+ */
-+VAStatus va_glx_init_context(VADriverContextP ctx)
-+    ATTRIBUTE_HIDDEN;
-+
-+/** Create VA/GLX surface */
-+VASurfaceGLXP
-+va_glx_create_surface(VADriverContextP ctx, GLenum target, GLuint texture)
-+    ATTRIBUTE_HIDDEN;
-+
-+/** Destroy VA/GLX surface */
-+void va_glx_destroy_surface(VADriverContextP ctx, VASurfaceGLXP *pSurfaceGLX)
-+    ATTRIBUTE_HIDDEN;
-+
-+#endif /* VA_GLX_IMPL_H */
-diff --git a/src/glx/va_glx_private.h b/src/glx/va_glx_private.h
-new file mode 100644
-index 0000000..8658ad3
---- /dev/null
-+++ b/src/glx/va_glx_private.h
-@@ -0,0 +1,98 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef VA_GLX_PRIVATE_H
-+#define VA_GLX_PRIVATE_H
-+
-+#include "config.h"
-+#include "va.h"
-+#include "va_backend.h"
-+#include "va_x11.h"
-+#include "va_glx.h"
-+
-+#if GLX_GLXEXT_VERSION < 18
-+typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, GLXDrawable, int, const int *);
-+typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int);
-+#endif
-+
-+typedef struct VAOpenGLVTable *VAOpenGLVTableP;
-+
-+struct VAOpenGLVTable {
-+    PFNGLXBINDTEXIMAGEEXTPROC           glx_bind_tex_image;
-+    PFNGLXRELEASETEXIMAGEEXTPROC        glx_release_tex_image;
-+    PFNGLGENFRAMEBUFFERSEXTPROC         gl_gen_framebuffers;
-+    PFNGLDELETEFRAMEBUFFERSEXTPROC      gl_delete_framebuffers;
-+    PFNGLBINDFRAMEBUFFEREXTPROC         gl_bind_framebuffer;
-+    PFNGLGENRENDERBUFFERSEXTPROC        gl_gen_renderbuffers;
-+    PFNGLDELETERENDERBUFFERSEXTPROC     gl_delete_renderbuffers;
-+    PFNGLBINDRENDERBUFFEREXTPROC        gl_bind_renderbuffer;
-+    PFNGLRENDERBUFFERSTORAGEEXTPROC     gl_renderbuffer_storage;
-+    PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC gl_framebuffer_renderbuffer;
-+    PFNGLFRAMEBUFFERTEXTURE2DEXTPROC    gl_framebuffer_texture_2d;
-+    PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC  gl_check_framebuffer_status;
-+};
-+
-+typedef struct VADisplayContextGLX *VADisplayContextGLXP;
-+typedef struct VADriverContextGLX  *VADriverContextGLXP;
-+typedef struct VASurfaceGLX        *VASurfaceGLXP;
-+typedef struct VADriverVTableGLX   *VADriverVTableGLXP;
-+
-+struct VADisplayContextGLX {
-+    void (*vaDestroy)(VADisplayContextP ctx);
-+};
-+
-+#define VA_DRIVER_CONTEXT_GLX(ctx) ((VADriverContextGLXP)((ctx)->glx))
-+
-+struct VADriverContextGLX {
-+    struct VADriverVTableGLX    vtable;
-+    struct VAOpenGLVTable       gl_vtable;
-+    unsigned int                is_initialized  : 1;
-+    unsigned int                has_copy        : 1;
-+    unsigned int                has_bind        : 1;
-+    unsigned int                has_tfp         : 1;
-+    unsigned int                has_fbo         : 1;
-+    unsigned int                use_tfp         : 1;
-+    unsigned int                use_fbo         : 1;
-+};
-+
-+/** Unique VASurfaceGLX identifier */
-+#define VA_SURFACE_GLX_MAGIC VA_FOURCC('V','A','G','L')
-+
-+struct VASurfaceGLX {
-+    uint32_t     magic;         ///< Magic number identifying a VASurfaceGLX
-+    GLenum       target;        ///< GL target to which the texture is bound
-+    GLuint       texture;       ///< GL texture
-+    VASurfaceID  surface;       ///< Associated VA surface
-+    unsigned int width;
-+    unsigned int height;
-+    int          is_bound;
-+    Pixmap       pixmap;
-+    GLXPixmap    glx_pixmap;
-+    GLuint       fbo;
-+    GLuint       fbo_buffer;
-+    GLuint       fbo_texture;
-+    void        *priv;          ///< Private VA/GLX surface data from driver
-+};
-+
-+#endif /* VA_GLX_PRIVATE_H */
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/390_compat.base.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/390_compat.base.patch
deleted file mode 100644
index f2e0d61..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/390_compat.base.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jul 2 09:24:04 2009 +0000
-
-    Fix make dist (va_compat_template.h).
-
-commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Jun 24 11:40:56 2009 +0000
-
-    Add compatibility layer with original libva 0.29.
-
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -44,7 +44,7 @@ libva_x11_la_DEPENDENCIES = $(libvacorelib)
- libva_x11_la_DEPENDENCIES = $(libvacorelib)
- 
- 
--libva_la_SOURCES = va.c
-+libva_la_SOURCES = va.c va_compat.c
- 
- libvaincludedir = ${includedir}/va
- libvainclude_HEADERS = va.h va_backend.h va_version.h
-@@ -53,4 +53,8 @@ DISTCLEANFILES = \
- 	va_version.h
- 
- EXTRA_DIST = \
--	va_version.h.in
-+	va_version.h.in \
-+	va_compat.h \
-+	va_compat_template.h
-+
-+va_compat.c: va_compat_template.h
---- a/src/va.c
-+++ b/src/va.c
-@@ -25,6 +25,7 @@
- #define _GNU_SOURCE 1
- #include "va.h"
- #include "va_backend.h"
-+#include "va_compat.h"
- 
- #include <assert.h>
- #include <stdarg.h>
-@@ -41,6 +42,8 @@
- 
- #define DRIVER_INIT_FUNC	"__vaDriverInit_0_31"
- #define DRIVER_INIT_FUNC_SDS	"__vaDriverInit_0_31_sds"
-+#define DRIVER_INIT_FUNC_0_29	"__vaDriverInit_0_29"
-+#define DRIVER_INIT_FUNC_0_30	"__vaDriverInit_0_30"
- 
- #define DRIVER_EXTENSION	"_drv_video.so"
- 
-@@ -168,11 +171,22 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
-         else
-         {
-             VADriverInit init_func;
--            init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
-+            int compat_version = 0;
-+            /* First, try SDS extensions (VDPAU and XvBA backends) */
-+            init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS);
-             if (!init_func)
-             {
--                /* Then try SDS extensions (VDPAU and XvBA backends) */
--                init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_SDS);
-+                /* Otherwise, we need the compatibility layer for some buffers */
-+                init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC);
-+                compat_version = VA_MINOR_VERSION;
-+                if (!init_func) {
-+                    init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_29);
-+                    compat_version = 29;
-+                }
-+                if (!init_func) {
-+                    init_func = (VADriverInit) dlsym(handle, DRIVER_INIT_FUNC_0_30);
-+                    compat_version = 30;
-+                }
-             }
-             if (!init_func)
-             {
-@@ -181,7 +195,36 @@ static VAStatus va_openDriver(VADisplay dpy, char *driver_name)
-             }
-             else
-             {
--                vaStatus = (*init_func)(ctx);
-+                struct VADriverContext_0_29 ctx_0_29;
-+                struct VADriverContext_0_30 ctx_0_30;
-+                void *compat_ctx = NULL;
-+
-+                switch (compat_version) {
-+                case 29:
-+                    compat_ctx           = &ctx_0_29;
-+                    ctx_0_29.pDriverData = NULL;
-+                    ctx_0_29.x11_dpy     = ctx->x11_dpy;
-+                    ctx_0_29.x11_screen  = ctx->x11_screen;
-+                    break;
-+                case 30:
-+                    compat_ctx           = &ctx_0_30;
-+                    ctx_0_30.pDriverData = NULL;
-+                    ctx_0_30.x11_dpy     = ctx->x11_dpy;
-+                    ctx_0_30.x11_screen  = ctx->x11_screen;
-+                    break;
-+                case VA_MINOR_VERSION:
-+                    compat_ctx           = ctx;
-+                    break;
-+                default:
-+                    ASSERT(compat_version == 0);
-+                    vaStatus = VA_STATUS_ERROR_UNKNOWN;
-+                    break;
-+                }
-+
-+                vaStatus = (*init_func)(compat_ctx ? compat_ctx : ctx);
-+
-+                if (VA_STATUS_SUCCESS == vaStatus)
-+                    vaStatus = va_compat_init(dpy, compat_version, compat_ctx);
- 
-                 if (VA_STATUS_SUCCESS == vaStatus)
-                 {
-@@ -377,6 +422,8 @@ VAStatus vaTerminate (
-       old_ctx->handle = NULL;
-   }
- 
-+  va_compat_fini(dpy);
-+
-   if (VA_STATUS_SUCCESS == vaStatus)
-       pDisplayContext->vaDestroy(pDisplayContext);
-   return vaStatus;
---- a/src/va_backend.h
-+++ b/src/va_backend.h
-@@ -426,6 +426,7 @@ struct VADriverContext
-     
-     void *dri_state;
-     void *glx;                          /* opaque for GLX code */
-+    void *compat;			/* opaque for compat code */
- };
- 
- struct VADisplayContext
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/391_compat.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/391_compat.patch
deleted file mode 100644
index 5e09d22..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/391_compat.patch
+++ /dev/null
@@ -1,3273 +0,0 @@
-commit 2e7aa803a8547dfcde6e97ae2bb4a8bbdbb2634e
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Mon Nov 23 12:22:09 2009 +0000
-
-    Update compat code for VDPAU/MPEG-4 additions.
-
-commit 30808b39d82cbf0c185052a2d2d5ed8a5fc065d1
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Sep 10 14:01:57 2009 +0000
-
-    Update compatibility glue for VASliceParameterBufferMPEG2.slice_horizontal_position addition.
-
-commit 27faf49366602637da223f3dc5f30ce4d6d72070
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Sep 2 15:06:20 2009 +0000
-
-    Fix vaSyncSurface() compat code for VA API < 0.31 drivers.
-
-commit dc33a3e28b38b7d579ab768899963cf9b0d38677
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Sep 2 12:28:43 2009 +0000
-
-    Fix check for 0.30 modules.
-
-commit bd913971bd9e7460b454513b006e16c18136625e
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Sep 2 11:58:08 2009 +0000
-
-    Update for VA API 0.31.
-
-commit 9cc7f89d3cc0238ab5b3a47c316e261e06a16634
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jul 2 15:55:48 2009 +0000
-
-    Fix VAEncSliceParameterBuffer thunk.
-
-commit 483bc9e67afa9bcd8f99f08a74a78e7dfad4651f
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jul 2 09:24:04 2009 +0000
-
-    Fix make dist (va_compat_template.h).
-
-commit 7f41b22366142c4e476fbae929ad343dc33af3a4
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jun 25 14:05:57 2009 +0000
-
-    Drop superfluous semi-colon.
-
-commit dcc75aae23fc8f653179b6a331f4021acd6775fd
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jun 25 13:53:26 2009 +0000
-
-    Fix check for 0.30 modules.
-
-commit b34512e74ac4150a3f8ee4abe4fa5b17907f8869
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jun 25 13:17:48 2009 +0000
-
-    Fix vaTerminate() thunk.
-
-commit 3b006d1ac66429f6b8ffff00ce60e1e47a32c02c
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jun 25 12:48:22 2009 +0000
-
-    Cosmetics.
-
-commit 452295d5ac34643f8a316491888c3900f12c5bff
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Thu Jun 25 12:18:48 2009 +0000
-
-    Fix compatibility with 0.29 modules.
-
-commit 0e0da9ea861f14e8129767dbf6f11be5c051d85f
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Wed Jun 24 11:40:56 2009 +0000
-
-    Add compatibility layer with original libva 0.29.
-
-diff --git a/src/va_compat.c b/src/va_compat.c
-new file mode 100644
-index 0000000..0bd7385
---- /dev/null
-+++ b/src/va_compat.c
-@@ -0,0 +1,1171 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#include "config.h"
-+#include "va.h"
-+#include "va_compat.h"
-+#include "va_backend.h"
-+#include <string.h>
-+#include <alloca.h>
-+#include <assert.h>
-+
-+#define CTX(dpy)        (((VADisplayContextP)dpy)->pDriverContext)
-+#define COMPAT_CTX(ctx) ((VACompatContextP)(ctx)->compat)
-+#define ASSERT		assert
-+
-+/* Invoke the normal VA API entry-point. This one can be replaced with
-+   one of the va_compat_*() functions */
-+#define VA_INVOKE(FUNC, CTX, ...) \
-+    (CTX)->vtable.FUNC(CTX, __VA_ARGS__)
-+
-+/* Invoke the real VA API entry-point. That is, the driver's function */
-+#define VA_INVOKE_COMPAT_ARGS(CTX, ...) \
-+    (COMPAT_CTX(CTX)->compat_ctx, __VA_ARGS__)
-+#define VA_INVOKE_COMPAT(FUNC, CTX, ...) \
-+    COMPAT_CTX(CTX)->vtable.FUNC VA_INVOKE_COMPAT_ARGS(CTX, __VA_ARGS__)
-+
-+typedef struct VACompatContext *VACompatContextP;
-+
-+typedef VAStatus (*VABufferTranslateFunc)(VACompatContextP ctx, void *dest, const void *src);
-+
-+typedef enum {
-+    VA_DRIVER_ID_UNKNOWN,
-+    VA_DRIVER_ID_POULSBO,
-+    VA_DRIVER_ID_IEGD
-+} VADriverID;
-+
-+typedef struct {
-+    VABufferID                  id;
-+    VABufferType                type;
-+    unsigned int                size;
-+    unsigned int                num_elements;
-+    unsigned char              *data;
-+    VABufferTranslateFunc       translate;
-+    VABufferID                  compat_id;
-+    unsigned int                compat_size;
-+    unsigned char              *compat_data;
-+    unsigned int                map_count;
-+} VABufferCompat;
-+
-+typedef struct VAContextMap *VAContextMapP;
-+typedef struct VAContextMap {
-+    VASurfaceID                 surface;
-+    VAContextID                 context;
-+    VAContextMapP               next;
-+} VAContextMap;
-+
-+typedef struct {
-+    VAStatus (*vaTerminate)(void *);
-+    VAStatus (*vaQueryConfigProfiles)(void *, VAProfile *, int *);
-+    VAStatus (*vaQueryConfigEntrypoints)(void *, VAProfile, VAEntrypoint *, int *);
-+    VAStatus (*vaGetConfigAttributes)(void *, VAProfile, VAEntrypoint, VAConfigAttrib *, int);
-+    VAStatus (*vaCreateConfig)(void *, VAProfile, VAEntrypoint, VAConfigAttrib *, int, VAConfigID *);
-+    VAStatus (*vaDestroyConfig)(void *, VAConfigID);
-+    VAStatus (*vaQueryConfigAttributes)(void *, VAConfigID, VAProfile *, VAEntrypoint *, VAConfigAttrib *, int *);
-+    VAStatus (*vaCreateSurfaces)(void *, int, int, int, int, VASurfaceID *);
-+    VAStatus (*vaDestroySurfaces)(void *, VASurfaceID *, int);
-+    VAStatus (*vaCreateContext)(void *, VAConfigID, int, int, int, VASurfaceID *, int, VAContextID *);
-+    VAStatus (*vaDestroyContext)(void *, VAContextID);
-+    VAStatus (*vaCreateBuffer)(void *, VAContextID, VABufferType, unsigned int, unsigned int, void *, VABufferID *);
-+    VAStatus (*vaBufferSetNumElements)(void *, VABufferID, unsigned int);
-+    VAStatus (*vaMapBuffer)(void *, VABufferID, void **);
-+    VAStatus (*vaUnmapBuffer)(void *, VABufferID);
-+    VAStatus (*vaDestroyBuffer)(void *, VABufferID);
-+    VAStatus (*vaBeginPicture)(void *, VAContextID, VASurfaceID);
-+    VAStatus (*vaRenderPicture)(void *, VAContextID, VABufferID *, int);
-+    VAStatus (*vaEndPicture)(void *, VAContextID);
-+    VAStatus (*vaSyncSurface_pre31)(void *, VAContextID, VASurfaceID);
-+    VAStatus (*vaQuerySurfaceStatus)(void *, VASurfaceID, VASurfaceStatus *);
-+    VAStatus (*vaPutSurface)(void *, VASurfaceID, unsigned long, short, short, unsigned short, unsigned short, short, short, unsigned short, unsigned short, VARectangle *, unsigned int, unsigned int);
-+    VAStatus (*vaQueryImageFormats)(void *, VAImageFormat *, int *);
-+    VAStatus (*vaCreateImage)(void *, VAImageFormat *, int, int, VAImage *);
-+    VAStatus (*vaDeriveImage)(void *, VASurfaceID, VAImage *);
-+    VAStatus (*vaDestroyImage)(void *, VAImageID);
-+    VAStatus (*vaSetImagePalette)(void *, VAImageID, unsigned char *);
-+    VAStatus (*vaGetImage)(void *, VASurfaceID, int, int, unsigned int, unsigned int, VAImageID);
-+    VAStatus (*vaPutImage_pre31)(void *, VASurfaceID, VAImageID, int, int, unsigned int, unsigned int, int, int);
-+    VAStatus (*vaPutImage2_pre31)(void *, VASurfaceID, VAImageID, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
-+    VAStatus (*vaQuerySubpictureFormats)(void *, VAImageFormat *, unsigned int *, unsigned int *);
-+    VAStatus (*vaCreateSubpicture)(void *, VAImageID, VASubpictureID *);
-+    VAStatus (*vaDestroySubpicture)(void *, VASubpictureID);
-+    VAStatus (*vaSetSubpictureImage)(void *, VASubpictureID, VAImageID);
-+    VAStatus (*vaSetSubpictureChromakey)(void *, VASubpictureID, unsigned int, unsigned int, unsigned int);
-+    VAStatus (*vaSetSubpictureGlobalAlpha)(void *, VASubpictureID, float);
-+    VAStatus (*vaAssociateSubpicture_pre31)(void *, VASubpictureID, VASurfaceID *, int, short, short, short, short, unsigned short, unsigned short, unsigned int);
-+    VAStatus (*vaAssociateSubpicture2_pre31)(void *, VASubpictureID, VASurfaceID *, int, short, short, unsigned short, unsigned short, short, short, unsigned short, unsigned short, unsigned int);
-+    VAStatus (*vaDeassociateSubpicture)(void *, VASubpictureID, VASurfaceID *, int);
-+    VAStatus (*vaQueryDisplayAttributes)(void *, VADisplayAttribute *, int *);
-+    VAStatus (*vaGetDisplayAttributes)(void *, VADisplayAttribute *, int);
-+    VAStatus (*vaSetDisplayAttributes)(void *, VADisplayAttribute *, int);
-+
-+    /* 0.29 hooks */
-+    VAStatus (*vaSetSubpicturePalette)(void *, VASubpictureID, unsigned char *);
-+    VAStatus (*vaDbgCopySurfaceToBuffer)(void *, VASurfaceID, void **, unsigned int *);
-+
-+    /* 0.30 hooks */
-+    VAStatus (*vaCreateSurfaceFromCIFrame)(void *, unsigned long, VASurfaceID *);
-+    VAStatus (*vaCreateSurfaceFromV4L2Buf)(void *, int, struct v4l2_format *, struct v4l2_buffer *, VASurfaceID *);
-+    VAStatus (*vaCopySurfaceToBuffer)(void *, VASurfaceID, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, unsigned int *, void **);
-+
-+    /* 0.31 hooks */
-+    VAStatus (*vaPutImage)(void *, VASurfaceID, VAImageID, int, int, unsigned int, unsigned int, int, int, unsigned int, unsigned int);
-+    VAStatus (*vaAssociateSubpicture)(void *, VASubpictureID, VASurfaceID *, int, short, short, unsigned short, unsigned short, short, short, unsigned short, unsigned short, unsigned int);
-+    VAStatus (*vaSyncSurface)(void *, VASurfaceID);
-+} VACompatDriverVTable;
-+
-+typedef struct VACompatContext {
-+    VABufferCompat             *buffers;
-+    unsigned int                buffers_count_max;
-+    unsigned int                compat_version;
-+    void                       *compat_ctx;
-+    VACompatDriverVTable        vtable;                 /* original vtable */
-+    VADriverID                  driver_id;
-+    char                       *driver_name;
-+    VAContextMapP               context_map;
-+    VAContextMapP               last_context_map_match;
-+    unsigned int                skip_frame : 1;
-+} VACompatContext;
-+
-+#define COMPAT_MAJOR 0
-+#define COMPAT_MINOR 29
-+#include "va_compat_template.h"
-+
-+#define COMPAT_MAJOR 0
-+#define COMPAT_MINOR 30
-+#include "va_compat_template.h"
-+
-+#define COMPAT_MAJOR 0
-+#define COMPAT_MINOR 31
-+#include "va_compat_template.h"
-+
-+static inline int va_IsIntelBuffer(VADriverContextP ctx, VABufferID id)
-+{
-+    VACompatContextP compat = ctx->compat;
-+
-+    if (compat->driver_id == VA_DRIVER_ID_POULSBO) {
-+        /* There were only Intel implementations for VA API. Besides, the
-+           returned buffer IDs had the following format [ 0 BASE ID ] where
-+           BASE is the 7-bit value 0x04 and ID an index into the heap of
-+           objects */
-+        return (id & 0x7f000000) == 0x04000000;
-+    }
-+
-+    if (compat->driver_id == VA_DRIVER_ID_IEGD) {
-+        /* XXX: there is no means to differentiate the buffers, they
-+           are linearly generated (IEGD 10.0 build 1335) */
-+        return 1;
-+    }
-+
-+    return 0;
-+}
-+
-+static VAContextMapP va_context_map_lookup_p(
-+    VACompatContextP    ctx,
-+    VASurfaceID         surface
-+)
-+{
-+    VAContextMapP m = ctx->context_map;
-+
-+    while (m) {
-+        if (m->surface == surface)
-+            return m;
-+        m = m->next;
-+    }
-+    return NULL;
-+}
-+
-+static VAContextID va_context_map_lookup(
-+    VACompatContextP    ctx,
-+    VASurfaceID         surface
-+)
-+{
-+    VAContextMapP m;
-+
-+    /* Lookup in cached */
-+    m = ctx->last_context_map_match;
-+    if (m && m->surface == surface)
-+        return m->context;
-+
-+    /* Full (slow) lookup */
-+    m = va_context_map_lookup_p(ctx, surface);
-+    if (m) {
-+        ctx->last_context_map_match = m;
-+        return m->context;
-+    }
-+    return VA_INVALID_ID;
-+}
-+
-+static void va_context_map_add(
-+    VACompatContextP    ctx,
-+    VAContextID         context,
-+    VASurfaceID         surface
-+)
-+{
-+    VAContextMapP m;
-+
-+    /* Update existing entry */
-+    m = va_context_map_lookup_p(ctx, surface);
-+    if (m) {
-+        m->context = context;
-+        return;
-+    }
-+
-+    /* Create new mapping */
-+    m = malloc(sizeof(*m));
-+    ASSERT(m);
-+    if (m) {
-+        m->surface = surface;
-+        m->context = context;
-+        m->next    = ctx->context_map;
-+        ctx->context_map = m;
-+    }
-+}
-+
-+static void va_context_map_remove(
-+    VACompatContextP    ctx,
-+    VAContextID         context
-+)
-+{
-+    VAContextMapP p = NULL;
-+    VAContextMapP m = ctx->context_map;
-+    VAContextMapP d;
-+
-+    while (m) {
-+        if (m->context == context) {
-+            d = m;
-+
-+            /* Unlink current node */
-+            if (p)
-+                p->next = m->next;
-+            else
-+                ctx->context_map = m->next;
-+            m = m->next;
-+
-+            /* Reset cache */
-+            if (ctx->last_context_map_match == d)
-+                ctx->last_context_map_match = NULL;
-+
-+            free(d);
-+        }
-+        else {
-+            p = m;
-+            m = m->next;
-+        }
-+    }
-+}
-+
-+static VABufferCompat *va_GetBufferCompat (
-+    VADriverContextP ctx,
-+    VABufferID id
-+)
-+{
-+    VACompatContextP compat = ctx->compat;
-+    int index;
-+
-+    if (!va_IsIntelBuffer(ctx, id))
-+        return NULL;
-+
-+    index = id & 0x00ffffff;
-+    if (index >= compat->buffers_count_max)
-+        return NULL;
-+
-+    if (compat->buffers[index].id != id)
-+        return NULL;
-+
-+    return &compat->buffers[index];
-+}
-+
-+static VAStatus va_TranslateBufferCompat (
-+    VADriverContextP ctx,
-+    VABufferCompat *compat_buffer
-+)
-+{
-+    VAStatus status;
-+    unsigned char *src, *dest;
-+    int i;
-+
-+    status = VA_INVOKE(vaMapBuffer, ctx, compat_buffer->id, (void **)&src);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    ASSERT(compat_buffer->data);
-+    ASSERT(src == compat_buffer->data);
-+    ASSERT(compat_buffer->compat_data);
-+    dest = compat_buffer->compat_data;
-+    for (i = 0; i < compat_buffer->num_elements; i++)
-+    {
-+        /* XXX: check errors */
-+        status = compat_buffer->translate(ctx->compat, dest, src);
-+
-+        src   += compat_buffer->size;
-+        dest  += compat_buffer->compat_size;
-+    }
-+
-+    return VA_INVOKE(vaUnmapBuffer, ctx, compat_buffer->id);
-+}
-+
-+static VAStatus va_CreateBufferCompat (
-+    VADriverContextP ctx,
-+    VAContextID context,
-+    VABufferID id,
-+    VABufferType type,
-+    unsigned int size,
-+    unsigned int num_elements,
-+    unsigned int compat_size,
-+    VABufferTranslateFunc translate_func
-+)
-+{
-+    VACompatContextP compat = ctx->compat;
-+    VABufferCompat *compat_buffer;
-+    int index;
-+
-+    if (!va_IsIntelBuffer(ctx, id))
-+        return VA_STATUS_ERROR_INVALID_BUFFER;
-+    index = id & 0x00ffffff;
-+
-+    /* XXX: this allocation strategy is not really space efficient... */
-+    if (index >= compat->buffers_count_max)
-+    {
-+        compat->buffers_count_max = index + 1;
-+        compat->buffers = realloc(compat->buffers,
-+                                  (compat->buffers_count_max *
-+                                   sizeof(VABufferCompat)));
-+        if (compat->buffers == NULL)
-+            return VA_STATUS_ERROR_ALLOCATION_FAILED;
-+    }
-+
-+    compat_buffer = &compat->buffers[index];
-+    compat_buffer->id           = id;
-+    compat_buffer->type         = type;
-+    compat_buffer->size         = size;
-+    compat_buffer->num_elements = num_elements;
-+    compat_buffer->data         = NULL;
-+    compat_buffer->translate    = translate_func;
-+    compat_buffer->compat_size  = compat_size;
-+    compat_buffer->compat_data  = NULL;
-+    compat_buffer->map_count    = 0;
-+
-+    return VA_INVOKE_COMPAT(vaCreateBuffer,
-+                            ctx,
-+                            context,
-+                            type,
-+                            compat_size,
-+                            num_elements,
-+                            NULL,
-+                            &compat_buffer->compat_id);
-+}
-+
-+static VAStatus va_DestroyBufferCompat (
-+    VADriverContextP ctx,
-+    VABufferID id
-+)
-+{
-+    VABufferCompat *compat_buffer;
-+    VAStatus status;
-+
-+    if ((compat_buffer = va_GetBufferCompat(ctx, id)) == NULL)
-+        return VA_STATUS_SUCCESS;
-+
-+    /* Force unmap if there were more maps than unmaps */
-+    if (compat_buffer->map_count > 1)
-+        compat_buffer->map_count = 1;
-+    if (compat_buffer->map_count > 1)
-+    {
-+        if ((status = VA_INVOKE(vaUnmapBuffer, ctx, id)) != VA_STATUS_SUCCESS)
-+            return status;
-+    }
-+
-+    compat_buffer->id = 0;
-+    return VA_INVOKE_COMPAT(vaDestroyBuffer, ctx, compat_buffer->compat_id);
-+}
-+
-+static VAStatus va_compat_CreateBuffer (
-+    VADriverContextP ctx,
-+    VAContextID context,	/* in */
-+    VABufferType type,		/* in */
-+    unsigned int size,		/* in */
-+    unsigned int num_elements,	/* in */
-+    void *data,			/* in */
-+    VABufferID *buf_id		/* out */
-+)
-+{
-+    VABufferTranslateFunc translate_func = NULL;
-+    unsigned int compat_size = 0;
-+    VAStatus status;
-+
-+    status = VA_INVOKE_COMPAT(vaCreateBuffer,
-+                              ctx,
-+                              context,
-+                              type,
-+                              size,
-+                              num_elements,
-+                              data,
-+                              buf_id);
-+
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+#define INIT_TRANSLATE_FUNC_(STRUCT, MAJOR, MINOR) do {                 \
-+    translate_func = va_compat_translate_VA##STRUCT##_##MAJOR##_##MINOR; \
-+    compat_size = sizeof(VA##STRUCT##_##MAJOR##_##MINOR);               \
-+} while (0)
-+#define INIT_TRANSLATE_FUNC(BUFFER, CODEC, MAJOR, MINOR) \
-+    INIT_TRANSLATE_FUNC_(BUFFER##Buffer##CODEC, MAJOR, MINOR)
-+
-+    /* XXX: this assumes all structures have different sizes from each other */
-+    switch (size) {
-+    case sizeof(VAPictureParameterBufferH264):
-+        if (type == VAPictureParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 29: INIT_TRANSLATE_FUNC(PictureParameter,H264, 0,29); break;
-+            case 30: INIT_TRANSLATE_FUNC(PictureParameter,H264, 0,30); break;
-+            }
-+        }
-+        break;
-+    case sizeof(VASliceParameterBufferH264):
-+        if (type == VASliceParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 29: INIT_TRANSLATE_FUNC(SliceParameter,H264, 0,29); break;
-+            case 30: INIT_TRANSLATE_FUNC(SliceParameter,H264, 0,30); break;
-+            }
-+        }
-+        break;
-+    case sizeof(VAPictureParameterBufferVC1):
-+        if (type == VAPictureParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 29: INIT_TRANSLATE_FUNC(PictureParameter,VC1, 0,29); break;
-+            case 30: INIT_TRANSLATE_FUNC(PictureParameter,VC1, 0,30); break;
-+            }
-+        }
-+        break;
-+    case sizeof(VAPictureParameterBufferMPEG2):
-+        if (type == VAPictureParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 29: INIT_TRANSLATE_FUNC(PictureParameter,MPEG2, 0,29); break;
-+            case 30: INIT_TRANSLATE_FUNC(PictureParameter,MPEG2, 0,30); break;
-+            }
-+        }
-+        break;
-+    case sizeof(VASliceParameterBufferMPEG2):
-+        if (type == VASliceParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 29: INIT_TRANSLATE_FUNC(SliceParameter,MPEG2, 0,29); break;
-+            case 30: INIT_TRANSLATE_FUNC(SliceParameter,MPEG2, 0,30); break;
-+            }
-+        }
-+        break;
-+    case sizeof(VAPictureParameterBufferMPEG4):
-+        if (type == VAPictureParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 29: INIT_TRANSLATE_FUNC(PictureParameter,MPEG4, 0,29); break;
-+            case 30: INIT_TRANSLATE_FUNC(PictureParameter,MPEG4, 0,30); break;
-+            case 31: INIT_TRANSLATE_FUNC(PictureParameter,MPEG4, 0,31); break;
-+            }
-+        }
-+        break;
-+    case sizeof(VAEncSliceParameterBuffer):
-+        if (type == VAEncSliceParameterBufferType && ctx->version_major == 0)
-+        {
-+            switch (ctx->version_minor) {
-+            case 30: INIT_TRANSLATE_FUNC_(EncSliceParameterBuffer, 0,30); break;
-+            }
-+        }
-+        break;
-+    }
-+
-+#undef INIT_TRANSLATE_FUNC
-+
-+    /* Create thunk */
-+    if (buf_id && translate_func)
-+    {
-+        ASSERT(compat_size > 0);
-+
-+        status = va_CreateBufferCompat(ctx,
-+                                       context,
-+                                       *buf_id,
-+                                       type,
-+                                       size,
-+                                       num_elements,
-+                                       compat_size,
-+                                       translate_func);
-+    }
-+
-+    return status;
-+}
-+
-+static VAStatus va_compat_BufferSetNumElements (
-+    VADriverContextP ctx,
-+    VABufferID buf_id,	/* in */
-+    unsigned int num_elements /* in */
-+)
-+{
-+    VABufferCompat *compat_buffer;
-+    VAStatus status;
-+
-+    status = VA_INVOKE_COMPAT(vaBufferSetNumElements, ctx, buf_id, num_elements);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    if ((compat_buffer = va_GetBufferCompat(ctx, buf_id)) != NULL)
-+    {
-+        compat_buffer->num_elements = num_elements;
-+        status = VA_INVOKE_COMPAT(vaBufferSetNumElements,
-+                                  ctx,
-+                                  compat_buffer->compat_id,
-+                                  num_elements);
-+    }
-+
-+    return status;
-+}
-+
-+static VAStatus va_compat_DestroyBuffer (
-+    VADriverContextP ctx,
-+    VABufferID buffer_id
-+)
-+{
-+    VAStatus status;
-+    if ((status = va_DestroyBufferCompat(ctx, buffer_id)) != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    return VA_INVOKE_COMPAT(vaDestroyBuffer, ctx, buffer_id);
-+}
-+
-+static VAStatus va_compat_MapBuffer (
-+    VADriverContextP ctx,
-+    VABufferID buf_id,	/* in */
-+    void **pbuf 	/* out */
-+)
-+{
-+    VABufferCompat *compat_buffer;
-+    VAStatus status;
-+
-+    if ((compat_buffer = va_GetBufferCompat(ctx, buf_id)) == NULL)
-+        return VA_INVOKE_COMPAT(vaMapBuffer, ctx, buf_id, pbuf);
-+
-+    if (compat_buffer->map_count++ == 0)
-+    {
-+        status = VA_INVOKE_COMPAT(vaMapBuffer, ctx, buf_id, (void **)&compat_buffer->data);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+
-+        status = VA_INVOKE_COMPAT(vaMapBuffer, ctx, compat_buffer->compat_id, (void **)&compat_buffer->compat_data);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+    }
-+
-+    if (pbuf)
-+        *pbuf = compat_buffer->data;
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus va_compat_UnmapBuffer (
-+    VADriverContextP ctx,
-+    VABufferID buf_id	/* in */
-+)
-+{
-+    VABufferCompat *compat_buffer;
-+    VAStatus status;
-+
-+    if ((compat_buffer = va_GetBufferCompat(ctx, buf_id)) == NULL)
-+        return VA_INVOKE_COMPAT(vaUnmapBuffer, ctx, buf_id);
-+
-+    if (--compat_buffer->map_count == 0)
-+    {
-+        status = VA_INVOKE_COMPAT(vaUnmapBuffer, ctx, compat_buffer->compat_id);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+        compat_buffer->compat_data = NULL;
-+
-+        status = VA_INVOKE_COMPAT(vaUnmapBuffer, ctx, compat_buffer->id);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+        compat_buffer->data = NULL;
-+    }
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus va_compat_BeginPicture (
-+    VADriverContextP ctx,
-+    VAContextID context,
-+    VASurfaceID render_target
-+)
-+{
-+    VACompatContextP compat = ctx->compat;
-+    compat->skip_frame = 0;
-+    return VA_INVOKE_COMPAT(vaBeginPicture, ctx, context, render_target);
-+}
-+
-+static VAStatus va_compat_EndPicture (
-+    VADriverContextP ctx,
-+    VAContextID context
-+)
-+{
-+    VACompatContextP compat = ctx->compat;
-+    VAStatus status = VA_INVOKE_COMPAT(vaEndPicture, ctx, context);
-+
-+    /* Ignore errors if the HW decoder did not handle VC-1 skipped P-frames */
-+    if (compat->skip_frame && status == VA_STATUS_ERROR_UNKNOWN)
-+        status = VA_STATUS_SUCCESS;
-+
-+    return status;
-+}
-+
-+static VAStatus va_compat_RenderPicture (
-+    VADriverContextP ctx,
-+    VAContextID context,
-+    VABufferID *buffers,
-+    int num_buffers
-+)
-+{
-+    VACompatContextP compat = ctx->compat;
-+    VABufferCompat *compat_buffer;
-+    VABufferID *compat_buffer_ids;
-+    VAStatus status;
-+    int i, n;
-+
-+    if ((n = num_buffers) < 1)
-+        n = 1;
-+    compat_buffer_ids = alloca(n * sizeof(compat_buffer_ids[0]));
-+
-+    for (i = 0; i < num_buffers; i++)
-+    {
-+        if ((compat_buffer = va_GetBufferCompat(ctx, buffers[i])) == NULL)
-+            compat_buffer_ids[i] = buffers[i];
-+        else
-+        {
-+            status = va_TranslateBufferCompat(ctx, compat_buffer);
-+            if (status != VA_STATUS_SUCCESS)
-+                return status;
-+            compat_buffer_ids[i] = compat_buffer->compat_id;
-+        }
-+    }
-+
-+    if (!compat->skip_frame)
-+    {
-+        status = VA_INVOKE_COMPAT(vaRenderPicture, ctx, context, compat_buffer_ids, num_buffers);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+    }
-+
-+    /* Buffers are automatically destroyed afterwards */
-+    for (i = 0; i < num_buffers; i++)
-+    {
-+        if ((compat_buffer = va_GetBufferCompat(ctx, buffers[i])) != NULL)
-+        {
-+            status = VA_INVOKE_COMPAT(vaDestroyBuffer, ctx, compat_buffer->id);
-+            if (status != VA_STATUS_SUCCESS)
-+                return status;
-+        }
-+    }
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+#define DEFINE_VTABLE_ENTRY_(RETVAL, PROC, ARGS, COMPAT_PROC, COMPAT_ARGS, COMPAT_PRE, COMPAT_POST) \
-+static RETVAL va_compat_##PROC ARGS                                        \
-+{                                                                          \
-+    if (COMPAT_CTX(ctx)->vtable.va##COMPAT_PROC == NULL)                   \
-+        return VA_STATUS_ERROR_OPERATION_FAILED;                           \
-+    COMPAT_PRE;                                                            \
-+    RETVAL ret = COMPAT_CTX(ctx)->vtable.va##COMPAT_PROC VA_INVOKE_COMPAT_ARGS COMPAT_ARGS; \
-+    COMPAT_POST;                                                           \
-+    return ret;                                                            \
-+}
-+
-+#define DEFINE_VTABLE_ENTRY(RETVAL, PROC, DECL_ARGS, CALL_ARGS) \
-+DEFINE_VTABLE_ENTRY_(RETVAL, PROC, DECL_ARGS, PROC, CALL_ARGS, {}, {})
-+
-+static VAStatus va_compat_Terminate(VADriverContextP ctx)
-+{
-+    if (COMPAT_CTX(ctx)->vtable.vaTerminate == NULL)
-+        return VA_STATUS_ERROR_OPERATION_FAILED;
-+    return COMPAT_CTX(ctx)->vtable.vaTerminate(COMPAT_CTX(ctx)->compat_ctx);
-+}
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QueryConfigProfiles,
-+    (VADriverContextP ctx, VAProfile *profile_list, int *num_profiles),
-+    (ctx, profile_list, num_profiles))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QueryConfigEntrypoints,
-+    (VADriverContextP ctx, VAProfile profile,
-+     VAEntrypoint *entrypoint_list, int *num_entrypoints),
-+    (ctx, profile, entrypoint_list, num_entrypoints))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, GetConfigAttributes,
-+    (VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoint,
-+     VAConfigAttrib *attrib_list, int num_attribs),
-+    (ctx, profile, entrypoint, attrib_list, num_attribs))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateConfig,
-+    (VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoint,
-+     VAConfigAttrib *attrib_list, int num_attribs, VAConfigID *config_id),
-+    (ctx, profile, entrypoint, attrib_list, num_attribs, config_id))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DestroyConfig,
-+    (VADriverContextP ctx, VAConfigID config_id),
-+    (ctx, config_id))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QueryConfigAttributes,
-+    (VADriverContextP ctx, VAConfigID config_id, VAProfile *profile,
-+     VAEntrypoint *entrypoint, VAConfigAttrib *attrib_list, int *num_attribs),
-+    (ctx, config_id, profile, entrypoint, attrib_list, num_attribs))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateSurfaces,
-+    (VADriverContextP ctx, int width, int height, int format,
-+     int num_surfaces, VASurfaceID *surfaces),
-+    (ctx, width, height, format, num_surfaces, surfaces))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DestroySurfaces,
-+    (VADriverContextP ctx, VASurfaceID *surface_list, int num_surfaces),
-+    (ctx, surface_list, num_surfaces))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateContext,
-+    (VADriverContextP ctx, VAConfigID config_id,
-+     int picture_width, int picture_height, int flag,
-+     VASurfaceID *render_targets, int num_render_targets, VAContextID *context),
-+    (ctx, config_id, picture_width, picture_height, flag,
-+     render_targets, num_render_targets, context))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DestroyContext,
-+    (VADriverContextP ctx, VAContextID context),
-+    (ctx, context))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, SyncSurface,
-+    (VADriverContextP ctx, VASurfaceID render_target),
-+    (ctx, render_target))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QuerySurfaceStatus,
-+    (VADriverContextP ctx, VASurfaceID render_target, VASurfaceStatus *status),
-+    (ctx, render_target, status))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, PutSurface,
-+    (VADriverContextP ctx, VASurfaceID surface, Drawable draw,
-+     short srcx, short srcy, unsigned short srcw, unsigned short srch,
-+     short destx, short desty, unsigned short destw, unsigned short desth,
-+     VARectangle *cliprects, unsigned int number_cliprects, unsigned int flags),
-+    (ctx, surface, draw, srcx, srcy, srcw, srch, destx, desty, destw, desth,
-+     cliprects, number_cliprects, flags))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QueryImageFormats,
-+    (VADriverContextP ctx, VAImageFormat *format_list, int *num_formats),
-+    (ctx, format_list, num_formats))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateImage,
-+    (VADriverContextP ctx, VAImageFormat *format,
-+     int width, int height, VAImage *image),
-+    (ctx, format, width, height, image))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DeriveImage,
-+    (VADriverContextP ctx, VASurfaceID surface, VAImage *image),
-+    (ctx, surface, image))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DestroyImage,
-+    (VADriverContextP ctx, VAImageID image),
-+    (ctx, image))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, SetImagePalette,
-+    (VADriverContextP ctx, VAImageID image, unsigned char *palette),
-+    (ctx, image, palette))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, GetImage,
-+    (VADriverContextP ctx, VASurfaceID surface,
-+     int x, int y, unsigned int width, unsigned int height, VAImageID image),
-+    (ctx, surface, x, y, width, height, image))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, PutImage,
-+    (VADriverContextP ctx, VASurfaceID surface, VAImageID image,
-+     int srcx, int srcy, unsigned int srcw, unsigned int srch,
-+     int destx, int desty, unsigned int destw, unsigned int desth),
-+    (ctx, surface, image, srcx, srcy, srcw, srch, destx, desty, destw, desth))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QuerySubpictureFormats,
-+    (VADriverContextP ctx, VAImageFormat *format_list,
-+     unsigned int *flags, unsigned int *num_formats),
-+    (ctx, format_list, flags, num_formats))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateSubpicture,
-+    (VADriverContextP ctx, VAImageID image, VASubpictureID *subpicture),
-+    (ctx, image, subpicture))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DestroySubpicture,
-+    (VADriverContextP ctx, VASubpictureID subpicture),
-+    (ctx, subpicture))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, SetSubpictureImage,
-+    (VADriverContextP ctx, VASubpictureID subpicture, VAImageID image),
-+    (ctx, subpicture, image))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, SetSubpictureChromakey,
-+    (VADriverContextP ctx, VASubpictureID subpicture,
-+     unsigned int chromakey_min,
-+     unsigned int chromakey_max,
-+     unsigned int chromakey_mask),
-+    (ctx, subpicture, chromakey_min, chromakey_max, chromakey_mask))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, SetSubpictureGlobalAlpha,
-+    (VADriverContextP ctx, VASubpictureID subpicture, float global_alpha),
-+    (ctx, subpicture, global_alpha))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, AssociateSubpicture,
-+    (VADriverContextP ctx, VASubpictureID subpicture,
-+     VASurfaceID *target_surfaces, int num_surfaces,
-+     short srcx, short srcy, unsigned short srcw, unsigned short srch,
-+     short destx, short desty, unsigned short destw, unsigned short desth,
-+     unsigned int flags),
-+    (ctx, subpicture, target_surfaces, num_surfaces,
-+     srcx, srcy, srcw, srch, destx, desty, destw, desth, flags))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, DeassociateSubpicture,
-+    (VADriverContextP ctx, VASubpictureID subpicture,
-+     VASurfaceID *target_surfaces, int num_surfaces),
-+    (ctx, subpicture, target_surfaces, num_surfaces))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, QueryDisplayAttributes,
-+    (VADriverContextP ctx, VADisplayAttribute *attr_list, int *num_attributes),
-+    (ctx, attr_list, num_attributes))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, GetDisplayAttributes,
-+    (VADriverContextP ctx, VADisplayAttribute *attr_list, int num_attributes),
-+    (ctx, attr_list, num_attributes))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, SetDisplayAttributes,
-+    (VADriverContextP ctx, VADisplayAttribute *attr_list, int num_attributes),
-+    (ctx, attr_list, num_attributes))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateSurfaceFromCIFrame,
-+    (VADriverContextP ctx, unsigned long frame_id, VASurfaceID *surface),
-+    (ctx, frame_id, surface))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CreateSurfaceFromV4L2Buf,
-+    (VADriverContextP ctx, int v4l2_fd,
-+     struct v4l2_format *v4l2_fmt, struct v4l2_buffer *v4l2_buf,
-+     VASurfaceID *surface),
-+    (ctx, v4l2_fd, v4l2_fmt, v4l2_buf, surface))
-+
-+DEFINE_VTABLE_ENTRY(
-+    VAStatus, CopySurfaceToBuffer,
-+    (VADriverContextP ctx, VASurfaceID surface, unsigned int *fourcc,
-+     unsigned int *luma_stride,
-+     unsigned int *chroma_u_stride, unsigned int *chroma_v_stride,
-+     unsigned int *luma_offset,
-+     unsigned int *chroma_u_offset, unsigned int *chroma_v_offset,
-+     void **buffer),
-+    (ctx, surface, fourcc,
-+     luma_stride, chroma_u_stride, chroma_v_stride,
-+     luma_offset, chroma_u_offset, chroma_v_offset,
-+     buffer))
-+
-+DEFINE_VTABLE_ENTRY_(
-+    VAStatus, SyncSurface_pre31,
-+    (VADriverContextP ctx, VASurfaceID render_target),
-+    SyncSurface_pre31,
-+    (ctx, va_context_map_lookup(COMPAT_CTX(ctx), render_target), render_target),
-+    {}, {})
-+
-+DEFINE_VTABLE_ENTRY_(
-+    VAStatus, PutImage_pre31,
-+    (VADriverContextP ctx, VASurfaceID surface, VAImageID image,
-+     int srcx, int srcy, unsigned int srcw, unsigned int srch,
-+     int destx, int desty, unsigned int destw, unsigned int desth),
-+    PutImage2_pre31,
-+    (ctx, surface, image, srcx, srcy, srcw, srch, destx, desty, destw, desth),
-+    {}, {})
-+
-+DEFINE_VTABLE_ENTRY_(
-+    VAStatus, AssociateSubpicture_pre31,
-+    (VADriverContextP ctx, VASubpictureID subpicture,
-+     VASurfaceID *target_surfaces, int num_surfaces,
-+     short srcx, short srcy, unsigned short srcw, unsigned short srch,
-+     short destx, short desty, unsigned short destw, unsigned short desth,
-+     unsigned int flags),
-+    AssociateSubpicture2_pre31,
-+    (ctx, subpicture, target_surfaces, num_surfaces,
-+     srcx, srcy, srcw, srch, destx, desty, destw, desth, flags),
-+    {}, {})
-+
-+DEFINE_VTABLE_ENTRY_(
-+    VAStatus, CreateContext_pre31,
-+    (VADriverContextP ctx, VAConfigID config_id,
-+     int picture_width, int picture_height, int flag,
-+     VASurfaceID *render_targets, int num_render_targets, VAContextID *context),
-+    CreateContext,
-+    (ctx, config_id, picture_width, picture_height, flag,
-+     render_targets, num_render_targets, context),
-+    {}, {
-+        VACompatContextP const compat_ctx = COMPAT_CTX(ctx);
-+        int i;
-+        for (i = 0; i < num_render_targets; i++)
-+            va_context_map_add(compat_ctx, *context, render_targets[i]);
-+    })
-+
-+DEFINE_VTABLE_ENTRY_(
-+    VAStatus, DestroyContext_pre31,
-+    (VADriverContextP ctx, VAContextID context),
-+    DestroyContext,
-+    (ctx, context),
-+    {}, { va_context_map_remove(COMPAT_CTX(ctx), context); })
-+
-+#undef DEFINE_VTABLE_ENTRY
-+#undef DEFINE_VTABLE_ENTRY_
-+
-+static void va_compat_init_VADriverVTable(VADriverContextP ctx, int compat_version)
-+{
-+#define INIT_VTABLE_(CTX, DST_PROC, SRC_PROC) \
-+    (CTX)->vtable.va##DST_PROC = va_compat_##SRC_PROC
-+#define INIT_VTABLE(CTX, PROC) \
-+    INIT_VTABLE_(CTX, PROC, PROC)
-+
-+    INIT_VTABLE(ctx, Terminate);
-+    INIT_VTABLE(ctx, QueryConfigProfiles);
-+    INIT_VTABLE(ctx, QueryConfigEntrypoints);
-+    INIT_VTABLE(ctx, GetConfigAttributes);
-+    INIT_VTABLE(ctx, CreateConfig);
-+    INIT_VTABLE(ctx, DestroyConfig);
-+    INIT_VTABLE(ctx, QueryConfigAttributes);
-+    INIT_VTABLE(ctx, CreateSurfaces);
-+    INIT_VTABLE(ctx, DestroySurfaces);
-+    INIT_VTABLE(ctx, CreateContext);
-+    INIT_VTABLE(ctx, DestroyContext);
-+    INIT_VTABLE(ctx, CreateBuffer);
-+    INIT_VTABLE(ctx, BufferSetNumElements);
-+    INIT_VTABLE(ctx, MapBuffer);
-+    INIT_VTABLE(ctx, UnmapBuffer);
-+    INIT_VTABLE(ctx, DestroyBuffer);
-+    INIT_VTABLE(ctx, BeginPicture);
-+    INIT_VTABLE(ctx, RenderPicture);
-+    INIT_VTABLE(ctx, EndPicture);
-+    INIT_VTABLE(ctx, SyncSurface);
-+    INIT_VTABLE(ctx, QuerySurfaceStatus);
-+    INIT_VTABLE(ctx, PutSurface);
-+    INIT_VTABLE(ctx, QueryImageFormats);
-+    INIT_VTABLE(ctx, CreateImage);
-+    INIT_VTABLE(ctx, DeriveImage);
-+    INIT_VTABLE(ctx, DestroyImage);
-+    INIT_VTABLE(ctx, SetImagePalette);
-+    INIT_VTABLE(ctx, GetImage);
-+    INIT_VTABLE(ctx, PutImage);
-+    INIT_VTABLE(ctx, QuerySubpictureFormats);
-+    INIT_VTABLE(ctx, CreateSubpicture);
-+    INIT_VTABLE(ctx, DestroySubpicture);
-+    INIT_VTABLE(ctx, SetSubpictureImage);
-+    INIT_VTABLE(ctx, SetSubpictureChromakey);
-+    INIT_VTABLE(ctx, SetSubpictureGlobalAlpha);
-+    INIT_VTABLE(ctx, AssociateSubpicture);
-+    INIT_VTABLE(ctx, DeassociateSubpicture);
-+    INIT_VTABLE(ctx, QueryDisplayAttributes);
-+    INIT_VTABLE(ctx, GetDisplayAttributes);
-+    INIT_VTABLE(ctx, SetDisplayAttributes);
-+    INIT_VTABLE(ctx, CreateSurfaceFromCIFrame);
-+    INIT_VTABLE(ctx, CreateSurfaceFromV4L2Buf);
-+    INIT_VTABLE(ctx, CopySurfaceToBuffer);
-+
-+    if (compat_version && compat_version < 31) {
-+        INIT_VTABLE_(ctx, CreateContext,        CreateContext_pre31);
-+        INIT_VTABLE_(ctx, DestroyContext,       DestroyContext_pre31);
-+        INIT_VTABLE_(ctx, SyncSurface,          SyncSurface_pre31);
-+        INIT_VTABLE_(ctx, PutImage,             PutImage_pre31);
-+        INIT_VTABLE_(ctx, AssociateSubpicture,  AssociateSubpicture_pre31);
-+    }
-+
-+#undef INIT_VTABLE
-+#undef INIT_VTABLE__
-+}
-+
-+VAStatus va_compat_init(VADisplay dpy, int compat_version, void *compat_ctx)
-+{
-+    VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
-+    VADriverContextP ctx = CTX(dpy);
-+    VADriverContextP_0_29 ctx_0_29;
-+    VADriverContextP_0_30 ctx_0_30;
-+    VACompatContextP compat;
-+    VAStatus status;
-+    char *driver_name;
-+
-+    ctx->compat                         = NULL;
-+
-+    if (compat_version == 0)
-+        return VA_STATUS_SUCCESS;
-+
-+    ASSERT(compat_ctx);
-+    if (compat_ctx == NULL)
-+        return VA_STATUS_ERROR_UNKNOWN;
-+
-+    driver_name = NULL;
-+    status = pDisplayContext->vaGetDriverName(pDisplayContext, &driver_name);
-+    ASSERT(status == VA_STATUS_SUCCESS);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    if ((compat = malloc(sizeof(*compat))) == NULL)
-+        return VA_STATUS_ERROR_ALLOCATION_FAILED;
-+    compat->buffers                     = NULL;
-+    compat->buffers_count_max           = 0;
-+    compat->compat_version              = compat_version;
-+    compat->compat_ctx                  = NULL;
-+    compat->driver_name                 = driver_name;
-+    compat->context_map                 = NULL;
-+    compat->last_context_map_match      = NULL;
-+    ctx->compat                         = compat;
-+
-+    if (strcmp(driver_name, "psb") == 0)
-+        compat->driver_id = VA_DRIVER_ID_POULSBO;
-+    else if (strcmp(driver_name, "iegd") == 0)
-+        compat->driver_id = VA_DRIVER_ID_IEGD;
-+    else
-+        compat->driver_id = VA_DRIVER_ID_UNKNOWN;
-+
-+    switch (compat_version) {
-+    case 29:
-+        if ((ctx_0_29 = malloc(sizeof(*ctx_0_29))) == NULL)
-+            return VA_STATUS_ERROR_ALLOCATION_FAILED;
-+        memcpy(ctx_0_29, compat_ctx, sizeof(*ctx_0_29));
-+        va_compat_translate_VADriverContext_0_29(compat, ctx_0_29);
-+        compat->compat_ctx = ctx_0_29;
-+        COPY_FIELD(ctx, ctx_0_29, version_major);
-+        COPY_FIELD(ctx, ctx_0_29, version_minor);
-+        COPY_FIELD(ctx, ctx_0_29, max_profiles);
-+        COPY_FIELD(ctx, ctx_0_29, max_entrypoints);
-+        COPY_FIELD(ctx, ctx_0_29, max_attributes);
-+        COPY_FIELD(ctx, ctx_0_29, max_image_formats);
-+        COPY_FIELD(ctx, ctx_0_29, max_subpic_formats);
-+        COPY_FIELD(ctx, ctx_0_29, max_display_attributes);
-+        COPY_FIELD(ctx, ctx_0_29, str_vendor);
-+        break;
-+    case 30:
-+        if ((ctx_0_30 = malloc(sizeof(*ctx_0_30))) == NULL)
-+            return VA_STATUS_ERROR_ALLOCATION_FAILED;
-+        memcpy(ctx_0_30, compat_ctx, sizeof(*ctx_0_30));
-+        va_compat_translate_VADriverContext_0_30(compat, ctx_0_30);
-+        compat->compat_ctx = ctx_0_30;
-+        COPY_FIELD(ctx, ctx_0_30, version_major);
-+        COPY_FIELD(ctx, ctx_0_30, version_minor);
-+        COPY_FIELD(ctx, ctx_0_30, max_profiles);
-+        COPY_FIELD(ctx, ctx_0_30, max_entrypoints);
-+        COPY_FIELD(ctx, ctx_0_30, max_attributes);
-+        COPY_FIELD(ctx, ctx_0_30, max_image_formats);
-+        COPY_FIELD(ctx, ctx_0_30, max_subpic_formats);
-+        COPY_FIELD(ctx, ctx_0_30, max_display_attributes);
-+        COPY_FIELD(ctx, ctx_0_30, str_vendor);
-+        break;
-+    case VA_MINOR_VERSION:
-+        va_compat_translate_VADriverContext(compat, compat_ctx);
-+        compat->compat_ctx = compat_ctx;
-+        break;
-+    default:
-+        ASSERT(compat_version == 0);
-+        return VA_STATUS_ERROR_UNKNOWN;
-+    }
-+
-+    va_compat_init_VADriverVTable(ctx, compat_version);
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+VAStatus va_compat_fini(VADisplay dpy)
-+{
-+    VADriverContextP ctx = CTX(dpy);
-+    VACompatContextP compat = ctx->compat;
-+    int i;
-+
-+    if (compat == NULL)
-+        return VA_STATUS_SUCCESS;
-+
-+    if (compat->driver_name)
-+    {
-+        free(compat->driver_name);
-+        compat->driver_name = NULL;
-+    }
-+
-+    if (compat->buffers)
-+    {
-+        for (i = 0; i < compat->buffers_count_max; i++)
-+        {
-+            if (compat->buffers[i].id)
-+                va_DestroyBufferCompat(ctx, compat->buffers[i].id);
-+        }
-+        free(compat->buffers);
-+        compat->buffers = NULL;
-+    }
-+
-+    if (compat->compat_ctx && compat->compat_version != VA_MINOR_VERSION)
-+    {
-+        free(compat->compat_ctx);
-+        compat->compat_ctx = NULL;
-+    }
-+
-+    if (compat->context_map)
-+    {
-+        VAContextMapP d, m = compat->context_map;
-+        while (m) {
-+            d = m;
-+            m = m->next;
-+            free(d);
-+        }
-+    }
-+    compat->last_context_map_match = NULL;
-+
-+    free(compat);
-+    ctx->compat = NULL;
-+    return VA_STATUS_SUCCESS;
-+}
-diff --git a/src/va_compat.h b/src/va_compat.h
-new file mode 100644
-index 0000000..2c9d801
---- /dev/null
-+++ b/src/va_compat.h
-@@ -0,0 +1,1467 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#ifndef VA_COMPAT_H
-+#define VA_COMPAT_H
-+
-+VAStatus va_compat_init(VADisplay dpy, int compat_version, void *compat_ctx);
-+VAStatus va_compat_fini(VADisplay dpy);
-+
-+/* H.264 Picture (0.29) */
-+typedef struct _VAPictureH264_0_29
-+{
-+    VASurfaceID picture_id;
-+    unsigned int flags;
-+    unsigned int TopFieldOrderCnt;
-+    unsigned int BottomFieldOrderCnt;
-+} VAPictureH264_0_29;
-+
-+/* H.264 Picture Parameter Buffer (0.29) */
-+typedef struct _VAPictureParameterBufferH264_0_29
-+{
-+    VAPictureH264_0_29 CurrPic;
-+    VAPictureH264_0_29 ReferenceFrames[16];	/* in DPB */
-+    unsigned short picture_width_in_mbs_minus1;
-+    unsigned short picture_height_in_mbs_minus1;
-+    unsigned char bit_depth_luma_minus8;
-+    unsigned char bit_depth_chroma_minus8;
-+    unsigned char num_ref_frames;
-+    union {
-+        struct {
-+            unsigned char chroma_format_idc			: 2; 
-+            unsigned char residual_colour_transform_flag	: 1; 
-+            unsigned char frame_mbs_only_flag			: 1; 
-+            unsigned char mb_adaptive_frame_field_flag		: 1; 
-+            unsigned char direct_8x8_inference_flag		: 1; 
-+            unsigned char MinLumaBiPredSize8x8			: 1; /* see A.3.3.2 */
-+        };
-+        unsigned char seq_fields;
-+    };
-+    unsigned char num_slice_groups_minus1;
-+    unsigned char slice_group_map_type;
-+    signed char pic_init_qp_minus26;
-+    signed char chroma_qp_index_offset;
-+    signed char second_chroma_qp_index_offset;
-+    union {
-+        struct {
-+            unsigned char entropy_coding_mode_flag		: 1;
-+            unsigned char weighted_pred_flag			: 1;
-+            unsigned char weighted_bipred_idc			: 2;
-+            unsigned char transform_8x8_mode_flag		: 1;
-+            unsigned char field_pic_flag			: 1;
-+            unsigned char constrained_intra_pred_flag		: 1;
-+        };
-+        unsigned char pic_fields;
-+    };
-+    unsigned short frame_num;
-+} VAPictureParameterBufferH264_0_29;
-+
-+/* H.264 Slice Parameter Buffer (0.29) */
-+typedef struct _VASliceParameterBufferH264_0_29
-+{
-+    unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */
-+    unsigned int slice_data_offset;/* the offset to the NAL start code for this slice */
-+    unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
-+    unsigned short slice_data_bit_offset; /* bit offset from NAL start code to the beginning of slice data */
-+    unsigned short first_mb_in_slice;
-+    unsigned char slice_type;
-+    unsigned char direct_spatial_mv_pred_flag;
-+    unsigned char num_ref_idx_l0_active_minus1;
-+    unsigned char num_ref_idx_l1_active_minus1;
-+    unsigned char cabac_init_idc;
-+    char slice_qp_delta;
-+    unsigned char disable_deblocking_filter_idc;
-+    char slice_alpha_c0_offset_div2;
-+    char slice_beta_offset_div2;
-+    VAPictureH264_0_29 RefPicList0[32];	/* See 8.2.4.2 */
-+    VAPictureH264_0_29 RefPicList1[32];	/* See 8.2.4.2 */
-+    unsigned char luma_log2_weight_denom;
-+    unsigned char chroma_log2_weight_denom;
-+    unsigned char luma_weight_l0_flag;
-+    short luma_weight_l0[32];
-+    short luma_offset_l0[32];
-+    unsigned char chroma_weight_l0_flag;
-+    short chroma_weight_l0[32][2];
-+    short chroma_offset_l0[32][2];
-+    unsigned char luma_weight_l1_flag;
-+    short luma_weight_l1[32];
-+    short luma_offset_l1[32];
-+    unsigned char chroma_weight_l1_flag;
-+    short chroma_weight_l1[32][2];
-+    short chroma_offset_l1[32][2];
-+} VASliceParameterBufferH264_0_29;
-+
-+/* VC-1 Picture Parameter Buffer (0.29) */
-+typedef struct _VAPictureParameterBufferVC1_0_29
-+{
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    /* if out-of-loop post-processing is done on the render
-+       target, then we need to keep the in-loop decoded 
-+       picture as a reference picture */
-+    VASurfaceID inloop_decoded_picture;
-+
-+    /* sequence layer for AP or meta data for SP and MP */
-+    union {
-+        struct {
-+            unsigned char interlace	: 1; /* SEQUENCE_LAYER::INTERLACE */
-+            unsigned char syncmarker	: 1;/* METADATA::SYNCMARKER */
-+            unsigned char overlap	: 1;/* METADATA::OVERLAP */
-+        };
-+        unsigned char sequence_fields;
-+    };
-+
-+    unsigned short coded_width;		/* ENTRY_POINT_LAYER::CODED_WIDTH */
-+    unsigned short coded_height;	/* ENTRY_POINT_LAYER::CODED_HEIGHT */
-+    unsigned char closed_entry;		/* ENTRY_POINT_LAYER::CLOSED_ENTRY */
-+    unsigned char broken_link;		/* ENTRY_POINT_LAYER::BROKEN_LINK */
-+    unsigned char loopfilter;		/* ENTRY_POINT_LAYER::LOOPFILTER */
-+    unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */
-+    unsigned char fast_uvmc_flag;	/* ENTRY_POINT_LAYER::FASTUVMC */
-+    union {
-+        struct {
-+            unsigned char range_mapping_luma_flag: 	1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */
-+            unsigned char range_mapping_luma: 		3; /* ENTRY_POINT_LAYER::RANGE_MAPY */
-+            unsigned char range_mapping_chroma_flag:	1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */
-+            unsigned char range_mapping_chroma:		3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */
-+        };
-+        unsigned char range_mapping_fields;
-+    };
-+
-+    unsigned char b_picture_fraction;	/* PICTURE_LAYER::BFRACTION */
-+    unsigned char cbp_table;		/* PICTURE_LAYER::CBPTAB/ICBPTAB */
-+    unsigned char mb_mode_table;	/* PICTURE_LAYER::MBMODETAB */
-+    unsigned char range_reduction_frame;/* PICTURE_LAYER::RANGEREDFRM */
-+    unsigned char rounding_control;	/* PICTURE_LAYER::RNDCTRL */
-+    unsigned char post_processing;	/* PICTURE_LAYER::POSTPROC */
-+    unsigned char picture_resolution_index;	/* PICTURE_LAYER::RESPIC */
-+    unsigned char luma_scale;		/* PICTURE_LAYER::LUMSCALE */
-+    unsigned char luma_shift;		/* PICTURE_LAYER::LUMSHIFT */
-+    union {
-+        struct {
-+            unsigned char picture_type	: 2; 	/* PICTURE_LAYER::PTYPE */
-+            unsigned char frame_coding_mode	: 3;/* PICTURE_LAYER::FCM */
-+            unsigned char top_field_first	: 1;/* PICTURE_LAYER::TFF */
-+            unsigned char is_first_field	: 1; /* set to 1 if it is the first field */
-+            unsigned char intensity_compensation: 1;/* PICTURE_LAYER::INTCOMP */
-+        };
-+        unsigned char picture_fields;
-+    };
-+    union {
-+        struct {
-+            unsigned char mv_type_mb	: 1; 	/* PICTURE::MVTYPEMB */
-+            unsigned char direct_mb	: 1; 	/* PICTURE::DIRECTMB */
-+            unsigned char skip_mb	: 1; 	/* PICTURE::SKIPMB */
-+            unsigned char field_tx	: 1; 	/* PICTURE::FIELDTX */
-+            unsigned char forward_mb	: 1;	/* PICTURE::FORWARDMB */
-+            unsigned char ac_pred	: 1;	/* PICTURE::ACPRED */
-+            unsigned char overflags	: 1;	/* PICTURE::OVERFLAGS */
-+        };
-+        unsigned char raw_coding_flag;
-+    };
-+    union {
-+        struct {
-+            unsigned char bp_mv_type_mb   : 1;    /* PICTURE::MVTYPEMB */
-+            unsigned char bp_direct_mb    : 1;    /* PICTURE::DIRECTMB */
-+            unsigned char bp_skip_mb      : 1;    /* PICTURE::SKIPMB */  
-+            unsigned char bp_field_tx     : 1;    /* PICTURE::FIELDTX */ 
-+            unsigned char bp_forward_mb   : 1;    /* PICTURE::FORWARDMB */
-+            unsigned char bp_ac_pred      : 1;    /* PICTURE::ACPRED */   
-+            unsigned char bp_overflags    : 1;    /* PICTURE::OVERFLAGS */
-+        };
-+        unsigned char bitplane_present_flag; /* signal what bitplane is being passed via the bitplane buffer */
-+    };
-+    union {
-+        struct {
-+            unsigned char reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */
-+            unsigned char reference_distance	: 5;/* PICTURE_LAYER::REFDIST */
-+            unsigned char num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */
-+            unsigned char reference_field_pic_indicator	: 1;/* PICTURE_LAYER::REFFIELD */
-+        };
-+        unsigned short reference_fields;
-+    };
-+    union {
-+        struct {
-+            VAMvModeVC1 mv_mode              : 3; /* PICTURE_LAYER::MVMODE */
-+            VAMvModeVC1 mv_mode2             : 3; /* PICTURE_LAYER::MVMODE2 */
-+            unsigned char mv_table           : 3; /* PICTURE_LAYER::MVTAB/IMVTAB */
-+            unsigned char two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */
-+            unsigned char four_mv_switch     : 1; /* PICTURE_LAYER::4MVSWITCH */
-+            unsigned char four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */
-+            unsigned char extended_mv_flag   : 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */
-+            unsigned char extended_mv_range  : 2; /* PICTURE_LAYER::MVRANGE */
-+            unsigned char extended_dmv_flag  : 1; /* ENTRY_POINT_LAYER::EXTENDED_DMV */
-+            unsigned char extended_dmv_range : 2; /* PICTURE_LAYER::DMVRANGE */
-+        };
-+        unsigned int mv_fields;
-+    };
-+    union {
-+        struct {
-+            unsigned char dquant	: 2; 	/* ENTRY_POINT_LAYER::DQUANT */
-+            unsigned char quantizer     : 2; 	/* ENTRY_POINT_LAYER::QUANTIZER */
-+            unsigned char half_qp	: 1; 	/* PICTURE_LAYER::HALFQP */
-+            unsigned char pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */
-+            unsigned char pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */
-+            unsigned char dq_frame	: 1; 	/* VOPDQUANT::DQUANTFRM */
-+            unsigned char dq_profile	: 2; 	/* VOPDQUANT::DQPROFILE */
-+            unsigned char dq_sb_edge	: 2; 	/* VOPDQUANT::DQSBEDGE */
-+            unsigned char dq_db_edge 	: 2; 	/* VOPDQUANT::DQDBEDGE */
-+            unsigned char dq_binary_level : 1; 	/* VOPDQUANT::DQBILEVEL */
-+            unsigned char alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */
-+        };
-+        unsigned long pic_quantizer_fields;
-+    };
-+    union {
-+        struct {
-+            unsigned char variable_sized_transform_flag	: 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */
-+            unsigned char mb_level_transform_type_flag	: 1;/* PICTURE_LAYER::TTMBF */
-+            unsigned char frame_level_transform_type	: 2;/* PICTURE_LAYER::TTFRM */
-+            unsigned char transform_ac_codingset_idx1	: 2;/* PICTURE_LAYER::TRANSACFRM */
-+            unsigned char transform_ac_codingset_idx2	: 2;/* PICTURE_LAYER::TRANSACFRM2 */
-+            unsigned char intra_transform_dc_table	: 1;/* PICTURE_LAYER::TRANSDCTAB */
-+        };
-+        unsigned short transform_fields;
-+    };
-+} VAPictureParameterBufferVC1_0_29;
-+
-+/* MPEG-2 Picture Parameter Buffer (0.29) */
-+typedef struct _VAPictureParameterBufferMPEG2_0_29
-+{
-+    unsigned short horizontal_size;
-+    unsigned short vertical_size;
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    /* meanings of the following fields are the same as in the standard */
-+    int picture_coding_type;
-+    int f_code; /* pack all four fcode into this */
-+    union {
-+        struct {
-+            unsigned char intra_dc_precision		: 2; 
-+            unsigned char picture_structure		: 2; 
-+            unsigned char top_field_first		: 1; 
-+            unsigned char frame_pred_frame_dct		: 1; 
-+            unsigned char concealment_motion_vectors	: 1;
-+            unsigned char q_scale_type			: 1;
-+            unsigned char intra_vlc_format		: 1;
-+            unsigned char alternate_scan		: 1;
-+            unsigned char repeat_first_field		: 1;
-+            unsigned char progressive_frame		: 1;
-+            unsigned char is_first_field		: 1; /* indicate whether the current field
-+                                                              * is the first field for field picture
-+                                                              */
-+        };
-+        unsigned int picture_coding_extension;
-+    };
-+} VAPictureParameterBufferMPEG2_0_29;
-+
-+/* MPEG-2 Slice Parameter Buffer (0.29) */
-+typedef struct _VASliceParameterBufferMPEG2_0_29
-+{
-+    unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */
-+    unsigned int slice_data_offset;/* the offset to the first byte of slice data */
-+    unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
-+    unsigned int macroblock_offset;/* the offset to the first bit of MB from the first byte of slice data */
-+    unsigned int slice_vertical_position;
-+    int quantiser_scale_code;
-+    int intra_slice_flag;
-+} VASliceParameterBufferMPEG2_0_29;
-+
-+/* MPEG-4 Picture Parameter Buffer (0.29) */
-+typedef struct _VAPictureParameterBufferMPEG4_0_29
-+{
-+    unsigned short vop_width;
-+    unsigned short vop_height;
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    union {
-+        struct {
-+            unsigned char short_video_header		: 1; 
-+            unsigned char chroma_format			: 2; 
-+            unsigned char interlaced			: 1; 
-+            unsigned char obmc_disable			: 1; 
-+            unsigned char sprite_enable			: 2; 
-+            unsigned char sprite_warping_accuracy	: 2; 
-+            unsigned char quant_type			: 1; 
-+            unsigned char quarter_sample		: 1; 
-+            unsigned char data_partitioned		: 1; 
-+            unsigned char reversible_vlc		: 1; 
-+        };
-+        unsigned short vol_fields;
-+    };
-+    unsigned char no_of_sprite_warping_points;
-+    short sprite_trajectory_du[3];
-+    short sprite_trajectory_dv[3];
-+    unsigned char quant_precision;
-+    union {
-+        struct {
-+            unsigned char vop_coding_type		: 2; 
-+            unsigned char backward_reference_vop_coding_type	: 2; 
-+            unsigned char vop_rounding_type		: 1; 
-+            unsigned char intra_dc_vlc_thr		: 3; 
-+            unsigned char top_field_first		: 1; 
-+            unsigned char alternate_vertical_scan_flag	: 1; 
-+        };
-+        unsigned short vop_fields;
-+    };
-+    unsigned char vop_fcode_forward;
-+    unsigned char vop_fcode_backward;
-+    /* short header related */
-+    unsigned char num_gobs_in_vop;
-+    unsigned char num_macroblocks_in_gob;
-+    /* for direct mode prediction */
-+    short TRB;
-+    short TRD;
-+} VAPictureParameterBufferMPEG4_0_29;
-+
-+/* H.264 Picture (0.30) */
-+typedef struct _VAPictureH264_0_30
-+{
-+    VASurfaceID picture_id;
-+    unsigned int flags;
-+    unsigned int TopFieldOrderCnt;
-+    unsigned int BottomFieldOrderCnt;
-+} VAPictureH264_0_30;
-+
-+/* H.264 Picture Parameter Buffer (0.30) */
-+typedef struct _VAPictureParameterBufferH264_0_30
-+{
-+    VAPictureH264 CurrPic;
-+    VAPictureH264 ReferenceFrames[16];	/* in DPB */
-+    unsigned short picture_width_in_mbs_minus1;
-+    unsigned short picture_height_in_mbs_minus1;
-+    unsigned char bit_depth_luma_minus8;
-+    unsigned char bit_depth_chroma_minus8;
-+    unsigned char num_ref_frames;
-+    union {
-+        struct {
-+            unsigned char chroma_format_idc			: 2; 
-+            unsigned char residual_colour_transform_flag		: 1; 
-+            unsigned char frame_mbs_only_flag			: 1; 
-+            unsigned char mb_adaptive_frame_field_flag		: 1; 
-+            unsigned char direct_8x8_inference_flag		: 1; 
-+            unsigned char MinLumaBiPredSize8x8			: 1; /* see A.3.3.2 */
-+        } bits;
-+        unsigned char value;
-+    } seq_fields;
-+    unsigned char num_slice_groups_minus1;
-+    unsigned char slice_group_map_type;
-+    signed char pic_init_qp_minus26;
-+    signed char chroma_qp_index_offset;
-+    signed char second_chroma_qp_index_offset;
-+    union {
-+        struct {
-+            unsigned char entropy_coding_mode_flag	: 1;
-+            unsigned char weighted_pred_flag		: 1;
-+            unsigned char weighted_bipred_idc		: 2;
-+            unsigned char transform_8x8_mode_flag	: 1;
-+            unsigned char field_pic_flag			: 1;
-+            unsigned char constrained_intra_pred_flag	: 1;
-+        } bits;
-+        unsigned char value;
-+    } pic_fields;
-+    unsigned short frame_num;
-+} VAPictureParameterBufferH264_0_30;
-+
-+/* H.264 Slice Parameter Buffer (0.30) */
-+typedef struct _VASliceParameterBufferH264_0_30
-+{
-+    unsigned int slice_data_size;/* number of bytes in the slice data buffer for this slice */
-+    unsigned int slice_data_offset;/* the offset to the NAL start code for this slice */
-+    unsigned int slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
-+    unsigned short slice_data_bit_offset; /* bit offset from NAL start code to the beginning of slice data */
-+    unsigned short first_mb_in_slice;
-+    unsigned char slice_type;
-+    unsigned char direct_spatial_mv_pred_flag;
-+    unsigned char num_ref_idx_l0_active_minus1;
-+    unsigned char num_ref_idx_l1_active_minus1;
-+    unsigned char cabac_init_idc;
-+    char slice_qp_delta;
-+    unsigned char disable_deblocking_filter_idc;
-+    char slice_alpha_c0_offset_div2;
-+    char slice_beta_offset_div2;
-+    VAPictureH264 RefPicList0[32];	/* See 8.2.4.2 */
-+    VAPictureH264 RefPicList1[32];	/* See 8.2.4.2 */
-+    unsigned char luma_log2_weight_denom;
-+    unsigned char chroma_log2_weight_denom;
-+    unsigned char luma_weight_l0_flag;
-+    short luma_weight_l0[32];
-+    short luma_offset_l0[32];
-+    unsigned char chroma_weight_l0_flag;
-+    short chroma_weight_l0[32][2];
-+    short chroma_offset_l0[32][2];
-+    unsigned char luma_weight_l1_flag;
-+    short luma_weight_l1[32];
-+    short luma_offset_l1[32];
-+    unsigned char chroma_weight_l1_flag;
-+    short chroma_weight_l1[32][2];
-+    short chroma_offset_l1[32][2];
-+} VASliceParameterBufferH264_0_30;
-+
-+/* VC-1 Picture Parameter Buffer (0.30) */
-+typedef struct _VAPictureParameterBufferVC1_0_30
-+{
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    /* if out-of-loop post-processing is done on the render
-+       target, then we need to keep the in-loop decoded 
-+       picture as a reference picture */
-+    VASurfaceID inloop_decoded_picture;
-+
-+    /* sequence layer for AP or meta data for SP and MP */
-+    union {
-+        struct {
-+            unsigned char interlace	: 1; /* SEQUENCE_LAYER::INTERLACE */
-+            unsigned char syncmarker	: 1;/* METADATA::SYNCMARKER */
-+            unsigned char overlap	: 1;/* METADATA::OVERLAP */
-+        } bits;
-+        unsigned char value;
-+    } sequence_fields;
-+
-+    unsigned short coded_width;		/* ENTRY_POINT_LAYER::CODED_WIDTH */
-+    unsigned short coded_height;	/* ENTRY_POINT_LAYER::CODED_HEIGHT */
-+    unsigned char closed_entry;		/* ENTRY_POINT_LAYER::CLOSED_ENTRY */
-+    unsigned char broken_link;		/* ENTRY_POINT_LAYER::BROKEN_LINK */
-+    unsigned char loopfilter;		/* ENTRY_POINT_LAYER::LOOPFILTER */
-+    unsigned char conditional_overlap_flag; /* ENTRY_POINT_LAYER::CONDOVER */
-+    unsigned char fast_uvmc_flag;	/* ENTRY_POINT_LAYER::FASTUVMC */
-+    union {
-+        struct {
-+            unsigned char luma_flag	: 1; /* ENTRY_POINT_LAYER::RANGE_MAPY_FLAG */
-+            unsigned char luma		: 3; /* ENTRY_POINT_LAYER::RANGE_MAPY */
-+            unsigned char chroma_flag	: 1; /* ENTRY_POINT_LAYER::RANGE_MAPUV_FLAG */
-+            unsigned char chroma		: 3; /* ENTRY_POINT_LAYER::RANGE_MAPUV */
-+        } bits;
-+        unsigned char value;
-+    } range_mapping_fields;
-+
-+    unsigned char b_picture_fraction;	/* PICTURE_LAYER::BFRACTION */
-+    unsigned char cbp_table;		/* PICTURE_LAYER::CBPTAB/ICBPTAB */
-+    unsigned char mb_mode_table;	/* PICTURE_LAYER::MBMODETAB */
-+    unsigned char range_reduction_frame;/* PICTURE_LAYER::RANGEREDFRM */
-+    unsigned char rounding_control;	/* PICTURE_LAYER::RNDCTRL */
-+    unsigned char post_processing;	/* PICTURE_LAYER::POSTPROC */
-+    unsigned char picture_resolution_index;	/* PICTURE_LAYER::RESPIC */
-+    unsigned char luma_scale;		/* PICTURE_LAYER::LUMSCALE */
-+    unsigned char luma_shift;		/* PICTURE_LAYER::LUMSHIFT */
-+    union {
-+        struct {
-+            unsigned char picture_type		: 2; /* PICTURE_LAYER::PTYPE */
-+            unsigned char frame_coding_mode	: 3; /* PICTURE_LAYER::FCM */
-+            unsigned char top_field_first	: 1; /* PICTURE_LAYER::TFF */
-+            unsigned char is_first_field		: 1; /* set to 1 if it is the first field */
-+            unsigned char intensity_compensation	: 1; /* PICTURE_LAYER::INTCOMP */
-+        } bits;
-+        unsigned char value;
-+    } picture_fields;
-+    union {
-+        struct {
-+            unsigned char mv_type_mb	: 1; 	/* PICTURE::MVTYPEMB */
-+            unsigned char direct_mb	: 1; 	/* PICTURE::DIRECTMB */
-+            unsigned char skip_mb	: 1; 	/* PICTURE::SKIPMB */
-+            unsigned char field_tx	: 1; 	/* PICTURE::FIELDTX */
-+            unsigned char forward_mb	: 1;	/* PICTURE::FORWARDMB */
-+            unsigned char ac_pred	: 1;	/* PICTURE::ACPRED */
-+            unsigned char overflags	: 1;	/* PICTURE::OVERFLAGS */
-+        } flags;
-+        unsigned char value;
-+    } raw_coding;
-+    union {
-+        struct {
-+            unsigned char bp_mv_type_mb   : 1;    /* PICTURE::MVTYPEMB */
-+            unsigned char bp_direct_mb    : 1;    /* PICTURE::DIRECTMB */
-+            unsigned char bp_skip_mb      : 1;    /* PICTURE::SKIPMB */  
-+            unsigned char bp_field_tx     : 1;    /* PICTURE::FIELDTX */ 
-+            unsigned char bp_forward_mb   : 1;    /* PICTURE::FORWARDMB */
-+            unsigned char bp_ac_pred      : 1;    /* PICTURE::ACPRED */   
-+            unsigned char bp_overflags    : 1;    /* PICTURE::OVERFLAGS */
-+        } flags;
-+        unsigned char value;
-+    } bitplane_present; /* signal what bitplane is being passed via the bitplane buffer */
-+    union {
-+        struct {
-+            unsigned char reference_distance_flag : 1;/* PICTURE_LAYER::REFDIST_FLAG */
-+            unsigned char reference_distance	: 5;/* PICTURE_LAYER::REFDIST */
-+            unsigned char num_reference_pictures: 1;/* PICTURE_LAYER::NUMREF */
-+            unsigned char reference_field_pic_indicator	: 1;/* PICTURE_LAYER::REFFIELD */
-+        } bits;
-+        unsigned short value;
-+    } reference_fields;
-+    union {
-+        struct {
-+            unsigned char mv_mode		: 3; /* PICTURE_LAYER::MVMODE */
-+            unsigned char mv_mode2		: 3; /* PICTURE_LAYER::MVMODE2 */
-+            unsigned char mv_table		: 3; /* PICTURE_LAYER::MVTAB/IMVTAB */
-+            unsigned char two_mv_block_pattern_table: 2; /* PICTURE_LAYER::2MVBPTAB */
-+            unsigned char four_mv_switch		: 1; /* PICTURE_LAYER::4MVSWITCH */
-+            unsigned char four_mv_block_pattern_table : 2; /* PICTURE_LAYER::4MVBPTAB */
-+            unsigned char extended_mv_flag	: 1; /* ENTRY_POINT_LAYER::EXTENDED_MV */
-+            unsigned char extended_mv_range	: 2; /* PICTURE_LAYER::MVRANGE */
-+            unsigned char extended_dmv_flag	: 1; /* ENTRY_POCHAR_LAYER::EXTENDED_DMV */
-+            unsigned char extended_dmv_range	: 2; /* PICTURE_LAYER::DMVRANGE */
-+        } bits;
-+        unsigned int value;
-+    } mv_fields;
-+    union {
-+        struct {
-+            unsigned char dquant	: 2; 	/* ENTRY_POINT_LAYER::DQUANT */
-+            unsigned char quantizer     : 2; 	/* ENTRY_POINT_LAYER::QUANTIZER */
-+            unsigned char half_qp	: 1; 	/* PICTURE_LAYER::HALFQP */
-+            unsigned char pic_quantizer_scale : 5;/* PICTURE_LAYER::PQUANT */
-+            unsigned char pic_quantizer_type : 1;/* PICTURE_LAYER::PQUANTIZER */
-+            unsigned char dq_frame	: 1; 	/* VOPDQUANT::DQUANTFRM */
-+            unsigned char dq_profile	: 2; 	/* VOPDQUANT::DQPROFILE */
-+            unsigned char dq_sb_edge	: 2; 	/* VOPDQUANT::DQSBEDGE */
-+            unsigned char dq_db_edge 	: 2; 	/* VOPDQUANT::DQDBEDGE */
-+            unsigned char dq_binary_level : 1; 	/* VOPDQUANT::DQBILEVEL */
-+            unsigned char alt_pic_quantizer : 5;/* VOPDQUANT::ALTPQUANT */
-+        } bits;
-+        unsigned long value;
-+    } pic_quantizer_fields;
-+    union {
-+        struct {
-+            unsigned char variable_sized_transform_flag	: 1;/* ENTRY_POINT_LAYER::VSTRANSFORM */
-+            unsigned char mb_level_transform_type_flag	: 1;/* PICTURE_LAYER::TTMBF */
-+            unsigned char frame_level_transform_type	: 2;/* PICTURE_LAYER::TTFRM */
-+            unsigned char transform_ac_codingset_idx1	: 2;/* PICTURE_LAYER::TRANSACFRM */
-+            unsigned char transform_ac_codingset_idx2	: 2;/* PICTURE_LAYER::TRANSACFRM2 */
-+            unsigned char intra_transform_dc_table	: 1;/* PICTURE_LAYER::TRANSDCTAB */
-+        } bits;
-+        unsigned short value;
-+    } transform_fields;
-+} VAPictureParameterBufferVC1_0_30;
-+
-+/* MPEG-2 Picture Parameter Buffer (0.30) */
-+typedef struct _VAPictureParameterBufferMPEG2_0_30
-+{
-+    unsigned short horizontal_size;
-+    unsigned short vertical_size;
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    /* meanings of the following fields are the same as in the standard */
-+    int picture_coding_type;
-+    int f_code; /* pack all four fcode into this */
-+    union {
-+        struct {
-+            unsigned int intra_dc_precision		: 2; 
-+            unsigned int picture_structure		: 2; 
-+            unsigned int top_field_first		: 1; 
-+            unsigned int frame_pred_frame_dct		: 1; 
-+            unsigned int concealment_motion_vectors	: 1;
-+            unsigned int q_scale_type			: 1;
-+            unsigned int intra_vlc_format		: 1;
-+            unsigned int alternate_scan			: 1;
-+            unsigned int repeat_first_field		: 1;
-+            unsigned int progressive_frame		: 1;
-+            unsigned int is_first_field			: 1; /* indicate whether the current field
-+                                                              * is the first field for field picture
-+                                                              */
-+        } bits;
-+        unsigned int value;
-+    } picture_coding_extension;
-+} VAPictureParameterBufferMPEG2_0_30;
-+
-+/* MPEG-2 Slice Parameter Buffer (0.29) */
-+typedef VASliceParameterBufferMPEG2_0_29 VASliceParameterBufferMPEG2_0_30;
-+
-+/* MPEG-4 Picture Parameter Buffer (0.30) */
-+typedef struct _VAPictureParameterBufferMPEG4_0_30
-+{
-+    unsigned short vop_width;
-+    unsigned short vop_height;
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    union {
-+        struct {
-+            unsigned char short_video_header		: 1; 
-+            unsigned char chroma_format			: 2; 
-+            unsigned char interlaced			: 1; 
-+            unsigned char obmc_disable			: 1; 
-+            unsigned char sprite_enable			: 2; 
-+            unsigned char sprite_warping_accuracy	: 2; 
-+            unsigned char quant_type			: 1; 
-+            unsigned char quarter_sample			: 1; 
-+            unsigned char data_partitioned		: 1; 
-+            unsigned char reversible_vlc			: 1; 
-+        } bits;
-+        unsigned short value;
-+    } vol_fields;
-+    unsigned char no_of_sprite_warping_points;
-+    short sprite_trajectory_du[3];
-+    short sprite_trajectory_dv[3];
-+    unsigned char quant_precision;
-+    union {
-+        struct {
-+            unsigned char vop_coding_type		: 2; 
-+            unsigned char backward_reference_vop_coding_type	: 2; 
-+            unsigned char vop_rounding_type		: 1; 
-+            unsigned char intra_dc_vlc_thr		: 3; 
-+            unsigned char top_field_first		: 1; 
-+            unsigned char alternate_vertical_scan_flag	: 1; 
-+        } bits;
-+        unsigned short value;
-+    } vop_fields;
-+    unsigned char vop_fcode_forward;
-+    unsigned char vop_fcode_backward;
-+    /* short header related */
-+    unsigned char num_gobs_in_vop;
-+    unsigned char num_macroblocks_in_gob;
-+    /* for direct mode prediction */
-+    short TRB;
-+    short TRD;
-+} VAPictureParameterBufferMPEG4_0_30;
-+
-+/* Encode Slice Parameter Buffer (0.30) */
-+typedef struct _VAEncSliceParameterBuffer_0_30
-+{
-+    unsigned int start_row_number;	/* starting MB row number for this slice */
-+    unsigned int slice_height;	/* slice height measured in MB */
-+    union {
-+        struct {
-+            unsigned char is_intra	: 1;
-+            unsigned char disable_deblocking_filter_idc : 2;
-+        } bits;
-+        unsigned char value;
-+    } slice_flags;
-+} VAEncSliceParameterBuffer_0_30;
-+
-+/* MPEG-4 Picture Parameter Buffer (0.31) */
-+typedef struct _VAPictureParameterBufferMPEG4_0_31
-+{
-+    unsigned short vop_width;
-+    unsigned short vop_height;
-+    VASurfaceID forward_reference_picture;
-+    VASurfaceID backward_reference_picture;
-+    union {
-+        struct {
-+            unsigned int short_video_header		: 1; 
-+            unsigned int chroma_format			: 2; 
-+            unsigned int interlaced			: 1; 
-+            unsigned int obmc_disable			: 1; 
-+            unsigned int sprite_enable			: 2; 
-+            unsigned int sprite_warping_accuracy	: 2; 
-+            unsigned int quant_type			: 1; 
-+            unsigned int quarter_sample			: 1; 
-+            unsigned int data_partitioned		: 1; 
-+            unsigned int reversible_vlc			: 1; 
-+        } bits;
-+        unsigned int value;
-+    } vol_fields;
-+    unsigned char no_of_sprite_warping_points;
-+    short sprite_trajectory_du[3];
-+    short sprite_trajectory_dv[3];
-+    unsigned char quant_precision;
-+    union {
-+        struct {
-+            unsigned int vop_coding_type		: 2; 
-+            unsigned int backward_reference_vop_coding_type	: 2; 
-+            unsigned int vop_rounding_type		: 1; 
-+            unsigned int intra_dc_vlc_thr		: 3; 
-+            unsigned int top_field_first		: 1; 
-+            unsigned int alternate_vertical_scan_flag	: 1; 
-+        } bits;
-+        unsigned int value;
-+    } vop_fields;
-+    unsigned char vop_fcode_forward;
-+    unsigned char vop_fcode_backward;
-+    /* short header related */
-+    unsigned char num_gobs_in_vop;
-+    unsigned char num_macroblocks_in_gob;
-+    /* for direct mode prediction */
-+    short TRB;
-+    short TRD;
-+} VAPictureParameterBufferMPEG4_0_31;
-+
-+typedef struct VADriverContext_0_29 *VADriverContextP_0_29;
-+
-+/* Driver VTable (0.29) */
-+struct VADriverVTable_0_29
-+{
-+	VAStatus (*vaTerminate) ( VADriverContextP_0_29 ctx );
-+
-+	VAStatus (*vaQueryConfigProfiles) (
-+		VADriverContextP_0_29 ctx,
-+		VAProfile *profile_list,	/* out */
-+		int *num_profiles			/* out */
-+	);
-+
-+	VAStatus (*vaQueryConfigEntrypoints) (
-+		VADriverContextP_0_29 ctx,
-+		VAProfile profile,
-+		VAEntrypoint  *entrypoint_list,	/* out */
-+		int *num_entrypoints			/* out */
-+	);
-+
-+	VAStatus (*vaGetConfigAttributes) (
-+		VADriverContextP_0_29 ctx,
-+		VAProfile profile,
-+		VAEntrypoint entrypoint,
-+		VAConfigAttrib *attrib_list,	/* in/out */
-+		int num_attribs
-+	);
-+
-+	VAStatus (*vaCreateConfig) (
-+		VADriverContextP_0_29 ctx,
-+		VAProfile profile, 
-+		VAEntrypoint entrypoint, 
-+		VAConfigAttrib *attrib_list,
-+		int num_attribs,
-+		VAConfigID *config_id		/* out */
-+	);
-+
-+	VAStatus (*vaDestroyConfig) (
-+		VADriverContextP_0_29 ctx,
-+		VAConfigID config_id
-+	);
-+
-+	VAStatus (*vaQueryConfigAttributes) (
-+		VADriverContextP_0_29 ctx,
-+		VAConfigID config_id, 
-+		VAProfile *profile,		/* out */
-+		VAEntrypoint *entrypoint, 	/* out */
-+		VAConfigAttrib *attrib_list,	/* out */
-+		int *num_attribs		/* out */
-+	);
-+
-+	VAStatus (*vaCreateSurfaces) (
-+		VADriverContextP_0_29 ctx,
-+		int width,
-+		int height,
-+		int format,
-+		int num_surfaces,
-+		VASurfaceID *surfaces		/* out */
-+	);
-+
-+	VAStatus (*vaDestroySurfaces) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID *surface_list,
-+		int num_surfaces
-+	);
-+
-+	VAStatus (*vaCreateContext) (
-+		VADriverContextP_0_29 ctx,
-+		VAConfigID config_id,
-+		int picture_width,
-+		int picture_height,
-+		int flag,
-+		VASurfaceID *render_targets,
-+		int num_render_targets,
-+		VAContextID *context		/* out */
-+	);
-+
-+	VAStatus (*vaDestroyContext) (
-+		VADriverContextP_0_29 ctx,
-+		VAContextID context
-+	);
-+
-+	VAStatus (*vaCreateBuffer) (
-+		VADriverContextP_0_29 ctx,
-+		VAContextID context,		/* in */
-+		VABufferType type,		/* in */
-+		unsigned int size,		/* in */
-+		unsigned int num_elements,	/* in */
-+		void *data,			/* in */
-+		VABufferID *buf_id		/* out */
-+	);
-+
-+	VAStatus (*vaBufferSetNumElements) (
-+		VADriverContextP_0_29 ctx,
-+		VABufferID buf_id,	/* in */
-+		unsigned int num_elements	/* in */
-+	);
-+
-+	VAStatus (*vaMapBuffer) (
-+		VADriverContextP_0_29 ctx,
-+		VABufferID buf_id,	/* in */
-+		void **pbuf         /* out */
-+	);
-+
-+	VAStatus (*vaUnmapBuffer) (
-+		VADriverContextP_0_29 ctx,
-+		VABufferID buf_id	/* in */
-+	);
-+
-+	VAStatus (*vaDestroyBuffer) (
-+		VADriverContextP_0_29 ctx,
-+		VABufferID buffer_id
-+	);
-+
-+	VAStatus (*vaBeginPicture) (
-+		VADriverContextP_0_29 ctx,
-+		VAContextID context,
-+		VASurfaceID render_target
-+	);
-+
-+	VAStatus (*vaRenderPicture) (
-+		VADriverContextP_0_29 ctx,
-+		VAContextID context,
-+		VABufferID *buffers,
-+		int num_buffers
-+	);
-+
-+	VAStatus (*vaEndPicture) (
-+		VADriverContextP_0_29 ctx,
-+		VAContextID context
-+	);
-+
-+	VAStatus (*vaSyncSurface) (
-+		VADriverContextP_0_29 ctx,
-+		VAContextID context,
-+		VASurfaceID render_target
-+	);
-+
-+	VAStatus (*vaQuerySurfaceStatus) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID render_target,
-+		VASurfaceStatus *status	/* out */
-+	);
-+
-+	VAStatus (*vaPutSurface) (
-+    		VADriverContextP_0_29 ctx,
-+		VASurfaceID surface,
-+		unsigned long draw, /* X Drawable */
-+		short srcx,
-+		short srcy,
-+		unsigned short srcw,
-+		unsigned short srch,
-+		short destx,
-+		short desty,
-+		unsigned short destw,
-+		unsigned short desth,
-+		VARectangle *cliprects, /* client supplied clip list */
-+		unsigned int number_cliprects, /* number of clip rects in the clip list */
-+		unsigned int flags /* de-interlacing flags */
-+	);
-+
-+	VAStatus (*vaQueryImageFormats) (
-+		VADriverContextP_0_29 ctx,
-+		VAImageFormat *format_list,        /* out */
-+		int *num_formats           /* out */
-+	);
-+
-+	VAStatus (*vaCreateImage) (
-+		VADriverContextP_0_29 ctx,
-+		VAImageFormat *format,
-+		int width,
-+		int height,
-+		VAImage *image     /* out */
-+	);
-+
-+	VAStatus (*vaDeriveImage) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID surface,
-+		VAImage *image     /* out */
-+	);
-+
-+	VAStatus (*vaDestroyImage) (
-+		VADriverContextP_0_29 ctx,
-+		VAImageID image
-+	);
-+	
-+	VAStatus (*vaSetImagePalette) (
-+	        VADriverContextP_0_29 ctx,
-+	        VAImageID image,
-+	        /*
-+                 * pointer to an array holding the palette data.  The size of the array is
-+                 * num_palette_entries * entry_bytes in size.  The order of the components
-+                 * in the palette is described by the component_order in VAImage struct
-+                 */
-+                unsigned char *palette
-+	);
-+	
-+	VAStatus (*vaGetImage) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID surface,
-+		int x,     /* coordinates of the upper left source pixel */
-+		int y,
-+		unsigned int width, /* width and height of the region */
-+		unsigned int height,
-+		VAImageID image
-+	);
-+
-+	VAStatus (*vaPutImage) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID surface,
-+		VAImageID image,
-+		int src_x,
-+		int src_y,
-+		unsigned int width,
-+		unsigned int height,
-+		int dest_x,
-+		int dest_y 
-+	);
-+
-+	VAStatus (*vaPutImage2) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID surface,
-+		VAImageID image,
-+		int src_x,
-+		int src_y,
-+		unsigned int src_width,
-+		unsigned int src_height,
-+		int dest_x,
-+		int dest_y,
-+		unsigned int dest_width,
-+		unsigned int dest_height
-+	);
-+
-+	VAStatus (*vaQuerySubpictureFormats) (
-+		VADriverContextP_0_29 ctx,
-+		VAImageFormat *format_list,        /* out */
-+		unsigned int *flags,       /* out */
-+		unsigned int *num_formats  /* out */
-+	);
-+
-+	VAStatus (*vaCreateSubpicture) (
-+		VADriverContextP_0_29 ctx,
-+		VAImageID image,
-+		VASubpictureID *subpicture   /* out */
-+	);
-+
-+	VAStatus (*vaDestroySubpicture) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture
-+	);
-+
-+        VAStatus (*vaSetSubpictureImage) (
-+                VADriverContextP_0_29 ctx,
-+                VASubpictureID subpicture,
-+                VAImageID image
-+        );
-+        
-+	VAStatus (*vaSetSubpicturePalette) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture,
-+		/*
-+		 * pointer to an array holding the palette data.  The size of the array is
-+		 * num_palette_entries * entry_bytes in size.  The order of the components
-+		 * in the palette is described by the component_order in VASubpicture struct
-+		 */
-+		unsigned char *palette
-+	);
-+
-+	VAStatus (*vaSetSubpictureChromakey) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture,
-+		unsigned int chromakey_min,
-+		unsigned int chromakey_max,
-+		unsigned int chromakey_mask
-+	);
-+
-+	VAStatus (*vaSetSubpictureGlobalAlpha) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture,
-+		float global_alpha 
-+	);
-+
-+	VAStatus (*vaAssociateSubpicture) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture,
-+		VASurfaceID *target_surfaces,
-+		int num_surfaces,
-+		short src_x, /* upper left offset in subpicture */
-+		short src_y,
-+		short dest_x, /* upper left offset in surface */
-+		short dest_y,
-+		unsigned short width,
-+		unsigned short height,
-+		/*
-+		 * whether to enable chroma-keying or global-alpha
-+		 * see VA_SUBPICTURE_XXX values
-+		 */
-+		unsigned int flags
-+	);
-+
-+	VAStatus (*vaAssociateSubpicture2) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture,
-+		VASurfaceID *target_surfaces,
-+		int num_surfaces,
-+		short src_x, /* upper left offset in subpicture */
-+		short src_y,
-+		unsigned short src_width,
-+		unsigned short src_height,
-+		short dest_x, /* upper left offset in surface */
-+		short dest_y,
-+		unsigned short dest_width,
-+		unsigned short dest_height,
-+		/*
-+		 * whether to enable chroma-keying or global-alpha
-+		 * see VA_SUBPICTURE_XXX values
-+		 */
-+		unsigned int flags
-+	);
-+
-+	VAStatus (*vaDeassociateSubpicture) (
-+		VADriverContextP_0_29 ctx,
-+		VASubpictureID subpicture,
-+		VASurfaceID *target_surfaces,
-+		int num_surfaces
-+	);
-+
-+	VAStatus (*vaQueryDisplayAttributes) (
-+		VADriverContextP_0_29 ctx,
-+		VADisplayAttribute *attr_list,	/* out */
-+		int *num_attributes		/* out */
-+        );
-+
-+	VAStatus (*vaGetDisplayAttributes) (
-+		VADriverContextP_0_29 ctx,
-+		VADisplayAttribute *attr_list,	/* in/out */
-+		int num_attributes
-+        );
-+        
-+        VAStatus (*vaSetDisplayAttributes) (
-+		VADriverContextP_0_29 ctx,
-+                VADisplayAttribute *attr_list,
-+                int num_attributes
-+        );
-+
-+
-+	VAStatus (*vaDbgCopySurfaceToBuffer) (
-+		VADriverContextP_0_29 ctx,
-+		VASurfaceID surface,
-+		void **buffer, /* out */
-+		unsigned int *stride /* out */
-+	);
-+};
-+
-+/* Driver context (0.29) */
-+struct VADriverContext_0_29
-+{
-+    void *old_pNext;			/* preserved for binary compatibility */
-+
-+    void *pDriverData;
-+    struct VADriverVTable_0_29 vtable;
-+
-+    void *x11_dpy;
-+    int x11_screen;
-+
-+    int version_major;
-+    int version_minor;
-+    int max_profiles;
-+    int max_entrypoints;
-+    int max_attributes;
-+    int max_image_formats;
-+    int max_subpic_formats;
-+    int max_display_attributes;
-+    const char *str_vendor;
-+
-+    void *handle;			/* dlopen handle */
-+};
-+
-+/* Forward declarations for VA API 0.30 */
-+struct v4l2_format;
-+struct v4l2_buffer;
-+typedef struct VADriverContext_0_30 *VADriverContextP_0_30;
-+
-+/* Driver VTable (0.30) */
-+struct VADriverVTable_0_30
-+{
-+	VAStatus (*vaTerminate) ( VADriverContextP_0_30 ctx );
-+
-+	VAStatus (*vaQueryConfigProfiles) (
-+		VADriverContextP_0_30 ctx,
-+		VAProfile *profile_list,	/* out */
-+		int *num_profiles			/* out */
-+	);
-+
-+	VAStatus (*vaQueryConfigEntrypoints) (
-+		VADriverContextP_0_30 ctx,
-+		VAProfile profile,
-+		VAEntrypoint  *entrypoint_list,	/* out */
-+		int *num_entrypoints			/* out */
-+	);
-+
-+	VAStatus (*vaGetConfigAttributes) (
-+		VADriverContextP_0_30 ctx,
-+		VAProfile profile,
-+		VAEntrypoint entrypoint,
-+		VAConfigAttrib *attrib_list,	/* in/out */
-+		int num_attribs
-+	);
-+
-+	VAStatus (*vaCreateConfig) (
-+		VADriverContextP_0_30 ctx,
-+		VAProfile profile, 
-+		VAEntrypoint entrypoint, 
-+		VAConfigAttrib *attrib_list,
-+		int num_attribs,
-+		VAConfigID *config_id		/* out */
-+	);
-+
-+	VAStatus (*vaDestroyConfig) (
-+		VADriverContextP_0_30 ctx,
-+		VAConfigID config_id
-+	);
-+
-+	VAStatus (*vaQueryConfigAttributes) (
-+		VADriverContextP_0_30 ctx,
-+		VAConfigID config_id, 
-+		VAProfile *profile,		/* out */
-+		VAEntrypoint *entrypoint, 	/* out */
-+		VAConfigAttrib *attrib_list,	/* out */
-+		int *num_attribs		/* out */
-+	);
-+
-+	VAStatus (*vaCreateSurfaces) (
-+		VADriverContextP_0_30 ctx,
-+		int width,
-+		int height,
-+		int format,
-+		int num_surfaces,
-+		VASurfaceID *surfaces		/* out */
-+	);
-+
-+	VAStatus (*vaDestroySurfaces) (
-+		VADriverContextP_0_30 ctx,
-+		VASurfaceID *surface_list,
-+		int num_surfaces
-+	);
-+
-+	VAStatus (*vaCreateContext) (
-+		VADriverContextP_0_30 ctx,
-+		VAConfigID config_id,
-+		int picture_width,
-+		int picture_height,
-+		int flag,
-+		VASurfaceID *render_targets,
-+		int num_render_targets,
-+		VAContextID *context		/* out */
-+	);
-+
-+	VAStatus (*vaDestroyContext) (
-+		VADriverContextP_0_30 ctx,
-+		VAContextID context
-+	);
-+
-+	VAStatus (*vaCreateBuffer) (
-+		VADriverContextP_0_30 ctx,
-+		VAContextID context,		/* in */
-+		VABufferType type,		/* in */
-+		unsigned int size,		/* in */
-+		unsigned int num_elements,	/* in */
-+		void *data,			/* in */
-+		VABufferID *buf_id		/* out */
-+	);
-+
-+	VAStatus (*vaBufferSetNumElements) (
-+		VADriverContextP_0_30 ctx,
-+		VABufferID buf_id,	/* in */
-+		unsigned int num_elements	/* in */
-+	);
-+
-+	VAStatus (*vaMapBuffer) (
-+		VADriverContextP_0_30 ctx,
-+		VABufferID buf_id,	/* in */
-+		void **pbuf         /* out */
-+	);
-+
-+	VAStatus (*vaUnmapBuffer) (
-+		VADriverContextP_0_30 ctx,
-+		VABufferID buf_id	/* in */
-+	);
-+
-+	VAStatus (*vaDestroyBuffer) (
-+		VADriverContextP_0_30 ctx,
-+		VABufferID buffer_id
-+	);
-+
-+	VAStatus (*vaBeginPicture) (
-+		VADriverContextP_0_30 ctx,
-+		VAContextID context,
-+		VASurfaceID render_target
-+	);
-+
-+	VAStatus (*vaRenderPicture) (
-+		VADriverContextP_0_30 ctx,
-+		VAContextID context,
-+		VABufferID *buffers,
-+		int num_buffers
-+	);
-+
-+	VAStatus (*vaEndPicture) (
-+		VADriverContextP_0_30 ctx,
-+		VAContextID context
-+	);
-+
-+	VAStatus (*vaSyncSurface) (
-+		VADriverContextP_0_30 ctx,
-+		VAContextID context,
-+		VASurfaceID render_target
-+	);
-+
-+	VAStatus (*vaQuerySurfaceStatus) (
-+		VADriverContextP_0_30 ctx,
-+		VASurfaceID render_target,
-+		VASurfaceStatus *status	/* out */
-+	);
-+
-+	VAStatus (*vaPutSurface) (
-+    		VADriverContextP_0_30 ctx,
-+		VASurfaceID surface,
-+		unsigned long draw, /* X Drawable */
-+		short srcx,
-+		short srcy,
-+		unsigned short srcw,
-+		unsigned short srch,
-+		short destx,
-+		short desty,
-+		unsigned short destw,
-+		unsigned short desth,
-+		VARectangle *cliprects, /* client supplied clip list */
-+		unsigned int number_cliprects, /* number of clip rects in the clip list */
-+		unsigned int flags /* de-interlacing flags */
-+	);
-+
-+	VAStatus (*vaQueryImageFormats) (
-+		VADriverContextP_0_30 ctx,
-+		VAImageFormat *format_list,        /* out */
-+		int *num_formats           /* out */
-+	);
-+
-+	VAStatus (*vaCreateImage) (
-+		VADriverContextP_0_30 ctx,
-+		VAImageFormat *format,
-+		int width,
-+		int height,
-+		VAImage *image     /* out */
-+	);
-+
-+	VAStatus (*vaDeriveImage) (
-+		VADriverContextP_0_30 ctx,
-+		VASurfaceID surface,
-+		VAImage *image     /* out */
-+	);
-+
-+	VAStatus (*vaDestroyImage) (
-+		VADriverContextP_0_30 ctx,
-+		VAImageID image
-+	);
-+	
-+	VAStatus (*vaSetImagePalette) (
-+	        VADriverContextP_0_30 ctx,
-+	        VAImageID image,
-+	        /*
-+                 * pointer to an array holding the palette data.  The size of the array is
-+                 * num_palette_entries * entry_bytes in size.  The order of the components
-+                 * in the palette is described by the component_order in VAImage struct
-+                 */
-+                unsigned char *palette
-+	);
-+	
-+	VAStatus (*vaGetImage) (
-+		VADriverContextP_0_30 ctx,
-+		VASurfaceID surface,
-+		int x,     /* coordinates of the upper left source pixel */
-+		int y,
-+		unsigned int width, /* width and height of the region */
-+		unsigned int height,
-+		VAImageID image
-+	);
-+
-+	VAStatus (*vaPutImage) (
-+		VADriverContextP_0_30 ctx,
-+		VASurfaceID surface,
-+		VAImageID image,
-+		int src_x,
-+		int src_y,
-+		unsigned int width,
-+		unsigned int height,
-+		int dest_x,
-+		int dest_y 
-+	);
-+
-+	VAStatus (*vaPutImage2) (
-+		VADriverContextP_0_30 ctx,
-+		VASurfaceID surface,
-+		VAImageID image,
-+		int src_x,
-+		int src_y,
-+		unsigned int src_width,
-+		unsigned int src_height,
-+		int dest_x,
-+		int dest_y,
-+		unsigned int dest_width,
-+		unsigned int dest_height
-+	);
-+
-+	VAStatus (*vaQuerySubpictureFormats) (
-+		VADriverContextP_0_30 ctx,
-+		VAImageFormat *format_list,        /* out */
-+		unsigned int *flags,       /* out */
-+		unsigned int *num_formats  /* out */
-+	);
-+
-+	VAStatus (*vaCreateSubpicture) (
-+		VADriverContextP_0_30 ctx,
-+		VAImageID image,
-+		VASubpictureID *subpicture   /* out */
-+	);
-+
-+	VAStatus (*vaDestroySubpicture) (
-+		VADriverContextP_0_30 ctx,
-+		VASubpictureID subpicture
-+	);
-+
-+        VAStatus (*vaSetSubpictureImage) (
-+                VADriverContextP_0_30 ctx,
-+                VASubpictureID subpicture,
-+                VAImageID image
-+        );
-+
-+	VAStatus (*vaSetSubpictureChromakey) (
-+		VADriverContextP_0_30 ctx,
-+		VASubpictureID subpicture,
-+		unsigned int chromakey_min,
-+		unsigned int chromakey_max,
-+		unsigned int chromakey_mask
-+	);
-+
-+	VAStatus (*vaSetSubpictureGlobalAlpha) (
-+		VADriverContextP_0_30 ctx,
-+		VASubpictureID subpicture,
-+		float global_alpha 
-+	);
-+
-+	VAStatus (*vaAssociateSubpicture) (
-+		VADriverContextP_0_30 ctx,
-+		VASubpictureID subpicture,
-+		VASurfaceID *target_surfaces,
-+		int num_surfaces,
-+		short src_x, /* upper left offset in subpicture */
-+		short src_y,
-+		short dest_x, /* upper left offset in surface */
-+		short dest_y,
-+		unsigned short width,
-+		unsigned short height,
-+		/*
-+		 * whether to enable chroma-keying or global-alpha
-+		 * see VA_SUBPICTURE_XXX values
-+		 */
-+		unsigned int flags
-+	);
-+
-+	VAStatus (*vaAssociateSubpicture2) (
-+		VADriverContextP_0_30 ctx,
-+		VASubpictureID subpicture,
-+		VASurfaceID *target_surfaces,
-+		int num_surfaces,
-+		short src_x, /* upper left offset in subpicture */
-+		short src_y,
-+		unsigned short src_width,
-+		unsigned short src_height,
-+		short dest_x, /* upper left offset in surface */
-+		short dest_y,
-+		unsigned short dest_width,
-+		unsigned short dest_height,
-+		/*
-+		 * whether to enable chroma-keying or global-alpha
-+		 * see VA_SUBPICTURE_XXX values
-+		 */
-+		unsigned int flags
-+	);
-+
-+	VAStatus (*vaDeassociateSubpicture) (
-+		VADriverContextP_0_30 ctx,
-+		VASubpictureID subpicture,
-+		VASurfaceID *target_surfaces,
-+		int num_surfaces
-+	);
-+
-+	VAStatus (*vaQueryDisplayAttributes) (
-+		VADriverContextP_0_30 ctx,
-+		VADisplayAttribute *attr_list,	/* out */
-+		int *num_attributes		/* out */
-+        );
-+
-+	VAStatus (*vaGetDisplayAttributes) (
-+		VADriverContextP_0_30 ctx,
-+		VADisplayAttribute *attr_list,	/* in/out */
-+		int num_attributes
-+        );
-+        
-+        VAStatus (*vaSetDisplayAttributes) (
-+		VADriverContextP_0_30 ctx,
-+                VADisplayAttribute *attr_list,
-+                int num_attributes
-+        );
-+
-+        /* device specific */
-+	VAStatus (*vaCreateSurfaceFromCIFrame) (
-+		VADriverContextP_0_30 ctx,
-+		unsigned long frame_id,
-+		VASurfaceID *surface		/* out */
-+	);
-+    
-+    
-+        VAStatus (*vaCreateSurfaceFromV4L2Buf) (
-+		VADriverContextP_0_30 ctx,
-+                int v4l2_fd,         /* file descriptor of V4L2 device */
-+                struct v4l2_format *v4l2_fmt,       /* format of V4L2 */
-+                struct v4l2_buffer *v4l2_buf,       /* V4L2 buffer */
-+                VASurfaceID *surface	           /* out */
-+        );
-+    
-+        VAStatus (*vaCopySurfaceToBuffer) (
-+		VADriverContextP_0_30 ctx,
-+                VASurfaceID surface,
-+                unsigned int *fourcc, /* out  for follow argument */
-+                unsigned int *luma_stride,
-+                unsigned int *chroma_u_stride,
-+                unsigned int *chroma_v_stride,
-+                unsigned int *luma_offset,
-+                unsigned int *chroma_u_offset,
-+                unsigned int *chroma_v_offset,
-+                void **buffer
-+        );
-+};
-+
-+/* Driver context (0.30) */
-+struct VADriverContext_0_30
-+{
-+    void *pDriverData;
-+    struct VADriverVTable_0_30 vtable;
-+
-+    void *x11_dpy;
-+    int x11_screen;
-+    int version_major;
-+    int version_minor;
-+    int max_profiles;
-+    int max_entrypoints;
-+    int max_attributes;
-+    int max_image_formats;
-+    int max_subpic_formats;
-+    int max_display_attributes;
-+    const char *str_vendor;
-+
-+    void *handle;			/* dlopen handle */
-+    
-+    void *dri_state;
-+};
-+
-+/* Driver VTable and context (0.31) */
-+#define VADriverVTable_0_31     VADriverVTable
-+#define VADriverContext_0_31    VADriverContext
-+
-+#endif /* VA_COMPAT_H */
-diff --git a/src/va_compat_template.h b/src/va_compat_template.h
-new file mode 100644
-index 0000000..18349de
---- /dev/null
-+++ b/src/va_compat_template.h
-@@ -0,0 +1,539 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#undef  CONCAT_
-+#define CONCAT_(x, y)                   x##y
-+#undef  CONCAT
-+#define CONCAT(x, y)                    CONCAT_(x, y)
-+#undef  MKCOMPAT_
-+#define MKCOMPAT_(NAME,MINOR)           CONCAT(CONCAT(NAME,_0_),MINOR)
-+#undef  MKCOMPAT
-+#define MKCOMPAT(NAME)                  MKCOMPAT_(NAME,COMPAT_MINOR)
-+#undef  STRUCT
-+#define STRUCT(BUFFER, CODEC)           MKCOMPAT(VA##BUFFER##Buffer##CODEC)
-+#undef  TRANSLATE_1
-+#define TRANSLATE_1(NAME)               CONCAT(va_compat_translate_,NAME)
-+#undef  TRANSLATE_
-+#define TRANSLATE_(NAME)                TRANSLATE_1(MKCOMPAT(NAME))
-+#undef  TRANSLATE
-+#define TRANSLATE(BUFFER, CODEC)        TRANSLATE_1(STRUCT(BUFFER,CODEC))
-+
-+#undef  COPY_ARRAY
-+#define COPY_ARRAY(DST, SRC, ARRAY) \
-+    memcpy((DST)->ARRAY, (SRC)->ARRAY, sizeof((DST)->ARRAY))
-+
-+#undef  COPY_FIELD
-+#define COPY_FIELD(DST, SRC, MEMBER) \
-+    (DST)->MEMBER = (SRC)->MEMBER
-+
-+#undef  COPY_VTABLE__
-+#define COPY_VTABLE__(DST, DST_MEMBER, SRC, SRC_MEMBER) \
-+    (DST##_vtable)->DST_MEMBER = (SRC##_vtable)->SRC_MEMBER
-+
-+#undef  COPY_VTABLE_
-+#define COPY_VTABLE_(DST, DST_SUFFIX, SRC, MEMBER) \
-+    COPY_VTABLE__(DST, MEMBER##_##DST_SUFFIX, SRC, MEMBER)
-+
-+#undef  COPY_VTABLE
-+#define COPY_VTABLE(DST, SRC, MEMBER) \
-+    COPY_VTABLE__(DST, MEMBER, SRC, MEMBER)
-+
-+/* 0.29 */
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR == 29
-+#undef  BFV
-+#define BFV(a, b) a
-+#undef  BFM
-+#define BFM(a, b, c) c
-+#undef  COPY_BIT_FIELD
-+#define COPY_BIT_FIELD(DST, SRC, FIELD, MEMBER)  \
-+    (DST)->MEMBER = (SRC)->FIELD.bits.MEMBER
-+#undef  COPY_BIT_FLAG
-+#define COPY_BIT_FLAG(DST, SRC, FIELD, MEMBER)  \
-+    (DST)->MEMBER = (SRC)->FIELD.flags.MEMBER
-+#endif
-+
-+/* 0.29 glue to match 0.30 names */
-+#undef M_raw_coding
-+#undef M_bitplane_present
-+#undef M_luma_flag
-+#undef M_luma
-+#undef M_chroma_flag
-+#undef M_chroma
-+
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR == 29
-+#define M_raw_coding            raw_coding_flag
-+#define M_bitplane_present      bitplane_present_flag
-+#define M_luma_flag             range_mapping_luma_flag
-+#define M_luma                  range_mapping_luma
-+#define M_chroma_flag           range_mapping_chroma_flag
-+#define M_chroma                range_mapping_chroma
-+#else
-+#define M_raw_coding            raw_coding
-+#define M_bitplane_present      bitplane_present
-+#define M_luma_flag             luma_flag
-+#define M_luma                  luma
-+#define M_chroma_flag           chroma_flag
-+#define M_chroma                chroma
-+#endif
-+
-+/* 0.30 */
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR == 30
-+#undef  BFV
-+#define BFV(a, b) a.b
-+#undef  BFM
-+#define BFM(a, b, c) a.b.c
-+#undef  COPY_BIT_FIELD
-+#define COPY_BIT_FIELD(DST, SRC, FIELD, MEMBER)  \
-+    (DST)->FIELD.bits.MEMBER = (SRC)->FIELD.bits.MEMBER
-+#undef  COPY_BIT_FLAG
-+#define COPY_BIT_FLAG(DST, SRC, FIELD, MEMBER)  \
-+    (DST)->FIELD.flags.MEMBER = (SRC)->FIELD.flags.MEMBER
-+#endif
-+
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR < 31
-+static VAStatus TRANSLATE_(VAPictureH264)(
-+    VACompatContextP    ctx,
-+    void               *dest_pic,
-+    const void         *src_pic
-+)
-+{
-+    MKCOMPAT(VAPictureH264) *dest = dest_pic;
-+    const VAPictureH264 *src = src_pic;
-+
-+    COPY_FIELD(dest, src, picture_id);
-+    COPY_FIELD(dest, src, flags);
-+    COPY_FIELD(dest, src, TopFieldOrderCnt);
-+    COPY_FIELD(dest, src, BottomFieldOrderCnt);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus TRANSLATE(PictureParameter,H264)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    STRUCT(PictureParameter,H264) *dest = dest_buffer;
-+    const VAPictureParameterBufferH264 *src = src_buffer;
-+    VAStatus status;
-+    int i;
-+
-+    status = TRANSLATE_(VAPictureH264)(ctx,
-+                                      &dest->CurrPic, &src->CurrPic);
-+    if (status != VA_STATUS_SUCCESS)
-+        return status;
-+
-+    for (i = 0; i < 16; i++) {
-+        status = TRANSLATE_(VAPictureH264)(ctx,
-+                                           &dest->ReferenceFrames[i],
-+                                           &src->ReferenceFrames[i]);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+    }
-+
-+    COPY_FIELD(dest, src, picture_width_in_mbs_minus1);
-+    COPY_FIELD(dest, src, picture_height_in_mbs_minus1);
-+    COPY_FIELD(dest, src, bit_depth_luma_minus8);
-+    COPY_FIELD(dest, src, bit_depth_chroma_minus8);
-+    COPY_FIELD(dest, src, num_ref_frames);
-+    dest->BFV(seq_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, seq_fields, chroma_format_idc);
-+    COPY_BIT_FIELD(dest, src, seq_fields, residual_colour_transform_flag);
-+    COPY_BIT_FIELD(dest, src, seq_fields, frame_mbs_only_flag);
-+    COPY_BIT_FIELD(dest, src, seq_fields, mb_adaptive_frame_field_flag);
-+    COPY_BIT_FIELD(dest, src, seq_fields, direct_8x8_inference_flag);
-+    COPY_BIT_FIELD(dest, src, seq_fields, MinLumaBiPredSize8x8);
-+    COPY_FIELD(dest, src, num_slice_groups_minus1);
-+    COPY_FIELD(dest, src, slice_group_map_type);
-+    COPY_FIELD(dest, src, pic_init_qp_minus26);
-+    COPY_FIELD(dest, src, chroma_qp_index_offset);
-+    COPY_FIELD(dest, src, second_chroma_qp_index_offset);
-+    dest->BFV(pic_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, pic_fields, entropy_coding_mode_flag);
-+    COPY_BIT_FIELD(dest, src, pic_fields, weighted_pred_flag);
-+    COPY_BIT_FIELD(dest, src, pic_fields, weighted_bipred_idc);
-+    COPY_BIT_FIELD(dest, src, pic_fields, transform_8x8_mode_flag);
-+    COPY_BIT_FIELD(dest, src, pic_fields, field_pic_flag);
-+    COPY_BIT_FIELD(dest, src, pic_fields, constrained_intra_pred_flag);
-+    COPY_FIELD(dest, src, frame_num);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus TRANSLATE(SliceParameter,H264)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    STRUCT(SliceParameter,H264) *dest = dest_buffer;
-+    const VASliceParameterBufferH264 *src = src_buffer;
-+    VAStatus status;
-+    int i;
-+
-+    COPY_FIELD(dest, src, slice_data_size);
-+    COPY_FIELD(dest, src, slice_data_offset);
-+    COPY_FIELD(dest, src, slice_data_flag);
-+    COPY_FIELD(dest, src, slice_data_bit_offset);
-+    COPY_FIELD(dest, src, first_mb_in_slice);
-+    COPY_FIELD(dest, src, slice_type);
-+    COPY_FIELD(dest, src, direct_spatial_mv_pred_flag);
-+    COPY_FIELD(dest, src, num_ref_idx_l0_active_minus1);
-+    COPY_FIELD(dest, src, num_ref_idx_l1_active_minus1);
-+    COPY_FIELD(dest, src, cabac_init_idc);
-+    COPY_FIELD(dest, src, slice_qp_delta);
-+    COPY_FIELD(dest, src, disable_deblocking_filter_idc);
-+    COPY_FIELD(dest, src, slice_alpha_c0_offset_div2);
-+    COPY_FIELD(dest, src, slice_beta_offset_div2);
-+    for (i = 0; i < 32; i++) {
-+        status = TRANSLATE_(VAPictureH264)(ctx,
-+                                           &dest->RefPicList0[i],
-+                                           &src->RefPicList0[i]);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+        status = TRANSLATE_(VAPictureH264)(ctx,
-+                                           &dest->RefPicList1[i],
-+                                           &src->RefPicList1[i]);
-+        if (status != VA_STATUS_SUCCESS)
-+            return status;
-+    }
-+    COPY_FIELD(dest, src, luma_log2_weight_denom);
-+    COPY_FIELD(dest, src, chroma_log2_weight_denom);
-+    COPY_FIELD(dest, src, luma_weight_l0_flag);
-+    COPY_ARRAY(dest, src, luma_weight_l0);
-+    COPY_ARRAY(dest, src, luma_offset_l0);
-+    COPY_FIELD(dest, src, chroma_weight_l0_flag);
-+    COPY_ARRAY(dest, src, chroma_weight_l0);
-+    COPY_ARRAY(dest, src, chroma_offset_l0);
-+    COPY_FIELD(dest, src, luma_weight_l1_flag);
-+    COPY_ARRAY(dest, src, luma_weight_l1);
-+    COPY_ARRAY(dest, src, luma_offset_l1);
-+    COPY_FIELD(dest, src, chroma_weight_l1_flag);
-+    COPY_ARRAY(dest, src, chroma_weight_l1);
-+    COPY_ARRAY(dest, src, chroma_offset_l1);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus TRANSLATE(PictureParameter,VC1)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    STRUCT(PictureParameter,VC1) *dest = dest_buffer;
-+    const VAPictureParameterBufferVC1 *src = src_buffer;
-+
-+    COPY_FIELD(dest, src, forward_reference_picture);
-+    COPY_FIELD(dest, src, backward_reference_picture);
-+    COPY_FIELD(dest, src, inloop_decoded_picture);
-+    dest->BFV(sequence_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, sequence_fields, interlace);
-+    COPY_BIT_FIELD(dest, src, sequence_fields, syncmarker);
-+    COPY_BIT_FIELD(dest, src, sequence_fields, overlap);
-+    COPY_FIELD(dest, src, coded_width);
-+    COPY_FIELD(dest, src, coded_height);
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR == 30
-+    dest->closed_entry = src->entrypoint_fields.bits.closed_entry;
-+    dest->broken_link  = src->entrypoint_fields.bits.broken_link;
-+    dest->loopfilter   = src->entrypoint_fields.bits.loopfilter;
-+#else
-+    COPY_BIT_FIELD(dest, src, entrypoint_fields, closed_entry);
-+    COPY_BIT_FIELD(dest, src, entrypoint_fields, broken_link);
-+    COPY_BIT_FIELD(dest, src, entrypoint_fields, loopfilter);
-+#endif
-+    COPY_FIELD(dest, src, conditional_overlap_flag);
-+    COPY_FIELD(dest, src, fast_uvmc_flag);
-+    dest->BFV(range_mapping_fields, value) = 0; /* reset all bits */
-+    dest->BFM(range_mapping_fields, bits, M_luma_flag) =
-+        src->range_mapping_fields.bits.luma_flag;
-+    dest->BFM(range_mapping_fields, bits, M_luma) =
-+        src->range_mapping_fields.bits.luma;
-+    dest->BFM(range_mapping_fields, bits, M_chroma_flag) =
-+        src->range_mapping_fields.bits.chroma_flag;
-+    dest->BFM(range_mapping_fields, bits, M_chroma) =
-+        src->range_mapping_fields.bits.chroma;
-+    COPY_FIELD(dest, src, b_picture_fraction);
-+    COPY_FIELD(dest, src, cbp_table);
-+    COPY_FIELD(dest, src, mb_mode_table);
-+    COPY_FIELD(dest, src, range_reduction_frame);
-+    COPY_FIELD(dest, src, rounding_control);
-+    COPY_FIELD(dest, src, post_processing);
-+    COPY_FIELD(dest, src, picture_resolution_index);
-+    COPY_FIELD(dest, src, luma_scale);
-+    COPY_FIELD(dest, src, luma_shift);
-+    dest->BFV(picture_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, picture_fields, picture_type);
-+    COPY_BIT_FIELD(dest, src, picture_fields, frame_coding_mode);
-+    COPY_BIT_FIELD(dest, src, picture_fields, top_field_first);
-+    COPY_BIT_FIELD(dest, src, picture_fields, is_first_field);
-+    COPY_BIT_FIELD(dest, src, picture_fields, intensity_compensation);
-+    dest->BFV(M_raw_coding, value) = 0; /* reset all bits */
-+    COPY_BIT_FLAG(dest, src, raw_coding, mv_type_mb);
-+    COPY_BIT_FLAG(dest, src, raw_coding, direct_mb);
-+    COPY_BIT_FLAG(dest, src, raw_coding, skip_mb);
-+    COPY_BIT_FLAG(dest, src, raw_coding, field_tx);
-+    COPY_BIT_FLAG(dest, src, raw_coding, forward_mb);
-+    COPY_BIT_FLAG(dest, src, raw_coding, ac_pred);
-+    COPY_BIT_FLAG(dest, src, raw_coding, overflags);
-+    dest->BFV(M_bitplane_present, value) = 0; /* reset all bits */
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_mv_type_mb);
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_direct_mb);
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_skip_mb);
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_field_tx);
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_forward_mb);
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_ac_pred);
-+    COPY_BIT_FLAG(dest, src, bitplane_present, bp_overflags);
-+    dest->BFV(reference_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, reference_fields, reference_distance_flag);
-+    COPY_BIT_FIELD(dest, src, reference_fields, reference_distance);
-+    COPY_BIT_FIELD(dest, src, reference_fields, num_reference_pictures);
-+    COPY_BIT_FIELD(dest, src, reference_fields, reference_field_pic_indicator);
-+    dest->BFV(mv_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, mv_fields, mv_mode);
-+    COPY_BIT_FIELD(dest, src, mv_fields, mv_mode2);
-+    COPY_BIT_FIELD(dest, src, mv_fields, mv_table);
-+    COPY_BIT_FIELD(dest, src, mv_fields, two_mv_block_pattern_table);
-+    COPY_BIT_FIELD(dest, src, mv_fields, four_mv_switch);
-+    COPY_BIT_FIELD(dest, src, mv_fields, four_mv_block_pattern_table);
-+    COPY_BIT_FIELD(dest, src, mv_fields, extended_mv_flag);
-+    COPY_BIT_FIELD(dest, src, mv_fields, extended_mv_range);
-+    COPY_BIT_FIELD(dest, src, mv_fields, extended_dmv_flag);
-+    COPY_BIT_FIELD(dest, src, mv_fields, extended_dmv_range);
-+    dest->BFV(pic_quantizer_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, dquant);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, quantizer);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, half_qp);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, pic_quantizer_scale);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, pic_quantizer_type);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, dq_frame);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, dq_profile);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, dq_sb_edge);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, dq_db_edge);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, dq_binary_level);
-+    COPY_BIT_FIELD(dest, src, pic_quantizer_fields, alt_pic_quantizer);
-+    dest->BFV(transform_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, transform_fields, variable_sized_transform_flag);
-+    COPY_BIT_FIELD(dest, src, transform_fields, mb_level_transform_type_flag);
-+    COPY_BIT_FIELD(dest, src, transform_fields, frame_level_transform_type);
-+    COPY_BIT_FIELD(dest, src, transform_fields, transform_ac_codingset_idx1);
-+    COPY_BIT_FIELD(dest, src, transform_fields, transform_ac_codingset_idx2);
-+    COPY_BIT_FIELD(dest, src, transform_fields, intra_transform_dc_table);
-+
-+    if (src->picture_fields.bits.picture_type == 4) {
-+        dest->BFM(picture_fields, bits, picture_type) = 1; /* P-frame */
-+        ctx->skip_frame = 1;
-+    }
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus TRANSLATE(PictureParameter,MPEG2)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    STRUCT(PictureParameter,MPEG2) *dest = dest_buffer;
-+    const VAPictureParameterBufferMPEG2 *src = src_buffer;
-+
-+    COPY_FIELD(dest, src, horizontal_size);
-+    COPY_FIELD(dest, src, vertical_size);
-+    COPY_FIELD(dest, src, forward_reference_picture);
-+    COPY_FIELD(dest, src, backward_reference_picture);
-+    COPY_FIELD(dest, src, picture_coding_type);
-+    COPY_FIELD(dest, src, f_code);
-+    dest->BFV(picture_coding_extension, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, intra_dc_precision);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, picture_structure);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, top_field_first);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, frame_pred_frame_dct);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, concealment_motion_vectors);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, q_scale_type);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, intra_vlc_format);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, alternate_scan);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, repeat_first_field);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, progressive_frame);
-+    COPY_BIT_FIELD(dest, src, picture_coding_extension, is_first_field);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+static VAStatus TRANSLATE(SliceParameter,MPEG2)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    STRUCT(SliceParameter,MPEG2) *dest = dest_buffer;
-+    const VASliceParameterBufferMPEG2 *src = src_buffer;
-+
-+    COPY_FIELD(dest, src, slice_data_size);
-+    COPY_FIELD(dest, src, slice_data_offset);
-+    COPY_FIELD(dest, src, slice_data_flag);
-+    COPY_FIELD(dest, src, macroblock_offset);
-+    COPY_FIELD(dest, src, slice_vertical_position);
-+    COPY_FIELD(dest, src, quantiser_scale_code);
-+    COPY_FIELD(dest, src, intra_slice_flag);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+#endif
-+
-+static VAStatus TRANSLATE(PictureParameter,MPEG4)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    STRUCT(PictureParameter,MPEG4) *dest = dest_buffer;
-+    const VAPictureParameterBufferMPEG4 *src = src_buffer;
-+
-+    COPY_FIELD(dest, src, vop_width);
-+    COPY_FIELD(dest, src, vop_height);
-+    COPY_FIELD(dest, src, forward_reference_picture);
-+    COPY_FIELD(dest, src, backward_reference_picture);
-+    dest->BFV(vol_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, vol_fields, short_video_header);
-+    COPY_BIT_FIELD(dest, src, vol_fields, chroma_format);
-+    COPY_BIT_FIELD(dest, src, vol_fields, interlaced);
-+    COPY_BIT_FIELD(dest, src, vol_fields, obmc_disable);
-+    COPY_BIT_FIELD(dest, src, vol_fields, sprite_enable);
-+    COPY_BIT_FIELD(dest, src, vol_fields, sprite_warping_accuracy);
-+    COPY_BIT_FIELD(dest, src, vol_fields, quant_type);
-+    COPY_BIT_FIELD(dest, src, vol_fields, quarter_sample);
-+    COPY_BIT_FIELD(dest, src, vol_fields, data_partitioned);
-+    COPY_BIT_FIELD(dest, src, vol_fields, reversible_vlc);
-+    COPY_FIELD(dest, src, no_of_sprite_warping_points);
-+    COPY_ARRAY(dest, src, sprite_trajectory_du);
-+    COPY_ARRAY(dest, src, sprite_trajectory_dv);
-+    COPY_FIELD(dest, src, quant_precision);
-+    dest->BFV(vop_fields, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, vop_fields, vop_coding_type);
-+    COPY_BIT_FIELD(dest, src, vop_fields, backward_reference_vop_coding_type);
-+    COPY_BIT_FIELD(dest, src, vop_fields, vop_rounding_type);
-+    COPY_BIT_FIELD(dest, src, vop_fields, intra_dc_vlc_thr);
-+    COPY_BIT_FIELD(dest, src, vop_fields, top_field_first);
-+    COPY_BIT_FIELD(dest, src, vop_fields, alternate_vertical_scan_flag);
-+    COPY_FIELD(dest, src, vop_fcode_forward);
-+    COPY_FIELD(dest, src, vop_fcode_backward);
-+    COPY_FIELD(dest, src, num_gobs_in_vop);
-+    COPY_FIELD(dest, src, num_macroblocks_in_gob);
-+    COPY_FIELD(dest, src, TRB);
-+    COPY_FIELD(dest, src, TRD);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR == 30
-+static VAStatus TRANSLATE_(VAEncSliceParameterBuffer)(
-+    VACompatContextP    ctx,
-+    void               *dest_buffer,
-+    const void         *src_buffer
-+)
-+{
-+    MKCOMPAT(VAEncSliceParameterBuffer) * const dest = dest_buffer;
-+    const VAEncSliceParameterBuffer * const src = src_buffer;
-+
-+    COPY_FIELD(dest, src, start_row_number);
-+    COPY_FIELD(dest, src, slice_height);
-+    dest->BFV(slice_flags, value) = 0; /* reset all bits */
-+    COPY_BIT_FIELD(dest, src, slice_flags, is_intra);
-+    COPY_BIT_FIELD(dest, src, slice_flags, disable_deblocking_filter_idc);
-+
-+    return VA_STATUS_SUCCESS;
-+}
-+#endif
-+
-+static void TRANSLATE_(VADriverContext)(
-+    VACompatContext *dest,
-+    const struct MKCOMPAT(VADriverContext) *src
-+)
-+{
-+    VACompatDriverVTable *dest_vtable = &dest->vtable;
-+    const struct MKCOMPAT(VADriverVTable) *src_vtable = &src->vtable;
-+
-+    memset(dest_vtable, 0, sizeof(*dest_vtable));
-+    COPY_VTABLE(dest, src, vaTerminate);
-+    COPY_VTABLE(dest, src, vaQueryConfigProfiles);
-+    COPY_VTABLE(dest, src, vaQueryConfigEntrypoints);
-+    COPY_VTABLE(dest, src, vaGetConfigAttributes);
-+    COPY_VTABLE(dest, src, vaCreateConfig);
-+    COPY_VTABLE(dest, src, vaDestroyConfig);
-+    COPY_VTABLE(dest, src, vaQueryConfigAttributes);
-+    COPY_VTABLE(dest, src, vaCreateSurfaces);
-+    COPY_VTABLE(dest, src, vaDestroySurfaces);
-+    COPY_VTABLE(dest, src, vaCreateContext);
-+    COPY_VTABLE(dest, src, vaDestroyContext);
-+    COPY_VTABLE(dest, src, vaCreateBuffer);
-+    COPY_VTABLE(dest, src, vaBufferSetNumElements);
-+    COPY_VTABLE(dest, src, vaMapBuffer);
-+    COPY_VTABLE(dest, src, vaUnmapBuffer);
-+    COPY_VTABLE(dest, src, vaDestroyBuffer);
-+    COPY_VTABLE(dest, src, vaBeginPicture);
-+    COPY_VTABLE(dest, src, vaRenderPicture);
-+    COPY_VTABLE(dest, src, vaEndPicture);
-+    COPY_VTABLE(dest, src, vaQuerySurfaceStatus);
-+    COPY_VTABLE(dest, src, vaPutSurface);
-+    COPY_VTABLE(dest, src, vaQueryImageFormats);
-+    COPY_VTABLE(dest, src, vaCreateImage);
-+    COPY_VTABLE(dest, src, vaDeriveImage);
-+    COPY_VTABLE(dest, src, vaDestroyImage);
-+    COPY_VTABLE(dest, src, vaSetImagePalette);
-+    COPY_VTABLE(dest, src, vaGetImage);
-+    COPY_VTABLE(dest, src, vaQuerySubpictureFormats);
-+    COPY_VTABLE(dest, src, vaCreateSubpicture);
-+    COPY_VTABLE(dest, src, vaDestroySubpicture);
-+    COPY_VTABLE(dest, src, vaSetSubpictureImage);
-+    COPY_VTABLE(dest, src, vaSetSubpictureChromakey);
-+    COPY_VTABLE(dest, src, vaSetSubpictureGlobalAlpha);
-+    COPY_VTABLE(dest, src, vaDeassociateSubpicture);
-+    COPY_VTABLE(dest, src, vaQueryDisplayAttributes);
-+    COPY_VTABLE(dest, src, vaGetDisplayAttributes);
-+    COPY_VTABLE(dest, src, vaSetDisplayAttributes);
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR <= 29
-+    COPY_VTABLE(dest, src, vaSetSubpicturePalette);
-+    COPY_VTABLE(dest, src, vaDbgCopySurfaceToBuffer);
-+#endif
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR >= 30
-+    COPY_VTABLE(dest, src, vaCreateSurfaceFromCIFrame);
-+    COPY_VTABLE(dest, src, vaCreateSurfaceFromV4L2Buf);
-+    COPY_VTABLE(dest, src, vaCopySurfaceToBuffer);
-+#endif
-+#if COMPAT_MAJOR == 0 && COMPAT_MINOR >= 31
-+    COPY_VTABLE(dest, src, vaSyncSurface);
-+    COPY_VTABLE(dest, src, vaPutImage);
-+    COPY_VTABLE(dest, src, vaAssociateSubpicture);
-+#else
-+    COPY_VTABLE_(dest, pre31, src, vaSyncSurface);
-+    COPY_VTABLE_(dest, pre31, src, vaPutImage);
-+    COPY_VTABLE_(dest, pre31, src, vaPutImage2);
-+    COPY_VTABLE_(dest, pre31, src, vaAssociateSubpicture);
-+    COPY_VTABLE_(dest, pre31, src, vaAssociateSubpicture2);
-+#endif
-+}
-+
-+#undef COMPAT_MAJOR
-+#undef COMPAT_MINOR
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/392_compat.dso.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/392_compat.dso.patch
deleted file mode 100644
index 57ae44f..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/392_compat.dso.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-commit 389323f728fb2d6392d266d967eddde40465fd93
-Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
-Date:   Fri Oct 16 12:35:27 2009 +0000
-
-    Fix compatibility with older programs linked against libva.so.0.
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 232d8e8..2d696f1 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -72,3 +72,8 @@ EXTRA_DIST = \
- 	va_compat_template.h
- 
- va_compat.c: va_compat_template.h
-+
-+lib_LTLIBRARIES			+= libva-compat.la
-+libva_compat_la_SOURCES		= va_compat_lib.c
-+libva_compat_la_LIBADD		= libva-x11.la -ldl
-+libva_compat_la_DEPENDENCIES	= libva-x11.la
-diff --git a/src/va_compat_lib.c b/src/va_compat_lib.c
-new file mode 100644
-index 0000000..b7e9ea5
---- /dev/null
-+++ b/src/va_compat_lib.c
-@@ -0,0 +1,158 @@
-+/*
-+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sub license, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ * 
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial portions
-+ * of the Software.
-+ * 
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-+ * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+
-+#define _GNU_SOURCE 1
-+#include <dlfcn.h>
-+#include <assert.h>
-+#include <stddef.h>
-+
-+typedef void           *VADisplay;
-+typedef int             VAStatus;
-+typedef unsigned int    VAGenericID;
-+typedef VAGenericID     VAContextID;
-+typedef VAGenericID     VASurfaceID;
-+typedef VAGenericID     VAImageID;
-+typedef VAGenericID     VASubpictureID;
-+
-+#define PREPARE_FUNC(NAME, RET, ARGS)           \
-+    static RET (*lib_##NAME) ARGS;              \
-+    if (lib_##NAME == NULL)                     \
-+        lib_##NAME = dlsym(RTLD_NEXT, #NAME);   \
-+    assert(lib_##NAME != NULL)
-+
-+VAStatus
-+vaSyncSurface(
-+    VADisplay           dpy,
-+    VAContextID         context,
-+    VASurfaceID         render_target
-+)
-+{
-+    PREPARE_FUNC(vaSyncSurface, VAStatus, (VADisplay, VASurfaceID));
-+
-+    return lib_vaSyncSurface(dpy, render_target);
-+}
-+
-+VAStatus
-+vaPutImage(
-+    VADisplay           dpy,
-+    VASurfaceID         surface,
-+    VAImageID           image,
-+    int                 src_x,
-+    int                 src_y,
-+    unsigned int        width,
-+    unsigned int        height,
-+    int                 dest_x,
-+    int                 dest_y
-+)
-+{
-+    PREPARE_FUNC(vaPutImage, VAStatus, (VADisplay, VASurfaceID, VAImageID,
-+                                        int, int, unsigned int, unsigned int,
-+                                        int, int, unsigned int, unsigned int));
-+
-+    return lib_vaPutImage(dpy, surface, image,
-+                          src_x, src_y, width, height,
-+                          dest_x, dest_y, width, height);
-+}
-+
-+VAStatus
-+vaPutImage2(
-+    VADisplay           dpy,
-+    VASurfaceID         surface,
-+    VAImageID           image,
-+    int                 src_x,
-+    int                 src_y,
-+    unsigned int        src_width,
-+    unsigned int        src_height,
-+    int                 dest_x,
-+    int                 dest_y,
-+    unsigned int        dest_width,
-+    unsigned int        dest_height
-+)
-+{
-+    PREPARE_FUNC(vaPutImage, VAStatus, (VADisplay, VASurfaceID, VAImageID,
-+                                        int, int, unsigned int, unsigned int,
-+                                        int, int, unsigned int, unsigned int));
-+
-+    return lib_vaPutImage(dpy, surface, image,
-+                          src_x, src_y, src_width, src_height,
-+                          dest_x, dest_y, dest_width, dest_height);
-+}
-+
-+VAStatus
-+vaAssociateSubpicture(
-+    VADisplay           dpy,
-+    VASubpictureID      subpicture,
-+    VASurfaceID        *target_surfaces,
-+    int                 num_surfaces,
-+    short               src_x,
-+    short               src_y,
-+    short               dest_x,
-+    short               dest_y,
-+    unsigned short      width,
-+    unsigned short      height,
-+    unsigned int        flags
-+)
-+{
-+    PREPARE_FUNC(vaAssociateSubpicture,
-+                 VAStatus, (VADisplay, VASubpictureID, VASurfaceID *, int,
-+                            short, short, unsigned short, unsigned short,
-+                            short, short, unsigned short, unsigned short,
-+                            unsigned int));
-+
-+    return lib_vaAssociateSubpicture(dpy, subpicture,
-+                                     target_surfaces, num_surfaces,
-+                                     src_x, src_y, width, height,
-+                                     dest_x, dest_y, width, height,
-+                                     flags);
-+}
-+
-+VAStatus
-+vaAssociateSubpicture2(
-+    VADisplay           dpy,
-+    VASubpictureID      subpicture,
-+    VASurfaceID        *target_surfaces,
-+    int                 num_surfaces,
-+    short               src_x,
-+    short               src_y,
-+    unsigned short      src_width,
-+    unsigned short      src_height,
-+    short               dest_x,
-+    short               dest_y,
-+    unsigned short      dest_width,
-+    unsigned short      dest_height,
-+    unsigned int        flags
-+)
-+{
-+    PREPARE_FUNC(vaAssociateSubpicture,
-+                 VAStatus, (VADisplay, VASubpictureID, VASurfaceID *, int,
-+                            short, short, unsigned short, unsigned short,
-+                            short, short, unsigned short, unsigned short,
-+                            unsigned int));
-+
-+    return lib_vaAssociateSubpicture(dpy, subpicture,
-+                                     target_surfaces, num_surfaces,
-+                                     src_x, src_y, src_width, src_height,
-+                                     dest_x, dest_y, dest_width, dest_height,
-+                                     flags);
-+}
diff --git a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/libdrm-poulsbo.patch b/meta-emenlow/recipes-graphics/libva/libva-0.31.0/libdrm-poulsbo.patch
deleted file mode 100644
index ac38ece..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva-0.31.0/libdrm-poulsbo.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-# Make the libva depend on libdrm-poulsbo instead of libdrm so that the 
-# emenlow libdrm can coexist with the normal libdrm.
-# jdike@linux.intel.com
-
-Index: libva-0.31.0/configure.ac
-===================================================================
---- libva-0.31.0.orig/configure.ac
-+++ libva-0.31.0/configure.ac
-@@ -99,14 +99,14 @@ AC_SYS_LARGEFILE
- PKG_CHECK_MODULES([X11], [x11])
- PKG_CHECK_MODULES([XEXT],[xext])
- PKG_CHECK_MODULES([XFIXES], [xfixes])
--PKG_CHECK_MODULES([DRM], [libdrm])
-+PKG_CHECK_MODULES([DRM], [libdrm_poulsbo])
- 
- PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.0], [gen4asm=yes], [gen4asm=no])
- AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
- 
- # Check for libdrm >= 2.4 (needed for i965_drv_video.so)
--if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm; then
--    AC_MSG_WARN([libdrm < 2.4 found, disabling build of i965 video driver])
-+if test x$enable_i965_driver = xyes && ! $PKG_CONFIG --atleast-version=2.4 libdrm_poulsbo; then
-+    AC_MSG_WARN([libdrm_poulsbo < 2.4 found, disabling build of i965 video driver])
-     enable_i965_driver=no
- fi
- AM_CONDITIONAL(BUILD_I965_DRIVER, test x$enable_i965_driver = xyes)
diff --git a/meta-emenlow/recipes-graphics/libva/libva_0.31.0.bb b/meta-emenlow/recipes-graphics/libva/libva_0.31.0.bb
deleted file mode 100644
index 449a44f..0000000
--- a/meta-emenlow/recipes-graphics/libva/libva_0.31.0.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-DESCRIPTION = "Video Acceleration (VA) API for Linux"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=efc13a0998e678466e556756613c582e"
-PR = "r1"
-DEPENDS = "libxfixes libxext"
-
-inherit autotools
-
-SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/libva_0.31.0-1+sds9.1ubuntu1.tar.gz \
-	file://033_g45_add_rgba_subpic.patch \
-	file://034_g45_fix_return_for_unimpl.patch \
-	file://035_g45_add_yv12_image_format.patch \
-	file://036_g45_add_vaGetImage.patch \
-	file://037_g45_add_vaPutImage.patch \
-	file://038_g45_vaPutSurface_cliprects.patch \
-	file://102_attribute_visibility.patch \
-	file://103_fix_vainfo_deps.patch \
-	file://104_fix_libva_pkgconfig_deps.patch \
-	file://105_dont_search_LIBGL_DRIVERS_PATH.patch \
-	file://108_drivers_path.patch \
-	file://203_fix_fglrx_detection.patch \
-	file://204_check_ATIFGLEXTENSION.patch \
-	file://300_sds_version.patch \
-	file://301_vdpau_mpeg4.patch \
-	file://320_move_vaPutSurface_flags_def.patch \
-	file://321_libva_glx.base.patch \
-	file://322_libva_glx.patch \
-	file://390_compat.base.patch \
-	file://391_compat.patch \
-	file://392_compat.dso.patch \
-	file://libdrm-poulsbo.patch"
-
-export LDFLAGS="-Wl,-z,defs"
-
-EXTRA_OECONF = "--disable-i965-driver"
-
-FILES_${PN} += "${libdir}/va/drivers/*"
-
-COMPATIBLE_MACHINE = "emenlow"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta-emenlow/recipes-graphics/psb-firmware/psb-firmware_0.30.bb b/meta-emenlow/recipes-graphics/psb-firmware/psb-firmware_0.30.bb
deleted file mode 100644
index 164ea66..0000000
--- a/meta-emenlow/recipes-graphics/psb-firmware/psb-firmware_0.30.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-DESCRIPTION = "Binary firmware for the Poulsbo (psb) 3D X11 driver"
-LICENSE = "Intel-binary-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=02c597a2f082b4581596065bb5a521a8"
-PR = "r0"
-
-SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/psb-firmware_0.30-0ubuntu1netbook1ubuntu1.tar.gz"
-
-do_install() {
-        install -d ${D}${base_libdir}/firmware/
-	install -m 0644 ${WORKDIR}/psb-firmware-0.30/msvdx_fw.bin ${D}${base_libdir}/firmware/
-}
-
-FILES_${PN} += "${base_libdir}/firmware/msvdx_fw.bin"
-
-COMPATIBLE_MACHINE = "emenlow"
diff --git a/meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source-4.42.0/build.patch b/meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source-4.42.0/build.patch
deleted file mode 100644
index ce6f2aa..0000000
--- a/meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source-4.42.0/build.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-# These are various fixes needed to make the psb kernel driver build against
-# 2.6.33.2.
-# The Makefile patch is specific to the Poky environment - the external kernel
-# module build expects the kernel tree it's building against to have fixdep
-# and modpost built, which isn't the case here.  So, the modules rule makes
-# sure that they are built before the module is built.
-# Aside from that, the changes involve adding missing header files and 
-# compensating for a structure field changing name and type.
-
-Index: psb-kernel-source-4.42.0/drm_os_linux.h
-===================================================================
---- psb-kernel-source-4.42.0.orig/drm_os_linux.h
-+++ psb-kernel-source-4.42.0/drm_os_linux.h
-@@ -50,12 +50,6 @@
- 
- /** IRQ handler arguments and return type and values */
- #define DRM_IRQ_ARGS		int irq, void *arg
--/** backwards compatibility with old irq return values */
--#ifndef IRQ_HANDLED
--typedef void irqreturn_t;
--#define IRQ_HANDLED		/* nothing */
--#define IRQ_NONE		/* nothing */
--#endif
- 
- /** AGP types */
- #if __OS_HAS_AGP
-Index: psb-kernel-source-4.42.0/Makefile
-===================================================================
---- psb-kernel-source-4.42.0.orig/Makefile
-+++ psb-kernel-source-4.42.0/Makefile
-@@ -165,7 +165,10 @@ endif
- all: modules
- 
- modules: includes
--	+make -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
-+	+make -C $(LINUXDIR)/scripts/basic fixdep
-+#	+make -C $(LINUXDIR) SUBDIRS=scripts/mod modpost
-+	+make -C $(LINUXDIR) SUBDIRS=scripts
-+	+make -k -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
- 
- ifeq ($(HEADERFROMBOOT),1)
- 
-@@ -243,7 +246,7 @@ dristat: dristat.c
- drmstat: drmstat.c
- 	$(CC) $(PRGCFLAGS) $< -o $@ $(DRMSTATLIBS)
- 
--install:
-+modules_install:
- 	make -C $(LINUXDIR) $(GETCONFIG) SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules_install
- 
- else
-Index: psb-kernel-source-4.42.0/drm_edid.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/drm_edid.c
-+++ psb-kernel-source-4.42.0/drm_edid.c
-@@ -11,6 +11,7 @@
- #include "drm_edid.h"
- 
- #include <acpi/acpi_drivers.h>
-+#include <linux/i2c.h>
- 
- /* Valid EDID header has these bytes */
- static u8 edid_header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
-@@ -39,7 +40,7 @@ int drm_get_acpi_edid(char *method, char
- 	if (obj && obj->type == ACPI_TYPE_BUFFER)
- 		memcpy(edid, obj->buffer.pointer, obj->buffer.length);
- 	else {
--		printk(KERN_ERR PREFIX "Invalid _DDC data\n");
-+		printk(KERN_ERR "Invalid _DDC data\n");
- 		status = -EFAULT;
- 		kfree(obj);
- 	}
-Index: psb-kernel-source-4.42.0/drm_ttm.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/drm_ttm.c
-+++ psb-kernel-source-4.42.0/drm_ttm.c
-@@ -28,6 +28,8 @@
-  * Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
-  */
- 
-+#include "linux/spinlock.h"
-+#include "asm/agp.h"
- #include "drmP.h"
- 
- static void drm_ttm_ipi_handler(void *null)
-Index: psb-kernel-source-4.42.0/psb_drv.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/psb_drv.c
-+++ psb-kernel-source-4.42.0/psb_drv.c
-@@ -34,8 +34,10 @@
- #include <linux/cpu.h>
- #include <linux/notifier.h>
- #include <linux/fb.h>
-+#include "linux/spinlock.h"
-+#include "asm/agp.h"
- 
--int drm_psb_debug = 0;
-+int drm_psb_debug = 255;
- EXPORT_SYMBOL(drm_psb_debug);
- static int drm_psb_trap_pagefaults = 0;
- static int drm_psb_clock_gating = 0;
-Index: psb-kernel-source-4.42.0/intel_lvds.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/intel_lvds.c
-+++ psb-kernel-source-4.42.0/intel_lvds.c
-@@ -29,6 +29,7 @@
- 
- #include <linux/i2c.h>
- #include <linux/backlight.h>
-+#include <linux/i2c.h>
- #include "drm_crtc.h"
- #include "drm_edid.h"
- #include "intel_lvds.h"
-Index: psb-kernel-source-4.42.0/drm_memory.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/drm_memory.c
-+++ psb-kernel-source-4.42.0/drm_memory.c
-@@ -264,9 +264,9 @@ static void *agp_remap(unsigned long off
- 		return NULL;
- 
- 	phys_addr_map =
--	    agpmem->memory->memory + (offset - agpmem->bound) / PAGE_SIZE;
-+	    agpmem->memory->pages + (offset - agpmem->bound) / PAGE_SIZE;
- 	for (i = 0; i < num_pages; ++i)
--		page_map[i] = pfn_to_page(phys_addr_map[i] >> PAGE_SHIFT);
-+                page_map[i] = phys_addr_map[i];
- 	addr = vmap(page_map, num_pages, VM_IOREMAP, PAGE_AGP);
- 	vfree(page_map);
- 
-Index: psb-kernel-source-4.42.0/drm_agpsupport.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/drm_agpsupport.c
-+++ psb-kernel-source-4.42.0/drm_agpsupport.c
-@@ -524,7 +524,7 @@ static int drm_agp_populate(struct drm_t
- 	DRM_DEBUG("Current page count is %ld\n", (long) mem->page_count);
- 	mem->page_count = 0;
- 	for (cur_page = pages; cur_page < last_page; ++cur_page)
--		mem->pages[mem->page_count++] = phys_to_gart(page_to_phys(*cur_page));
-+		mem->pages[mem->page_count++] = page_to_phys(*cur_page);
- 	agp_be->mem = mem;
- 	return 0;
- }
-Index: psb-kernel-source-4.42.0/drm_vm.c
-===================================================================
---- psb-kernel-source-4.42.0.orig/drm_vm.c
-+++ psb-kernel-source-4.42.0/drm_vm.c
-@@ -145,13 +145,13 @@ static int drm_do_vm_fault(struct vm_are
- 		 * Get the page, inc the use count, and return it
- 		 */
- 		offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
--		page = virt_to_page(__va(agpmem->memory->memory[offset]));
-+		page = agpmem->memory->pages[offset];
- 		get_page(page);
- 		vmf->page = page;
- 
- 		DRM_DEBUG
- 		    ("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
--		     baddr, __va(agpmem->memory->memory[offset]), offset,
-+		     baddr, agpmem->memory->pages[offset], offset,
- 		     page_count(page));
- 		return 0;
- 	}
-Index: psb-kernel-source-4.42.0/psb_drv.h
-===================================================================
---- psb-kernel-source-4.42.0.orig/psb_drv.h
-+++ psb-kernel-source-4.42.0/psb_drv.h
-@@ -809,7 +809,7 @@ extern int drm_psb_detear;
- #define PSB_DEBUG(_flag, _fmt, _arg...)					\
- 	do {								\
- 	  if (unlikely((_flag) & drm_psb_debug))			\
--			printk(KERN_DEBUG				\
-+			printk(KERN_ERR				\
- 			       "[psb:0x%02x:%s] " _fmt , _flag,	\
- 			       __FUNCTION__ , ##_arg);			\
- 	} while (0)
diff --git a/meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source_4.42.0.bb b/meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source_4.42.0.bb
deleted file mode 100644
index 5c1a3e1..0000000
--- a/meta-emenlow/recipes-graphics/psb-kernel-source/psb-kernel-source_4.42.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-DESCRIPTION = "Kernel module for the Poulsbo (psb) 2D X11 driver"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://GPLv2_License.txt;md5=f5ca3155cfeaa64a6ea228b11ad6916d"
-PR = "r1"
-
-inherit module
-
-SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/psb-kernel-source_4.42.0-0ubuntu2~1004um2.tar.gz \
-	file://build.patch;patch=1"
-
-do_compile () {
-	oe_runmake LINUXDIR=${STAGING_KERNEL_DIR} DRM_MODULES="psb"
-}
-
-do_install () {
-        mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/extra
-        cp ${WORKDIR}/${PN}-${PV}/*.ko ${D}/lib/modules/${KERNEL_VERSION}/extra
-}
-
-FILES_${PN} += "${base_libdir}/modules/${KERNEL_VERSION}/extra/*.ko"
-
-DEPENDS += "virtual/kernel"
-
-COMPATIBLE_MACHINE = "emenlow"
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/crosscompile.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/crosscompile.patch
deleted file mode 100644
index 2341e40..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/files/crosscompile.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: xorg-server-1.7.99.2/configure.ac
-===================================================================
---- xorg-server-1.7.99.2.orig/configure.ac	2010-01-29 16:38:49.000000000 +0000
-+++ xorg-server-1.7.99.2/configure.ac	2010-01-29 16:42:39.000000000 +0000
-@@ -503,14 +503,10 @@
- 
- dnl Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d,
- dnl otherwise uses standard subdirectories of FONTROOTDIR
--AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d],
--	[DEFAULT_FONT_PATH='catalogue:${sysconfdir}/X11/fontpath.d'],
--	[
- 		DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/"
- 		case $host_os in
- 			darwin*)    DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;;
- 		esac
--	])
- AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]),
- 				[ FONTPATH="$withval" ],
- 				[ FONTPATH="${DEFAULT_FONT_PATH}" ])
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/fix_open_max_preprocessor_error.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/fix_open_max_preprocessor_error.patch
deleted file mode 100644
index 565832e..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/files/fix_open_max_preprocessor_error.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: git/os/osdep.h
-===================================================================
---- git.orig/os/osdep.h	2008-10-07 18:38:21.000000000 +0100
-+++ git/os/osdep.h	2008-10-07 18:39:36.000000000 +0100
-@@ -92,7 +92,7 @@
-  * like sysconf(_SC_OPEN_MAX) is not supported.
-  */
- 
--#if OPEN_MAX <= 256
-+#if 0
- #define MAXSOCKS (OPEN_MAX - 1)
- #else
- #define MAXSOCKS 256
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/libdrm-poulsbo.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/libdrm-poulsbo.patch
deleted file mode 100644
index b604cab..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/files/libdrm-poulsbo.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-# Make the server depend on libdrm-poulsbo instead of libdrm so that the 
-# emenlow libdrm can coexist with the normal libdrm.
-# jdike@linux.intel.com
-
-Index: xorg-server-1.7.99.2/configure.ac
-===================================================================
---- xorg-server-1.7.99.2.orig/configure.ac
-+++ xorg-server-1.7.99.2/configure.ac
-@@ -763,7 +763,7 @@ dnl List of libraries that require a spe
- LIBAPPLEWM="applewm >= 1.4"
- LIBDMX="dmx >= 1.0.99.1"
- LIBDRI="dri >= 7.1.0"
--LIBDRM="libdrm >= 2.3.0"
-+LIBDRM="libdrm_poulsbo >= 2.3.0"
- LIBGL="gl >= 7.1.0"
- LIBXEXT="xext >= 1.0.99.4"
- LIBXI="xi >= 1.2.99.1"
-@@ -2002,7 +2002,7 @@ if test "$KDRIVE" = yes; then
-         XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv"
-     fi
-     if test "x$DRI" = xyes && test "x$GLX" = xyes; then
--        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm"
-+        XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm_poulsbo"
-     fi
- 
-     PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/macro_tweak.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/macro_tweak.patch
deleted file mode 100644
index 6998adf..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/files/macro_tweak.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Index: xorg-server-1.5.0/xorg-server.m4
-===================================================================
---- xorg-server-1.5.0.orig/xorg-server.m4	2007-05-29 20:36:51.000000000 +0100
-+++ xorg-server-1.5.0/xorg-server.m4	2008-11-04 23:56:55.000000000 +0000
-@@ -28,9 +28,12 @@
- # Checks for the $1 define in xorg-server.h (from the sdk).  If it
- # is defined, then add $1 to $REQUIRED_MODULES.
- 
-+m4_pattern_allow(PKG_CONFIG_SYSROOT_DIR)
-+
- AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
-+	PKG_PROG_PKG_CONFIG
- 	SAVE_CFLAGS="$CFLAGS"
--	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
-+	CFLAGS="$CFLAGS -I$PKG_CONFIG_SYSROOT_DIR`pkg-config --variable=sdkdir xorg-server`"
- 	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include "xorg-server.h"
- #if !defined $1
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/files/nodolt.patch b/meta-emenlow/recipes-graphics/xorg-xserver/files/nodolt.patch
deleted file mode 100644
index 6b34032..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/files/nodolt.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac	2009-01-15 20:35:31.000000000 +0000
-+++ git/configure.ac	2009-01-15 20:35:38.000000000 +0000
-@@ -62,7 +62,6 @@
- AC_LIBTOOL_WIN32_DLL
- AC_DISABLE_STATIC
- AC_PROG_LIBTOOL
--DOLT
- AC_PROG_MAKE_SET
- PKG_PROG_PKG_CONFIG
- AC_PROG_LEX
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb_1.7.99.2.bb b/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb_1.7.99.2.bb
deleted file mode 100644
index 5227faa..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-psb_1.7.99.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require recipes-graphics/xorg-xserver/xserver-xf86-dri-lite.inc
-
-PR = "r3"
-
-PROTO_DEPS += "xf86driproto dri2proto"
-
-DEPENDS += "font-util"
-
-SRC_URI += "file://nodolt.patch \
-            file://crosscompile.patch \
-	    file://libdrm-poulsbo.patch"
-
-# Misc build failure for master HEAD
-SRC_URI += "file://fix_open_max_preprocessor_error.patch"
-
-EXTRA_OECONF += "--enable-dri --enable-dri2 --enable-dga --enable-glx"
-
-RDEPENDS_${PN} += "xserver-xorg-video-psb psb-firmware xpsb-glx \
-	       libdrm-poulsbo libva"
-
-COMPATIBLE_MACHINE = "emenlow"
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow/xorg.conf b/meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow/xorg.conf
deleted file mode 100644
index 6846263..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow/xorg.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-Section "ServerFlags"
-    Option "AutoAddDevices" "False"
-EndSection
-
-Section "Device"
-    Identifier	"Configured Video Device"
-    Driver	"psb"
-    Option	"ShadowFB" "False"
-EndSection
-
-Section "DRI"
-    Mode 0666
-EndSection
diff --git a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
deleted file mode 100644
index 4b8d0e6..0000000
--- a/meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
-FILESPATH =. "${@base_set_filespath(["${THISDIR}/${PN}"], d)}:"
-
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch
deleted file mode 100644
index a231596..0000000
--- a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/cross-compile.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Index: mesa/configs/linux-dri
-===================================================================
---- mesa.orig/configs/linux-dri
-+++ mesa/configs/linux-dri
-@@ -3,11 +3,9 @@
- 
- include $(TOP)/configs/default
- 
--CONFIG_NAME = linux-dri
-+$(warning ENVIRONMENT = $(shell printenv))
- 
--# Compiler and flags
--CC = gcc
--CXX = g++
-+CONFIG_NAME = linux-dri
- 
- #MKDEP = /usr/X11R6/bin/makedepend
- #MKDEP = gcc -M
-@@ -25,8 +23,6 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOU
- 	-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
- 	-DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN
- 
--X11_INCLUDES = -I/usr/X11R6/include
--
- CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
- 	$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
- 
-@@ -40,9 +36,6 @@ CXXFLAGS += -fno-strict-aliasing
- 
- ASM_SOURCES = 
- 
--# Library/program dependencies
--EXTRA_LIB_PATH=-L/usr/X11R6/lib
--
- LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
- LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
- DRI_LIB_DEPS  = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
-Index: mesa/configs/default
-===================================================================
---- mesa.orig/configs/default
-+++ mesa/configs/default
-@@ -17,8 +17,6 @@ MESA_VERSION = $(MESA_MAJOR).$(MESA_MINO
- DRM_SOURCE_PATH=$(TOP)/../drm
- 
- # Compiler and flags
--CC = cc
--CXX = CC
- CFLAGS = -O
- CXXFLAGS = -O
- LDFLAGS =
-@@ -67,7 +65,6 @@ ASM_SOURCES = 
- # GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
- # order to build the Motif widget too)
- GLW_SOURCES = GLwDrawA.c
--MOTIF_CFLAGS = -I/usr/include/Motif1.2
- 
- 
- # Directories to build
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch
deleted file mode 100644
index 96b94ef..0000000
--- a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/libdrmname.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Index: mesa/configure.ac
-===================================================================
---- mesa.orig/configure.ac	2010-05-13 13:20:26.000000000 +0100
-+++ mesa/configure.ac	2010-07-25 17:02:58.000000000 +0100
-@@ -524,10 +524,10 @@
-     fi
- 
-     # Check for libdrm
--    PKG_CHECK_MODULES([LIBDRM], [libdrm-poulsbo >= $LIBDRM_REQUIRED])
-+    PKG_CHECK_MODULES([LIBDRM], [libdrm_poulsbo >= $LIBDRM_REQUIRED])
-     PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
--    GL_PC_REQ_PRIV="libdrm-poulsbo >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
--    DRI_PC_REQ_PRIV="libdrm-poulsbo >= $LIBDRM_REQUIRED"
-+    GL_PC_REQ_PRIV="libdrm_poulsbo >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
-+    DRI_PC_REQ_PRIV="libdrm_poulsbo >= $LIBDRM_REQUIRED"
- 
-     # find the DRI deps for libGL
-     if test "$x11_pkgconfig" = yes; then
-Index: mesa/configs/linux-dri
-===================================================================
---- mesa.orig/configs/linux-dri	2010-07-25 17:08:01.000000000 +0100
-+++ mesa/configs/linux-dri	2010-07-25 17:08:17.000000000 +0100
-@@ -36,8 +36,8 @@
- 
- ASM_SOURCES = 
- 
--LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
--LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
-+LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo`
-+LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo`
- DRI_LIB_DEPS  = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
- GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
- 		-lm -lpthread -ldl $(LIBDRM_LIB)
-Index: mesa/configs/linux-dri-xcb
-===================================================================
---- mesa.orig/configs/linux-dri-xcb	2010-07-25 17:08:25.000000000 +0100
-+++ mesa/configs/linux-dri-xcb	2010-07-25 17:08:44.000000000 +0100
-@@ -41,8 +41,8 @@
- # Library/program dependencies
- EXTRA_LIB_PATH=`pkg-config --libs-only-L x11`
- 
--LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
--LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
-+LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo`
-+LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo`
- DRI_LIB_DEPS  = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
- GL_LIB_DEPS   = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
- 		-lm -lpthread -ldl $(LIBDRM_LIB) `pkg-config --libs xcb` \
-Index: mesa/configs/linux-solo
-===================================================================
---- mesa.orig/configs/linux-solo	2010-07-25 17:09:03.000000000 +0100
-+++ mesa/configs/linux-solo	2010-07-25 17:09:13.000000000 +0100
-@@ -16,8 +16,8 @@
- ARCH_FLAGS ?=
- 
- # DRM and pciaccess
--LIBDRM_CFLAGS = `pkg-config --cflags libdrm-poulsbo`
--LIBDRM_LIB = `pkg-config --libs libdrm-poulsbo`
-+LIBDRM_CFLAGS = `pkg-config --cflags libdrm_poulsbo`
-+LIBDRM_LIB = `pkg-config --libs libdrm_poulsbo`
- PCIACCESS_CFLAGS = `pkg-config --cflags pciaccess`
- PCIACCESS_LIB = `pkg-config --libs pciaccess`
- 
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch
deleted file mode 100644
index 26b1f52..0000000
--- a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx-0.18/native-matypes.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: mesa/src/mesa/x86/Makefile
-===================================================================
---- mesa.orig/src/mesa/x86/Makefile	2010-10-11 16:34:12.664960996 +0100
-+++ mesa/src/mesa/x86/Makefile	2010-10-11 16:34:43.854960861 +0100
-@@ -20,11 +20,12 @@
- 	-rm -f matypes.h gen_matypes
- 
- 
--gen_matypes: gen_matypes.c
--	$(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
-+#gen_matypes: gen_matypes.c
-+#	$(CC) $(INCLUDE_DIRS) $(CFLAGS) gen_matypes.c -o gen_matypes
- 
- # need some special rules here, unfortunately
--matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes
-+matypes.h: ../main/mtypes.h ../tnl/t_context.h
-+# gen_matypes
- 	./gen_matypes > matypes.h
- 
- common_x86_asm.o: matypes.h
diff --git a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb b/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb
deleted file mode 100644
index f4b43ab..0000000
--- a/meta-emenlow/recipes-graphics/xpsb-glx/xpsb-glx_0.18.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-DESCRIPTION = "X11 drivers for Poulsbo (psb) 3D acceleration"
-
-# There's a mesa implementation in this package, which is presumably
-# not Intel proprietary, but it has no obvious license attached to it.
-LICENSE = "Intel-binary-only"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=02c597a2f082b4581596065bb5a521a8"
-PR = "r6"
-
-inherit autotools
-
-PROVIDES = "virtual/libgl mesa-dri"
-
-SRC_URI="https://launchpad.net/~gma500/+archive/ppa/+files/xpsb-glx_0.18-0ubuntu1netbook2~1004um1ubuntu1.tar.gz \
-         file://cross-compile.patch \
-         file://libdrmname.patch \
-         file://native-matypes.patch"
-
-do_configure () {
-	chmod +x autogen.sh && ./autogen.sh ${CONFIGUREOPTS} && make realclean
-	cd ${S}/src/mesa/x86/
-	${BUILD_CC} -I../../../include/GL -I../../../include -I.. -I../main -I../math -I../glapi -I../tnl -Wall -Wmissing-prototypes -std=c99 -ffast-math -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -fno-strict-aliasing gen_matypes.c -o gen_matypes
-}
-
-do_install() {
-	make DESTDIR=${D} install
-	install -d -m 0755 ${D}/${libdir}/xorg/modules/dri \
-		${D}/${libdir}/xorg/modules/drivers
-	install -m 0644 ${WORKDIR}/${PN}-${PV}/dri/* \
-		${D}/${libdir}/xorg/modules/dri
-	install -m 0644 ${WORKDIR}/${PN}-${PV}/drivers/* \
-		${D}/${libdir}/xorg/modules/drivers
-}
-
-S = "${WORKDIR}/${PN}-${PV}/mesa"
-
-EXTRA_OEMAKE = "linux-dri-x86"
-
-DEPENDS += "libxfixes libxdamage libdrm-poulsbo libxxf86vm dri2proto libxmu libxi glproto makedepend-native"
-
-FILES_${PN} = "${libdir}/* ${libdir}/xorg/modules/dri/* \
-	    ${libdir}/xorg/modules/drivers/*"
-
-# Multiple virtual/gl providers being built breaks staging
-EXCLUDE_FROM_WORLD = "1"
-
-COMPATIBLE_MACHINE = "emenlow"
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/01_disable_lid_timer.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/01_disable_lid_timer.patch
deleted file mode 100644
index 47da3bc..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/01_disable_lid_timer.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nurp xserver-xorg-video-psb-0.30.0+repack.orig/src/psb_driver.c xserver-xorg-video-psb-0.30.0+repack/src/psb_driver.c
---- xserver-xorg-video-psb-0.30.0+repack.orig/src/psb_driver.c	2009-04-17 00:00:46.000000000 +0200
-+++ xserver-xorg-video-psb-0.30.0+repack/src/psb_driver.c	2009-08-06 18:13:43.000000000 +0200
-@@ -753,7 +753,7 @@ psbInitOutputs(ScrnInfoPtr pScrn)
- 
-     xf86GetOptValBool(pPsb->options, OPTION_NOPANEL, &pPsb->noPanel);
- 
--    pPsb->lidTimer = TRUE;
-+    pPsb->lidTimer = FALSE;
-     xf86GetOptValBool(pPsb->options, OPTION_LIDTIMER, &pPsb->lidTimer);
- 
-     xf86GetOptValBool(pPsb->options, OPTION_NOFITTING, &pPsb->noFitting);
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/dri-h.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/dri-h.patch
deleted file mode 100644
index 98ffa27..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/dri-h.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: xserver-xorg-video-psb-0.32.1/configure.ac
-===================================================================
---- xserver-xorg-video-psb-0.32.1.orig/configure.ac
-+++ xserver-xorg-video-psb-0.32.1/configure.ac
-@@ -75,12 +75,9 @@ AM_CONDITIONAL(BUILD_EXA, [test "$build_
- AC_HEADER_STDC
- 
- if test "$DRI" != no; then
--        AC_CHECK_FILE([${sdkdir}/dri.h],
--                      [have_dri_h="yes"], [have_dri_h="no"])
--        AC_CHECK_FILE([${sdkdir}/sarea.h],
--                      [have_sarea_h="yes"], [have_sarea_h="no"])
--        AC_CHECK_FILE([${sdkdir}/dristruct.h],
--                      [have_dristruct_h="yes"], [have_dristruct_h="no"])
-+        have_dri_h="yes"
-+        have_sarea_h="yes"
-+        have_dristruct_h="yes"
- fi
- 
- AC_MSG_CHECKING([whether to include DRI support])
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/libdrm-poulsbo.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/libdrm-poulsbo.patch
deleted file mode 100644
index 0ecc880..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/libdrm-poulsbo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: xserver-xorg-video-psb-0.32.1/configure.ac
-===================================================================
---- xserver-xorg-video-psb-0.32.1.orig/configure.ac
-+++ xserver-xorg-video-psb-0.32.1/configure.ac
-@@ -94,7 +94,7 @@ AC_MSG_RESULT([$DRI])
- 
- AM_CONDITIONAL(DRI, test x$DRI = xyes)
- if test "$DRI" = yes; then
--        PKG_CHECK_MODULES(DRI, [libdrm-poulsbo >= 2.0 xf86driproto])
-+        PKG_CHECK_MODULES(DRI, [libdrm_poulsbo >= 2.0 xf86driproto])
-         AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
-         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
- fi
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_mixed.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_mixed.patch
deleted file mode 100644
index 6065fa5..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_mixed.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- xserver-xorg-video-psb-0.32.1/src/psb_accel.c.orig	2010-07-04 19:27:48.691227698 +0200
-+++ xserver-xorg-video-psb-0.32.1/src/psb_accel.c	2010-07-04 19:27:15.338230809 +0200
-@@ -308,6 +308,14 @@
- }
- #endif
- 
-+static void*
-+psbExaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, int usage_hint, int bpp, int* new_pitch  )
-+{
-+	return NULL;
-+}
-+static void
-+psbExaDestroyPixmap(ScreenPtr pScreen, void* driverPriv ){
-+}
- static Bool
- psbExaPixmapIsOffscreen(PixmapPtr p)
- {
-@@ -1313,6 +1321,7 @@
-     pExa->pixmapOffsetAlign = 8;
-     pExa->pixmapPitchAlign = 32 * 4;
-     pExa->flags = EXA_OFFSCREEN_PIXMAPS;
-+    pExa->flags |= EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
-     pExa->maxX = 2047;
-     pExa->maxY = 2047;
-     pExa->WaitMarker = psbExaWaitMarker;
-@@ -1328,6 +1337,9 @@
-     pExa->Composite = psbExaSuperComposite;
-     pExa->DoneComposite = psbExaDoneComposite;
-     pExa->PixmapIsOffscreen = psbExaPixmapIsOffscreen;
-+	pExa->CreatePixmap = NULL;
-+	pExa->CreatePixmap2 = psbExaCreatePixmap;
-+	pExa->DestroyPixmap = psbExaDestroyPixmap;
-     pExa->PrepareAccess = psbExaPrepareAccess;
-     pExa->FinishAccess = psbExaFinishAccess;
-     pExa->UploadToScreen = psbExaUploadToScreen;
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_xvtempfix.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_xvtempfix.patch
deleted file mode 100644
index 34798c0..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/psb_xvtempfix.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- xserver-xorg-video-psb-0.36.0-ref/src/psb_video.c	2010-06-07 22:17:46.302760345 +0200
-+++ xserver-xorg-video-psb-0.32/src/psb_video.c	2010-06-10 17:29:23.400003434 +0200
-@@ -686,8 +684,13 @@
-      * coordinates) to the backing pixmap.
-      */
- 
--    while (!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf))
-+    if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){
- 	exaMoveInPixmap(pPixmap);
-+        if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){
-+             return FALSE;
-+        }
-+    }
-+	
- 
-     dst.buffer = mmKernelBuf(dstBuf);
-     dst.offset = pre_add;
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/stubs.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/stubs.patch
deleted file mode 100644
index b201d7e..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/stubs.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_driver.c.orig xserver-xorg-video-psb-0.31.0/src/psb_driver.c
---- xserver-xorg-video-psb-0.31.0/src/psb_driver.c.orig	2010-04-30 08:58:06.798598457 +0200
-+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c	2010-04-30 09:03:04.186597975 +0200
-@@ -643,6 +643,19 @@ psbPreInitDRI(ScrnInfoPtr pScrn)
-     return TRUE;
- }
- 
-+/* removed in Xserver 1.7, add it again so that proprietary Xpsb can be loaded */
-+void
-+xf86AddModuleInfo(pointer info, pointer module)
-+{
-+}
-+
-+/* removed in mesa, add it again so that proprietary Xpsb can be loaded */
-+typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
-+void
-+_glapi_set_warning_func( _glapi_warning_func func )
-+{
-+}
-+
- static Bool
- psbPreInitXpsb(ScrnInfoPtr pScrn)
- {
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/visibility.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/visibility.patch
deleted file mode 100644
index 2c68805..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/visibility.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: xserver-xorg-video-psb-0.32.1/configure.ac
-===================================================================
---- xserver-xorg-video-psb-0.32.1.orig/configure.ac
-+++ xserver-xorg-video-psb-0.32.1/configure.ac
-@@ -107,6 +107,7 @@ AC_DEFINE(INTEL_PSB_DRIVER, 1, [Compatib
- 
- AC_SUBST([DRI_CFLAGS])
- AC_SUBST([XORG_CFLAGS])
-+XORG_CFLAGS = `echo $XORG_CFLAGS | sed 's/hidden/default/'`
- AC_SUBST([moduledir])
- 
- DRIVER_NAME=psb
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-ignoreacpi.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-ignoreacpi.patch
deleted file mode 100644
index a73a493..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-ignoreacpi.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xserver-xorg-video-psb-0.31.0/src/psb_driver.c	2009-04-17 11:22:26.000000000 -0700
-+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c.new	2009-08-14 15:41:35.047596131 -0700
-@@ -909,7 +909,7 @@
-     xf86DrvMsg(pScrn->scrnIndex, from, "Use %s cursor.\n",
- 	       pPsb->sWCursor ? "software" : "hardware");
- 
--    pPsb->ignoreACPI = FALSE;
-+    pPsb->ignoreACPI = TRUE;
-     from =
- 	xf86GetOptValBool(pPsb->options, OPTION_IGNORE_ACPI,
- 			  &pPsb->ignoreACPI)
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-xserver17.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-xserver17.patch
deleted file mode 100644
index defed50..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xorg-x11-drv-psb-0.31.0-xserver17.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- xserver-xorg-video-psb-0.31.0/src/Xpsb.h	2009-04-17 11:22:26.000000000 -0700
-+++ xserver-xorg-video-psb-0.31.0/src/Xpsb.h.new	2009-08-28 09:24:16.333677591 -0700
-@@ -38,7 +38,9 @@
- #include "xf86drm.h"
- #include "xf86.h"
- #include "xf86_OSproc.h"
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
- #include "xf86Resources.h"
-+#endif
- #include "compiler.h"
- 
- #define XPSB_VOFFSET_X 0
---- xserver-xorg-video-psb-0.31.0/src/psb_driver.h	2009-04-17 11:22:25.000000000 -0700
-+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.h.new	2009-08-28 09:24:11.822679667 -0700
-@@ -34,7 +34,6 @@
- 
- #include "xf86.h"
- #include "xf86_OSproc.h"
--#include "xf86Resources.h"
- #include "compiler.h"
- #include "xf86PciInfo.h"
- #include "vgaHW.h"
-@@ -46,8 +45,10 @@
- #include "xf86int10.h"
- #include "mibank.h"
- #include "dgaproc.h"
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
- #include "xf86Resources.h"
- #include "xf86RAC.h"
-+#endif
- #include "fb.h"
- #include "xaa.h"
- #include "xf86xv.h"
---- xserver-xorg-video-psb-0.31.0/src/i830_i2c.c	2009-04-17 11:22:24.000000000 -0700
-+++ xserver-xorg-video-psb-0.31.0/src/i830_i2c.c.new	2009-08-28 09:33:06.789804272 -0700
-@@ -31,8 +31,10 @@
- 
- #include "xf86.h"
- #include "xf86_OSproc.h"
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
- #include "xf86Resources.h"
- #include "xf86RAC.h"
-+#endif
- #include "xf86cmap.h"
- #include "compiler.h"
- #include "mibstore.h"
---- xserver-xorg-video-psb-0.31.0/src/psb_video.c	2009-04-17 11:22:26.000000000 -0700
-+++ xserver-xorg-video-psb-0.31.0/src/psb_video.c.new	2009-08-28 09:35:03.874805663 -0700
-@@ -36,7 +36,9 @@
- 
- #include "xf86.h"
- #include "xf86_OSproc.h"
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
- #include "xf86Resources.h"
-+#endif
- #include "compiler.h"
- 
- #include "xf86xv.h"
---- xserver-xorg-video-psb-0.31.0/src/psb_driver.c	2009-04-17 11:22:26.000000000 -0700
-+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c.new	2009-08-28 10:30:32.325553685 -0700
-@@ -317,7 +317,7 @@
-  * This data is accessed by the loader.  The name must be the module name
-  * followed by "ModuleData".
-  */
--XF86ModuleData psbModuleData = { &psbVersionRec, psbSetup, NULL };
-+_X_EXPORT XF86ModuleData psbModuleData = { &psbVersionRec, psbSetup, NULL };
- 
- static pointer
- psbSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
-@@ -1023,11 +1023,13 @@
- 
-     PSB_DEBUG(scrnIndex, 3, "Initializing device\n");
- 
-+#ifndef XSERVER_LIBPCIACCESS
-     if (xf86RegisterResources(pDevice->pEnt->index, NULL, ResExclusive)) {
- 	xf86DrvMsg(scrnIndex, X_ERROR,
- 		   "Could not registrer device. Resource conflict.\n");
- 	return FALSE;
-     }
-+#endif
- 
-     if (!xf86LoadSubModule(pDevice->pScrns[0], "vgahw"))
- 	return FALSE;
-
-
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-assert.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-assert.patch
deleted file mode 100644
index 5137a59..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-assert.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.assert xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c
---- xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.assert	2010-04-26 13:40:50.000000000 +0200
-+++ xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c	2010-04-26 13:48:28.000000000 +0200
-@@ -30,6 +30,7 @@
- #include "xf86mm.h"
- #include "xf86drm.h"
- #include "stdio.h"
-+#include <assert.h>
- 
- /*
-  * This is a simple wrapper around libdrm's buffer interface to be used 
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-comment_unused.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-comment_unused.patch
deleted file mode 100644
index ca811b6..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-comment_unused.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.comment_unused xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c
---- xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c.comment_unused	2009-04-17 20:22:26.000000000 +0200
-+++ xserver-xorg-video-psb-0.31.0/libmm/mm_drm.c	2010-04-26 13:40:50.000000000 +0200
-@@ -277,6 +277,7 @@ createFence(struct _MMManager *mm,
-     return &dFence->mf;
- }
- 
-+/*
- static void
- fenceDestroy(struct _MMFence *mf)
- {
-@@ -288,6 +289,7 @@ fenceDestroy(struct _MMFence *mf)
-     assert(ret == 0);
-     free(dFence);
- }
-+*/
- 
- static int
- fenceEmit(struct _MMFence *mf, unsigned fence_class,
-@@ -369,7 +371,7 @@ mmCreateDRM(int drmFD)
-     mm->fenceSignaled = fenceSignaled;
-     mm->fenceWait = fenceWait;
-     mm->fenceError = NULL;
--    mm->fenceDestroy = fenceDestroy;
-+    /* mm->fenceDestroy = fenceDestroy; */
-     mm->destroy = destroy;
-     return mm;
- 
-diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h.comment_unused xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h
---- xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h.comment_unused	2009-04-17 20:22:26.000000000 +0200
-+++ xserver-xorg-video-psb-0.31.0/libmm/mm_interface.h	2010-04-26 13:45:22.000000000 +0200
-@@ -141,7 +141,7 @@ typedef struct _MMManager
-     int (*fenceWait) (struct _MMFence * mf, unsigned flushMask,
- 		      unsigned flags);
-     unsigned (*fenceError) (struct _MMFence * mf);
--    void (*fenceDestroy) (struct _MMFence * mf);
-+    /* void (*fenceDestroy) (struct _MMFence * mf); */
- } MMManager;
- 
- /*
-@@ -204,6 +204,7 @@ mmFenceEmit(struct _MMFence *mf, unsigne
-     return mf->man->fenceEmit(mf, class, type, flags);
- }
- 
-+/*
- static inline void
- mmFenceUnReference(struct _MMFence **mfP)
- {
-@@ -214,6 +215,7 @@ mmFenceUnReference(struct _MMFence **mfP
-     }
-     *mfP = NULL;
- }
-+*/
- 
- static inline struct _MMFence *
- mmFenceReference(struct _MMFence *mf)
-diff -p -up xserver-xorg-video-psb-0.31.0/libmm/mm_user.c.comment_unused xserver-xorg-video-psb-0.31.0/libmm/mm_user.c
---- xserver-xorg-video-psb-0.31.0/libmm/mm_user.c.comment_unused	2009-04-17 20:22:26.000000000 +0200
-+++ xserver-xorg-video-psb-0.31.0/libmm/mm_user.c	2010-04-26 13:05:15.000000000 +0200
-@@ -77,6 +77,7 @@ typedef struct _UserSignal
-     UserManager *man;
- } UserSignal;
- 
-+/*
- void
- mmFenceSignal(struct _MMSignal *signal, unsigned class,
- 	      unsigned type, unsigned sequence, unsigned error,
-@@ -148,6 +149,7 @@ mmFenceSignal(struct _MMSignal *signal,
- 	type |= fence->signalPrevious;
-     }
- }
-+*/
- 
- static int
- fenceEmit(struct _MMFence *mf, unsigned class, unsigned type, unsigned flags)
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-greedy.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-greedy.patch
deleted file mode 100644
index 8758911..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-greedy.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_accel.c.greedy xserver-xorg-video-psb-0.31.0/src/psb_accel.c
---- xserver-xorg-video-psb-0.31.0/src/psb_accel.c.greedy	2009-04-17 20:22:24.000000000 +0200
-+++ xserver-xorg-video-psb-0.31.0/src/psb_accel.c	2010-04-23 14:52:47.000000000 +0200
-@@ -1331,6 +1331,15 @@ psbExaInit(ScrnInfoPtr pScrn)
-     pExa->FinishAccess = psbExaFinishAccess;
-     pExa->UploadToScreen = psbExaUploadToScreen;
- 
-+    if (!xf86FindOptionValue(pScrn->options, "MigrationHeuristic")) {
-+      const char *default_migration = "greedy";
-+      xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-+		 "Using default MigrationHeuristic: %s\n",
-+		 default_migration);
-+      xf86ReplaceStrOption(pScrn->options, "MigrationHeuristic", default_migration);
-+    }
-+
-+
-     if (!exaDriverInit(pScrn->pScreen, pExa)) {
- 	goto out_err;
-     }
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-loader.patch b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-loader.patch
deleted file mode 100644
index 24cbc0d..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb-0.32.1/xserver-xorg-video-psb-0.31.0-loader.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_dri.c.loader xserver-xorg-video-psb-0.31.0/src/psb_dri.c
---- xserver-xorg-video-psb-0.31.0/src/psb_dri.c.loader	2009-04-17 20:22:24.000000000 +0200
-+++ xserver-xorg-video-psb-0.31.0/src/psb_dri.c	2010-03-12 15:03:33.000000000 +0100
-@@ -548,8 +548,6 @@ psbDRIScreenInit(ScreenPtr pScreen)
- 
-     PSB_DEBUG(pScrn->scrnIndex, 3, "psbDRIScreenInit\n");
- 
--    xf86LoaderReqSymLists(driReqSymbols, NULL);
--
-     pPsb->pDRIInfo = NULL;
- 
-     /*
-diff -p -up xserver-xorg-video-psb-0.31.0/src/psb_driver.c.loader xserver-xorg-video-psb-0.31.0/src/psb_driver.c
---- xserver-xorg-video-psb-0.31.0/src/psb_driver.c.loader	2010-03-12 13:48:52.000000000 +0100
-+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c	2010-03-12 15:03:26.000000000 +0100
-@@ -329,12 +329,6 @@ psbSetup(pointer Module, pointer Options
-     if (!Initialised) {
- 	Initialised = TRUE;
- 	xf86AddDriver(&psb, Module, 0);
--	LoaderRefSymLists(fbSymbols, ddcSymbols, shadowSymbols,
--			  psbvgahwSymbols,
--#ifdef XF86DRI
--			  psbDRMSymbols, psbDRISymbols,
--#endif
--			  NULL);
- 	return (pointer) TRUE;
-     }
- 
-@@ -639,7 +633,6 @@ psbPreInitDRI(ScrnInfoPtr pScrn)
-     if (!xf86LoadSubModule(pScrn, "dri"))
- 	return FALSE;
- 
--    xf86LoaderReqSymLists(psbDRISymbols, psbDRMSymbols, NULL);
-     return TRUE;
- }
- 
-@@ -660,7 +653,6 @@ psbPreInitXpsb(ScrnInfoPtr pScrn)
- 
-     pPsb->xpsb = TRUE;
- 
--    xf86LoaderReqSymLists(psbXpsbSymbols, NULL);
-     return TRUE;
- }
- #endif
-@@ -680,7 +672,6 @@ psbPreInitAccel(ScrnInfoPtr pScrn)
- 	if (!xf86LoadSubModule(pScrn, "exa"))
- 	    return FALSE;
- 
--	xf86LoaderReqSymLists(exaSymbols, NULL);
-     }
- 
-     xf86DrvMsg(pScrn->scrnIndex, from, "Acceleration %sabled\n",
-@@ -720,7 +711,6 @@ psbPreInitShadowFB(ScrnInfoPtr pScrn)
- 	if (!xf86LoadSubModule(pScrn, "shadow"))
- 	    return FALSE;
- 
--	xf86LoaderReqSymLists(shadowSymbols, NULL);
-     }
- 
-     xf86DrvMsg(pScrn->scrnIndex, from, "Shadow framebuffer %sabled\n",
-@@ -854,7 +844,6 @@ psbPreInit(ScrnInfoPtr pScrn, int flags)
- 
-     if (!xf86LoadSubModule(pScrn, "vbe"))
- 	return FALSE;
--    xf86LoaderReqSymLists(vbeSymbols, NULL);
- 
-     /*
-      * Parse options and load required modules here.
-@@ -874,7 +863,6 @@ psbPreInit(ScrnInfoPtr pScrn, int flags)
- 
-     if (!xf86LoadSubModule(pScrn, "fb"))
- 	return (FALSE);
--    xf86LoaderReqSymLists(fbSymbols, NULL);
- 
-     pScrn->chipset = "Intel GMA500";
-     pScrn->monitor = pScrn->confScreen->monitor;
-@@ -1033,7 +1021,6 @@ psbDeviceInit(PsbDevicePtr pDevice, int
- 
-     if (!xf86LoadSubModule(pDevice->pScrns[0], "vgahw"))
- 	return FALSE;
--    xf86LoaderReqSymLists(psbvgahwSymbols, NULL);
- 
-     if (!vgaHWGetHWRec(pDevice->pScrns[0]))
- 	return FALSE;
diff --git a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb_0.32.1.bb b/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb_0.32.1.bb
deleted file mode 100644
index 1ff92bb..0000000
--- a/meta-emenlow/recipes-graphics/xserver-xorg-video-psb/xserver-xorg-video-psb_0.32.1.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-DESCRIPTION = "2D graphics driver for Poulsbo"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://MIT_License.txt;md5=732825ecdcf420261531d935fcd914a7"
-PR = "r2"
-
-inherit autotools
-
-SRC_URI = "https://launchpad.net/~gma500/+archive/ppa/+files/xserver-xorg-video-psb_0.36.0-0ubuntu3~1004um9.tar.gz \
-	file://xorg-x11-drv-psb-0.31.0-ignoreacpi.patch;patch=1 \
-	file://xorg-x11-drv-psb-0.31.0-xserver17.patch;patch=1 \
-	file://xserver-xorg-video-psb-0.31.0-assert.patch;patch=1 \
-	file://xserver-xorg-video-psb-0.31.0-comment_unused.patch;patch=1 \
-	file://xserver-xorg-video-psb-0.31.0-greedy.patch;patch=1 \
-	file://xserver-xorg-video-psb-0.31.0-loader.patch;patch=1 \
-	file://stubs.patch;patch=1 \
-	file://01_disable_lid_timer.patch;patch=1 \
-	file://psb_xvtempfix.patch;patch=1 \
-	file://psb_mixed.patch;patch=1 \
-	file://dri-h.patch \
-	file://libdrm-poulsbo.patch"
-
-export DRI_CFLAGS="-I${STAGING_INCDIR}/psb -I${STAGING_INCDIR}/psb/drm \
-	-I${STAGING_INCDIR}/X11/dri"
-
-export CFLAGS = "-fvisibility=default"
-export XORG_CFLAGS="-fvisibility=default -I${STAGING_INCDIR}/xorg \
-       -I${STAGING_INCDIR}/pixman-1"
-
-FILES_${PN} += "${libdir}/xorg/modules/drivers/libmm.so \
-	     ${libdir}/xorg/modules/drivers/psb_drv.so"
-
-DEPENDS += "virtual/libgl virtual/xserver"
-
-COMPATIBLE_MACHINE = "emenlow"
diff --git a/meta-emenlow/recipes-kernel/linux/linux-2.6.33.2/defconfig b/meta-emenlow/recipes-kernel/linux/linux-2.6.33.2/defconfig
deleted file mode 100644
index a516dc9..0000000
--- a/meta-emenlow/recipes-kernel/linux/linux-2.6.33.2/defconfig
+++ /dev/null
@@ -1,68 +0,0 @@
-CONFIG_X86_32=y
-CONFIG_PRINTK=y
-
-# Basic hardware support for the box - network, USB, PCI, sound
-CONFIG_NETDEVICES=y
-CONFIG_NETDEV_1000=y
-CONFIG_ATA=y
-CONFIG_ATA_GENERIC=y
-CONFIG_ATA_SFF=y
-CONFIG_PCI=y
-CONFIG_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_E1000E=y
-CONFIG_R8169=y
-CONFIG_PATA_SCH=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_NET=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_SG=y
-CONFIG_SOUND=y
-CONFIG_SND=y
-CONFIG_SND_HDA_INTEL=y
-
-# Make sure these are on, otherwise the bootup won't be fun
-CONFIG_EXT3_FS=y
-CONFIG_UNIX=y
-CONFIG_INET=y
-CONFIG_MODULES=y
-CONFIG_SHMEM=y
-CONFIG_TMPFS=y
-CONFIG_PACKET=y
-
-# These are needed for the Poulsbo kernel modules
-CONFIG_I2C=y
-CONFIG_AGP=y
-CONFIG_VFAT_FS=y
-CONFIG_PM=y
-CONFIG_ACPI=y
-CONFIG_FB=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_INPUT=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_IVTV=y
-CONFIG_MEDIA_SUPPORT=y
-CONFIG_VIDEO_CAPTURE_DRIVERS=y
-CONFIG_VIDEO_DEV=y
-CONFIG_VIDEO_V4L2_COMMON=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_VIDEO_FB_IVTV=y
-
-# Needed for booting (and using) USB memory sticks
-CONFIG_USB_STORAGE=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_RD_GZIP=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
diff --git a/meta-emenlow/recipes-kernel/linux/linux-yocto-stable_git.bbappend b/meta-emenlow/recipes-kernel/linux/linux-yocto-stable_git.bbappend
deleted file mode 100644
index 9fa2937..0000000
--- a/meta-emenlow/recipes-kernel/linux/linux-yocto-stable_git.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESEXTRAPATHS := "${THISDIR}/${PN}"
-COMPATIBLE_MACHINE_emenlow = "emenlow"
-KMACHINE_emenlow  = "emenlow"
diff --git a/meta-emenlow/recipes-kernel/linux/linux_2.6.33.2.bbappend b/meta-emenlow/recipes-kernel/linux/linux_2.6.33.2.bbappend
deleted file mode 100644
index fac0921..0000000
--- a/meta-emenlow/recipes-kernel/linux/linux_2.6.33.2.bbappend
+++ /dev/null
@@ -1,3 +0,0 @@
-FILESPATH := "${FILESPATH}:${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
-SRC_URI += "file://defconfig"
-COMPATIBLE_MACHINE_emenlow = "emenlow"
diff --git a/meta/conf/bblayers.conf.sample b/meta/conf/bblayers.conf.sample
index 3c7b6e6..b2f37c0 100644
--- a/meta/conf/bblayers.conf.sample
+++ b/meta/conf/bblayers.conf.sample
@@ -1,9 +1,8 @@
 # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
 # changes incompatibly
-LCONF_VERSION = "3"
+LCONF_VERSION = "4"
 
 BBFILES ?= ""
 BBLAYERS = " \
   ##POKYBASE##/meta \
-  ##POKYBASE##/meta-emenlow \
   "
diff --git a/meta/conf/sanity.conf b/meta/conf/sanity.conf
index 1fbeb61..fcaed11 100644
--- a/meta/conf/sanity.conf
+++ b/meta/conf/sanity.conf
@@ -9,7 +9,7 @@ SANITY_ABIFILE = "${TMPDIR}/abi_version"
 
 SANITY_VERSION = "1"
 POKY_CONF_VERSION  = "1"
-LAYER_CONF_VERSION = "3"
+LAYER_CONF_VERSION = "4"
 SITE_CONF_VERSION  = "1"
 
 INHERIT += "sanity"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 24/50] documentation/poky-ref-manual/poky-ref-manual.xml: updated copyright date
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (22 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 23/50] Emenlow Removal from Poky Core: meta-emenlow Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 25/50] documentation/bsp-guide/bsp-guide.xml: Updated copyright Koen Kooi
                   ` (26 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Rifenbark <scott.m.rifenbark@intel.com>

Changed the copyright upper date from 2010 to 2011.

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
---
 documentation/poky-ref-manual/poky-ref-manual.xml |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/documentation/poky-ref-manual/poky-ref-manual.xml b/documentation/poky-ref-manual/poky-ref-manual.xml
index 2175d0a..b4d7757 100644
--- a/documentation/poky-ref-manual/poky-ref-manual.xml
+++ b/documentation/poky-ref-manual/poky-ref-manual.xml
@@ -50,7 +50,7 @@
         </revhistory>
 
     <copyright>
-      <year>2007-2010</year>
+      <year>2007-2011</year>
       <holder>Linux Foundation</holder>
     </copyright>
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 25/50] documentation/bsp-guide/bsp-guide.xml: Updated copyright
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (23 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 24/50] documentation/poky-ref-manual/poky-ref-manual.xml: updated copyright date Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 26/50] documentation/kernel-manual/kernel-manual.xml: Updated copyright date Koen Kooi
                   ` (25 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Rifenbark <scott.m.rifenbark@intel.com>

Changed copyright date from "2010" to "2010-2011"

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
---
 documentation/bsp-guide/bsp-guide.xml |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/documentation/bsp-guide/bsp-guide.xml b/documentation/bsp-guide/bsp-guide.xml
index 3479d15..a591c64 100644
--- a/documentation/bsp-guide/bsp-guide.xml
+++ b/documentation/bsp-guide/bsp-guide.xml
@@ -36,7 +36,7 @@
         </revhistory>
 
     <copyright>
-      <year>2010</year>
+      <year>2010-2011</year>
       <holder>Linux Foundation</holder>
     </copyright>
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 26/50] documentation/kernel-manual/kernel-manual.xml: Updated copyright date
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (24 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 25/50] documentation/bsp-guide/bsp-guide.xml: Updated copyright Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 27/50] documentation/yocto-project-qs/yocto-project-qs.xml: Added Copyright dates Koen Kooi
                   ` (24 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Rifenbark <scott.m.rifenbark@intel.com>

Changed the copyright date from "2010" to "2010-2011".

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
---
 documentation/kernel-manual/kernel-manual.xml |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/documentation/kernel-manual/kernel-manual.xml b/documentation/kernel-manual/kernel-manual.xml
index 70d482d..e9a9ed3 100644
--- a/documentation/kernel-manual/kernel-manual.xml
+++ b/documentation/kernel-manual/kernel-manual.xml
@@ -36,7 +36,7 @@
         </revhistory>
 
     <copyright>
-      <year>2010</year>
+      <year>2010-2011</year>
       <holder>Linux Foundation</holder>
     </copyright>
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 27/50] documentation/yocto-project-qs/yocto-project-qs.xml: Added Copyright dates
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (25 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 26/50] documentation/kernel-manual/kernel-manual.xml: Updated copyright date Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 28/50] poky-image-lsb-sdk.bb: add image for LSB SDK Build Koen Kooi
                   ` (23 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Rifenbark <scott.m.rifenbark@intel.com>

Added "Copyright 2010-2011 Linux Foundation" under the title.  For
now this will have to do.  Once we get the converted website up I
would like to see all manuals displayed as HTML files within the
context of the site layout.  At that point we can have a copyright
and trademark stuff in a persistent footer.

[BUGID #696]

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
---
 .../yocto-project-qs/yocto-project-qs.xml          |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml
index 452282f..14c3f90 100644
--- a/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -6,6 +6,7 @@
 
 <section id='fake-title'>
     <title>Yocto Project Quick Start</title>
+    <para>Copyright &copy; 2010-2011 Linux Foundation</para>
 </section>
 
 <section id='welcome'>
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 28/50] poky-image-lsb-sdk.bb: add image for LSB SDK Build
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (26 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 27/50] documentation/yocto-project-qs/yocto-project-qs.xml: Added Copyright dates Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 29/50] Revise stripping and splitting of debug information Koen Kooi
                   ` (22 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-extended/images/poky-image-lsb-sdk.bb |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-extended/images/poky-image-lsb-sdk.bb

diff --git a/meta/recipes-extended/images/poky-image-lsb-sdk.bb b/meta/recipes-extended/images/poky-image-lsb-sdk.bb
new file mode 100644
index 0000000..184b5d7
--- /dev/null
+++ b/meta/recipes-extended/images/poky-image-lsb-sdk.bb
@@ -0,0 +1,9 @@
+IMAGE_FEATURES += "apps-console-core tools-debug tools-profile tools-sdk dev-pkgs"
+
+IMAGE_INSTALL = "\
+    ${POKY_BASE_INSTALL} \
+    task-poky-basic \
+    task-poky-lsb \
+    "
+
+inherit poky-image
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 29/50] Revise stripping and splitting of debug information
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (27 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 28/50] poky-image-lsb-sdk.bb: add image for LSB SDK Build Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 30/50] package.bbclass: Refactor split and strip function Koen Kooi
                   ` (21 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Mark Hatle <mark.hatle@windriver.com>

We now support two styles of debug information generation, the '.debug' style,
which is the same as previously implemented.  This style simply splits the
debug information and makes it available in the same general directory.

  /bin/foo -> /bin/.debug/foo

The new 'debug-file-directory' style splits the debug information and places
it into the single debug-file-directory, /usr/lib/debug:

  /bin/foo -> /usr/lib/debug/bin/foo.debug

Both also find and copy all referenced source code to a new /usr/src/debug
directory.  This allows the -dbg files to be used for stand-a-lone debugging
on or off the target device.

File stripping is now handled as a seperate operation from file splitting.
This allows us to split the debug information, but also leave it in the
original file -- or prevent the debug information from being split.

Also enhance the comments within local.conf.sample to provide a better
understanding of the control the user has over debug file generation.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/insane.bbclass  |    4 +-
 meta/classes/package.bbclass |  233 +++++++++++++++++++++++++++++++++++++-----
 meta/conf/bitbake.conf       |    9 ++-
 meta/conf/local.conf.sample  |   31 ++++++
 4 files changed, 246 insertions(+), 31 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5d3ef92..b376470 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -192,8 +192,8 @@ def package_qa_check_dev(path, name,d, elf):
 
     sane = True
 
-    if not name.endswith("-dev") and path.endswith(".so") and os.path.islink(path):
-        error_msg = "non -dev package contains symlink .so: %s path '%s'" % \
+    if not name.endswith("-dev") and not name.endswith("-dbg") and path.endswith(".so") and os.path.islink(path):
+        error_msg = "non -dev/-dbg package contains symlink .so: %s path '%s'" % \
                  (name, package_qa_clean_path(path,d))
         sane = package_qa_handle_error(0, error_msg, name, path, d)
 
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 02c2dd3..86e24bc 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -165,32 +165,88 @@ python () {
         d.setVar("PACKAGERDEPTASK", "")
 }
 
-def runstrip(file, d):
-    # Function to strip a single file, called from split_and_strip_files below
+def splitfile(file, debugfile, debugsrcdir, d):
+    # Function to split a single file, called from split_and_strip_files below
     # A working 'file' (one which works on the target architecture)
-    # is necessary for this stuff to work, hence the addition to do_package[depends]
+    # is split and the split off portions go to debugfile.
+    #
+    # The debug information is then processed for src references.  These
+    # references are copied to debugsrcdir, if defined.
 
     import commands, stat
 
+    dvar = bb.data.getVar('PKGD', d, True)
     pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+    objcopy = bb.data.getVar("OBJCOPY", d, True)
+    debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
+    workdir = bb.data.expand("${WORKDIR}", d)
+    sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
 
-    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+    # We ignore kernel modules, we don't generate debug info files.
+    if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
+	return 0
 
-    if ret:
-        bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+    newmode = None
+    if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
+        origmode = os.stat(file)[stat.ST_MODE]
+        newmode = origmode | stat.S_IWRITE | stat.S_IREAD
+        os.chmod(file, newmode)
 
-    if "not stripped" not in result:
-        bb.debug(1, "runstrip: skip %s" % file)
-        return 0
+    # We need to extract the debug src information here...
+    if debugsrcdir:
+	os.system("%s'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (pathprefix, debugedit, workdir, debugsrcdir, sourcefile, file))
 
-    # If the file is in a .debug directory it was already stripped,
-    # don't do it again...
-    if os.path.dirname(file).endswith(".debug"):
-        bb.note("Already ran strip")
-        return 0
+    bb.mkdirhier(os.path.dirname(debugfile))
+
+    os.system("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile))
+
+    # Set the debuglink to have the view of the file path on the target
+    os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
 
+    if newmode:
+        os.chmod(file, origmode)
+
+    return 0
+
+def splitfile2(debugsrcdir, d):
+    # Function to split a single file, called from split_and_strip_files below
+    #
+    # The debug src information processed in the splitfile2 is further procecessed
+    # and copied to the destination here.
+
+    import commands, stat
+
+    dvar = bb.data.getVar('PKGD', d, True)
+    pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
     strip = bb.data.getVar("STRIP", d, True)
     objcopy = bb.data.getVar("OBJCOPY", d, True)
+    debugedit = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit", d)
+    workdir = bb.data.expand("${WORKDIR}", d)
+    sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
+
+    if debugsrcdir:
+       bb.mkdirhier(debugsrcdir)
+
+       processdebugsrc =  "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
+       processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)"
+
+       os.system(processdebugsrc % (sourcefile, workdir, dvar, debugsrcdir))
+
+       # The copy by cpio may have resulted in some empty directories!  Remove these
+       for root, dirs, files in os.walk("%s%s" % (dvar, debugsrcdir)):
+          for d in dirs:
+              dir = os.path.join(root, d)
+              #bb.note("rmdir -p %s" % dir)
+              os.system("rmdir -p %s 2>/dev/null" % dir)
+
+def runstrip(file, d):
+    # Function to strip a single file, called from split_and_strip_files below
+    # A working 'file' (one which works on the target architecture)
+
+    import commands, stat
+
+    pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+    strip = bb.data.getVar("STRIP", d, True)
 
     # Handle kernel modules specifically - .debug directories here are pointless
     if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -202,21 +258,22 @@ def runstrip(file, d):
         newmode = origmode | stat.S_IWRITE | stat.S_IREAD
         os.chmod(file, newmode)
 
+    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+
+    if ret:
+        bb.error("runstrip: 'file %s' failed" % file)
+        return 0
+
     extraflags = ""
     if ".so" in file and "shared" in result:
         extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
     elif "shared" in result or "executable" in result:
         extraflags = "--remove-section=.comment --remove-section=.note"
 
-    bb.mkdirhier(os.path.join(os.path.dirname(file), ".debug"))
-    debugfile=os.path.join(os.path.dirname(file), ".debug", os.path.basename(file))
-
     stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
     bb.debug(1, "runstrip: %s" % stripcmd)
 
-    os.system("%s'%s' --only-keep-debug '%s' '%s'" % (pathprefix, objcopy, file, debugfile))
     ret = os.system("%s%s" % (pathprefix, stripcmd))
-    os.system("%s'%s' --add-gnu-debuglink='%s' '%s'" % (pathprefix, objcopy, debugfile, file))
 
     if newmode:
         os.chmod(file, origmode)
@@ -224,7 +281,7 @@ def runstrip(file, d):
     if ret:
         bb.error("runstrip: '%s' strip command failed" % stripcmd)
 
-    return 1
+    return 0
 
 #
 # Package data handling routines
@@ -333,10 +390,24 @@ python perform_packagecopy () {
 }
 
 python split_and_strip_files () {
-	import stat
+	import commands, stat, errno
 
 	dvar = bb.data.getVar('PKGD', d, True)
 
+	# We default to '.debug' style
+	if bb.data.getVar('PACKAGE_DEBUG_SPLIT_STYLE', d, True) == 'debug-file-directory':
+		# Single debug-file-directory style debug info
+		debugappend = ".debug"
+		debugdir = ""
+		debuglibdir = "/usr/lib/debug"
+		debugsrcdir = "/usr/src/debug"
+	else:
+		# Original Poky, a.k.a. ".debug", style debug info
+		debugappend = ""
+		debugdir = "/.debug"
+		debuglibdir = ""
+		debugsrcdir = "/usr/src/debug"
+
 	os.chdir(dvar)
 
 	def isexec(path):
@@ -344,16 +415,124 @@ python split_and_strip_files () {
 			s = os.stat(path)
 		except (os.error, AttributeError):
 			return 0
-		return (s[stat.ST_MODE] & stat.S_IEXEC)
+		return ((s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH))
+
+	# Return 0 - not elf, 1 - ELF & not stripped, 2 - ELF & stripped
+	def isELF(path):
+		pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+		ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
+
+		if ret:
+			bb.error("split_and_strip_files: 'file %s' failed" % path)
+			return 0
+
+		# Not stripped
+		if "ELF" in result and "not stripped" in result:
+			return 1
+
+		# Stripped
+		if "ELF" in result:
+			return 2
+
+		return 0;
+
+	#
+	# First lets process debug splitting
+	#
+	if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'):
+		file_links = {}
 
-	# Figure out which packages we want to process
-	if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
 		for root, dirs, files in os.walk(dvar):
 			for f in files:
 				file = os.path.join(root, f)
-				if not os.path.islink(file) and not os.path.isdir(file) and isexec(file):
-					runstrip(file, d)
+				# Skip debug files, it must be executable, and must be a file (or link)
+				if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file):
+					src = file[len(dvar):]
+					dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+					fpath = dvar + dest
+					# Preserve symlinks in debug area...
+					if os.path.islink(file):
+						target = os.readlink(file)
+						if not os.path.isabs(target):
+							target = os.path.join(os.path.dirname(file), target)
+						if isELF(target):
+							ltarget = os.readlink(file)
+							lpath = os.path.dirname(ltarget)
+							lbase = os.path.basename(ltarget)
+							ftarget = ""
+							if lpath and lpath != ".":
+								ftarget += lpath + debugdir + "/"
+							ftarget += lbase + debugappend
+							bb.mkdirhier(os.path.dirname(fpath))
+							#bb.note("Symlink %s -> %s" % (fpath, ftarget))
+							os.symlink(ftarget, fpath)
+						continue
+
+					# If the file is elf we need to check it for hard links
+					elf_file = isELF(file)
+					if elf_file:
+						# Preserve hard links in debug area...
+						s = os.stat(file)
+						if s.st_nlink > 1:
+							file_reference = "%d_%d" % (s.st_dev, s.st_ino)
+							if file_reference not in file_links:
+								# If this is new, and already stripped we avoid recording it
+								# as we'll be unable to set the hard link later, because it
+								# won't be split/stripped...
+								if elf_file != 2:
+									file_links[file_reference] = fpath
+							else:
+								bb.mkdirhier(os.path.dirname(fpath))
+								#bb.note("Link %s -> %s" % (fpath, file_links[file_reference]))
+								os.link(file_links[file_reference], fpath)
+								continue
+
+						if elf_file == 2:
+							bb.warn("File '%s' was already stripped, this will prevent future debugging!" % (src))
+							continue
 
+						# Split and Strip
+						bb.mkdirhier(os.path.dirname(fpath))
+						#bb.note("Split %s -> %s" % (file, fpath))
+						splitfile(file, fpath, debugsrcdir, d)
+
+		# Process the debugsrcdir if requested...
+		splitfile2(debugsrcdir, d)
+
+		# The above may have generated dangling symlinks 
+		for root, dirs, files in os.walk(dvar):
+			for f in files:
+				file = os.path.join(root, f)
+				# We ONLY strip dangling links if they're debug generated!
+				if (debugappend != "" and file.endswith(debugappend)) or (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])):
+					try:
+						s = os.stat(file)
+					except OSError, (err, strerror):
+						if err != errno.ENOENT:
+							raise
+						#bb.note("Remove dangling link %s" % file)
+						os.unlink(file)
+
+	#
+	# End of debug splitting
+	#
+
+	#
+	# Now lets go back over things and strip them
+	#
+	if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):	
+		for root, dirs, files in os.walk(dvar):
+			for f in files:
+				file = os.path.join(root, f)
+				# if not a debugfile, is executable, is a file, and not a symlink
+				if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file) and not os.path.islink(file):
+					elf_file = isELF(file)
+					if elf_file and elf_file != 2:
+						#bb.note("Strip %s" % file)
+						runstrip(file, d)
+	#
+	# End of strip
+	#
 }
 
 python populate_packages () {
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index cba918e..cf99a81 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -242,9 +242,14 @@ SECTION_${PN}-dev = "devel"
 ALLOW_EMPTY_${PN}-dev = "1"
 RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPV})"
 
-FILES_${PN}-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
+DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
             ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${PN}/.debug \
-            ${libdir}/matchbox-panel/.debug"
+            ${libdir}/matchbox-panel/.debug /usr/src/debug"
+
+DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug"
+
+FILES_${PN}-dbg = "${@bb.data.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][bb.data.getVar('PACKAGE_DEBUG_SPLIT_STYLE', d, 1) == 'debug-file-directory'], d, 1)}"
+
 SECTION_${PN}-dbg = "devel"
 ALLOW_EMPTY_${PN}-dbg = "1"
 RRECOMMENDS_${PN}-dbg = "${PN} (= ${EXTENDPV})"
diff --git a/meta/conf/local.conf.sample b/meta/conf/local.conf.sample
index 65b5087..434c684 100644
--- a/meta/conf/local.conf.sample
+++ b/meta/conf/local.conf.sample
@@ -104,6 +104,37 @@ USER_CLASSES ?= "image-mklibs image-prelink"
 # <build directory>/tmp
 #TMPDIR = "${POKYBASE}/build/tmp"
 
+# The following are used to control options related to debugging.
+#
+# Uncomment this to change the optimization to make debugging easer, at the 
+# possible cost of performance.
+# DEBUG_BUILD = "1"
+#
+# Uncomment this to disable the stripping of the installed binaries
+# INHIBIT_PACKAGE_STRIP = "1"
+#
+# Uncomment this to disable the split of the debug information into -dbg files
+# INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+#
+# When splitting debug information, the following controls the results of the
+# file splitting.
+#
+#  .debug (default):
+#    When splitting the debug information will be placed into
+#    a .debug directory in the same dirname of the binary produced:
+#      /bin/foo -> /bin/.debug/foo
+#
+#  debug-file-directory:
+#    When splitting the debug information will be placed into
+#    a central debug-file-directory, /usr/lib/debug:
+#      /bin/foo -> /usr/lib/debug/bin/foo.debug
+#
+#    Any source code referenced in the debug symbols will be copied
+#    and made available within the /usr/src/debug directory
+#
+PACKAGE_DEBUG_SPLIT_STYLE = '.debug'
+# PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
+
 # Uncomment these to build a package such that you can use gprof to profile it.
 # NOTE: This will only work with 'linux' targets, not
 # 'linux-uclibc', as uClibc doesn't provide the necessary
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 30/50] package.bbclass: Refactor split and strip function
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (28 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 29/50] Revise stripping and splitting of debug information Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 31/50] package.bbclass: Fix debug sources directory creation to reference the target system Koen Kooi
                   ` (20 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Mark Hatle <mark.hatle@windriver.com>

Refactor the function to eliminate additional interations/walks of the
filesystem..

Elimiate multiple runs of the external 'file' command as well.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/package.bbclass |  242 +++++++++++++++++++++++++-----------------
 1 files changed, 144 insertions(+), 98 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 86e24bc..59a0601 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -184,7 +184,7 @@ def splitfile(file, debugfile, debugsrcdir, d):
 
     # We ignore kernel modules, we don't generate debug info files.
     if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
-	return 0
+	return 1
 
     newmode = None
     if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
@@ -239,9 +239,14 @@ def splitfile2(debugsrcdir, d):
               #bb.note("rmdir -p %s" % dir)
               os.system("rmdir -p %s 2>/dev/null" % dir)
 
-def runstrip(file, d):
+def runstrip(file, elftype, d):
     # Function to strip a single file, called from split_and_strip_files below
     # A working 'file' (one which works on the target architecture)
+    #
+    # The elftype is a bit pattern (explained in split_and_strip_files) to tell
+    # us what type of file we're processing...
+    # 4 - executable
+    # 8 - shared library
 
     import commands, stat
 
@@ -258,16 +263,12 @@ def runstrip(file, d):
         newmode = origmode | stat.S_IWRITE | stat.S_IREAD
         os.chmod(file, newmode)
 
-    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
-
-    if ret:
-        bb.error("runstrip: 'file %s' failed" % file)
-        return 0
-
     extraflags = ""
-    if ".so" in file and "shared" in result:
+    # .so and shared library
+    if ".so" in file and elftype & 8:
         extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
-    elif "shared" in result or "executable" in result:
+    # shared or executable:
+    elif elftype & 8 or elftype & 4:
         extraflags = "--remove-section=.comment --remove-section=.note"
 
     stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
@@ -410,109 +411,158 @@ python split_and_strip_files () {
 
 	os.chdir(dvar)
 
-	def isexec(path):
-		try:
-			s = os.stat(path)
-		except (os.error, AttributeError):
-			return 0
-		return ((s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH))
-
-	# Return 0 - not elf, 1 - ELF & not stripped, 2 - ELF & stripped
+	# Return type (bits):
+	# 0 - not elf
+	# 1 - ELF
+	# 2 - stripped
+	# 4 - executable
+	# 8 - shared library
 	def isELF(path):
+		type = 0
 		pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
 		ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, path))
 
 		if ret:
 			bb.error("split_and_strip_files: 'file %s' failed" % path)
-			return 0
+			return type
 
 		# Not stripped
-		if "ELF" in result and "not stripped" in result:
-			return 1
-
-		# Stripped
 		if "ELF" in result:
-			return 2
+			type |= 1
+			if "not stripped" not in result:
+				type |= 2
+			if "executable" in result:
+				type |= 4
+			if "shared" in result:
+				type |= 8
+		return type
 
-		return 0;
 
 	#
-	# First lets process debug splitting
+	# First lets figure out all of the files we may have to process ... do this only once!
 	#
-	if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'):
-		file_links = {}
-
+	file_list = {}
+	file_links = {}
+	if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1') and \
+	   (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
 		for root, dirs, files in os.walk(dvar):
 			for f in files:
 				file = os.path.join(root, f)
-				# Skip debug files, it must be executable, and must be a file (or link)
-				if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file):
-					src = file[len(dvar):]
-					dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
-					fpath = dvar + dest
-					# Preserve symlinks in debug area...
-					if os.path.islink(file):
-						target = os.readlink(file)
-						if not os.path.isabs(target):
-							target = os.path.join(os.path.dirname(file), target)
-						if isELF(target):
-							ltarget = os.readlink(file)
-							lpath = os.path.dirname(ltarget)
-							lbase = os.path.basename(ltarget)
-							ftarget = ""
-							if lpath and lpath != ".":
-								ftarget += lpath + debugdir + "/"
-							ftarget += lbase + debugappend
-							bb.mkdirhier(os.path.dirname(fpath))
-							#bb.note("Symlink %s -> %s" % (fpath, ftarget))
-							os.symlink(ftarget, fpath)
-						continue
-
-					# If the file is elf we need to check it for hard links
-					elf_file = isELF(file)
-					if elf_file:
-						# Preserve hard links in debug area...
+				# Only process files (and symlinks)... Skip files that are obviously debug files
+				if not (debugappend != "" and file.endswith(debugappend)) and \
+				   not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and \
+				   os.path.isfile(file):
+					try:
 						s = os.stat(file)
-						if s.st_nlink > 1:
-							file_reference = "%d_%d" % (s.st_dev, s.st_ino)
-							if file_reference not in file_links:
-								# If this is new, and already stripped we avoid recording it
-								# as we'll be unable to set the hard link later, because it
-								# won't be split/stripped...
-								if elf_file != 2:
-									file_links[file_reference] = fpath
+					except OSError, (err, strerror):
+						if err != errno.ENOENT:
+							raise
+						# Skip broken symlinks
+						continue
+					# Is the item excutable?  Then we need to process it.
+					if (s[stat.ST_MODE] & stat.S_IXUSR) or \
+					   (s[stat.ST_MODE] & stat.S_IXGRP) or \
+					   (s[stat.ST_MODE] & stat.S_IXOTH):
+						# If it's a symlink, and points to an ELF file, we capture the readlink target
+						if os.path.islink(file):
+							target = os.readlink(file)
+							if not os.path.isabs(target):
+								ltarget = os.path.join(os.path.dirname(file), target)
 							else:
-								bb.mkdirhier(os.path.dirname(fpath))
-								#bb.note("Link %s -> %s" % (fpath, file_links[file_reference]))
-								os.link(file_links[file_reference], fpath)
-								continue
+								ltarget = target
 
-						if elf_file == 2:
-							bb.warn("File '%s' was already stripped, this will prevent future debugging!" % (src))
+							if isELF(ltarget):
+								#bb.note("Sym: %s (%d)" % (ltarget, isELF(ltarget)))
+								file_list[file] = "sym: " + target
 							continue
+						# It's a file (or hardlink), not a link
+						# ...but is it ELF, and is it already stripped?
+						elf_file = isELF(file)
+						if elf_file & 1:
+							# Check if it's a hard link to something else
+							if s.st_nlink > 1:
+								file_reference = "%d_%d" % (s.st_dev, s.st_ino)
+								# Hard link to something else
+								file_list[file] = "hard: " + file_reference
+								continue
 
-						# Split and Strip
-						bb.mkdirhier(os.path.dirname(fpath))
-						#bb.note("Split %s -> %s" % (file, fpath))
-						splitfile(file, fpath, debugsrcdir, d)
+							file_list[file] = "ELF: %d" % elf_file
 
-		# Process the debugsrcdir if requested...
-		splitfile2(debugsrcdir, d)
 
-		# The above may have generated dangling symlinks 
-		for root, dirs, files in os.walk(dvar):
-			for f in files:
-				file = os.path.join(root, f)
-				# We ONLY strip dangling links if they're debug generated!
-				if (debugappend != "" and file.endswith(debugappend)) or (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])):
-					try:
-						s = os.stat(file)
-					except OSError, (err, strerror):
-						if err != errno.ENOENT:
-							raise
-						#bb.note("Remove dangling link %s" % file)
-						os.unlink(file)
+	#
+	# First lets process debug splitting
+	#
+	if (bb.data.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', d, True) != '1'):
+		for file in file_list:
+			src = file[len(dvar):]
+			dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+			fpath = dvar + dest
+			# Preserve symlinks in debug area...
+			if file_list[file].startswith("sym: "):
+				ltarget = file_list[file][5:]
+				lpath = os.path.dirname(ltarget)
+				lbase = os.path.basename(ltarget)
+				ftarget = ""
+				if lpath and lpath != ".":
+					ftarget += lpath + debugdir + "/"
+				ftarget += lbase + debugappend
+				bb.mkdirhier(os.path.dirname(fpath))
+				#bb.note("Symlink %s -> %s" % (fpath, ftarget))
+				os.symlink(ftarget, fpath)
+				continue
+
+			# Preserve hard links in debug area...
+			file_reference = ""
+			if file_list[file].startswith("hard: "):
+				file_reference = file_list[file][6:]
+				if file_reference not in file_links:
+					# If this is a new file, add it as a reference, and
+					# update it's type, so we can fall through and split
+					file_list[file] = "ELF: %d" % (isELF(file))
+				else:
+					target = file_links[file_reference][len(dvar):]
+					ftarget = dvar + debuglibdir + os.path.dirname(target) + debugdir + "/" + os.path.basename(target) + debugappend
+					bb.mkdirhier(os.path.dirname(fpath))
+					#bb.note("Link %s -> %s" % (fpath, ftarget))
+					os.link(ftarget, fpath)
+					continue
 
+			# It's ELF...
+			if file_list[file].startswith("ELF: "):
+				elf_file = int(file_list[file][5:])
+				if elf_file & 2:
+					bb.warn("File '%s' was already stripped, this will prevent future debugging!" % (src))
+					continue
+
+				# Split the file...
+				bb.mkdirhier(os.path.dirname(fpath))
+				#bb.note("Split %s -> %s" % (file, fpath))
+				# Only store off the hard link reference if we successfully split!
+				if splitfile(file, fpath, debugsrcdir, d) == 0 and file_reference != "":
+					file_links[file_reference] = file
+
+		# The above may have generated dangling symlinks, remove them!
+		# Dangling symlinks are a result of something NOT being split, such as a stripped binary.
+		# This should be a rare occurance, but we want to clean up anyway.
+		for file in file_list:
+			if file_list[file].startswith("sym: "):
+				src = file[len(dvar):]
+				dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
+				fpath = dvar + dest
+				try:
+					s = os.stat(fpath)
+				except OSError, (err, strerror):
+					if err != errno.ENOENT:
+						raise
+					#bb.note("Remove dangling link %s -> %s" % (fpath, os.readlink(fpath)))
+					os.unlink(fpath)
+					# This could leave an empty debug directory laying around
+					# take care of the obvious case...
+					os.system("rmdir %s 2>/dev/null" % os.path.dirname(fpath))
+
+		# Process the debugsrcdir if requested...
+		# This copies and places the referenced sources for later debugging...
+		splitfile2(debugsrcdir, d)
 	#
 	# End of debug splitting
 	#
@@ -521,15 +571,11 @@ python split_and_strip_files () {
 	# Now lets go back over things and strip them
 	#
 	if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):	
-		for root, dirs, files in os.walk(dvar):
-			for f in files:
-				file = os.path.join(root, f)
-				# if not a debugfile, is executable, is a file, and not a symlink
-				if not (debugappend != "" and file.endswith(debugappend)) and not (debugdir != "" and debugdir in os.path.dirname(file[len(dvar):])) and isexec(file) and os.path.isfile(file) and not os.path.islink(file):
-					elf_file = isELF(file)
-					if elf_file and elf_file != 2:
-						#bb.note("Strip %s" % file)
-						runstrip(file, d)
+		for file in file_list:
+			if file_list[file].startswith("ELF: "):
+				elf_file = int(file_list[file][5:])
+				#bb.note("Strip %s" % file)
+				runstrip(file, elf_file, d)
 	#
 	# End of strip
 	#
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 31/50] package.bbclass: Fix debug sources directory creation to reference the target system
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (29 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 30/50] package.bbclass: Refactor split and strip function Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 32/50] linux-libc-headers: Update to 2.6.37.2 Koen Kooi
                   ` (19 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 59a0601..c8adbb0 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -225,7 +225,7 @@ def splitfile2(debugsrcdir, d):
     sourcefile = bb.data.expand("${WORKDIR}/debugsources.list", d)
 
     if debugsrcdir:
-       bb.mkdirhier(debugsrcdir)
+       bb.mkdirhier("%s%s" % (dvar, debugsrcdir))
 
        processdebugsrc =  "LC_ALL=C ; sort -z -u '%s' | egrep -v -z '(<internal>|<built-in>)$' | "
        processdebugsrc += "(cd '%s' ; cpio -pd0mL '%s%s' 2>/dev/null)"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 32/50] linux-libc-headers: Update to 2.6.37.2
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (30 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 31/50] package.bbclass: Fix debug sources directory creation to reference the target system Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 33/50] conf/machine: Use linux-libc-headers instead of linux-libc-headers-yocto Koen Kooi
                   ` (18 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
---
 ...rs_2.6.36.bb => linux-libc-headers_2.6.37.2.bb} |    0
 1 files changed, 0 insertions(+), 0 deletions(-)
 rename meta/recipes-kernel/linux-libc-headers/{linux-libc-headers_2.6.36.bb => linux-libc-headers_2.6.37.2.bb} (100%)

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.36.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb
similarity index 100%
rename from meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.36.bb
rename to meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb
-- 
1.6.6.1




^ permalink raw reply	[flat|nested] 55+ messages in thread

* [PATCH 33/50] conf/machine: Use linux-libc-headers instead of linux-libc-headers-yocto
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (31 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 32/50] linux-libc-headers: Update to 2.6.37.2 Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 34/50] package.bbclass: Rewrite package_do_filedeps() to reduce the amount of subprocesses created and improve speed Koen Kooi
                   ` (17 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/machine/beagleboard.conf      |    2 +-
 meta/conf/machine/include/qemu.inc      |    2 +-
 meta/conf/machine/mpc8315e-rdb.conf     |    2 +-
 meta/conf/machine/routerstationpro.conf |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/conf/machine/beagleboard.conf b/meta/conf/machine/beagleboard.conf
index 41351e7..b1f7350 100644
--- a/meta/conf/machine/beagleboard.conf
+++ b/meta/conf/machine/beagleboard.conf
@@ -25,7 +25,7 @@ EXTRA_IMAGECMD_jffs2 = "-lnp "
 SERIAL_CONSOLE = "115200 ttyO2"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
+#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
 
 KERNEL_IMAGETYPE = "uImage"
 
diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc
index 225906b..61281bf 100644
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -16,6 +16,6 @@ RDEPENDS_kernel-base = ""
 
 # Use a common kernel recipe for all QEMU machines
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
+#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
 
 EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
diff --git a/meta/conf/machine/mpc8315e-rdb.conf b/meta/conf/machine/mpc8315e-rdb.conf
index 578751c..34b75bb 100644
--- a/meta/conf/machine/mpc8315e-rdb.conf
+++ b/meta/conf/machine/mpc8315e-rdb.conf
@@ -13,7 +13,7 @@ SERIAL_CONSOLE = "115200 ttyS0"
 MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial"
 
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
-PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
+#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
 
 UBOOT_ENTRYPOINT = "0x00000000"
 
diff --git a/meta/conf/machine/routerstationpro.conf b/meta/conf/machine/routerstationpro.conf
index 9e5036d..d464842 100644
--- a/meta/conf/machine/routerstationpro.conf
+++ b/meta/conf/machine/routerstationpro.conf
@@ -13,7 +13,7 @@ KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
-PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
+#PREFERRED_PROVIDER_linux-libc-headers ?= "linux-libc-headers-yocto"
 
 SERIAL_CONSOLE = "115200 ttyS0"
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 34/50] package.bbclass: Rewrite package_do_filedeps() to reduce the amount of subprocesses created and improve speed
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (32 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 33/50] conf/machine: Use linux-libc-headers instead of linux-libc-headers-yocto Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 35/50] linux-yocto: update to 2.6.37.2 Koen Kooi
                   ` (16 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass |   77 ++++++++++++++++++++++++------------------
 1 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index c8adbb0..137de09 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -822,55 +822,66 @@ RPMDEPS = "${STAGING_LIBDIR_NATIVE}/rpm/bin/rpmdeps"
 #  FILERDEPENDS_filepath_pkg - per file dep
 
 python package_do_filedeps() {
-	import os
+	import os, re
 
 	pkgdest = bb.data.getVar('PKGDEST', d, True)
 	packages = bb.data.getVar('PACKAGES', d, True)
 
-	cmd = bb.data.expand("${STAGING_LIBDIR_NATIVE}/rpm/perfile_rpmdeps.sh", d)
 	rpmdeps = bb.data.expand("${RPMDEPS}", d)
+	r = re.compile(r'[<>=]+ +[^ ]*')
 
 	# Quick routine to process the results of the rpmdeps call...
-	def process_deps(pipe, pkg, varname):
-		dep_files = ""
+	def process_deps(pipe, pkg, f, provides_files, requires_files):
+		provides = []
+		requires = []
+		file = f.replace(pkgdest + "/" + pkg, "")
+		file = file.replace("@", "@at@")
+		file = file.replace(" ", "@space@")
+		file = file.replace("\t", "@tab@")
+		file = file.replace("[", "@openbrace@")
+		file = file.replace("]", "@closebrace@")
+		file = file.replace("_", "@underscore@")
+
 		for line in pipe:
-			key = ""
-			value = ""
-			# We expect two items on each line
-			# 1 - filepath
-			# 2 - dep list
-			line_list = line.rstrip().split(None,1);
-			if len(line_list) <= 0 or len(line_list) > 2:
-				bb.error("deps list length error! " + len(line_list));
-			if len(line_list) == 2:
-				file = line_list[0];
-				value = line_list[1]
-				file = file.replace(pkgdest + "/" + pkg, "")
-				file = file.replace("@", "@at@")
-				file = file.replace(" ", "@space@")
-				file = file.replace("\t", "@tab@")
-				file = file.replace("[", "@openbrace@")
-				file = file.replace("]", "@closebrace@")
-				file = file.replace("_", "@underscore@")
-				dep_files = dep_files + " " + file
-				key = "FILE" + varname + "_" + file + "_" + pkg
-				bb.data.setVar(key, value, d)
-		bb.data.setVar("FILE" + varname + "FLIST_" + pkg, dep_files, d)
+			if line.startswith("Requires:"):
+				i = requires
+			elif line.startswith("Provides:"):
+				i = provides
+			else:
+				continue
+			value = line.split(":", 1)[1].strip()
+			value = r.sub(r'(\g<0>)', value)
+			if value.startswith("rpmlib("):
+				continue
+			i.append(value)
+
+		if len(provides) > 0:
+			provides_files.append(file)
+			key = "FILERPROVIDES_" + file + "_" + pkg
+			bb.data.setVar(key, " ".join(provides), d)
+
+		if len(requires) > 0:
+			requires_files.append(file)
+			key = "FILERDEPENDS_" + file + "_" + pkg
+			bb.data.setVar(key, " ".join(requires), d)
 
 	# Determine dependencies
 	for pkg in packages.split():
-		if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1  or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
+		if pkg.endswith('-dbg') or pkg.endswith('-doc') or pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or pkg.startswith('kernel-module-'):
 			continue
 
-		# Process provides
-		dep_pipe = os.popen(cmd + " --rpmdeps " + rpmdeps + " --provides " + pkgdest + "/" + pkg)
+		provides_files = []
+		requires_files = []
+		for root, dirs, files in os.walk(pkgdest + "/" + pkg):
+			for file in files:
+				f = os.path.join(root, file)
 
-		process_deps(dep_pipe, pkg, 'RPROVIDES')
+				dep_pipe = os.popen(rpmdeps + " --provides --requires -v " + f)
 
-		# Process requirements
-		dep_pipe = os.popen(cmd + " --rpmdeps " + rpmdeps + " --requires " + pkgdest + "/" + pkg)
+				process_deps(dep_pipe, pkg, f, provides_files, requires_files)
 
-		process_deps(dep_pipe, pkg, 'RDEPENDS')
+		bb.data.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files), d)
+		bb.data.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files), d)
 }
 
 SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 35/50] linux-yocto: update to 2.6.37.2
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (33 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 34/50] package.bbclass: Rewrite package_do_filedeps() to reduce the amount of subprocesses created and improve speed Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 36/50] rootfs_rpm: Fix rootfs generation using RPM packages Koen Kooi
                   ` (15 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Bruce Ashfield <bruce.ashfield@windriver.com>

Fixes [BUGID: 773]

This consolidated SRCREV update addresses the following items:

  - updates to 2.6.37.2
  - updates the routerstation pro configuration for USB mass storage
  - merges the PERF no scripting patch into the kernel tree

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 .../conf/distro/include/poky-default-revisions.inc |   26 ++++++++++----------
 meta/recipes-kernel/linux/linux-yocto_git.bb       |    3 +-
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
index 5321c5a..5e9c39f 100644
--- a/meta/conf/distro/include/poky-default-revisions.inc
+++ b/meta/conf/distro/include/poky-default-revisions.inc
@@ -98,19 +98,19 @@ SRCREV_machine_pn-linux-yocto-stable_beagleboard ?= "ef7f944e773950d4016b7643f9e
 SRCREV_machine_pn-linux-yocto-stable ?= "72ca49ab08b8eb475cec82a10049503602325791"
 SRCREV_meta_pn-linux-yocto-stable ?= "e1f85a470934a0cf6abde5d95533e74501822c6b"
 # development SRCREVs
-SRCREV_machine_pn-linux-yocto_qemuarm ?= "ff1a1f83d771b32f5b44f6b12572cfb15420b446"
-SRCREV_machine_pn-linux-yocto_qemumips ?= "6c6ab18c84f42e15cc1fdcb9012c287beecdb0b5"
-SRCREV_machine_pn-linux-yocto_qemuppc ?= "094132cc9d22ab3edc092bb9c7ee0e5fa309e318"
-SRCREV_machine_pn-linux-yocto_qemux86 ?= "91a9dc10dad9d29f07f59b2489b744325d2580a0"
-SRCREV_machine_pn-linux-yocto_qemux86-64 ?= "929567ec621cf99e0932d8ede34f756e25d4c751"
-SRCREV_machine_pn-linux-yocto_emenlow ?= "c6299ae5bece8e3a6e1bc2c236862ae004629aae"
-SRCREV_machine_pn-linux-yocto_atom-pc ?= "929567ec621cf99e0932d8ede34f756e25d4c751"
-SRCREV_machine_pn-linux-yocto_routerstationpro ?= "b557fff9c7f864ea2a9c81ac80ec176bba3d78ef"
-SRCREV_machine_pn-linux-yocto_mpc8315e-rdb ?= "8f0124a21f5563b0c51c8426f4430ac222bd463d"
-SRCREV_machine_pn-linux-yocto_beagleboard ?= "929567ec621cf99e0932d8ede34f756e25d4c751"
-SRCREV_machine_pn-linux-yocto ?= "929567ec621cf99e0932d8ede34f756e25d4c751"
-SRCREV_meta_pn-linux-yocto ?= "94772ea4f51267a6a9aaffd106035d47dfef1354"
-SRCREV_pn-linux-libc-headers-yocto ??= "929567ec621cf99e0932d8ede34f756e25d4c751"
+SRCREV_machine_pn-linux-yocto_qemuarm ?= "dd15f43fe3d4820ce112501c1a790c9bc12cfd0b"
+SRCREV_machine_pn-linux-yocto_qemumips ?= "76f30ca447fd0f06e76d0cb4935b016a1440e23e"
+SRCREV_machine_pn-linux-yocto_qemuppc ?= "b318cc6df4a439dc2b547f8eb841ff1ede69419b"
+SRCREV_machine_pn-linux-yocto_qemux86 ?= "37e8651b5df243aca2388867212c06338159df4e"
+SRCREV_machine_pn-linux-yocto_qemux86-64 ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
+SRCREV_machine_pn-linux-yocto_emenlow ?= "db6fc8c0d3d7f3e474e6c6b95138123911311942"
+SRCREV_machine_pn-linux-yocto_atom-pc ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
+SRCREV_machine_pn-linux-yocto_routerstationpro ?= "17dedeb17887eb398743b04615302b61bd95ffdd"
+SRCREV_machine_pn-linux-yocto_mpc8315e-rdb ?= "6117f19403ccd5c288ce553def432925296a28b7"
+SRCREV_machine_pn-linux-yocto_beagleboard ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
+SRCREV_machine_pn-linux-yocto ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
+SRCREV_meta_pn-linux-yocto ?= "e2737075b79e4fc682e41051cf1c0bc47a47d502"
+SRCREV_pn-linux-libc-headers-yocto ??= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
 SRCREV_pn-matchbox-config-gtk ??= "3ed74dfb7c57be088a5ab36e446c0ccde9fa1028"
 SRCREV_pn-matchbox-desktop-sato ??= "76"
 SRCREV_pn-matchbox-desktop ??= "af7ed6775487380be73160aa0298bf6019765fad"
diff --git a/meta/recipes-kernel/linux/linux-yocto_git.bb b/meta/recipes-kernel/linux/linux-yocto_git.bb
index 9a3c666..38fbba3 100644
--- a/meta/recipes-kernel/linux/linux-yocto_git.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_git.bb
@@ -21,8 +21,7 @@ PR = "r16"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 SRCREV_FORMAT = "meta_machine"
 
-SRC_URI = "git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta \
-           file://tools-perf-no-scripting.patch"
+SRC_URI = "git://git.pokylinux.org/linux-yocto-2.6.37;protocol=git;nocheckout=1;branch=${KBRANCH},meta;name=machine,meta"
 
 COMPATIBLE_MACHINE = "(qemuarm|qemux86|qemuppc|qemumips|qemux86-64|mpc8315e-rdb|routerstationpro|beagleboard)"
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 36/50] rootfs_rpm: Fix rootfs generation using RPM packages
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (34 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 35/50] linux-yocto: update to 2.6.37.2 Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 37/50] rpm: Fix rpm usage of prelink on the target Koen Kooi
                   ` (14 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Mark Hatle <mark.hatle@windriver.com>

[BUG #756]

Fix bug #756.  The rootfs contains a control file /etc/rpm/platform
that specifies the default system platform, as well as patterns for
compatible architectures.  This file was not being setup properly due
to a misunderstanding of the format in a previous patch.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/package_rpm.bbclass      |   15 +++++++++------
 meta/classes/populate_sdk_rpm.bbclass |   13 +++++++++++--
 meta/classes/rootfs_rpm.bbclass       |    5 +++--
 3 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7cbdae6..60127d2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -155,7 +155,8 @@ resolve_package_rpm () {
 # install a bunch of packages using rpm
 # the following shell variables needs to be set before calling this func:
 # INSTALL_ROOTFS_RPM - install root dir
-# INSTALL_PLATFORM_RPM - extra platform
+# INSTALL_PLATFORM_RPM - main platform
+# INSTALL_PLATFORM_EXTRA_RPM - extra platform
 # INSTALL_CONFBASE_RPM - configuration file base name
 # INSTALL_PACKAGES_NORMAL_RPM - packages to be installed
 # INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
@@ -166,7 +167,8 @@ resolve_package_rpm () {
 package_install_internal_rpm () {
 
 	local target_rootfs="${INSTALL_ROOTFS_RPM}"
-	local platforms="${INSTALL_PLATFORM_RPM}"
+	local platform="${INSTALL_PLATFORM_RPM}"
+	local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
 	local confbase="${INSTALL_CONFBASE_RPM}"
 	local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}"
 	local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
@@ -176,9 +178,10 @@ package_install_internal_rpm () {
 
 	# Setup base system configuration
 	mkdir -p ${target_rootfs}/etc/rpm/
-	if [ ! -z "$platforms" ]; then
-		for pt in $platforms ; do
-			echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform
+	echo "${platform}-poky-linux-gnu" > ${target_rootfs}/etc/rpm/platform
+	if [ ! -z "$platform_extra" ]; then
+		for pt in $platform_extra ; do
+			echo "$pt-.*-linux.*" >> ${target_rootfs}/etc/rpm/platform
 		done
 	fi
 
@@ -764,7 +767,7 @@ python do_package_rpm () {
 	os.chmod(pkgwritedir, 0755)
 
 	cmd = rpmbuild
-	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
+	cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
 	cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
 	cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
 	cmd = cmd + " --define '_use_internal_dependency_generator 0'"
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index d179780..0afe042 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -33,10 +33,17 @@ fakeroot populate_sdk_rpm () {
 
 	#install target
 	export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
-	export INSTALL_PLATFORM_RPM="${PACKAGE_ARCHS}"
+	export INSTALL_PLATFORM_RPM="${TARGET_ARCHS}"
 	export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
 	export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}"
 
+	# List must be prefered to least preferred order
+	INSTALL_PLATFORM_RPM=""
+	for each_arch in ${PACKAGE_ARCHS} ; do
+		INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM"
+	done
+	export INSTALL_PLATFORM_RPM
+
 	package_install_internal_rpm
 	populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
 
@@ -45,6 +52,7 @@ fakeroot populate_sdk_rpm () {
 	export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
 	export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}"
 	export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}"
+	export INSTALL_PLATFORM_EXTRA_RPM=""
 	for arch in ${PACKAGE_ARCHS}; do
 		sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
 		extension="-nativesdk"
@@ -52,9 +60,10 @@ fakeroot populate_sdk_rpm () {
 		    extension=""
 		fi
 		if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then
-			INSTALL_PLATFORM_RPM="$INSTALL_PLATFORM_RPM $sdkarch"
+			INSTALL_PLATFORM_EXTRA_RPM="$sdkarch $INSTALL_PLATFORM_EXTRA_RPM"
 		fi
 	done
+	export INSTALL_PLATFORM_EXTRA_RPM
 
 	package_install_internal_rpm
 	populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index a722e68..caafbdc 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -48,6 +48,7 @@ fakeroot rootfs_rpm_do_rootfs () {
 
 	#install pacakges
 	export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}"
+	export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
 	export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
 	export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}"
 	export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
@@ -56,9 +57,9 @@ fakeroot rootfs_rpm_do_rootfs () {
 	export INSTALL_TASK_RPM="populate_sdk"
 
 	# List must be prefered to least preferred order
-	INSTALL_PLATFORM_RPM=""
+	INSTALL_PLATFORM_EXTRA_RPM=""
 	for each_arch in ${PACKAGE_ARCHS} ; do
-		INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM"
+		INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
 	done
 	export INSTALL_PLATFORM_RPM
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 37/50] rpm: Fix rpm usage of prelink on the target
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (35 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 36/50] rootfs_rpm: Fix rootfs generation using RPM packages Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 38/50] rpm: Fix rpm-dbg package split Koen Kooi
                   ` (13 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Mark Hatle <mark.hatle@windriver.com>

RPM has the ability to validate files that have been prelinked, however
the necessary configuration and staging was not done properly.  Resolve
this issue by fixing the macro paths, providing the missing RPM macro,
and correcting a defect in the way the prelink image class was working
with the necessary configuration file.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/image-prelink.bbclass           |    2 +-
 meta/recipes-devtools/prelink/prelink_git.bb |    8 +++++---
 meta/recipes-devtools/rpm/rpm_5.4.0.bb       |    3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index faf1814..ee0951c 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -24,7 +24,7 @@ prelink_image () {
 	${STAGING_DIR_NATIVE}/usr/sbin/prelink --root ${IMAGE_ROOTFS} -amR
 
 	# Remove the prelink.conf if we had to add it.
-	if [ $dummy_prelink_conf ]; then
+	if [ "$dummy_prelink_conf" == "true" ]; then
 		rm -f ${IMAGE_ROOTFS}/etc/prelink.conf
 	fi
 
diff --git a/meta/recipes-devtools/prelink/prelink_git.bb b/meta/recipes-devtools/prelink/prelink_git.bb
index 53ef045..e8abf59 100644
--- a/meta/recipes-devtools/prelink/prelink_git.bb
+++ b/meta/recipes-devtools/prelink/prelink_git.bb
@@ -8,12 +8,13 @@ runtime and thus programs come up faster."
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
 PV = "1.0+git${SRCPV}"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "git://git.pokylinux.org/prelink-cross.git;protocol=git \
            file://prelink.conf \
            file://prelink.cron.daily \
-           file://prelink.default"
+           file://prelink.default \
+	   file://macros.prelink"
 
 TARGET_OS_ORIG := "${TARGET_OS}"
 OVERRIDES_append = ":${TARGET_OS_ORIG}"
@@ -33,10 +34,11 @@ do_configure_prepend () {
 }
 
 do_install_append () {
-	install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default
+	install -d ${D}${sysconfdir}/cron.daily ${D}${sysconfdir}/default ${D}${sysconfdir}/rpm
 	install -m 0644 ${WORKDIR}/prelink.conf ${D}${sysconfdir}/prelink.conf
 	install -m 0644 ${WORKDIR}/prelink.cron.daily ${D}${sysconfdir}/cron.daily/prelink
 	install -m 0644 ${WORKDIR}/prelink.default ${D}${sysconfdir}/default/prelink
+	install -m 0644 ${WORKDIR}/macros.prelink ${D}${sysconfdir}/rpm/macros.prelink
 }
 
 pkg_postinst_prelink() {
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index 8bce395..e350150 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -74,7 +74,8 @@ inherit autotools gettext
 acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
 
 # Specify the default rpm macros in terms of adjustable variables
-rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_virtclass-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
 
 # Configure values taken from rpm.spec
 WITH_BZIP2 = "--with-bzip2"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 38/50] rpm: Fix rpm-dbg package split
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (36 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 37/50] rpm: Fix rpm usage of prelink on the target Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 39/50] utils.bbclass: add new wrapper script Koen Kooi
                   ` (12 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Mark Hatle <mark.hatle@windriver.com>

The rpm-dbg package split was specified incorrectly in the recipe,
correct this so we generate the proper -dbg file.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-devtools/rpm/rpm_5.4.0.bb |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index e350150..0003f48 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -194,9 +194,7 @@ FILES_${PN} = "${bindir}/rpm \
 #		${libdir}/rpm/bin/db_*
 #		${libdir}/rpm/bin/grep
 
-FILES_${PN}-dbg = "${bindir}/.debug \
-		${libdir}/.debug \
-		${libdir}/rpm/.debug \
+FILES_${PN}-dbg += "${libdir}/rpm/.debug \
 		${libdir}/rpm/bin/.debug \
 		"
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 39/50] utils.bbclass: add new wrapper script
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (37 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 38/50] rpm: Fix rpm-dbg package split Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 40/50] file: add wrapper to file-native Koen Kooi
                   ` (11 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Add a new create_cmdline_wrapper() function that takes cmdline options
for commands that need different directories

Related to [BUGID #775

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/classes/utils.bbclass |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 455b49d..e923789 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -271,6 +271,29 @@ oe_machinstall() {
 	fi
 }
 
+create_cmdline_wrapper () {
+   # Create a wrapper script
+   #
+   # These are useful to work around relocation issues, by setting environment
+   # variables which point to paths in the filesystem.
+   #
+   # Usage: create_wrapper FILENAME [[VAR=VALUE]..]
+
+   cmd=$1
+   shift
+
+   # run echo via env to test syntactic validity of the variable arguments
+   echo "Generating wrapper script for $cmd"
+
+   mv $cmd $cmd.real
+   cmdname=`basename $cmd`.real
+   cat <<END >$cmd
+#!/bin/sh
+exec \`dirname \$0\`/$cmdname "\$@"
+END
+   chmod +x $cmd
+}
+
 create_wrapper () {
    # Create a wrapper script
    #
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 40/50] file: add wrapper to file-native
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (38 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 39/50] utils.bbclass: add new wrapper script Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 41/50] linuxdoc-tools-native: disable doc builds requriing latex and dvips Koen Kooi
                   ` (10 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

file-native needs a wrapper to pass the correct path to the magic.mgc file
This was found to be the case when sstate-cache is used because file hardcodes
the path to the magic.mgc file.

[BUGID #775]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-devtools/file/file_5.04.bb |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/file/file_5.04.bb b/meta/recipes-devtools/file/file_5.04.bb
index b745137..1f9c78e 100644
--- a/meta/recipes-devtools/file/file_5.04.bb
+++ b/meta/recipes-devtools/file/file_5.04.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03
 
 DEPENDS = "zlib file-native"
 DEPENDS_virtclass-native = "zlib-native"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://ftp.astron.com/pub/file/file-${PV}.tar.gz \
            file://stringb-compat.patch \
@@ -30,4 +30,10 @@ do_configure_prepend() {
 
 FILES_${PN} += "${datadir}/misc/*.mgc"
 
+do_install_append_virtclass-native() {
+	create_cmdline_wrapper ${D}/${bindir}/file \
+		--magic-file ${datadir}/misc/magic.mgc
+}
+
+
 BBCLASSEXTEND = "native"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 41/50] linuxdoc-tools-native: disable doc builds requriing latex and dvips
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (39 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 40/50] file: add wrapper to file-native Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 42/50] Fix LICENSE parsing: license.bblcass Koen Kooi
                   ` (9 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

This fixes the following errors during do_install on hosts which have
latex and/or dvips installed:

fmt_latex2e::postASP: LaTeX first run problem. Aborting ...

dvips: ! DVI file can't be opened.

Our goal is to have native versions of these tools eventually. Until
then, disable these parts of the documentation install process.

This fixes [BUGID #774].

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 .../linuxdoc-tools-native/disable_dvips_doc.patch  |   29 ++++++++++++++++++++
 .../linuxdoc-tools-native/disable_tex_doc.patch    |   25 +++++++++++++++++
 .../linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb |    6 +++-
 3 files changed, 58 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_dvips_doc.patch
 create mode 100644 meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_tex_doc.patch

diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_dvips_doc.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_dvips_doc.patch
new file mode 100644
index 0000000..7ac1a1f
--- /dev/null
+++ b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_dvips_doc.patch
@@ -0,0 +1,29 @@
+Disable building documentation which requires the dvips utility.
+This patch should be dropped once we include a native version of
+dvips.
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+diff -urN linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh linuxdoc-tools-0.9.66/doc/Makedoc.sh
+--- linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh	2011-02-25 15:26:41.142917782 -0800
++++ linuxdoc-tools-0.9.66/doc/Makedoc.sh	2011-02-25 15:27:25.141917472 -0800
+@@ -52,13 +52,13 @@
+ #	$TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
+ #fi
+ 
+-if [ -n "`which dvips`" ]; then
+-	echo "   + dvips" >&2
+-	dvips -t letter -o ./guide.ps ./guide.dvi
+-	if [ -n "`which gzip`" -a -f ./guide.ps ]; then
+-		gzip -fN ./guide.ps
+-	fi
+-fi
++#if [ -n "`which dvips`" ]; then
++#	echo "   + dvips" >&2
++#	dvips -t letter -o ./guide.ps ./guide.dvi
++#	if [ -n "`which gzip`" -a -f ./guide.ps ]; then
++#		gzip -fN ./guide.ps
++#	fi
++#fi
+ 
+ 
+ echo "- Building info docs" >&2
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_tex_doc.patch b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_tex_doc.patch
new file mode 100644
index 0000000..f47693b
--- /dev/null
+++ b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native/disable_tex_doc.patch
@@ -0,0 +1,25 @@
+Disable building documentation which requires the latex utility.
+This patch should be dropped once we include a native version of
+latex.
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+diff -urN linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh linuxdoc-tools-0.9.66/doc/Makedoc.sh
+--- linuxdoc-tools-0.9.66.orig/doc/Makedoc.sh	2009-11-09 11:58:25.000000000 -0800
++++ linuxdoc-tools-0.9.66/doc/Makedoc.sh	2011-02-25 15:23:58.610016114 -0800
+@@ -46,11 +46,11 @@
+ 	$TMPDIR/sgml2txt -b 1 ./guide
+ fi
+ 
+-if [ -n "`which latex`" ]; then
+-	ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
+-	echo "- Building latex docs" >&2
+-	$TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
+-fi
++#if [ -n "`which latex`" ]; then
++#	ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
++#	echo "- Building latex docs" >&2
++#	$TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
++#fi
+ 
+ if [ -n "`which dvips`" ]; then
+ 	echo "   + dvips" >&2
diff --git a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb
index f3cd195..ed45ad9 100644
--- a/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb
+++ b/meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb
@@ -6,10 +6,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5fbccc46cff2379505ca4e09c7d6ccfe"
 
 DEPENDS = "openjade-native"
 
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/l/linuxdoc-tools/linuxdoc-tools_${PV}.tar.gz \
-           file://disable_sgml2rtf.patch"
+           file://disable_sgml2rtf.patch \
+           file://disable_tex_doc.patch \
+           file://disable_dvips_doc.patch"
 
 SRC_URI[md5sum] = "f214e79b0dd084689cd04f18722bd563"
 SRC_URI[sha256sum] = "128cabb52ef8fb2f370ee488ea92bf4d8e49859200c7c8cae807abfe860a62ec"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 42/50] Fix LICENSE parsing: license.bblcass
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (40 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 41/50] linuxdoc-tools-native: disable doc builds requriing latex and dvips Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 43/50] prelink: Add missing macro.prelink file Koen Kooi
                   ` (8 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Beth Flanagan <elizabeth.flanagan@intel.com>

LICENSE parsing was missing some cases. Fixed

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/license.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 97d4e4e..4e3cd1c 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -66,7 +66,8 @@ python do_populate_lic() {
     # I'm sure someone has written a logic parser for these fields, but if so, I don't know where it is. 
     # So what I do is just link to every license mentioned in the license field.
     
-    for license_type in license_types.replace('&', '').replace('+', '').replace('&', '').replace('|', '').replace('(', '').replace(')', '').split():
+    for license_type in (' '.join(license_types.replace('&', ' ').replace('+', ' ').replace('|', ' ')
+                         .replace('(', ' ').replace(')', ' ').replace(';', ' ').replace(',', ' ').split())):
         if os.path.isfile(os.path.join(generic_directory, license_type)):
             gen_lic_dest = os.path.join(bb.data.getVar('LICENSE_DIRECTORY', d, True), "common-licenses")
             try:
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 43/50] prelink: Add missing macro.prelink file
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (41 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 42/50] Fix LICENSE parsing: license.bblcass Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 44/50] task-poky-lsb: add necessary packages name Koen Kooi
                   ` (7 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Mark Hatle <mark.hatle@windriver.com>

Add the missing macro.prelink file...

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 .../prelink/prelink/macros.prelink                 |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/prelink/prelink/macros.prelink

diff --git a/meta/recipes-devtools/prelink/prelink/macros.prelink b/meta/recipes-devtools/prelink/prelink/macros.prelink
new file mode 100644
index 0000000..cb16695
--- /dev/null
+++ b/meta/recipes-devtools/prelink/prelink/macros.prelink
@@ -0,0 +1,5 @@
+# rpm-4.1 verifies prelinked libraries using a prelink undo helper.
+#       Note: The 2nd token is used as argv[0] and "library" is a
+#       placeholder that will be deleted and replaced with the appropriate
+#       library file path.
+%__prelink_undo_cmd     /usr/sbin/prelink prelink -y library
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 44/50] task-poky-lsb: add necessary packages name
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (42 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 43/50] prelink: Add missing macro.prelink file Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:29 ` [PATCH 45/50] libxml-parser-perl: remove FILES_${PN} Koen Kooi
                   ` (6 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Jingdong Lu <jingdong.lu@windriver.com>

In order to install and run LSB test cases we should add some necessary packages name
into task-poky-lsb for lsb image.

[sgw: modified the perl and python lists to use the core -modules, removed mesa-dri]
Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-extended/tasks/task-poky-lsb.bb |   62 +++++++++++++++++++++++++-
 1 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-extended/tasks/task-poky-lsb.bb b/meta/recipes-extended/tasks/task-poky-lsb.bb
index 9d308e7..5120764 100644
--- a/meta/recipes-extended/tasks/task-poky-lsb.bb
+++ b/meta/recipes-extended/tasks/task-poky-lsb.bb
@@ -3,7 +3,7 @@
 #
 
 DESCRIPTION = "Create Small Image Tasks"
-PR = "r2"
+PR = "r3"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${POKYBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -28,8 +28,14 @@ PACKAGES = "\
     task-poky-tcl \
     task-poky-tcl-dbg \
     task-poky-tcl-dev \
+    task-poky-lsb-perl-add \
+    task-poky-lsb-python-add \
+    task-poky-lsb-graphic-add \
+    task-poky-lsb-runtime-add \
+    task-poky-lsb-command-add \
     "
 
+
 ALLOW_EMPTY = "1"
 
 RDEPENDS_task-poky-lsb = "\
@@ -39,6 +45,11 @@ RDEPENDS_task-poky-lsb = "\
     task-poky-perl \
     task-poky-python \
     task-poky-tcl \
+    task-poky-lsb-perl-add \
+    task-poky-lsb-python-add \
+    task-poky-lsb-graphic-add \
+    task-poky-lsb-runtime-add \
+    task-poky-lsb-command-add \
     "
 
 #
@@ -111,3 +122,52 @@ RDEPENDS_task-poky-misc = "\
     usbutils \
     zlib \
     "
+
+RDEPENDS_task-poky-lsb-command-add = "\
+    localedef \
+    fontconfig-utils \
+    mailx \
+    msmtp \
+"
+#    cups
+
+RDEPENDS_task-poky-lsb-perl-add = "\
+    perl-modules \
+    perl-dev \
+    perl-misc \
+    perl-pod \
+"
+
+RDEPENDS_task-poky-lsb-python-add = "\
+    python-modules \
+"
+
+RDEPENDS_task-poky-lsb-graphic-add = "\
+    libqtcore4 \
+    libqtgui4 \
+    libqtsql4 \
+    libqtsvg4 \
+    libqtxml4 \
+    libqtnetwork4 \
+    libqtopengl4 \
+    libxt \
+    libxxf86vm \
+    libdrm \
+    libglu \
+    libxi \
+    libxtst \
+    qt4-plugin-sqldriver-sqlite \
+"
+
+#    mesa-dri 
+
+RDEPENDS_task-poky-lsb-runtime-add = "\
+    ldd \
+    pam-plugin-wheel \
+    e2fsprogs-mke2fs \
+    eglibc-localedata-posix \
+    mkfontdir \
+    liburi-perl \
+    libxml-parser-perl \
+    libxml-perl \
+"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 45/50] libxml-parser-perl: remove FILES_${PN}
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (43 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 44/50] task-poky-lsb: add necessary packages name Koen Kooi
@ 2011-02-27  9:29 ` Koen Kooi
  2011-02-27  9:30 ` [PATCH 46/50] Fixing my bad license parsing: license.bbclass Koen Kooi
                   ` (5 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:29 UTC (permalink / raw)
  To: openembedded-core

From: Jingdong Lu <jingdong.lu@windriver.com>

Because of the error path in FILES_${PN} we got nothing in libxml-parser-perl package.
Romove "FILES_${PN}"

[sgw Bump PR]
Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../perl/libxml-parser-perl_2.36.bb                |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb b/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb
index 5742879..3287d26 100644
--- a/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb
+++ b/meta/recipes-devtools/perl/libxml-parser-perl_2.36.bb
@@ -3,6 +3,8 @@ LICENSE = "Artistic"
 LIC_FILES_CHKSUM = "file://README;endline=6;md5=fa7bbbd54d37d6ecf4ef33b7c98b9cd7"
 DEPENDS += "expat expat-native"
 
+PR = "r1"
+
 SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Parser-${PV}.tar.gz"
 
 SRC_URI[md5sum] = "1b868962b658bd87e1563ecd56498ded"
@@ -19,7 +21,3 @@ do_compile() {
 	cpan_do_compile
 }
 
-
-
-FILES_${PN} = "${PERLLIBDIRS}/auto/XML/Parser/Expat/* \
-                ${PERLLIBDIRS}/XML"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 46/50] Fixing my bad license parsing: license.bbclass
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (44 preceding siblings ...)
  2011-02-27  9:29 ` [PATCH 45/50] libxml-parser-perl: remove FILES_${PN} Koen Kooi
@ 2011-02-27  9:30 ` Koen Kooi
  2011-02-27  9:30 ` [PATCH 47/50] Fix to the libtool LICENSE field: libtool.inc Koen Kooi
                   ` (4 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:30 UTC (permalink / raw)
  To: openembedded-core

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3220 bytes --]

From: Beth Flanagan <elizabeth.flanagan@intel.com>

Fix to my bad license parsing. Also added the MIT generic license
files.

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/license.bbclass         |    7 ++++---
 meta/files/common-licenses/MIT       |    6 ++++++
 meta/files/common-licenses/MIT-style |    1 +
 3 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 meta/files/common-licenses/MIT
 create mode 120000 meta/files/common-licenses/MIT-style

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 4e3cd1c..9c4ccb3 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -66,9 +66,10 @@ python do_populate_lic() {
     # I'm sure someone has written a logic parser for these fields, but if so, I don't know where it is. 
     # So what I do is just link to every license mentioned in the license field.
     
-    for license_type in (' '.join(license_types.replace('&', ' ').replace('+', ' ').replace('|', ' ')
-                         .replace('(', ' ').replace(')', ' ').replace(';', ' ').replace(',', ' ').split())):
-        if os.path.isfile(os.path.join(generic_directory, license_type)):
+    for license_type in ((license_types.replace('+', '').replace('|', '&')
+                          .replace('(', '').replace(')', '').replace(';', '')
+                          .replace(',', '').replace(" ", "").split("&"))):
+if os.path.isfile(os.path.join(generic_directory, license_type)):
             gen_lic_dest = os.path.join(bb.data.getVar('LICENSE_DIRECTORY', d, True), "common-licenses")
             try:
                 bb.mkdirhier(gen_lic_dest)
diff --git a/meta/files/common-licenses/MIT b/meta/files/common-licenses/MIT
new file mode 100644
index 0000000..d136d5e
--- /dev/null
+++ b/meta/files/common-licenses/MIT
@@ -0,0 +1,6 @@
+The MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/meta/files/common-licenses/MIT-style b/meta/files/common-licenses/MIT-style
new file mode 120000
index 0000000..8ab70c0
--- /dev/null
+++ b/meta/files/common-licenses/MIT-style
@@ -0,0 +1 @@
+MIT
\ No newline at end of file
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 47/50] Fix to the libtool LICENSE field: libtool.inc
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (45 preceding siblings ...)
  2011-02-27  9:30 ` [PATCH 46/50] Fixing my bad license parsing: license.bbclass Koen Kooi
@ 2011-02-27  9:30 ` Koen Kooi
  2011-02-27  9:30 ` [PATCH 48/50] Fixing type: license.bbclass Koen Kooi
                   ` (3 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:30 UTC (permalink / raw)
  To: openembedded-core

From: Beth Flanagan <elizabeth.flanagan@intel.com>

License parser should use & not ,

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/recipes-devtools/libtool/libtool.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/libtool/libtool.inc b/meta/recipes-devtools/libtool/libtool.inc
index e066ffa..d423e49 100644
--- a/meta/recipes-devtools/libtool/libtool.inc
+++ b/meta/recipes-devtools/libtool/libtool.inc
@@ -4,7 +4,7 @@ Libtool hides the complexity of generating special library types \
 (such as shared libraries) behind a consistent interface."
 HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
 SECTION = "devel"
-LICENSE = "GPLv2, LGPLv2.1"
+LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
     file://libltdl/COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
 
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 48/50] Fixing type: license.bbclass
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (46 preceding siblings ...)
  2011-02-27  9:30 ` [PATCH 47/50] Fix to the libtool LICENSE field: libtool.inc Koen Kooi
@ 2011-02-27  9:30 ` Koen Kooi
  2011-02-27  9:30 ` [PATCH 49/50] linux-yocto: add crownbay BSP infrastructure Koen Kooi
                   ` (2 subsequent siblings)
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:30 UTC (permalink / raw)
  To: openembedded-core

From: Beth Flanagan <elizabeth.flanagan@intel.com>

Munged a tab. Fixing

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
---
 meta/classes/license.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 9c4ccb3..5e9ebe5 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -69,7 +69,7 @@ python do_populate_lic() {
     for license_type in ((license_types.replace('+', '').replace('|', '&')
                           .replace('(', '').replace(')', '').replace(';', '')
                           .replace(',', '').replace(" ", "").split("&"))):
-if os.path.isfile(os.path.join(generic_directory, license_type)):
+        if os.path.isfile(os.path.join(generic_directory, license_type)):
             gen_lic_dest = os.path.join(bb.data.getVar('LICENSE_DIRECTORY', d, True), "common-licenses")
             try:
                 bb.mkdirhier(gen_lic_dest)
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 49/50] linux-yocto: add crownbay BSP infrastructure
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (47 preceding siblings ...)
  2011-02-27  9:30 ` [PATCH 48/50] Fixing type: license.bbclass Koen Kooi
@ 2011-02-27  9:30 ` Koen Kooi
  2011-02-27  9:30 ` [PATCH 50/50] task-poky-lsb: libqtopenqgl4 should be for qemux86 and atom-pc only Koen Kooi
  2011-02-27 17:04 ` [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:30 UTC (permalink / raw)
  To: openembedded-core

From: Bruce Ashfield <bruce.ashfield@windriver.com>

Updating the meta SRCREV to grab this linux-yocto commit:

    meta: add crownbay BSP infrastructure

    Import the 2.6.34 crownbay infrastructure and update for the
    2.6.37 kernel. This also brings in the feature/drm-emgd that
    the crownbay requires.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 .../conf/distro/include/poky-default-revisions.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/conf/distro/include/poky-default-revisions.inc b/meta/conf/distro/include/poky-default-revisions.inc
index 5e9c39f..2f33630 100644
--- a/meta/conf/distro/include/poky-default-revisions.inc
+++ b/meta/conf/distro/include/poky-default-revisions.inc
@@ -108,7 +108,7 @@ SRCREV_machine_pn-linux-yocto_atom-pc ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3
 SRCREV_machine_pn-linux-yocto_routerstationpro ?= "17dedeb17887eb398743b04615302b61bd95ffdd"
 SRCREV_machine_pn-linux-yocto_mpc8315e-rdb ?= "6117f19403ccd5c288ce553def432925296a28b7"
 SRCREV_machine_pn-linux-yocto_beagleboard ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
-SRCREV_machine_pn-linux-yocto ?= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
+SRCREV_machine_pn-linux-yocto ?= "e2cabadc059ad8d91f7e4a023106620d93abd23a"
 SRCREV_meta_pn-linux-yocto ?= "e2737075b79e4fc682e41051cf1c0bc47a47d502"
 SRCREV_pn-linux-libc-headers-yocto ??= "2b412826bbeb4a16abe2ea74f2456ab880c6e3c1"
 SRCREV_pn-matchbox-config-gtk ??= "3ed74dfb7c57be088a5ab36e446c0ccde9fa1028"
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* [PATCH 50/50] task-poky-lsb: libqtopenqgl4 should be for qemux86 and atom-pc only
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (48 preceding siblings ...)
  2011-02-27  9:30 ` [PATCH 49/50] linux-yocto: add crownbay BSP infrastructure Koen Kooi
@ 2011-02-27  9:30 ` Koen Kooi
  2011-02-27 17:04 ` [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
  50 siblings, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-02-27  9:30 UTC (permalink / raw)
  To: openembedded-core

From: Saul Wold <sgw@linux.intel.com>

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-extended/tasks/task-poky-lsb.bb |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-extended/tasks/task-poky-lsb.bb b/meta/recipes-extended/tasks/task-poky-lsb.bb
index 5120764..ab640bd 100644
--- a/meta/recipes-extended/tasks/task-poky-lsb.bb
+++ b/meta/recipes-extended/tasks/task-poky-lsb.bb
@@ -149,7 +149,6 @@ RDEPENDS_task-poky-lsb-graphic-add = "\
     libqtsvg4 \
     libqtxml4 \
     libqtnetwork4 \
-    libqtopengl4 \
     libxt \
     libxxf86vm \
     libdrm \
@@ -159,6 +158,13 @@ RDEPENDS_task-poky-lsb-graphic-add = "\
     qt4-plugin-sqldriver-sqlite \
 "
 
+RDEPENDS_task-poky-lsb-graphic-add_qemux86 = "\
+    libqtopengl4 \
+"
+RDEPENDS_task-poky-lsb-graphic-add_atom-pc = "\
+    libqtopengl4 \
+"
+
 #    mesa-dri 
 
 RDEPENDS_task-poky-lsb-runtime-add = "\
-- 
1.6.6.1




^ permalink raw reply related	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/50] Merge in yocto changes made since split
  2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
                   ` (49 preceding siblings ...)
  2011-02-27  9:30 ` [PATCH 50/50] task-poky-lsb: libqtopenqgl4 should be for qemux86 and atom-pc only Koen Kooi
@ 2011-02-27 17:04 ` Koen Kooi
  2011-03-02  9:00   ` Koen Kooi
  50 siblings, 1 reply; 55+ messages in thread
From: Koen Kooi @ 2011-02-27 17:04 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


Op 27 feb 2011, om 10:28 heeft Koen Kooi het volgende geschreven:

> This merges in the yocto changes that were made since we split off oe-core, minus changes made to bitbake since oe-core doesn't ship that anymore.
> 
> Pull URL: git://dominion.thruhere.net/var/cache/git/openembedded-core.git
>  Branch: poky-merge-20110227
>  Browse: http://dominion.thruhere.net/git/cgit.cgi/openembedded-core//log/?h=poky-merge-20110227
> 
> Thanks,
>     Koen Kooi <koen@dominion.thruhere.net>

After merging all that I get:

RROR: Error executing a python function in /OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb:
TypeError: join_deps() got an unexpected keyword argument 'commasep'

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File "populate_packages", line 144, in <module>
ERROR:
ERROR:   File "populate_packages", line 141, in populate_packages
ERROR:
ERROR: The code that was being executed was:
ERROR:      0140:                               bb.note("%s contains dangling symlink to %s" % (pkg, l))
ERROR:      0141:               bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
ERROR:      0142:
ERROR:      0143:
ERROR:  *** 0144:populate_packages(d)
ERROR:      0145:
ERROR: (file: 'populate_packages', lineno: 144, function: <module>)
ERROR:      0137:                                                       rdepends[p] = ""
ERROR:      0138:                                               break
ERROR:      0139:                       if found == False:
ERROR:      0140:                               bb.note("%s contains dangling symlink to %s" % (pkg, l))
ERROR:  *** 0141:               bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
ERROR:      0142:
ERROR:      0143:
ERROR:      0144:populate_packages(d)
ERROR:      0145:
ERROR: (file: 'populate_packages', lineno: 141, function: populate_packages)
ERROR: Function 'populate_packages' failed
ERROR: Logfile of failure stored in: /OE/tentacle/build/tmp-angstrom_2010_x/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.37.2-r0/temp/log.do_package.6059
Log data follows:
| sort: open failed: /OE/tentacle/build/tmp-angstrom_2010_x/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.37.2-r0/debugsources.list: No such file or directory
| ERROR: Error executing a python function in /OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb:
| TypeError: join_deps() got an unexpected keyword argument 'commasep'
|
| ERROR: The stack trace of python calls that resulted in this exception/failure was:
| ERROR:   File "populate_packages", line 144, in <module>
| ERROR:
| ERROR:   File "populate_packages", line 141, in populate_packages
| ERROR:
| ERROR: The code that was being executed was:
| ERROR:      0140:                             bb.note("%s contains dangling symlink to %s" % (pkg, l))
| ERROR:      0141:             bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
| ERROR:      0142:
| ERROR:      0143:
| ERROR:  *** 0144:populate_packages(d)
| ERROR:      0145:
| ERROR: (file: 'populate_packages', lineno: 144, function: <module>)
| ERROR:      0137:                                                     rdepends[p] = ""
| ERROR:      0138:                                             break
| ERROR:      0139:                     if found == False:
| ERROR:      0140:                             bb.note("%s contains dangling symlink to %s" % (pkg, l))
| ERROR:  *** 0141:             bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
| ERROR:      0142:
| ERROR:      0143:
| ERROR:      0144:populate_packages(d)
| ERROR:      0145:
| ERROR: (file: 'populate_packages', lineno: 141, function: populate_packages)
| ERROR: Function 'populate_packages' failed
NOTE: package linux-libc-headers-2.6.37.2-r0: task do_package: Failed
NOTE: package flex-2.5.35-r2: task do_unpack: Succeeded
ERROR: Task 1121 (/OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb, do_package) failed with exit code '1'
Waiting for 1 active tasks to finish:
0: eglibc-2.12-r13 do_compile (pid 19675)

Maybe that's missing something in vanilla bitbake, will have a look again during office hours.




^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/50] Merge in yocto changes made since split
  2011-02-27 17:04 ` [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
@ 2011-03-02  9:00   ` Koen Kooi
  2011-03-02 14:22     ` Koen Kooi
  2011-03-02 16:52     ` Richard Purdie
  0 siblings, 2 replies; 55+ messages in thread
From: Koen Kooi @ 2011-03-02  9:00 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

This is still present as of this morning. Richard, you mentioned you had a fix for this?

Op 27 feb 2011, om 18:04 heeft Koen Kooi het volgende geschreven:

> 
> Op 27 feb 2011, om 10:28 heeft Koen Kooi het volgende geschreven:
> 
>> This merges in the yocto changes that were made since we split off oe-core, minus changes made to bitbake since oe-core doesn't ship that anymore.
>> 
>> Pull URL: git://dominion.thruhere.net/var/cache/git/openembedded-core.git
>> Branch: poky-merge-20110227
>> Browse: http://dominion.thruhere.net/git/cgit.cgi/openembedded-core//log/?h=poky-merge-20110227
>> 
>> Thanks,
>>    Koen Kooi <koen@dominion.thruhere.net>
> 
> After merging all that I get:
> 
> RROR: Error executing a python function in /OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb:
> TypeError: join_deps() got an unexpected keyword argument 'commasep'
> 
> ERROR: The stack trace of python calls that resulted in this exception/failure was:
> ERROR:   File "populate_packages", line 144, in <module>
> ERROR:
> ERROR:   File "populate_packages", line 141, in populate_packages
> ERROR:
> ERROR: The code that was being executed was:
> ERROR:      0140:                               bb.note("%s contains dangling symlink to %s" % (pkg, l))
> ERROR:      0141:               bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
> ERROR:      0142:
> ERROR:      0143:
> ERROR:  *** 0144:populate_packages(d)
> ERROR:      0145:
> ERROR: (file: 'populate_packages', lineno: 144, function: <module>)
> ERROR:      0137:                                                       rdepends[p] = ""
> ERROR:      0138:                                               break
> ERROR:      0139:                       if found == False:
> ERROR:      0140:                               bb.note("%s contains dangling symlink to %s" % (pkg, l))
> ERROR:  *** 0141:               bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
> ERROR:      0142:
> ERROR:      0143:
> ERROR:      0144:populate_packages(d)
> ERROR:      0145:
> ERROR: (file: 'populate_packages', lineno: 141, function: populate_packages)
> ERROR: Function 'populate_packages' failed
> ERROR: Logfile of failure stored in: /OE/tentacle/build/tmp-angstrom_2010_x/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.37.2-r0/temp/log.do_package.6059
> Log data follows:
> | sort: open failed: /OE/tentacle/build/tmp-angstrom_2010_x/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.37.2-r0/debugsources.list: No such file or directory
> | ERROR: Error executing a python function in /OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb:
> | TypeError: join_deps() got an unexpected keyword argument 'commasep'
> |
> | ERROR: The stack trace of python calls that resulted in this exception/failure was:
> | ERROR:   File "populate_packages", line 144, in <module>
> | ERROR:
> | ERROR:   File "populate_packages", line 141, in populate_packages
> | ERROR:
> | ERROR: The code that was being executed was:
> | ERROR:      0140:                             bb.note("%s contains dangling symlink to %s" % (pkg, l))
> | ERROR:      0141:             bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
> | ERROR:      0142:
> | ERROR:      0143:
> | ERROR:  *** 0144:populate_packages(d)
> | ERROR:      0145:
> | ERROR: (file: 'populate_packages', lineno: 144, function: <module>)
> | ERROR:      0137:                                                     rdepends[p] = ""
> | ERROR:      0138:                                             break
> | ERROR:      0139:                     if found == False:
> | ERROR:      0140:                             bb.note("%s contains dangling symlink to %s" % (pkg, l))
> | ERROR:  *** 0141:             bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
> | ERROR:      0142:
> | ERROR:      0143:
> | ERROR:      0144:populate_packages(d)
> | ERROR:      0145:
> | ERROR: (file: 'populate_packages', lineno: 141, function: populate_packages)
> | ERROR: Function 'populate_packages' failed
> NOTE: package linux-libc-headers-2.6.37.2-r0: task do_package: Failed
> NOTE: package flex-2.5.35-r2: task do_unpack: Succeeded
> ERROR: Task 1121 (/OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb, do_package) failed with exit code '1'
> Waiting for 1 active tasks to finish:
> 0: eglibc-2.12-r13 do_compile (pid 19675)
> 
> Maybe that's missing something in vanilla bitbake, will have a look again during office hours.
> 




^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/50] Merge in yocto changes made since split
  2011-03-02  9:00   ` Koen Kooi
@ 2011-03-02 14:22     ` Koen Kooi
  2011-03-02 16:52     ` Richard Purdie
  1 sibling, 0 replies; 55+ messages in thread
From: Koen Kooi @ 2011-03-02 14:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

And Richard fixed it with http://cgit.openembedded.org/cgit.cgi/bitbake/commit/?id=c6c31b5c58a502703879243ca37585e058e09c71 :)

Op 2 mrt 2011, om 10:00 heeft Koen Kooi het volgende geschreven:

> This is still present as of this morning. Richard, you mentioned you had a fix for this?
> 
> Op 27 feb 2011, om 18:04 heeft Koen Kooi het volgende geschreven:
> 
>> 
>> Op 27 feb 2011, om 10:28 heeft Koen Kooi het volgende geschreven:
>> 
>>> This merges in the yocto changes that were made since we split off oe-core, minus changes made to bitbake since oe-core doesn't ship that anymore.
>>> 
>>> Pull URL: git://dominion.thruhere.net/var/cache/git/openembedded-core.git
>>> Branch: poky-merge-20110227
>>> Browse: http://dominion.thruhere.net/git/cgit.cgi/openembedded-core//log/?h=poky-merge-20110227
>>> 
>>> Thanks,
>>>   Koen Kooi <koen@dominion.thruhere.net>
>> 
>> After merging all that I get:
>> 
>> RROR: Error executing a python function in /OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb:
>> TypeError: join_deps() got an unexpected keyword argument 'commasep'
>> 
>> ERROR: The stack trace of python calls that resulted in this exception/failure was:
>> ERROR:   File "populate_packages", line 144, in <module>
>> ERROR:
>> ERROR:   File "populate_packages", line 141, in populate_packages
>> ERROR:
>> ERROR: The code that was being executed was:
>> ERROR:      0140:                               bb.note("%s contains dangling symlink to %s" % (pkg, l))
>> ERROR:      0141:               bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
>> ERROR:      0142:
>> ERROR:      0143:
>> ERROR:  *** 0144:populate_packages(d)
>> ERROR:      0145:
>> ERROR: (file: 'populate_packages', lineno: 144, function: <module>)
>> ERROR:      0137:                                                       rdepends[p] = ""
>> ERROR:      0138:                                               break
>> ERROR:      0139:                       if found == False:
>> ERROR:      0140:                               bb.note("%s contains dangling symlink to %s" % (pkg, l))
>> ERROR:  *** 0141:               bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
>> ERROR:      0142:
>> ERROR:      0143:
>> ERROR:      0144:populate_packages(d)
>> ERROR:      0145:
>> ERROR: (file: 'populate_packages', lineno: 141, function: populate_packages)
>> ERROR: Function 'populate_packages' failed
>> ERROR: Logfile of failure stored in: /OE/tentacle/build/tmp-angstrom_2010_x/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.37.2-r0/temp/log.do_package.6059
>> Log data follows:
>> | sort: open failed: /OE/tentacle/build/tmp-angstrom_2010_x/work/armv7a-angstrom-linux-gnueabi/linux-libc-headers-2.6.37.2-r0/debugsources.list: No such file or directory
>> | ERROR: Error executing a python function in /OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb:
>> | TypeError: join_deps() got an unexpected keyword argument 'commasep'
>> |
>> | ERROR: The stack trace of python calls that resulted in this exception/failure was:
>> | ERROR:   File "populate_packages", line 144, in <module>
>> | ERROR:
>> | ERROR:   File "populate_packages", line 141, in populate_packages
>> | ERROR:
>> | ERROR: The code that was being executed was:
>> | ERROR:      0140:                             bb.note("%s contains dangling symlink to %s" % (pkg, l))
>> | ERROR:      0141:             bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
>> | ERROR:      0142:
>> | ERROR:      0143:
>> | ERROR:  *** 0144:populate_packages(d)
>> | ERROR:      0145:
>> | ERROR: (file: 'populate_packages', lineno: 144, function: <module>)
>> | ERROR:      0137:                                                     rdepends[p] = ""
>> | ERROR:      0138:                                             break
>> | ERROR:      0139:                     if found == False:
>> | ERROR:      0140:                             bb.note("%s contains dangling symlink to %s" % (pkg, l))
>> | ERROR:  *** 0141:             bb.data.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False), d)
>> | ERROR:      0142:
>> | ERROR:      0143:
>> | ERROR:      0144:populate_packages(d)
>> | ERROR:      0145:
>> | ERROR: (file: 'populate_packages', lineno: 141, function: populate_packages)
>> | ERROR: Function 'populate_packages' failed
>> NOTE: package linux-libc-headers-2.6.37.2-r0: task do_package: Failed
>> NOTE: package flex-2.5.35-r2: task do_unpack: Succeeded
>> ERROR: Task 1121 (/OE/tentacle/sources/openembedded-core/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_2.6.37.2.bb, do_package) failed with exit code '1'
>> Waiting for 1 active tasks to finish:
>> 0: eglibc-2.12-r13 do_compile (pid 19675)
>> 
>> Maybe that's missing something in vanilla bitbake, will have a look again during office hours.
>> 
> 




^ permalink raw reply	[flat|nested] 55+ messages in thread

* Re: [PATCH 00/50] Merge in yocto changes made since split
  2011-03-02  9:00   ` Koen Kooi
  2011-03-02 14:22     ` Koen Kooi
@ 2011-03-02 16:52     ` Richard Purdie
  1 sibling, 0 replies; 55+ messages in thread
From: Richard Purdie @ 2011-03-02 16:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2011-03-02 at 10:00 +0100, Koen Kooi wrote:
> This is still present as of this morning. Richard, you mentioned you had a fix for this?

Yes, bitbake master branch has a fix for this problem.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 55+ messages in thread

end of thread, other threads:[~2011-03-02 16:53 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-27  9:28 [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
2011-02-27  9:29 ` [PATCH 01/50] documentation/yocto-project-qs/yocto-project-qs.xml: [BUGID# 628] - Added note about Python 2.6 bitbake requirement Koen Kooi
2011-02-27  9:29 ` [PATCH 02/50] documentation/poky-ref-manual/faq.xml: [BUGID# 628] - Added new question for Python 2.6 requirement Koen Kooi
2011-02-27  9:29 ` [PATCH 03/50] xf86-video-intel: add config option to support rootless X Koen Kooi
2011-02-27  9:29 ` [PATCH 04/50] xserver-nodm-init: add rootless-x support Koen Kooi
2011-02-27  9:29 ` [PATCH 05/50] bitbake.conf: Add DISTROOVERRIDES variable Koen Kooi
2011-02-27  9:29 ` [PATCH 06/50] poky-lsb.conf: Add DISTROOVERRIDES variable for poky Koen Kooi
2011-02-27  9:29 ` [PATCH 07/50] poky.conf: Weakly set PREMIRRORS Koen Kooi
2011-02-27  9:29 ` [PATCH 08/50] mtd-utils: Set the revision to use explicitly else failures occur with BB_NO_NETWORK Koen Kooi
2011-02-27  9:29 ` [PATCH 09/50] poky-lsb.conf: remove OVERRIDES Koen Kooi
2011-02-27  9:29 ` [PATCH 10/50] Ensure Bash is used when spawning terminals Koen Kooi
2011-02-27  9:29 ` [PATCH 11/50] poky-setup-builddir: Update references to the manual Koen Kooi
2011-02-27  9:29 ` [PATCH 12/50] poky-qemu: Update -sdk image name due to recent change to sato-sdk Koen Kooi
2011-02-27  9:29 ` [PATCH 13/50] perl: import parallel build fixes from upstream git tree Koen Kooi
2011-02-27  9:29 ` [PATCH 14/50] Suppress useless warnings during udev startup Koen Kooi
2011-02-27  9:29 ` [PATCH 15/50] gtk+: disable build of faq and tutorial docs Koen Kooi
2011-02-27  9:29 ` [PATCH 16/50] package.bbclass: Unbreak per file dependencies and blacklist doc packages Koen Kooi
2011-02-27  9:29 ` [PATCH 17/50] dropbear: add SRC_URI checksums Koen Kooi
2011-02-27  9:29 ` [PATCH 18/50] package.bbclass: Use hard link for package split instead of copy Koen Kooi
2011-02-27  9:29 ` [PATCH 19/50] package.bbclass: Ensure dependency version information is preserved Koen Kooi
2011-02-27  9:29 ` [PATCH 20/50] linuxdoc-tools-native: new recipe v0.99.6 Koen Kooi
2011-02-27  9:29 ` [PATCH 21/50] libuser: enable documentation Koen Kooi
2011-02-27  9:29 ` [PATCH 22/50] poky-qemu: handle cases where an nfs directory contains -image- Koen Kooi
2011-02-27  9:29 ` [PATCH 23/50] Emenlow Removal from Poky Core: meta-emenlow Koen Kooi
2011-02-27  9:29 ` [PATCH 24/50] documentation/poky-ref-manual/poky-ref-manual.xml: updated copyright date Koen Kooi
2011-02-27  9:29 ` [PATCH 25/50] documentation/bsp-guide/bsp-guide.xml: Updated copyright Koen Kooi
2011-02-27  9:29 ` [PATCH 26/50] documentation/kernel-manual/kernel-manual.xml: Updated copyright date Koen Kooi
2011-02-27  9:29 ` [PATCH 27/50] documentation/yocto-project-qs/yocto-project-qs.xml: Added Copyright dates Koen Kooi
2011-02-27  9:29 ` [PATCH 28/50] poky-image-lsb-sdk.bb: add image for LSB SDK Build Koen Kooi
2011-02-27  9:29 ` [PATCH 29/50] Revise stripping and splitting of debug information Koen Kooi
2011-02-27  9:29 ` [PATCH 30/50] package.bbclass: Refactor split and strip function Koen Kooi
2011-02-27  9:29 ` [PATCH 31/50] package.bbclass: Fix debug sources directory creation to reference the target system Koen Kooi
2011-02-27  9:29 ` [PATCH 32/50] linux-libc-headers: Update to 2.6.37.2 Koen Kooi
2011-02-27  9:29 ` [PATCH 33/50] conf/machine: Use linux-libc-headers instead of linux-libc-headers-yocto Koen Kooi
2011-02-27  9:29 ` [PATCH 34/50] package.bbclass: Rewrite package_do_filedeps() to reduce the amount of subprocesses created and improve speed Koen Kooi
2011-02-27  9:29 ` [PATCH 35/50] linux-yocto: update to 2.6.37.2 Koen Kooi
2011-02-27  9:29 ` [PATCH 36/50] rootfs_rpm: Fix rootfs generation using RPM packages Koen Kooi
2011-02-27  9:29 ` [PATCH 37/50] rpm: Fix rpm usage of prelink on the target Koen Kooi
2011-02-27  9:29 ` [PATCH 38/50] rpm: Fix rpm-dbg package split Koen Kooi
2011-02-27  9:29 ` [PATCH 39/50] utils.bbclass: add new wrapper script Koen Kooi
2011-02-27  9:29 ` [PATCH 40/50] file: add wrapper to file-native Koen Kooi
2011-02-27  9:29 ` [PATCH 41/50] linuxdoc-tools-native: disable doc builds requriing latex and dvips Koen Kooi
2011-02-27  9:29 ` [PATCH 42/50] Fix LICENSE parsing: license.bblcass Koen Kooi
2011-02-27  9:29 ` [PATCH 43/50] prelink: Add missing macro.prelink file Koen Kooi
2011-02-27  9:29 ` [PATCH 44/50] task-poky-lsb: add necessary packages name Koen Kooi
2011-02-27  9:29 ` [PATCH 45/50] libxml-parser-perl: remove FILES_${PN} Koen Kooi
2011-02-27  9:30 ` [PATCH 46/50] Fixing my bad license parsing: license.bbclass Koen Kooi
2011-02-27  9:30 ` [PATCH 47/50] Fix to the libtool LICENSE field: libtool.inc Koen Kooi
2011-02-27  9:30 ` [PATCH 48/50] Fixing type: license.bbclass Koen Kooi
2011-02-27  9:30 ` [PATCH 49/50] linux-yocto: add crownbay BSP infrastructure Koen Kooi
2011-02-27  9:30 ` [PATCH 50/50] task-poky-lsb: libqtopenqgl4 should be for qemux86 and atom-pc only Koen Kooi
2011-02-27 17:04 ` [PATCH 00/50] Merge in yocto changes made since split Koen Kooi
2011-03-02  9:00   ` Koen Kooi
2011-03-02 14:22     ` Koen Kooi
2011-03-02 16:52     ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox