summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/DirectFB/files')
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.1.1-pkgconfig.patch22
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.2.0-headers.patch16
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.2.7-CFLAGS.patch19
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.4.9-libpng-1.5.patch244
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch50
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.6.3-build.patch33
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.6.3-flags.patch11
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.6.3-pkgconfig.patch22
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.6.3-setregion.patch85
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.1-build.patch27
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.1-flags.patch63
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.5-flags.patch63
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.6-cle266.patch13
13 files changed, 668 insertions, 0 deletions
diff --git a/dev-libs/DirectFB/files/DirectFB-1.1.1-pkgconfig.patch b/dev-libs/DirectFB/files/DirectFB-1.1.1-pkgconfig.patch
new file mode 100644
index 000000000000..01a119ec7aec
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.1.1-pkgconfig.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/200661
+
+--- DirectFB/directfb-config.in
++++ DirectFB/directfb-config.in
+@@ -306,7 +306,7 @@
+ libs="$libs -ldirectfb -lfusion -ldirect @THREADLIB@"
+
+ if test -n "$echo_static"; then
+- libs="$libs @DYNLIB@ @ZLIB_LIBS@"
++ libs="$libs @DYNLIB@ @ZLIB_LIBS@ @SYSFS_LIBS@"
+ fi
+ fi
+
+--- DirectFB/directfb.pc.in
++++ DirectFB/directfb.pc.in
+@@ -8,5 +8,5 @@
+ Version: @VERSION@
+ Requires: fusion direct
+ Libs: -L${libdir} -ldirectfb @THREADLIB@ @OSX_LIBS@
+-Libs.private: -L${libdir} @DYNLIB@ @ZLIB_LIBS@
++Libs.private: -L${libdir} @DYNLIB@ @ZLIB_LIBS@ @SYSFS_LIBS@
+ Cflags: @THREADFLAGS@ -I@INCLUDEDIR@
diff --git a/dev-libs/DirectFB/files/DirectFB-1.2.0-headers.patch b/dev-libs/DirectFB/files/DirectFB-1.2.0-headers.patch
new file mode 100644
index 000000000000..dc2e6d33be28
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.2.0-headers.patch
@@ -0,0 +1,16 @@
+Don't rely on the kernel to tell us what the cpu target is ... we'll just
+use the default values all the time instead.
+
+http://bugs.gentoo.org/152614
+
+--- lib/direct/ppcasm_memcpy_cachable.S
++++ lib/direct/ppcasm_memcpy_cachable.S
+@@ -34,8 +34,6 @@
+
+ #define __ASSEMBLY__
+
+-#include <linux/config.h>
+-
+ #if defined(CONFIG_8xx) || defined(CONFIG_403GCX)
+ #define L1_CACHE_LINE_SIZE 16
+ #define LG_L1_CACHE_LINE_SIZE 4
diff --git a/dev-libs/DirectFB/files/DirectFB-1.2.7-CFLAGS.patch b/dev-libs/DirectFB/files/DirectFB-1.2.7-CFLAGS.patch
new file mode 100644
index 000000000000..92e3ed8bdda7
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.2.7-CFLAGS.patch
@@ -0,0 +1,19 @@
+--- DirectFB-1.2.7/configure
++++ DirectFB-1.2.7/configure
+@@ -22953,8 +22953,6 @@
+ CFLAGS=
+ fi
+
+-CFLAGS="-O3 -ffast-math -pipe $CFLAGS"
+-
+ DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS"
+
+ # Check whether --enable-extra-warnings was given.
+@@ -23622,7 +23620,6 @@
+ fi
+
+ if test "$enable_debug" = "yes"; then
+- CFLAGS="$CFLAGS -g3 -fno-inline -Wno-inline"
+ DIRECT_BUILD_DEBUG=1
+ else
+ DIRECT_BUILD_DEBUG=0
diff --git a/dev-libs/DirectFB/files/DirectFB-1.4.9-libpng-1.5.patch b/dev-libs/DirectFB/files/DirectFB-1.4.9-libpng-1.5.patch
new file mode 100644
index 000000000000..e428afbaf7c3
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.4.9-libpng-1.5.patch
@@ -0,0 +1,244 @@
+From 83180b25e90721e717bf37c5332c22713508786e Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 20 Feb 2011 19:18:19 -0500
+Subject: [PATCH] png: add support for libpng 1.5.x
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ .../idirectfbimageprovider_png.c | 56 ++++++++++++-------
+ 1 files changed, 35 insertions(+), 21 deletions(-)
+
+diff --git a/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c b/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c
+index 6d65ea3..7d82c5c 100644
+--- a/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c
++++ b/interfaces/IDirectFBImageProvider/idirectfbimageprovider_png.c
+@@ -207,7 +207,7 @@ Construct( IDirectFBImageProvider *thiz,
+ if (!data->png_ptr)
+ goto error;
+
+- if (setjmp( data->png_ptr->jmpbuf )) {
++ if (setjmp( png_jmpbuf( data->png_ptr ))) {
+ D_ERROR( "ImageProvider/PNG: Error reading header!\n" );
+ goto error;
+ }
+@@ -292,7 +292,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDirectFBImageProvider *thiz,
+ rect = dst_data->area.wanted;
+ }
+
+- if (setjmp( data->png_ptr->jmpbuf )) {
++ if (setjmp( png_jmpbuf( data->png_ptr ))) {
+ D_ERROR( "ImageProvider/PNG: Error during decoding!\n" );
+
+ if (data->stage < STAGE_IMAGE)
+@@ -327,6 +327,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDirectFBImageProvider *thiz,
+ }
+ else {
+ CoreSurfaceBufferLock lock;
++ png_byte bit_depth = png_get_bit_depth( data->png_ptr, data->info_ptr );
+
+ ret = dfb_surface_lock_buffer( dst_surface, CSBR_BACK, CSAID_CPU, CSAF_WRITE, &lock );
+ if (ret)
+@@ -334,7 +335,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDirectFBImageProvider *thiz,
+
+ switch (data->color_type) {
+ case PNG_COLOR_TYPE_PALETTE:
+- if (dst_surface->config.format == DSPF_LUT8 && data->info_ptr->bit_depth == 8) {
++ if (dst_surface->config.format == DSPF_LUT8 && bit_depth == 8) {
+ /*
+ * Special indexed PNG to LUT8 loading.
+ */
+@@ -377,7 +378,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDirectFBImageProvider *thiz,
+ }
+ else {
+ if (data->color_type == PNG_COLOR_TYPE_GRAY) {
+- int num = 1 << data->info_ptr->bit_depth;
++ int num = 1 << bit_depth;
+
+ for (x=0; x<num; x++) {
+ int value = x * 255 / (num - 1);
+@@ -386,7 +387,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDirectFBImageProvider *thiz,
+ }
+ }
+
+- switch (data->info_ptr->bit_depth) {
++ switch (bit_depth) {
+ case 8:
+ for (y=0; y<data->height; y++) {
+ u8 *S = data->image + data->pitch * y;
+@@ -441,7 +442,7 @@ IDirectFBImageProvider_PNG_RenderTo( IDirectFBImageProvider *thiz,
+
+ default:
+ D_ERROR( "ImageProvider/PNG: Unsupported indexed bit depth %d!\n",
+- data->info_ptr->bit_depth );
++ bit_depth );
+ }
+
+ dfb_scale_linear_32( image_argb, data->width, data->height,
+@@ -594,16 +595,26 @@ png_info_callback( png_structp png_read_ptr,
+ NULL, NULL, NULL );
+
+ if (png_get_valid( data->png_ptr, data->info_ptr, PNG_INFO_tRNS )) {
++ png_bytep trans;
++ png_color_16p trans_color;
++ int num_trans;
++
++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color );
++
+ data->color_keyed = true;
+
+ /* generate color key based on palette... */
+ if (data->color_type == PNG_COLOR_TYPE_PALETTE) {
+ u32 key;
+- png_colorp palette = data->info_ptr->palette;
+- png_bytep trans = data->info_ptr->trans_alpha;
+- int num_colors = MIN( MAXCOLORMAPSIZE,
+- data->info_ptr->num_palette );
+- u8 cmap[3][num_colors];
++ png_colorp palette;
++ int num_colors;
++ u8 *cmap[3];
++
++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors );
++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors );
++ cmap[0] = alloca (num_colors);
++ cmap[1] = alloca (num_colors);
++ cmap[2] = alloca (num_colors);
+
+ for (i=0; i<num_colors; i++) {
+ cmap[0][i] = palette[i].red;
+@@ -613,7 +624,7 @@ png_info_callback( png_structp png_read_ptr,
+
+ key = FindColorKey( num_colors, &cmap[0][0] );
+
+- for (i=0; i<data->info_ptr->num_trans; i++) {
++ for (i=0; i<num_trans; i++) {
+ if (!trans[i]) {
+ palette[i].red = (key & 0xff0000) >> 16;
+ palette[i].green = (key & 0x00ff00) >> 8;
+@@ -625,20 +636,23 @@ png_info_callback( png_structp png_read_ptr,
+ }
+ else {
+ /* ...or based on trans rgb value */
+- png_color_16p trans = &data->info_ptr->trans_color;
+-
+- data->color_key = (((trans->red & 0xff00) << 8) |
+- ((trans->green & 0xff00)) |
+- ((trans->blue & 0xff00) >> 8));
++ data->color_key = (((trans_color->red & 0xff00) << 8) |
++ ((trans_color->green & 0xff00)) |
++ ((trans_color->blue & 0xff00) >> 8));
+ }
+ }
+
+ switch (data->color_type) {
+ case PNG_COLOR_TYPE_PALETTE: {
+- png_colorp palette = data->info_ptr->palette;
+- png_bytep trans = data->info_ptr->trans_alpha;
+- int num_trans = data->info_ptr->num_trans;
+- int num_colors = MIN( MAXCOLORMAPSIZE, data->info_ptr->num_palette );
++ png_colorp palette;
++ png_bytep trans;
++ png_color_16p trans_color;
++ int num_trans;
++ int num_colors;
++
++ png_get_PLTE( data->png_ptr, data->info_ptr, &palette, &num_colors );
++ num_colors = MIN( MAXCOLORMAPSIZE, num_colors );
++ png_get_tRNS( data->png_ptr, data->info_ptr, &trans, &num_trans, &trans_color );
+
+ for (i=0; i<num_colors; i++) {
+ data->colors[i].a = (i < num_trans) ? trans[i] : 0xff;
+--
+1.7.4.1
+
+From 7a2a36fada3ecdd7f48fcfd782a552598477a8f5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 20 Feb 2011 19:38:50 -0500
+Subject: [PATCH] tools: add support for libpng 1.5.x
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tools/directfb-csource.c | 20 +++++++++++++-------
+ tools/mkdfiff.c | 2 +-
+ tools/mkdgifft.cpp | 2 +-
+ 3 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/tools/directfb-csource.c b/tools/directfb-csource.c
+index 8f2cbf0..487ea3c 100644
+--- a/tools/directfb-csource.c
++++ b/tools/directfb-csource.c
+@@ -338,7 +338,7 @@ static DFBResult load_image (const char *filename,
+ if (!png_ptr)
+ goto cleanup;
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf (png_ptr))) {
+ if (desc->preallocated[0].data) {
+ free (desc->preallocated[0].data);
+ desc->preallocated[0].data = NULL;
+@@ -405,17 +405,22 @@ static DFBResult load_image (const char *filename,
+ }
+
+ switch (src_format) {
+- case DSPF_LUT8:
+- if (info_ptr->num_palette) {
++ case DSPF_LUT8: {
++ png_colorp png_palette;
++ int num_palette;
++
++ png_get_PLTE( png_ptr, info_ptr, &png_palette, &num_palette );
++
++ if (num_palette) {
+ png_byte *alpha;
+ int i, num;
+
+- *palette_size = MIN (info_ptr->num_palette, 256);
++ *palette_size = MIN (num_palette, 256);
+ for (i = 0; i < *palette_size; i++) {
+ palette[i].a = 0xFF;
+- palette[i].r = info_ptr->palette[i].red;
+- palette[i].g = info_ptr->palette[i].green;
+- palette[i].b = info_ptr->palette[i].blue;
++ palette[i].r = png_palette[i].red;
++ palette[i].g = png_palette[i].green;
++ palette[i].b = png_palette[i].blue;
+ }
+ if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) {
+ png_get_tRNS (png_ptr, info_ptr, &alpha, &num, NULL);
+@@ -424,6 +429,7 @@ static DFBResult load_image (const char *filename,
+ }
+ }
+ break;
++ }
+ case DSPF_RGB32:
+ png_set_filler (png_ptr, 0xFF,
+ #ifdef WORDS_BIGENDIAN
+diff --git a/tools/mkdfiff.c b/tools/mkdfiff.c
+index 68a3b4f..edb58a7 100644
+--- a/tools/mkdfiff.c
++++ b/tools/mkdfiff.c
+@@ -97,7 +97,7 @@ load_image (const char *filename,
+ if (!png_ptr)
+ goto cleanup;
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf (png_ptr))) {
+ if (desc->preallocated[0].data) {
+ free (desc->preallocated[0].data);
+ desc->preallocated[0].data = NULL;
+diff --git a/tools/mkdgifft.cpp b/tools/mkdgifft.cpp
+index 96e4220..d4b6bf4 100644
+--- a/tools/mkdgifft.cpp
++++ b/tools/mkdgifft.cpp
+@@ -595,7 +595,7 @@ load_image (const char *filename,
+ if (!png_ptr)
+ goto cleanup;
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf (png_ptr))) {
+ if (desc->preallocated[0].data) {
+ free (desc->preallocated[0].data);
+ desc->preallocated[0].data = NULL;
+--
+1.7.4.1
+
diff --git a/dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch b/dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch
new file mode 100644
index 000000000000..06f56fed39d7
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch
@@ -0,0 +1,50 @@
+From 253e1d0d10bdece158f8f68dc48c19ab57d2da29 Mon Sep 17 00:00:00 2001
+From: Mandeep Singh Baines <msb@chromium.org>
+Date: Mon, 18 Mar 2013 19:03:36 -0700
+Subject: [PATCH] atomic: fix compiler error when building for thumb2
+
+Fixed the following error:
+
+{standard input}: Assembler messages:
+{standard input}:179: Error: thumb conditional instruction should be in IT block
+-- `strexeq r4,r1,[r2]'
+{standard input}:283: Error: thumb conditional instruction should be in IT block
+-- `strexeq r1,r4,[r2]'
+{standard input}:379: Error: thumb conditional instruction should be in IT block
+-- `strexeq r1,r2,[r0]'
+make[4]: *** [fifo.lo] Error 1
+
+Fix was to add the appropriate it block.
+
+While I was at it, I optimized the code a bit by:
+
+1) Moved the mov instruction above the ldrex to minimize the number
+of instructions between the ldex and strex as recommeded here:
+http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABFFBJB.html
+2) Saved 4 bytes by replacing mov with movs and teq with cmp.
+
+Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
+---
+ lib/direct/atomic.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/direct/atomic.h b/lib/direct/atomic.h
+index 94cb0c9..8dc0dfb 100644
+--- a/lib/direct/atomic.h
++++ b/lib/direct/atomic.h
+@@ -191,9 +191,10 @@ static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new)
+
+ do {
+ __asm__ __volatile__("@ atomic_cmpxchg\n"
++ "movs %0, #0\n"
+ "ldrex %1, [%2]\n"
+- "mov %0, #0\n"
+- "teq %1, %3\n"
++ "cmp %1, %3\n"
++ "it eq\n"
+ "strexeq %0, %4, [%2]\n"
+ : "=&r" (res), "=&r" (oldval)
+ : "r" (ptr), "Ir" (old), "r" (_new)
+--
+1.7.12.4
+
diff --git a/dev-libs/DirectFB/files/DirectFB-1.6.3-build.patch b/dev-libs/DirectFB/files/DirectFB-1.6.3-build.patch
new file mode 100644
index 000000000000..241875187941
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.6.3-build.patch
@@ -0,0 +1,33 @@
+--- DirectFB-1.6.3/interfaces/IDirectFBImageProvider/Makefile.am
++++ DirectFB-1.6.3/interfaces/IDirectFBImageProvider/Makefile.am
+@@ -59,15 +59,15 @@
+ MPEG2_PROVIDER =
+ endif
+
+-INCLUDES = \
++AM_CPPFLAGS =
++AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib \
+- -I$(top_srcdir)/src
+-
+-AM_CPPFLAGS = -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS)
++ -I$(top_srcdir)/src \
++ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS) $(SVG_CFLAGS)
+
+ idirectfbimageprovider_LTLIBRARIES = \
+ libidirectfbimageprovider_dfiff.la \
+--- DirectFB-1.6.3/configure.in
++++ DirectFB-1.6.3/configure.in
+@@ -980,7 +980,7 @@
+ dnl Test for libmng
+ MNG=no
+
+-AC_ARG_ENABLE(mngg,
++AC_ARG_ENABLE(mng,
+ AC_HELP_STRING([--enable-mng],
+ [build MNG image provider @<:@default=yes@:>@]),
+ [], [enable_mng=yes])
diff --git a/dev-libs/DirectFB/files/DirectFB-1.6.3-flags.patch b/dev-libs/DirectFB/files/DirectFB-1.6.3-flags.patch
new file mode 100644
index 000000000000..d20b05bf816f
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.6.3-flags.patch
@@ -0,0 +1,11 @@
+--- DirectFB-1.6.3/configure.in
++++ DirectFB-1.6.3/configure.in
+@@ -457,7 +457,7 @@
+ [enable debugging @<:@default=no@:>@]),
+ [], [enable_debug=no])
+ if test "$enable_debug" = "yes"; then
+- CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS"
++ CFLAGS="-fno-inline -Wno-inline $CFLAGS"
+ DIRECT_BUILD_DEBUG=1
+ else
+ DIRECT_BUILD_DEBUG=0
diff --git a/dev-libs/DirectFB/files/DirectFB-1.6.3-pkgconfig.patch b/dev-libs/DirectFB/files/DirectFB-1.6.3-pkgconfig.patch
new file mode 100644
index 000000000000..2c71bc96f9e6
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.6.3-pkgconfig.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/200661
+
+--- DirectFB/directfb-config.in
++++ DirectFB/directfb-config.in
+@@ -300,7 +300,7 @@
+ libs="$libs -ldirectfb -lfusion -ldirect @THREADLIB@"
+
+ if test -n "$echo_static"; then
+- libs="$libs @DYNLIB@ @ZLIB_LIBS@"
++ libs="$libs @DYNLIB@ @ZLIB_LIBS@ @SYSFS_LIBS@"
+ fi
+ fi
+
+--- DirectFB/directfb.pc.in
++++ DirectFB/directfb.pc.in
+@@ -9,5 +9,5 @@
+ Version: @VERSION@
+ Requires: @DEP_VOODOO@ fusion direct
+ Libs: -L${libdir} -ldirectfb @THREADLIB@ @OSX_LIBS@
+-Libs.private: -L${libdir} @LIBM@ @DYNLIB@ @ZLIB_LIBS@
++Libs.private: -L${libdir} @LIBM@ @DYNLIB@ @ZLIB_LIBS@ @SYSFS_LIBS@
+ Cflags: @THREADFLAGS@ -I@INCLUDEDIR@
diff --git a/dev-libs/DirectFB/files/DirectFB-1.6.3-setregion.patch b/dev-libs/DirectFB/files/DirectFB-1.6.3-setregion.patch
new file mode 100644
index 000000000000..8d25a51920d7
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.6.3-setregion.patch
@@ -0,0 +1,85 @@
+https://build.opensuse.org/package/view_file?expand=1&file=DirectFB-setregion.patch&package=DirectFB&project=openSUSE%3AFactory
+
+--- gfxdrivers/cyber5k/cyber5k.c
++++ gfxdrivers/cyber5k/cyber5k.c
+@@ -636,7 +636,8 @@ osdSetRegion( CoreLayer
+ CoreLayerRegionConfigFlags updated,
+ CoreSurface *surface,
+ CorePalette *palette,
+- CoreSurfaceBufferLock *lock )
++ CoreSurfaceBufferLock *left_lock,
++ CoreSurfaceBufferLock *right_lock )
+ {
+ DFBResult ret;
+
+@@ -644,7 +645,7 @@ osdSetRegion( CoreLayer
+ ret = oldPrimaryFuncs.SetRegion( layer, oldPrimaryDriverData,
+ layer_data, region_data,
+ config, updated, surface,
+- palette, lock );
++ palette, left_lock, right_lock );
+ if (ret)
+ return ret;
+
+--- gfxdrivers/radeon/radeon_crtc1.c
++++ gfxdrivers/radeon/radeon_crtc1.c
+@@ -147,14 +147,15 @@ crtc1SetRegion( CoreLayer
+ CoreLayerRegionConfigFlags updated,
+ CoreSurface *surface,
+ CorePalette *palette,
+- CoreSurfaceBufferLock *lock )
++ CoreSurfaceBufferLock *left_lock,
++ CoreSurfaceBufferLock *right_lock )
+ {
+
+ if (updated & ~CLRCF_OPTIONS) {
+ return OldPrimaryLayerFuncs.SetRegion( layer,
+ OldPrimaryLayerDriverData,
+ layer_data, region_data,
+- config, updated, surface, palette, lock );
++ config, updated, surface, palette, left_lock, right_lock );
+ }
+
+ return DFB_OK;
+--- gfxdrivers/cle266/uc_primary.c
++++ gfxdrivers/cle266/uc_primary.c
+@@ -138,7 +138,8 @@ osdSetRegion( CoreLayer
+ CoreLayerRegionConfigFlags updated,
+ CoreSurface *surface,
+ CorePalette *palette,
+- CoreSurfaceBufferLock *lock )
++ CoreSurfaceBufferLock *left_lock,
++ CoreSurfaceBufferLock *right_lock )
+ {
+ DFBResult ret;
+ UcDriverData *ucdrv = (UcDriverData*) driver_data;
+@@ -147,7 +148,7 @@ osdSetRegion( CoreLayer
+ ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData,
+ layer_data, region_data,
+ config, updated, surface,
+- palette, lock );
++ palette, left_lock, right_lock );
+ if (ret)
+ return ret;
+
+--- gfxdrivers/unichrome/uc_primary.c
++++ gfxdrivers/unichrome/uc_primary.c
+@@ -135,7 +135,8 @@ osdSetRegion( CoreLayer
+ CoreLayerRegionConfigFlags updated,
+ CoreSurface *surface,
+ CorePalette *palette,
+- CoreSurfaceBufferLock *lock )
++ CoreSurfaceBufferLock *left_lock,
++ CoreSurfaceBufferLock *right_lock )
+ {
+ DFBResult ret;
+ UcDriverData *ucdrv = (UcDriverData*) driver_data;
+@@ -144,7 +145,7 @@ osdSetRegion( CoreLayer
+ ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData,
+ layer_data, region_data,
+ config, updated, surface,
+- palette, lock );
++ palette, left_lock, right_lock );
+ if (ret)
+ return ret;
+
diff --git a/dev-libs/DirectFB/files/DirectFB-1.7.1-build.patch b/dev-libs/DirectFB/files/DirectFB-1.7.1-build.patch
new file mode 100644
index 000000000000..28c92eb79b02
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.7.1-build.patch
@@ -0,0 +1,27 @@
+Author: hasufell <hasufell@gentoo.org>
+Date: Sat Dec 28 23:52:03 2013 +0100
+
+ * INCLUDES is deprecated, use AM_CPPFLAGS instead
+ * add missing SVG_CFLAGS
+
+--- a/interfaces/IDirectFBImageProvider/Makefile.am
++++ b/interfaces/IDirectFBImageProvider/Makefile.am
+@@ -77,15 +77,14 @@ else
+ FFMPEG_PROVIDER_LTLIB =
+ endif
+
+-INCLUDES = \
++AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib \
+- -I$(top_srcdir)/src
+-
+-AM_CPPFLAGS = -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS) $(FFMPEG_CFLAGS)
++ -I$(top_srcdir)/src \
++ -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" $(LIBJPEG_CFLAGS) $(LIBPNG_CFLAGS) $(FFMPEG_CFLAGS) $(SVG_CFLAGS)
+
+ idirectfbimageprovider_LTLIBRARIES = \
+ libidirectfbimageprovider_dfiff.la \
diff --git a/dev-libs/DirectFB/files/DirectFB-1.7.1-flags.patch b/dev-libs/DirectFB/files/DirectFB-1.7.1-flags.patch
new file mode 100644
index 000000000000..65221755cb01
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.7.1-flags.patch
@@ -0,0 +1,63 @@
+Author: hasufell <hasufell@gentoo.org>
+Date: Sat Dec 28 23:48:53 2013 +0100
+
+ * respect system flags
+ * remove Werror, it breaks the build
+
+--- a/configure.in
++++ b/configure.in
+@@ -194,12 +194,7 @@ AM_CONDITIONAL(X11VDPAU_CORE, test "$enable_x11vdpau" = "yes")
+ AC_CHECK_HEADERS(linux/compiler.h linux/unistd.h asm/page.h signal.h)
+
+
+-dnl Clear default CFLAGS
+-if test x"$CFLAGS" = x"-g -O2"; then
+- CFLAGS=
+-fi
+-
+-CFLAGS="-ffast-math -pipe $CFLAGS"
++CFLAGS="-ffast-math $CFLAGS"
+
+ DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS"
+
+@@ -467,7 +462,7 @@ AC_ARG_ENABLE(debug,
+ [enable debugging @<:@default=no@:>@]),
+ [], [enable_debug=no])
+ if test "$enable_debug" = "yes"; then
+- CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS"
++ CFLAGS="-fno-inline -Wno-inline $CFLAGS"
+ DIRECT_BUILD_DEBUG=1
+ else
+ DIRECT_BUILD_DEBUG=0
+@@ -483,13 +478,8 @@ AC_ARG_ENABLE(debug-support,
+ [], [enable_debug_support=yes])
+ if test "$enable_debug_support" = "yes" || test "$enable_debug" = "yes"; then
+ enable_debug_support=yes
+- if test "$enable_debug" = "no"; then
+- CFLAGS="-g2 $CFLAGS"
+- fi
+- CFLAGS="-O3 $CFLAGS"
+ DIRECT_BUILD_DEBUGS=1
+ else
+- CFLAGS="-O3 -g0 $CFLAGS"
+ DIRECT_BUILD_DEBUGS=0
+ fi
+ AM_CONDITIONAL(ENABLE_DEBUGS, test "$enable_debug_support" = "yes")
+@@ -2750,8 +2750,6 @@
+
+ AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+
+-CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
+-
+ AC_ARG_ENABLE(extra-warnings,
+ AC_HELP_STRING([--enable-extra-warnings],
+ [enable extra warnings @<:@default=no@:>@]),
+@@ -2761,7 +2759,7 @@
+ fi
+
+ if test "$GCC" = "yes"; then
+- CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration $CFLAGS"
++ CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing $CFLAGS"
+ CXXFLAGS="-Wall -Wno-strict-aliasing $CXXFLAGS"
+ fi
+
diff --git a/dev-libs/DirectFB/files/DirectFB-1.7.5-flags.patch b/dev-libs/DirectFB/files/DirectFB-1.7.5-flags.patch
new file mode 100644
index 000000000000..485cd1934fc6
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.7.5-flags.patch
@@ -0,0 +1,63 @@
+Author: hasufell <hasufell@gentoo.org>
+Date: Sat Dec 28 23:48:53 2013 +0100
+
+ * respect system flags
+ * remove Werror, it breaks the build
+
+--- a/configure.in
++++ b/configure.in
+@@ -194,12 +194,7 @@ AM_CONDITIONAL(X11VDPAU_CORE, test "$enable_x11vdpau" = "yes")
+ AC_CHECK_HEADERS(linux/compiler.h linux/unistd.h asm/page.h signal.h)
+
+
+-dnl Clear default CFLAGS
+-if test x"$CFLAGS" = x"-g -O2"; then
+- CFLAGS=
+-fi
+-
+-CFLAGS="-ffast-math -pipe $CFLAGS"
++CFLAGS="-ffast-math $CFLAGS"
+
+ DFB_INTERNAL_CFLAGS="-D_GNU_SOURCE $DFB_INTERNAL_CFLAGS"
+
+@@ -467,7 +462,7 @@ AC_ARG_ENABLE(debug,
+ [enable debugging @<:@default=no@:>@]),
+ [], [enable_debug=no])
+ if test "$enable_debug" = "yes"; then
+- CFLAGS="-g3 -O0 -fno-inline -Wno-inline $CFLAGS"
++ CFLAGS="-fno-inline -Wno-inline $CFLAGS"
+ DIRECT_BUILD_DEBUG=1
+ else
+ DIRECT_BUILD_DEBUG=0
+@@ -483,13 +478,8 @@ AC_ARG_ENABLE(debug-support,
+ [], [enable_debug_support=yes])
+ if test "$enable_debug_support" = "yes" || test "$enable_debug" = "yes"; then
+ enable_debug_support=yes
+- if test "$enable_debug" = "no"; then
+- CFLAGS="-g2 $CFLAGS"
+- fi
+- CFLAGS="-O3 $CFLAGS"
+ DIRECT_BUILD_DEBUGS=1
+ else
+- CFLAGS="-O3 -g0 $CFLAGS"
+ DIRECT_BUILD_DEBUGS=0
+ fi
+ AM_CONDITIONAL(ENABLE_DEBUGS, test "$enable_debug_support" = "yes")
+@@ -2750,8 +2750,6 @@
+
+ AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+
+-CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
+-
+ AC_ARG_ENABLE(extra-warnings,
+ AC_HELP_STRING([--enable-extra-warnings],
+ [enable extra warnings @<:@default=no@:>@]),
+@@ -2761,7 +2759,7 @@
+ fi
+
+ if test "$GCC" = "yes"; then
+- CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing -Werror-implicit-function-declaration $CFLAGS"
++ CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-strict-aliasing $CFLAGS"
+ CXXFLAGS="-Wall -Wno-strict-aliasing -std=$CXXSTD $CXXFLAGS"
+ fi
+
diff --git a/dev-libs/DirectFB/files/DirectFB-1.7.6-cle266.patch b/dev-libs/DirectFB/files/DirectFB-1.7.6-cle266.patch
new file mode 100644
index 000000000000..ff72f5339dbf
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.7.6-cle266.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/527986
+
+--- a/gfxdrivers/cle266/uc_overlay.c 2015-02-10 15:26:24.931309401 -0800
++++ b/gfxdrivers/cle266/uc_overlay.c 2015-02-10 15:26:47.229309401 -0800
+@@ -246,7 +246,7 @@
+ dfb_surface_flip(surface, false);
+
+ ucovl->field = 0;
+- ucovl->lock = lock;
++ ucovl->lock = left_lock;
+
+ ret = uc_ovl_update(ucdrv, ucovl, UC_OVL_FLIP, surface, left_lock);
+ if (ret)