1SUMMARY = "Graphics abstraction library for the Linux Framebuffer Device"
2DESCRIPTION = "DirectFB is a thin library that provides developers \
3with hardware graphics acceleration, input device handling and \
4abstraction, an integrated windowing system with support for \
5translucent windows and multiple display layers on top of the \
6Linux framebuffer device."
7SECTION = "libs"
8LICENSE = "LGPL-2.1-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=dcf3c825659e82539645da41a7908589"
10
11HOMEPAGE = "http://directfb.org"
12DEPENDS = "jpeg libpng freetype zlib sysfsutils"
13
14SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.gz \
15           file://configurefix.patch \
16           file://fusion.patch \
17           file://bashism.patch \
18           file://0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch \
19           file://compar_fn_t.patch \
20           file://union-sigval.patch \
21           file://use-PTHREAD_MUTEX_RECURSIVE.patch \
22           file://fix-client-gfx_state-initialisation.patch \
23           file://fix-tslib-version-check.patch \
24           file://0001-Fix-build-on-32bit-arches-with-64bit-time_t.patch \
25           file://0001-os-linux-Fix-build-when-__NR_futex-is-not-available.patch \
26           "
27
28S = "${WORKDIR}/DirectFB-${PV}"
29
30LDFLAGS:append = " -lm"
31
32CXXFLAGS:append:toolchain-clang = " -Wno-error=dtor-typedef"
33
34# Workaround for linking issues seen with armv7a + gold
35LDFLAGS:append:arm = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
36
37BINCONFIG = "${bindir}/directfb-config"
38
39inherit autotools binconfig-disabled pkgconfig
40
41PACKAGECONFIG ??= "linuxinput"
42PACKAGECONFIG[jpeg2000] = "--enable-jpeg2000,--disable-jpeg2000,jasper"
43PACKAGECONFIG[drmkms] = "--enable-drmkms,--disable-drmkms,libdrm"
44PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
45PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
46PACKAGECONFIG[tslib] = "--with-inputdrivers=tslib,,tslib"
47PACKAGECONFIG[linuxinput] = "--with-inputdrivers=linuxinput,,"
48PACKAGECONFIG[noinput] = "--with-inputdrivers=none,,"
49PACKAGECONFIG[mesa] = "--enable-mesa,--disable-mesa,virtual/mesa,"
50PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,xserver-xorg,"
51
52EXTRA_OECONF = "\
53  --with-gfxdrivers=none \
54  --enable-freetype=yes \
55  --enable-zlib \
56  --disable-imlib2 \
57  --disable-sdl \
58  --disable-vnc \
59  --disable-x11vdpau \
60  --disable-xine-vdpau \
61"
62
63#Once -fno-omit-frame-pointer option of gcc is added into TARGET_CLFAGS as default
64#this will cause directfb build failure on x86 arch, so filter out it.
65TARGET_CFLAGS:remove:x86 = "-fno-omit-frame-pointer"
66
67#PACKAGES_DYNAMIC += "^directfb-inputdrivers-.*"
68#
69#python populate_packages:prepend () {
70#    inputdrivers_libdir = d.expand('${libdir}/directfb-${RV}/inputdrivers')
71#    do_split_packages(d, inputdrivers_libdir, '*.so$', 'directfb-inputdrivers-%s', 'Directfb plugin for %s')
72#}
73
74# NOTE: monolithic packaging for now, should improve that eventually
75
76FILES:${PN}-dev += "\
77  ${bindir}/directfb-config \
78  ${libdir}/directfb-${RV}/systems/*.la \
79  ${libdir}/directfb-${RV}/inputdrivers/*.la \
80  ${libdir}/directfb-${RV}/interfaces/*/*.la \
81  ${libdir}/directfb-${RV}/wm/*.la \
82"
83
84FILES:${PN} += "\
85  ${libdir}/directfb-${RV}/systems/*.so \
86  ${libdir}/directfb-${RV}/inputdrivers/*.so \
87  ${libdir}/directfb-${RV}/interfaces/*/*.so \
88  ${libdir}/directfb-${RV}/wm/*.so \
89  ${datadir}/directfb-${PV} \
90"
91