summaryrefslogtreecommitdiff
path: root/dev-libs/DirectFB
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-libs/DirectFB
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-libs/DirectFB')
-rw-r--r--dev-libs/DirectFB/DirectFB-1.7.6-r1.ebuild201
-rw-r--r--dev-libs/DirectFB/Manifest11
-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-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.5-flags.patch63
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.6-cle266.patch13
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.6-idivine.patch57
-rw-r--r--dev-libs/DirectFB/files/DirectFB-1.7.6-tslib.patch33
-rw-r--r--dev-libs/DirectFB/metadata.xml44
11 files changed, 606 insertions, 0 deletions
diff --git a/dev-libs/DirectFB/DirectFB-1.7.6-r1.ebuild b/dev-libs/DirectFB/DirectFB-1.7.6-r1.ebuild
new file mode 100644
index 000000000000..8c921ad2850b
--- /dev/null
+++ b/dev-libs/DirectFB/DirectFB-1.7.6-r1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+# Map Gentoo IUSE expand vars to DirectFB drivers
+# echo `sed -n '/Possible gfxdrivers are:/,/^$/{/Possible/d;s:\[ *::;s:\].*::;s:,::g;p}' configure.in`
+I_TO_D_intel="i810,i830"
+I_TO_D_mga="matrox"
+I_TO_D_r128="ati128"
+I_TO_D_via="cle266"
+# cyber5k davinci ep9x omap pxa3xx sh772x savage pvr2d
+IUSE_VIDEO_CARDS=" intel mga nvidia r128 radeon tdfx via vmware"
+IUV=${IUSE_VIDEO_CARDS// / video_cards_}
+# echo `sed -n '/Possible inputdrivers are:/,/^$/{/\(Possible\|^input\)/d;s:\[ *::;s:\].*::;s:,::g;p}' configure.in`
+I_TO_D_elo2300="elo-input"
+I_TO_D_evdev="linuxinput"
+I_TO_D_mouse="ps2mouse,serialmouse"
+# dbox2remote dreamboxremote gunze h3600_ts penmount sonypijogdial ucb1x00 wm97xx zytronic
+IUSE_INPUT_DEVICES=" dynapro elo2300 evdev joystick keyboard lirc mouse tslib"
+IUD=${IUSE_INPUT_DEVICES// / input_devices_}
+
+DESCRIPTION="Thin library on top of the Linux framebuffer devices"
+HOMEPAGE="http://www.directfb.net/"
+SRC_URI="http://directfb.net/downloads/Core/${PN}-${PV:0:3}/${P}.tar.gz
+ http://directfb.net/downloads/Old/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 -mips ppc ppc64 sh -sparc x86"
+IUSE="alsa bmp cddb debug divine drmkms +dynload doc egl fbcon fusiondale fusionsound gif gles2 gstreamer imlib2 input_hub jpeg jpeg2k mad cpu_flags_x86_mmx mng mpeg2 mpeg3 multicore opengl oss png pnm sawman sdl cpu_flags_x86_sse static-libs swfdec tiff timidity tremor truetype v4l vdpau vorbis webp X xine zlib ${IUV} ${IUD}"
+REQUIRED_USE="gles2? ( opengl )"
+
+# ffmpeg useflag broken
+# ffmpeg? ( virtual/ffmpeg )
+# $(use_enable ffmpeg) \
+RDEPEND="
+ alsa? ( media-libs/alsa-lib )
+ cddb? ( media-libs/libcddb )
+ drmkms? ( x11-libs/libdrm[libkms] )
+ gif? ( media-libs/giflib )
+ gstreamer? ( media-libs/gstreamer:1.0 media-libs/gst-plugins-base:1.0 )
+ imlib2? ( media-libs/imlib2 )
+ jpeg? ( virtual/jpeg:0= )
+ jpeg2k? ( media-libs/jasper:=[jpeg] )
+ mad? ( media-libs/libmad )
+ mng? ( media-libs/libmng )
+ mpeg3? ( media-libs/libmpeg3 )
+ opengl? ( media-libs/mesa[gbm,egl?,gles2?] x11-libs/libdrm )
+ png? ( media-libs/libpng:0= )
+ sdl? ( media-libs/libsdl )
+ tiff? ( media-libs/tiff:0 )
+ timidity? (
+ media-libs/libtimidity
+ media-sound/timidity++
+ )
+ tremor? ( media-libs/tremor )
+ truetype? ( >=media-libs/freetype-2.0.1 )
+ vdpau? ( x11-libs/libX11 x11-libs/libXext x11-libs/libvdpau )
+ vorbis? ( media-libs/libvorbis )
+ webp? ( media-libs/libwebp )
+ X? ( x11-libs/libXext x11-libs/libX11 )
+ xine? ( media-libs/xine-lib[vdpau?] )
+ zlib? ( sys-libs/zlib ) "
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.7.5-flags.patch \
+ "${FILESDIR}"/${PN}-1.6.3-pkgconfig.patch \
+ "${FILESDIR}"/${PN}-1.7.1-build.patch \
+ "${FILESDIR}"/${PN}-1.6.3-setregion.patch \
+ "${FILESDIR}"/${PN}-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch \
+ "${FILESDIR}"/${PN}-1.7.6-cle266.patch \
+ "${FILESDIR}"/${PN}-1.7.6-idivine.patch \
+ "${FILESDIR}"/${PN}-1.7.6-tslib.patch
+ sed -i \
+ -e '/#define RASPBERRY_PI/d' \
+ systems/egl/egl_system.c || die #497124
+ sed -i \
+ -e '/^CXXFLAGS=.*-Werror-implicit-function-declaration/d' \
+ configure.in || die #526196
+
+ mv configure.{in,ac} || die
+ eautoreconf
+}
+
+driver_list() {
+ local pfx=$1
+ local dev devs map
+ shift
+ for dev in "$@" ; do
+ use ${pfx}_${dev} || continue
+ map="I_TO_D_${dev}"
+ devs=${devs:+${devs},}${!map:-${dev}}
+ done
+ echo ${devs:-none}
+}
+
+src_configure() {
+ local myaudio="wave"
+ use alsa && myaudio+=",alsa"
+ use oss && myaudio+=",oss"
+
+ local sdlconf="--disable-sdl"
+ if use sdl ; then
+ # since SDL can link against DirectFB and trigger a
+ # dependency loop, only link against SDL if it isn't
+ # broken #61592
+ echo 'int main(){}' > sdl-test.c
+ $(tc-getCC) sdl-test.c -lSDL 2>/dev/null \
+ && sdlconf="--enable-sdl" \
+ || ewarn "Disabling SDL since libSDL.so is broken"
+ fi
+
+ # fix --with-gfxdrivers= logic, because opengl, vdpau and gles2 are no video_cards
+ local gfxdrivers="$(driver_list video_cards ${IUSE_VIDEO_CARDS})"
+ use opengl && gfxdrivers="${gfxdrivers},gl"
+ use vdpau && gfxdrivers="${gfxdrivers},vdpau"
+ use gles2 && gfxdrivers="${gfxdrivers},gles2"
+ gfxdrivers="$(echo ${gfxdrivers} | sed 's/none,//')"
+
+ # fix --with-inputdrivers= logic, don't know where to put "input_hub"
+ local inputdrivers="$(driver_list input_devices ${IUSE_INPUT_DEVICES})"
+ use input_hub && inputdrivers="${inputdrivers},input_hub"
+ inputdrivers="$(echo ${inputdrivers} | sed 's/none,//')"
+
+ # The xine-vdpau flag requires a custom patch to xine-lib which we don't carry:
+ # http://git.directfb.org/?p=extras/DirectFB-extra.git;a=blob;f=interfaces/IDirectFBVideoProvider/xine-lib-1.2-vdpau-hooks.patch;hb=HEAD
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable X x11) \
+ $(use_enable divine) \
+ $(use_enable sawman) \
+ $(use_enable fusiondale) \
+ $(use_enable fusionsound) \
+ $(use_enable fbcon fbdev) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_enable egl) \
+ $(use_enable egl idirectfbgl-egl) \
+ $(use_enable jpeg) \
+ $(use_enable png) \
+ $(use_enable mng) \
+ $(use_enable gstreamer) \
+ $(use_enable gif) \
+ $(use_enable tiff) \
+ $(use_enable imlib2) \
+ $(use_enable pnm) \
+ --disable-svg \
+ $(use_enable mpeg2) \
+ $(use_enable mpeg3 libmpeg3) \
+ --disable-flash \
+ $(use_enable xine) \
+ --disable-xine-vdpau \
+ --disable-ffmpeg \
+ $(use_enable bmp) \
+ $(use_enable jpeg2k jpeg2000) \
+ --disable-openquicktime \
+ --disable-avifile \
+ $(use_enable truetype freetype) \
+ $(use_enable webp) \
+ $(use_enable debug) \
+ $(use_enable zlib) \
+ --disable-video4linux \
+ $(use_enable v4l video4linux2) \
+ $(use_enable vdpau x11vdpau) \
+ $(use_enable multicore) \
+ $(use_enable dynload) \
+ $(use_enable opengl mesa) \
+ $(use_enable drmkms) \
+ --with-fs-drivers="${myaudio}" \
+ $(use_with timidity) \
+ --with-wave \
+ $(use_with vorbis) \
+ $(use_with tremor) \
+ $(use_with mad) \
+ $(use_with cddb cdda) \
+ --with-playlist \
+ ${sdlconf} \
+ --with-gfxdrivers="${gfxdrivers}" \
+ --with-inputdrivers="${inputdrivers}" \
+ --disable-vnc
+}
+
+src_install() {
+ default
+ dodoc fb.modes
+ use doc && dohtml -r docs/html/*
+}
+
+pkg_postinst() {
+ ewarn "Each DirectFB update breaks DirectFB related applications."
+ ewarn "Please run \"revdep-rebuild\" which can be"
+ ewarn "found by emerging the package 'gentoolkit'."
+ ewarn
+ ewarn "If you have an ALPS touchpad, then you might get your mouse"
+ ewarn "unexpectedly set in absolute mode in all DirectFB applications."
+ ewarn "This can be fixed by removing linuxinput from INPUT_DEVICES."
+}
diff --git a/dev-libs/DirectFB/Manifest b/dev-libs/DirectFB/Manifest
new file mode 100644
index 000000000000..e4ccaebf4a8c
--- /dev/null
+++ b/dev-libs/DirectFB/Manifest
@@ -0,0 +1,11 @@
+AUX DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch 1665 BLAKE2B a2ddffd72a76692f5eac0ce0933289cbd168248438cdd30c76c3a7a62e2c067477f6eff52ef83cf83a1d70e42aa6366e5f50a09f75ba695c8e55b211de4b54c9 SHA512 18e189e5d085c8b87f95e2ea3567f66c3bb90a7242fb83a81dd78264bdcbd7fe77b58479c3f03cd9aee32caae98767bc88dac03230f717a34e981f65d7653eee
+AUX DirectFB-1.6.3-pkgconfig.patch 664 BLAKE2B 07e5b12361fa90515bc7ebbba9d915dbad59056210477fcdfddabe575368c5c6befbc007dc30173683b371bfe7753db7c9a5f177653bb583947da79f0a99551b SHA512 1ce162ef7af5ab7b6efcdb786e9e89d569051f2009d1144744befed57ae36109771284b302438c882b550e09a3ced814b550fa039306b4f37c7e1b68675943a7
+AUX DirectFB-1.6.3-setregion.patch 3812 BLAKE2B e586ceb274de8bb45c0d51e4153f719d016df7bc7d1b7de9899d6514a543fcf5eb61fa093d975d9c8f7833be86b4292fcb12235bd318cdb27a71f7e654b75255 SHA512 98510a4a40daa46c9d5aa824a09584ab2d1e4a0a5b885fc2893e8af99b16317e5c89279f2889d94545451b63039d24909e8ee051788bce704d403e3fb7ef46af
+AUX DirectFB-1.7.1-build.patch 839 BLAKE2B 9079ebef5a49ee0cb0549ff7841b6b4d3b1a1ded5dd590d295c3f90045e9d55d97e8d75747beb4416beece436ceee539b2e9f4d598884ef4692a4037fdde392a SHA512 51a3a88274de35798f93b76accdb345e015da0781218393d5271835ae7c64ff1e38b5b9fe96281511c0057f12e9a952bb6dbba2c54d3f940ace6e1f57d9d1114
+AUX DirectFB-1.7.5-flags.patch 2003 BLAKE2B d13bd0ca552d5c69039b0425027c9cfe61b3c2024a59ef13b93b289ed47a08e472c8ec294e0340b0597313ab0834c7b1326412b290d7fc90c81e9c86b2560587 SHA512 b8f947f338b872436bb1e029d9971852018400aa869121fada260e3ea325f2d5d28d765a4b960b3970644fc91a7ba39d86a0eb3a160473cc467523048833c264
+AUX DirectFB-1.7.6-cle266.patch 410 BLAKE2B 666dd67efbb1de4a7f5139022f3e02e95d2d1a44461c5d37ce9408b7afe72e81d3d403820efe9ad394f649d6bd93fdedf25855e2122aa392fbfedafe23ffddb6 SHA512 409f5de16912e78d0053e8438f77ca79995d1d609f0c36064b0dcfe3d46b25d29ca53a44ecec7d000aba5e7f9339d57128651024d34879f51c208fb86c2a9afd
+AUX DirectFB-1.7.6-idivine.patch 1805 BLAKE2B 8198bcf18969f4f98c2f0e1d1cedb6f89b7499e249caae9f224a85eb1928c634a69bc06eb7f9af3039e331ee1e2a4ed52fd60d709a0bcbcc938250e78f02d1e2 SHA512 29f7b7c7bcf0eeb33b295c681723c2f1203ddca43879d430d15619d6d92d67df813acd4e6d237c297e407fe0d919952badb3901f54b32a7c025ec38b8ac55593
+AUX DirectFB-1.7.6-tslib.patch 1220 BLAKE2B 110259255dfe8d664f258b4f91388e6a886b0dd1a04a9b94a81fdc725554a82ba809ec338a1f3125631b1e1a5d9cb335c91d2a3ddca4a463aaa948187c89b9c8 SHA512 60f0dc5fcefde34bb65bbd034e9e29f2776eec0260c93ce1cda2d5ea714d940b270d83ebaf343d888bab5ed748ab24affdfe5393b4dd87b702034d319cba493b
+DIST DirectFB-1.7.6.tar.gz 5975444 BLAKE2B c28f95ed73b79766c377a5440517dc83fb5c11264c7d3b6c1ebebee0dd44bec21afc778032aa03af111ea2839dfbbbd26d33f86f46b61eff3e0036377d97dbbc SHA512 18cf1aad6c277a6de147a9b0aff1cd7408ddd7c7159ef21dab9a548db7399c681603624e7820b186a29e03edaa7737350a61e2abaec572887e9cc56658bf85a2
+EBUILD DirectFB-1.7.6-r1.ebuild 6714 BLAKE2B bb202e5bb379133dad4742c1310969fdbed7084cb2f8bca65390e4a7c79875b2e6c33e0c49c84853b77ce1629b40a5b9886c28be6d490f0335c1d9cf59bf717d SHA512 e69e0881f9f7b0fd9e995b9ea89811bd53cc069bba41759eb046bf33d4972ea1f7d1af3216297630737cca92fdd955a679fded747433c2378357fe1618f62ca2
+MISC metadata.xml 1948 BLAKE2B 4d40e92ca69e987e668e00a087cd0a3c223524f4ced9e9846cc483120f91315cbfa1dc2a34003eeaffd25282b08b92d2aae5838a31699bc58bdd497621fc4c43 SHA512 6d1dc07a903d8554fda072001ffaaaf685ee1363fc820626c3c271965f7589409c3a95567bc8b4b820bd643c752e570b8a4be9cb938da1ca53b6ac6643800dd1
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-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.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)
diff --git a/dev-libs/DirectFB/files/DirectFB-1.7.6-idivine.patch b/dev-libs/DirectFB/files/DirectFB-1.7.6-idivine.patch
new file mode 100644
index 000000000000..561db23aeeda
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.7.6-idivine.patch
@@ -0,0 +1,57 @@
+--- lib/divine/idivine.h.orig
++++ lib/divine/idivine.h
+@@ -0,0 +1,54 @@
++/*
++ (c) Copyright 2012-2013 DirectFB integrated media GmbH
++ (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org)
++ (c) Copyright 2000-2004 Convergence (integrated media) GmbH
++
++ All rights reserved.
++
++ Written by Denis Oliver Kropp <dok@directfb.org>,
++ Andreas Shimokawa <andi@directfb.org>,
++ Marek Pikarski <mass@directfb.org>,
++ Sven Neumann <neo@directfb.org>,
++ Ville Syrjälä <syrjala@sci.fi> and
++ Claudio Ciccani <klan@users.sf.net>.
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the
++ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA.
++*/
++
++
++
++#ifndef __IDIVINE_H__
++#define __IDIVINE_H__
++
++#include <divine.h>
++
++/*
++ * private data struct of IDiVine
++ */
++typedef struct {
++ int ref; /* reference counter */
++
++ DiVine *divine;
++} IDiVine_data;
++
++/*
++ * IDiVine constructor/destructor
++ */
++DFBResult IDiVine_Construct( IDiVine *thiz );
++
++void IDiVine_Destruct ( IDiVine *thiz );
++
++#endif
diff --git a/dev-libs/DirectFB/files/DirectFB-1.7.6-tslib.patch b/dev-libs/DirectFB/files/DirectFB-1.7.6-tslib.patch
new file mode 100644
index 000000000000..3315968bc092
--- /dev/null
+++ b/dev-libs/DirectFB/files/DirectFB-1.7.6-tslib.patch
@@ -0,0 +1,33 @@
+https://github.com/deniskropp/DirectFB/pull/6
+https://bugs.gentoo.org/567294
+
+From 5c7c4b197b9d04587b05624db4cfca6503adb3ff Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 8 Dec 2016 16:47:34 -0500
+Subject: [PATCH] configure: fix tslib version check
+
+The tslib version is 1.0, not 1.0.0. Trying to check for the latter
+fails when using pkg-config:
+$ pkg-config --exists --print-errors "tslib-1.0 >= 1.0"
+$ pkg-config --exists --print-errors "tslib-1.0 >= 1.0.0"
+Requested 'tslib-1.0 >= 1.0.0' but version of tslib is 1.0
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 6143cd393699..12a65fdc4f52 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2561,7 +2561,7 @@ fi
+
+ enable_tslib=no
+ if test "$checkfor_tslib" = "yes"; then
+- PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0.0], [enable_tslib=yes], [enable_tslib=no])
++ PKG_CHECK_MODULES([TSLIB], [tslib-1.0 >= 1.0], [enable_tslib=yes], [enable_tslib=no])
+ if test "$enable_tslib" = "no"; then
+ PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [enable_tslib=yes], [enable_tslib=no
+ AC_MSG_WARN([*** no tslib -- tslib driver will not be built.])])
+--
+2.11.0.rc2
+
diff --git a/dev-libs/DirectFB/metadata.xml b/dev-libs/DirectFB/metadata.xml
new file mode 100644
index 000000000000..aaac930ef7b0
--- /dev/null
+++ b/dev-libs/DirectFB/metadata.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>graphics@gentoo.org</email>
+ <name>Gentoo Graphics Project</name>
+ </maintainer>
+ <longdescription>
+ DirectFB is a thin library that provides hardware graphics
+ acceleration, input device handling and abstraction, integrated
+ windowing system with support for translucent windows and
+ multiple display layers on top of the Linux Framebuffer Device.
+ It is a complete hardware abstraction layer with software
+ fallbacks for every graphics operation that is not supported
+ by the underlying hardware. DirectFB adds graphical power to
+ embedded systems and sets a new standard for graphics under
+ Linux.
+ </longdescription>
+ <use>
+ <flag name="bmp">build BMP image provider</flag>
+ <flag name="divine">enable DiVine</flag>
+ <flag name="drmkms">build with DRM/KMS support</flag>
+ <flag name="dynload">enable dynload support</flag>
+ <flag name="egl">build with EGL support</flag>
+ <flag name="fusiondale">enable FusionDale</flag>
+ <flag name="fusionsound">enable FusionSound</flag>
+ <flag name="gles2">build gles2 gfxdriver</flag>
+ <flag name="imlib2">build Imlib2 image provider</flag>
+ <flag name="input_hub">provides an asynchronous interface
+ to the input devices available and those being
+ added/removed</flag>
+ <flag name="mpeg2">build MPEG2 image provider</flag>
+ <flag name="mpeg3">build Libmpeg3 video provider</flag>
+ <flag name="multicore">enable multicore support</flag>
+ <flag name="pnm">build PNM (PBM/PGM/PPM) image provider</flag>
+ <flag name="sawman">enable SaWMan (window manager and
+ application manager)</flag>
+ <flag name="swfdec">build Swfdec (Flash decoder) video
+ provider</flag>
+ <flag name="tremor">build Ogg/Vorbis music provider using
+ Tremor</flag>
+ <flag name="webp">build WebP image provider</flag>
+ </use>
+</pkgmetadata>